@carljia/omd-dsh 0.1.0 → 0.1.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/lib/cli.js +1 -1
- package/lib/ulw.d.ts +13 -0
- package/lib/ulw.js +55 -0
- package/lib/vendor/omd-ulw.mjs +55 -0
- package/package.json +1 -1
- package/presets/omd-executor/agent.cordis.yml +4 -1
package/lib/cli.js
CHANGED
|
@@ -25,7 +25,7 @@ import { createInterface } from "node:readline/promises";
|
|
|
25
25
|
* absolute file:// URLs into the harness node_modules tree.
|
|
26
26
|
*/
|
|
27
27
|
const PACKAGE_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
28
|
-
const VENDOR_SOURCES = ["omd-mode.mjs", "omd-task.mjs"];
|
|
28
|
+
const VENDOR_SOURCES = ["omd-mode.mjs", "omd-task.mjs", "omd-ulw.mjs"];
|
|
29
29
|
const MATRIX_PATH = join(PACKAGE_ROOT, "omd-matrix.json");
|
|
30
30
|
const MODE_FENCE = { start: "# [omd-dsh:mode:start]", end: "# [omd-dsh:mode:end]" };
|
|
31
31
|
const TASK_FENCE = { start: "# [omd-dsh:task:start]", end: "# [omd-dsh:task:end]" };
|
package/lib/ulw.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module @carljia/omd-dsh/ulw
|
|
3
|
+
*
|
|
4
|
+
* omd-ulw: human-facing `/ulw` command — the "ultrawork" trigger. It arms a
|
|
5
|
+
* goal for the task; goal auto-continuation then drives the agent to
|
|
6
|
+
* completion without further input.
|
|
7
|
+
*/
|
|
8
|
+
/** Cordis plugin name. */
|
|
9
|
+
declare const name = "omd-ulw";
|
|
10
|
+
/** The goal domain is already required by tool-goal in the same preset. */
|
|
11
|
+
declare const inject: string[];
|
|
12
|
+
declare function apply(ctx: any): void;
|
|
13
|
+
export { apply, inject, name };
|
package/lib/ulw.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module @carljia/omd-dsh/ulw
|
|
3
|
+
*
|
|
4
|
+
* omd-ulw: human-facing `/ulw` command — the "ultrawork" trigger. It arms a
|
|
5
|
+
* goal for the task; goal auto-continuation then drives the agent to
|
|
6
|
+
* completion without further input.
|
|
7
|
+
*/
|
|
8
|
+
/** Cordis plugin name. */
|
|
9
|
+
const name = "omd-ulw";
|
|
10
|
+
/** The goal domain is already required by tool-goal in the same preset. */
|
|
11
|
+
const inject = ["goals"];
|
|
12
|
+
/** Execute one /ulw invocation through the goal domain. */
|
|
13
|
+
function executeUlw(ctx, invocation) {
|
|
14
|
+
const task = invocation.rawInput.trim();
|
|
15
|
+
if (task.length === 0) {
|
|
16
|
+
return {
|
|
17
|
+
kind: "error",
|
|
18
|
+
text: "Usage: /ulw <task> — arm a goal and work on it autonomously until done.",
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
const current = ctx.goals.get(invocation.agent);
|
|
23
|
+
if (current !== undefined && current.phase !== "complete") {
|
|
24
|
+
return {
|
|
25
|
+
kind: "error",
|
|
26
|
+
text: `A goal is already ${current.phase}. Run /goal clear first, then /ulw <task>.`,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
ctx.goals.create(invocation.agent, { objective: task });
|
|
30
|
+
return {
|
|
31
|
+
kind: "success",
|
|
32
|
+
text: `Ultrawork armed — working to completion.\nObjective: ${task}`,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
return {
|
|
37
|
+
kind: "error",
|
|
38
|
+
text: `ulw failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function apply(ctx) {
|
|
43
|
+
ctx.inject(["commands"], (commandCtx) => {
|
|
44
|
+
commandCtx.commands.register({
|
|
45
|
+
name: "ulw",
|
|
46
|
+
description: "ultrawork: arm a goal for a task and work on it autonomously until done",
|
|
47
|
+
input: {
|
|
48
|
+
hint: "<task>",
|
|
49
|
+
images: false,
|
|
50
|
+
},
|
|
51
|
+
handler: (invocation) => executeUlw(ctx, invocation),
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
export { apply, inject, name };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module @carljia/omd-dsh/ulw
|
|
3
|
+
*
|
|
4
|
+
* omd-ulw: human-facing `/ulw` command — the "ultrawork" trigger. It arms a
|
|
5
|
+
* goal for the task; goal auto-continuation then drives the agent to
|
|
6
|
+
* completion without further input.
|
|
7
|
+
*/
|
|
8
|
+
/** Cordis plugin name. */
|
|
9
|
+
const name = "omd-ulw";
|
|
10
|
+
/** The goal domain is already required by tool-goal in the same preset. */
|
|
11
|
+
const inject = ["goals"];
|
|
12
|
+
/** Execute one /ulw invocation through the goal domain. */
|
|
13
|
+
function executeUlw(ctx, invocation) {
|
|
14
|
+
const task = invocation.rawInput.trim();
|
|
15
|
+
if (task.length === 0) {
|
|
16
|
+
return {
|
|
17
|
+
kind: "error",
|
|
18
|
+
text: "Usage: /ulw <task> — arm a goal and work on it autonomously until done.",
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
const current = ctx.goals.get(invocation.agent);
|
|
23
|
+
if (current !== undefined && current.phase !== "complete") {
|
|
24
|
+
return {
|
|
25
|
+
kind: "error",
|
|
26
|
+
text: `A goal is already ${current.phase}. Run /goal clear first, then /ulw <task>.`,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
ctx.goals.create(invocation.agent, { objective: task });
|
|
30
|
+
return {
|
|
31
|
+
kind: "success",
|
|
32
|
+
text: `Ultrawork armed — working to completion.\nObjective: ${task}`,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
return {
|
|
37
|
+
kind: "error",
|
|
38
|
+
text: `ulw failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function apply(ctx) {
|
|
43
|
+
ctx.inject(["commands"], (commandCtx) => {
|
|
44
|
+
commandCtx.commands.register({
|
|
45
|
+
name: "ulw",
|
|
46
|
+
description: "ultrawork: arm a goal for a task and work on it autonomously until done",
|
|
47
|
+
input: {
|
|
48
|
+
hint: "<task>",
|
|
49
|
+
images: false,
|
|
50
|
+
},
|
|
51
|
+
handler: (invocation) => executeUlw(ctx, invocation),
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
export { apply, inject, name };
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
name: '@deepseek-ai/dsh-persona'
|
|
5
5
|
config:
|
|
6
6
|
text: >-
|
|
7
|
-
You are in OMD EXECUTOR mode (OMD · 执行者): a full-capability autonomous executor on DeepSeek Harness. Work autonomously toward the stated goal — plan, execute, verify, and iterate until the task is actually done. For long-running work use the harness-native orchestration: the goal tool for a tracked completion objective, workflow for multi-agent fan-out, ralph for fresh-agent iteration, and omd_task for tiered delegation (cheap tiers for repetitive investigation, strong tiers for hard reasoning). Do not stop to ask when the path forward is clear. 本模式路由模型:{{model}}(provider: {{provider}})。
|
|
7
|
+
You are in OMD EXECUTOR mode (OMD · 执行者): a full-capability autonomous executor on DeepSeek Harness. Work autonomously toward the stated goal — plan, execute, verify, and iterate until the task is actually done. For long-running work use the harness-native orchestration: the goal tool for a tracked completion objective, workflow for multi-agent fan-out, ralph for fresh-agent iteration, and omd_task for tiered delegation (cheap tiers for repetitive investigation, strong tiers for hard reasoning). Do not stop to ask when the path forward is clear. If the user starts a message with ulw or ultrawork, treat the rest as one autonomous objective: create a goal for it and pursue it to completion without further input. 本模式路由模型:{{model}}(provider: {{provider}})。
|
|
8
8
|
|
|
9
9
|
# [omd-dsh:mode:start]
|
|
10
10
|
# [omd-dsh:mode:end]
|
|
@@ -41,6 +41,9 @@
|
|
|
41
41
|
- id: tool-goal
|
|
42
42
|
name: '@deepseek-ai/dsh-tool-goal'
|
|
43
43
|
|
|
44
|
+
- id: omd-ulw
|
|
45
|
+
name: '../.omd-vendor/omd-ulw.mjs'
|
|
46
|
+
|
|
44
47
|
- id: compaction
|
|
45
48
|
name: cordis:group
|
|
46
49
|
group: true
|