@intentic/sandbox-contract 1.231.0 → 1.232.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 +6 -0
- package/dist/contracts/agent.contract.d.ts +11 -0
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.js +10 -1
- package/dist/contracts/agent.contract.js.map +1 -1
- package/dist/contracts/host.contract.d.ts +4 -0
- package/dist/contracts/host.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.d.ts +106 -41
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.js +6 -1
- package/dist/contracts/runner.contract.js.map +1 -1
- package/dist/contracts/system.contract.d.ts +4 -0
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/definition.d.ts +961 -0
- package/dist/definition.d.ts.map +1 -0
- package/dist/definition.js +71 -0
- package/dist/definition.js.map +1 -0
- package/dist/events.d.ts +8 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +5 -0
- package/dist/events.js.map +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +132 -23
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +50 -14
- package/dist/schemas.js.map +1 -1
- package/dist/workspace-state.d.ts +9 -0
- package/dist/workspace-state.d.ts.map +1 -1
- package/dist/workspace-state.js +2 -0
- package/dist/workspace-state.js.map +1 -1
- package/package.json +6 -6
- package/src/contracts/agent.contract.ts +19 -0
- package/src/contracts/runner.contract.ts +17 -1
- package/src/definition.ts +171 -0
- package/src/events.ts +44 -0
- package/src/index.ts +1 -0
- package/src/schemas.ts +119 -28
- package/src/workspace-state.test.ts +4 -0
- package/src/workspace-state.ts +19 -0
package/README.md
CHANGED
|
@@ -47,6 +47,12 @@ mismatch is a type error rather than a runtime surprise.
|
|
|
47
47
|
reason by its three consumers: the daemon's seeder, the recipe gallery, and the drafts routes' instant fire.
|
|
48
48
|
- [src/workflow-faults.ts](src/workflow-faults.ts) and [src/output-fields.ts](src/output-fields.ts): graph and
|
|
49
49
|
structured-output invariants shared by the designer and daemon, including duplicate field-name rejection.
|
|
50
|
+
- [src/definition.ts](src/definition.ts): the SANDBOX DEFINITION, the declarable shape of a sandbox
|
|
51
|
+
(`sandbox.toml`): repositories by remote, connections by shape, secret names, the overlay as source, the
|
|
52
|
+
non-default agent settings — plus the bundle manifest that embeds it, since a bundle is definition + state.
|
|
53
|
+
Shared because the daemon derives and applies definitions and the browser renders their plans, diffs and
|
|
54
|
+
reports; the definition never carries a credential value or an approval hash, so it is the export that is
|
|
55
|
+
safe to publish.
|
|
50
56
|
- [src/index.ts](src/index.ts): the public surface.
|
|
51
57
|
- [src/contract-lock.ts](src/contract-lock.ts) and [contract.lock.json](contract.lock.json): every exported
|
|
52
58
|
schema serialized to one committed, comparable document. Regenerate with `pnpm --filter
|
|
@@ -442,6 +442,9 @@ export declare const agentContract: {
|
|
|
442
442
|
code?: "agent-busy" | "claude-not-entitled" | "claude-reauth" | "claude-token-refused" | "codex-advisory" | "codex-model-invalid" | "codex-reauth" | "context-window-too-small" | "grok-model-invalid" | "provider-outage" | "rate_limit" | "sandbox-memory-low" | "session-not-found" | "subscription-required" | "trial-exhausted" | "trial-model-unavailable" | "trial-unavailable" | "unknown-command" | undefined;
|
|
443
443
|
resetsAt?: number | undefined;
|
|
444
444
|
autoResume?: "available" | "scheduled" | undefined;
|
|
445
|
+
held?: {
|
|
446
|
+
ran: boolean;
|
|
447
|
+
} | undefined;
|
|
445
448
|
outage?: {
|
|
446
449
|
retryAt: number;
|
|
447
450
|
attempt: number;
|
|
@@ -829,6 +832,9 @@ export declare const agentContract: {
|
|
|
829
832
|
code?: "agent-busy" | "claude-not-entitled" | "claude-reauth" | "claude-token-refused" | "codex-advisory" | "codex-model-invalid" | "codex-reauth" | "context-window-too-small" | "grok-model-invalid" | "provider-outage" | "rate_limit" | "sandbox-memory-low" | "session-not-found" | "subscription-required" | "trial-exhausted" | "trial-model-unavailable" | "trial-unavailable" | "unknown-command" | undefined;
|
|
830
833
|
resetsAt?: number | undefined;
|
|
831
834
|
autoResume?: "available" | "scheduled" | undefined;
|
|
835
|
+
held?: {
|
|
836
|
+
ran: boolean;
|
|
837
|
+
} | undefined;
|
|
832
838
|
outage?: {
|
|
833
839
|
retryAt: number;
|
|
834
840
|
attempt: number;
|
|
@@ -902,6 +908,11 @@ export declare const agentContract: {
|
|
|
902
908
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
903
909
|
ok: import("zod").ZodLiteral<true>;
|
|
904
910
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
911
|
+
resume: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
912
|
+
conversationId: import("zod").ZodString;
|
|
913
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
914
|
+
run: import("zod").ZodString;
|
|
915
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
905
916
|
rewind: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
906
917
|
conversationId: import("zod").ZodString;
|
|
907
918
|
index: import("zod").ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/agent.contract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/agent.contract.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,aAAa;IACtB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUH,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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chema, AttachTurnSchema, OkSchema, ProviderRefusalsSchema, RewindResultSchema, RewindTurnSchema, StartedTurnSchema, SteerSchema, StopTurnSchema, } from "../schemas.js";
|
|
3
|
+
import { AgentReplySchema, AgentTurnSchema, AttachTurnSchema, OkSchema, ProviderRefusalsSchema, ResumeTurnSchema, RewindResultSchema, RewindTurnSchema, StartedTurnSchema, SteerSchema, StopTurnSchema, } from "../schemas.js";
|
|
4
4
|
export const agentContract = {
|
|
5
5
|
run: oc
|
|
6
6
|
.route({
|
|
@@ -47,6 +47,15 @@ export const agentContract = {
|
|
|
47
47
|
})
|
|
48
48
|
.input(StopTurnSchema)
|
|
49
49
|
.output(OkSchema),
|
|
50
|
+
resume: oc
|
|
51
|
+
.route({
|
|
52
|
+
method: "POST",
|
|
53
|
+
path: "/agent/resume",
|
|
54
|
+
summary: "Run a refused turn again",
|
|
55
|
+
description: "Sends the same turn again when the model provider's allowance refused it, with everything it originally carried. It repeats the request rather than adding a new message to the conversation, so pressing it twice costs nothing and the agent is never told to continue work it has not started.",
|
|
56
|
+
})
|
|
57
|
+
.input(ResumeTurnSchema)
|
|
58
|
+
.output(StartedTurnSchema),
|
|
50
59
|
rewind: oc
|
|
51
60
|
.route({
|
|
52
61
|
method: "POST",
|
|
@@ -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;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,EAAE,qBAAqB;QAC9B,WAAW,EACP,mVAAmV;KAC1V,CAAC;SACD,KAAK,CAAC,gBAAgB,CAAC;SACvB,MAAM,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC7C,KAAK,EAAE,EAAE;SACJ,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE,mCAAmC;QAC5C,WAAW,EACP,+IAA+I;KACtJ,CAAC;SACD,KAAK,CAAC,gBAAgB,CAAC;SACvB,MAAM,CAAC,QAAQ,CAAC;IACrB,KAAK,EAAE,EAAE;SACJ,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE,0BAA0B;QACnC,WAAW,EACP,qKAAqK;KAC5K,CAAC;SACD,KAAK,CAAC,WAAW,CAAC;SAClB,MAAM,CAAC,QAAQ,CAAC;IACrB,IAAI,EAAE,EAAE;SACH,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,iBAAiB;QAC1B,WAAW,EAAE,qGAAqG;KACrH,CAAC;SACD,KAAK,CAAC,cAAc,CAAC;SACrB,MAAM,CAAC,QAAQ,CAAC;
|
|
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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AE,MAAM;QACd,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,iBAAiB;QAC1B,WAAW,EAAE,qGAAqG;KACrH,CAAC;SACD,KAAK,CAAC,cAAc,CAAC;SACrB,MAAM,CAAC,QAAQ,CAAC;IASrB,MAAM,EAAE,EAAE;SACL,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,0BAA0B;QACnC,WAAW,EACP,mSAAmS;KAC1S,CAAC;SACD,KAAK,CAAC,gBAAgB,CAAC;SACvB,MAAM,CAAC,iBAAiB,CAAC;IAI9B,MAAM,EAAE,EAAE;SACL,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,+BAA+B;QACxC,WAAW,EACP,uUAAuU;KAC9U,CAAC;SACD,KAAK,CAAC,gBAAgB,CAAC;SACvB,MAAM,CAAC,kBAAkB,CAAC;IAG/B,QAAQ,EAAE,EAAE;SACP,KAAK,CAAC;QACH,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,mCAAmC;QAC5C,WAAW,EACP,6LAA6L;KACpM,CAAC;SACD,KAAK,CAAC,wBAAwB,CAAC;SAC/B,MAAM,CAAC,mBAAmB,CAAC;IAIhC,QAAQ,EAAE,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"}
|
|
@@ -48,12 +48,16 @@ export declare const hostContract: {
|
|
|
48
48
|
remove: "remove";
|
|
49
49
|
restart: "restart";
|
|
50
50
|
rollback: "rollback";
|
|
51
|
+
"runner-remove": "runner-remove";
|
|
52
|
+
"runner-up": "runner-up";
|
|
51
53
|
start: "start";
|
|
52
54
|
stop: "stop";
|
|
53
55
|
update: "update";
|
|
54
56
|
}>;
|
|
55
57
|
slug: z.ZodString;
|
|
56
58
|
hash: z.ZodOptional<z.ZodString>;
|
|
59
|
+
parentUrl: z.ZodOptional<z.ZodString>;
|
|
60
|
+
pair: z.ZodOptional<z.ZodString>;
|
|
57
61
|
}, z.core.$strip>, import("@orpc/contract").Schema<AsyncIteratorObject<{
|
|
58
62
|
kind: "line";
|
|
59
63
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/host.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,YAAY;IAGrB,QAAQ;;;;;;;IAGR,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGT,IAAI;;;IAEJ,GAAG;IAWH,cAAc
|
|
1
|
+
{"version":3,"file":"host.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/host.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,YAAY;IAGrB,QAAQ;;;;;;;IAGR,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGT,IAAI;;;IAEJ,GAAG;IAWH,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACjB,CAAC"}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
export declare const runnerContract: {
|
|
2
|
-
describe: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>,
|
|
3
|
-
cpus:
|
|
4
|
-
memoryMb:
|
|
5
|
-
freeDiskMb:
|
|
6
|
-
load:
|
|
7
|
-
},
|
|
8
|
-
syncWorkspace: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<
|
|
9
|
-
op:
|
|
3
|
+
describe: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
4
|
+
cpus: z.ZodNumber;
|
|
5
|
+
memoryMb: z.ZodNumber;
|
|
6
|
+
freeDiskMb: z.ZodNumber;
|
|
7
|
+
load: z.ZodNumber;
|
|
8
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
9
|
+
syncWorkspace: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
10
|
+
op: z.ZodEnum<{
|
|
10
11
|
pull: "pull";
|
|
11
12
|
push: "push";
|
|
12
13
|
}>;
|
|
13
|
-
conversationId:
|
|
14
|
-
branch:
|
|
15
|
-
repos:
|
|
16
|
-
repo:
|
|
17
|
-
dir:
|
|
18
|
-
mainBranch:
|
|
19
|
-
},
|
|
20
|
-
},
|
|
14
|
+
conversationId: z.ZodString;
|
|
15
|
+
branch: z.ZodString;
|
|
16
|
+
repos: z.ZodArray<z.ZodObject<{
|
|
17
|
+
repo: z.ZodString;
|
|
18
|
+
dir: z.ZodString;
|
|
19
|
+
mainBranch: z.ZodString;
|
|
20
|
+
}, z.core.$strip>>;
|
|
21
|
+
}, z.core.$strip>, import("@orpc/contract").Schema<AsyncIteratorObject<{
|
|
21
22
|
kind: "line";
|
|
22
23
|
text: string;
|
|
23
24
|
} | {
|
|
@@ -32,23 +33,23 @@ export declare const runnerContract: {
|
|
|
32
33
|
ok: boolean;
|
|
33
34
|
detail?: string | undefined;
|
|
34
35
|
}, unknown, void>>, Record<never, never>, Record<never, never>>;
|
|
35
|
-
runTurn: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<
|
|
36
|
-
conversationId:
|
|
37
|
-
branch:
|
|
38
|
-
prompt:
|
|
39
|
-
provider:
|
|
40
|
-
harness:
|
|
41
|
-
model:
|
|
42
|
-
effort:
|
|
43
|
-
thinking:
|
|
44
|
-
fast:
|
|
45
|
-
account:
|
|
46
|
-
sessionId:
|
|
47
|
-
attachments:
|
|
48
|
-
path:
|
|
49
|
-
bytesBase64:
|
|
50
|
-
},
|
|
51
|
-
},
|
|
36
|
+
runTurn: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
37
|
+
conversationId: z.ZodString;
|
|
38
|
+
branch: z.ZodString;
|
|
39
|
+
prompt: z.ZodString;
|
|
40
|
+
provider: z.ZodString;
|
|
41
|
+
harness: z.ZodString;
|
|
42
|
+
model: z.ZodOptional<z.ZodString>;
|
|
43
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
44
|
+
thinking: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
fast: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
account: z.ZodOptional<z.ZodString>;
|
|
47
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
48
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
|
+
path: z.ZodString;
|
|
50
|
+
bytesBase64: z.ZodString;
|
|
51
|
+
}, z.core.$strip>>>;
|
|
52
|
+
}, z.core.$strip>, import("@orpc/contract").Schema<AsyncIteratorObject<{
|
|
52
53
|
kind: "session";
|
|
53
54
|
sessionId: string;
|
|
54
55
|
} | {
|
|
@@ -416,6 +417,9 @@ export declare const runnerContract: {
|
|
|
416
417
|
code?: "agent-busy" | "claude-not-entitled" | "claude-reauth" | "claude-token-refused" | "codex-advisory" | "codex-model-invalid" | "codex-reauth" | "context-window-too-small" | "grok-model-invalid" | "provider-outage" | "rate_limit" | "sandbox-memory-low" | "session-not-found" | "subscription-required" | "trial-exhausted" | "trial-model-unavailable" | "trial-unavailable" | "unknown-command" | undefined;
|
|
417
418
|
resetsAt?: number | undefined;
|
|
418
419
|
autoResume?: "available" | "scheduled" | undefined;
|
|
420
|
+
held?: {
|
|
421
|
+
ran: boolean;
|
|
422
|
+
} | undefined;
|
|
419
423
|
outage?: {
|
|
420
424
|
retryAt: number;
|
|
421
425
|
attempt: number;
|
|
@@ -791,6 +795,9 @@ export declare const runnerContract: {
|
|
|
791
795
|
code?: "agent-busy" | "claude-not-entitled" | "claude-reauth" | "claude-token-refused" | "codex-advisory" | "codex-model-invalid" | "codex-reauth" | "context-window-too-small" | "grok-model-invalid" | "provider-outage" | "rate_limit" | "sandbox-memory-low" | "session-not-found" | "subscription-required" | "trial-exhausted" | "trial-model-unavailable" | "trial-unavailable" | "unknown-command" | undefined;
|
|
792
796
|
resetsAt?: number | undefined;
|
|
793
797
|
autoResume?: "available" | "scheduled" | undefined;
|
|
798
|
+
held?: {
|
|
799
|
+
ran: boolean;
|
|
800
|
+
} | undefined;
|
|
794
801
|
outage?: {
|
|
795
802
|
retryAt: number;
|
|
796
803
|
attempt: number;
|
|
@@ -799,13 +806,71 @@ export declare const runnerContract: {
|
|
|
799
806
|
} | {
|
|
800
807
|
kind: "done";
|
|
801
808
|
}, unknown, void>>, Record<never, never>, Record<never, never>>;
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
809
|
+
reply: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
810
|
+
kind: z.ZodLiteral<"plan">;
|
|
811
|
+
requestId: z.ZodString;
|
|
812
|
+
approve: z.ZodBoolean;
|
|
813
|
+
feedback: z.ZodOptional<z.ZodString>;
|
|
814
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
815
|
+
kind: z.ZodLiteral<"question">;
|
|
816
|
+
requestId: z.ZodString;
|
|
817
|
+
answers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
818
|
+
cancelled: z.ZodOptional<z.ZodBoolean>;
|
|
819
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
820
|
+
kind: z.ZodLiteral<"permission">;
|
|
821
|
+
requestId: z.ZodString;
|
|
822
|
+
decision: z.ZodEnum<{
|
|
823
|
+
always: "always";
|
|
824
|
+
deny: "deny";
|
|
825
|
+
once: "once";
|
|
826
|
+
}>;
|
|
827
|
+
feedback: z.ZodOptional<z.ZodString>;
|
|
828
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
829
|
+
kind: z.ZodLiteral<"browser_help">;
|
|
830
|
+
requestId: z.ZodString;
|
|
831
|
+
helped: z.ZodBoolean;
|
|
832
|
+
note: z.ZodOptional<z.ZodString>;
|
|
833
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
834
|
+
kind: z.ZodLiteral<"terminal_help">;
|
|
835
|
+
requestId: z.ZodString;
|
|
836
|
+
helped: z.ZodBoolean;
|
|
837
|
+
note: z.ZodOptional<z.ZodString>;
|
|
838
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
839
|
+
kind: z.ZodLiteral<"service_offer">;
|
|
840
|
+
requestId: z.ZodString;
|
|
841
|
+
approve: z.ZodBoolean;
|
|
842
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
843
|
+
kind: z.ZodLiteral<"capability_offer">;
|
|
844
|
+
requestId: z.ZodString;
|
|
845
|
+
connect: z.ZodBoolean;
|
|
846
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
847
|
+
kind: z.ZodLiteral<"payment_offer">;
|
|
848
|
+
requestId: z.ZodString;
|
|
849
|
+
approve: z.ZodBoolean;
|
|
850
|
+
}, z.core.$strip>], "kind">, z.ZodObject<{
|
|
851
|
+
applied: z.ZodBoolean;
|
|
852
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
853
|
+
steer: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
854
|
+
conversationId: z.ZodString;
|
|
855
|
+
text: z.ZodString;
|
|
856
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
857
|
+
editorContext: z.ZodOptional<z.ZodObject<{
|
|
858
|
+
file: z.ZodString;
|
|
859
|
+
startLine: z.ZodOptional<z.ZodNumber>;
|
|
860
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
861
|
+
selection: z.ZodOptional<z.ZodString>;
|
|
862
|
+
}, z.core.$strip>>;
|
|
863
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
864
|
+
applied: z.ZodBoolean;
|
|
865
|
+
invalid: z.ZodOptional<z.ZodString>;
|
|
866
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
867
|
+
interrupt: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
868
|
+
conversationId: z.ZodString;
|
|
869
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
870
|
+
ok: z.ZodLiteral<true>;
|
|
871
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
872
|
+
ping: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
873
|
+
ok: z.ZodLiteral<true>;
|
|
874
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
810
875
|
};
|
|
811
876
|
//# sourceMappingURL=runner.contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/runner.contract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runner.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/runner.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,cAAc;IAIvB,QAAQ;;;;;;IAGR,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGb,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASP,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIL,KAAK;;;;;;;;;;;;;;IAIL,SAAS;;;;;IAET,IAAI;;;CACP,CAAC"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { eventIterator, oc } from "@orpc/contract";
|
|
2
|
+
import { z } from "zod";
|
|
2
3
|
import { AgentEventSchema } from "../events.js";
|
|
3
4
|
import { RunnerFactsSchema, RunnerSyncLineSchema, RunnerSyncSchema, RunnerTurnSchema } from "../runner-protocol.js";
|
|
4
|
-
import { OkSchema } from "../schemas.js";
|
|
5
|
+
import { AgentReplySchema, EditorContextSchema, OkSchema } from "../schemas.js";
|
|
5
6
|
export const runnerContract = {
|
|
6
7
|
describe: oc.output(RunnerFactsSchema),
|
|
7
8
|
syncWorkspace: oc.input(RunnerSyncSchema).output(eventIterator(RunnerSyncLineSchema)),
|
|
8
9
|
runTurn: oc.input(RunnerTurnSchema).output(eventIterator(AgentEventSchema)),
|
|
10
|
+
reply: oc.input(AgentReplySchema).output(z.object({ applied: z.boolean() })),
|
|
11
|
+
steer: oc
|
|
12
|
+
.input(z.object({ conversationId: z.string().min(1), text: z.string(), attachments: z.array(z.string()).optional(), editorContext: EditorContextSchema.optional() }))
|
|
13
|
+
.output(z.object({ applied: z.boolean(), invalid: z.string().optional() })),
|
|
9
14
|
interrupt: oc.input(RunnerTurnSchema.pick({ conversationId: true })).output(OkSchema),
|
|
10
15
|
ping: oc.output(OkSchema),
|
|
11
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.contract.js","sourceRoot":"","sources":["../../src/contracts/runner.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"runner.contract.js","sourceRoot":"","sources":["../../src/contracts/runner.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,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpH,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAchF,MAAM,CAAC,MAAM,cAAc,GAAG;IAI1B,QAAQ,EAAE,EAAE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|
|
534
|
+
"runner-remove": "runner-remove";
|
|
535
|
+
"runner-up": "runner-up";
|
|
534
536
|
start: "start";
|
|
535
537
|
stop: "stop";
|
|
536
538
|
update: "update";
|
|
537
539
|
}>;
|
|
538
540
|
slug: z.ZodString;
|
|
539
541
|
hash: z.ZodOptional<z.ZodString>;
|
|
542
|
+
parentUrl: z.ZodOptional<z.ZodString>;
|
|
543
|
+
pair: z.ZodOptional<z.ZodString>;
|
|
540
544
|
id: z.ZodString;
|
|
541
545
|
}, z.core.$strip>, import("@orpc/contract").Schema<AsyncIteratorObject<{
|
|
542
546
|
kind: "line";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/system.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0BxB,eAAO,MAAM,cAAc;IACvB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;IAYJ,gBAAgB;;;;;;;;;;;;IAWhB,OAAO;;;;;IASP,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWN,QAAQ;;;;;;;;;IAWR,KAAK;;;;;;;;;;;;IAYL,SAAS;;;;;;;;;;;;;;;;;;;;;;;;IAST,YAAY;;;;;IAYZ,kBAAkB;;;;;;;;;IAelB,QAAQ;;;;;;;;;;;;;;;;;;;;;IASR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