-
Notifications
You must be signed in to change notification settings - Fork 5
FEAT: Agent skill capable of generating optiSLang workflow definition files #562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rfahlberg
wants to merge
9
commits into
main
Choose a base branch
from
feat/osl-wdf-skill
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
43a1285
Added a first draft for an agent skill capable of generating optiSLan…
rfahlberg 8a522ae
Fixes to optislang-wdf skill
rfahlberg 8588dda
Update skills/optislang-wdf/references/parametric.md
rfahlberg cda0223
Apply suggestions from code review
rfahlberg 238348d
Fixes to optislang-wdf skill
rfahlberg 387a2d2
Apply suggestion from @Copilot
rfahlberg 782e8da
Fixes to optislang-wdf skill
rfahlberg 5eaf306
Merge branch 'main' into feat/osl-wdf-skill
rfahlberg 135d5ac
Merge branch 'main' into feat/osl-wdf-skill
rfahlberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| { | ||
| "$id": "https://ldl-laki.docs.ansys.com/schema/rev00/connections", | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "title": "Laki Definition Language connections schema", | ||
| "description": "Defines connections between data pins.", | ||
| "$defs": { | ||
| "RelativeDataPinReference": { | ||
| "$comment": "A reference to a datapin using a relative reference in the user visible namespace (after instantiating) using dotted notation", | ||
| "type": "string" | ||
| }, | ||
| "Assignment": { | ||
| "type": "object", | ||
| "$comment": "A simple assignment where one value is read and one is written", | ||
| "properties": { | ||
| "type": { | ||
| "enum": [ | ||
| "Assignment" | ||
| ] | ||
| }, | ||
| "readFrom": { | ||
| "$comment": "The value that is read, or the right side of the equality", | ||
| "$ref": "#/$defs/RelativeDataPinReference" | ||
| }, | ||
| "writeTo": { | ||
| "$comment": "The value that is written, or the left side of the equality", | ||
| "$ref": "#/$defs/RelativeDataPinReference" | ||
| } | ||
| }, | ||
| "required": ["readFrom", "writeTo"] | ||
| } | ||
| }, | ||
| "type": "array", | ||
| "items": { | ||
| "$comment": "Only directional assignment is supported in this version. A future version may support other types of connections.", | ||
| "$ref": "#/$defs/Assignment" | ||
| } | ||
| } |
75 changes: 75 additions & 0 deletions
75
skills/optislang-wdf/json-schema/datapin_metadata.schema.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| { | ||
| "$id": "https://ldl-laki.docs.ansys.com/schema/rev00/datapin_metadata", | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "title": "Laki datapin metadata definition", | ||
| "description": "Defines the common metadata for datapins, plus a place to store arbitrary metadata.", | ||
| "$defs": { | ||
| "children": { | ||
| "$comment": "Defines a map of name to datapins where each datapin can be any type.", | ||
| "type": "object", | ||
| "$comment": "DRY would say this regex should not be cut-n-pasted. Not sure how to achieve that in JSON-Schema reasonably.", | ||
| "patternProperties": { | ||
| "^[^~!@#$%^&*()+=\\-0-9\\`\\\"\\';:?/.,><\\s][^~!@#$%^&*()+=\\-\\`\\\"\\';:?/.,><\\s]*$": { "$ref": "#"} | ||
| }, | ||
| "additionalProperties": false | ||
| } | ||
| }, | ||
| "type": "object", | ||
| "properties": { | ||
| "type": { | ||
| "type": "string", | ||
| "$comment": "The variable type as per the allowed types from the type library in use." | ||
| }, | ||
| "direction": { | ||
| "$comment": "component_input - the component consumes this external value when it is run.", | ||
| "$comment": "component_result - the component produces this external value when it is run.", | ||
| "$comment": "control_statement_to_component - Only valid on inner_datapins. Indicates that this is a value that the control statement produces before running the sub-workflow.", | ||
| "$comment": "control_statement_from_component - Only valid on inner_datapins. Indicates that this is a value that the control statement consumes after running the sub-workflow.", | ||
| "enum": [ "component_input", "component_result", "control_statement_to_component", "control_statement_from_component" ] | ||
| }, | ||
| "additionalMetadata": { | ||
| "type": "object", | ||
| "$comment": "Arbitrary additional metadata, that is serialized JSON of the specified type." | ||
| }, | ||
| "$ref": { | ||
| "$comment": "Reference a type defined elsewhere.", | ||
| "$comment": "TODO: Need to define precendence or legality of having $ref and conflicting local defs.", | ||
| "type": "string", | ||
| "format": "uri-reference" | ||
| } | ||
| }, | ||
| "required": [ "type" ], | ||
| "additionalProperties": true, | ||
| "if": { | ||
| "$comment": "If it is of type Struct", | ||
| "properties": { | ||
| "type": { "enum": [ "Struct", "Struct[]"] } | ||
| } | ||
| }, | ||
| "then": { | ||
| "$comment": "then create the children properties", | ||
| "properties": { | ||
| "children": { | ||
| "if": { | ||
| "required": [ "$ref" ] | ||
| }, | ||
| "then": { | ||
| "$comment": "Having a $ref at the children level only makes sense for Struct[], where you might want to declare an array of an already existing struct. The if statements to make it only valid in Struct[] feel like overkill to me.", | ||
| "properties": { | ||
| "$ref": { | ||
| "type": "string", | ||
| "format": "uri-reference" | ||
| } | ||
| } | ||
| }, | ||
| "else": { | ||
| "$ref": "#/$defs/children" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "else": { | ||
| "$comment": "disallow 'children' property if not type Struct", | ||
| "not": { "required": [ "children" ] } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| { | ||
| "$id": "https://ldl-laki.docs.ansys.com/schema/rev00/metadata", | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "title": "Laki Definition Language metadata schema", | ||
| "description": "Defines a common set of metadata that can be attached to any file.", | ||
| "$defs": { | ||
| }, | ||
| "type": "object", | ||
| "properties": { | ||
| "description": { | ||
| "description": "Gives a human readable description of what the document contains.", | ||
| "type": "string" | ||
| }, | ||
| "creator": { | ||
| "description": "Who created this document.", | ||
| "type": "string" | ||
| }, | ||
| "authors": { | ||
| "description": "All the authors that have edited this document.", | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "thumbnail": { | ||
| "description": "A reference to a thumbnail view of the contained file.", | ||
| "type": "string", | ||
| "format": "uri-reference" | ||
| }, | ||
| "version": { | ||
| "description": "The version of this document. It is RECOMMENDED that semantic versioning be used, but not required.", | ||
| "type": "string" | ||
| }, | ||
| "helpUrl": { | ||
| "description": "A link to help documentation for whatever this document contains.", | ||
| "type": "string", | ||
| "format": "uri-reference" | ||
| }, | ||
| "displayName": { | ||
| "description": "A short display name or title for use when listing multiple workflows together.", | ||
| "type": "string" | ||
| }, | ||
| "agent": { | ||
| "description": "The tool or user agent which generated this content", | ||
| "$comment": "Should we define this more precisely?", | ||
| "type": "string" | ||
| }, | ||
| "typeLibrary": { | ||
| "description": "What type library this workflow uses", | ||
| "$comment": "Each workflow must use a single type library system where the type library system provides validation, conversion, and transport rules for data as it is handled by the workflow engine. The URI defined here is merely used as an identifier for the type library. A workflow engine MUST NOT try to execute a workflow that uses a type library that it does not understand. A workflow engine MAY reject to load a file that uses a type library system that it does not understand.", | ||
| "type": "string", | ||
| "format": "uri" | ||
| }, | ||
| "resetTimeout": { | ||
| "type": "integer", | ||
| "description": "Specifies the amount of time, in seconds, that the reset command will wait for the reset response before failing.", | ||
| "minimum": 1, | ||
| "default": 60 | ||
| } | ||
| }, | ||
| "required": ["agent", "typeLibrary"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "$id": "https://ldl-laki.docs.ansys.com/schema/rev00/properties", | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "title": "Laki Definition Language properties schema", | ||
| "description": "Defines an object of arbitrary properties that can be attached to nodes on the workflow tree.", | ||
| "$defs": { | ||
| "labeledType": { | ||
| "type": "object", | ||
| "minProperties": 1, | ||
| "maxProperties": 1 | ||
| } | ||
| }, | ||
| "type": "object", | ||
| "$comment": "TODO: Do we want array types?", | ||
| "$comment": "TODO: Do we want to put restrictions on the property names like we did for tree elements?", | ||
|
rfahlberg marked this conversation as resolved.
|
||
| "additionalProperties": { | ||
| "oneOf": [ | ||
| { "$ref": "#/$defs/labeledType" }, | ||
|
rfahlberg marked this conversation as resolved.
|
||
| { "type": "boolean" }, | ||
| { "type": "string" }, | ||
| { "type": "number"} | ||
| ] | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "$id": "https://ldl-laki.docs.ansys.com/schema/rev00/settings", | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "title": "Laki Definition Language workflow settings schema", | ||
| "description": "Defines a common set of workflow configurations that can be applied to any workflow.", | ||
| "$defs": { | ||
| }, | ||
| "type": "object", | ||
| "properties": { | ||
| "resetTimeout": { | ||
| "type": "integer", | ||
| "description": "Specifies the amount of time, in seconds, that the reset command will wait for the reset response before failing.", | ||
| "minimum": 1, | ||
| "default": 60 | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.