@united-workforce/cli 0.3.0 → 0.5.0
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/README.md +45 -11
- package/dist/.build-fingerprint +1 -0
- package/dist/__tests__/adapter-json-roundtrip.test.js +17 -7
- package/dist/__tests__/adapter-json-roundtrip.test.js.map +1 -1
- package/dist/__tests__/agent-resolution-llm-free.test.d.ts +2 -0
- package/dist/__tests__/agent-resolution-llm-free.test.d.ts.map +1 -0
- package/dist/__tests__/agent-resolution-llm-free.test.js +30 -0
- package/dist/__tests__/agent-resolution-llm-free.test.js.map +1 -0
- package/dist/__tests__/build-step-entry.test.d.ts +2 -0
- package/dist/__tests__/build-step-entry.test.d.ts.map +1 -0
- package/dist/__tests__/build-step-entry.test.js +173 -0
- package/dist/__tests__/build-step-entry.test.js.map +1 -0
- package/dist/__tests__/clear-thread-failed-attempts.test.d.ts +2 -0
- package/dist/__tests__/clear-thread-failed-attempts.test.d.ts.map +1 -0
- package/dist/__tests__/clear-thread-failed-attempts.test.js +93 -0
- package/dist/__tests__/clear-thread-failed-attempts.test.js.map +1 -0
- package/dist/__tests__/concurrency.test.d.ts +2 -0
- package/dist/__tests__/concurrency.test.d.ts.map +1 -0
- package/dist/__tests__/concurrency.test.js +196 -0
- package/dist/__tests__/concurrency.test.js.map +1 -0
- package/dist/__tests__/config.test.js +26 -302
- package/dist/__tests__/config.test.js.map +1 -1
- package/dist/__tests__/current-role.test.js +7 -6
- package/dist/__tests__/current-role.test.js.map +1 -1
- package/dist/__tests__/e2e-mock-agent.test.js +43 -30
- package/dist/__tests__/e2e-mock-agent.test.js.map +1 -1
- package/dist/__tests__/format-text-default.test.d.ts +2 -0
- package/dist/__tests__/format-text-default.test.d.ts.map +1 -0
- package/dist/__tests__/format-text-default.test.js +43 -0
- package/dist/__tests__/format-text-default.test.js.map +1 -0
- package/dist/__tests__/format-text-registry.test.d.ts +2 -0
- package/dist/__tests__/format-text-registry.test.d.ts.map +1 -0
- package/dist/__tests__/format-text-registry.test.js +158 -0
- package/dist/__tests__/format-text-registry.test.js.map +1 -0
- package/dist/__tests__/issue-180-workflow-ref-removed.test.d.ts +2 -0
- package/dist/__tests__/issue-180-workflow-ref-removed.test.d.ts.map +1 -0
- package/dist/__tests__/issue-180-workflow-ref-removed.test.js +40 -0
- package/dist/__tests__/issue-180-workflow-ref-removed.test.js.map +1 -0
- package/dist/__tests__/log-text-renderer.test.d.ts +2 -0
- package/dist/__tests__/log-text-renderer.test.d.ts.map +1 -0
- package/dist/__tests__/log-text-renderer.test.js +265 -0
- package/dist/__tests__/log-text-renderer.test.js.map +1 -0
- package/dist/__tests__/moderator-evaluate.test.js +9 -50
- package/dist/__tests__/moderator-evaluate.test.js.map +1 -1
- package/dist/__tests__/output-mapper-thread-list-startedat.test.d.ts +2 -0
- package/dist/__tests__/output-mapper-thread-list-startedat.test.d.ts.map +1 -0
- package/dist/__tests__/output-mapper-thread-list-startedat.test.js +102 -0
- package/dist/__tests__/output-mapper-thread-list-startedat.test.js.map +1 -0
- package/dist/__tests__/output-mapper-workflow-add.test.d.ts +2 -0
- package/dist/__tests__/output-mapper-workflow-add.test.d.ts.map +1 -0
- package/dist/__tests__/output-mapper-workflow-add.test.js +22 -0
- package/dist/__tests__/output-mapper-workflow-add.test.js.map +1 -0
- package/dist/__tests__/pid-recycling.test.d.ts +2 -0
- package/dist/__tests__/pid-recycling.test.d.ts.map +1 -0
- package/dist/__tests__/pid-recycling.test.js +273 -0
- package/dist/__tests__/pid-recycling.test.js.map +1 -0
- package/dist/__tests__/prompt.test.js +365 -2
- package/dist/__tests__/prompt.test.js.map +1 -1
- package/dist/__tests__/resolve-head-hash.test.js +12 -4
- package/dist/__tests__/resolve-head-hash.test.js.map +1 -1
- package/dist/__tests__/setup-agent-discovery.test.js +21 -30
- package/dist/__tests__/setup-agent-discovery.test.js.map +1 -1
- package/dist/__tests__/setup-complexity.test.js +2 -168
- package/dist/__tests__/setup-complexity.test.js.map +1 -1
- package/dist/__tests__/setup-no-llm.test.d.ts +2 -0
- package/dist/__tests__/setup-no-llm.test.d.ts.map +1 -0
- package/dist/__tests__/setup-no-llm.test.js +52 -0
- package/dist/__tests__/setup-no-llm.test.js.map +1 -0
- package/dist/__tests__/solve-issue-tea-worktree.test.js +27 -28
- package/dist/__tests__/solve-issue-tea-worktree.test.js.map +1 -1
- package/dist/__tests__/step-ask.test.d.ts +2 -0
- package/dist/__tests__/step-ask.test.d.ts.map +1 -0
- package/dist/__tests__/step-ask.test.js +507 -0
- package/dist/__tests__/step-ask.test.js.map +1 -0
- package/dist/__tests__/step-show-json.test.js +1 -0
- package/dist/__tests__/step-show-json.test.js.map +1 -1
- package/dist/__tests__/step-timing.test.js +2 -0
- package/dist/__tests__/step-timing.test.js.map +1 -1
- package/dist/__tests__/store-global-cas.test.js +2 -2
- package/dist/__tests__/store-global-cas.test.js.map +1 -1
- package/dist/__tests__/store-unified-threads.test.js +28 -26
- package/dist/__tests__/store-unified-threads.test.js.map +1 -1
- package/dist/__tests__/thread-cancel-status.test.js +25 -19
- package/dist/__tests__/thread-cancel-status.test.js.map +1 -1
- package/dist/__tests__/thread-cancel-text-renderer.test.d.ts +2 -0
- package/dist/__tests__/thread-cancel-text-renderer.test.d.ts.map +1 -0
- package/dist/__tests__/thread-cancel-text-renderer.test.js +110 -0
- package/dist/__tests__/thread-cancel-text-renderer.test.js.map +1 -0
- package/dist/__tests__/thread-list-filters.test.js +354 -17
- package/dist/__tests__/thread-list-filters.test.js.map +1 -1
- package/dist/__tests__/thread-list-template-ms-date.test.d.ts +2 -0
- package/dist/__tests__/thread-list-template-ms-date.test.d.ts.map +1 -0
- package/dist/__tests__/thread-list-template-ms-date.test.js +102 -0
- package/dist/__tests__/thread-list-template-ms-date.test.js.map +1 -0
- package/dist/__tests__/thread-list-workflow-corrupt.test.d.ts +2 -0
- package/dist/__tests__/thread-list-workflow-corrupt.test.d.ts.map +1 -0
- package/dist/__tests__/thread-list-workflow-corrupt.test.js +157 -0
- package/dist/__tests__/thread-list-workflow-corrupt.test.js.map +1 -0
- package/dist/__tests__/thread-poke.test.d.ts +2 -0
- package/dist/__tests__/thread-poke.test.d.ts.map +1 -0
- package/dist/__tests__/thread-poke.test.js +422 -0
- package/dist/__tests__/thread-poke.test.js.map +1 -0
- package/dist/__tests__/thread-read-xml-tags.test.js +10 -9
- package/dist/__tests__/thread-read-xml-tags.test.js.map +1 -1
- package/dist/__tests__/thread-resume.test.js +21 -15
- package/dist/__tests__/thread-resume.test.js.map +1 -1
- package/dist/__tests__/thread-show-status.test.js +17 -28
- package/dist/__tests__/thread-show-status.test.js.map +1 -1
- package/dist/__tests__/thread-start-cwd-cli.test.js +15 -3
- package/dist/__tests__/thread-start-cwd-cli.test.js.map +1 -1
- package/dist/__tests__/thread-stop-text-renderer.test.d.ts +2 -0
- package/dist/__tests__/thread-stop-text-renderer.test.d.ts.map +1 -0
- package/dist/__tests__/thread-stop-text-renderer.test.js +148 -0
- package/dist/__tests__/thread-stop-text-renderer.test.js.map +1 -0
- package/dist/__tests__/thread-suspend-step.test.js +13 -16
- package/dist/__tests__/thread-suspend-step.test.js.map +1 -1
- package/dist/__tests__/thread-suspended-display.test.js +10 -22
- package/dist/__tests__/thread-suspended-display.test.js.map +1 -1
- package/dist/__tests__/thread-test-helpers.d.ts +7 -0
- package/dist/__tests__/thread-test-helpers.d.ts.map +1 -1
- package/dist/__tests__/thread-test-helpers.js +13 -0
- package/dist/__tests__/thread-test-helpers.js.map +1 -1
- package/dist/__tests__/thread.test.js +15 -13
- package/dist/__tests__/thread.test.js.map +1 -1
- package/dist/__tests__/validate-semantic.test.js +105 -23
- package/dist/__tests__/validate-semantic.test.js.map +1 -1
- package/dist/__tests__/workflow-list-recursive.test.d.ts +2 -0
- package/dist/__tests__/workflow-list-recursive.test.d.ts.map +1 -0
- package/dist/__tests__/workflow-list-recursive.test.js +286 -0
- package/dist/__tests__/workflow-list-recursive.test.js.map +1 -0
- package/dist/__tests__/workflow-resolution.test.js +46 -28
- package/dist/__tests__/workflow-resolution.test.js.map +1 -1
- package/dist/__tests__/workflow-show-resolution.test.d.ts +2 -0
- package/dist/__tests__/workflow-show-resolution.test.d.ts.map +1 -0
- package/dist/__tests__/workflow-show-resolution.test.js +213 -0
- package/dist/__tests__/workflow-show-resolution.test.js.map +1 -0
- package/dist/__tests__/workflow-validate.test.d.ts +2 -0
- package/dist/__tests__/workflow-validate.test.d.ts.map +1 -0
- package/dist/__tests__/workflow-validate.test.js +707 -0
- package/dist/__tests__/workflow-validate.test.js.map +1 -0
- package/dist/__tests__/write-envelope.test.d.ts +2 -0
- package/dist/__tests__/write-envelope.test.d.ts.map +1 -0
- package/dist/__tests__/write-envelope.test.js +201 -0
- package/dist/__tests__/write-envelope.test.js.map +1 -0
- package/dist/background/background.d.ts +22 -1
- package/dist/background/background.d.ts.map +1 -1
- package/dist/background/background.js +83 -6
- package/dist/background/background.js.map +1 -1
- package/dist/background/index.d.ts +1 -1
- package/dist/background/index.d.ts.map +1 -1
- package/dist/background/index.js +1 -1
- package/dist/background/index.js.map +1 -1
- package/dist/background/types.d.ts +1 -0
- package/dist/background/types.d.ts.map +1 -1
- package/dist/cli.js +120 -62
- package/dist/cli.js.map +1 -1
- package/dist/commands/config.d.ts +3 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +17 -31
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/prompt.d.ts.map +1 -1
- package/dist/commands/prompt.js +57 -31
- package/dist/commands/prompt.js.map +1 -1
- package/dist/commands/setup.d.ts +12 -39
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +72 -303
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/step.d.ts +44 -1
- package/dist/commands/step.d.ts.map +1 -1
- package/dist/commands/step.js +255 -11
- package/dist/commands/step.js.map +1 -1
- package/dist/commands/thread.d.ts +16 -3
- package/dist/commands/thread.d.ts.map +1 -1
- package/dist/commands/thread.js +423 -142
- package/dist/commands/thread.js.map +1 -1
- package/dist/commands/workflow.d.ts +9 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +126 -6
- package/dist/commands/workflow.js.map +1 -1
- package/dist/concurrency/concurrency.d.ts +34 -0
- package/dist/concurrency/concurrency.d.ts.map +1 -0
- package/dist/concurrency/concurrency.js +216 -0
- package/dist/concurrency/concurrency.js.map +1 -0
- package/dist/concurrency/index.d.ts +3 -0
- package/dist/concurrency/index.d.ts.map +1 -0
- package/dist/concurrency/index.js +2 -0
- package/dist/concurrency/index.js.map +1 -0
- package/dist/concurrency/types.d.ts +19 -0
- package/dist/concurrency/types.d.ts.map +1 -0
- package/dist/concurrency/types.js +2 -0
- package/dist/concurrency/types.js.map +1 -0
- package/dist/format.d.ts +69 -2
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +198 -1
- package/dist/format.js.map +1 -1
- package/dist/moderator/__tests__/evaluate.test.js +31 -17
- package/dist/moderator/__tests__/evaluate.test.js.map +1 -1
- package/dist/moderator/evaluate.d.ts.map +1 -1
- package/dist/moderator/evaluate.js +4 -16
- package/dist/moderator/evaluate.js.map +1 -1
- package/dist/moderator/index.d.ts +1 -2
- package/dist/moderator/index.d.ts.map +1 -1
- package/dist/moderator/index.js +0 -1
- package/dist/moderator/index.js.map +1 -1
- package/dist/moderator/types.d.ts +6 -10
- package/dist/moderator/types.d.ts.map +1 -1
- package/dist/moderator/types.js +1 -3
- package/dist/moderator/types.js.map +1 -1
- package/dist/output-mappers.d.ts +122 -0
- package/dist/output-mappers.d.ts.map +1 -0
- package/dist/output-mappers.js +134 -0
- package/dist/output-mappers.js.map +1 -0
- package/dist/schemas.d.ts +6 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +34 -5
- package/dist/schemas.js.map +1 -1
- package/dist/store.d.ts +28 -9
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +75 -16
- package/dist/store.js.map +1 -1
- package/dist/text-renderers.d.ts +30 -0
- package/dist/text-renderers.d.ts.map +1 -0
- package/dist/text-renderers.js +251 -0
- package/dist/text-renderers.js.map +1 -0
- package/dist/validate-semantic.d.ts.map +1 -1
- package/dist/validate-semantic.js +95 -61
- package/dist/validate-semantic.js.map +1 -1
- package/dist/validate.d.ts +6 -0
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +24 -0
- package/dist/validate.js.map +1 -1
- package/examples/brainstorm.yaml +130 -0
- package/examples/debate.yaml +169 -0
- package/examples/socratic-questioning.yaml +112 -0
- package/package.json +9 -10
- package/src/__tests__/adapter-json-roundtrip.test.ts +16 -7
- package/src/__tests__/agent-resolution-llm-free.test.ts +39 -0
- package/src/__tests__/build-step-entry.test.ts +203 -0
- package/src/__tests__/clear-thread-failed-attempts.test.ts +122 -0
- package/src/__tests__/concurrency.test.ts +266 -0
- package/src/__tests__/config.test.ts +33 -321
- package/src/__tests__/current-role.test.ts +7 -6
- package/src/__tests__/e2e-mock-agent.test.ts +65 -30
- package/src/__tests__/fixtures/e2e-count.workflow.yaml +1 -0
- package/src/__tests__/fixtures/e2e-linear.workflow.yaml +1 -0
- package/src/__tests__/fixtures/{e2e-mustache.workflow.yaml → e2e-liquid.workflow.yaml} +3 -2
- package/src/__tests__/fixtures/e2e-loop.workflow.yaml +1 -0
- package/src/__tests__/fixtures/e2e-suspend.mock.yaml +2 -2
- package/src/__tests__/fixtures/e2e-suspend.workflow.yaml +6 -10
- package/src/__tests__/format-text-default.test.ts +49 -0
- package/src/__tests__/format-text-registry.test.ts +173 -0
- package/src/__tests__/issue-180-workflow-ref-removed.test.ts +43 -0
- package/src/__tests__/log-text-renderer.test.ts +294 -0
- package/src/__tests__/moderator-evaluate.test.ts +9 -52
- package/src/__tests__/output-mapper-thread-list-startedat.test.ts +124 -0
- package/src/__tests__/output-mapper-workflow-add.test.ts +24 -0
- package/src/__tests__/pid-recycling.test.ts +329 -0
- package/src/__tests__/prompt.test.ts +443 -2
- package/src/__tests__/resolve-head-hash.test.ts +11 -4
- package/src/__tests__/setup-agent-discovery.test.ts +26 -51
- package/src/__tests__/setup-complexity.test.ts +1 -203
- package/src/__tests__/setup-no-llm.test.ts +68 -0
- package/src/__tests__/solve-issue-tea-worktree.test.ts +27 -31
- package/src/__tests__/step-ask.test.ts +677 -0
- package/src/__tests__/step-show-json.test.ts +1 -0
- package/src/__tests__/step-timing.test.ts +2 -0
- package/src/__tests__/store-global-cas.test.ts +2 -2
- package/src/__tests__/store-unified-threads.test.ts +30 -27
- package/src/__tests__/thread-cancel-status.test.ts +27 -20
- package/src/__tests__/thread-cancel-text-renderer.test.ts +125 -0
- package/src/__tests__/thread-list-filters.test.ts +443 -17
- package/src/__tests__/thread-list-template-ms-date.test.ts +110 -0
- package/src/__tests__/thread-list-workflow-corrupt.test.ts +198 -0
- package/src/__tests__/thread-poke.test.ts +554 -0
- package/src/__tests__/thread-read-xml-tags.test.ts +9 -11
- package/src/__tests__/thread-resume.test.ts +20 -15
- package/src/__tests__/thread-show-status.test.ts +17 -29
- package/src/__tests__/thread-start-cwd-cli.test.ts +15 -3
- package/src/__tests__/thread-stop-text-renderer.test.ts +168 -0
- package/src/__tests__/thread-suspend-step.test.ts +13 -16
- package/src/__tests__/thread-suspended-display.test.ts +10 -22
- package/src/__tests__/thread-test-helpers.ts +15 -1
- package/src/__tests__/thread.test.ts +14 -14
- package/src/__tests__/validate-semantic.test.ts +118 -33
- package/src/__tests__/workflow-list-recursive.test.ts +370 -0
- package/src/__tests__/workflow-resolution.test.ts +48 -29
- package/src/__tests__/workflow-show-resolution.test.ts +286 -0
- package/src/__tests__/workflow-validate.test.ts +828 -0
- package/src/__tests__/write-envelope.test.ts +257 -0
- package/src/background/background.ts +88 -6
- package/src/background/index.ts +2 -0
- package/src/background/types.ts +1 -0
- package/src/cli.ts +184 -77
- package/src/commands/config.ts +16 -33
- package/src/commands/prompt.ts +57 -31
- package/src/commands/setup.ts +80 -358
- package/src/commands/step.ts +339 -12
- package/src/commands/thread.ts +511 -171
- package/src/commands/workflow.ts +155 -4
- package/src/concurrency/concurrency.ts +245 -0
- package/src/concurrency/index.ts +10 -0
- package/src/concurrency/types.ts +19 -0
- package/src/format.ts +282 -2
- package/src/moderator/__tests__/evaluate.test.ts +34 -17
- package/src/moderator/evaluate.ts +5 -17
- package/src/moderator/index.ts +1 -6
- package/src/moderator/types.ts +6 -14
- package/src/output-mappers.ts +254 -0
- package/src/schemas.ts +51 -5
- package/src/store.ts +86 -20
- package/src/text-renderers.ts +355 -0
- package/src/validate-semantic.ts +125 -73
- package/src/validate.ts +27 -0
- package/dist/__tests__/setup-validate.test.d.ts +0 -2
- package/dist/__tests__/setup-validate.test.d.ts.map +0 -1
- package/dist/__tests__/setup-validate.test.js +0 -108
- package/dist/__tests__/setup-validate.test.js.map +0 -1
- package/src/__tests__/setup-validate.test.ts +0 -148
- /package/src/__tests__/fixtures/{e2e-mustache.mock.yaml → e2e-liquid.mock.yaml} +0 -0
package/dist/commands/prompt.js
CHANGED
|
@@ -133,44 +133,36 @@ pipx install 'hermes-agent[acp]'
|
|
|
133
133
|
pip install -e '.[acp]'
|
|
134
134
|
\`\`\`
|
|
135
135
|
|
|
136
|
-
### Step 2 — Configure
|
|
136
|
+
### Step 2 — Configure default agent
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
Run the interactive wizard:
|
|
139
139
|
|
|
140
140
|
\`\`\`bash
|
|
141
|
-
uwf setup
|
|
141
|
+
uwf setup
|
|
142
142
|
\`\`\`
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
**Preset providers** — when using a preset name, \`--base-url\` is auto-filled and can be omitted:
|
|
147
|
-
|
|
148
|
-
| Provider | Name | Default base URL |
|
|
149
|
-
|----------|------|-----------------|
|
|
150
|
-
| OpenAI | \`openai\` | https://api.openai.com/v1 |
|
|
151
|
-
| xAI | \`xai\` | https://api.x.ai/v1 |
|
|
152
|
-
| OpenRouter | \`openrouter\` | https://openrouter.ai/api/v1 |
|
|
153
|
-
| Venice | \`venice\` | https://api.venice.ai/api/v1 |
|
|
154
|
-
| Dashscope | \`dashscope\` | https://dashscope.aliyuncs.com/compatible-mode/v1 |
|
|
155
|
-
| DeepSeek | \`deepseek\` | https://api.deepseek.com/v1 |
|
|
156
|
-
| SiliconFlow | \`siliconflow\` | https://api.siliconflow.cn/v1 |
|
|
157
|
-
| VolcEngine | \`volcengine\` | https://ark.cn-beijing.volces.com/api/v3 |
|
|
158
|
-
| Kimi (Moonshot) | \`kimi\` | https://api.moonshot.cn/v1 |
|
|
159
|
-
| GLM (Zhipu AI) | \`glm\` | https://open.bigmodel.cn/api/paas/v4 |
|
|
160
|
-
| StepFun | \`stepfun\` | https://api.stepfun.com/v1 |
|
|
161
|
-
| MiniMax | \`minimax\` | https://api.minimax.io/v1 |
|
|
162
|
-
| Ollama (local) | \`ollama\` | http://localhost:11434/v1 |
|
|
163
|
-
|
|
164
|
-
For **non-preset providers**, you must specify \`--base-url\` manually.
|
|
165
|
-
|
|
166
|
-
Example:
|
|
144
|
+
Or configure non-interactively:
|
|
145
|
+
|
|
167
146
|
\`\`\`bash
|
|
168
|
-
uwf setup --
|
|
147
|
+
uwf setup --agent <adapter-command>
|
|
148
|
+
\`\`\`
|
|
149
|
+
|
|
150
|
+
**Note:** \`--agent\` takes the adapter **command name** (e.g. \`uwf-hermes\`, \`uwf-claude-code\`), not the npm package name.
|
|
151
|
+
|
|
152
|
+
Config is saved to \`~/.uwf/config.yaml\`:
|
|
153
|
+
|
|
154
|
+
\`\`\`yaml
|
|
155
|
+
agents:
|
|
156
|
+
hermes:
|
|
157
|
+
command: uwf-hermes
|
|
158
|
+
args: []
|
|
159
|
+
defaultAgent: hermes
|
|
160
|
+
agentOverrides: {}
|
|
169
161
|
\`\`\`
|
|
170
162
|
|
|
171
|
-
|
|
163
|
+
**LLM configuration** is per-adapter — each adapter manages its own provider, model, and API key settings independently (typically via environment variables like \`CLAUDE_MODEL\`, \`ANTHROPIC_API_KEY\`, etc.). The engine config (\`~/.uwf/config.yaml\`) is LLM-free.
|
|
172
164
|
|
|
173
|
-
|
|
165
|
+
Verify with \`cat ~/.uwf/config.yaml\`.
|
|
174
166
|
|
|
175
167
|
### Step 3 — Install skills
|
|
176
168
|
|
|
@@ -226,7 +218,17 @@ uwf thread exec <thread-id>
|
|
|
226
218
|
uwf thread show <thread-id>
|
|
227
219
|
\`\`\`
|
|
228
220
|
|
|
229
|
-
If the thread reaches \`$END\` with status \`
|
|
221
|
+
If the thread reaches \`$END\` with status \`end\`, the setup is working.
|
|
222
|
+
|
|
223
|
+
To verify suspend/resume and poke:
|
|
224
|
+
|
|
225
|
+
\`\`\`bash
|
|
226
|
+
# After a role yields with $status: "$SUSPEND", resume the suspended thread:
|
|
227
|
+
uwf thread resume <thread-id> -p "Additional context for the agent"
|
|
228
|
+
|
|
229
|
+
# Re-run the head step's agent with a supplementary prompt (replaces head step):
|
|
230
|
+
uwf thread poke <thread-id> -p "Try again with this hint"
|
|
231
|
+
\`\`\`
|
|
230
232
|
|
|
231
233
|
## Scenario B: Upgrade from Previous Version
|
|
232
234
|
|
|
@@ -282,7 +284,7 @@ Check the changelog for breaking changes. Known migrations:
|
|
|
282
284
|
resume: { role: planner, prompt: "Review previous run and continue." }
|
|
283
285
|
\`\`\`
|
|
284
286
|
|
|
285
|
-
Update all \`.
|
|
287
|
+
Update all \`.workflows/\` and \`.workflow/\` YAML files in your projects. \`uwf workflow add\` will reject files with the old \`_\` syntax.
|
|
286
288
|
|
|
287
289
|
- **v0.2.1**: \`$status: { enum: [value] }\` → \`$status: { const: "value" }\`. The validator no longer accepts \`enum\` for \`$status\`. Update all workflow YAML files:
|
|
288
290
|
\`\`\`yaml
|
|
@@ -295,6 +297,9 @@ Update all \`.workflow/\` and \`.workflows/\` YAML files in your projects. \`uwf
|
|
|
295
297
|
# For multi-exit, use oneOf with const (unchanged)
|
|
296
298
|
\`\`\`
|
|
297
299
|
|
|
300
|
+
- **v0.4.0**: Thread status \`completed\` → \`end\`. Update scripts that filter \`--status completed\` to use \`--status end\`. Legacy on-disk \`status: completed\` is normalized to \`end\` on read.
|
|
301
|
+
- **v0.4.0**: \`$SUSPEND\` is now an engine-level coroutine yield, not a graph target. Workflows that routed to \`role: "$SUSPEND"\` must emit \`$status: "$SUSPEND"\` with a \`reason\` from the role output instead. The thread becomes \`suspended\`; continue with \`uwf thread resume\`.
|
|
302
|
+
|
|
298
303
|
### Step 4 — Verify
|
|
299
304
|
|
|
300
305
|
\`\`\`bash
|
|
@@ -311,6 +316,27 @@ uwf prompt workflow-authoring # workflow YAML design guide
|
|
|
311
316
|
uwf prompt adapter-developing # building agent adapters
|
|
312
317
|
uwf prompt bootstrap # this guide
|
|
313
318
|
\`\`\`
|
|
319
|
+
|
|
320
|
+
## What's next — introduce uwf to the user
|
|
321
|
+
|
|
322
|
+
After setup is complete, give the user a brief introduction to what uwf can do
|
|
323
|
+
and invite them to try it. Cover these three things:
|
|
324
|
+
|
|
325
|
+
1. **Run workflows** — execute pre-built workflows to automate multi-step tasks.
|
|
326
|
+
Setup auto-registers example workflows, ready to use immediately.
|
|
327
|
+
2. **Create workflows** — design custom YAML workflows for their own recurring tasks
|
|
328
|
+
(code review, issue triage, release pipelines, etc.). Use \`uwf prompt workflow-authoring\`
|
|
329
|
+
for the authoring guide.
|
|
330
|
+
3. **Debug & improve workflows** — iterate on workflow definitions, inspect thread state
|
|
331
|
+
with \`uwf thread show\`, replay failed steps with \`uwf thread poke\`, and refine
|
|
332
|
+
role procedures based on real execution results.
|
|
333
|
+
|
|
334
|
+
**Discover & try built-in examples:**
|
|
335
|
+
|
|
336
|
+
Run \`uwf workflow list\` to see which workflows are registered (setup auto-registers
|
|
337
|
+
several built-in examples). Show the user what's available, then invite them to try
|
|
338
|
+
one — for instance, suggest a fun debate topic like "AI 是否会抢了人类的工作?" and
|
|
339
|
+
offer to kick it off for them.
|
|
314
340
|
`;
|
|
315
341
|
}
|
|
316
342
|
//# sourceMappingURL=prompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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{ createInterface } from "node:readline/promises";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Send a minimal chat completion request to verify the model is reachable.
|
|
5
|
-
* Returns ok on 2xx, error with reason string otherwise.
|
|
6
|
-
*/
|
|
7
|
-
export declare function validateModel(baseUrl: string, apiKey: string, model: string): Promise<Result<void, string>>;
|
|
8
|
-
/** Look up the base URL for a preset provider name. Returns null if not a preset. */
|
|
9
|
-
export declare function resolvePresetBaseUrl(providerName: string): string | null;
|
|
10
|
-
type SetupArgs = {
|
|
11
|
-
provider: string;
|
|
12
|
-
baseUrl: string;
|
|
13
|
-
apiKey: string;
|
|
14
|
-
model: string;
|
|
15
|
-
agent?: string | undefined;
|
|
2
|
+
export type SetupArgs = {
|
|
3
|
+
agent: string;
|
|
16
4
|
storageRoot: string;
|
|
17
5
|
};
|
|
18
6
|
/**
|
|
@@ -32,22 +20,6 @@ export declare function _discoverAgents(): Promise<string[]>;
|
|
|
32
20
|
export declare function _isTerminator(c: string): boolean;
|
|
33
21
|
/** Returns true for DEL or backspace. */
|
|
34
22
|
export declare function _isBackspace(c: string): boolean;
|
|
35
|
-
type ProviderEntry = {
|
|
36
|
-
name: string;
|
|
37
|
-
label: string;
|
|
38
|
-
baseUrl: string;
|
|
39
|
-
};
|
|
40
|
-
/** Prints the numbered provider list and custom option to stdout. */
|
|
41
|
-
export declare function _printProviderMenu(providers: readonly ProviderEntry[]): void;
|
|
42
|
-
/** Resolves a numeric choice string to a preset provider, or null for custom/invalid. */
|
|
43
|
-
export declare function _resolveProviderChoice(choice: string, providers: readonly ProviderEntry[]): {
|
|
44
|
-
providerName: string;
|
|
45
|
-
baseUrl: string;
|
|
46
|
-
} | null;
|
|
47
|
-
/** Resolves numeric index or literal model name to a model string. */
|
|
48
|
-
export declare function _resolveModelChoice(input: string, models: string[]): string;
|
|
49
|
-
/** Prints the multi-column model list to stdout. */
|
|
50
|
-
export declare function _printModelMenu(models: string[], termCols: number): void;
|
|
51
23
|
/** Extract short agent name from binary name: uwf-claude-code → claude-code */
|
|
52
24
|
export declare function _agentNameFromBinary(binary: string): string;
|
|
53
25
|
/** Prints numbered agent list to stdout. */
|
|
@@ -57,24 +29,25 @@ export declare function _printAgentMenu(agents: string[]): void;
|
|
|
57
29
|
* Returns short agent name (e.g. "hermes", "claude-code").
|
|
58
30
|
*/
|
|
59
31
|
export declare function _promptAgentSelection(rl: ReturnType<typeof createInterface>): Promise<string>;
|
|
60
|
-
type ValidationResult = {
|
|
61
|
-
ok: boolean;
|
|
62
|
-
error: string | null;
|
|
63
|
-
};
|
|
64
|
-
/** Prints the model validation result to stdout. */
|
|
65
|
-
export declare function _printValidationResult(validation: ValidationResult): void;
|
|
66
32
|
/**
|
|
67
33
|
* Check if the configured adapter binary (and its dependencies) are in PATH.
|
|
68
34
|
* Returns warnings array — empty means all good.
|
|
69
35
|
*/
|
|
70
36
|
export declare function _checkAdapterAvailability(agentName: string): string[];
|
|
71
37
|
/**
|
|
72
|
-
*
|
|
38
|
+
* Register bundled example workflows. Non-destructive — silently skips
|
|
39
|
+
* any that fail (e.g. already registered with same hash).
|
|
40
|
+
* Returns list of successfully registered workflow names.
|
|
41
|
+
*/
|
|
42
|
+
export declare function _registerBundledExamples(storageRoot: string): Promise<string[]>;
|
|
43
|
+
/**
|
|
44
|
+
* Non-interactive setup. Engine config is LLM-free — only writes
|
|
45
|
+
* agents + defaultAgent. Each adapter owns its own LLM configuration.
|
|
73
46
|
*/
|
|
74
47
|
export declare function cmdSetup(args: SetupArgs): Promise<Record<string, unknown>>;
|
|
75
48
|
/**
|
|
76
|
-
* Interactive setup — prompts user for
|
|
49
|
+
* Interactive setup — prompts the user only for the default agent.
|
|
50
|
+
* Each adapter owns its own LLM configuration.
|
|
77
51
|
*/
|
|
78
52
|
export declare function cmdSetupInteractive(storageRoot: string): Promise<Record<string, unknown>>;
|
|
79
|
-
export {};
|
|
80
53
|
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAKzD,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AA2BF;;GAEG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAQxE;AA0BD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAWxD;AAED;;;GAGG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAQzD;AAkBD,+DAA+D;AAC/D,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED,yCAAyC;AACzC,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAE/C;AAcD,+EAA+E;AAC/E,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,4CAA4C;AAC5C,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAStD;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,EAAE,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,GACrC,OAAO,CAAC,MAAM,CAAC,CAoCjB;AA+BD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAyBrE;AAoBD;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CA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