@clearideas/agent-runtime-cli 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +4 -0
- package/README.md +205 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +21 -0
- package/dist/index.d.ts +87 -0
- package/dist/index.js +942 -0
- package/examples/agent-runtime.config.yaml +11 -0
- package/examples/conditions.agent.yaml +26 -0
- package/examples/loops.agent.yaml +33 -0
- package/examples/ollama-gemma4.config.yaml +12 -0
- package/examples/variables.agent.yaml +31 -0
- package/package.json +72 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
schemaVersion: '1.0'
|
|
2
|
+
id: example-conditions
|
|
3
|
+
name: Conditional execution
|
|
4
|
+
model:
|
|
5
|
+
ref: fast
|
|
6
|
+
variables:
|
|
7
|
+
review:
|
|
8
|
+
enabled: true
|
|
9
|
+
steps:
|
|
10
|
+
- id: score
|
|
11
|
+
type: prompt
|
|
12
|
+
systemPrompt: Return only the requested integer.
|
|
13
|
+
prompt: Return exactly 9
|
|
14
|
+
outputVariable: score
|
|
15
|
+
- id: accepted
|
|
16
|
+
type: prompt
|
|
17
|
+
when: review.enabled == true && score == "9"
|
|
18
|
+
systemPrompt: The score {{ score }} was accepted. Return only the requested token.
|
|
19
|
+
prompt: Return exactly ACCEPTED
|
|
20
|
+
outputVariable: final
|
|
21
|
+
includeInFinalOutput: true
|
|
22
|
+
- id: rejected
|
|
23
|
+
type: prompt
|
|
24
|
+
when: score != "9"
|
|
25
|
+
prompt: Return exactly REJECTED
|
|
26
|
+
outputVariable: rejected
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
schemaVersion: '1.0'
|
|
2
|
+
id: example-loops
|
|
3
|
+
name: Collection loop
|
|
4
|
+
model:
|
|
5
|
+
ref: fast
|
|
6
|
+
variables:
|
|
7
|
+
items:
|
|
8
|
+
- name: Alpha
|
|
9
|
+
enabled: true
|
|
10
|
+
- name: Beta
|
|
11
|
+
enabled: false
|
|
12
|
+
- name: Gamma
|
|
13
|
+
enabled: true
|
|
14
|
+
steps:
|
|
15
|
+
- id: summarize-items
|
|
16
|
+
type: loop
|
|
17
|
+
loop:
|
|
18
|
+
source: items
|
|
19
|
+
itemVariable: item
|
|
20
|
+
indexVariable: itemIndex
|
|
21
|
+
condition: item.enabled == true
|
|
22
|
+
outputMode: array
|
|
23
|
+
resultVariable: itemSummary
|
|
24
|
+
outputVariable: summaries
|
|
25
|
+
steps:
|
|
26
|
+
- id: summarize-item
|
|
27
|
+
type: prompt
|
|
28
|
+
systemPrompt: >-
|
|
29
|
+
You are processing item {{ itemIndex }} named {{ item.name }}.
|
|
30
|
+
Return only the requested token.
|
|
31
|
+
prompt: Return exactly {{ item.name }}_DONE
|
|
32
|
+
outputVariable: itemSummary
|
|
33
|
+
includeInFinalOutput: true
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
schemaVersion: '1.0'
|
|
2
|
+
id: example-variables
|
|
3
|
+
name: Variables and system prompts
|
|
4
|
+
model:
|
|
5
|
+
ref: fast
|
|
6
|
+
variables:
|
|
7
|
+
- key: organization
|
|
8
|
+
type: string
|
|
9
|
+
value: Example Company
|
|
10
|
+
- key: audience
|
|
11
|
+
type: string
|
|
12
|
+
value: Product leaders
|
|
13
|
+
- key: style
|
|
14
|
+
type: object
|
|
15
|
+
value:
|
|
16
|
+
tone: concise
|
|
17
|
+
steps:
|
|
18
|
+
- id: create-topic
|
|
19
|
+
type: prompt
|
|
20
|
+
systemPrompt: >-
|
|
21
|
+
You write for {{ organization }} and the audience is {{ audience }}.
|
|
22
|
+
Use a {{ style.tone }} tone. Return only the requested token.
|
|
23
|
+
prompt: Return exactly PORTABLE_AGENT
|
|
24
|
+
outputVariable: topic
|
|
25
|
+
- id: reuse-topic
|
|
26
|
+
type: prompt
|
|
27
|
+
systemPrompt: >-
|
|
28
|
+
The prior step produced {{ topic }}. Return only the requested sentence.
|
|
29
|
+
prompt: Return exactly "{{ topic }} is ready."
|
|
30
|
+
outputVariable: final
|
|
31
|
+
includeInFinalOutput: true
|
package/package.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@clearideas/agent-runtime-cli",
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
|
+
"description": "Command-line utilities for agent manifests, agent run manifests, and run state.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": "Clear Ideas Incorporated",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/clearideas/agent-runtime.git",
|
|
10
|
+
"directory": "packages/cli"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "restricted",
|
|
14
|
+
"provenance": false,
|
|
15
|
+
"registry": "https://registry.npmjs.org/"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"NOTICE",
|
|
20
|
+
"examples",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
23
|
+
"type": "module",
|
|
24
|
+
"main": "dist/index.js",
|
|
25
|
+
"types": "dist/index.d.ts",
|
|
26
|
+
"bin": {
|
|
27
|
+
"agent-runtime": "dist/bin.js"
|
|
28
|
+
},
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"default": "./dist/index.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "tsc -b tsconfig.json --force",
|
|
37
|
+
"type-check": "tsc -p tsconfig.json --noEmit",
|
|
38
|
+
"test": "vitest run",
|
|
39
|
+
"prepack": "npm run build && node ../../scripts/prepare-package-license.mjs",
|
|
40
|
+
"postpack": "node ../../scripts/cleanup-package-license.mjs"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@clearideas/agent-runtime-condition-jexl": "0.1.0-alpha.1",
|
|
44
|
+
"@clearideas/agent-runtime-config": "0.1.0-alpha.1",
|
|
45
|
+
"@clearideas/agent-runtime-contracts": "0.1.0-alpha.1",
|
|
46
|
+
"@clearideas/agent-runtime-core": "0.1.0-alpha.1",
|
|
47
|
+
"@clearideas/agent-runtime-execution": "0.1.0-alpha.1",
|
|
48
|
+
"@clearideas/agent-runtime-step-loop": "0.1.0-alpha.1",
|
|
49
|
+
"@clearideas/agent-runtime-step-prompt": "0.1.0-alpha.1",
|
|
50
|
+
"@clearideas/agent-runtime-step-standard": "0.1.0-alpha.1",
|
|
51
|
+
"@clearideas/agent-runtime-store-local": "0.1.0-alpha.1",
|
|
52
|
+
"@clearideas/agent-runtime-store-sqlite": "0.1.0-alpha.1"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@types/node": "^25.6.0",
|
|
56
|
+
"typescript": "^6.0.3",
|
|
57
|
+
"vitest": "^4.0.18"
|
|
58
|
+
},
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">=24"
|
|
61
|
+
},
|
|
62
|
+
"homepage": "https://github.com/clearideas/agent-runtime#readme",
|
|
63
|
+
"bugs": {
|
|
64
|
+
"url": "https://github.com/clearideas/agent-runtime/issues"
|
|
65
|
+
},
|
|
66
|
+
"keywords": [
|
|
67
|
+
"ai",
|
|
68
|
+
"agents",
|
|
69
|
+
"agent-runtime",
|
|
70
|
+
"workflows"
|
|
71
|
+
]
|
|
72
|
+
}
|