@intentic/sandbox-contract 1.226.0 → 1.226.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contracts/activity.contract.d.ts.map +1 -1
- package/dist/contracts/activity.contract.js +17 -2
- package/dist/contracts/activity.contract.js.map +1 -1
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.js +71 -8
- package/dist/contracts/agent.contract.js.map +1 -1
- package/dist/contracts/agents.contract.d.ts +1 -0
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.js +164 -19
- package/dist/contracts/agents.contract.js.map +1 -1
- package/dist/contracts/automations.contract.d.ts.map +1 -1
- package/dist/contracts/automations.contract.js +78 -9
- package/dist/contracts/automations.contract.js.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.js +98 -11
- package/dist/contracts/capabilities.contract.js.map +1 -1
- package/dist/contracts/chores.contract.d.ts.map +1 -1
- package/dist/contracts/chores.contract.js +26 -3
- package/dist/contracts/chores.contract.js.map +1 -1
- package/dist/contracts/ci.contract.d.ts.map +1 -1
- package/dist/contracts/ci.contract.js +52 -6
- package/dist/contracts/ci.contract.js.map +1 -1
- package/dist/contracts/claude.contract.d.ts.map +1 -1
- package/dist/contracts/claude.contract.js +44 -5
- package/dist/contracts/claude.contract.js.map +1 -1
- package/dist/contracts/drafts.contract.d.ts.map +1 -1
- package/dist/contracts/drafts.contract.js +26 -3
- package/dist/contracts/drafts.contract.js.map +1 -1
- package/dist/contracts/endpoints.contract.d.ts.map +1 -1
- package/dist/contracts/endpoints.contract.js +17 -2
- package/dist/contracts/endpoints.contract.js.map +1 -1
- package/dist/contracts/exit.contract.d.ts.map +1 -1
- package/dist/contracts/exit.contract.js +62 -7
- package/dist/contracts/exit.contract.js.map +1 -1
- package/dist/contracts/extensions.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.js +124 -15
- package/dist/contracts/extensions.contract.js.map +1 -1
- package/dist/contracts/git.contract.d.ts.map +1 -1
- package/dist/contracts/git.contract.js +384 -43
- package/dist/contracts/git.contract.js.map +1 -1
- package/dist/contracts/grok.contract.d.ts.map +1 -1
- package/dist/contracts/grok.contract.js +25 -3
- package/dist/contracts/grok.contract.js.map +1 -1
- package/dist/contracts/history.contract.d.ts.map +1 -1
- package/dist/contracts/history.contract.js +35 -4
- package/dist/contracts/history.contract.js.map +1 -1
- package/dist/contracts/intentic.contract.d.ts.map +1 -1
- package/dist/contracts/intentic.contract.js +25 -3
- package/dist/contracts/intentic.contract.js.map +1 -1
- package/dist/contracts/inventory.contract.d.ts.map +1 -1
- package/dist/contracts/inventory.contract.js +26 -3
- package/dist/contracts/inventory.contract.js.map +1 -1
- package/dist/contracts/logs.contract.d.ts.map +1 -1
- package/dist/contracts/logs.contract.js +17 -2
- package/dist/contracts/logs.contract.js.map +1 -1
- package/dist/contracts/loops.contract.d.ts.map +1 -1
- package/dist/contracts/loops.contract.js +52 -6
- package/dist/contracts/loops.contract.js.map +1 -1
- package/dist/contracts/panels.contract.d.ts.map +1 -1
- package/dist/contracts/panels.contract.js +26 -3
- package/dist/contracts/panels.contract.js.map +1 -1
- package/dist/contracts/personas.contract.d.ts.map +1 -1
- package/dist/contracts/personas.contract.js +71 -8
- package/dist/contracts/personas.contract.js.map +1 -1
- package/dist/contracts/ports.contract.d.ts.map +1 -1
- package/dist/contracts/ports.contract.js +26 -3
- package/dist/contracts/ports.contract.js.map +1 -1
- package/dist/contracts/prepush.contract.d.ts.map +1 -1
- package/dist/contracts/prepush.contract.js +24 -3
- package/dist/contracts/prepush.contract.js.map +1 -1
- package/dist/contracts/providers.contract.d.ts.map +1 -1
- package/dist/contracts/providers.contract.js +9 -1
- package/dist/contracts/providers.contract.js.map +1 -1
- package/dist/contracts/public.contract.d.ts.map +1 -1
- package/dist/contracts/public.contract.js +26 -3
- package/dist/contracts/public.contract.js.map +1 -1
- package/dist/contracts/push.contract.d.ts.map +1 -1
- package/dist/contracts/push.contract.js +35 -4
- package/dist/contracts/push.contract.js.map +1 -1
- package/dist/contracts/secrets.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.js +43 -5
- package/dist/contracts/secrets.contract.js.map +1 -1
- package/dist/contracts/sessions.contract.d.ts.map +1 -1
- package/dist/contracts/sessions.contract.js +15 -2
- package/dist/contracts/sessions.contract.js.map +1 -1
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.js +43 -5
- package/dist/contracts/settings.contract.js.map +1 -1
- package/dist/contracts/share.contract.d.ts.map +1 -1
- package/dist/contracts/share.contract.js +35 -4
- package/dist/contracts/share.contract.js.map +1 -1
- package/dist/contracts/skills.contract.d.ts.map +1 -1
- package/dist/contracts/skills.contract.js +35 -4
- package/dist/contracts/skills.contract.js.map +1 -1
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +107 -14
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/contracts/translator.contract.d.ts.map +1 -1
- package/dist/contracts/translator.contract.js +29 -4
- package/dist/contracts/translator.contract.js.map +1 -1
- package/dist/contracts/usage.contract.d.ts.map +1 -1
- package/dist/contracts/usage.contract.js +9 -1
- package/dist/contracts/usage.contract.js.map +1 -1
- package/dist/contracts/vpn.contract.d.ts.map +1 -1
- package/dist/contracts/vpn.contract.js +32 -4
- package/dist/contracts/vpn.contract.js.map +1 -1
- package/dist/contracts/workflows.contract.d.ts.map +1 -1
- package/dist/contracts/workflows.contract.js +70 -8
- package/dist/contracts/workflows.contract.js.map +1 -1
- package/dist/contracts/workspace.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.js +216 -25
- package/dist/contracts/workspace.contract.js.map +1 -1
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +179 -88
- package/dist/events.js.map +1 -1
- package/dist/history-state.d.ts.map +1 -1
- package/dist/history-state.js +1 -0
- package/dist/history-state.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/schemas.d.ts +1 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +2856 -1276
- package/dist/schemas.js.map +1 -1
- package/package.json +4 -4
- package/src/contracts/activity.contract.ts +18 -2
- package/src/contracts/agent.contract.ts +78 -8
- package/src/contracts/agents.contract.ts +180 -19
- package/src/contracts/automations.contract.ts +80 -9
- package/src/contracts/capabilities.contract.ts +106 -11
- package/src/contracts/chores.contract.ts +29 -3
- package/src/contracts/ci.contract.ts +55 -6
- package/src/contracts/claude.contract.ts +47 -5
- package/src/contracts/drafts.contract.ts +26 -3
- package/src/contracts/endpoints.contract.ts +19 -2
- package/src/contracts/exit.contract.ts +69 -7
- package/src/contracts/extensions.contract.ts +134 -15
- package/src/contracts/git.contract.ts +421 -43
- package/src/contracts/grok.contract.ts +26 -3
- package/src/contracts/history.contract.ts +37 -4
- package/src/contracts/intentic.contract.ts +28 -3
- package/src/contracts/inventory.contract.ts +27 -3
- package/src/contracts/logs.contract.ts +18 -2
- package/src/contracts/loops.contract.ts +58 -6
- package/src/contracts/panels.contract.ts +26 -3
- package/src/contracts/personas.contract.ts +77 -8
- package/src/contracts/ports.contract.ts +27 -3
- package/src/contracts/prepush.contract.ts +26 -3
- package/src/contracts/providers.contract.ts +10 -1
- package/src/contracts/public.contract.ts +29 -3
- package/src/contracts/push.contract.ts +37 -4
- package/src/contracts/secrets.contract.ts +46 -5
- package/src/contracts/sessions.contract.ts +16 -2
- package/src/contracts/settings.contract.ts +46 -5
- package/src/contracts/share.contract.ts +37 -4
- package/src/contracts/skills.contract.ts +39 -4
- package/src/contracts/system.contract.ts +119 -14
- package/src/contracts/translator.contract.ts +32 -4
- package/src/contracts/usage.contract.ts +10 -1
- package/src/contracts/vpn.contract.ts +35 -4
- package/src/contracts/workflows.contract.ts +77 -8
- package/src/contracts/workspace.contract.ts +231 -25
- package/src/events.ts +207 -88
- package/src/history-state.ts +6 -0
- package/src/schemas.ts +3506 -1260
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/activity.contract.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB;IACzB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"activity.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/activity.contract.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB;IACzB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUJ,MAAM;;;;;;;;;;;;;;;;;;;;CAQT,CAAC"}
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { ActivityListSchema, ActivityQuerySchema, ActivityStatusSchema } from "../schemas.js";
|
|
3
3
|
export const activityContract = {
|
|
4
|
-
list: oc
|
|
5
|
-
|
|
4
|
+
list: oc
|
|
5
|
+
.route({
|
|
6
|
+
method: "GET",
|
|
7
|
+
path: "/activity",
|
|
8
|
+
summary: "What the agent has done out in the world",
|
|
9
|
+
description: "The audit trail of actions taken on outside services. Read-only on purpose: entries are written by the sandbox alone, which is what makes it a record worth trusting.",
|
|
10
|
+
})
|
|
11
|
+
.input(ActivityQuerySchema)
|
|
12
|
+
.output(ActivityListSchema),
|
|
13
|
+
status: oc
|
|
14
|
+
.route({
|
|
15
|
+
method: "GET",
|
|
16
|
+
path: "/activity/status",
|
|
17
|
+
summary: "Whether the audit trail is being kept",
|
|
18
|
+
description: "Which sources are feeding the record and whether each is working.",
|
|
19
|
+
})
|
|
20
|
+
.output(ActivityStatusSchema),
|
|
6
21
|
};
|
|
7
22
|
//# sourceMappingURL=activity.contract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.contract.js","sourceRoot":"","sources":["../../src/contracts/activity.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAI9F,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,IAAI,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"activity.contract.js","sourceRoot":"","sources":["../../src/contracts/activity.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAI9F,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,IAAI,EAAE,EAAE;SACH,KAAK,CAAC;QACH,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,0CAA0C;QACnD,WAAW,EACP,uKAAuK;KAC9K,CAAC;SACD,KAAK,CAAC,mBAAmB,CAAC;SAC1B,MAAM,CAAC,kBAAkB,CAAC;IAC/B,MAAM,EAAE,EAAE;SACL,KAAK,CAAC;QACH,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,uCAAuC;QAChD,WAAW,EAAE,mEAAmE;KACnF,CAAC;SACD,MAAM,CAAC,oBAAoB,CAAC;CACpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/agent.contract.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,aAAa;IACtB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"agent.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/agent.contract.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,aAAa;IACtB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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|
3
3
|
import { AgentReplySchema, AgentTurnSchema, AttachTurnSchema, OkSchema, ProviderRefusalsSchema, RewindResultSchema, RewindTurnSchema, StartedTurnSchema, SteerSchema, StopTurnSchema, } from "../schemas.js";
|
|
4
4
|
export const agentContract = {
|
|
5
|
-
run: oc
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
run: oc
|
|
6
|
+
.route({
|
|
7
|
+
method: "POST",
|
|
8
|
+
path: "/agent",
|
|
9
|
+
summary: "Say something to an agent",
|
|
10
|
+
description: "Starts a turn and answers immediately with its id; the work runs inside the sandbox whether or not anybody stays connected. Watch it by attaching. Naming a conversation that does not exist yet opens it.",
|
|
11
|
+
})
|
|
12
|
+
.input(AgentTurnSchema)
|
|
13
|
+
.output(StartedTurnSchema),
|
|
14
|
+
attach: oc
|
|
15
|
+
.route({
|
|
16
|
+
method: "POST",
|
|
17
|
+
path: "/agent/attach",
|
|
18
|
+
summary: "Watch a turn happen",
|
|
19
|
+
description: "Streams everything the agent does: its words, the tools it reaches for, and the answers it gets. Give it the point you have already seen and it replays from there before going live, so a reload loses nothing. The window that started the turn holds no special claim, and any number of watchers on any number of devices see the same thing.",
|
|
20
|
+
})
|
|
21
|
+
.input(AttachTurnSchema)
|
|
22
|
+
.output(eventIterator(AttachFrameSchema)),
|
|
23
|
+
reply: oc
|
|
24
|
+
.route({
|
|
25
|
+
method: "POST",
|
|
26
|
+
path: "/agent/reply",
|
|
27
|
+
summary: "Answer a question the agent asked",
|
|
28
|
+
description: "Un-parks a turn that is waiting on you: approving a plan, choosing between options, or permitting a tool. The turn picks up where it stopped.",
|
|
29
|
+
})
|
|
30
|
+
.input(AgentReplySchema)
|
|
31
|
+
.output(OkSchema),
|
|
32
|
+
steer: oc
|
|
33
|
+
.route({
|
|
34
|
+
method: "POST",
|
|
35
|
+
path: "/agent/steer",
|
|
36
|
+
summary: "Interrupt a running turn",
|
|
37
|
+
description: "Slips a message into a turn already under way, without stopping it. This is how you redirect an agent mid-thought rather than waiting for it to finish being wrong.",
|
|
38
|
+
})
|
|
39
|
+
.input(SteerSchema)
|
|
40
|
+
.output(OkSchema),
|
|
41
|
+
stop: oc
|
|
42
|
+
.route({
|
|
43
|
+
method: "POST",
|
|
44
|
+
path: "/agent/stop",
|
|
45
|
+
summary: "Stop a turn now",
|
|
46
|
+
description: "Cancels the running turn inside the sandbox. Whatever it had already written to disk stays written.",
|
|
47
|
+
})
|
|
48
|
+
.input(StopTurnSchema)
|
|
49
|
+
.output(OkSchema),
|
|
50
|
+
rewind: oc
|
|
51
|
+
.route({
|
|
52
|
+
method: "POST",
|
|
53
|
+
path: "/agent/rewind",
|
|
54
|
+
summary: "Go back to an earlier message",
|
|
55
|
+
description: "Puts the files back as they stood at that point, drops every message after it, and forgets what the model remembered, so the next thing you say starts from there cleanly. Refused while a turn is running, because a restore cannot overwrite files an agent is editing, and refused for a message with no saved state to return to.",
|
|
56
|
+
})
|
|
57
|
+
.input(RewindTurnSchema)
|
|
58
|
+
.output(RewindResultSchema),
|
|
59
|
+
commands: oc
|
|
60
|
+
.route({
|
|
61
|
+
method: "GET",
|
|
62
|
+
path: "/agent/commands",
|
|
63
|
+
summary: "Shortcut commands the agent knows",
|
|
64
|
+
description: "The commands a provider published the last time one of its turns ran, so a composer can offer them before this conversation has run anything. A running turn's own list wins over this one.",
|
|
65
|
+
})
|
|
66
|
+
.input(AgentCommandsQuerySchema)
|
|
67
|
+
.output(AgentCommandsSchema),
|
|
68
|
+
refusals: oc
|
|
69
|
+
.route({
|
|
70
|
+
method: "GET",
|
|
71
|
+
path: "/agent/refusals",
|
|
72
|
+
summary: "The last time each provider said no",
|
|
73
|
+
description: "What each model provider most recently refused and why. Read this alongside an account's usage: the usage says how full it was when last checked, this says whether it has since started turning work away.",
|
|
74
|
+
})
|
|
75
|
+
.output(ProviderRefusalsSchema),
|
|
13
76
|
};
|
|
14
77
|
//# sourceMappingURL=agent.contract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.contract.js","sourceRoot":"","sources":["../../src/contracts/agent.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAChG,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,cAAc,GACjB,MAAM,eAAe,CAAC;AAOvB,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,GAAG,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"agent.contract.js","sourceRoot":"","sources":["../../src/contracts/agent.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAChG,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,cAAc,GACjB,MAAM,eAAe,CAAC;AAOvB,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,GAAG,EAAE,EAAE;SACF,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,2BAA2B;QACpC,WAAW,EACP,4MAA4M;KACnN,CAAC;SACD,KAAK,CAAC,eAAe,CAAC;SACtB,MAAM,CAAC,iBAAiB,CAAC;IAC9B,MAAM,EAAE,EAAE;SACL,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,eAAe;QACrB,OAAO,EA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AE,EAAE;SACP,KAAK,CAAC;QACH,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,qCAAqC;QAC9C,WAAW,EACP,6MAA6M;KACpN,CAAC;SACD,MAAM,CAAC,sBAAsB,CAAC;CACtC,CAAC"}
|
|
@@ -326,6 +326,7 @@ export declare const agentsContract: {
|
|
|
326
326
|
}, import("zod/v4/core").$strip>>;
|
|
327
327
|
}, import("zod/v4/core").$strip>>;
|
|
328
328
|
scanned: import("zod").ZodNumber;
|
|
329
|
+
indexing: import("zod").ZodBoolean;
|
|
329
330
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
330
331
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
331
332
|
id: import("zod").ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/agents.contract.ts"],"names":[],"mappings":"AAgDA,eAAO,MAAM,cAAc;IACvB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"agents.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/agents.contract.ts"],"names":[],"mappings":"AAgDA,eAAO,MAAM,cAAc;IACvB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASJ,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQP,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUJ,QAAQ;;;;;;;;;;IASR,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAaJ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUX,OAAO;;;;;IAUP,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUP,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUT,KAAK;;;CASR,CAAC"}
|
|
@@ -2,27 +2,172 @@ import { oc } from "@orpc/contract";
|
|
|
2
2
|
import { AgentTranscriptSchema } from "../events.js";
|
|
3
3
|
import { AgentArchiveSchema, AgentAutoLandSchema, AgentChangesSchema, AgentFileDiffQuerySchema, AgentIdSchema, AgentIdsSchema, AgentLandSchema, AgentPlaceSchema, AgentRenameSchema, AgentResumeAfterOutageSchema, AgentSearchQuerySchema, AgentSearchResultSchema, AgentsListSchema, AgentsMovedSchema, AgentsRemovedSchema, AgentSummarySchema, FileDiffSchema, LandResultSchema, OkSchema, } from "../schemas.js";
|
|
4
4
|
export const agentsContract = {
|
|
5
|
-
list: oc
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
list: oc
|
|
6
|
+
.route({
|
|
7
|
+
method: "GET",
|
|
8
|
+
path: "/agents",
|
|
9
|
+
summary: "Every live conversation",
|
|
10
|
+
description: "The fleet as the board draws it: each conversation with its title, what it is doing, when it last moved and whether anybody has read it since. Archived conversations are not in here.",
|
|
11
|
+
})
|
|
12
|
+
.output(AgentsListSchema),
|
|
13
|
+
archived: oc
|
|
14
|
+
.route({
|
|
15
|
+
method: "GET",
|
|
16
|
+
path: "/agents/archived",
|
|
17
|
+
summary: "Conversations put away",
|
|
18
|
+
description: "The same shape as the live fleet, for the conversations somebody has decided are finished. Their work is kept, and any one of them can be brought back.",
|
|
19
|
+
})
|
|
20
|
+
.output(AgentsListSchema),
|
|
21
|
+
search: oc
|
|
22
|
+
.route({
|
|
23
|
+
method: "GET",
|
|
24
|
+
path: "/agents/search",
|
|
25
|
+
summary: "Find a conversation",
|
|
26
|
+
description: "Searches the live fleet and the archive together. Both halves on purpose: the board hides finished work by design, and a filter that says it found nothing while the answer sits one click away is simply wrong.",
|
|
27
|
+
})
|
|
28
|
+
.input(AgentSearchQuerySchema)
|
|
29
|
+
.output(AgentSearchResultSchema),
|
|
30
|
+
get: oc
|
|
31
|
+
.route({
|
|
32
|
+
method: "GET",
|
|
33
|
+
path: "/agents/{id}",
|
|
34
|
+
summary: "One conversation's card",
|
|
35
|
+
description: "Everything the board shows for a single conversation: its title, state, working branch, unread marker and timestamps.",
|
|
36
|
+
})
|
|
37
|
+
.input(AgentIdSchema)
|
|
38
|
+
.output(AgentSummarySchema),
|
|
39
|
+
transcript: oc
|
|
40
|
+
.route({
|
|
41
|
+
method: "GET",
|
|
42
|
+
path: "/agents/{id}/transcript",
|
|
43
|
+
summary: "The full conversation record",
|
|
44
|
+
description: "Every message in one conversation, in order, including the tool calls and their results. This is the record the chat replays and the next turn is seeded from.",
|
|
45
|
+
})
|
|
46
|
+
.input(AgentIdSchema)
|
|
47
|
+
.output(AgentTranscriptSchema),
|
|
48
|
+
place: oc
|
|
49
|
+
.route({
|
|
50
|
+
method: "POST",
|
|
51
|
+
path: "/agents/{id}/place",
|
|
52
|
+
summary: "Put words in the agent's mouth",
|
|
53
|
+
description: "Writes a line into the record as though the agent had said it, with no turn behind it and no reply. Human readers see it marked as placed. The next real turn starts fresh from the record, where the line reads as the agent's own. Refused while a turn is running.",
|
|
54
|
+
})
|
|
55
|
+
.input(AgentPlaceSchema)
|
|
56
|
+
.output(OkSchema),
|
|
57
|
+
rename: oc
|
|
58
|
+
.route({
|
|
59
|
+
method: "POST",
|
|
60
|
+
path: "/agents/{id}/rename",
|
|
61
|
+
summary: "Retitle a conversation",
|
|
62
|
+
description: "Sets the title a person chose, replacing the one that was generated. Allowed while the conversation is working, and it does not count as activity.",
|
|
63
|
+
})
|
|
64
|
+
.input(AgentRenameSchema)
|
|
65
|
+
.output(AgentSummarySchema),
|
|
66
|
+
autoLand: oc
|
|
67
|
+
.route({
|
|
68
|
+
method: "POST",
|
|
69
|
+
path: "/agents/{id}/auto-land",
|
|
70
|
+
summary: "Whether this conversation merges its work automatically",
|
|
71
|
+
description: "Overrides the sandbox-wide setting for one conversation; clear it to go back to following the default. Deliberately allowed mid-turn, because the setting is read when the turn finishes, so flipping it while the agent works means exactly hold this piece of work for review.",
|
|
72
|
+
})
|
|
73
|
+
.input(AgentAutoLandSchema)
|
|
74
|
+
.output(AgentSummarySchema),
|
|
13
75
|
resumeAfterOutage: oc
|
|
14
|
-
.route({
|
|
76
|
+
.route({
|
|
77
|
+
method: "POST",
|
|
78
|
+
path: "/agents/{id}/resume-after-outage",
|
|
79
|
+
summary: "Whether this conversation retries after a provider outage",
|
|
80
|
+
description: "Overrides the sandbox-wide setting for one conversation; clear it to follow the default again. This is what the offer shown when a turn dies writes, because the press happens inside one conversation and honestly means finish this piece of work.",
|
|
81
|
+
})
|
|
15
82
|
.input(AgentResumeAfterOutageSchema)
|
|
16
83
|
.output(AgentSummarySchema),
|
|
17
|
-
seen: oc
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
84
|
+
seen: oc
|
|
85
|
+
.route({
|
|
86
|
+
method: "POST",
|
|
87
|
+
path: "/agents/{id}/seen",
|
|
88
|
+
summary: "Mark a conversation read",
|
|
89
|
+
description: "Stamps the read marker behind the unread badge on one card. Allowed while the conversation is working, and reading never counts as activity.",
|
|
90
|
+
})
|
|
91
|
+
.input(AgentIdSchema)
|
|
92
|
+
.output(AgentSummarySchema),
|
|
93
|
+
seenAll: oc
|
|
94
|
+
.route({
|
|
95
|
+
method: "POST",
|
|
96
|
+
path: "/agents/seen",
|
|
97
|
+
summary: "Mark every conversation read",
|
|
98
|
+
description: "Clears the unread badge across the whole fleet at once, and hands the refreshed list back.",
|
|
99
|
+
})
|
|
100
|
+
.output(AgentsListSchema),
|
|
101
|
+
diff: oc
|
|
102
|
+
.route({
|
|
103
|
+
method: "GET",
|
|
104
|
+
path: "/agents/{id}/diff",
|
|
105
|
+
summary: "Everything a conversation has changed",
|
|
106
|
+
description: "One flat set of changed files per repo, measured against where each repo stood when the conversation started, with every file flagged as already merged or not. Not the staged-and-unstaged shape a working copy has, because nobody ever checks this branch out to stage into it.",
|
|
107
|
+
})
|
|
108
|
+
.input(AgentIdSchema)
|
|
109
|
+
.output(AgentChangesSchema),
|
|
110
|
+
fileDiff: oc
|
|
111
|
+
.route({
|
|
112
|
+
method: "GET",
|
|
113
|
+
path: "/agents/{id}/{repo}/file-diff",
|
|
114
|
+
summary: "One file's before and after in a conversation's work",
|
|
115
|
+
description: "Both sides of a single file: what it held when the conversation started and what it holds on its branch now.",
|
|
116
|
+
})
|
|
117
|
+
.input(AgentFileDiffQuerySchema)
|
|
118
|
+
.output(FileDiffSchema),
|
|
119
|
+
land: oc
|
|
120
|
+
.route({
|
|
121
|
+
method: "POST",
|
|
122
|
+
path: "/agents/{id}/land",
|
|
123
|
+
summary: "Merge a conversation's work into the workspace",
|
|
124
|
+
description: "Brings the conversation's branches into the main tree, one repo at a time. A conflict is reported rather than raised and nothing is lost when it fails. Refused while a turn is running, and refused for a conversation that works directly in the shared tree, which has nothing to merge.",
|
|
125
|
+
})
|
|
126
|
+
.input(AgentLandSchema)
|
|
127
|
+
.output(LandResultSchema),
|
|
128
|
+
requestLand: oc
|
|
129
|
+
.route({
|
|
130
|
+
method: "POST",
|
|
131
|
+
path: "/agents/{id}/request-land",
|
|
132
|
+
summary: "Ask a maintainer to merge this work",
|
|
133
|
+
description: "For a collaborator who is not allowed to merge: marks the conversation as waiting for review, with who asked. The request shows on every maintainer's board and clears when somebody merges or discards it.",
|
|
134
|
+
})
|
|
135
|
+
.input(AgentIdSchema)
|
|
136
|
+
.output(AgentSummarySchema),
|
|
137
|
+
discard: oc
|
|
138
|
+
.route({
|
|
139
|
+
method: "POST",
|
|
140
|
+
path: "/agents/{id}/discard",
|
|
141
|
+
summary: "Throw a conversation's work away",
|
|
142
|
+
description: "Deletes the conversation's working copies, its branches and its entry. Nothing is kept. Refused while a turn is running, and refused for a conversation working in the shared tree.",
|
|
143
|
+
})
|
|
144
|
+
.input(AgentIdSchema)
|
|
145
|
+
.output(OkSchema),
|
|
146
|
+
archive: oc
|
|
147
|
+
.route({
|
|
148
|
+
method: "POST",
|
|
149
|
+
path: "/agents/archive",
|
|
150
|
+
summary: "Put conversations away",
|
|
151
|
+
description: "The gentle counterpart to discarding. Commits whatever the conversation still has in progress onto its own branch, releases its working copy, and keeps the entry and the record. It leaves the live fleet and joins the archive. Refused for a conversation that is running.",
|
|
152
|
+
})
|
|
153
|
+
.input(AgentArchiveSchema)
|
|
154
|
+
.output(AgentsMovedSchema),
|
|
155
|
+
unarchive: oc
|
|
156
|
+
.route({
|
|
157
|
+
method: "POST",
|
|
158
|
+
path: "/agents/unarchive",
|
|
159
|
+
summary: "Bring conversations back",
|
|
160
|
+
description: "Returns archived conversations to the live fleet. The next turn picks up a fresh working copy from the branch that was kept.",
|
|
161
|
+
})
|
|
162
|
+
.input(AgentIdsSchema)
|
|
163
|
+
.output(AgentsMovedSchema),
|
|
164
|
+
purge: oc
|
|
165
|
+
.route({
|
|
166
|
+
method: "POST",
|
|
167
|
+
path: "/agents/purge",
|
|
168
|
+
summary: "Empty the archive for good",
|
|
169
|
+
description: "Discards every conversation already in the archive: working copies, branches and entries. The whole archive rather than a chosen few, because the archive is the pile somebody has already decided is over. A teardown that fails on one conversation leaves that one behind instead of taking the rest down with it.",
|
|
170
|
+
})
|
|
171
|
+
.output(AgentsRemovedSchema),
|
|
27
172
|
};
|
|
28
173
|
//# sourceMappingURL=agents.contract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.contract.js","sourceRoot":"","sources":["../../src/contracts/agents.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EACH,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,QAAQ,GACX,MAAM,eAAe,CAAC;AA0BvB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,IAAI,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"agents.contract.js","sourceRoot":"","sources":["../../src/contracts/agents.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EACH,kBAAkB,EAClB,mBAA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rB,OAAO,EAAE,EAAE;SACN,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,wBAAwB;QACjC,WAAW,EACP,+QAA+Q;KACtR,CAAC;SACD,KAAK,CAAC,kBAAkB,CAAC;SACzB,MAAM,CAAC,iBAAiB,CAAC;IAC9B,SAAS,EAAE,EAAE;SACR,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,0BAA0B;QACnC,WAAW,EACP,8HAA8H;KACrI,CAAC;SACD,KAAK,CAAC,cAAc,CAAC;SACrB,MAAM,CAAC,iBAAiB,CAAC;IAC9B,KAAK,EAAE,EAAE;SACJ,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,4BAA4B;QACrC,WAAW,EACP,uTAAuT;KAC9T,CAAC;SACD,MAAM,CAAC,mBAAmB,CAAC;CACnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automations.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/automations.contract.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,mBAAmB;IAC5B,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"automations.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/automations.contract.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,mBAAmB;IAC5B,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYJ,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASP,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASN,UAAU;;;;;;IASV,MAAM;;;;;IA4BN,GAAG;;;;;IAUH,WAAW;;;;;;;;;;;;;;;;;;IAQX,OAAO;;;;;IASP,MAAM;;;;;CAST,CAAC"}
|
|
@@ -1,14 +1,83 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { AutomationApprovalIdParamSchema, AutomationApprovalsListSchema, AutomationCatalogSchema, AutomationEnabledInputSchema, AutomationIdParamSchema, AutomationSchema, AutomationsListSchema, OkSchema, } from "../schemas.js";
|
|
3
3
|
export const automationsContract = {
|
|
4
|
-
list: oc
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
list: oc
|
|
5
|
+
.route({
|
|
6
|
+
method: "GET",
|
|
7
|
+
path: "/automations",
|
|
8
|
+
summary: "Things that wake an agent on their own",
|
|
9
|
+
description: "Every automation with its recent runs and when it fires next.",
|
|
10
|
+
})
|
|
11
|
+
.output(AutomationsListSchema),
|
|
12
|
+
catalog: oc
|
|
13
|
+
.route({
|
|
14
|
+
method: "GET",
|
|
15
|
+
path: "/automations/catalog",
|
|
16
|
+
summary: "What can trigger an automation here",
|
|
17
|
+
description: "Every trigger this sandbox understands and every template worth starting from, the daemon's own merged with each installed extension's. Writing an automation is checked against this same list, so a screen and the daemon can never disagree about what is allowed.",
|
|
18
|
+
})
|
|
19
|
+
.output(AutomationCatalogSchema),
|
|
20
|
+
upsert: oc
|
|
21
|
+
.route({
|
|
22
|
+
method: "POST",
|
|
23
|
+
path: "/automations",
|
|
24
|
+
summary: "Create or edit an automation",
|
|
25
|
+
description: "Writes an automation by id. Nothing needs provisioning: the scheduler picks it up on its next sweep.",
|
|
26
|
+
})
|
|
27
|
+
.input(AutomationSchema)
|
|
28
|
+
.output(OkSchema),
|
|
29
|
+
setEnabled: oc
|
|
30
|
+
.route({
|
|
31
|
+
method: "POST",
|
|
32
|
+
path: "/automations/{id}/enabled",
|
|
33
|
+
summary: "Turn an automation on or off",
|
|
34
|
+
description: "Flips only the switch, so a row in a list can be toggled without rebuilding the whole record.",
|
|
35
|
+
})
|
|
36
|
+
.input(AutomationEnabledInputSchema)
|
|
37
|
+
.output(OkSchema),
|
|
38
|
+
remove: oc
|
|
39
|
+
.route({
|
|
40
|
+
method: "DELETE",
|
|
41
|
+
path: "/automations/{id}",
|
|
42
|
+
summary: "Delete an automation",
|
|
43
|
+
description: "Removes it, so nothing fires from it again.",
|
|
44
|
+
})
|
|
45
|
+
.input(AutomationIdParamSchema)
|
|
46
|
+
.output(OkSchema),
|
|
47
|
+
run: oc
|
|
48
|
+
.route({
|
|
49
|
+
method: "POST",
|
|
50
|
+
path: "/automations/{id}/run",
|
|
51
|
+
summary: "Fire an automation by hand",
|
|
52
|
+
description: "The answer to writing something that runs at three in the morning and having no way to try it. It takes exactly the path the real trigger takes, including the check that decides whether there was anything to do, since skipped by the guard is the most useful thing this can tell you. A switched-off automation fires too, because trying it before switching it on is the main reason to press this. Not available for the trigger that listens for incoming messages, where a hand-fire would produce an agent asked to handle events and handed none; send the bot a message instead. Answers straight away and runs detached.",
|
|
53
|
+
})
|
|
54
|
+
.input(AutomationIdParamSchema)
|
|
55
|
+
.output(OkSchema),
|
|
56
|
+
pendingList: oc
|
|
57
|
+
.route({
|
|
58
|
+
method: "GET",
|
|
59
|
+
path: "/automations/pending",
|
|
60
|
+
summary: "Automations waiting for a yes",
|
|
61
|
+
description: "The queue an automation set to ask first lands in each time it would have fired.",
|
|
62
|
+
})
|
|
63
|
+
.output(AutomationApprovalsListSchema),
|
|
64
|
+
approve: oc
|
|
65
|
+
.route({
|
|
66
|
+
method: "POST",
|
|
67
|
+
path: "/automations/pending/{id}/approve",
|
|
68
|
+
summary: "Let a held automation run",
|
|
69
|
+
description: "Releases one waiting automation and runs the wake it was holding. Answers straight away and runs detached.",
|
|
70
|
+
})
|
|
71
|
+
.input(AutomationApprovalIdParamSchema)
|
|
72
|
+
.output(OkSchema),
|
|
73
|
+
reject: oc
|
|
74
|
+
.route({
|
|
75
|
+
method: "POST",
|
|
76
|
+
path: "/automations/pending/{id}/reject",
|
|
77
|
+
summary: "Drop a held automation",
|
|
78
|
+
description: "Throws one waiting fire away. The automation stays on, and the next trigger queues as usual.",
|
|
79
|
+
})
|
|
80
|
+
.input(AutomationApprovalIdParamSchema)
|
|
81
|
+
.output(OkSchema),
|
|
13
82
|
};
|
|
14
83
|
//# sourceMappingURL=automations.contract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automations.contract.js","sourceRoot":"","sources":["../../src/contracts/automations.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EACH,+BAA+B,EAC/B,6BAA6B,EAC7B,uBAAuB,EACvB,4BAA4B,EAC5B,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,QAAQ,GACX,MAAM,eAAe,CAAC;AAQvB,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B,IAAI,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"automations.contract.js","sourceRoot":"","sources":["../../src/contracts/automations.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EACH,+BAA+B,EAC/B,6BAA6B,EAC7B,uBAAuB,EACvB,4BAA4B,EAC5B,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,QAAQ,GACX,MAAM,eAAe,CAAC;AAQvB,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B,IAAI,EAAE,EAAE;SACH,KAAK,CAAC;QACH,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE,wCAAwC;QACjD,WAAW,EAAE,+DAA+D;KAC/E,CAAC;S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AE,kFAAkF;KAClG,CAAC;SACD,MAAM,CAAC,6BAA6B,CAAC;IAC1C,OAAO,EAAE,EAAE;SACN,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,mCAAmC;QACzC,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,4GAA4G;KAC5H,CAAC;SACD,KAAK,CAAC,+BAA+B,CAAC;SACtC,MAAM,CAAC,QAAQ,CAAC;IACrB,MAAM,EAAE,EAAE;SACL,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,kCAAkC;QACxC,OAAO,EAAE,wBAAwB;QACjC,WAAW,EAAE,8FAA8F;KAC9G,CAAC;SACD,KAAK,CAAC,+BAA+B,CAAC;SACtC,MAAM,CAAC,QAAQ,CAAC;CACxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/capabilities.contract.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,oBAAoB;IAC7B,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"capabilities.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/capabilities.contract.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,oBAAoB;IAC7B,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASJ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUH,MAAM;;;;;IAcN,MAAM;;;;;;IAWN,SAAS;;;;;;IAST,MAAM;;;;;;;;;;;;IAcN,UAAU;;;;;;;IAUV,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWX,OAAO;;;;;IAYP,KAAK;;;;;IAaL,GAAG;;;;;;CAUN,CAAC"}
|