@united-workforce/cli 0.4.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 +30 -3
- package/dist/.build-fingerprint +1 -0
- package/dist/__tests__/adapter-json-roundtrip.test.js +16 -6
- package/dist/__tests__/adapter-json-roundtrip.test.js.map +1 -1
- 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__/e2e-mock-agent.test.js +23 -7
- 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__/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__/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.js +9 -7
- package/dist/__tests__/pid-recycling.test.js.map +1 -1
- package/dist/__tests__/prompt.test.js +46 -4
- package/dist/__tests__/prompt.test.js.map +1 -1
- package/dist/__tests__/resolve-head-hash.test.js +8 -0
- package/dist/__tests__/resolve-head-hash.test.js.map +1 -1
- package/dist/__tests__/solve-issue-tea-worktree.test.js +3 -1
- package/dist/__tests__/solve-issue-tea-worktree.test.js.map +1 -1
- package/dist/__tests__/step-ask.test.js +9 -1
- package/dist/__tests__/step-ask.test.js.map +1 -1
- package/dist/__tests__/store-unified-threads.test.js +19 -17
- package/dist/__tests__/store-unified-threads.test.js.map +1 -1
- package/dist/__tests__/thread-cancel-status.test.js +19 -13
- 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 +10 -8
- 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.js +11 -1
- package/dist/__tests__/thread-poke.test.js.map +1 -1
- 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 +11 -1
- package/dist/__tests__/thread-resume.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 +5 -2
- package/dist/__tests__/thread-suspend-step.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 +11 -9
- package/dist/__tests__/thread.test.js.map +1 -1
- package/dist/__tests__/validate-semantic.test.js +56 -2
- package/dist/__tests__/validate-semantic.test.js.map +1 -1
- package/dist/__tests__/workflow-list-recursive.test.js +10 -7
- package/dist/__tests__/workflow-list-recursive.test.js.map +1 -1
- package/dist/__tests__/workflow-resolution.test.js +10 -7
- package/dist/__tests__/workflow-resolution.test.js.map +1 -1
- package/dist/__tests__/workflow-show-resolution.test.js +10 -7
- package/dist/__tests__/workflow-show-resolution.test.js.map +1 -1
- package/dist/__tests__/workflow-validate.test.js +75 -55
- package/dist/__tests__/workflow-validate.test.js.map +1 -1
- 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/cli.js +58 -35
- package/dist/cli.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +12 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/prompt.d.ts.map +1 -1
- package/dist/commands/prompt.js +42 -29
- package/dist/commands/prompt.js.map +1 -1
- package/dist/commands/setup.d.ts +9 -4
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +51 -7
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/thread.d.ts.map +1 -1
- package/dist/commands/thread.js +44 -2
- package/dist/commands/thread.js.map +1 -1
- package/dist/commands/workflow.d.ts +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +2 -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/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 +4 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +31 -4
- package/dist/schemas.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 +28 -11
- package/dist/validate-semantic.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 +5 -4
- package/src/__tests__/adapter-json-roundtrip.test.ts +15 -6
- package/src/__tests__/concurrency.test.ts +266 -0
- package/src/__tests__/e2e-mock-agent.test.ts +45 -7
- package/src/__tests__/format-text-default.test.ts +49 -0
- package/src/__tests__/format-text-registry.test.ts +173 -0
- package/src/__tests__/log-text-renderer.test.ts +294 -0
- 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 +9 -8
- package/src/__tests__/prompt.test.ts +48 -4
- package/src/__tests__/resolve-head-hash.test.ts +7 -0
- package/src/__tests__/solve-issue-tea-worktree.test.ts +3 -1
- package/src/__tests__/step-ask.test.ts +8 -1
- package/src/__tests__/store-unified-threads.test.ts +21 -18
- package/src/__tests__/thread-cancel-status.test.ts +21 -14
- package/src/__tests__/thread-cancel-text-renderer.test.ts +125 -0
- package/src/__tests__/thread-list-filters.test.ts +9 -9
- 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 +10 -1
- package/src/__tests__/thread-read-xml-tags.test.ts +9 -11
- package/src/__tests__/thread-resume.test.ts +10 -1
- 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 +5 -2
- package/src/__tests__/thread-test-helpers.ts +15 -1
- package/src/__tests__/thread.test.ts +10 -10
- package/src/__tests__/validate-semantic.test.ts +59 -2
- package/src/__tests__/workflow-list-recursive.test.ts +9 -9
- package/src/__tests__/workflow-resolution.test.ts +9 -8
- package/src/__tests__/workflow-show-resolution.test.ts +9 -8
- package/src/__tests__/workflow-validate.test.ts +78 -56
- package/src/__tests__/write-envelope.test.ts +257 -0
- package/src/cli.ts +92 -35
- package/src/commands/config.ts +11 -0
- package/src/commands/prompt.ts +42 -29
- package/src/commands/setup.ts +57 -7
- package/src/commands/thread.ts +48 -2
- package/src/commands/workflow.ts +3 -7
- 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/output-mappers.ts +254 -0
- package/src/schemas.ts +39 -3
- package/src/text-renderers.ts +355 -0
- package/src/validate-semantic.ts +33 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-semantic.d.ts","sourceRoot":"","sources":["../src/validate-semantic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"validate-semantic.d.ts","sourceRoot":"","sources":["../src/validate-semantic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAgVlE;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,EAAE,CAMnE"}
|
|
@@ -52,17 +52,11 @@ function generateMockData(schema) {
|
|
|
52
52
|
for (const key of Object.keys(props)) {
|
|
53
53
|
mock[key] = `mock_${key}`;
|
|
54
54
|
}
|
|
55
|
+
// _body is engine-injected (markdown body after frontmatter), not in the schema.
|
|
56
|
+
// Always provide it so templates referencing {{ _body }} pass strict validation.
|
|
57
|
+
mock._body = "mock__body";
|
|
55
58
|
return mock;
|
|
56
59
|
}
|
|
57
|
-
/**
|
|
58
|
-
* Pre-process a template to replace `$`-prefixed variables (like `$status`)
|
|
59
|
-
* which are invalid in LiquidJS syntax but always valid at runtime.
|
|
60
|
-
* Replaces `{{ $varName }}` with a literal placeholder so the strict render
|
|
61
|
-
* does not reject them.
|
|
62
|
-
*/
|
|
63
|
-
function sanitizeReservedVars(template) {
|
|
64
|
-
return template.replace(/\{\{\s*\$\w+\s*\}\}/g, "RESERVED");
|
|
65
|
-
}
|
|
66
60
|
/** Extract variable name from a LiquidJS UndefinedVariableError message. */
|
|
67
61
|
function extractVarName(err) {
|
|
68
62
|
const msg = String(err);
|
|
@@ -81,7 +75,7 @@ function validateMultiExitTemplates(roleName, graphEntry, variants, errors) {
|
|
|
81
75
|
continue;
|
|
82
76
|
const mockData = generateMockData(variant);
|
|
83
77
|
try {
|
|
84
|
-
strictEngine.parseAndRenderSync(
|
|
78
|
+
strictEngine.parseAndRenderSync(target.prompt, mockData);
|
|
85
79
|
}
|
|
86
80
|
catch (err) {
|
|
87
81
|
const varName = extractVarName(err);
|
|
@@ -95,7 +89,7 @@ function validateFlatTemplates(roleName, graphEntry, fm, errors) {
|
|
|
95
89
|
const mockData = generateMockData(fm);
|
|
96
90
|
for (const [status, target] of Object.entries(graphEntry)) {
|
|
97
91
|
try {
|
|
98
|
-
strictEngine.parseAndRenderSync(
|
|
92
|
+
strictEngine.parseAndRenderSync(target.prompt, mockData);
|
|
99
93
|
}
|
|
100
94
|
catch (err) {
|
|
101
95
|
const varName = extractVarName(err);
|
|
@@ -231,6 +225,28 @@ function checkStatusEdges(roleName, graphKeys, statusSet, errors) {
|
|
|
231
225
|
errors.push(`role "${roleName}" graph is missing status keys: ${missingKeys.join(", ")}`);
|
|
232
226
|
}
|
|
233
227
|
}
|
|
228
|
+
/** Reserved property names that must not appear in frontmatter schemas. */
|
|
229
|
+
const RESERVED_PROPERTIES = new Set(["_body"]);
|
|
230
|
+
/** Check that frontmatter schemas do not define reserved property names. */
|
|
231
|
+
function checkReservedProperties(roleName, fm, errors) {
|
|
232
|
+
const schemasToCheck = [];
|
|
233
|
+
if (isOneOfSchema(fm)) {
|
|
234
|
+
schemasToCheck.push(...fm.oneOf);
|
|
235
|
+
}
|
|
236
|
+
else if (typeof fm === "object" && fm !== null) {
|
|
237
|
+
schemasToCheck.push(fm);
|
|
238
|
+
}
|
|
239
|
+
for (const schema of schemasToCheck) {
|
|
240
|
+
const props = schema.properties;
|
|
241
|
+
if (!props)
|
|
242
|
+
continue;
|
|
243
|
+
for (const key of Object.keys(props)) {
|
|
244
|
+
if (RESERVED_PROPERTIES.has(key)) {
|
|
245
|
+
errors.push(`role "${roleName}" frontmatter must not define reserved property "${key}" — it is injected by the engine`);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
234
250
|
/** Check status-edge consistency and template vars for each role. */
|
|
235
251
|
function checkRoleConsistency(payload, errors) {
|
|
236
252
|
for (const [roleName, role] of Object.entries(payload.roles)) {
|
|
@@ -241,6 +257,7 @@ function checkRoleConsistency(payload, errors) {
|
|
|
241
257
|
continue;
|
|
242
258
|
const fm = role.frontmatter;
|
|
243
259
|
const graphKeys = new Set(Object.keys(graphEntry));
|
|
260
|
+
checkReservedProperties(roleName, fm, errors);
|
|
244
261
|
if (isOneOfSchema(fm)) {
|
|
245
262
|
const variants = fm.oneOf;
|
|
246
263
|
const statuses = getOneOfStatuses(variants);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-semantic.js","sourceRoot":"","sources":["../src/validate-semantic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AAC/D,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACzC,MAAM,cAAc,GAAG,UAAU,CAAC;AAElC,kEAAkE;AAClE,SAAS,aAAa,CAAC,EAAW;IAChC,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACxD,MAAM,GAAG,GAAG,EAAe,CAAC;IAC5B,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC;AAED,oFAAoF;AACpF,SAAS,cAAc,CAAC,EAAW;IACjC,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACxD,MAAM,GAAG,G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oBAAoB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
name: brainstorm
|
|
3
|
+
description: "Structured brainstorming — diverge with wild ideas, then converge into actionable proposals."
|
|
4
|
+
|
|
5
|
+
roles:
|
|
6
|
+
ideator:
|
|
7
|
+
description: "Generates creative ideas without judgment"
|
|
8
|
+
goal: "Produce as many diverse ideas as possible. Quantity over quality. No idea is too wild."
|
|
9
|
+
capabilities: []
|
|
10
|
+
procedure: |
|
|
11
|
+
You are a creative ideator in a brainstorming session.
|
|
12
|
+
|
|
13
|
+
## Rules
|
|
14
|
+
1. Check Thread Progress to count your rounds.
|
|
15
|
+
2. Round 1: Generate 5-7 ideas, ranging from obvious to unconventional.
|
|
16
|
+
3. Round 2 (after the critic's feedback): Generate 5-7 MORE ideas that build on,
|
|
17
|
+
combine, or go in completely different directions from round 1.
|
|
18
|
+
4. After round 2, output $status: done with your full idea list.
|
|
19
|
+
5. Follow the "Yes, and..." principle — never self-censor.
|
|
20
|
+
6. Include at least 2 "wild card" ideas that seem impractical.
|
|
21
|
+
output: "A list of creative ideas."
|
|
22
|
+
frontmatter:
|
|
23
|
+
oneOf:
|
|
24
|
+
- properties:
|
|
25
|
+
$status: { const: ideate }
|
|
26
|
+
ideas: { type: string }
|
|
27
|
+
required: [$status, ideas]
|
|
28
|
+
- properties:
|
|
29
|
+
$status: { const: done }
|
|
30
|
+
allIdeas: { type: string }
|
|
31
|
+
required: [$status, allIdeas]
|
|
32
|
+
|
|
33
|
+
critic:
|
|
34
|
+
description: "Identifies strengths, weaknesses, and surprising connections"
|
|
35
|
+
goal: "Help the ideator see patterns and push further — you challenge, not block."
|
|
36
|
+
capabilities: []
|
|
37
|
+
procedure: |
|
|
38
|
+
You are a constructive critic in a brainstorming session.
|
|
39
|
+
|
|
40
|
+
## Your job
|
|
41
|
+
1. Group the ideas into themes
|
|
42
|
+
2. Highlight the 2-3 most promising ones and explain WHY
|
|
43
|
+
3. Point out surprising combinations — "what if idea X meets idea Y?"
|
|
44
|
+
4. Challenge the ideator to go further in a specific direction
|
|
45
|
+
5. Keep it encouraging — "this is interesting because..." not "this won't work"
|
|
46
|
+
output: "Feedback on the ideas with themes and promising directions."
|
|
47
|
+
frontmatter:
|
|
48
|
+
type: object
|
|
49
|
+
properties:
|
|
50
|
+
$status: { const: feedback }
|
|
51
|
+
themes: { type: string }
|
|
52
|
+
promising: { type: string }
|
|
53
|
+
challenge: { type: string }
|
|
54
|
+
required: [$status, themes, promising, challenge]
|
|
55
|
+
|
|
56
|
+
synthesizer:
|
|
57
|
+
description: "Distills ideas into 3 actionable proposals"
|
|
58
|
+
goal: "Turn raw brainstorming output into concrete, actionable proposals."
|
|
59
|
+
capabilities: []
|
|
60
|
+
procedure: |
|
|
61
|
+
You are a strategic synthesizer.
|
|
62
|
+
|
|
63
|
+
## Task
|
|
64
|
+
1. Review ALL ideas from both rounds and the critic's analysis
|
|
65
|
+
2. Select the 3 strongest concepts (may combine multiple ideas)
|
|
66
|
+
3. For each, write:
|
|
67
|
+
- **Name**: A catchy title
|
|
68
|
+
- **What**: One-sentence description
|
|
69
|
+
- **Why**: Why this is promising
|
|
70
|
+
- **First step**: The single next action to explore it
|
|
71
|
+
4. Order by feasibility (most actionable first)
|
|
72
|
+
output: "Three actionable proposals distilled from the brainstorming."
|
|
73
|
+
frontmatter:
|
|
74
|
+
type: object
|
|
75
|
+
properties:
|
|
76
|
+
$status: { const: done }
|
|
77
|
+
proposals: { type: string }
|
|
78
|
+
required: [$status, proposals]
|
|
79
|
+
|
|
80
|
+
reporter:
|
|
81
|
+
description: "Generates an HTML report of the completed brainstorming session"
|
|
82
|
+
goal: "Produce a self-contained, visually polished HTML report that faithfully reproduces the entire brainstorming session with no paraphrasing."
|
|
83
|
+
capabilities: [run_command, write_file, read_file]
|
|
84
|
+
procedure: |
|
|
85
|
+
You are a report generator for a brainstorming session.
|
|
86
|
+
|
|
87
|
+
## Steps
|
|
88
|
+
1. Read Thread Progress to get the thread ID.
|
|
89
|
+
2. Run: `uwf thread read <thread-id>` to get the full session transcript.
|
|
90
|
+
3. Design and write a self-contained HTML file that presents the brainstorming beautifully.
|
|
91
|
+
4. Save to `/tmp/brainstorm-report-<thread-id>.html`.
|
|
92
|
+
|
|
93
|
+
## HTML Report Requirements
|
|
94
|
+
- Title: the original brainstorming topic
|
|
95
|
+
- Divergence phase: each ideation round as a card with numbered ideas
|
|
96
|
+
- Critic's feedback in a distinct styled section (themes, promising ideas, challenge)
|
|
97
|
+
- Convergence phase: the 3 final proposals with special visual treatment
|
|
98
|
+
- Timeline showing the flow: ideate → critique → ideate → synthesize
|
|
99
|
+
- Clean typography, responsive layout, dark/light theme friendly
|
|
100
|
+
- All content verbatim from `uwf thread read` — do NOT paraphrase
|
|
101
|
+
|
|
102
|
+
## Rules
|
|
103
|
+
1. You MUST use `uwf thread read` to get the data — do NOT rely on context.
|
|
104
|
+
2. Completely self-contained (inline styles, no CDN links).
|
|
105
|
+
3. Output the file path in your response body.
|
|
106
|
+
output: "Confirmation that the report was generated, with the file path."
|
|
107
|
+
frontmatter:
|
|
108
|
+
type: object
|
|
109
|
+
properties:
|
|
110
|
+
$status: { const: done }
|
|
111
|
+
reportPath: { type: string }
|
|
112
|
+
required: [$status, reportPath]
|
|
113
|
+
|
|
114
|
+
graph:
|
|
115
|
+
$START:
|
|
116
|
+
new: { role: ideator, prompt: "Brainstorm ideas for the given topic. Generate 5-7 diverse ideas, from practical to wild." }
|
|
117
|
+
resume: { role: ideator, prompt: "Continue brainstorming from where you left off." }
|
|
118
|
+
|
|
119
|
+
ideator:
|
|
120
|
+
ideate: { role: critic, prompt: "The ideator proposed:\n\n{{ ideas }}\n\nAnalyze these ideas — find themes, highlight the most promising, and challenge the ideator to push further." }
|
|
121
|
+
done: { role: synthesizer, prompt: "All brainstorming ideas:\n\n{{ allIdeas }}\n\nDistill these into 3 actionable proposals." }
|
|
122
|
+
|
|
123
|
+
critic:
|
|
124
|
+
feedback: { role: ideator, prompt: "The critic's feedback:\n\nThemes: {{ themes }}\nMost promising: {{ promising }}\nChallenge: {{ challenge }}\n\nGenerate another round of ideas — build on the feedback, combine ideas, go wilder." }
|
|
125
|
+
|
|
126
|
+
synthesizer:
|
|
127
|
+
done: { role: reporter, prompt: "Brainstorming complete. Here are the final proposals:\n\n{{ proposals }}\n\nGenerate a polished HTML report of the entire session." }
|
|
128
|
+
|
|
129
|
+
reporter:
|
|
130
|
+
done: { role: "$END", prompt: "Report generated." }
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
name: debate
|
|
3
|
+
description: "Multi-role structured debate with critical thinking framework and host summary."
|
|
4
|
+
|
|
5
|
+
# Shared frontmatter schema for debater roles (YAML anchor)
|
|
6
|
+
x-debater-frontmatter: &debater-frontmatter
|
|
7
|
+
type: object
|
|
8
|
+
oneOf:
|
|
9
|
+
- properties:
|
|
10
|
+
$status: { const: speak }
|
|
11
|
+
argument: { type: string }
|
|
12
|
+
required: [$status, argument]
|
|
13
|
+
- properties:
|
|
14
|
+
$status: { const: conceded }
|
|
15
|
+
reason: { type: string }
|
|
16
|
+
required: [$status, reason]
|
|
17
|
+
- properties:
|
|
18
|
+
$status: { const: final }
|
|
19
|
+
closing: { type: string }
|
|
20
|
+
required: [$status, closing]
|
|
21
|
+
|
|
22
|
+
roles:
|
|
23
|
+
proponent:
|
|
24
|
+
description: "Argues FOR the proposition"
|
|
25
|
+
goal: "Build a compelling case for the proposition through logical reasoning and evidence"
|
|
26
|
+
capabilities: []
|
|
27
|
+
procedure: |
|
|
28
|
+
You are an experienced scholar arguing FOR the proposition.
|
|
29
|
+
|
|
30
|
+
## Critical Thinking Framework (execute before every speech)
|
|
31
|
+
|
|
32
|
+
### A. Pre-speech reflection (internal, do not output)
|
|
33
|
+
- Does every step in my argument chain hold? Any hidden assumptions or logical gaps?
|
|
34
|
+
- If I were my opponent, how would I attack this? Where am I weakest?
|
|
35
|
+
- Does my evidence actually support my claim, or could it backfire?
|
|
36
|
+
- Should I go on offense or defense this round?
|
|
37
|
+
|
|
38
|
+
### B. Evidence discipline
|
|
39
|
+
- Verify key numbers — watch for order-of-magnitude errors
|
|
40
|
+
- Assess data freshness — fast-moving fields have short half-lives
|
|
41
|
+
- Distinguish primary data from secondary citations, expert opinion, and common assumptions
|
|
42
|
+
|
|
43
|
+
### C. Anti-fragility
|
|
44
|
+
- Anticipate counterarguments; preemptively strengthen or strategically abandon weak points
|
|
45
|
+
- Catch logical gaps, data misuse, or outdated claims in your opponent's reasoning
|
|
46
|
+
|
|
47
|
+
## Rules
|
|
48
|
+
1. Check Thread Progress to see how many times you have spoken.
|
|
49
|
+
2. On your 3rd speech, you MUST output $status: final (closing statement).
|
|
50
|
+
3. If genuinely convinced by the opponent, output $status: conceded.
|
|
51
|
+
4. Otherwise output $status: speak and counter the opponent's points.
|
|
52
|
+
5. Be rigorous, cite evidence, stay concise.
|
|
53
|
+
output: "Debate argument"
|
|
54
|
+
frontmatter: *debater-frontmatter
|
|
55
|
+
|
|
56
|
+
opponent:
|
|
57
|
+
description: "Argues AGAINST the proposition"
|
|
58
|
+
goal: "Build a compelling case against the proposition through logical reasoning and evidence"
|
|
59
|
+
capabilities: []
|
|
60
|
+
procedure: |
|
|
61
|
+
You are an experienced scholar arguing AGAINST the proposition.
|
|
62
|
+
|
|
63
|
+
## Critical Thinking Framework (execute before every speech)
|
|
64
|
+
|
|
65
|
+
### A. Pre-speech reflection (internal, do not output)
|
|
66
|
+
- Does every step in my argument chain hold? Any hidden assumptions or logical gaps?
|
|
67
|
+
- If I were my opponent, how would I attack this? Where am I weakest?
|
|
68
|
+
- Does my evidence actually support my claim, or could it backfire?
|
|
69
|
+
- Should I go on offense or defense this round?
|
|
70
|
+
|
|
71
|
+
### B. Evidence discipline
|
|
72
|
+
- Verify key numbers — watch for order-of-magnitude errors
|
|
73
|
+
- Assess data freshness — fast-moving fields have short half-lives
|
|
74
|
+
- Distinguish primary data from secondary citations, expert opinion, and common assumptions
|
|
75
|
+
|
|
76
|
+
### C. Anti-fragility
|
|
77
|
+
- Anticipate counterarguments; preemptively strengthen or strategically abandon weak points
|
|
78
|
+
- Catch logical gaps, data misuse, or outdated claims in your opponent's reasoning
|
|
79
|
+
|
|
80
|
+
## Rules
|
|
81
|
+
1. Check Thread Progress to see how many times you have spoken.
|
|
82
|
+
2. On your 3rd speech, or when the proponent has issued a final statement, you MUST output $status: final.
|
|
83
|
+
3. If genuinely convinced by the proponent, output $status: conceded.
|
|
84
|
+
4. Otherwise output $status: speak and counter the proponent's points.
|
|
85
|
+
5. Be rigorous, cite evidence, stay concise.
|
|
86
|
+
output: "Debate argument"
|
|
87
|
+
frontmatter: *debater-frontmatter
|
|
88
|
+
|
|
89
|
+
host:
|
|
90
|
+
description: "Debate moderator — delivers impartial summary and verdict"
|
|
91
|
+
goal: "Objectively review the debate, analyze both sides, and deliver a verdict"
|
|
92
|
+
capabilities: []
|
|
93
|
+
procedure: |
|
|
94
|
+
You are an experienced academic debate moderator.
|
|
95
|
+
|
|
96
|
+
## Task
|
|
97
|
+
1. Outline each side's core arguments
|
|
98
|
+
2. Evaluate reasoning quality and evidence use
|
|
99
|
+
3. Highlight the most impactful exchanges
|
|
100
|
+
4. Analyze the deeper significance of the topic
|
|
101
|
+
5. Deliver an overall verdict
|
|
102
|
+
|
|
103
|
+
## Style
|
|
104
|
+
- Impartial but with independent judgment
|
|
105
|
+
- Substantive, not superficial
|
|
106
|
+
output: "Debate summary report"
|
|
107
|
+
frontmatter:
|
|
108
|
+
type: object
|
|
109
|
+
properties:
|
|
110
|
+
$status: { const: done }
|
|
111
|
+
summary: { type: string }
|
|
112
|
+
highlights: { type: string }
|
|
113
|
+
verdict: { type: string }
|
|
114
|
+
required: [$status, summary, highlights, verdict]
|
|
115
|
+
|
|
116
|
+
reporter:
|
|
117
|
+
description: "Generates an HTML report of the completed debate"
|
|
118
|
+
goal: "Produce a self-contained, visually polished HTML report that faithfully reproduces the entire debate with no paraphrasing."
|
|
119
|
+
capabilities: [run_command, write_file, read_file]
|
|
120
|
+
procedure: |
|
|
121
|
+
You are a report generator for a structured debate.
|
|
122
|
+
|
|
123
|
+
## Steps
|
|
124
|
+
1. Read Thread Progress to get the thread ID.
|
|
125
|
+
2. Run: `uwf thread read <thread-id>` to get the full debate transcript.
|
|
126
|
+
3. Design and write a self-contained HTML file that presents the debate beautifully.
|
|
127
|
+
4. Save to `/tmp/debate-report-<thread-id>.html`.
|
|
128
|
+
|
|
129
|
+
## HTML Report Requirements
|
|
130
|
+
- Title: the debate proposition
|
|
131
|
+
- Two-column layout comparing proponent vs opponent arguments round by round
|
|
132
|
+
- Key exchanges highlighted with visual callouts
|
|
133
|
+
- Host's verdict and summary in a prominent section
|
|
134
|
+
- If a side conceded, make it visually clear
|
|
135
|
+
- Clean typography, responsive layout, dark/light theme friendly
|
|
136
|
+
- All content verbatim from `uwf thread read` — do NOT paraphrase
|
|
137
|
+
|
|
138
|
+
## Rules
|
|
139
|
+
1. You MUST use `uwf thread read` to get the data — do NOT rely on context.
|
|
140
|
+
2. Completely self-contained (inline styles, no CDN links).
|
|
141
|
+
3. Output the file path in your response body.
|
|
142
|
+
output: "Confirmation that the report was generated, with the file path."
|
|
143
|
+
frontmatter:
|
|
144
|
+
type: object
|
|
145
|
+
properties:
|
|
146
|
+
$status: { const: done }
|
|
147
|
+
reportPath: { type: string }
|
|
148
|
+
required: [$status, reportPath]
|
|
149
|
+
|
|
150
|
+
graph:
|
|
151
|
+
$START:
|
|
152
|
+
new: { role: proponent, prompt: "The debate begins. You are arguing FOR the proposition. Present your opening argument." }
|
|
153
|
+
resume: { role: proponent, prompt: "The debate continues." }
|
|
154
|
+
|
|
155
|
+
proponent:
|
|
156
|
+
speak: { role: opponent, prompt: "Proponent argues:\n\n{{ argument }}\n\nYou are the opponent. Counter this argument." }
|
|
157
|
+
conceded: { role: host, prompt: "The proponent conceded: {{ reason }}\n\nPlease summarize the debate." }
|
|
158
|
+
final: { role: opponent, prompt: "Proponent's closing statement:\n\n{{ closing }}\n\nYou are the opponent. Deliver your final response." }
|
|
159
|
+
|
|
160
|
+
opponent:
|
|
161
|
+
speak: { role: proponent, prompt: "Opponent argues:\n\n{{ argument }}\n\nYou are the proponent. Counter this argument." }
|
|
162
|
+
conceded: { role: host, prompt: "The opponent conceded: {{ reason }}\n\nPlease summarize the debate." }
|
|
163
|
+
final: { role: host, prompt: "Opponent's closing statement:\n\n{{ closing }}\n\nThe debate is over. Please summarize." }
|
|
164
|
+
|
|
165
|
+
host:
|
|
166
|
+
done: { role: reporter, prompt: "Debate summary complete.\n\nSummary: {{ summary }}\nHighlights: {{ highlights }}\nVerdict: {{ verdict }}\n\nGenerate a polished HTML report of the entire debate." }
|
|
167
|
+
|
|
168
|
+
reporter:
|
|
169
|
+
done: { role: "$END", prompt: "Report generated." }
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
name: socratic-questioning
|
|
3
|
+
description: "Socratic dialogue — a questioner helps the thinker examine their beliefs through probing questions."
|
|
4
|
+
|
|
5
|
+
roles:
|
|
6
|
+
thinker:
|
|
7
|
+
description: "Holds and defends a position, refining it through dialogue"
|
|
8
|
+
goal: "Articulate and examine your position honestly. When a question exposes a weakness, acknowledge it and refine your view rather than deflecting."
|
|
9
|
+
capabilities: []
|
|
10
|
+
procedure: |
|
|
11
|
+
You are a thoughtful person exploring your own beliefs through dialogue.
|
|
12
|
+
|
|
13
|
+
## Rules
|
|
14
|
+
1. Check Thread Progress to see how many times you have responded.
|
|
15
|
+
2. On your 3rd response, you MUST output $status: synthesis (your refined position).
|
|
16
|
+
3. Be honest — if a question reveals a gap, say so and adjust.
|
|
17
|
+
4. Build on previous exchanges, don't repeat yourself.
|
|
18
|
+
5. Keep responses focused (under 300 words).
|
|
19
|
+
output: "Your response to the question, or your final synthesis."
|
|
20
|
+
frontmatter:
|
|
21
|
+
oneOf:
|
|
22
|
+
- properties:
|
|
23
|
+
$status: { const: respond }
|
|
24
|
+
insight: { type: string }
|
|
25
|
+
required: [$status, insight]
|
|
26
|
+
- properties:
|
|
27
|
+
$status: { const: synthesis }
|
|
28
|
+
revisedPosition: { type: string }
|
|
29
|
+
keyInsights: { type: string }
|
|
30
|
+
required: [$status, revisedPosition, keyInsights]
|
|
31
|
+
|
|
32
|
+
questioner:
|
|
33
|
+
description: "Asks probing questions to help the thinker examine assumptions"
|
|
34
|
+
goal: "Guide the thinker to deeper understanding through questions — never lecture, never argue, never assert your own position."
|
|
35
|
+
capabilities: []
|
|
36
|
+
procedure: |
|
|
37
|
+
You are a Socratic questioner. Your only tool is the question.
|
|
38
|
+
|
|
39
|
+
## Questioning techniques
|
|
40
|
+
- **Clarification**: "What do you mean by...?" / "Can you give an example?"
|
|
41
|
+
- **Assumptions**: "What are you assuming here?" / "Why do you believe that's true?"
|
|
42
|
+
- **Evidence**: "What evidence supports this?" / "How would you respond to someone who says...?"
|
|
43
|
+
- **Implications**: "If that's true, what follows?" / "What would change if you're wrong?"
|
|
44
|
+
- **Perspective**: "How might someone in a different situation see this?"
|
|
45
|
+
|
|
46
|
+
## Rules
|
|
47
|
+
1. Ask 1-2 questions per turn, not more.
|
|
48
|
+
2. NEVER state your own opinion or argue a position.
|
|
49
|
+
3. Build on the thinker's previous answer — don't jump to unrelated topics.
|
|
50
|
+
4. When the thinker reaches a synthesis, output $status: done.
|
|
51
|
+
5. Keep questions concise and sharp.
|
|
52
|
+
output: "Your probing question(s)."
|
|
53
|
+
frontmatter:
|
|
54
|
+
oneOf:
|
|
55
|
+
- properties:
|
|
56
|
+
$status: { const: ask }
|
|
57
|
+
question: { type: string }
|
|
58
|
+
required: [$status, question]
|
|
59
|
+
- properties:
|
|
60
|
+
$status: { const: done }
|
|
61
|
+
summary: { type: string }
|
|
62
|
+
required: [$status, summary]
|
|
63
|
+
|
|
64
|
+
reporter:
|
|
65
|
+
description: "Generates an HTML report of the completed Socratic dialogue"
|
|
66
|
+
goal: "Produce a self-contained, visually polished HTML report that faithfully reproduces the entire dialogue with no paraphrasing."
|
|
67
|
+
capabilities: [run_command, write_file, read_file]
|
|
68
|
+
procedure: |
|
|
69
|
+
You are a report generator for a Socratic questioning session.
|
|
70
|
+
|
|
71
|
+
## Steps
|
|
72
|
+
1. Read Thread Progress to get the thread ID.
|
|
73
|
+
2. Run: `uwf thread read <thread-id>` to get the full dialogue transcript.
|
|
74
|
+
3. Design and write a self-contained HTML file that presents the dialogue beautifully.
|
|
75
|
+
4. Save to `/tmp/socratic-report-<thread-id>.html`.
|
|
76
|
+
|
|
77
|
+
## HTML Report Requirements
|
|
78
|
+
- Title: the original topic/position being examined
|
|
79
|
+
- Each exchange as a dialogue card (questioner question → thinker response)
|
|
80
|
+
- Visual distinction between questions and reflections
|
|
81
|
+
- The thinker's initial position and final synthesis prominently displayed
|
|
82
|
+
- A "journey" section showing how the position evolved
|
|
83
|
+
- Clean typography, responsive layout, dark/light theme friendly
|
|
84
|
+
- All content verbatim from `uwf thread read` — do NOT paraphrase
|
|
85
|
+
|
|
86
|
+
## Rules
|
|
87
|
+
1. You MUST use `uwf thread read` to get the data — do NOT rely on context.
|
|
88
|
+
2. Completely self-contained (inline styles, no CDN links).
|
|
89
|
+
3. Output the file path in your response body.
|
|
90
|
+
output: "Confirmation that the report was generated, with the file path."
|
|
91
|
+
frontmatter:
|
|
92
|
+
type: object
|
|
93
|
+
properties:
|
|
94
|
+
$status: { const: done }
|
|
95
|
+
reportPath: { type: string }
|
|
96
|
+
required: [$status, reportPath]
|
|
97
|
+
|
|
98
|
+
graph:
|
|
99
|
+
$START:
|
|
100
|
+
new: { role: thinker, prompt: "State your initial position on the topic. Be clear about what you believe and why." }
|
|
101
|
+
resume: { role: thinker, prompt: "Continue the dialogue from where you left off." }
|
|
102
|
+
|
|
103
|
+
thinker:
|
|
104
|
+
respond: { role: questioner, prompt: "The thinker says:\n\n{{ _body }}\n\nAsk a probing question to help them examine this further." }
|
|
105
|
+
synthesis: { role: questioner, prompt: "The thinker has reached a synthesis:\n\n{{ _body }}\n\nBriefly summarize the journey of this dialogue." }
|
|
106
|
+
|
|
107
|
+
questioner:
|
|
108
|
+
ask: { role: thinker, prompt: "The questioner asks:\n\n{{ _body }}\n\nReflect on this question and respond honestly." }
|
|
109
|
+
done: { role: reporter, prompt: "Dialogue complete.\n\nSummary: {{ summary }}\n\nGenerate a polished HTML report of the entire Socratic dialogue." }
|
|
110
|
+
|
|
111
|
+
reporter:
|
|
112
|
+
done: { role: "$END", prompt: "Report generated." }
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@united-workforce/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"src",
|
|
6
6
|
"dist",
|
|
7
|
+
"examples",
|
|
7
8
|
"package.json"
|
|
8
9
|
],
|
|
9
10
|
"type": "module",
|
|
@@ -17,9 +18,9 @@
|
|
|
17
18
|
"dotenv": "^16.6.1",
|
|
18
19
|
"liquidjs": "^10.27.0",
|
|
19
20
|
"yaml": "^2.8.4",
|
|
20
|
-
"@united-workforce/
|
|
21
|
-
"@united-workforce/util": "^0.1
|
|
22
|
-
"@united-workforce/
|
|
21
|
+
"@united-workforce/util": "^0.2.0",
|
|
22
|
+
"@united-workforce/util-agent": "^0.2.1",
|
|
23
|
+
"@united-workforce/protocol": "^0.3.0"
|
|
23
24
|
},
|
|
24
25
|
"publishConfig": {
|
|
25
26
|
"access": "public"
|
|
@@ -25,12 +25,19 @@ const OUTPUT_SCHEMA = {
|
|
|
25
25
|
// ── fixture ──────────────────────────────────────────────────────────────────
|
|
26
26
|
|
|
27
27
|
let tmpDir: string;
|
|
28
|
+
let savedOcasHome: string | undefined;
|
|
28
29
|
|
|
29
30
|
beforeEach(async () => {
|
|
31
|
+
savedOcasHome = process.env.OCAS_HOME;
|
|
30
32
|
tmpDir = await mkdtemp(join(tmpdir(), "cli-uwf-roundtrip-test-"));
|
|
31
33
|
});
|
|
32
34
|
|
|
33
35
|
afterEach(async () => {
|
|
36
|
+
if (savedOcasHome === undefined) {
|
|
37
|
+
delete process.env.OCAS_HOME;
|
|
38
|
+
} else {
|
|
39
|
+
process.env.OCAS_HOME = savedOcasHome;
|
|
40
|
+
}
|
|
34
41
|
await rm(tmpDir, { recursive: true, force: true });
|
|
35
42
|
});
|
|
36
43
|
|
|
@@ -131,7 +138,7 @@ describe("C1: adapter JSON round-trip integration", () => {
|
|
|
131
138
|
try {
|
|
132
139
|
stdout = execFileSync(
|
|
133
140
|
process.execPath,
|
|
134
|
-
[cliPath, "thread", "exec", threadId, "--agent", mockAgentPath],
|
|
141
|
+
[cliPath, "--format", "raw-json", "thread", "exec", threadId, "--agent", mockAgentPath],
|
|
135
142
|
{
|
|
136
143
|
encoding: "utf8",
|
|
137
144
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -162,15 +169,17 @@ describe("C1: adapter JSON round-trip integration", () => {
|
|
|
162
169
|
throw new Error(`CLI exited with code ${exitCode}\nstdout: ${stdout}\nstderr: ${stderr}`);
|
|
163
170
|
}
|
|
164
171
|
|
|
165
|
-
// Parse CLI output
|
|
172
|
+
// Parse CLI output (raw-json envelope value: { threadId, workflowHash, steps: [...] })
|
|
166
173
|
const cliOutput = JSON.parse(stdout.trim());
|
|
167
|
-
expect(cliOutput).toHaveProperty("
|
|
168
|
-
expect(cliOutput).
|
|
169
|
-
|
|
174
|
+
expect(cliOutput).toHaveProperty("threadId", threadId);
|
|
175
|
+
expect(cliOutput.steps).toHaveLength(1);
|
|
176
|
+
const firstStep = cliOutput.steps[0];
|
|
177
|
+
expect(firstStep).toHaveProperty("head", stepHash);
|
|
178
|
+
expect(firstStep.head).toMatch(/^[0-9A-HJ-NP-TV-Z]{13}$/);
|
|
170
179
|
|
|
171
180
|
// Verify the CAS step node exists and has correct metadata
|
|
172
181
|
const storeAfter = await openStore(casDir);
|
|
173
|
-
const stepNode = storeAfter.cas.get(
|
|
182
|
+
const stepNode = storeAfter.cas.get(firstStep.head as CasRef);
|
|
174
183
|
expect(stepNode).not.toBeNull();
|
|
175
184
|
|
|
176
185
|
const payload = stepNode!.payload as StepNodePayload;
|