@intentic/sandbox-contract 1.245.0 → 1.247.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/README.md +17 -1
- package/dist/batch-runs.d.ts +2 -0
- package/dist/batch-runs.d.ts.map +1 -1
- package/dist/batch-runs.js +1 -0
- package/dist/batch-runs.js.map +1 -1
- package/dist/command-classes.d.ts +6 -3
- package/dist/command-classes.d.ts.map +1 -1
- package/dist/command-classes.js +43 -18
- package/dist/command-classes.js.map +1 -1
- package/dist/contracts/{cursor.contract.d.ts → accounts.contract.d.ts} +102 -3
- package/dist/contracts/accounts.contract.d.ts.map +1 -0
- package/dist/contracts/accounts.contract.js +61 -0
- package/dist/contracts/accounts.contract.js.map +1 -0
- package/dist/contracts/agent.contract.d.ts +19 -0
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.d.ts +121 -0
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.js +4 -4
- package/dist/contracts/agents.contract.js.map +1 -1
- package/dist/contracts/ci.contract.d.ts +2 -0
- package/dist/contracts/ci.contract.d.ts.map +1 -1
- package/dist/contracts/host.contract.d.ts +35 -0
- package/dist/contracts/host.contract.d.ts.map +1 -1
- package/dist/contracts/host.contract.js +3 -2
- package/dist/contracts/host.contract.js.map +1 -1
- package/dist/contracts/personas.contract.d.ts +4 -2
- package/dist/contracts/personas.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.d.ts +2 -2
- package/dist/contracts/settings.contract.d.ts +58 -20
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.d.ts +80 -30
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +26 -17
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/contracts/usage.contract.d.ts +22 -0
- package/dist/contracts/usage.contract.d.ts.map +1 -1
- package/dist/contracts/usage.contract.js +19 -0
- package/dist/contracts/usage.contract.js.map +1 -1
- package/dist/definition.d.ts +20 -28
- package/dist/definition.d.ts.map +1 -1
- package/dist/documents.d.ts +0 -1
- package/dist/documents.d.ts.map +1 -1
- package/dist/documents.js +1 -2
- package/dist/documents.js.map +1 -1
- package/dist/embed.d.ts +23 -0
- package/dist/embed.d.ts.map +1 -0
- package/dist/embed.js +84 -0
- package/dist/embed.js.map +1 -0
- package/dist/events.d.ts +21 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +5 -2
- package/dist/events.js.map +1 -1
- package/dist/fast-tier.js +1 -1
- package/dist/fast-tier.js.map +1 -1
- package/dist/history-state.d.ts.map +1 -1
- package/dist/history-state.js +2 -0
- package/dist/history-state.js.map +1 -1
- package/dist/index.d.ts +453 -306
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -15
- package/dist/index.js.map +1 -1
- package/dist/model-pins.d.ts +17 -0
- package/dist/model-pins.d.ts.map +1 -0
- package/dist/{quick-model.js → model-pins.js} +18 -11
- package/dist/model-pins.js.map +1 -0
- package/dist/model-roles.d.ts +144 -0
- package/dist/model-roles.d.ts.map +1 -0
- package/dist/model-roles.js +129 -0
- package/dist/model-roles.js.map +1 -0
- package/dist/peer-dial.d.ts +33 -0
- package/dist/peer-dial.d.ts.map +1 -0
- package/dist/peer-dial.js +79 -0
- package/dist/peer-dial.js.map +1 -0
- package/dist/peer-mcp-server.d.ts +36 -0
- package/dist/peer-mcp-server.d.ts.map +1 -0
- package/dist/peer-mcp-server.js +71 -0
- package/dist/peer-mcp-server.js.map +1 -0
- package/dist/provider-specs.d.ts +38 -20
- package/dist/provider-specs.d.ts.map +1 -1
- package/dist/provider-specs.js +39 -13
- package/dist/provider-specs.js.map +1 -1
- package/dist/runtime-state.d.ts +1 -1
- package/dist/runtime-state.js +1 -1
- package/dist/runtime-state.js.map +1 -1
- package/dist/safety-policy.d.ts +12 -3
- package/dist/safety-policy.d.ts.map +1 -1
- package/dist/safety-policy.js +30 -5
- package/dist/safety-policy.js.map +1 -1
- package/dist/schemas/agent.d.ts +27 -8
- package/dist/schemas/agent.d.ts.map +1 -1
- package/dist/schemas/agent.js +10 -4
- package/dist/schemas/agent.js.map +1 -1
- package/dist/schemas/agents.d.ts +42 -0
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/agents.js +25 -4
- package/dist/schemas/agents.js.map +1 -1
- package/dist/schemas/automations.d.ts +11 -2
- package/dist/schemas/automations.d.ts.map +1 -1
- package/dist/schemas/automations.js +1 -1
- package/dist/schemas/automations.js.map +1 -1
- package/dist/schemas/ci.d.ts +6 -0
- package/dist/schemas/ci.d.ts.map +1 -1
- package/dist/schemas/ci.js +3 -2
- package/dist/schemas/ci.js.map +1 -1
- package/dist/schemas/context.d.ts +30 -0
- package/dist/schemas/context.d.ts.map +1 -0
- package/dist/schemas/context.js +34 -0
- package/dist/schemas/context.js.map +1 -0
- package/dist/schemas/{computers.d.ts → devices.d.ts} +154 -60
- package/dist/schemas/devices.d.ts.map +1 -0
- package/dist/schemas/devices.js +157 -0
- package/dist/schemas/devices.js.map +1 -0
- package/dist/schemas/hosts.d.ts +12 -0
- package/dist/schemas/hosts.d.ts.map +1 -1
- package/dist/schemas/hosts.js +1 -0
- package/dist/schemas/hosts.js.map +1 -1
- package/dist/schemas/issues.d.ts +0 -5
- package/dist/schemas/issues.d.ts.map +1 -1
- package/dist/schemas/issues.js +0 -1
- package/dist/schemas/issues.js.map +1 -1
- package/dist/schemas/personas.d.ts +5 -3
- package/dist/schemas/personas.d.ts.map +1 -1
- package/dist/schemas/personas.js +3 -2
- package/dist/schemas/personas.js.map +1 -1
- package/dist/schemas/plan-limits.d.ts +20 -0
- package/dist/schemas/plan-limits.d.ts.map +1 -1
- package/dist/schemas/plan-limits.js +21 -0
- package/dist/schemas/plan-limits.js.map +1 -1
- package/dist/schemas/provider-oauth.d.ts +48 -16
- package/dist/schemas/provider-oauth.d.ts.map +1 -1
- package/dist/schemas/provider-oauth.js +22 -20
- package/dist/schemas/provider-oauth.js.map +1 -1
- package/dist/schemas/settings.d.ts +42 -16
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +22 -28
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/terminal.js +9 -9
- package/dist/schemas/terminal.js.map +1 -1
- package/dist/schemas/usage.d.ts +5 -2
- package/dist/schemas/usage.d.ts.map +1 -1
- package/dist/schemas/usage.js +5 -2
- package/dist/schemas/usage.js.map +1 -1
- package/dist/shell-regions.d.ts +4 -0
- package/dist/shell-regions.d.ts.map +1 -0
- package/dist/shell-regions.js +156 -0
- package/dist/shell-regions.js.map +1 -0
- package/dist/workspace-state.d.ts +8 -0
- package/dist/workspace-state.d.ts.map +1 -1
- package/dist/workspace-state.js +13 -5
- package/dist/workspace-state.js.map +1 -1
- package/package.json +37 -4
- package/src/agent-catalog.ts +2 -2
- package/src/arrival.ts +3 -3
- package/src/batch-runs.test.ts +10 -5
- package/src/batch-runs.ts +10 -3
- package/src/command-classes.test.ts +195 -71
- package/src/command-classes.ts +148 -46
- package/src/contracts/accounts.contract.ts +94 -0
- package/src/contracts/agents.contract.ts +4 -3
- package/src/contracts/exit.contract.ts +2 -2
- package/src/contracts/host.contract.ts +17 -5
- package/src/contracts/settings.contract.ts +1 -1
- package/src/contracts/system.contract.ts +43 -24
- package/src/contracts/usage.contract.ts +31 -0
- package/src/contracts/vpn.contract.ts +2 -2
- package/src/documents.test.ts +2 -1
- package/src/documents.ts +7 -11
- package/src/embed.test.ts +68 -0
- package/src/embed.ts +164 -0
- package/src/events.ts +31 -4
- package/src/fast-tier.test.ts +1 -1
- package/src/fast-tier.ts +5 -5
- package/src/history-state.ts +12 -3
- package/src/host-protocol.ts +2 -2
- package/src/index.ts +8 -16
- package/src/model-order.ts +1 -1
- package/src/{quick-model.test.ts → model-pins.test.ts} +73 -29
- package/src/model-pins.ts +183 -0
- package/src/model-roles.ts +224 -0
- package/src/peer-dial.test.ts +203 -0
- package/src/peer-dial.ts +163 -0
- package/src/peer-mcp-server.test.ts +104 -0
- package/src/peer-mcp-server.ts +144 -0
- package/src/plan-pools.ts +1 -1
- package/src/prompt-complexity.test.ts +1 -1
- package/src/prompt-complexity.ts +2 -2
- package/src/provider-specs.test.ts +45 -18
- package/src/provider-specs.ts +147 -67
- package/src/routes.test.ts +6 -3
- package/src/runner-protocol.ts +1 -1
- package/src/runtime-state.ts +2 -2
- package/src/safety-policy.test.ts +88 -0
- package/src/safety-policy.ts +84 -14
- package/src/schemas/agent.ts +83 -30
- package/src/schemas/agents.ts +67 -6
- package/src/schemas/automations.ts +6 -4
- package/src/schemas/capabilities.ts +4 -4
- package/src/schemas/ci.ts +23 -6
- package/src/schemas/context.ts +87 -0
- package/src/schemas/{computers.ts → devices.ts} +190 -107
- package/src/schemas/hosts.ts +5 -1
- package/src/schemas/issues.ts +0 -4
- package/src/schemas/personas.ts +8 -3
- package/src/schemas/plan-limits.ts +50 -0
- package/src/schemas/provider-oauth.ts +49 -52
- package/src/schemas/settings.ts +105 -140
- package/src/schemas/terminal.ts +12 -12
- package/src/schemas/usage.ts +62 -27
- package/src/schemas/version-seam.test.ts +0 -1
- package/src/shell-regions.ts +289 -0
- package/src/versions.ts +2 -2
- package/src/webext-links.ts +2 -2
- package/src/webext-protocol.ts +2 -2
- package/src/workspace-state.test.ts +48 -1
- package/src/workspace-state.ts +48 -11
- package/dist/agent-run-model.d.ts +0 -4
- package/dist/agent-run-model.d.ts.map +0 -1
- package/dist/agent-run-model.js +0 -13
- package/dist/agent-run-model.js.map +0 -1
- package/dist/contracts/claude.contract.d.ts +0 -91
- package/dist/contracts/claude.contract.d.ts.map +0 -1
- package/dist/contracts/claude.contract.js +0 -50
- package/dist/contracts/claude.contract.js.map +0 -1
- package/dist/contracts/cursor.contract.d.ts.map +0 -1
- package/dist/contracts/cursor.contract.js +0 -50
- package/dist/contracts/cursor.contract.js.map +0 -1
- package/dist/contracts/grok.contract.d.ts +0 -36
- package/dist/contracts/grok.contract.d.ts.map +0 -1
- package/dist/contracts/grok.contract.js +0 -31
- package/dist/contracts/grok.contract.js.map +0 -1
- package/dist/contracts/keys.contract.d.ts +0 -81
- package/dist/contracts/keys.contract.d.ts.map +0 -1
- package/dist/contracts/keys.contract.js +0 -51
- package/dist/contracts/keys.contract.js.map +0 -1
- package/dist/quick-model.d.ts +0 -15
- package/dist/quick-model.d.ts.map +0 -1
- package/dist/quick-model.js.map +0 -1
- package/dist/schemas/computers.d.ts.map +0 -1
- package/dist/schemas/computers.js +0 -135
- package/dist/schemas/computers.js.map +0 -1
- package/src/agent-run-model.test.ts +0 -76
- package/src/agent-run-model.ts +0 -65
- package/src/contracts/claude.contract.ts +0 -71
- package/src/contracts/cursor.contract.ts +0 -74
- package/src/contracts/grok.contract.ts +0 -41
- package/src/contracts/keys.contract.ts +0 -79
- package/src/quick-model.ts +0 -155
|
@@ -2,9 +2,8 @@ export declare const settingsContract: {
|
|
|
2
2
|
get: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, import("zod").ZodObject<{
|
|
3
3
|
stableSystemPrompt: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
4
4
|
skills: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
5
|
+
contextShelf: import("zod").ZodDefault<import("zod").ZodString>;
|
|
5
6
|
hashlineEdits: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
6
|
-
terseOutput: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
7
|
-
terseHoldout: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
8
7
|
systemPromptMode: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
9
8
|
claude: "claude";
|
|
10
9
|
custom: "custom";
|
|
@@ -14,6 +13,7 @@ export declare const settingsContract: {
|
|
|
14
13
|
iqSearch: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
15
14
|
iqSearchHoldout: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
16
15
|
workspaceMap: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
16
|
+
workspaceMapHoldout: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
17
17
|
sidecars: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
18
18
|
dependencyFreshness: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
19
19
|
full: "full";
|
|
@@ -22,9 +22,25 @@ export declare const settingsContract: {
|
|
|
22
22
|
}>>;
|
|
23
23
|
outputCleaners: import("zod").ZodDefault<import("zod").ZodString>;
|
|
24
24
|
outputHoldout: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
modelRoles: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodEnum<{
|
|
26
|
+
"acceptance-run": "acceptance-run";
|
|
27
|
+
"approval-queue": "approval-queue";
|
|
28
|
+
"automation-wake": "automation-wake";
|
|
29
|
+
"child-agent": "child-agent";
|
|
30
|
+
"commit-message": "commit-message";
|
|
31
|
+
"deployment-fix": "deployment-fix";
|
|
32
|
+
"documentation-run": "documentation-run";
|
|
33
|
+
"extension-review": "extension-review";
|
|
34
|
+
"loop-iteration": "loop-iteration";
|
|
35
|
+
"loop-verdict": "loop-verdict";
|
|
36
|
+
"maintenance-chore": "maintenance-chore";
|
|
37
|
+
"pipeline-fix": "pipeline-fix";
|
|
38
|
+
"pre-push-fix": "pre-push-fix";
|
|
39
|
+
"safety-judge": "safety-judge";
|
|
40
|
+
"session-title": "session-title";
|
|
41
|
+
"verify-nudge": "verify-nudge";
|
|
42
|
+
"watch-wake": "watch-wake";
|
|
43
|
+
}> & import("zod/v4/core").$partial, import("zod").ZodArray<import("zod").ZodObject<{
|
|
28
44
|
provider: import("zod").ZodString;
|
|
29
45
|
model: import("zod").ZodString;
|
|
30
46
|
effort: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -34,7 +50,8 @@ export declare const settingsContract: {
|
|
|
34
50
|
"claude-code": "claude-code";
|
|
35
51
|
native: "native";
|
|
36
52
|
}>>;
|
|
37
|
-
}, import("zod/v4/core").$strip
|
|
53
|
+
}, import("zod/v4/core").$strip>>>>;
|
|
54
|
+
changelogRepos: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
38
55
|
autoTier: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
39
56
|
off: "off";
|
|
40
57
|
on: "on";
|
|
@@ -140,7 +157,6 @@ export declare const settingsContract: {
|
|
|
140
157
|
on: "on";
|
|
141
158
|
watch: "watch";
|
|
142
159
|
}>>;
|
|
143
|
-
commandJudgeModels: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
144
160
|
subagentsAtOnce: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
145
161
|
subagentsPerTurn: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
146
162
|
subagentDepth: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
@@ -148,9 +164,8 @@ export declare const settingsContract: {
|
|
|
148
164
|
set: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
149
165
|
stableSystemPrompt: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
150
166
|
skills: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
167
|
+
contextShelf: import("zod").ZodDefault<import("zod").ZodString>;
|
|
151
168
|
hashlineEdits: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
152
|
-
terseOutput: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
153
|
-
terseHoldout: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
154
169
|
systemPromptMode: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
155
170
|
claude: "claude";
|
|
156
171
|
custom: "custom";
|
|
@@ -160,6 +175,7 @@ export declare const settingsContract: {
|
|
|
160
175
|
iqSearch: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
161
176
|
iqSearchHoldout: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
162
177
|
workspaceMap: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
178
|
+
workspaceMapHoldout: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
163
179
|
sidecars: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
164
180
|
dependencyFreshness: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
165
181
|
full: "full";
|
|
@@ -168,9 +184,25 @@ export declare const settingsContract: {
|
|
|
168
184
|
}>>;
|
|
169
185
|
outputCleaners: import("zod").ZodDefault<import("zod").ZodString>;
|
|
170
186
|
outputHoldout: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
187
|
+
modelRoles: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodEnum<{
|
|
188
|
+
"acceptance-run": "acceptance-run";
|
|
189
|
+
"approval-queue": "approval-queue";
|
|
190
|
+
"automation-wake": "automation-wake";
|
|
191
|
+
"child-agent": "child-agent";
|
|
192
|
+
"commit-message": "commit-message";
|
|
193
|
+
"deployment-fix": "deployment-fix";
|
|
194
|
+
"documentation-run": "documentation-run";
|
|
195
|
+
"extension-review": "extension-review";
|
|
196
|
+
"loop-iteration": "loop-iteration";
|
|
197
|
+
"loop-verdict": "loop-verdict";
|
|
198
|
+
"maintenance-chore": "maintenance-chore";
|
|
199
|
+
"pipeline-fix": "pipeline-fix";
|
|
200
|
+
"pre-push-fix": "pre-push-fix";
|
|
201
|
+
"safety-judge": "safety-judge";
|
|
202
|
+
"session-title": "session-title";
|
|
203
|
+
"verify-nudge": "verify-nudge";
|
|
204
|
+
"watch-wake": "watch-wake";
|
|
205
|
+
}> & import("zod/v4/core").$partial, import("zod").ZodArray<import("zod").ZodObject<{
|
|
174
206
|
provider: import("zod").ZodString;
|
|
175
207
|
model: import("zod").ZodString;
|
|
176
208
|
effort: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -180,7 +212,8 @@ export declare const settingsContract: {
|
|
|
180
212
|
"claude-code": "claude-code";
|
|
181
213
|
native: "native";
|
|
182
214
|
}>>;
|
|
183
|
-
}, import("zod/v4/core").$strip
|
|
215
|
+
}, import("zod/v4/core").$strip>>>>;
|
|
216
|
+
changelogRepos: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
184
217
|
autoTier: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
185
218
|
off: "off";
|
|
186
219
|
on: "on";
|
|
@@ -286,7 +319,6 @@ export declare const settingsContract: {
|
|
|
286
319
|
on: "on";
|
|
287
320
|
watch: "watch";
|
|
288
321
|
}>>;
|
|
289
|
-
commandJudgeModels: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
290
322
|
subagentsAtOnce: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
291
323
|
subagentsPerTurn: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
292
324
|
subagentDepth: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
@@ -319,11 +351,12 @@ export declare const settingsContract: {
|
|
|
319
351
|
tokens: import("zod").ZodNumber;
|
|
320
352
|
}, import("zod/v4/core").$strip>>;
|
|
321
353
|
}, import("zod/v4/core").$strip>;
|
|
322
|
-
|
|
354
|
+
search: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
323
355
|
metrics: import("zod").ZodTuple<[import("zod").ZodObject<{
|
|
324
356
|
metric: import("zod").ZodEnum<{
|
|
357
|
+
callsBeforeTarget: "callsBeforeTarget";
|
|
358
|
+
openingListings: "openingListings";
|
|
325
359
|
openingSearches: "openingSearches";
|
|
326
|
-
proseChars: "proseChars";
|
|
327
360
|
searchCalls: "searchCalls";
|
|
328
361
|
}>;
|
|
329
362
|
on: import("zod").ZodObject<{
|
|
@@ -340,8 +373,9 @@ export declare const settingsContract: {
|
|
|
340
373
|
saved: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
341
374
|
}, import("zod/v4/core").$strip>], import("zod").ZodObject<{
|
|
342
375
|
metric: import("zod").ZodEnum<{
|
|
376
|
+
callsBeforeTarget: "callsBeforeTarget";
|
|
377
|
+
openingListings: "openingListings";
|
|
343
378
|
openingSearches: "openingSearches";
|
|
344
|
-
proseChars: "proseChars";
|
|
345
379
|
searchCalls: "searchCalls";
|
|
346
380
|
}>;
|
|
347
381
|
on: import("zod").ZodObject<{
|
|
@@ -360,15 +394,17 @@ export declare const settingsContract: {
|
|
|
360
394
|
minTurns: import("zod").ZodNumber;
|
|
361
395
|
sampleUnit: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
362
396
|
conversations: "conversations";
|
|
397
|
+
"opening turns": "opening turns";
|
|
363
398
|
turns: "turns";
|
|
364
399
|
}>>;
|
|
365
400
|
cohort: import("zod").ZodOptional<import("zod").ZodString>;
|
|
366
401
|
}, import("zod/v4/core").$strip>>;
|
|
367
|
-
|
|
402
|
+
map: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
368
403
|
metrics: import("zod").ZodTuple<[import("zod").ZodObject<{
|
|
369
404
|
metric: import("zod").ZodEnum<{
|
|
405
|
+
callsBeforeTarget: "callsBeforeTarget";
|
|
406
|
+
openingListings: "openingListings";
|
|
370
407
|
openingSearches: "openingSearches";
|
|
371
|
-
proseChars: "proseChars";
|
|
372
408
|
searchCalls: "searchCalls";
|
|
373
409
|
}>;
|
|
374
410
|
on: import("zod").ZodObject<{
|
|
@@ -385,8 +421,9 @@ export declare const settingsContract: {
|
|
|
385
421
|
saved: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
386
422
|
}, import("zod/v4/core").$strip>], import("zod").ZodObject<{
|
|
387
423
|
metric: import("zod").ZodEnum<{
|
|
424
|
+
callsBeforeTarget: "callsBeforeTarget";
|
|
425
|
+
openingListings: "openingListings";
|
|
388
426
|
openingSearches: "openingSearches";
|
|
389
|
-
proseChars: "proseChars";
|
|
390
427
|
searchCalls: "searchCalls";
|
|
391
428
|
}>;
|
|
392
429
|
on: import("zod").ZodObject<{
|
|
@@ -405,6 +442,7 @@ export declare const settingsContract: {
|
|
|
405
442
|
minTurns: import("zod").ZodNumber;
|
|
406
443
|
sampleUnit: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
407
444
|
conversations: "conversations";
|
|
445
|
+
"opening turns": "opening turns";
|
|
408
446
|
turns: "turns";
|
|
409
447
|
}>>;
|
|
410
448
|
cohort: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/settings.contract.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,gBAAgB;IACzB,GAAG
|
|
1
|
+
{"version":3,"file":"settings.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/settings.contract.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,gBAAgB;IACzB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASH,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUP,aAAa;;;;;;;;;IAab,OAAO;CASV,CAAC"}
|
|
@@ -47,18 +47,6 @@ export declare const systemContract: {
|
|
|
47
47
|
events: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
48
48
|
clientId: z.ZodOptional<z.ZodString>;
|
|
49
49
|
}, z.core.$strip>, import("@orpc/contract").Schema<AsyncIteratorObject<{
|
|
50
|
-
kind: "heartbeat";
|
|
51
|
-
} | {
|
|
52
|
-
ready: boolean;
|
|
53
|
-
startedAt: number;
|
|
54
|
-
steps: {
|
|
55
|
-
key: string;
|
|
56
|
-
label: string;
|
|
57
|
-
state: "done" | "failed" | "pending" | "running";
|
|
58
|
-
ms?: number | undefined;
|
|
59
|
-
}[];
|
|
60
|
-
kind: "boot";
|
|
61
|
-
} | {
|
|
62
50
|
kind: "hello";
|
|
63
51
|
workspaceId: string;
|
|
64
52
|
routes?: string[] | undefined;
|
|
@@ -75,11 +63,23 @@ export declare const systemContract: {
|
|
|
75
63
|
}[];
|
|
76
64
|
} | undefined;
|
|
77
65
|
} | {
|
|
78
|
-
kind: "
|
|
79
|
-
|
|
66
|
+
kind: "heartbeat";
|
|
67
|
+
} | {
|
|
68
|
+
ready: boolean;
|
|
69
|
+
startedAt: number;
|
|
70
|
+
steps: {
|
|
71
|
+
key: string;
|
|
72
|
+
label: string;
|
|
73
|
+
state: "done" | "failed" | "pending" | "running";
|
|
74
|
+
ms?: number | undefined;
|
|
75
|
+
}[];
|
|
76
|
+
kind: "boot";
|
|
80
77
|
} | {
|
|
81
78
|
kind: "workspaceChanged";
|
|
82
79
|
paths: string[];
|
|
80
|
+
} | {
|
|
81
|
+
kind: "reposChanged";
|
|
82
|
+
repos: string[];
|
|
83
83
|
} | {
|
|
84
84
|
kind: "refsChanged";
|
|
85
85
|
repos: string[];
|
|
@@ -183,6 +183,15 @@ export declare const systemContract: {
|
|
|
183
183
|
credential: boolean;
|
|
184
184
|
conflict: boolean;
|
|
185
185
|
};
|
|
186
|
+
unfinished?: {
|
|
187
|
+
at: number;
|
|
188
|
+
steps?: {
|
|
189
|
+
open: number;
|
|
190
|
+
total: number;
|
|
191
|
+
next?: string | undefined;
|
|
192
|
+
} | undefined;
|
|
193
|
+
check?: string | undefined;
|
|
194
|
+
} | undefined;
|
|
186
195
|
turns?: number | undefined;
|
|
187
196
|
toolUses?: number | undefined;
|
|
188
197
|
subagents?: {
|
|
@@ -247,18 +256,6 @@ export declare const systemContract: {
|
|
|
247
256
|
model?: string | undefined;
|
|
248
257
|
} | undefined;
|
|
249
258
|
}, unknown, void>, import("@orpc/contract").AsyncIteratorClass<{
|
|
250
|
-
kind: "heartbeat";
|
|
251
|
-
} | {
|
|
252
|
-
ready: boolean;
|
|
253
|
-
startedAt: number;
|
|
254
|
-
steps: {
|
|
255
|
-
key: string;
|
|
256
|
-
label: string;
|
|
257
|
-
state: "done" | "failed" | "pending" | "running";
|
|
258
|
-
ms?: number | undefined;
|
|
259
|
-
}[];
|
|
260
|
-
kind: "boot";
|
|
261
|
-
} | {
|
|
262
259
|
kind: "hello";
|
|
263
260
|
workspaceId: string;
|
|
264
261
|
routes?: string[] | undefined;
|
|
@@ -275,11 +272,23 @@ export declare const systemContract: {
|
|
|
275
272
|
}[];
|
|
276
273
|
} | undefined;
|
|
277
274
|
} | {
|
|
278
|
-
kind: "
|
|
279
|
-
|
|
275
|
+
kind: "heartbeat";
|
|
276
|
+
} | {
|
|
277
|
+
ready: boolean;
|
|
278
|
+
startedAt: number;
|
|
279
|
+
steps: {
|
|
280
|
+
key: string;
|
|
281
|
+
label: string;
|
|
282
|
+
state: "done" | "failed" | "pending" | "running";
|
|
283
|
+
ms?: number | undefined;
|
|
284
|
+
}[];
|
|
285
|
+
kind: "boot";
|
|
280
286
|
} | {
|
|
281
287
|
kind: "workspaceChanged";
|
|
282
288
|
paths: string[];
|
|
289
|
+
} | {
|
|
290
|
+
kind: "reposChanged";
|
|
291
|
+
repos: string[];
|
|
283
292
|
} | {
|
|
284
293
|
kind: "refsChanged";
|
|
285
294
|
repos: string[];
|
|
@@ -383,6 +392,15 @@ export declare const systemContract: {
|
|
|
383
392
|
credential: boolean;
|
|
384
393
|
conflict: boolean;
|
|
385
394
|
};
|
|
395
|
+
unfinished?: {
|
|
396
|
+
at: number;
|
|
397
|
+
steps?: {
|
|
398
|
+
open: number;
|
|
399
|
+
total: number;
|
|
400
|
+
next?: string | undefined;
|
|
401
|
+
} | undefined;
|
|
402
|
+
check?: string | undefined;
|
|
403
|
+
} | undefined;
|
|
386
404
|
turns?: number | undefined;
|
|
387
405
|
toolUses?: number | undefined;
|
|
388
406
|
subagents?: {
|
|
@@ -847,12 +865,13 @@ export declare const systemContract: {
|
|
|
847
865
|
}, z.core.$strip>>;
|
|
848
866
|
}, z.core.$strip>>;
|
|
849
867
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
850
|
-
|
|
868
|
+
manageDeviceSandbox: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
851
869
|
op: z.ZodEnum<{
|
|
852
870
|
logs: "logs";
|
|
853
871
|
prepare: "prepare";
|
|
854
872
|
rebuild: "rebuild";
|
|
855
873
|
remove: "remove";
|
|
874
|
+
reshape: "reshape";
|
|
856
875
|
restart: "restart";
|
|
857
876
|
rollback: "rollback";
|
|
858
877
|
"runner-remove": "runner-remove";
|
|
@@ -863,6 +882,12 @@ export declare const systemContract: {
|
|
|
863
882
|
}>;
|
|
864
883
|
slug: z.ZodString;
|
|
865
884
|
hash: z.ZodOptional<z.ZodString>;
|
|
885
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
886
|
+
memoryGib: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
887
|
+
cpus: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
888
|
+
privileged: z.ZodOptional<z.ZodBoolean>;
|
|
889
|
+
gpu: z.ZodOptional<z.ZodBoolean>;
|
|
890
|
+
}, z.core.$strip>>;
|
|
866
891
|
parentUrl: z.ZodOptional<z.ZodString>;
|
|
867
892
|
pair: z.ZodOptional<z.ZodString>;
|
|
868
893
|
definition: z.ZodOptional<z.ZodString>;
|
|
@@ -888,7 +913,7 @@ export declare const systemContract: {
|
|
|
888
913
|
kind: "error";
|
|
889
914
|
message: string;
|
|
890
915
|
}, unknown, void>>, Record<never, never>, Record<never, never>>;
|
|
891
|
-
|
|
916
|
+
runDeviceCommand: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
892
917
|
id: z.ZodString;
|
|
893
918
|
command: z.ZodEnum<{
|
|
894
919
|
"mirror-off": "mirror-off";
|
|
@@ -903,5 +928,30 @@ export declare const systemContract: {
|
|
|
903
928
|
message: z.ZodString;
|
|
904
929
|
output: z.ZodOptional<z.ZodString>;
|
|
905
930
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
931
|
+
runDeviceAgentFlow: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
932
|
+
op: z.ZodEnum<{
|
|
933
|
+
restart: "restart";
|
|
934
|
+
upgrade: "upgrade";
|
|
935
|
+
}>;
|
|
936
|
+
id: z.ZodString;
|
|
937
|
+
}, z.core.$strip>, import("@orpc/contract").Schema<AsyncIteratorObject<{
|
|
938
|
+
kind: "line";
|
|
939
|
+
text: string;
|
|
940
|
+
} | {
|
|
941
|
+
kind: "result";
|
|
942
|
+
message: string;
|
|
943
|
+
} | {
|
|
944
|
+
kind: "error";
|
|
945
|
+
message: string;
|
|
946
|
+
}, unknown, void>, import("@orpc/contract").AsyncIteratorClass<{
|
|
947
|
+
kind: "line";
|
|
948
|
+
text: string;
|
|
949
|
+
} | {
|
|
950
|
+
kind: "result";
|
|
951
|
+
message: string;
|
|
952
|
+
} | {
|
|
953
|
+
kind: "error";
|
|
954
|
+
message: string;
|
|
955
|
+
}, unknown, void>>, Record<never, never>, Record<never, never>>;
|
|
906
956
|
};
|
|
907
957
|
//# sourceMappingURL=system.contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/system.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiBlB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBnB,gBAAgB;;;;;;;;;;;;;;;IAkBhB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;CAUrB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { eventIterator, oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { SessionTranscriptSchema, SystemEventSchema } from "../events.js";
|
|
4
|
-
import {
|
|
4
|
+
import { DeviceAgentFlowInputSchema, DeviceCommandInputSchema, DeviceCommandResultSchema, DeviceFlowLineSchema, DeviceSandboxFlowInputSchema, } from "../schemas/devices.js";
|
|
5
5
|
import { PresenceReportSchema } from "../schemas/logs.js";
|
|
6
6
|
import { OkSchema } from "../schemas/shared.js";
|
|
7
7
|
import { DaemonSessionSchema, InfoSchema, ManifestProblemsSchema } from "../schemas/system.js";
|
|
@@ -105,36 +105,45 @@ export const systemContract = {
|
|
|
105
105
|
.route({
|
|
106
106
|
method: "GET",
|
|
107
107
|
path: "/system/subagents",
|
|
108
|
-
summary: "
|
|
109
|
-
description: "Every
|
|
108
|
+
summary: "Subagents the agents have started",
|
|
109
|
+
description: "Every subagent and child agent this sandbox's conversations have delegated work to, whichever tool started it, with what each one is doing.",
|
|
110
110
|
})
|
|
111
111
|
.output(SubagentsListSchema),
|
|
112
112
|
subagentTranscript: oc
|
|
113
113
|
.route({
|
|
114
114
|
method: "GET",
|
|
115
115
|
path: "/system/subagents/{id}/transcript",
|
|
116
|
-
summary: "A
|
|
117
|
-
description: "The full record of one delegated
|
|
116
|
+
summary: "A subagent's record",
|
|
117
|
+
description: "The full record of one delegated subagent, in the same shape as any other conversation. It comes live from the parent turn while it works, and from stored history once it has finished.",
|
|
118
118
|
})
|
|
119
119
|
.input(SubagentIdParamSchema)
|
|
120
120
|
.output(SessionTranscriptSchema),
|
|
121
|
-
|
|
121
|
+
manageDeviceSandbox: oc
|
|
122
122
|
.route({
|
|
123
123
|
method: "POST",
|
|
124
|
-
path: "/system/
|
|
125
|
-
summary: "Drive a sandbox on one of your own
|
|
126
|
-
description: "Start, stop, restart, update, rebuild, roll back or remove a sandbox running on a machine you own, relayed over the connection that machine holds open. The answer is a stream because the slowest of these takes minutes, and it is the same stream whichever you ask for. The daemon adds no opinion: the machine enforces its own permissions and a refusal arrives as the last line, in the machine's words, naming the switch to flip.",
|
|
124
|
+
path: "/system/devices/{id}/sandboxes/{slug}",
|
|
125
|
+
summary: "Drive a sandbox on one of your own devices",
|
|
126
|
+
description: "Start, stop, restart, update, rebuild, roll back, reshape (its memory and CPU caps, privileged, GPU) or remove a sandbox running on a machine you own, relayed over the connection that machine holds open. The answer is a stream because the slowest of these takes minutes, and it is the same stream whichever you ask for. The daemon adds no opinion: the machine enforces its own permissions and a refusal arrives as the last line, in the machine's words, naming the switch to flip.",
|
|
127
127
|
})
|
|
128
|
-
.input(
|
|
129
|
-
.output(eventIterator(
|
|
130
|
-
|
|
128
|
+
.input(DeviceSandboxFlowInputSchema)
|
|
129
|
+
.output(eventIterator(DeviceFlowLineSchema)),
|
|
130
|
+
runDeviceCommand: oc
|
|
131
131
|
.route({
|
|
132
132
|
method: "POST",
|
|
133
|
-
path: "/system/
|
|
134
|
-
summary: "Run one of your
|
|
135
|
-
description: "Performs a named action on a machine you own by running its own intentic-machine command there — turning that
|
|
133
|
+
path: "/system/devices/{id}/commands/{command}",
|
|
134
|
+
summary: "Run one of your device's own CLI actions",
|
|
135
|
+
description: "Performs a named action on a machine you own by running its own intentic-machine command there — turning that device's port mirroring off, say — over the connection it holds open. The set of actions is fixed and the command line is built here from the name, never sent by the caller. The machine enforces its own permissions and a refusal comes back as its own sentence, naming the switch to flip.",
|
|
136
136
|
})
|
|
137
|
-
.input(
|
|
138
|
-
.output(
|
|
137
|
+
.input(DeviceCommandInputSchema)
|
|
138
|
+
.output(DeviceCommandResultSchema),
|
|
139
|
+
runDeviceAgentFlow: oc
|
|
140
|
+
.route({
|
|
141
|
+
method: "POST",
|
|
142
|
+
path: "/system/devices/{id}/agent/{op}",
|
|
143
|
+
summary: "Update or restart the agent on one of your own devices",
|
|
144
|
+
description: "Updates a machine you own to the current intentic-machine agent, or restarts the loop it is running, over the connection that machine holds open. The answer is a stream of the run's own output — and it normally stops mid-run, because the agent's loop is what carries this connection: the work is detached from it first, so it finishes regardless, and the device's reported version is what confirms it. Takes the machine's \"Run commands\" permission, the same one a command typed there would.",
|
|
145
|
+
})
|
|
146
|
+
.input(DeviceAgentFlowInputSchema)
|
|
147
|
+
.output(eventIterator(DeviceFlowLineSchema)),
|
|
139
148
|
};
|
|
140
149
|
//# sourceMappingURL=system.contract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.contract.js","sourceRoot":"","sources":["../../src/contracts/system.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EACH,yBAAyB,EACzB,
|
|
1
|
+
{"version":3,"file":"system.contract.js","sourceRoot":"","sources":["../../src/contracts/system.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EACH,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,4B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,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,iCAAiC;QACvC,OAAO,EAAE,wDAAwD;QACjE,WAAW,EACP,8eAA8e;KACrf,CAAC;SACD,KAAK,CAAC,0BAA0B,CAAC;SACjC,MAAM,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC;CACnD,CAAC"}
|
|
@@ -28,5 +28,27 @@ export declare const usageContract: {
|
|
|
28
28
|
}, z.core.$strip>, z.ZodObject<{
|
|
29
29
|
ok: z.ZodLiteral<true>;
|
|
30
30
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
31
|
+
limitReset: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
32
|
+
account: z.ZodString;
|
|
33
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
34
|
+
available: z.ZodBoolean;
|
|
35
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
36
|
+
nextAvailableAt: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
weeklyResetsAt: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
39
|
+
claimLimitReset: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
40
|
+
account: z.ZodString;
|
|
41
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
42
|
+
result: z.ZodEnum<{
|
|
43
|
+
already_used: "already_used";
|
|
44
|
+
error: "error";
|
|
45
|
+
ineligible: "ineligible";
|
|
46
|
+
not_limited: "not_limited";
|
|
47
|
+
reset: "reset";
|
|
48
|
+
unavailable: "unavailable";
|
|
49
|
+
}>;
|
|
50
|
+
nextAvailableAt: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
31
53
|
};
|
|
32
54
|
//# sourceMappingURL=usage.contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/usage.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"usage.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/usage.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AAMH,eAAO,MAAM,aAAa;IACtB,MAAM;;;;;;;;;;;;;;;;;;;;IAaN,iBAAiB;;;;;IAoBjB,UAAU;;;;;;;;IAUV,eAAe;;;;;;;;;;;;;;CAUlB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { LimitResetClaimSchema, LimitResetStatusSchema } from "../schemas/plan-limits.js";
|
|
3
4
|
import { DayWindowQuerySchema, UsageRollupSchema } from "../schemas/usage.js";
|
|
4
5
|
export const RefreshPlanLimitsSchema = z.object({
|
|
5
6
|
force: z.boolean().default(false).describe("Measure again even if a reading was taken a moment ago."),
|
|
@@ -23,5 +24,23 @@ export const usageContract = {
|
|
|
23
24
|
})
|
|
24
25
|
.input(RefreshPlanLimitsSchema)
|
|
25
26
|
.output(z.object({ ok: z.literal(true) })),
|
|
27
|
+
limitReset: oc
|
|
28
|
+
.route({
|
|
29
|
+
method: "GET",
|
|
30
|
+
path: "/usage/limit-reset/{account}",
|
|
31
|
+
summary: "Whether this account's session window can be reopened now",
|
|
32
|
+
description: "Asks the provider whether it will reopen this account's spent session window immediately, which some plans grant once a week. Only worth asking about an account that has actually been refused: the answer is the provider's judgement at this moment, it is not cached, and an account with no such grant answers plainly that it has none.",
|
|
33
|
+
})
|
|
34
|
+
.input(z.object({ account: z.string().min(1).describe("Which account.") }))
|
|
35
|
+
.output(LimitResetStatusSchema),
|
|
36
|
+
claimLimitReset: oc
|
|
37
|
+
.route({
|
|
38
|
+
method: "POST",
|
|
39
|
+
path: "/usage/limit-reset/{account}/claim",
|
|
40
|
+
summary: "Reopen this account's session window now",
|
|
41
|
+
description: "Spends one of the account's weekly resets to reopen its session window immediately. The weekly allowance is untouched and still binds. Answers with what the provider actually did: only `reset` changed anything, and it is the cue to send the refused turn again.",
|
|
42
|
+
})
|
|
43
|
+
.input(z.object({ account: z.string().min(1).describe("Which account.") }))
|
|
44
|
+
.output(LimitResetClaimSchema),
|
|
26
45
|
};
|
|
27
46
|
//# sourceMappingURL=usage.contract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage.contract.js","sourceRoot":"","sources":["../../src/contracts/usage.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAM9E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,yDAAyD,CAAC;CACxG,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,MAAM,EAAE,EAAE;SACL,KAAK,CAAC;QACH,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,yBAAyB;QAClC,WAAW,EACP,8RAA8R;KACrS,CAAC;SACD,KAAK,CAAC,oBAAoB,CAAC;SAC3B,MAAM,CAAC,iBAAiB,CAAC;IAI9B,iBAAiB,EAAE,EAAE;SAChB,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,4BAA4B;QAClC,OAAO,EAAE,2CAA2C;QACpD,WAAW,EACP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