negotium 0.1.11 → 0.1.13
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 +11 -2
- package/dist/canonical-mcp-bridge.js +2 -3
- package/dist/canonical-mcp-bridge.js.map +1 -1
- package/dist/{chunk-gz12qcf0.js → chunk-a9y2rwxf.js} +2 -2
- package/dist/{chunk-gz12qcf0.js.map → chunk-a9y2rwxf.js.map} +3 -3
- package/dist/{chunk-j0kjscb7.js → chunk-s2gez3wg.js} +20 -2
- package/dist/{chunk-j0kjscb7.js.map → chunk-s2gez3wg.js.map} +2 -2
- package/dist/cron.js +292 -256
- package/dist/cron.js.map +23 -22
- package/dist/hosted-agent.js +3012 -17
- package/dist/hosted-agent.js.map +30 -3
- package/dist/main.js +31323 -36
- package/dist/main.js.map +198 -3
- package/dist/prompts.js +12 -9
- package/dist/prompts.js.map +5 -5
- package/dist/registry.js +10 -6
- package/dist/registry.js.map +3 -3
- package/dist/rollout.js +1 -1
- package/dist/runtime/cron/store.ts +24 -1
- package/dist/runtime/src/application/submit-user-message.ts +3 -0
- package/dist/runtime/src/index.ts +7 -0
- package/dist/runtime/src/mcp/runtime-spec.ts +3 -0
- package/dist/runtime/src/mcp/session-comm/server.ts +1 -1
- package/dist/runtime/src/platform/config.ts +2 -2
- package/dist/runtime/src/platform/mcp-config.ts +13 -0
- package/dist/runtime/src/prompts/builders.ts +20 -6
- package/dist/runtime/src/query/active-rooms.ts +2 -0
- package/dist/runtime/src/runtime/delivery-ack.ts +112 -0
- package/dist/runtime/src/runtime/errors.ts +12 -12
- package/dist/runtime/src/runtime/turn-runner.ts +12 -0
- package/dist/runtime/src/storage/api-messages.ts +7 -5
- package/dist/runtime/src/storage/api-topics.ts +5 -2
- package/dist/runtime/src/storage/forum-db.ts +4 -1
- package/dist/runtime/src/storage/runtime-turn-requests.ts +1 -0
- package/dist/runtime/src/storage/session-asks.ts +13 -5
- package/dist/runtime/src/storage/storage-contract.ts +54 -0
- package/dist/runtime/src/storage/storage-host.ts +89 -36
- package/dist/runtime/src/storage/storage-public-host.ts +16 -0
- package/dist/runtime/src/storage/storage-public.ts +21 -5
- package/dist/runtime/src/storage/token-stats.ts +1 -1
- package/dist/runtime/src/types/api.ts +2 -0
- package/dist/runtime/src/types.ts +2 -0
- package/dist/runtime/src/version.ts +1 -1
- package/dist/runtime-helpers.js +29 -18
- package/dist/runtime-helpers.js.map +8 -7
- package/dist/storage.js +260 -202
- package/dist/storage.js.map +11 -9
- package/dist/types/packages/core/src/mcp/runtime-spec.d.ts +2 -0
- package/dist/types/packages/core/src/platform/mcp-config.d.ts +4 -0
- package/dist/types/packages/core/src/prompts/builders.d.ts +2 -0
- package/dist/types/packages/core/src/storage/api-messages.d.ts +6 -6
- package/dist/types/packages/core/src/storage/api-topics.d.ts +20 -2
- package/dist/types/packages/core/src/storage/forum-db.d.ts +2 -1
- package/dist/types/packages/core/src/storage/session-asks.d.ts +3 -2
- package/dist/types/packages/core/src/storage/storage-contract.d.ts +46 -0
- package/dist/types/packages/core/src/storage/storage-host.d.ts +12 -19
- package/dist/types/packages/core/src/storage/storage-public-host.d.ts +7 -0
- package/dist/types/packages/core/src/storage/storage-public.d.ts +4 -2
- package/dist/types/packages/core/src/types/api.d.ts +2 -0
- package/dist/types/packages/core/src/types.d.ts +2 -0
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/dist/types/packages/module-cron/src/store.d.ts +22 -2
- package/dist/vault.js +2 -2
- package/dist/vault.js.map +3 -3
- package/package.json +1 -1
- package/dist/chunk-01xcc856.js +0 -149
- package/dist/chunk-01xcc856.js.map +0 -10
- package/dist/chunk-1a6kv9vt.js +0 -118
- package/dist/chunk-1a6kv9vt.js.map +0 -10
- package/dist/chunk-1b62d730.js +0 -117
- package/dist/chunk-1b62d730.js.map +0 -10
- package/dist/chunk-1k7t7bnx.js +0 -97
- package/dist/chunk-1k7t7bnx.js.map +0 -10
- package/dist/chunk-28apmz4r.js +0 -431
- package/dist/chunk-28apmz4r.js.map +0 -11
- package/dist/chunk-2fvydfkx.js +0 -141
- package/dist/chunk-2fvydfkx.js.map +0 -10
- package/dist/chunk-41ygvg5k.js +0 -2387
- package/dist/chunk-41ygvg5k.js.map +0 -26
- package/dist/chunk-4q966ttx.js +0 -371
- package/dist/chunk-4q966ttx.js.map +0 -11
- package/dist/chunk-51rcsavw.js +0 -1712
- package/dist/chunk-51rcsavw.js.map +0 -18
- package/dist/chunk-59d0shyj.js +0 -103
- package/dist/chunk-59d0shyj.js.map +0 -10
- package/dist/chunk-5fzgvn79.js +0 -3536
- package/dist/chunk-5fzgvn79.js.map +0 -20
- package/dist/chunk-61px0717.js +0 -153
- package/dist/chunk-61px0717.js.map +0 -11
- package/dist/chunk-66y0hr8c.js +0 -2136
- package/dist/chunk-66y0hr8c.js.map +0 -29
- package/dist/chunk-69k45zg8.js +0 -250
- package/dist/chunk-69k45zg8.js.map +0 -11
- package/dist/chunk-6ah5farg.js +0 -130
- package/dist/chunk-6ah5farg.js.map +0 -10
- package/dist/chunk-6d4fmea5.js +0 -117
- package/dist/chunk-6d4fmea5.js.map +0 -12
- package/dist/chunk-8cahx7xc.js +0 -46
- package/dist/chunk-8cahx7xc.js.map +0 -10
- package/dist/chunk-8f20fk4n.js +0 -252
- package/dist/chunk-8f20fk4n.js.map +0 -10
- package/dist/chunk-91ckrvk8.js +0 -318
- package/dist/chunk-91ckrvk8.js.map +0 -10
- package/dist/chunk-93krf6ng.js +0 -3069
- package/dist/chunk-93krf6ng.js.map +0 -32
- package/dist/chunk-9qx1t77a.js +0 -214
- package/dist/chunk-9qx1t77a.js.map +0 -10
- package/dist/chunk-beqhdr9w.js +0 -589
- package/dist/chunk-beqhdr9w.js.map +0 -11
- package/dist/chunk-bftftsgq.js +0 -1637
- package/dist/chunk-bftftsgq.js.map +0 -15
- package/dist/chunk-c500xe9z.js +0 -33
- package/dist/chunk-c500xe9z.js.map +0 -10
- package/dist/chunk-cjsnkvq2.js +0 -23
- package/dist/chunk-cjsnkvq2.js.map +0 -10
- package/dist/chunk-cxa7yghg.js +0 -577
- package/dist/chunk-cxa7yghg.js.map +0 -14
- package/dist/chunk-edb07sjp.js +0 -567
- package/dist/chunk-edb07sjp.js.map +0 -14
- package/dist/chunk-f361dwba.js +0 -589
- package/dist/chunk-f361dwba.js.map +0 -11
- package/dist/chunk-f5xgprg1.js +0 -59
- package/dist/chunk-f5xgprg1.js.map +0 -10
- package/dist/chunk-ffefbd3r.js +0 -17
- package/dist/chunk-ffefbd3r.js.map +0 -10
- package/dist/chunk-fswhzdf5.js +0 -64
- package/dist/chunk-fswhzdf5.js.map +0 -10
- package/dist/chunk-g144wdrs.js +0 -2907
- package/dist/chunk-g144wdrs.js.map +0 -24
- package/dist/chunk-h980hb2n.js +0 -512
- package/dist/chunk-h980hb2n.js.map +0 -13
- package/dist/chunk-h9vbhhgr.js +0 -1337
- package/dist/chunk-h9vbhhgr.js.map +0 -16
- package/dist/chunk-hwy3n31w.js +0 -21
- package/dist/chunk-hwy3n31w.js.map +0 -9
- package/dist/chunk-jtrk0khr.js +0 -108
- package/dist/chunk-jtrk0khr.js.map +0 -10
- package/dist/chunk-jzz91jwh.js +0 -70
- package/dist/chunk-jzz91jwh.js.map +0 -10
- package/dist/chunk-m9e3tbr8.js +0 -708
- package/dist/chunk-m9e3tbr8.js.map +0 -14
- package/dist/chunk-mh5mexsf.js +0 -147
- package/dist/chunk-mh5mexsf.js.map +0 -11
- package/dist/chunk-npd8n03v.js +0 -2152
- package/dist/chunk-npd8n03v.js.map +0 -15
- package/dist/chunk-pg1azh6n.js +0 -2
- package/dist/chunk-pg1azh6n.js.map +0 -9
- package/dist/chunk-qwy57177.js +0 -237
- package/dist/chunk-qwy57177.js.map +0 -11
- package/dist/chunk-r31q21h5.js +0 -53
- package/dist/chunk-r31q21h5.js.map +0 -10
- package/dist/chunk-rbvctv1n.js +0 -366
- package/dist/chunk-rbvctv1n.js.map +0 -10
- package/dist/chunk-sa874j5c.js +0 -9
- package/dist/chunk-sa874j5c.js.map +0 -10
- package/dist/chunk-sctcs5zb.js +0 -281
- package/dist/chunk-sctcs5zb.js.map +0 -10
- package/dist/chunk-tsstrcfc.js +0 -122
- package/dist/chunk-tsstrcfc.js.map +0 -10
- package/dist/chunk-wk2qf31s.js +0 -58
- package/dist/chunk-wk2qf31s.js.map +0 -10
- package/dist/chunk-wx7ag4dd.js +0 -2936
- package/dist/chunk-wx7ag4dd.js.map +0 -20
- package/dist/chunk-znx1fpfd.js +0 -61
- package/dist/chunk-znx1fpfd.js.map +0 -10
package/dist/chunk-sctcs5zb.js
DELETED
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
CRON_JOBS_DIR,
|
|
4
|
-
createCronJob,
|
|
5
|
-
cronScriptExists,
|
|
6
|
-
deleteCronJob,
|
|
7
|
-
getCronJob,
|
|
8
|
-
getCronJobByOwnerAndName,
|
|
9
|
-
listCronJobs,
|
|
10
|
-
listCronRuns,
|
|
11
|
-
queueCronPromptSummary,
|
|
12
|
-
requestCronCancel,
|
|
13
|
-
requestCronRun,
|
|
14
|
-
resetCronTopicContext,
|
|
15
|
-
setCronJobEnabled,
|
|
16
|
-
updateCronJobWithContextReset
|
|
17
|
-
} from "./chunk-51rcsavw.js";
|
|
18
|
-
import"./chunk-93krf6ng.js";
|
|
19
|
-
import"./chunk-fswhzdf5.js";
|
|
20
|
-
import"./chunk-cxa7yghg.js";
|
|
21
|
-
import"./chunk-59d0shyj.js";
|
|
22
|
-
import"./chunk-rbvctv1n.js";
|
|
23
|
-
import"./chunk-1k7t7bnx.js";
|
|
24
|
-
import"./chunk-g144wdrs.js";
|
|
25
|
-
import"./chunk-91ckrvk8.js";
|
|
26
|
-
import"./chunk-66y0hr8c.js";
|
|
27
|
-
import"./chunk-h9vbhhgr.js";
|
|
28
|
-
import {
|
|
29
|
-
getTopic,
|
|
30
|
-
getTopicByNameForUser
|
|
31
|
-
} from "./chunk-f361dwba.js";
|
|
32
|
-
import"./chunk-8cahx7xc.js";
|
|
33
|
-
import {
|
|
34
|
-
getRegistry
|
|
35
|
-
} from "./chunk-6d4fmea5.js";
|
|
36
|
-
import"./chunk-61px0717.js";
|
|
37
|
-
import"./chunk-tsstrcfc.js";
|
|
38
|
-
import"./chunk-6ah5farg.js";
|
|
39
|
-
import"./chunk-41ygvg5k.js";
|
|
40
|
-
import"./chunk-m9e3tbr8.js";
|
|
41
|
-
import"./chunk-mh5mexsf.js";
|
|
42
|
-
import {
|
|
43
|
-
EFFORT_VALUES,
|
|
44
|
-
isAgentKind
|
|
45
|
-
} from "./chunk-qwy57177.js";
|
|
46
|
-
import"./chunk-j0kjscb7.js";
|
|
47
|
-
import"./chunk-h980hb2n.js";
|
|
48
|
-
import"./chunk-ffefbd3r.js";
|
|
49
|
-
import"./chunk-pg1azh6n.js";
|
|
50
|
-
import"./chunk-1a6kv9vt.js";
|
|
51
|
-
import"./chunk-f5xgprg1.js";
|
|
52
|
-
import"./chunk-hwy3n31w.js";
|
|
53
|
-
|
|
54
|
-
// ../cli/src/commands/cron.ts
|
|
55
|
-
var USER_ID = "local";
|
|
56
|
-
function flag(args, name) {
|
|
57
|
-
return args.find((value) => value.startsWith(`--${name}=`))?.slice(name.length + 3);
|
|
58
|
-
}
|
|
59
|
-
function hasFlag(args, name) {
|
|
60
|
-
return args.some((value) => value.startsWith(`--${name}=`));
|
|
61
|
-
}
|
|
62
|
-
function positional(args) {
|
|
63
|
-
return args.filter((value) => !value.startsWith("--"));
|
|
64
|
-
}
|
|
65
|
-
function resolveJob(ref) {
|
|
66
|
-
return getCronJob(ref) ?? getCronJobByOwnerAndName(USER_ID, ref);
|
|
67
|
-
}
|
|
68
|
-
function printJob(job) {
|
|
69
|
-
const last = listCronRuns(job.id, 1)[0];
|
|
70
|
-
console.log(`${job.name} ${job.enabled ? "enabled" : "paused"} ${job.schedule}` + `${job.timezone ? ` (${job.timezone})` : ""} next=${job.nextRunAt}` + `${last ? ` last=${last.status}` : ""} ${job.id}`);
|
|
71
|
-
}
|
|
72
|
-
function usage() {
|
|
73
|
-
console.log([
|
|
74
|
-
"negotium cron commands:",
|
|
75
|
-
" list",
|
|
76
|
-
" create <topic> <name> '<schedule>' <prompt...> [--timezone=IANA] [--agent=...] [--model=...] [--effort=...]",
|
|
77
|
-
" create <topic> <name> '<schedule>' --script=job.py [--timezone=IANA] [--agent=...]",
|
|
78
|
-
" edit <name|id> [prompt...] [--name=...] [--topic=...] [--schedule=...] [--script=job.py]",
|
|
79
|
-
" inspect|logs <name|id>",
|
|
80
|
-
" run|pause|resume|restart|kill|reset|delete <name|id>",
|
|
81
|
-
"",
|
|
82
|
-
"The node must stay alive (`negotium serve`, chat, or an adapter) for schedules to run.",
|
|
83
|
-
`Python prompt scripts live in ${CRON_JOBS_DIR}.`
|
|
84
|
-
].join(`
|
|
85
|
-
`));
|
|
86
|
-
}
|
|
87
|
-
async function cronCommand(args) {
|
|
88
|
-
const [sub, ...rest] = args;
|
|
89
|
-
try {
|
|
90
|
-
switch (sub) {
|
|
91
|
-
case undefined:
|
|
92
|
-
case "help":
|
|
93
|
-
case "--help":
|
|
94
|
-
usage();
|
|
95
|
-
return;
|
|
96
|
-
case "list": {
|
|
97
|
-
const jobs = listCronJobs(USER_ID);
|
|
98
|
-
if (jobs.length === 0) {
|
|
99
|
-
console.log("no cron jobs");
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
jobs.forEach(printJob);
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
case "create": {
|
|
106
|
-
const values = positional(rest);
|
|
107
|
-
const [topicName, name, schedule, ...promptParts] = values;
|
|
108
|
-
const script = flag(rest, "script")?.trim() || undefined;
|
|
109
|
-
if (!topicName || !name || !schedule || promptParts.length === 0 && !script) {
|
|
110
|
-
usage();
|
|
111
|
-
process.exitCode = 1;
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
if (script && promptParts.length > 0) {
|
|
115
|
-
throw new Error("provide a prompt or --script, not both");
|
|
116
|
-
}
|
|
117
|
-
if (script && !cronScriptExists(script))
|
|
118
|
-
throw new Error(`cron script not found: ${script}`);
|
|
119
|
-
const topic = getTopicByNameForUser(topicName, USER_ID);
|
|
120
|
-
if (!topic?.agent)
|
|
121
|
-
throw new Error(`topic not found or has no agent: ${topicName}`);
|
|
122
|
-
const agentRaw = flag(rest, "agent");
|
|
123
|
-
if (agentRaw && !isAgentKind(agentRaw))
|
|
124
|
-
throw new Error(`invalid agent: ${agentRaw}`);
|
|
125
|
-
const agent = isAgentKind(agentRaw) ? agentRaw : undefined;
|
|
126
|
-
const effectiveAgent = agent ?? topic.agent;
|
|
127
|
-
const registry = getRegistry(effectiveAgent);
|
|
128
|
-
const model = flag(rest, "model");
|
|
129
|
-
if (model && !registry.validateModel(model)) {
|
|
130
|
-
throw new Error(`model '${model}' is invalid for ${effectiveAgent}`);
|
|
131
|
-
}
|
|
132
|
-
const effortRaw = flag(rest, "effort");
|
|
133
|
-
if (effortRaw && !EFFORT_VALUES.includes(effortRaw)) {
|
|
134
|
-
throw new Error(`invalid effort: ${effortRaw}`);
|
|
135
|
-
}
|
|
136
|
-
const effort = effortRaw;
|
|
137
|
-
if (effort && !registry.validateEffort(effort)) {
|
|
138
|
-
throw new Error(`effort '${effort}' is invalid for ${effectiveAgent}`);
|
|
139
|
-
}
|
|
140
|
-
const job = createCronJob({
|
|
141
|
-
name,
|
|
142
|
-
ownerUserId: USER_ID,
|
|
143
|
-
topicId: topic.id,
|
|
144
|
-
prompt: promptParts.length > 0 ? promptParts.join(" ") : undefined,
|
|
145
|
-
script,
|
|
146
|
-
schedule,
|
|
147
|
-
timezone: flag(rest, "timezone"),
|
|
148
|
-
agent,
|
|
149
|
-
model,
|
|
150
|
-
effort
|
|
151
|
-
});
|
|
152
|
-
if (job.prompt)
|
|
153
|
-
queueCronPromptSummary(job.id, job.prompt);
|
|
154
|
-
printJob(job);
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
case "edit": {
|
|
158
|
-
const values = positional(rest);
|
|
159
|
-
const [ref, ...promptParts] = values;
|
|
160
|
-
if (!ref)
|
|
161
|
-
throw new Error("provide a cron name or id");
|
|
162
|
-
const job = resolveJob(ref);
|
|
163
|
-
if (!job || job.ownerUserId !== USER_ID)
|
|
164
|
-
throw new Error(`cron job not found: ${ref}`);
|
|
165
|
-
const topicName = flag(rest, "topic");
|
|
166
|
-
const topic = topicName ? getTopicByNameForUser(topicName, USER_ID) : null;
|
|
167
|
-
if (topicName && !topic?.agent)
|
|
168
|
-
throw new Error(`topic not found or has no agent: ${topicName}`);
|
|
169
|
-
const scriptTouched = hasFlag(rest, "script");
|
|
170
|
-
const script = flag(rest, "script")?.trim() || undefined;
|
|
171
|
-
if (script && !cronScriptExists(script))
|
|
172
|
-
throw new Error(`cron script not found: ${script}`);
|
|
173
|
-
if (script && promptParts.length > 0)
|
|
174
|
-
throw new Error("provide a prompt or --script, not both");
|
|
175
|
-
const sourceTouched = scriptTouched || promptParts.length > 0;
|
|
176
|
-
const nextPrompt = promptParts.length > 0 ? promptParts.join(" ") : sourceTouched ? undefined : job.prompt;
|
|
177
|
-
const nextScript = scriptTouched ? script : promptParts.length > 0 ? undefined : job.script;
|
|
178
|
-
if (sourceTouched && Boolean(nextPrompt) === Boolean(nextScript)) {
|
|
179
|
-
throw new Error("cron job requires exactly one of prompt or script");
|
|
180
|
-
}
|
|
181
|
-
const agentRaw = flag(rest, "agent");
|
|
182
|
-
const agent = agentRaw === "default" ? undefined : agentRaw;
|
|
183
|
-
if (agent && !isAgentKind(agent))
|
|
184
|
-
throw new Error(`invalid agent: ${agent}`);
|
|
185
|
-
const effectiveAgent = (isAgentKind(agent) ? agent : hasFlag(rest, "agent") ? undefined : job.agent) ?? topic?.agent ?? getTopic(job.topicId)?.agent;
|
|
186
|
-
const modelRaw = flag(rest, "model");
|
|
187
|
-
const model = modelRaw === "default" ? undefined : modelRaw?.trim() || undefined;
|
|
188
|
-
const effortRaw = flag(rest, "effort");
|
|
189
|
-
const effort = effortRaw === "default" ? undefined : effortRaw;
|
|
190
|
-
if (effort && !EFFORT_VALUES.includes(effort)) {
|
|
191
|
-
throw new Error(`invalid effort: ${effort}`);
|
|
192
|
-
}
|
|
193
|
-
if (effectiveAgent) {
|
|
194
|
-
const registry = getRegistry(effectiveAgent);
|
|
195
|
-
if (model && !registry.validateModel(model)) {
|
|
196
|
-
throw new Error(`model '${model}' is invalid for ${effectiveAgent}`);
|
|
197
|
-
}
|
|
198
|
-
if (effort && !registry.validateEffort(effort)) {
|
|
199
|
-
throw new Error(`effort '${effort}' is invalid for ${effectiveAgent}`);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
const updated = await updateCronJobWithContextReset(job.id, {
|
|
203
|
-
name: flag(rest, "name"),
|
|
204
|
-
topicId: topic?.id,
|
|
205
|
-
prompt: sourceTouched ? nextPrompt ?? null : undefined,
|
|
206
|
-
script: sourceTouched ? nextScript ?? null : undefined,
|
|
207
|
-
summary: sourceTouched ? null : undefined,
|
|
208
|
-
schedule: flag(rest, "schedule"),
|
|
209
|
-
timezone: hasFlag(rest, "timezone") ? flag(rest, "timezone") || null : undefined,
|
|
210
|
-
agent: hasFlag(rest, "agent") ? isAgentKind(agent) ? agent : null : undefined,
|
|
211
|
-
model: hasFlag(rest, "model") ? model ?? null : undefined,
|
|
212
|
-
effort: hasFlag(rest, "effort") ? effort ?? null : undefined
|
|
213
|
-
});
|
|
214
|
-
if (!updated)
|
|
215
|
-
throw new Error(`cron job not found: ${ref}`);
|
|
216
|
-
if (sourceTouched && updated.prompt)
|
|
217
|
-
queueCronPromptSummary(updated.id, updated.prompt);
|
|
218
|
-
printJob(updated);
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
case "inspect":
|
|
222
|
-
case "logs": {
|
|
223
|
-
const ref = positional(rest)[0];
|
|
224
|
-
if (!ref)
|
|
225
|
-
throw new Error("provide a cron name or id");
|
|
226
|
-
const job = resolveJob(ref);
|
|
227
|
-
if (!job || job.ownerUserId !== USER_ID)
|
|
228
|
-
throw new Error(`cron job not found: ${ref}`);
|
|
229
|
-
console.log(JSON.stringify({ ...job, runs: listCronRuns(job.id, 20) }, null, 2));
|
|
230
|
-
return;
|
|
231
|
-
}
|
|
232
|
-
case "run":
|
|
233
|
-
case "pause":
|
|
234
|
-
case "resume":
|
|
235
|
-
case "restart":
|
|
236
|
-
case "kill":
|
|
237
|
-
case "reset":
|
|
238
|
-
case "delete": {
|
|
239
|
-
const ref = positional(rest)[0];
|
|
240
|
-
if (!ref)
|
|
241
|
-
throw new Error("provide a cron name or id");
|
|
242
|
-
const job = resolveJob(ref);
|
|
243
|
-
if (!job || job.ownerUserId !== USER_ID)
|
|
244
|
-
throw new Error(`cron job not found: ${ref}`);
|
|
245
|
-
if (sub === "run") {
|
|
246
|
-
if (!job.enabled)
|
|
247
|
-
throw new Error("job is disabled; resume it first");
|
|
248
|
-
console.log(`queued ${requestCronRun(job.id)}`);
|
|
249
|
-
}
|
|
250
|
-
if (sub === "pause")
|
|
251
|
-
printJob(setCronJobEnabled(job.id, false));
|
|
252
|
-
if (sub === "resume")
|
|
253
|
-
printJob(setCronJobEnabled(job.id, true));
|
|
254
|
-
if (sub === "restart")
|
|
255
|
-
printJob(setCronJobEnabled(job.id, true));
|
|
256
|
-
if (sub === "kill")
|
|
257
|
-
console.log(`cancellation queued ${requestCronCancel(job.id)}`);
|
|
258
|
-
if (sub === "reset") {
|
|
259
|
-
await resetCronTopicContext(job.topicId);
|
|
260
|
-
console.log(`reset shared Cron context for topic ${job.topicId}`);
|
|
261
|
-
}
|
|
262
|
-
if (sub === "delete") {
|
|
263
|
-
deleteCronJob(job.id);
|
|
264
|
-
console.log(`deleted ${job.name}`);
|
|
265
|
-
}
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
|
-
default:
|
|
269
|
-
usage();
|
|
270
|
-
process.exitCode = 1;
|
|
271
|
-
}
|
|
272
|
-
} catch (error) {
|
|
273
|
-
console.error(error instanceof Error ? error.message : String(error));
|
|
274
|
-
process.exitCode = 1;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
export {
|
|
278
|
-
cronCommand
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
//# debugId=ED238C412EFD148B64756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../cli/src/commands/cron.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"/** `negotium cron ...` — persistent scheduled agent turns. */\n\nimport {\n EFFORT_VALUES,\n type EffortLevel,\n getRegistry,\n getTopic,\n getTopicByNameForUser,\n isAgentKind,\n} from \"@negotium/core\";\nimport {\n CRON_JOBS_DIR,\n createCronJob,\n cronScriptExists,\n deleteCronJob,\n getCronJob,\n getCronJobByOwnerAndName,\n listCronJobs,\n listCronRuns,\n queueCronPromptSummary,\n requestCronCancel,\n requestCronRun,\n resetCronTopicContext,\n setCronJobEnabled,\n updateCronJobWithContextReset,\n} from \"@negotium/module-cron\";\n\nconst USER_ID = \"local\";\n\nfunction flag(args: string[], name: string): string | undefined {\n return args.find((value) => value.startsWith(`--${name}=`))?.slice(name.length + 3);\n}\n\nfunction hasFlag(args: string[], name: string): boolean {\n return args.some((value) => value.startsWith(`--${name}=`));\n}\n\nfunction positional(args: string[]): string[] {\n return args.filter((value) => !value.startsWith(\"--\"));\n}\n\nfunction resolveJob(ref: string) {\n return getCronJob(ref) ?? getCronJobByOwnerAndName(USER_ID, ref);\n}\n\nfunction printJob(job: NonNullable<ReturnType<typeof getCronJob>>): void {\n const last = listCronRuns(job.id, 1)[0];\n console.log(\n `${job.name} ${job.enabled ? \"enabled\" : \"paused\"} ${job.schedule}` +\n `${job.timezone ? ` (${job.timezone})` : \"\"} next=${job.nextRunAt}` +\n `${last ? ` last=${last.status}` : \"\"} ${job.id}`,\n );\n}\n\nfunction usage(): void {\n console.log(\n [\n \"negotium cron commands:\",\n \" list\",\n \" create <topic> <name> '<schedule>' <prompt...> [--timezone=IANA] [--agent=...] [--model=...] [--effort=...]\",\n \" create <topic> <name> '<schedule>' --script=job.py [--timezone=IANA] [--agent=...]\",\n \" edit <name|id> [prompt...] [--name=...] [--topic=...] [--schedule=...] [--script=job.py]\",\n \" inspect|logs <name|id>\",\n \" run|pause|resume|restart|kill|reset|delete <name|id>\",\n \"\",\n \"The node must stay alive (`negotium serve`, chat, or an adapter) for schedules to run.\",\n `Python prompt scripts live in ${CRON_JOBS_DIR}.`,\n ].join(\"\\n\"),\n );\n}\n\nexport async function cronCommand(args: string[]): Promise<void> {\n const [sub, ...rest] = args;\n try {\n switch (sub) {\n case undefined:\n case \"help\":\n case \"--help\":\n usage();\n return;\n case \"list\": {\n const jobs = listCronJobs(USER_ID);\n if (jobs.length === 0) {\n console.log(\"no cron jobs\");\n return;\n }\n jobs.forEach(printJob);\n return;\n }\n case \"create\": {\n const values = positional(rest);\n const [topicName, name, schedule, ...promptParts] = values;\n const script = flag(rest, \"script\")?.trim() || undefined;\n if (!topicName || !name || !schedule || (promptParts.length === 0 && !script)) {\n usage();\n process.exitCode = 1;\n return;\n }\n if (script && promptParts.length > 0) {\n throw new Error(\"provide a prompt or --script, not both\");\n }\n if (script && !cronScriptExists(script))\n throw new Error(`cron script not found: ${script}`);\n const topic = getTopicByNameForUser(topicName, USER_ID);\n if (!topic?.agent) throw new Error(`topic not found or has no agent: ${topicName}`);\n const agentRaw = flag(rest, \"agent\");\n if (agentRaw && !isAgentKind(agentRaw)) throw new Error(`invalid agent: ${agentRaw}`);\n const agent = isAgentKind(agentRaw) ? agentRaw : undefined;\n const effectiveAgent = agent ?? topic.agent;\n const registry = getRegistry(effectiveAgent);\n const model = flag(rest, \"model\");\n if (model && !registry.validateModel(model)) {\n throw new Error(`model '${model}' is invalid for ${effectiveAgent}`);\n }\n const effortRaw = flag(rest, \"effort\");\n if (effortRaw && !(EFFORT_VALUES as readonly string[]).includes(effortRaw)) {\n throw new Error(`invalid effort: ${effortRaw}`);\n }\n const effort = effortRaw as EffortLevel | undefined;\n if (effort && !registry.validateEffort(effort)) {\n throw new Error(`effort '${effort}' is invalid for ${effectiveAgent}`);\n }\n const job = createCronJob({\n name,\n ownerUserId: USER_ID,\n topicId: topic.id,\n prompt: promptParts.length > 0 ? promptParts.join(\" \") : undefined,\n script,\n schedule,\n timezone: flag(rest, \"timezone\"),\n agent,\n model,\n effort,\n });\n if (job.prompt) queueCronPromptSummary(job.id, job.prompt);\n printJob(job);\n return;\n }\n case \"edit\": {\n const values = positional(rest);\n const [ref, ...promptParts] = values;\n if (!ref) throw new Error(\"provide a cron name or id\");\n const job = resolveJob(ref);\n if (!job || job.ownerUserId !== USER_ID) throw new Error(`cron job not found: ${ref}`);\n const topicName = flag(rest, \"topic\");\n const topic = topicName ? getTopicByNameForUser(topicName, USER_ID) : null;\n if (topicName && !topic?.agent)\n throw new Error(`topic not found or has no agent: ${topicName}`);\n const scriptTouched = hasFlag(rest, \"script\");\n const script = flag(rest, \"script\")?.trim() || undefined;\n if (script && !cronScriptExists(script))\n throw new Error(`cron script not found: ${script}`);\n if (script && promptParts.length > 0)\n throw new Error(\"provide a prompt or --script, not both\");\n const sourceTouched = scriptTouched || promptParts.length > 0;\n const nextPrompt =\n promptParts.length > 0 ? promptParts.join(\" \") : sourceTouched ? undefined : job.prompt;\n const nextScript = scriptTouched ? script : promptParts.length > 0 ? undefined : job.script;\n if (sourceTouched && Boolean(nextPrompt) === Boolean(nextScript)) {\n throw new Error(\"cron job requires exactly one of prompt or script\");\n }\n\n const agentRaw = flag(rest, \"agent\");\n const agent = agentRaw === \"default\" ? undefined : agentRaw;\n if (agent && !isAgentKind(agent)) throw new Error(`invalid agent: ${agent}`);\n const effectiveAgent =\n (isAgentKind(agent) ? agent : hasFlag(rest, \"agent\") ? undefined : job.agent) ??\n topic?.agent ??\n getTopic(job.topicId)?.agent;\n const modelRaw = flag(rest, \"model\");\n const model = modelRaw === \"default\" ? undefined : modelRaw?.trim() || undefined;\n const effortRaw = flag(rest, \"effort\");\n const effort = effortRaw === \"default\" ? undefined : effortRaw;\n if (effort && !(EFFORT_VALUES as readonly string[]).includes(effort)) {\n throw new Error(`invalid effort: ${effort}`);\n }\n if (effectiveAgent) {\n const registry = getRegistry(effectiveAgent);\n if (model && !registry.validateModel(model)) {\n throw new Error(`model '${model}' is invalid for ${effectiveAgent}`);\n }\n if (effort && !registry.validateEffort(effort as EffortLevel)) {\n throw new Error(`effort '${effort}' is invalid for ${effectiveAgent}`);\n }\n }\n\n const updated = await updateCronJobWithContextReset(job.id, {\n name: flag(rest, \"name\"),\n topicId: topic?.id,\n prompt: sourceTouched ? (nextPrompt ?? null) : undefined,\n script: sourceTouched ? (nextScript ?? null) : undefined,\n summary: sourceTouched ? null : undefined,\n schedule: flag(rest, \"schedule\"),\n timezone: hasFlag(rest, \"timezone\") ? flag(rest, \"timezone\") || null : undefined,\n agent: hasFlag(rest, \"agent\") ? (isAgentKind(agent) ? agent : null) : undefined,\n model: hasFlag(rest, \"model\") ? (model ?? null) : undefined,\n effort: hasFlag(rest, \"effort\")\n ? ((effort as EffortLevel | undefined) ?? null)\n : undefined,\n });\n if (!updated) throw new Error(`cron job not found: ${ref}`);\n if (sourceTouched && updated.prompt) queueCronPromptSummary(updated.id, updated.prompt);\n printJob(updated);\n return;\n }\n case \"inspect\":\n case \"logs\": {\n const ref = positional(rest)[0];\n if (!ref) throw new Error(\"provide a cron name or id\");\n const job = resolveJob(ref);\n if (!job || job.ownerUserId !== USER_ID) throw new Error(`cron job not found: ${ref}`);\n console.log(JSON.stringify({ ...job, runs: listCronRuns(job.id, 20) }, null, 2));\n return;\n }\n case \"run\":\n case \"pause\":\n case \"resume\":\n case \"restart\":\n case \"kill\":\n case \"reset\":\n case \"delete\": {\n const ref = positional(rest)[0];\n if (!ref) throw new Error(\"provide a cron name or id\");\n const job = resolveJob(ref);\n if (!job || job.ownerUserId !== USER_ID) throw new Error(`cron job not found: ${ref}`);\n if (sub === \"run\") {\n if (!job.enabled) throw new Error(\"job is disabled; resume it first\");\n console.log(`queued ${requestCronRun(job.id)}`);\n }\n if (sub === \"pause\") printJob(setCronJobEnabled(job.id, false)!);\n if (sub === \"resume\") printJob(setCronJobEnabled(job.id, true)!);\n if (sub === \"restart\") printJob(setCronJobEnabled(job.id, true)!);\n if (sub === \"kill\") console.log(`cancellation queued ${requestCronCancel(job.id)}`);\n if (sub === \"reset\") {\n await resetCronTopicContext(job.topicId);\n console.log(`reset shared Cron context for topic ${job.topicId}`);\n }\n if (sub === \"delete\") {\n deleteCronJob(job.id);\n console.log(`deleted ${job.name}`);\n }\n return;\n }\n default:\n usage();\n process.exitCode = 1;\n }\n } catch (error) {\n console.error(error instanceof Error ? error.message : String(error));\n process.exitCode = 1;\n }\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,IAAM,UAAU;AAEhB,SAAS,IAAI,CAAC,MAAgB,MAAkC;AAAA,EAC9D,OAAO,KAAK,KAAK,CAAC,UAAU,MAAM,WAAW,KAAK,OAAO,CAAC,GAAG,MAAM,KAAK,SAAS,CAAC;AAAA;AAGpF,SAAS,OAAO,CAAC,MAAgB,MAAuB;AAAA,EACtD,OAAO,KAAK,KAAK,CAAC,UAAU,MAAM,WAAW,KAAK,OAAO,CAAC;AAAA;AAG5D,SAAS,UAAU,CAAC,MAA0B;AAAA,EAC5C,OAAO,KAAK,OAAO,CAAC,WAAW,MAAM,WAAW,IAAI,CAAC;AAAA;AAGvD,SAAS,UAAU,CAAC,KAAa;AAAA,EAC/B,OAAO,WAAW,GAAG,KAAK,yBAAyB,SAAS,GAAG;AAAA;AAGjE,SAAS,QAAQ,CAAC,KAAuD;AAAA,EACvE,MAAM,OAAO,aAAa,IAAI,IAAI,CAAC,EAAE;AAAA,EACrC,QAAQ,IACN,GAAG,IAAI,SAAS,IAAI,UAAU,YAAY,aAAa,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I,QAAQ,SAAS;AAAA,UACnB,MAAM,sBAAsB,IAAI,OAAO;AAAA,UACvC,QAAQ,IAAI,uCAAuC,IAAI,SAAS;AAAA,QAClE;AAAA,QACA,IAAI,QAAQ,UAAU;AAAA,UACpB,cAAc,IAAI,EAAE;AAAA,UACpB,QAAQ,IAAI,WAAW,IAAI,MAAM;AAAA,QACnC;AAAA,QACA;AAAA,MACF;AAAA;AAAA,QAEE,MAAM;AAAA,QACN,QAAQ,WAAW;AAAA;AAAA,IAEvB,OAAO,OAAO;AAAA,IACd,QAAQ,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC;AAAA,IACpE,QAAQ,WAAW;AAAA;AAAA;",
|
|
8
|
-
"debugId": "ED238C412EFD148B64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-tsstrcfc.js
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
resolveDefaultModel
|
|
4
|
-
} from "./chunk-qwy57177.js";
|
|
5
|
-
import"./chunk-ffefbd3r.js";
|
|
6
|
-
import"./chunk-hwy3n31w.js";
|
|
7
|
-
|
|
8
|
-
// ../../packages/core/src/agents/model-catalog.ts
|
|
9
|
-
var MODEL_OWNER = {
|
|
10
|
-
sonnet: "claude",
|
|
11
|
-
opus: "claude",
|
|
12
|
-
haiku: "claude",
|
|
13
|
-
fable: "claude",
|
|
14
|
-
"gpt-5.6-luna": "codex",
|
|
15
|
-
"gpt-5.6-terra": "codex",
|
|
16
|
-
"gpt-5.6-sol": "codex",
|
|
17
|
-
"gpt-5.5": "codex",
|
|
18
|
-
deepseek: "maestro",
|
|
19
|
-
"deepseek-pro": "maestro",
|
|
20
|
-
"deepseek-flash": "maestro"
|
|
21
|
-
};
|
|
22
|
-
var SELECTABLE_MODELS = [
|
|
23
|
-
{
|
|
24
|
-
model: "gpt-5.6-sol",
|
|
25
|
-
agent: "codex",
|
|
26
|
-
description: "Latest frontier agentic coding model."
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
model: "gpt-5.6-terra",
|
|
30
|
-
agent: "codex",
|
|
31
|
-
description: "Balanced agentic coding model for everyday work."
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
model: "gpt-5.6-luna",
|
|
35
|
-
agent: "codex",
|
|
36
|
-
description: "Fast and affordable agentic coding model."
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
model: "gpt-5.5",
|
|
40
|
-
agent: "codex",
|
|
41
|
-
description: "Frontier model for complex coding, research, and real-world work."
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
model: "fable",
|
|
45
|
-
agent: "claude",
|
|
46
|
-
description: "Fable 5 \xB7 Most capable for your hardest and longest-running tasks \xB7 $10/$50 per Mtok"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
model: "opus",
|
|
50
|
-
agent: "claude",
|
|
51
|
-
description: "Opus 4.8 with 1M context \xB7 Best for everyday, complex tasks \xB7 $5/$25 per Mtok"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
model: "sonnet",
|
|
55
|
-
agent: "claude",
|
|
56
|
-
description: "Sonnet 5 \xB7 Efficient for routine tasks \xB7 $2/$10 per Mtok \xB7 promo through Aug 31"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
model: "deepseek-pro",
|
|
60
|
-
agent: "maestro",
|
|
61
|
-
description: "Sonnet-level performance at lower cost \xB7 Best for everyday tasks over coding"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
model: "deepseek-flash",
|
|
65
|
-
agent: "maestro",
|
|
66
|
-
description: "DeepSeek V4 Flash \xB7 Fast and low-cost for lightweight everyday tasks"
|
|
67
|
-
}
|
|
68
|
-
];
|
|
69
|
-
function selectableModel(value) {
|
|
70
|
-
const normalized = value.trim().toLowerCase();
|
|
71
|
-
return SELECTABLE_MODELS.find((candidate) => candidate.model === normalized);
|
|
72
|
-
}
|
|
73
|
-
function modelOwner(model) {
|
|
74
|
-
if (model.startsWith("claude-"))
|
|
75
|
-
return "claude";
|
|
76
|
-
if (model.startsWith("deepseek-"))
|
|
77
|
-
return "maestro";
|
|
78
|
-
if (model.startsWith("gpt-"))
|
|
79
|
-
return "codex";
|
|
80
|
-
return MODEL_OWNER[model];
|
|
81
|
-
}
|
|
82
|
-
function resolveModelForAgent(agent, requested, registry) {
|
|
83
|
-
const defaultModel = resolveDefaultModel(agent, registry.defaultModel);
|
|
84
|
-
if (!requested)
|
|
85
|
-
return defaultModel;
|
|
86
|
-
const owner = modelOwner(requested);
|
|
87
|
-
if (owner && owner !== agent)
|
|
88
|
-
return defaultModel;
|
|
89
|
-
return registry.validateModel(requested) ? requested : defaultModel;
|
|
90
|
-
}
|
|
91
|
-
var FALLBACK_ORDER = {
|
|
92
|
-
claude: [
|
|
93
|
-
{ agent: "maestro", model: "deepseek-pro" },
|
|
94
|
-
{ agent: "codex", model: "gpt-5.6-luna" }
|
|
95
|
-
],
|
|
96
|
-
codex: [
|
|
97
|
-
{ agent: "maestro", model: "deepseek-pro" },
|
|
98
|
-
{ agent: "claude", model: "sonnet" }
|
|
99
|
-
],
|
|
100
|
-
maestro: [
|
|
101
|
-
{ agent: "codex", model: "gpt-5.6-luna" },
|
|
102
|
-
{ agent: "claude", model: "sonnet" }
|
|
103
|
-
]
|
|
104
|
-
};
|
|
105
|
-
var AGENT_DISPLAY_NAME = {
|
|
106
|
-
claude: "Claude",
|
|
107
|
-
codex: "Codex",
|
|
108
|
-
maestro: "Maestro"
|
|
109
|
-
};
|
|
110
|
-
export {
|
|
111
|
-
selectableModel,
|
|
112
|
-
resolveModelForAgent,
|
|
113
|
-
modelOwner,
|
|
114
|
-
SELECTABLE_MODELS,
|
|
115
|
-
MODEL_OWNER,
|
|
116
|
-
FALLBACK_ORDER,
|
|
117
|
-
AGENT_DISPLAY_NAME
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
export { MODEL_OWNER, SELECTABLE_MODELS, selectableModel, modelOwner, resolveModelForAgent, FALLBACK_ORDER, AGENT_DISPLAY_NAME };
|
|
121
|
-
|
|
122
|
-
//# debugId=0800AE0F112828C564756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../packages/core/src/agents/model-catalog.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { resolveDefaultModel } from \"#platform/config\";\nimport type { AgentKind } from \"#types\";\n\n/**\n * Models/prefixes that belong exclusively to one agent backend. When the\n * resolved agent differs from a model's owner, the model is cross-agent stale\n * and must be dropped in favor of the new agent's default — otherwise the value\n * is passed straight into a provider that can't run it and crashes the turn\n * (bug B: `/codex` leaves the topic's \"sonnet\" behind → Codex 400\n * \"The 'sonnet' model is not supported when using Codex\").\n *\n * Codex's own `validateModel` accepts ANY non-empty string (OpenAI ships new\n * IDs frequently), so it can't reject \"sonnet\" on its own — this ownership\n * owner check is the cross-agent guard the per-registry validator can't provide.\n * Unknown/new model IDs are intentionally absent here so they still pass\n * through to whichever agent is active.\n */\nexport const MODEL_OWNER: Record<string, AgentKind> = {\n // Current aliases plus retired aliases retained only for stale-model detection.\n sonnet: \"claude\",\n opus: \"claude\",\n haiku: \"claude\",\n fable: \"claude\",\n \"gpt-5.6-luna\": \"codex\",\n \"gpt-5.6-terra\": \"codex\",\n \"gpt-5.6-sol\": \"codex\",\n \"gpt-5.5\": \"codex\",\n deepseek: \"maestro\",\n \"deepseek-pro\": \"maestro\",\n \"deepseek-flash\": \"maestro\",\n};\n\nexport interface SelectableModel {\n /** Canonical token accepted by user-facing `/model` commands. */\n model: string;\n /** Runtime owner kept internal so channel UIs only need to show `model`. */\n agent: AgentKind;\n /** Short comparison copy shown alongside the model in picker UIs. */\n description: string;\n}\n\n/**\n * Canonical model picker shared by every channel. Keep this deliberately\n * finite even though the Codex backend accepts arbitrary future model ids:\n * user-facing completion should only promise models we intentionally support.\n */\nexport const SELECTABLE_MODELS: readonly SelectableModel[] = [\n {\n model: \"gpt-5.6-sol\",\n agent: \"codex\",\n description: \"Latest frontier agentic coding model.\",\n },\n {\n model: \"gpt-5.6-terra\",\n agent: \"codex\",\n description: \"Balanced agentic coding model for everyday work.\",\n },\n {\n model: \"gpt-5.6-luna\",\n agent: \"codex\",\n description: \"Fast and affordable agentic coding model.\",\n },\n {\n model: \"gpt-5.5\",\n agent: \"codex\",\n description: \"Frontier model for complex coding, research, and real-world work.\",\n },\n {\n model: \"fable\",\n agent: \"claude\",\n description:\n \"Fable 5 · Most capable for your hardest and longest-running tasks · $10/$50 per Mtok\",\n },\n {\n model: \"opus\",\n agent: \"claude\",\n description: \"Opus 4.8 with 1M context · Best for everyday, complex tasks · $5/$25 per Mtok\",\n },\n {\n model: \"sonnet\",\n agent: \"claude\",\n description: \"Sonnet 5 · Efficient for routine tasks · $2/$10 per Mtok · promo through Aug 31\",\n },\n {\n model: \"deepseek-pro\",\n agent: \"maestro\",\n description: \"Sonnet-level performance at lower cost · Best for everyday tasks over coding\",\n },\n {\n model: \"deepseek-flash\",\n agent: \"maestro\",\n description: \"DeepSeek V4 Flash · Fast and low-cost for lightweight everyday tasks\",\n },\n];\n\nexport function selectableModel(value: string): SelectableModel | undefined {\n const normalized = value.trim().toLowerCase();\n return SELECTABLE_MODELS.find((candidate) => candidate.model === normalized);\n}\n\nexport function modelOwner(model: string): AgentKind | undefined {\n if (model.startsWith(\"claude-\")) return \"claude\";\n if (model.startsWith(\"deepseek-\")) return \"maestro\";\n if (model.startsWith(\"gpt-\")) return \"codex\";\n return MODEL_OWNER[model];\n}\n\n/**\n * Resolve the model to run for `agent`, given the requested value from the\n * priority chain (per-message slash > topic-config override > topic default).\n * Drops a model owned by a different agent, then falls back to the agent's\n * registry default if the value is empty/invalid for this agent.\n */\nexport function resolveModelForAgent(\n agent: AgentKind,\n requested: string | undefined,\n registry: { validateModel(s: string): boolean; defaultModel: string },\n): string {\n const defaultModel = resolveDefaultModel(agent, registry.defaultModel);\n if (!requested) return defaultModel;\n const owner = modelOwner(requested);\n if (owner && owner !== agent) return defaultModel; // cross-agent stale\n return registry.validateModel(requested) ? requested : defaultModel;\n}\n\n/**\n * Circular fallback order per agent. Each entry lists candidates to try in\n * priority order when the current agent errors out. The actual switch is\n * guarded by `checkAgentAuth` — only candidates whose backend is reachable\n * (API key present / auth file exists) will be selected.\n */\nexport const FALLBACK_ORDER: Record<AgentKind, { agent: AgentKind; model: string }[]> = {\n claude: [\n { agent: \"maestro\", model: \"deepseek-pro\" },\n { agent: \"codex\", model: \"gpt-5.6-luna\" },\n ],\n codex: [\n { agent: \"maestro\", model: \"deepseek-pro\" },\n { agent: \"claude\", model: \"sonnet\" },\n ],\n maestro: [\n { agent: \"codex\", model: \"gpt-5.6-luna\" },\n { agent: \"claude\", model: \"sonnet\" },\n ],\n};\n\nexport const AGENT_DISPLAY_NAME: Record<AgentKind, string> = {\n claude: \"Claude\",\n codex: \"Codex\",\n maestro: \"Maestro\",\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;;;AAiBO,IAAM,cAAyC;AAAA,EAEpD,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,kBAAkB;AACpB;AAgBO,IAAM,oBAAgD;AAAA,EAC3D;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA;AA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S;AAAA,EACrC;AAAA,EACA,SAAS;AAAA,IACP,EAAE,OAAO,SAAS,OAAO,eAAe;AAAA,IACxC,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,EACrC;AACF;AAEO,IAAM,qBAAgD;AAAA,EAC3D,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS;AACX;",
|
|
8
|
-
"debugId": "0800AE0F112828C564756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-wk2qf31s.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-93krf6ng.js";
|
|
3
|
-
import {
|
|
4
|
-
checkAgentAuth
|
|
5
|
-
} from "./chunk-fswhzdf5.js";
|
|
6
|
-
import"./chunk-cxa7yghg.js";
|
|
7
|
-
import"./chunk-59d0shyj.js";
|
|
8
|
-
import"./chunk-rbvctv1n.js";
|
|
9
|
-
import"./chunk-1k7t7bnx.js";
|
|
10
|
-
import"./chunk-g144wdrs.js";
|
|
11
|
-
import"./chunk-91ckrvk8.js";
|
|
12
|
-
import"./chunk-66y0hr8c.js";
|
|
13
|
-
import"./chunk-h9vbhhgr.js";
|
|
14
|
-
import"./chunk-f361dwba.js";
|
|
15
|
-
import"./chunk-8cahx7xc.js";
|
|
16
|
-
import"./chunk-6d4fmea5.js";
|
|
17
|
-
import"./chunk-61px0717.js";
|
|
18
|
-
import"./chunk-tsstrcfc.js";
|
|
19
|
-
import"./chunk-6ah5farg.js";
|
|
20
|
-
import"./chunk-41ygvg5k.js";
|
|
21
|
-
import"./chunk-m9e3tbr8.js";
|
|
22
|
-
import"./chunk-mh5mexsf.js";
|
|
23
|
-
import {
|
|
24
|
-
DATA_DIR,
|
|
25
|
-
RUN_DIR,
|
|
26
|
-
STATE_DIR,
|
|
27
|
-
SUPPORTED_AGENTS,
|
|
28
|
-
WORKSPACE_DIR
|
|
29
|
-
} from "./chunk-qwy57177.js";
|
|
30
|
-
import"./chunk-j0kjscb7.js";
|
|
31
|
-
import"./chunk-h980hb2n.js";
|
|
32
|
-
import"./chunk-ffefbd3r.js";
|
|
33
|
-
import"./chunk-pg1azh6n.js";
|
|
34
|
-
import"./chunk-1a6kv9vt.js";
|
|
35
|
-
import"./chunk-f5xgprg1.js";
|
|
36
|
-
import"./chunk-hwy3n31w.js";
|
|
37
|
-
|
|
38
|
-
// ../cli/src/commands/init.ts
|
|
39
|
-
function initCommand() {
|
|
40
|
-
console.log(`negotium node initialized
|
|
41
|
-
`);
|
|
42
|
-
console.log(` state: ${STATE_DIR}`);
|
|
43
|
-
console.log(` data: ${DATA_DIR}`);
|
|
44
|
-
console.log(` run: ${RUN_DIR}`);
|
|
45
|
-
console.log(` workspace: ${WORKSPACE_DIR}
|
|
46
|
-
`);
|
|
47
|
-
console.log("agents:");
|
|
48
|
-
for (const agent of SUPPORTED_AGENTS) {
|
|
49
|
-
const auth = checkAgentAuth(agent);
|
|
50
|
-
console.log(` ${agent.padEnd(8)} ${auth.ok ? "ready" : `unavailable \u2014 ${auth.error}`}`);
|
|
51
|
-
}
|
|
52
|
-
console.log("\nnext: `negotium chat` or `negotium serve`");
|
|
53
|
-
}
|
|
54
|
-
export {
|
|
55
|
-
initCommand
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
//# debugId=96DD4A657C12258464756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../cli/src/commands/init.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"/** `negotium init` — bootstrap the node state dir and report agent auth. */\n\nimport {\n checkAgentAuth,\n DATA_DIR,\n RUN_DIR,\n STATE_DIR,\n SUPPORTED_AGENTS,\n WORKSPACE_DIR,\n} from \"@negotium/core\";\n\nexport function initCommand(): void {\n // Importing core already created the layout — this command makes it visible.\n console.log(\"negotium node initialized\\n\");\n console.log(` state: ${STATE_DIR}`);\n console.log(` data: ${DATA_DIR}`);\n console.log(` run: ${RUN_DIR}`);\n console.log(` workspace: ${WORKSPACE_DIR}\\n`);\n\n console.log(\"agents:\");\n for (const agent of SUPPORTED_AGENTS) {\n const auth = checkAgentAuth(agent);\n console.log(` ${agent.padEnd(8)} ${auth.ok ? \"ready\" : `unavailable — ${auth.error}`}`);\n }\n console.log(\"\\nnext: `negotium chat` or `negotium serve`\");\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWO,SAAS,WAAW,GAAS;AAAA,EAElC,QAAQ,IAAI;AAAA,CAA6B;AAAA,EACzC,QAAQ,IAAI,gBAAgB,WAAW;AAAA,EACvC,QAAQ,IAAI,gBAAgB,UAAU;AAAA,EACtC,QAAQ,IAAI,gBAAgB,SAAS;AAAA,EACrC,QAAQ,IAAI,gBAAgB;AAAA,CAAiB;AAAA,EAE7C,QAAQ,IAAI,SAAS;AAAA,EACrB,WAAW,SAAS,kBAAkB;AAAA,IACpC,MAAM,OAAO,eAAe,KAAK;AAAA,IACjC,QAAQ,IAAI,KAAK,MAAM,OAAO,CAAC,KAAK,KAAK,KAAK,UAAU,sBAAgB,KAAK,SAAS;AAAA,EACxF;AAAA,EACA,QAAQ,IAAI,6CAA6C;AAAA;",
|
|
8
|
-
"debugId": "96DD4A657C12258464756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|