@rebon/cli-win32-x64 1.2.0 → 1.4.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/LICENSE +202 -0
- package/NOTICE +10 -0
- package/README.md +203 -144
- package/THIRD_PARTY_NOTICES.txt +1232 -128
- package/bin/rebon.js +22 -22
- package/lib/windows-managed.js +390 -390
- package/package.json +9 -2
- package/payload/compose-runtime/package.json +17 -17
- package/payload/compose-runtime/payload/compose/shims/dsh-anonymous-user-id.js +10 -10
- package/payload/compose-runtime/payload/compose/shims/dsh-credentials.js +13 -13
- package/payload/compose-runtime/payload/compose/shims/dsh-launch-environment.js +21 -21
- package/payload/compose-runtime/payload/compose/shims/dsh-llm.js +313 -313
- package/payload/compose-runtime/payload/compose/shims/dsh-settings.js +43 -43
- package/payload/compose-runtime/payload/compose/shims/dsh-tools.js +20 -20
- package/payload/compose-runtime/payload/compose/shims/dsh-web.js +10 -10
- package/payload/compose-runtime/payload/compose/shims/llm-adapter.js +32 -32
- package/payload/compose-runtime/payload/compose/shims/zod-lite.js +49 -49
- package/payload/compose-runtime/payload/vendor/cordis/LICENSE +21 -0
- package/payload/compose-runtime/payload/vendor/cordis/index.js +1530 -1530
- package/payload/compose-runtime/payload/vendor/cosmokit/LICENSE +21 -21
- package/payload/compose-runtime/payload/vendor/cosmokit/index.mjs +357 -357
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-agent +21 -21
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-agent-loop +21 -21
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-llm-core +21 -21
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-llm-deepseek +21 -21
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-logger-console +21 -21
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-scope +21 -21
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-session +21 -21
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-system-prompt +21 -21
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-timeout +21 -21
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-timer +21 -21
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-tool-todo +21 -21
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-tool-web +21 -21
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-tools-schema +21 -21
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-turndown +21 -0
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-turndown-plugin-gfm +21 -0
- package/payload/compose-runtime/payload/vendor/dsh/LICENSE-web-search-exa +21 -21
- package/payload/compose-runtime/payload/vendor/dsh/agent-loop.js +1193 -1193
- package/payload/compose-runtime/payload/vendor/dsh/agent.js +714 -714
- package/payload/compose-runtime/payload/vendor/dsh/llm-core.js +269 -269
- package/payload/compose-runtime/payload/vendor/dsh/llm-deepseek.js +672 -672
- package/payload/compose-runtime/payload/vendor/dsh/logger-console.js +83 -83
- package/payload/compose-runtime/payload/vendor/dsh/scope.js +287 -287
- package/payload/compose-runtime/payload/vendor/dsh/session.js +1668 -1668
- package/payload/compose-runtime/payload/vendor/dsh/system-prompt.js +309 -309
- package/payload/compose-runtime/payload/vendor/dsh/timeout.js +100 -100
- package/payload/compose-runtime/payload/vendor/dsh/timer.js +128 -128
- package/payload/compose-runtime/payload/vendor/dsh/tool-todo.js +143 -143
- package/payload/compose-runtime/payload/vendor/dsh/tool-web.js +1527 -1527
- package/payload/compose-runtime/payload/vendor/dsh/tools-schema.js +849 -849
- package/payload/compose-runtime/payload/vendor/dsh/web-search-exa.js +122 -122
- package/payload/compose-runtime/payload/vendor/eventsource-parser/LICENSE +21 -21
- package/payload/compose-runtime/payload/vendor/eventsource-parser/index.js +177 -177
- package/payload/compose-runtime/payload/vendor/eventsource-parser/stream.js +48 -48
- package/payload/compose-runtime/payload/vendor/schemastery/LICENSE +21 -0
- package/payload/compose-runtime/payload/vendor/schemastery/index.mjs +656 -656
- package/payload/compose-runtime/payload-manifests.json +48 -48
- package/payload/compose-runtime/src/bridge.mjs +193 -195
- package/payload/compose-runtime/src/credentials-runtime.mjs +50 -50
- package/payload/compose-runtime/src/eventsource-stream.mjs +48 -48
- package/payload/compose-runtime/src/index.mjs +7 -7
- package/payload/compose-runtime/src/llm-runtime.mjs +326 -326
- package/payload/compose-runtime/src/loader.mjs +78 -78
- package/payload/compose-runtime/src/loop-assembly.mjs +237 -237
- package/payload/compose-runtime/src/payload.mjs +49 -49
- package/payload/compose-runtime/src/plugin.mjs +59 -59
- package/payload/compose-runtime/src/realm.mjs +223 -223
- package/payload/compose-runtime/src/registry.mjs +191 -191
- package/payload/compose-runtime/src/resolve.mjs +115 -115
- package/payload/compose-runtime/src/systemprompt-runtime.mjs +67 -67
- package/payload/compose-runtime/src/tools-runtime.mjs +239 -239
- package/payload/compose-runtime/src/web-runtime.mjs +209 -209
- package/payload/plugin-host/package.json +11 -11
- package/payload/plugin-host/src/bridge.mjs +64 -64
- package/payload/plugin-host/src/cli.mjs +147 -147
- package/payload/plugin-host/src/framing.mjs +113 -113
- package/payload/plugin-host/src/host.mjs +691 -691
- package/payload/plugin-host/src/json.mjs +208 -208
- package/payload/plugin-host/src/lifecycle.mjs +114 -114
- package/payload/plugin-host/src/loader.mjs +183 -183
- package/payload/plugin-host/src/methods.mjs +377 -377
- package/payload/plugin-host/src/ownership.mjs +57 -57
- package/payload/plugin-host/src/protocol.mjs +129 -129
- package/payload/plugin-host/src/sdk.mjs +7 -7
- package/payload/rebon-boa-helper.exe +0 -0
- package/payload/rebon-browser-mcp.exe +0 -0
- package/payload/rebon-computer-use.exe +0 -0
- package/payload/rebon-lsp-mcp.exe +0 -0
- package/payload/rebon.exe +2 -2
- package/payload/sandbox-win.exe +0 -0
- package/scripts/postinstall.js +112 -112
- package/payload/compose-runtime/payload/compose/credentials-runtime.js +0 -38
- package/payload/compose-runtime/payload/compose/llm-runtime.js +0 -330
- package/payload/compose-runtime/payload/compose/loop-assembly.js +0 -149
- package/payload/compose-runtime/payload/compose/serve-dispatch.js +0 -82
- package/payload/compose-runtime/payload/compose/systemprompt-runtime.js +0 -74
- package/payload/compose-runtime/payload/compose/tools-runtime.js +0 -228
- package/payload/compose-runtime/payload/compose/web-runtime.js +0 -204
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
// packages/todo/tool-todo/src/index.ts
|
|
2
|
-
import z from "@deepseek-ai/schemastery";
|
|
3
|
-
import { z as zod } from "zod";
|
|
4
|
-
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
5
|
-
var name = "tool-todo";
|
|
6
|
-
var inject = ["tools"];
|
|
7
|
-
var STATUSES = ["pending", "in_progress", "completed"];
|
|
8
|
-
var Config = z.object({
|
|
9
|
-
allowParallelInProgress: z.boolean().required()
|
|
10
|
-
});
|
|
11
|
-
var DESCRIPTION_HEAD = "Record and update a structured task list for the current work. Send the ENTIRE list every call \u2014 it REPLACES the previous list (there are no partial updates, no per-item edits). Use it to plan multi-step work and show progress: add one todo per concrete step before you start. ";
|
|
12
|
-
var DESCRIPTION_PARALLEL = "Mark every todo being actively worked on `in_progress` \u2014 several at once when work genuinely runs in parallel (e.g. concurrent subagents or background commands), one for sequential work; while work remains, at least one task should be `in_progress`. ";
|
|
13
|
-
var DESCRIPTION_SINGLE = "Keep AT MOST ONE todo `in_progress` at a time; while work remains, exactly one active task should be `in_progress`. ";
|
|
14
|
-
var DESCRIPTION_TAIL = "Mark a todo `completed` the moment it is done (do not batch completions), and allow no `in_progress` item only once all work is complete. Skip the list for trivial single-step tasks. Statuses: `pending` (not started), `in_progress` (being worked on now), `completed` (finished).";
|
|
15
|
-
function describe(allowParallel) {
|
|
16
|
-
return DESCRIPTION_HEAD + (allowParallel ? DESCRIPTION_PARALLEL : DESCRIPTION_SINGLE) + DESCRIPTION_TAIL;
|
|
17
|
-
}
|
|
18
|
-
function toTodoList(raw, allowParallel) {
|
|
19
|
-
const todos = [];
|
|
20
|
-
const seen = /* @__PURE__ */ new Set();
|
|
21
|
-
let active = 0;
|
|
22
|
-
for (const item of raw) {
|
|
23
|
-
const content = item.content.trim();
|
|
24
|
-
if (content.length === 0) {
|
|
25
|
-
throw new Error("invalid todo: `content` must be a non-empty string");
|
|
26
|
-
}
|
|
27
|
-
if (seen.has(content)) {
|
|
28
|
-
throw new Error(`invalid todos: duplicate content ${JSON.stringify(content)}`);
|
|
29
|
-
}
|
|
30
|
-
seen.add(content);
|
|
31
|
-
if (item.status === "in_progress") active++;
|
|
32
|
-
todos.push({ content, status: item.status });
|
|
33
|
-
}
|
|
34
|
-
if (!allowParallel && active > 1) {
|
|
35
|
-
throw new Error(`invalid todos: at most one task may be in_progress (got ${active})`);
|
|
36
|
-
}
|
|
37
|
-
return todos;
|
|
38
|
-
}
|
|
39
|
-
var todosProjectionSchema = zod.union([
|
|
40
|
-
zod.array(zod.object({
|
|
41
|
-
content: zod.string(),
|
|
42
|
-
status: zod.union([zod.literal("pending"), zod.literal("in_progress"), zod.literal("completed")])
|
|
43
|
-
})),
|
|
44
|
-
zod.null()
|
|
45
|
-
]);
|
|
46
|
-
function apply(ctx, config) {
|
|
47
|
-
const allowParallel = config.allowParallelInProgress;
|
|
48
|
-
ctx.inject(["sessionProjections"], (projectionCtx) => {
|
|
49
|
-
projectionCtx.sessionProjections.register({
|
|
50
|
-
key: "todos",
|
|
51
|
-
schema: todosProjectionSchema,
|
|
52
|
-
init: () => null,
|
|
53
|
-
apply: (state, event) => {
|
|
54
|
-
if (event.type === "todo/write") return event.data.todos;
|
|
55
|
-
if (event.type === "turn/start") return null;
|
|
56
|
-
return state;
|
|
57
|
-
},
|
|
58
|
-
view: (state) => state,
|
|
59
|
-
stateVersion: 2
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
ctx.tools.register(defineTool({
|
|
63
|
-
name: "todo_write",
|
|
64
|
-
description: describe(allowParallel),
|
|
65
|
-
parameters: {
|
|
66
|
-
todos: {
|
|
67
|
-
type: "array",
|
|
68
|
-
required: true,
|
|
69
|
-
description: "The COMPLETE task list, replacing any previous list.",
|
|
70
|
-
items: {
|
|
71
|
-
type: "object",
|
|
72
|
-
additionalProperties: false,
|
|
73
|
-
properties: {
|
|
74
|
-
content: { type: "string", required: true, description: "What the task is \u2014 a short imperative line." },
|
|
75
|
-
status: {
|
|
76
|
-
type: "string",
|
|
77
|
-
required: true,
|
|
78
|
-
enum: [...STATUSES],
|
|
79
|
-
description: "pending (not started) | in_progress (now) | completed (done)."
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
output: {
|
|
86
|
-
schema: {
|
|
87
|
-
type: "object",
|
|
88
|
-
additionalProperties: false,
|
|
89
|
-
properties: {
|
|
90
|
-
todos: {
|
|
91
|
-
type: "array",
|
|
92
|
-
required: true,
|
|
93
|
-
items: {
|
|
94
|
-
type: "object",
|
|
95
|
-
additionalProperties: false,
|
|
96
|
-
properties: {
|
|
97
|
-
content: { type: "string", required: true },
|
|
98
|
-
status: { type: "string", required: true, enum: [...STATUSES] }
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
counts: {
|
|
103
|
-
type: "object",
|
|
104
|
-
additionalProperties: false,
|
|
105
|
-
required: true,
|
|
106
|
-
properties: {
|
|
107
|
-
pending: { type: "integer", required: true },
|
|
108
|
-
inProgress: { type: "integer", required: true },
|
|
109
|
-
completed: { type: "integer", required: true }
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
render: (_args, value) => [{
|
|
115
|
-
type: "text",
|
|
116
|
-
text: `Updated todo list: ${value.counts.pending} pending, ${value.counts.inProgress} in progress, ${value.counts.completed} completed.`
|
|
117
|
-
}]
|
|
118
|
-
},
|
|
119
|
-
execute(args, exec) {
|
|
120
|
-
const todos = toTodoList(args.todos, allowParallel);
|
|
121
|
-
if (!exec.agent) {
|
|
122
|
-
throw new Error("todo_write requires an owning agent session");
|
|
123
|
-
}
|
|
124
|
-
exec.agent.session.append("todo/write", { todos });
|
|
125
|
-
const count = (status) => todos.filter((t) => t.status === status).length;
|
|
126
|
-
return Promise.resolve({
|
|
127
|
-
todos: todos.map((todo) => ({ content: todo.content, status: todo.status })),
|
|
128
|
-
counts: {
|
|
129
|
-
pending: count("pending"),
|
|
130
|
-
inProgress: count("in_progress"),
|
|
131
|
-
completed: count("completed")
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
},
|
|
135
|
-
presentCall: (args) => ({ card: "generic", title: "Update todo list", kind: "other", rawInput: args.todos })
|
|
136
|
-
}));
|
|
137
|
-
}
|
|
138
|
-
export {
|
|
139
|
-
Config,
|
|
140
|
-
apply,
|
|
141
|
-
inject,
|
|
142
|
-
name
|
|
143
|
-
};
|
|
1
|
+
// packages/todo/tool-todo/src/index.ts
|
|
2
|
+
import z from "@deepseek-ai/schemastery";
|
|
3
|
+
import { z as zod } from "zod";
|
|
4
|
+
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
5
|
+
var name = "tool-todo";
|
|
6
|
+
var inject = ["tools"];
|
|
7
|
+
var STATUSES = ["pending", "in_progress", "completed"];
|
|
8
|
+
var Config = z.object({
|
|
9
|
+
allowParallelInProgress: z.boolean().required()
|
|
10
|
+
});
|
|
11
|
+
var DESCRIPTION_HEAD = "Record and update a structured task list for the current work. Send the ENTIRE list every call \u2014 it REPLACES the previous list (there are no partial updates, no per-item edits). Use it to plan multi-step work and show progress: add one todo per concrete step before you start. ";
|
|
12
|
+
var DESCRIPTION_PARALLEL = "Mark every todo being actively worked on `in_progress` \u2014 several at once when work genuinely runs in parallel (e.g. concurrent subagents or background commands), one for sequential work; while work remains, at least one task should be `in_progress`. ";
|
|
13
|
+
var DESCRIPTION_SINGLE = "Keep AT MOST ONE todo `in_progress` at a time; while work remains, exactly one active task should be `in_progress`. ";
|
|
14
|
+
var DESCRIPTION_TAIL = "Mark a todo `completed` the moment it is done (do not batch completions), and allow no `in_progress` item only once all work is complete. Skip the list for trivial single-step tasks. Statuses: `pending` (not started), `in_progress` (being worked on now), `completed` (finished).";
|
|
15
|
+
function describe(allowParallel) {
|
|
16
|
+
return DESCRIPTION_HEAD + (allowParallel ? DESCRIPTION_PARALLEL : DESCRIPTION_SINGLE) + DESCRIPTION_TAIL;
|
|
17
|
+
}
|
|
18
|
+
function toTodoList(raw, allowParallel) {
|
|
19
|
+
const todos = [];
|
|
20
|
+
const seen = /* @__PURE__ */ new Set();
|
|
21
|
+
let active = 0;
|
|
22
|
+
for (const item of raw) {
|
|
23
|
+
const content = item.content.trim();
|
|
24
|
+
if (content.length === 0) {
|
|
25
|
+
throw new Error("invalid todo: `content` must be a non-empty string");
|
|
26
|
+
}
|
|
27
|
+
if (seen.has(content)) {
|
|
28
|
+
throw new Error(`invalid todos: duplicate content ${JSON.stringify(content)}`);
|
|
29
|
+
}
|
|
30
|
+
seen.add(content);
|
|
31
|
+
if (item.status === "in_progress") active++;
|
|
32
|
+
todos.push({ content, status: item.status });
|
|
33
|
+
}
|
|
34
|
+
if (!allowParallel && active > 1) {
|
|
35
|
+
throw new Error(`invalid todos: at most one task may be in_progress (got ${active})`);
|
|
36
|
+
}
|
|
37
|
+
return todos;
|
|
38
|
+
}
|
|
39
|
+
var todosProjectionSchema = zod.union([
|
|
40
|
+
zod.array(zod.object({
|
|
41
|
+
content: zod.string(),
|
|
42
|
+
status: zod.union([zod.literal("pending"), zod.literal("in_progress"), zod.literal("completed")])
|
|
43
|
+
})),
|
|
44
|
+
zod.null()
|
|
45
|
+
]);
|
|
46
|
+
function apply(ctx, config) {
|
|
47
|
+
const allowParallel = config.allowParallelInProgress;
|
|
48
|
+
ctx.inject(["sessionProjections"], (projectionCtx) => {
|
|
49
|
+
projectionCtx.sessionProjections.register({
|
|
50
|
+
key: "todos",
|
|
51
|
+
schema: todosProjectionSchema,
|
|
52
|
+
init: () => null,
|
|
53
|
+
apply: (state, event) => {
|
|
54
|
+
if (event.type === "todo/write") return event.data.todos;
|
|
55
|
+
if (event.type === "turn/start") return null;
|
|
56
|
+
return state;
|
|
57
|
+
},
|
|
58
|
+
view: (state) => state,
|
|
59
|
+
stateVersion: 2
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
ctx.tools.register(defineTool({
|
|
63
|
+
name: "todo_write",
|
|
64
|
+
description: describe(allowParallel),
|
|
65
|
+
parameters: {
|
|
66
|
+
todos: {
|
|
67
|
+
type: "array",
|
|
68
|
+
required: true,
|
|
69
|
+
description: "The COMPLETE task list, replacing any previous list.",
|
|
70
|
+
items: {
|
|
71
|
+
type: "object",
|
|
72
|
+
additionalProperties: false,
|
|
73
|
+
properties: {
|
|
74
|
+
content: { type: "string", required: true, description: "What the task is \u2014 a short imperative line." },
|
|
75
|
+
status: {
|
|
76
|
+
type: "string",
|
|
77
|
+
required: true,
|
|
78
|
+
enum: [...STATUSES],
|
|
79
|
+
description: "pending (not started) | in_progress (now) | completed (done)."
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
output: {
|
|
86
|
+
schema: {
|
|
87
|
+
type: "object",
|
|
88
|
+
additionalProperties: false,
|
|
89
|
+
properties: {
|
|
90
|
+
todos: {
|
|
91
|
+
type: "array",
|
|
92
|
+
required: true,
|
|
93
|
+
items: {
|
|
94
|
+
type: "object",
|
|
95
|
+
additionalProperties: false,
|
|
96
|
+
properties: {
|
|
97
|
+
content: { type: "string", required: true },
|
|
98
|
+
status: { type: "string", required: true, enum: [...STATUSES] }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
counts: {
|
|
103
|
+
type: "object",
|
|
104
|
+
additionalProperties: false,
|
|
105
|
+
required: true,
|
|
106
|
+
properties: {
|
|
107
|
+
pending: { type: "integer", required: true },
|
|
108
|
+
inProgress: { type: "integer", required: true },
|
|
109
|
+
completed: { type: "integer", required: true }
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
render: (_args, value) => [{
|
|
115
|
+
type: "text",
|
|
116
|
+
text: `Updated todo list: ${value.counts.pending} pending, ${value.counts.inProgress} in progress, ${value.counts.completed} completed.`
|
|
117
|
+
}]
|
|
118
|
+
},
|
|
119
|
+
execute(args, exec) {
|
|
120
|
+
const todos = toTodoList(args.todos, allowParallel);
|
|
121
|
+
if (!exec.agent) {
|
|
122
|
+
throw new Error("todo_write requires an owning agent session");
|
|
123
|
+
}
|
|
124
|
+
exec.agent.session.append("todo/write", { todos });
|
|
125
|
+
const count = (status) => todos.filter((t) => t.status === status).length;
|
|
126
|
+
return Promise.resolve({
|
|
127
|
+
todos: todos.map((todo) => ({ content: todo.content, status: todo.status })),
|
|
128
|
+
counts: {
|
|
129
|
+
pending: count("pending"),
|
|
130
|
+
inProgress: count("in_progress"),
|
|
131
|
+
completed: count("completed")
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
},
|
|
135
|
+
presentCall: (args) => ({ card: "generic", title: "Update todo list", kind: "other", rawInput: args.todos })
|
|
136
|
+
}));
|
|
137
|
+
}
|
|
138
|
+
export {
|
|
139
|
+
Config,
|
|
140
|
+
apply,
|
|
141
|
+
inject,
|
|
142
|
+
name
|
|
143
|
+
};
|