@dench.com/cli 3.7.0-staging.387 → 3.8.0-staging.389
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 +43 -44
- package/agent-config.ts +5 -55
- package/app-sdk.d.ts +121 -16
- package/chat-spawn.ts +11 -2
- package/chat.ts +1 -1
- package/context-settings.ts +86 -0
- package/cron.ts +19 -0
- package/dench.ts +202 -83
- package/environments.ts +694 -0
- package/lib/api-schemas.ts +4 -0
- package/lib/app-sdk-catalog.generated.ts +31 -17
- package/lib/command-args.ts +19 -4
- package/lib/command-help.ts +17 -2
- package/lib/command-registry.ts +222 -8
- package/lib/environment-archive.ts +255 -0
- package/lib/environment-cli-args.ts +96 -0
- package/lib/environment-contract.ts +237 -0
- package/lib/environment-execution.ts +769 -0
- package/lib/environment-source.ts +165 -0
- package/lib/load-dev-env.mjs +3 -1
- package/lib/load-dev-env.test.mjs +26 -9
- package/lib/parent-argv.ts +20 -0
- package/lib/references.generated.json +20 -12
- package/package.json +5 -3
- package/workspace-secrets.ts +231 -0
- package/agent.ts +0 -37
|
@@ -53,6 +53,8 @@ export const APP_SDK_SCOPES = [
|
|
|
53
53
|
"cron:schedule",
|
|
54
54
|
"email:read",
|
|
55
55
|
"email:write",
|
|
56
|
+
"environments:read",
|
|
57
|
+
"environments:write",
|
|
56
58
|
"files:read",
|
|
57
59
|
"files:write",
|
|
58
60
|
"http:external",
|
|
@@ -70,6 +72,8 @@ export const APP_SDK_SCOPES = [
|
|
|
70
72
|
"notifications:read",
|
|
71
73
|
"notifications:write",
|
|
72
74
|
"search:read",
|
|
75
|
+
"secrets:read",
|
|
76
|
+
"secrets:write",
|
|
73
77
|
"settings:read",
|
|
74
78
|
"settings:write",
|
|
75
79
|
"store:read",
|
|
@@ -77,12 +81,21 @@ export const APP_SDK_SCOPES = [
|
|
|
77
81
|
"ui",
|
|
78
82
|
"web:read",
|
|
79
83
|
"webhooks:receive",
|
|
80
|
-
"workspace:read"
|
|
84
|
+
"workspace:read",
|
|
85
|
+
"workspace:write"
|
|
81
86
|
] as const;
|
|
82
87
|
export type AppSdkScope = (typeof APP_SDK_SCOPES)[number];
|
|
83
88
|
|
|
84
89
|
/** Every public /api/v1 operation reachable through dench.api.call. */
|
|
85
90
|
export const APP_SDK_OPERATIONS: readonly AppSdkOperationInfo[] = [
|
|
91
|
+
{"id":"environments.list","group":"environments","summary":"List workspace-shared reusable setups and ready revisions (metadata only).","cli":"dench env list","method":"GET","path":"/environments","permission":"environments:read","pathParams":[]},
|
|
92
|
+
{"id":"environments.get","group":"environments","summary":"Inspect a saved setup, its manifest, and an optional immutable revision.","cli":"dench env show","method":"GET","path":"/environments/{name}","permission":"environments:read","pathParams":["name"]},
|
|
93
|
+
{"id":"environments.upload","group":"environments","summary":"Reserve an owner-bound source upload. Prefix the uploaded bytes with the returned proof before saving.","cli":"dench env save","method":"POST","path":"/environments/uploads","permission":"environments:write","pathParams":[]},
|
|
94
|
+
{"id":"environments.save","group":"environments","summary":"Publish an explicitly saved source and manifest for one-time preparation. Returns pending/building until verified; does not run the task.","cli":"dench env save","method":"POST","path":"/environments/{name}","permission":"environments:write","pathParams":["name"]},
|
|
95
|
+
{"id":"environments.delete","group":"environments","summary":"Retire a saved setup from new selection; retain immutable revisions and active job evidence.","cli":"dench env delete","method":"DELETE","path":"/environments/{name}","permission":"environments:write","pathParams":["name"]},
|
|
96
|
+
{"id":"secrets.list","group":"secrets","summary":"List workspace-shared credential names, kinds and versions; never values.","cli":"dench secrets list","method":"GET","path":"/secrets","permission":"secrets:read","pathParams":[]},
|
|
97
|
+
{"id":"secrets.set","group":"secrets","summary":"Encrypt a workspace credential. Use CLI stdin or the secure chat form; return metadata only. Do not put values in chat, manifests or scripts.","cli":"dench secrets set","method":"PUT","path":"/secrets/{name}","permission":"secrets:write","pathParams":["name"]},
|
|
98
|
+
{"id":"secrets.delete","group":"secrets","summary":"Revoke a workspace credential for future resolution, optionally checking its version.","cli":"dench secrets delete","method":"DELETE","path":"/secrets/{name}","permission":"secrets:write","pathParams":["name"]},
|
|
86
99
|
{"id":"campaigns.drafts.create","group":"campaigns","summary":"Create an idempotent empty campaign draft with the caller's available sender pools. Does not launch or send.","cli":"dench campaign draft","method":"POST","path":"/campaigns/drafts","permission":"campaigns:write","pathParams":[]},
|
|
87
100
|
{"id":"campaigns.audience.search","group":"campaigns","summary":"Search people by filters without adding CRM records or campaign recipients. Search credits apply; this is not a free provider preview.","cli":"dench campaign search","method":"POST","path":"/campaigns/audience/search","permission":"campaigns:write","pathParams":[]},
|
|
88
101
|
{"id":"campaigns.people.addFromSearch","group":"campaigns","summary":"Search and add up to 50 people to an existing campaign. New identities become Leads. Search credits apply; use nextPageToken for another page.","cli":"dench campaign add --search","method":"POST","path":"/campaigns/{sequenceId}/people/search","permission":"campaigns:write","pathParams":["sequenceId"]},
|
|
@@ -458,23 +471,24 @@ export const APP_SDK_OPERATIONS: readonly AppSdkOperationInfo[] = [
|
|
|
458
471
|
{"id":"browser.session.create","group":"browser","summary":"Create a Dench Browser session and return a CDP connect URL for Playwright (chromium.connectOverCDP) plus a live-view URL. Use for durable scripts run from the sandbox.","cli":"dench browser session create","method":"POST","path":"/browser/sessions","permission":"browser:write","pathParams":[]},
|
|
459
472
|
{"id":"browser.session.status","group":"browser","summary":"Get the status, connect URL, and live-view URL for a Dench Browser session.","cli":"dench browser session status","method":"GET","path":"/browser/sessions/{sessionId}","permission":"browser:read","pathParams":["sessionId"]},
|
|
460
473
|
{"id":"browser.session.stop","group":"browser","summary":"Stop a Dench Browser session and release the remote browser.","cli":"dench browser session stop","method":"DELETE","path":"/browser/sessions/{sessionId}","permission":"browser:write","pathParams":["sessionId"]},
|
|
461
|
-
{"id":"agentConfig.identity.show","group":"agent-config","summary":"Read IDENTITY.md.","cli":"dench identity
|
|
462
|
-
{"id":"agentConfig.identity.edit","group":"agent-config","summary":"Update IDENTITY.md.","cli":"dench identity
|
|
463
|
-
{"id":"agentConfig.organisation.show","group":"agent-config","summary":"Read ORGANISATION.md.","cli":"dench organisation
|
|
464
|
-
{"id":"agentConfig.organisation.edit","group":"agent-config","summary":"Update ORGANISATION.md.","cli":"dench organisation
|
|
465
|
-
{"id":"agentConfig.user.show","group":"agent-config","summary":"Read USER.md.","cli":"dench user
|
|
466
|
-
{"id":"agentConfig.user.edit","group":"agent-config","summary":"Update USER.md.","cli":"dench user
|
|
467
|
-
{"id":"agentConfig.tools.show","group":"agent-config","summary":"Read tool notes.","cli":"dench tools
|
|
468
|
-
{"id":"agentConfig.tools.edit","group":"agent-config","summary":"Update tool notes.","cli":"dench tools
|
|
469
|
-
{"id":"
|
|
470
|
-
{"id":"agentConfig.mem.
|
|
471
|
-
{"id":"agentConfig.
|
|
472
|
-
{"id":"agentConfig.bootstrap.
|
|
473
|
-
{"id":"agentConfig.bootstrap.
|
|
474
|
+
{"id":"agentConfig.identity.show","group":"agent-config","summary":"Read IDENTITY.md.","cli":"dench context --sections identity","method":"GET","path":"/agent-config/identity","permission":"agent-config:read","pathParams":[]},
|
|
475
|
+
{"id":"agentConfig.identity.edit","group":"agent-config","summary":"Update IDENTITY.md.","cli":"dench context set identity","method":"PUT","path":"/agent-config/identity","permission":"agent-config:write","pathParams":[]},
|
|
476
|
+
{"id":"agentConfig.organisation.show","group":"agent-config","summary":"Read ORGANISATION.md.","cli":"dench context --sections organisation","method":"GET","path":"/agent-config/organisation","permission":"agent-config:read","pathParams":[]},
|
|
477
|
+
{"id":"agentConfig.organisation.edit","group":"agent-config","summary":"Update ORGANISATION.md.","cli":"dench context set organisation","method":"PUT","path":"/agent-config/organisation","permission":"agent-config:write","pathParams":[]},
|
|
478
|
+
{"id":"agentConfig.user.show","group":"agent-config","summary":"Read USER.md.","cli":"dench context --sections user","method":"GET","path":"/agent-config/user","permission":"agent-config:read","pathParams":[]},
|
|
479
|
+
{"id":"agentConfig.user.edit","group":"agent-config","summary":"Update USER.md.","cli":"dench context set user","method":"PUT","path":"/agent-config/user","permission":"agent-config:write","pathParams":[]},
|
|
480
|
+
{"id":"agentConfig.tools.show","group":"agent-config","summary":"Read tool notes.","cli":"dench context --sections tools","method":"GET","path":"/agent-config/tools","permission":"agent-config:read","pathParams":[]},
|
|
481
|
+
{"id":"agentConfig.tools.edit","group":"agent-config","summary":"Update tool notes.","cli":"dench context set tools","method":"PUT","path":"/agent-config/tools","permission":"agent-config:write","pathParams":[]},
|
|
482
|
+
{"id":"workspace.context.rules.set","group":"workspace","summary":"Update standing workspace rules; credentials belong in secrets and runnable setup in environments.","cli":"dench context set rules","method":"PUT","path":"/context/rules","permission":"workspace:write","pathParams":[]},
|
|
483
|
+
{"id":"agentConfig.mem.show","group":"agent-config","summary":"Read aggregate memory.","cli":"dench mem show","method":"GET","path":"/agent-config/mem","permission":"agent-config:read","deprecated":true,"pathParams":[]},
|
|
484
|
+
{"id":"agentConfig.mem.edit","group":"agent-config","summary":"Update aggregate memory.","cli":"dench mem set","method":"PUT","path":"/agent-config/mem","permission":"agent-config:write","deprecated":true,"pathParams":[]},
|
|
485
|
+
{"id":"agentConfig.bootstrap.show","group":"agent-config","summary":"Read bootstrap state.","cli":"dench bootstrap status","method":"GET","path":"/agent-config/bootstrap","permission":"agent-config:read","deprecated":true,"pathParams":[]},
|
|
486
|
+
{"id":"agentConfig.bootstrap.complete","group":"agent-config","summary":"Complete bootstrap.","cli":"dench bootstrap complete","method":"POST","path":"/agent-config/bootstrap/complete","permission":"agent-config:write","deprecated":true,"pathParams":[]},
|
|
487
|
+
{"id":"agentConfig.bootstrap.template","group":"agent-config","summary":"Update bootstrap template.","cli":"dench bootstrap template","method":"PUT","path":"/agent-config/bootstrap/template","permission":"agent-config:write","deprecated":true,"pathParams":[]},
|
|
474
488
|
{"id":"agentConfig.model.default","group":"agent-config","summary":"Set the default chat model.","cli":"dench model default","method":"PUT","path":"/agent-config/model/default","permission":"agent-config:write","pathParams":[]},
|
|
475
489
|
{"id":"agentConfig.model.thread","group":"agent-config","summary":"Set a thread model override.","cli":"dench model thread","method":"PUT","path":"/agent-config/model/threads/{threadId}","permission":"agent-config:write","pathParams":["threadId"]},
|
|
476
|
-
{"id":"agentConfig.daily.today","group":"agent-config","summary":"Read today's daily activity path.","cli":"dench daily today","method":"GET","path":"/agent-config/daily/today","permission":"agent-config:read","pathParams":[]},
|
|
477
|
-
{"id":"agentConfig.daily.show","group":"agent-config","summary":"Read a daily activity path.","cli":"dench daily show","method":"GET","path":"/agent-config/daily/{date}","permission":"agent-config:read","pathParams":["date"]},
|
|
490
|
+
{"id":"agentConfig.daily.today","group":"agent-config","summary":"Read today's daily activity path.","cli":"dench daily today","method":"GET","path":"/agent-config/daily/today","permission":"agent-config:read","deprecated":true,"pathParams":[]},
|
|
491
|
+
{"id":"agentConfig.daily.show","group":"agent-config","summary":"Read a daily activity path.","cli":"dench daily show","method":"GET","path":"/agent-config/daily/{date}","permission":"agent-config:read","deprecated":true,"pathParams":["date"]},
|
|
478
492
|
{"id":"notifications.list","group":"notifications","summary":"List your notifications (inbox, unread, archived, or all).","cli":"dench notifications list","method":"GET","path":"/notifications","permission":"notifications:read","pathParams":[]},
|
|
479
493
|
{"id":"notifications.unreadCount","group":"notifications","summary":"How many unread notifications you have.","cli":"dench notifications count","method":"GET","path":"/notifications/unread-count","permission":"notifications:read","pathParams":[]},
|
|
480
494
|
{"id":"notifications.read","group":"notifications","summary":"Mark a notification read (or unread).","cli":"dench notifications read","method":"PATCH","path":"/notifications/{notificationId}","permission":"notifications:write","pathParams":["notificationId"]},
|
|
@@ -487,7 +501,7 @@ export const APP_SDK_OPERATIONS: readonly AppSdkOperationInfo[] = [
|
|
|
487
501
|
];
|
|
488
502
|
|
|
489
503
|
/** CLI-only operation ids (sessions, fs, imports): never callable from an app. */
|
|
490
|
-
export const APP_SDK_LOCAL_OPERATIONS: readonly string[] = ["sessions.local.list","sessions.local.use","sessions.local.logout","backend.local.configure","enrichment.filters.options","crm.import","crm.export","meetings.import","fs.daemon","apps.validate"];
|
|
504
|
+
export const APP_SDK_LOCAL_OPERATIONS: readonly string[] = ["environments.run","sessions.local.list","sessions.local.use","sessions.local.logout","backend.local.configure","enrichment.filters.options","crm.import","crm.export","meetings.import","fs.daemon","apps.validate"];
|
|
491
505
|
|
|
492
506
|
/** Curated window.dench methods → permission (host + aliases). */
|
|
493
507
|
export const APP_SDK_METHODS: Readonly<Record<string, AppSdkMethodInfo>> = {
|
package/lib/command-args.ts
CHANGED
|
@@ -51,6 +51,17 @@ export const COMMAND_ARGUMENTS = [
|
|
|
51
51
|
spec("use", [1, 1]),
|
|
52
52
|
spec("backend set", [1, 1]),
|
|
53
53
|
spec("backend clear", [0, 0]),
|
|
54
|
+
spec("env list", [0, 0], "--limit --cursor"),
|
|
55
|
+
spec("env show", [1, 1], "--revision"),
|
|
56
|
+
spec("env save", [1, 1], "--path --wait", "--no-wait"),
|
|
57
|
+
spec("env run", [1, 1], "--revision --state-key", "--prepare-local"),
|
|
58
|
+
spec("env delete", [1, 1]),
|
|
59
|
+
spec("secrets set", [1, 1], "--file --kind --expected-version", "--stdin"),
|
|
60
|
+
spec("secrets list", [0, 0]),
|
|
61
|
+
spec("secrets delete", [1, 1], "--expected-version"),
|
|
62
|
+
...["identity", "organisation", "user", "tools", "rules"].map((section) =>
|
|
63
|
+
spec(`context set ${section}`, [0, 0], "--content", "--stdin"),
|
|
64
|
+
),
|
|
54
65
|
...["install", "uninstall", "refresh"].map((verb) =>
|
|
55
66
|
spec(
|
|
56
67
|
`ads ${verb}`,
|
|
@@ -80,7 +91,7 @@ export const COMMAND_ARGUMENTS = [
|
|
|
80
91
|
spec(
|
|
81
92
|
"chat new",
|
|
82
93
|
[1, null],
|
|
83
|
-
"--model --file-context --visibility --title",
|
|
94
|
+
"--model --file-context --visibility --title --environment",
|
|
84
95
|
"--yolo --follow",
|
|
85
96
|
),
|
|
86
97
|
spec("chat send", [2, null], "--model", "--yolo --follow"),
|
|
@@ -113,13 +124,14 @@ export const COMMAND_ARGUMENTS = [
|
|
|
113
124
|
spec(
|
|
114
125
|
"cron create",
|
|
115
126
|
[1, 1],
|
|
116
|
-
"--prompt --description --overlap --target --type --at --cron --tz --every --every-ms --connection --event --toolkit --trigger-config --object --where --where-logic",
|
|
127
|
+
"--prompt --description --overlap --target --type --at --cron --tz --every --every-ms --connection --event --toolkit --trigger-config --object --where --where-logic --environment",
|
|
117
128
|
"--disabled --delete-after-run --no-secret --signed",
|
|
118
129
|
),
|
|
119
130
|
spec(
|
|
120
131
|
"cron update",
|
|
121
132
|
[1, 1],
|
|
122
|
-
"--name --prompt --description --overlap --enabled --at --cron --tz --every --every-ms",
|
|
133
|
+
"--name --prompt --description --overlap --enabled --at --cron --tz --every --every-ms --environment",
|
|
134
|
+
"--clear-environment",
|
|
123
135
|
),
|
|
124
136
|
spec("cron run", [1, 1], "", "--wait"),
|
|
125
137
|
spec("cron secret", [1, 1], "", "--off"),
|
|
@@ -189,7 +201,10 @@ export const COMMAND_ARGUMENTS = [
|
|
|
189
201
|
];
|
|
190
202
|
|
|
191
203
|
export function assertDeclaredCommandFlags(argv: readonly string[]): void {
|
|
192
|
-
const
|
|
204
|
+
const boundary = argv.indexOf("--");
|
|
205
|
+
const args = argv
|
|
206
|
+
.slice(0, boundary < 0 ? undefined : boundary)
|
|
207
|
+
.filter((arg) => arg !== "--json");
|
|
193
208
|
if (["routine", "routines"].includes(args[0])) args[0] = "cron";
|
|
194
209
|
if (["ad", "adline"].includes(args[0])) args[0] = "ads";
|
|
195
210
|
if (args[0] === "agent" && ["new", "send"].includes(args[1]))
|
package/lib/command-help.ts
CHANGED
|
@@ -37,8 +37,23 @@ export function commandHelp(argv: readonly string[], usageText = ""): string {
|
|
|
37
37
|
description: "",
|
|
38
38
|
})),
|
|
39
39
|
...apiOperations
|
|
40
|
-
.filter((op) =>
|
|
41
|
-
|
|
40
|
+
.filter((op) => {
|
|
41
|
+
if (!op.deprecated) return true;
|
|
42
|
+
// Keep exact legacy leaf help available without adding those commands
|
|
43
|
+
// back to the broad index or a parent family's discovery.
|
|
44
|
+
const command = words(op.cli);
|
|
45
|
+
return (
|
|
46
|
+
command.length > 1 &&
|
|
47
|
+
input.length >= command.length &&
|
|
48
|
+
matches(input.slice(0, command.length), command)
|
|
49
|
+
);
|
|
50
|
+
})
|
|
51
|
+
.map((op) => ({
|
|
52
|
+
usage: op.cli,
|
|
53
|
+
description: op.deprecated
|
|
54
|
+
? `Compatibility command. ${op.summary}`
|
|
55
|
+
: op.summary,
|
|
56
|
+
})),
|
|
42
57
|
];
|
|
43
58
|
let prefix = input;
|
|
44
59
|
while (
|
package/lib/command-registry.ts
CHANGED
|
@@ -137,6 +137,190 @@ function local(reason: string): LocalOnlyOperation {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
const rawApiOperations = [
|
|
140
|
+
op({
|
|
141
|
+
id: "environments.list",
|
|
142
|
+
group: "environments",
|
|
143
|
+
summary:
|
|
144
|
+
"List workspace-shared reusable setups and ready revisions (metadata only).",
|
|
145
|
+
cli: "dench env list",
|
|
146
|
+
method: "GET",
|
|
147
|
+
path: "/environments",
|
|
148
|
+
requestSchema: z
|
|
149
|
+
.object({
|
|
150
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
151
|
+
cursor: z.string().optional(),
|
|
152
|
+
})
|
|
153
|
+
.strict(),
|
|
154
|
+
responseSchema: anyResponse,
|
|
155
|
+
backend: convex("query", "functions/environments:list"),
|
|
156
|
+
}),
|
|
157
|
+
op({
|
|
158
|
+
id: "environments.get",
|
|
159
|
+
group: "environments",
|
|
160
|
+
summary:
|
|
161
|
+
"Inspect a saved setup, its manifest, and an optional immutable revision.",
|
|
162
|
+
cli: "dench env show",
|
|
163
|
+
method: "GET",
|
|
164
|
+
path: "/environments/{name}",
|
|
165
|
+
requestSchema: z
|
|
166
|
+
.object({
|
|
167
|
+
name: z.string().regex(/^[a-z][a-z0-9-]{0,63}$/),
|
|
168
|
+
revision: z
|
|
169
|
+
.string()
|
|
170
|
+
.regex(/^[a-f0-9]{64}$/)
|
|
171
|
+
.optional(),
|
|
172
|
+
})
|
|
173
|
+
.strict(),
|
|
174
|
+
responseSchema: anyResponse,
|
|
175
|
+
backend: convex("query", "functions/environments:get"),
|
|
176
|
+
}),
|
|
177
|
+
op({
|
|
178
|
+
id: "environments.upload",
|
|
179
|
+
group: "environments",
|
|
180
|
+
summary:
|
|
181
|
+
"Reserve an owner-bound source upload. Prefix the uploaded bytes with the returned proof before saving.",
|
|
182
|
+
cli: "dench env save",
|
|
183
|
+
method: "POST",
|
|
184
|
+
path: "/environments/uploads",
|
|
185
|
+
requestSchema: z
|
|
186
|
+
.object({
|
|
187
|
+
kind: z.literal("source"),
|
|
188
|
+
size: z.number().int().min(1).max(16777216),
|
|
189
|
+
sha256: z.string().regex(/^[a-f0-9]{64}$/),
|
|
190
|
+
})
|
|
191
|
+
.strict(),
|
|
192
|
+
responseSchema: anyResponse,
|
|
193
|
+
backend: convex("mutation", "functions/environments:requestUpload"),
|
|
194
|
+
}),
|
|
195
|
+
op({
|
|
196
|
+
id: "environments.save",
|
|
197
|
+
group: "environments",
|
|
198
|
+
summary:
|
|
199
|
+
"Publish an explicitly saved source and manifest for one-time preparation. Returns pending/building until verified; does not run the task.",
|
|
200
|
+
cli: "dench env save",
|
|
201
|
+
method: "POST",
|
|
202
|
+
path: "/environments/{name}",
|
|
203
|
+
requestSchema: z
|
|
204
|
+
.object({
|
|
205
|
+
name: z.string().regex(/^[a-z][a-z0-9-]{0,63}$/),
|
|
206
|
+
manifest: z
|
|
207
|
+
.object({
|
|
208
|
+
version: z.literal(1),
|
|
209
|
+
name: z.string(),
|
|
210
|
+
purpose: z.string(),
|
|
211
|
+
files: z.array(z.string()),
|
|
212
|
+
prepare: z.array(z.string()),
|
|
213
|
+
verify: z.array(z.string()),
|
|
214
|
+
env: z.record(z.string(), z.string()).optional(),
|
|
215
|
+
secretEnv: z.record(z.string(), z.string()).optional(),
|
|
216
|
+
secretFiles: z
|
|
217
|
+
.array(
|
|
218
|
+
z.object({
|
|
219
|
+
path: z.string(),
|
|
220
|
+
secret: z.string(),
|
|
221
|
+
mutable: z.boolean().optional(),
|
|
222
|
+
}),
|
|
223
|
+
)
|
|
224
|
+
.optional(),
|
|
225
|
+
statePaths: z.array(z.string()).optional(),
|
|
226
|
+
portable: z.boolean().optional(),
|
|
227
|
+
})
|
|
228
|
+
.strict(),
|
|
229
|
+
uploadId: z.string(),
|
|
230
|
+
storageId: z.string(),
|
|
231
|
+
sha256: z.string().regex(/^[a-f0-9]{64}$/),
|
|
232
|
+
})
|
|
233
|
+
.strict(),
|
|
234
|
+
responseSchema: anyResponse,
|
|
235
|
+
backend: convex("action", "functions/environmentsNode:save"),
|
|
236
|
+
}),
|
|
237
|
+
op({
|
|
238
|
+
id: "environments.delete",
|
|
239
|
+
group: "environments",
|
|
240
|
+
summary:
|
|
241
|
+
"Retire a saved setup from new selection; retain immutable revisions and active job evidence.",
|
|
242
|
+
cli: "dench env delete",
|
|
243
|
+
method: "DELETE",
|
|
244
|
+
path: "/environments/{name}",
|
|
245
|
+
requestSchema: z
|
|
246
|
+
.object({ name: z.string().regex(/^[a-z][a-z0-9-]{0,63}$/) })
|
|
247
|
+
.strict(),
|
|
248
|
+
responseSchema: anyResponse,
|
|
249
|
+
backend: convex("mutation", "functions/environments:remove"),
|
|
250
|
+
}),
|
|
251
|
+
op({
|
|
252
|
+
id: "environments.run",
|
|
253
|
+
group: "environments",
|
|
254
|
+
summary:
|
|
255
|
+
"Run a command with prepared dependencies and declared credentials, saving declared state with a revision check.",
|
|
256
|
+
cli: "dench env run",
|
|
257
|
+
method: "POST",
|
|
258
|
+
path: "/local/environments/run",
|
|
259
|
+
requestSchema: noBody,
|
|
260
|
+
responseSchema: anyResponse,
|
|
261
|
+
backend: local(
|
|
262
|
+
"Execution occurs in the CLI process. Use dench env run NAME -- COMMAND; secret-bearing execution resolution is not a general REST read endpoint.",
|
|
263
|
+
),
|
|
264
|
+
}),
|
|
265
|
+
op({
|
|
266
|
+
id: "secrets.list",
|
|
267
|
+
group: "secrets",
|
|
268
|
+
summary:
|
|
269
|
+
"List workspace-shared credential names, kinds and versions; never values.",
|
|
270
|
+
cli: "dench secrets list",
|
|
271
|
+
method: "GET",
|
|
272
|
+
path: "/secrets",
|
|
273
|
+
requestSchema: z
|
|
274
|
+
.object({
|
|
275
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
276
|
+
cursor: z.string().optional(),
|
|
277
|
+
})
|
|
278
|
+
.strict(),
|
|
279
|
+
responseSchema: anyResponse,
|
|
280
|
+
backend: convex("query", "functions/workspaceSecrets:list"),
|
|
281
|
+
}),
|
|
282
|
+
op({
|
|
283
|
+
id: "secrets.set",
|
|
284
|
+
group: "secrets",
|
|
285
|
+
summary:
|
|
286
|
+
"Encrypt a workspace credential. Use CLI stdin or the secure chat form; return metadata only. Do not put values in chat, manifests or scripts.",
|
|
287
|
+
cli: "dench secrets set",
|
|
288
|
+
method: "PUT",
|
|
289
|
+
path: "/secrets/{name}",
|
|
290
|
+
requestSchema: z
|
|
291
|
+
.object({
|
|
292
|
+
name: z.string().regex(/^[A-Z][A-Z0-9_]{0,127}$/),
|
|
293
|
+
kind: z.enum(["env", "file"]),
|
|
294
|
+
value: z.string().min(1).max(65536),
|
|
295
|
+
expectedVersion: z.number().int().nonnegative().optional(),
|
|
296
|
+
})
|
|
297
|
+
.strict(),
|
|
298
|
+
responseSchema: z.object({
|
|
299
|
+
name: z.string(),
|
|
300
|
+
kind: z.enum(["env", "file"]),
|
|
301
|
+
version: z.number(),
|
|
302
|
+
revision: z.number(),
|
|
303
|
+
status: z.literal("stored"),
|
|
304
|
+
}),
|
|
305
|
+
backend: convex("action", "functions/workspaceSecretsNode:set"),
|
|
306
|
+
}),
|
|
307
|
+
op({
|
|
308
|
+
id: "secrets.delete",
|
|
309
|
+
group: "secrets",
|
|
310
|
+
summary:
|
|
311
|
+
"Revoke a workspace credential for future resolution, optionally checking its version.",
|
|
312
|
+
cli: "dench secrets delete",
|
|
313
|
+
method: "DELETE",
|
|
314
|
+
path: "/secrets/{name}",
|
|
315
|
+
requestSchema: z
|
|
316
|
+
.object({
|
|
317
|
+
name: z.string().regex(/^[A-Z][A-Z0-9_]{0,127}$/),
|
|
318
|
+
expectedVersion: z.number().int().nonnegative().optional(),
|
|
319
|
+
})
|
|
320
|
+
.strict(),
|
|
321
|
+
responseSchema: anyResponse,
|
|
322
|
+
backend: convex("mutation", "functions/workspaceSecrets:remove"),
|
|
323
|
+
}),
|
|
140
324
|
op({
|
|
141
325
|
id: "campaigns.drafts.create",
|
|
142
326
|
group: "campaigns",
|
|
@@ -5134,7 +5318,8 @@ const rawApiOperations = [
|
|
|
5134
5318
|
id: "agentConfig.identity.show",
|
|
5135
5319
|
group: "agent-config",
|
|
5136
5320
|
summary: "Read IDENTITY.md.",
|
|
5137
|
-
cli: "dench identity
|
|
5321
|
+
cli: "dench context --sections identity",
|
|
5322
|
+
aliases: ["dench identity show"],
|
|
5138
5323
|
method: "GET",
|
|
5139
5324
|
path: "/agent-config/identity",
|
|
5140
5325
|
requestSchema: noBody,
|
|
@@ -5145,7 +5330,8 @@ const rawApiOperations = [
|
|
|
5145
5330
|
id: "agentConfig.identity.edit",
|
|
5146
5331
|
group: "agent-config",
|
|
5147
5332
|
summary: "Update IDENTITY.md.",
|
|
5148
|
-
cli: "dench identity
|
|
5333
|
+
cli: "dench context set identity",
|
|
5334
|
+
aliases: ["dench identity edit"],
|
|
5149
5335
|
method: "PUT",
|
|
5150
5336
|
path: "/agent-config/identity",
|
|
5151
5337
|
requestSchema: anyObject,
|
|
@@ -5156,7 +5342,8 @@ const rawApiOperations = [
|
|
|
5156
5342
|
id: "agentConfig.organisation.show",
|
|
5157
5343
|
group: "agent-config",
|
|
5158
5344
|
summary: "Read ORGANISATION.md.",
|
|
5159
|
-
cli: "dench organisation
|
|
5345
|
+
cli: "dench context --sections organisation",
|
|
5346
|
+
aliases: ["dench organisation show"],
|
|
5160
5347
|
method: "GET",
|
|
5161
5348
|
path: "/agent-config/organisation",
|
|
5162
5349
|
requestSchema: noBody,
|
|
@@ -5167,7 +5354,8 @@ const rawApiOperations = [
|
|
|
5167
5354
|
id: "agentConfig.organisation.edit",
|
|
5168
5355
|
group: "agent-config",
|
|
5169
5356
|
summary: "Update ORGANISATION.md.",
|
|
5170
|
-
cli: "dench organisation
|
|
5357
|
+
cli: "dench context set organisation",
|
|
5358
|
+
aliases: ["dench organisation edit"],
|
|
5171
5359
|
method: "PUT",
|
|
5172
5360
|
path: "/agent-config/organisation",
|
|
5173
5361
|
requestSchema: anyObject,
|
|
@@ -5178,7 +5366,8 @@ const rawApiOperations = [
|
|
|
5178
5366
|
id: "agentConfig.user.show",
|
|
5179
5367
|
group: "agent-config",
|
|
5180
5368
|
summary: "Read USER.md.",
|
|
5181
|
-
cli: "dench user
|
|
5369
|
+
cli: "dench context --sections user",
|
|
5370
|
+
aliases: ["dench user show"],
|
|
5182
5371
|
method: "GET",
|
|
5183
5372
|
path: "/agent-config/user",
|
|
5184
5373
|
requestSchema: noBody,
|
|
@@ -5189,7 +5378,8 @@ const rawApiOperations = [
|
|
|
5189
5378
|
id: "agentConfig.user.edit",
|
|
5190
5379
|
group: "agent-config",
|
|
5191
5380
|
summary: "Update USER.md.",
|
|
5192
|
-
cli: "dench user
|
|
5381
|
+
cli: "dench context set user",
|
|
5382
|
+
aliases: ["dench user edit"],
|
|
5193
5383
|
method: "PUT",
|
|
5194
5384
|
path: "/agent-config/user",
|
|
5195
5385
|
requestSchema: anyObject,
|
|
@@ -5200,7 +5390,8 @@ const rawApiOperations = [
|
|
|
5200
5390
|
id: "agentConfig.tools.show",
|
|
5201
5391
|
group: "agent-config",
|
|
5202
5392
|
summary: "Read tool notes.",
|
|
5203
|
-
cli: "dench tools
|
|
5393
|
+
cli: "dench context --sections tools",
|
|
5394
|
+
aliases: ["dench tools show"],
|
|
5204
5395
|
method: "GET",
|
|
5205
5396
|
path: "/agent-config/tools",
|
|
5206
5397
|
requestSchema: noBody,
|
|
@@ -5211,15 +5402,32 @@ const rawApiOperations = [
|
|
|
5211
5402
|
id: "agentConfig.tools.edit",
|
|
5212
5403
|
group: "agent-config",
|
|
5213
5404
|
summary: "Update tool notes.",
|
|
5214
|
-
cli: "dench tools
|
|
5405
|
+
cli: "dench context set tools",
|
|
5406
|
+
aliases: ["dench tools edit"],
|
|
5215
5407
|
method: "PUT",
|
|
5216
5408
|
path: "/agent-config/tools",
|
|
5217
5409
|
requestSchema: anyObject,
|
|
5218
5410
|
responseSchema: anyResponse,
|
|
5219
5411
|
backend: convex("mutation", "functions/agentConfig:updateToolsNotes"),
|
|
5220
5412
|
}),
|
|
5413
|
+
op({
|
|
5414
|
+
id: "workspace.context.rules.set",
|
|
5415
|
+
group: "workspace",
|
|
5416
|
+
summary:
|
|
5417
|
+
"Update standing workspace rules; credentials belong in secrets and runnable setup in environments.",
|
|
5418
|
+
cli: "dench context set rules",
|
|
5419
|
+
method: "PUT",
|
|
5420
|
+
path: "/context/rules",
|
|
5421
|
+
requestSchema: z.object({ content: z.string().min(1).max(32000) }).strict(),
|
|
5422
|
+
responseSchema: anyResponse,
|
|
5423
|
+
backend: {
|
|
5424
|
+
...convex("mutation", "functions/agentConfig:writeMagicFileFromUI"),
|
|
5425
|
+
fixedArgs: { path: "/RULES.md" },
|
|
5426
|
+
},
|
|
5427
|
+
}),
|
|
5221
5428
|
op({
|
|
5222
5429
|
id: "agentConfig.mem.show",
|
|
5430
|
+
deprecated: true,
|
|
5223
5431
|
group: "agent-config",
|
|
5224
5432
|
summary: "Read aggregate memory.",
|
|
5225
5433
|
cli: "dench mem show",
|
|
@@ -5231,6 +5439,7 @@ const rawApiOperations = [
|
|
|
5231
5439
|
}),
|
|
5232
5440
|
op({
|
|
5233
5441
|
id: "agentConfig.mem.edit",
|
|
5442
|
+
deprecated: true,
|
|
5234
5443
|
group: "agent-config",
|
|
5235
5444
|
summary: "Update aggregate memory.",
|
|
5236
5445
|
cli: "dench mem set",
|
|
@@ -5242,6 +5451,7 @@ const rawApiOperations = [
|
|
|
5242
5451
|
}),
|
|
5243
5452
|
op({
|
|
5244
5453
|
id: "agentConfig.bootstrap.show",
|
|
5454
|
+
deprecated: true,
|
|
5245
5455
|
group: "agent-config",
|
|
5246
5456
|
summary: "Read bootstrap state.",
|
|
5247
5457
|
cli: "dench bootstrap status",
|
|
@@ -5253,6 +5463,7 @@ const rawApiOperations = [
|
|
|
5253
5463
|
}),
|
|
5254
5464
|
op({
|
|
5255
5465
|
id: "agentConfig.bootstrap.complete",
|
|
5466
|
+
deprecated: true,
|
|
5256
5467
|
group: "agent-config",
|
|
5257
5468
|
summary: "Complete bootstrap.",
|
|
5258
5469
|
cli: "dench bootstrap complete",
|
|
@@ -5264,6 +5475,7 @@ const rawApiOperations = [
|
|
|
5264
5475
|
}),
|
|
5265
5476
|
op({
|
|
5266
5477
|
id: "agentConfig.bootstrap.template",
|
|
5478
|
+
deprecated: true,
|
|
5267
5479
|
group: "agent-config",
|
|
5268
5480
|
summary: "Update bootstrap template.",
|
|
5269
5481
|
cli: "dench bootstrap template",
|
|
@@ -5300,6 +5512,7 @@ const rawApiOperations = [
|
|
|
5300
5512
|
}),
|
|
5301
5513
|
op({
|
|
5302
5514
|
id: "agentConfig.daily.today",
|
|
5515
|
+
deprecated: true,
|
|
5303
5516
|
group: "agent-config",
|
|
5304
5517
|
summary: "Read today's daily activity path.",
|
|
5305
5518
|
cli: "dench daily today",
|
|
@@ -5311,6 +5524,7 @@ const rawApiOperations = [
|
|
|
5311
5524
|
}),
|
|
5312
5525
|
op({
|
|
5313
5526
|
id: "agentConfig.daily.show",
|
|
5527
|
+
deprecated: true,
|
|
5314
5528
|
group: "agent-config",
|
|
5315
5529
|
summary: "Read a daily activity path.",
|
|
5316
5530
|
cli: "dench daily show",
|