@sigmacamellia/dsh-dynamic-workflow 0.1.3 → 0.1.4
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/lib/index.js +24 -14
- package/package.json +1 -1
- package/skills/dynamic-workflows/SKILL.md +2 -3
package/lib/index.js
CHANGED
|
@@ -225018,14 +225018,24 @@ function topLevelSchemaProperties(schema) {
|
|
|
225018
225018
|
return new Set(Object.keys(properties));
|
|
225019
225019
|
}
|
|
225020
225020
|
function subagentPreamble(input2) {
|
|
225021
|
-
const
|
|
225022
|
-
const
|
|
225021
|
+
const name2 = input2.actorName?.trim();
|
|
225022
|
+
const named = name2 ? `, named "${name2}"` : "";
|
|
225023
|
+
const opening = `You are a subagent inside a dynamic workflow run${named}. A script created you and hands you work one ask at a time; the script \u2014 not a person \u2014 consumes what you return. There is no user in this conversation to talk to.`;
|
|
225024
|
+
const persona = input2.persona?.trim();
|
|
225025
|
+
const contract = [
|
|
225026
|
+
"# Working inside a workflow",
|
|
225027
|
+
"- You have the regular working tools \u2014 reading, searching, editing, running commands \u2014 plus `submit_result` and `escalate`. There is no tool that asks a person anything.",
|
|
225028
|
+
"- Each ask states what to do. When the ask carries a result schema, finish by calling `submit_result` with a conforming value; otherwise your final message is the result.",
|
|
225029
|
+
"- Ground every claim in something you read or ran in this session, or in the material the ask gave you, and say which. Cite code as `path:line`. A check counts as passed only if you executed it here; if you could not run it, report it as not run. Run the check an ask names rather than a faster substitute, and say exactly which command you ran.",
|
|
225030
|
+
"- Report outcomes faithfully. If part of the task is impossible, out of scope, or contradicted by what you found, say so in the result instead of filling a field with a plausible guess. Never fake a passing result to satisfy an instruction.",
|
|
225031
|
+
"- When you are blocked by something outside your reach \u2014 a gate that cannot pass, instructions that contradict each other, a fact only the run's owner knows \u2014 call `escalate`. Questions written in prose reach nobody.",
|
|
225032
|
+
"- Do not write report or summary files on your own initiative; findings go in the result. When the ask names an output path, write exactly there and return that path in the result \u2014 the script publishes it to the user."
|
|
225033
|
+
].join("\n");
|
|
225023
225034
|
return [
|
|
225024
|
-
|
|
225025
|
-
|
|
225026
|
-
"
|
|
225027
|
-
|
|
225028
|
-
"You cannot ask the user anything directly. If something outside your reach blocks you, call `escalate` with one focused question."
|
|
225035
|
+
opening,
|
|
225036
|
+
...persona ? ["", persona] : [],
|
|
225037
|
+
"",
|
|
225038
|
+
contract
|
|
225029
225039
|
].join("\n");
|
|
225030
225040
|
}
|
|
225031
225041
|
function toWorkflowError(error62) {
|
|
@@ -225482,10 +225492,11 @@ var DshWorkflowDriver = class {
|
|
|
225482
225492
|
name: "dynamic-workflow:subagent",
|
|
225483
225493
|
order: order("DEPLOYMENT_PERSONA_PREFIX", 50) + 1,
|
|
225484
225494
|
interpolate: false,
|
|
225485
|
-
text:
|
|
225486
|
-
|
|
225487
|
-
...
|
|
225488
|
-
|
|
225495
|
+
text: subagentPreamble({
|
|
225496
|
+
...this.deps.runName === void 0 ? {} : { runName: this.deps.runName },
|
|
225497
|
+
...input2.actorName === void 0 ? {} : { actorName: input2.actorName },
|
|
225498
|
+
...persona.system === void 0 || persona.system.length === 0 ? {} : { persona: persona.system }
|
|
225499
|
+
})
|
|
225489
225500
|
});
|
|
225490
225501
|
const tools = childCtx.tools;
|
|
225491
225502
|
const inheritedKnown = new Set(tools.definitions(child).map((definition) => definition.name));
|
|
@@ -252929,12 +252940,11 @@ function applyWithDatabase(ctx, config2, stateDir, db) {
|
|
|
252929
252940
|
if (instructions.length === 0) return { kind: "error", text: "Usage: /workflow <what the workflow should do>" };
|
|
252930
252941
|
access.activate(invocation.agent);
|
|
252931
252942
|
invocation.agent.followup(userMessage(
|
|
252932
|
-
`/${WORKFLOW_SKILL_NAME} Use
|
|
252943
|
+
`/${WORKFLOW_SKILL_NAME} Use the \`${WORKFLOW_SKILL_NAME}\` skill to design and launch a dynamic workflow for this request:
|
|
252933
252944
|
|
|
252934
|
-
Request:
|
|
252935
252945
|
${instructions}
|
|
252936
252946
|
|
|
252937
|
-
Decide the subagent topology before writing any code: how many subagents, which of them share a context
|
|
252947
|
+
Decide the subagent topology before writing any code: how many subagents, which of them share a context, what result each one returns. Then write the script and call the \`create_workflow\` tool. (\`create_workflow\` is the dynamic-workflow tool. Do not use DSH's plain-JS \`workflow\` tool, and do not substitute the \`subagent\` tool.)`,
|
|
252938
252948
|
{ kind: "user" }
|
|
252939
252949
|
));
|
|
252940
252950
|
return { kind: "success" };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sigmacamellia/dsh-dynamic-workflow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Typechecked TypeScript multi-agent dynamic workflow plugin for DeepSeek Harness (DSH): parallel subagents, SQLite durable journal (resume / amend / holes / escalations), vertical spine timeline, and live dashboard artifacts. Ported from ZCode (Apache-2.0).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -774,9 +774,8 @@ reported item. Do other work, unless the user asked you to wait.
|
|
|
774
774
|
|
|
775
775
|
When you genuinely need to look at a run:
|
|
776
776
|
|
|
777
|
-
- `get_workflow_run`
|
|
778
|
-
|
|
779
|
-
another session owns, which `get_workflow_run` cannot see.
|
|
777
|
+
- `get_workflow_run` is an instant snapshot (never blocks, and sees runs started by this or
|
|
778
|
+
another session). Do not call it in a loop to wait — completion arrives through notifications.
|
|
780
779
|
- `list_workflow_runs` enumerates the project's runs, including other sessions'.
|
|
781
780
|
|
|
782
781
|
Read the terminal state precisely. A run ends in exactly one of three states:
|