@intentic/sandbox-contract 1.290.0 → 1.291.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.
Files changed (53) hide show
  1. package/dist/contracts/diff.contract.d.ts +49 -0
  2. package/dist/contracts/diff.contract.d.ts.map +1 -0
  3. package/dist/contracts/diff.contract.js +14 -0
  4. package/dist/contracts/diff.contract.js.map +1 -0
  5. package/dist/contracts/extensions.contract.d.ts +1 -0
  6. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  7. package/dist/contracts/runner.contract.d.ts +95 -95
  8. package/dist/contracts/system.contract.d.ts +45 -30
  9. package/dist/contracts/system.contract.d.ts.map +1 -1
  10. package/dist/index.d.ts +66 -0
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +4 -0
  13. package/dist/index.js.map +1 -1
  14. package/dist/models/agent-catalog.d.ts +1 -0
  15. package/dist/models/agent-catalog.d.ts.map +1 -1
  16. package/dist/models/agent-catalog.js +1 -0
  17. package/dist/models/agent-catalog.js.map +1 -1
  18. package/dist/models/agent-runtimes.d.ts.map +1 -1
  19. package/dist/models/agent-runtimes.js +2 -2
  20. package/dist/models/agent-runtimes.js.map +1 -1
  21. package/dist/models/plan-pools.d.ts +13 -0
  22. package/dist/models/plan-pools.d.ts.map +1 -1
  23. package/dist/models/plan-pools.js +43 -0
  24. package/dist/models/plan-pools.js.map +1 -1
  25. package/dist/schemas/devices.d.ts +21 -0
  26. package/dist/schemas/devices.d.ts.map +1 -1
  27. package/dist/schemas/devices.js +7 -1
  28. package/dist/schemas/devices.js.map +1 -1
  29. package/dist/schemas/diff.d.ts +62 -0
  30. package/dist/schemas/diff.d.ts.map +1 -0
  31. package/dist/schemas/diff.js +59 -0
  32. package/dist/schemas/diff.js.map +1 -0
  33. package/dist/schemas/extension-updates.d.ts +2 -0
  34. package/dist/schemas/extension-updates.d.ts.map +1 -1
  35. package/dist/schemas/terminal.d.ts +22 -0
  36. package/dist/schemas/terminal.d.ts.map +1 -1
  37. package/dist/schemas/terminal.js +9 -0
  38. package/dist/schemas/terminal.js.map +1 -1
  39. package/dist/state/history-state.d.ts.map +1 -1
  40. package/dist/state/history-state.js +1 -0
  41. package/dist/state/history-state.js.map +1 -1
  42. package/package.json +5 -5
  43. package/src/contracts/diff.contract.ts +17 -0
  44. package/src/index.ts +4 -0
  45. package/src/models/agent-catalog.test.ts +6 -2
  46. package/src/models/agent-catalog.ts +5 -0
  47. package/src/models/agent-runtimes.ts +7 -4
  48. package/src/models/plan-pools.test.ts +40 -1
  49. package/src/models/plan-pools.ts +69 -0
  50. package/src/schemas/devices.ts +20 -1
  51. package/src/schemas/diff.ts +72 -0
  52. package/src/schemas/terminal.ts +11 -0
  53. package/src/state/history-state.ts +3 -0
@@ -0,0 +1,62 @@
1
+ import { z } from "zod";
2
+ export declare const DiffSourceQuerySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3
+ source: z.ZodLiteral<"working">;
4
+ repo: z.ZodString;
5
+ side: z.ZodEnum<{
6
+ conflicted: "conflicted";
7
+ staged: "staged";
8
+ unstaged: "unstaged";
9
+ }>;
10
+ path: z.ZodString;
11
+ }, z.core.$strip>, z.ZodObject<{
12
+ source: z.ZodLiteral<"agent">;
13
+ agent: z.ZodString;
14
+ repo: z.ZodString;
15
+ path: z.ZodString;
16
+ }, z.core.$strip>, z.ZodObject<{
17
+ source: z.ZodLiteral<"commit">;
18
+ repo: z.ZodString;
19
+ sha: z.ZodString;
20
+ path: z.ZodString;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ source: z.ZodLiteral<"checkpoint">;
23
+ snapshot: z.ZodString;
24
+ scope: z.ZodString;
25
+ path: z.ZodString;
26
+ }, z.core.$strip>], "source">;
27
+ export type DiffSourceQuery = z.infer<typeof DiffSourceQuerySchema>;
28
+ export declare const DerivedSideSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
29
+ present: z.ZodLiteral<true>;
30
+ content: z.ZodString;
31
+ deriver: z.ZodString;
32
+ notes: z.ZodArray<z.ZodString>;
33
+ truncated: z.ZodBoolean;
34
+ }, z.core.$strip>, z.ZodObject<{
35
+ present: z.ZodLiteral<false>;
36
+ reason: z.ZodString;
37
+ }, z.core.$strip>], "present">;
38
+ export type DerivedSide = z.infer<typeof DerivedSideSchema>;
39
+ export declare const DerivedDiffSchema: z.ZodObject<{
40
+ before: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
41
+ present: z.ZodLiteral<true>;
42
+ content: z.ZodString;
43
+ deriver: z.ZodString;
44
+ notes: z.ZodArray<z.ZodString>;
45
+ truncated: z.ZodBoolean;
46
+ }, z.core.$strip>, z.ZodObject<{
47
+ present: z.ZodLiteral<false>;
48
+ reason: z.ZodString;
49
+ }, z.core.$strip>], "present">>;
50
+ after: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
51
+ present: z.ZodLiteral<true>;
52
+ content: z.ZodString;
53
+ deriver: z.ZodString;
54
+ notes: z.ZodArray<z.ZodString>;
55
+ truncated: z.ZodBoolean;
56
+ }, z.core.$strip>, z.ZodObject<{
57
+ present: z.ZodLiteral<false>;
58
+ reason: z.ZodString;
59
+ }, z.core.$strip>], "present">>;
60
+ }, z.core.$strip>;
61
+ export type DerivedDiff = z.infer<typeof DerivedDiffSchema>;
62
+ //# sourceMappingURL=diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/schemas/diff.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;6BAoChC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAIpE,eAAO,MAAM,iBAAiB;;;;;;;;;8BAY5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAG5D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;iBAG5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,59 @@
1
+ import { z } from "zod";
2
+ import { GitDiffSideSchema } from "./git/git.js";
3
+ const path = z.string().min(1).describe("The file, relative to the repo or scope the diff belongs to.");
4
+ const repo = z.string().min(1).describe('Which repository: "root" for the workspace itself, otherwise a repo id.');
5
+ export const DiffSourceQuerySchema = z.discriminatedUnion("source", [
6
+ z
7
+ .object({
8
+ source: z.literal("working"),
9
+ repo,
10
+ side: GitDiffSideSchema.describe("Which git side the row came from; a half-staged file is two different diffs."),
11
+ path,
12
+ })
13
+ .describe("Uncommitted work in a workspace repo, what the Changes panel lists."),
14
+ z
15
+ .object({
16
+ source: z.literal("agent"),
17
+ agent: z.string().min(1).describe("The conversation whose work is under review."),
18
+ repo,
19
+ path,
20
+ })
21
+ .describe("One agent's work against the base its review is listed against."),
22
+ z
23
+ .object({
24
+ source: z.literal("commit"),
25
+ repo,
26
+ sha: z
27
+ .string()
28
+ .regex(/^[0-9a-f]{4,64}$/)
29
+ .describe("The commit, compared against its first parent."),
30
+ path,
31
+ })
32
+ .describe("A commit against its first parent."),
33
+ z
34
+ .object({
35
+ source: z.literal("checkpoint"),
36
+ snapshot: z.string().min(1).describe("Which saved point."),
37
+ scope: z.string().min(1).describe("Which part of the workspace the path belongs to."),
38
+ path,
39
+ })
40
+ .describe("A saved point in the timeline, against the visible one before it."),
41
+ ]);
42
+ export const DerivedSideSchema = z.discriminatedUnion("present", [
43
+ z.object({
44
+ present: z.literal(true),
45
+ content: z.string().describe("The side as markdown."),
46
+ deriver: z.string().describe("Which reader made this text, with its version."),
47
+ notes: z.array(z.string()).describe("Every cap and degradation the conversion hit, one line each."),
48
+ truncated: z.boolean().describe("The rendering was longer than this response carries; only its start is here."),
49
+ }),
50
+ z.object({
51
+ present: z.literal(false),
52
+ reason: z.string().describe("Why this side has no text: a format nothing reads, a broken file, a sandbox with no reader."),
53
+ }),
54
+ ]);
55
+ export const DerivedDiffSchema = z.object({
56
+ before: DerivedSideSchema.optional().describe("The file as it was, rendered to text. Absent when it did not exist yet."),
57
+ after: DerivedSideSchema.optional().describe("The file as it is now, rendered to text. Absent when it was deleted."),
58
+ });
59
+ //# sourceMappingURL=diff.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.js","sourceRoot":"","sources":["../../src/schemas/diff.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,8DAA8D,CAAC,CAAC;AACxG,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,yEAAyE,CAAC,CAAC;AAInH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IAChE,CAAC;SACI,MAAM,CAAC;QACJ,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QAC5B,IAAI;QACJ,IAAI,EAAE,iBAAiB,CAAC,QAAQ,CAAC,8EAA8E,CAAC;QAChH,IAAI;KACP,CAAC;SACD,QAAQ,CAAC,qEAAqE,CAAC;IACpF,CAAC;SACI,MAAM,CAAC;QACJ,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;QAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,8CAA8C,CAAC;QACjF,IAAI;QACJ,IAAI;KACP,CAAC;SACD,QAAQ,CA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,CAAC;QACzB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6FAA6F,CAAC;KAC7H,CAAC;CACL,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,MAAM,EAAE,iBAAiB,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yEAAyE,CAAC;IACxH,KAAK,EAAE,iBAAiB,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sEAAsE,CAAC;CACvH,CAAC,CAAC"}
@@ -453,6 +453,7 @@ export declare const ExtensionSummarySchema: z.ZodObject<{
453
453
  url: "url";
454
454
  }>;
455
455
  edit: z.ZodOptional<z.ZodBoolean>;
456
+ compare: z.ZodOptional<z.ZodBoolean>;
456
457
  }, z.core.$strip>>>;
457
458
  views: z.ZodOptional<z.ZodArray<z.ZodObject<{
458
459
  id: z.ZodString;
@@ -908,6 +909,7 @@ export declare const ExtensionsListSchema: z.ZodObject<{
908
909
  url: "url";
909
910
  }>;
910
911
  edit: z.ZodOptional<z.ZodBoolean>;
912
+ compare: z.ZodOptional<z.ZodBoolean>;
911
913
  }, z.core.$strip>>>;
912
914
  views: z.ZodOptional<z.ZodArray<z.ZodObject<{
913
915
  id: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"extension-updates.d.ts","sourceRoot":"","sources":["../../src/schemas/extension-updates.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,2BAA2B;;;;;;;;;;iBAGtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAGhF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;iBA6BhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eA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;
80
80
  }, z.core.$strip>>;
81
+ dialog: z.ZodOptional<z.ZodObject<{
82
+ pageId: z.ZodString;
83
+ kind: z.ZodEnum<{
84
+ alert: "alert";
85
+ beforeunload: "beforeunload";
86
+ confirm: "confirm";
87
+ prompt: "prompt";
88
+ }>;
89
+ message: z.ZodString;
90
+ defaultValue: z.ZodOptional<z.ZodString>;
91
+ }, z.core.$strip>>;
81
92
  pages: z.ZodArray<z.ZodObject<{
82
93
  id: z.ZodString;
83
94
  title: z.ZodOptional<z.ZodString>;
@@ -100,6 +111,17 @@ export declare const BrowsersListSchema: z.ZodObject<{
100
111
  message: z.ZodString;
101
112
  requestedAt: z.ZodNumber;
102
113
  }, z.core.$strip>>;
114
+ dialog: z.ZodOptional<z.ZodObject<{
115
+ pageId: z.ZodString;
116
+ kind: z.ZodEnum<{
117
+ alert: "alert";
118
+ beforeunload: "beforeunload";
119
+ confirm: "confirm";
120
+ prompt: "prompt";
121
+ }>;
122
+ message: z.ZodString;
123
+ defaultValue: z.ZodOptional<z.ZodString>;
124
+ }, z.core.$strip>>;
103
125
  pages: z.ZodArray<z.ZodObject<{
104
126
  id: z.ZodString;
105
127
  title: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../src/schemas/terminal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;iBAkChC,CAAC;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;iBAI9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,eAAO,MAAM,uBAAuB;;iBAA6D,CAAC;AAGlG,eAAO,MAAM,6BAA6B;;;iBAGxC,CAAC;AACH,eAAO,MAAM,wBAAwB;;;;;iBAMnC,CAAC;AACH,MAA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AO,MAAM,oBAAoB;;;;;;;;EAAuF,CAAC;AACzH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAMlE,eAAO,MAAM,0BAA0B;;;;;;;;;iBAarC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoDhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,eAAO,MAAM,qBAAqB;;iBAA+B,CAAC"}
@@ -71,6 +71,15 @@ export const BrowserSessionSchema = z.object({
71
71
  })
72
72
  .optional()
73
73
  .describe("The agent has hit something only a person can clear: a captcha, a password it does not hold, a check on your phone. Present only while it is waiting."),
74
+ dialog: z
75
+ .object({
76
+ pageId: z.string().describe("Which page opened it."),
77
+ kind: z.enum(["alert", "confirm", "prompt", "beforeunload"]).describe("What it asks: an alert wants dismissing, a confirm a yes or no, a prompt a text."),
78
+ message: z.string().describe("What the page says."),
79
+ defaultValue: z.string().optional().describe("A prompt's prefilled answer."),
80
+ })
81
+ .optional()
82
+ .describe("A dialog a page has open and is waiting on. You or the agent answers it; present only while it is open."),
74
83
  pages: z
75
84
  .array(BrowserPageSchema)
76
85
  .describe("Every page it has open. A browser holds several at once, which is the reason it is listed apart from the terminals."),
@@ -1 +1 @@
1
- {"version":3,"file":"terminal.js","sourceRoot":"","sources":["../../src/schemas/terminal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,E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,QAAQ,EAAE;SACV,QAAQ,CAAC,4GAA4G,CAAC;IAC3H,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IAEpE,YAAY,EAAE,0BAA0B,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;CACzH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,CAAC,2EAA2E,CAAC;CACjI,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"history-state.d.ts","sourceRoot":"","sources":["../../src/state/history-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAQxD,eAAO,MAAM,mBAAmB,EAAE,SAAS,SAAS,EA8FnD,CAAC"}
1
+ {"version":3,"file":"history-state.d.ts","sourceRoot":"","sources":["../../src/state/history-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAQxD,eAAO,MAAM,mBAAmB,EAAE,SAAS,SAAS,EAiGnD,CAAC"}
@@ -10,6 +10,7 @@ export const HISTORY_STATE_FILES = [
10
10
  { path: "activity.jsonl", portability: "carry" },
11
11
  { path: "usage.jsonl", portability: "carry" },
12
12
  { path: "account-usage.json", portability: "carry" },
13
+ { path: "usage-parks.json", portability: "carry" },
13
14
  { path: "provider-refusals.json", portability: "carry" },
14
15
  { path: "model-refusals.json", portability: "carry" },
15
16
  { path: "dependency-requests.json", portability: "carry" },
@@ -1 +1 @@
1
- {"version":3,"file":"history-state.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E,gHAAgH;KACzH;IACD;QACI,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,8GAA8G;KACvH;IACD,EAAE,IAAI,EAAE,uBAAuB,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,yCAAyC,EAAE;IAC3G,EAAE,IAAI,EAAE,yBAAyB,EAAE,WAAW,EAAE,UAAU,EAAE;IAC5D,EAAE,IAAI,EAAE,uBAAuB,EAAE,WAAW,EAAE,UAAU,EAAE;IAE1D,EAAE,IAAI,EAAE,yBAAyB,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,0EAA0E,EAAE;IAE9I,EAAE,IAAI,EAAE,2BAA2B,EAAE,WAAW,EAAE,UAAU,EAAE;IAE9D,EAAE,IAAI,EAAE,yBAAyB,EAAE,WAAW,EAAE,UAAU,EAAE;IAE5D,EAAE,IAAI,EAAE,yBAAyB,EAAE,WAAW,EAAE,UAAU,EAAE;IAC5D,EAAE,IAAI,EAAE,2BAA2B,EAAE,WAAW,EAAE,UAAU,EAAE;IAE9D,EAAE,IAAI,EAAE,sBAAsB,EAAE,WAAW,EAAE,UAAU,EAAE;IACzD,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE;CACnD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentic/sandbox-contract",
3
- "version": "1.290.0",
3
+ "version": "1.291.0",
4
4
  "description": "oRPC wire contract for the intentic sandbox daemon, shared by the daemon and its browser client",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -207,10 +207,10 @@
207
207
  }
208
208
  },
209
209
  "dependencies": {
210
- "@intentic/base": "1.290.0",
211
- "@intentic/constants": "1.290.0",
212
- "@intentic/extension-manifest": "1.290.0",
213
- "@intentic/registry": "1.290.0",
210
+ "@intentic/base": "1.291.0",
211
+ "@intentic/constants": "1.291.0",
212
+ "@intentic/extension-manifest": "1.291.0",
213
+ "@intentic/registry": "1.291.0",
214
214
  "@orpc/contract": "1.14.13",
215
215
  "tslib": "2.8.1",
216
216
  "zod": "4.5.4"
@@ -0,0 +1,17 @@
1
+ import { oc } from "@orpc/contract";
2
+ import { DerivedDiffSchema, DiffSourceQuerySchema } from "../schemas/diff.js";
3
+
4
+ // What a diff's two sides are besides text: the byte route (/diff/raw) is plain Hono since it streams a body; the
5
+ // derived-text route is here, answering both sides in one call so they render together.
6
+ export const diffContract = {
7
+ derived: oc
8
+ .route({
9
+ method: "GET",
10
+ path: "/diff/derived",
11
+ summary: "Both sides of a document's diff, as text",
12
+ description:
13
+ "A document, spreadsheet, presentation or notebook that changed, both versions rendered to markdown the way an agent reads them, so the change can be shown as tracked changes instead of two downloads. The side on disk reuses the shadow the sandbox already keeps; a past version is rendered from its bytes and kept by content hash, so the same version is never rendered twice. A side nothing can read says why.",
14
+ })
15
+ .input(DiffSourceQuerySchema)
16
+ .output(DerivedDiffSchema),
17
+ };
package/src/index.ts CHANGED
@@ -9,6 +9,7 @@ import { automationsContract } from "./contracts/automations.contract.js";
9
9
  import { capabilitiesContract } from "./contracts/capabilities.contract.js";
10
10
  import { choresContract } from "./contracts/chores.contract.js";
11
11
  import { ciContract } from "./contracts/ci.contract.js";
12
+ import { diffContract } from "./contracts/diff.contract.js";
12
13
  import { endpointsContract } from "./contracts/endpoints.contract.js";
13
14
  import { exitContract } from "./contracts/exit.contract.js";
14
15
  import { extensionsContract } from "./contracts/extensions.contract.js";
@@ -52,6 +53,7 @@ export { endpointsContract, type TrialHealth, TrialStatusSchema, type TrialStatu
52
53
  export { exitContract } from "./contracts/exit.contract.js";
53
54
  export { extensionsContract } from "./contracts/extensions.contract.js";
54
55
  export { personasContract } from "./contracts/personas.contract.js";
56
+ export { diffContract } from "./contracts/diff.contract.js";
55
57
  export { gitContract } from "./contracts/git.contract.js";
56
58
  export { historyContract } from "./contracts/history.contract.js";
57
59
  // Not part of `sandboxContract` below: spoken over a device's WebSocket, with the machine implementing it.
@@ -153,6 +155,7 @@ export * from "./schemas/environment.js";
153
155
  export * from "./schemas/exit.js";
154
156
  export * from "./schemas/extension-updates.js";
155
157
  export * from "./schemas/providers/fast-mode.js";
158
+ export * from "./schemas/diff.js";
156
159
  export * from "./schemas/git/git.js";
157
160
  export * from "./schemas/git/git-history.js";
158
161
  export * from "./schemas/history.js";
@@ -211,6 +214,7 @@ export const sandboxContract = {
211
214
  capabilities: capabilitiesContract,
212
215
  chores: choresContract,
213
216
  ci: ciContract,
217
+ diff: diffContract,
214
218
  endpoints: endpointsContract,
215
219
  extensions: extensionsContract,
216
220
  personas: personasContract,
@@ -204,10 +204,14 @@ test("the instruction axis discloses its two weaker answers, differently", () =>
204
204
  expect(limitationsOf(acpCaps).length).toBeGreaterThan(limitationsOf(codexCaps).length);
205
205
  });
206
206
 
207
- test("only the Claude Code loop hosts the js execution backend", () => {
207
+ // The backend is one of the daemon's own functions, so it takes a runtime that can call one directly AND a gate the
208
+ // daemon controls: Claude Code has the SDK server plus its PreToolUse matcher, Cursor has customTools plus a consult
209
+ // inside the handler. Every other runtime is a child process with neither, where a script would run unread.
210
+ test("the js execution backend rides the two runtimes that can host the daemon's own tools", () => {
211
+ const hosts: ReadonlySet<string> = new Set(["claude-code", "cursor"]);
208
212
  for (const { provider, harness } of pairs) {
209
213
  const capabilities = capabilitiesOf(provider, harness);
210
- expect(capabilities.execution.includes("js")).toBe(capabilities.runtime === "claude-code");
214
+ expect(capabilities.execution.includes("js")).toBe(hosts.has(capabilities.runtime));
211
215
  }
212
216
  });
213
217
 
@@ -153,6 +153,11 @@ export const modelsFor = (provider: AgentProvider): CatalogOption[] => {
153
153
  return [];
154
154
  };
155
155
 
156
+ // Every reasoning tier a catalog row's `efforts` may name, weakest first. One vocabulary for every provider, so the
157
+ // picker can label and order a ladder it has never seen; a provider spelling a rung its own way translates on the way
158
+ // in, at the adapter that read it.
159
+ export const EFFORT_TIERS: readonly string[] = ["minimal", "low", "medium", "high", "xhigh", "max"];
160
+
156
161
  // Filters exactly one pair: Claude's `max` with thinking explicitly false, the one combination Anthropic's API refuses
157
162
  // (400). Absent thinking is not off; the model's own default answers, every other tier or provider passes through.
158
163
  export const effortAllowed = (effort: string, provider: AgentProvider, thinking: boolean | undefined): boolean =>
@@ -171,15 +171,17 @@ export const PI: AgentCapabilities = {
171
171
  // other runtimes lack are function arguments here. The harness axis doesn't apply: the SDK is the only door.
172
172
  export const CURSOR: AgentCapabilities = {
173
173
  runtime: "cursor",
174
- // The SDK's Run can be cancelled but not written to mid-flight; a second send errors rather than injecting.
175
- steering: false,
174
+ // Run.steer injects into the live run; only a `complete_delivered` ack transfers ownership of the message.
175
+ steering: true,
176
176
  // Cursor's own plan mode, not this repo's emulation; not "modes" since the hook can't gate the whole surface.
177
177
  permissions: "plan",
178
178
  // True since the daemon supplies its own ask tool; Cursor's own can fabricate an answer, so it's disallowed.
179
179
  questions: true,
180
180
  // stdio + http/sse MCP servers plus host callbacks; everything but a Claude Code plugin checkout.
181
181
  mcp: "tools",
182
- execution: ["shell"],
182
+ // The JS backend rides Cursor's custom-tool seam rather than an MCP server, and consults the rulebook in its
183
+ // handler, since the hook file only covers the shell.
184
+ execution: ["shell", "js"],
183
185
  // Cursor publishes effort as model parameters, not one scale; true here just means it's forwardable at all.
184
186
  effort: true,
185
187
  fastMode: false,
@@ -191,7 +193,8 @@ export const CURSOR: AgentCapabilities = {
191
193
  terminals: false,
192
194
  // The SDK throws typed errors instead of dissolving a refusal into prose, so the adapter files coded frames.
193
195
  recovery: true,
194
- // append, reached differently: `beforeSubmitPrompt`'s reply folds the prompt onto Cursor's base, unreplaceable.
196
+ // append, reached differently: `beforeSubmitPrompt`'s reply folds the daemon's text onto Cursor's base. The SDK can
197
+ // replace that base outright, but only for an entitled account, so the seam every turn can reach is this one.
195
198
  instructions: "append",
196
199
  skillDiscovery: "prompt",
197
200
  // The full hook tier, the only foreign runtime to reach it: a hold parks since the vendor waits on the hook.
@@ -1,5 +1,5 @@
1
1
  import { expect, test } from "vitest";
2
- import { bindingWindow, gatesModel, gatingWindows, scopedWindow } from "./plan-pools.js";
2
+ import { bindingWindow, gatesModel, gatingWindows, scopedWindow, windowLive, windowPeriod } from "./plan-pools.js";
3
3
  import type { AccountUsage, UsageWindow } from "../schemas/providers/plan-limits.js";
4
4
 
5
5
  // One rule for which pool blocks a given model, shared by the daemon and the browser: a plan can meter models
@@ -64,3 +64,42 @@ test("names the pool a plan meters this model by on its own, preferring the more
64
64
  const tied = usage(window({ kind: "model:Opus", gates: { models: ["Opus"] } }), window({ kind: "model:Claude", gates: { models: ["Claude"] } }));
65
65
  expect(scopedWindow(tied, { id: "claude-opus-4-6" })).toBeUndefined();
66
66
  });
67
+
68
+ // How long a pool's window runs, read off the provider's own key and name. Two things turn on it, which is why it is
69
+ // one function: a narrow column names the window by `short`, and a reading with no published reset may only be trusted
70
+ // for that long.
71
+
72
+ test("a window's length is read off the provider's own key, and off its name where the key says nothing", () => {
73
+ const period = (kind: string, label?: string) => windowPeriod(label === undefined ? { kind } : { kind, label });
74
+ expect(period("five_hour")).toEqual({ seconds: 5 * 3_600, short: "5h" });
75
+ expect(period("seven_day")).toEqual({ seconds: 7 * 86_400, short: "wk" });
76
+ expect(period("seven_day_opus")).toEqual({ seconds: 7 * 86_400, short: "wk" });
77
+ // Anthropic's own key says nothing; the label the reader built from it does.
78
+ expect(period("model:Fable", "Weekly · Fable")).toEqual({ seconds: 7 * 86_400, short: "wk" });
79
+ expect(period("google:gemini-weekly", "Gemini Models · Weekly Limit Remaining")).toEqual({ seconds: 7 * 86_400, short: "wk" });
80
+ expect(period("monthly", "Monthly · all models")).toEqual({ seconds: 30 * 86_400, short: "mo" });
81
+ expect(period("claude:12_hour")).toEqual({ seconds: 12 * 3_600, short: "12h" });
82
+ expect(period("daily")).toEqual({ seconds: 86_400, short: "24h" });
83
+ expect(period("30_minutes")).toEqual({ seconds: 1_800, short: "30m" });
84
+ // A pool nothing names the length of answers nothing, rather than guessing one.
85
+ expect(period("claude:tangelo")).toBeUndefined();
86
+ expect(period("model:Fable", "Fable")).toBeUndefined();
87
+ });
88
+
89
+ test("a reading is live until its reset, or, with none published, for one window's length after it was taken", () => {
90
+ const NOW = 1_700_000_000_000;
91
+ const HOUR = 3_600_000;
92
+ // A published reset is the authority whatever the window's length says, in both directions.
93
+ expect(windowLive(window({ kind: "five_hour", resetsAt: NOW / 1_000 + 60 }), NOW - 50 * HOUR, NOW)).toBe(true);
94
+ expect(windowLive(window({ kind: "seven_day", resetsAt: NOW / 1_000 - 1 }), NOW, NOW)).toBe(false);
95
+
96
+ // With none — what an idle five-hour pool is published with — the window's own length retires it.
97
+ const idle = window({ kind: "five_hour", utilization: 0 });
98
+ expect(windowLive(idle, NOW - 4 * HOUR, NOW)).toBe(true);
99
+ expect(windowLive(idle, NOW - 6 * HOUR, NOW)).toBe(false);
100
+ // A weekly pool read on the same morning is still describing the week it was read in.
101
+ expect(windowLive(window({ kind: "seven_day", utilization: 78 }), NOW - 12 * HOUR, NOW)).toBe(true);
102
+
103
+ // And a pool whose length nothing names has only its reset instant; without one it stands.
104
+ expect(windowLive(window({ kind: "claude:tangelo" }), NOW - 400 * HOUR, NOW)).toBe(true);
105
+ });
@@ -63,3 +63,72 @@ export const scopedWindow = (usage: AccountUsage | undefined, model: ModelRef):
63
63
  }
64
64
  return best.window;
65
65
  };
66
+
67
+ // How long a pool's window runs, read off the provider's own key and whatever name it published. One implementation,
68
+ // because two things need it and must agree: a narrow column names the window by `short`, and a reading with no
69
+ // published reset instant may only be trusted for `seconds` past the moment it was taken.
70
+
71
+ export interface WindowPeriod {
72
+ readonly seconds: number;
73
+ // The token a narrow column names this window by, e.g. "5h", "wk".
74
+ readonly short: string;
75
+ }
76
+
77
+ const HOUR_SECONDS = 3_600;
78
+ const DAY_SECONDS = 86_400;
79
+
80
+ /** Kind and label as space-padded lowercase words, underscores split, so `\b` matches across both spellings. */
81
+ export const periodWords = (pool: { readonly kind: string; readonly label?: string | undefined }): string =>
82
+ ` ${`${pool.kind} ${pool.label ?? ""}`
83
+ .toLowerCase()
84
+ .replaceAll(/[^a-z0-9]+/gu, " ")
85
+ .trim()} `;
86
+
87
+ // A count the words spell out, e.g. the 3 in "3 days".
88
+ const counted = (words: string, pattern: RegExp): number | undefined => {
89
+ const found = pattern.exec(words)?.[1];
90
+ return found === undefined ? undefined : Number(found);
91
+ };
92
+
93
+ // Day-scale and longer, where the named periods outrank a bare count: "7 days" is the week every plan sells, not a
94
+ // seven-day span of its own.
95
+ const dayPeriod = (words: string, days: number | undefined): WindowPeriod | undefined => {
96
+ if (days === 7 || /\bseven days?\b|\bweek(ly|s)?\b/u.test(words)) {
97
+ return { seconds: 7 * DAY_SECONDS, short: "wk" };
98
+ }
99
+ if (/\bmonth(ly|s)?\b/u.test(words)) {
100
+ return { seconds: 30 * DAY_SECONDS, short: "mo" };
101
+ }
102
+ if (days === 1 || /\bdaily\b/u.test(words)) {
103
+ return { seconds: DAY_SECONDS, short: "24h" };
104
+ }
105
+ return days === undefined ? undefined : { seconds: days * DAY_SECONDS, short: `${days}d` };
106
+ };
107
+
108
+ /** Window length behind a pool; undefined when neither the key nor the name says how long it runs. */
109
+ export const windowPeriod = (pool: { readonly kind: string; readonly label?: string | undefined }): WindowPeriod | undefined => {
110
+ const words = periodWords(pool);
111
+ const hours = counted(words, /\b(\d+) hours?\b/u);
112
+ // Hours first: a pool named both ("5 hours, weekly cap") runs on the shorter clock.
113
+ if (hours !== undefined || /\bfive hours?\b/u.test(words)) {
114
+ const span = hours ?? 5;
115
+ return { seconds: span * HOUR_SECONDS, short: `${span}h` };
116
+ }
117
+ const day = dayPeriod(words, counted(words, /\b(\d+) days?\b/u));
118
+ if (day !== undefined) {
119
+ return day;
120
+ }
121
+ const minutes = counted(words, /\b(\d+) minutes?\b/u);
122
+ return minutes === undefined ? undefined : { seconds: minutes * 60, short: `${minutes}m` };
123
+ };
124
+
125
+ // Whether a reading of this window can still be true. A published reset instant is the authority; with none, the
126
+ // window's own length is, since a pool read as empty says nothing about the window that opened after it. A window whose
127
+ // length nothing names keeps the old rule: only its reset instant can retire it.
128
+ export const windowLive = (window: UsageWindow, measuredAt: number, now: number): boolean => {
129
+ if (window.resetsAt !== undefined) {
130
+ return window.resetsAt * 1000 > now;
131
+ }
132
+ const period = windowPeriod(window);
133
+ return period === undefined || measuredAt + period.seconds * 1000 > now;
134
+ };
@@ -123,9 +123,14 @@ export type DeviceAgentFlowInput = z.infer<typeof DeviceAgentFlowInputSchema>;
123
123
  // `sync-clean` removes the build output left in directories the sandbox has deleted, which is what stops those
124
124
  // deletions from ever landing. It deletes only content the session already ignores, so it is the one command here whose
125
125
  // worst outcome is a rebuild — which is why it is a button and not a turn.
126
+ // `mirror-ignore`/`mirror-unignore` are `mirror-off`'s per-port form, and the reason they exist: a port number that is
127
+ // permanently taken on one machine's localhost has no answer in an all-or-nothing switch, so the choice lives where the
128
+ // conflict does — one port, one device, durable — instead of muting every port the pairing serves.
126
129
  export const DeviceCommandSchema = z.enum([
127
130
  "mirror-off",
128
131
  "mirror-on",
132
+ "mirror-ignore",
133
+ "mirror-unignore",
129
134
  "sync-pause",
130
135
  "sync-resume",
131
136
  "sync-unpair",
@@ -210,6 +215,8 @@ export const DeviceLocalDirSchema = z
210
215
  .min(1)
211
216
  .max(4096)
212
217
  .regex(/^(?:~|\/|[A-Za-z]:[\\/])[^"'`$;|&\n\r]*$/);
218
+ // A TCP port number, the one value a caller supplies that reaches a command line as a number rather than a string.
219
+ export const PortNumberSchema = z.number().int().min(1).max(65535);
213
220
  export const DeviceCommandInputSchema = z.object({
214
221
  id: z.string().min(1),
215
222
  command: DeviceCommandSchema,
@@ -218,6 +225,9 @@ export const DeviceCommandInputSchema = z.object({
218
225
  // for file sync, the folder on that device. The pairing token is minted by the daemon; no caller ever carries one.
219
226
  mode: z.enum(["sync", "mirror"]).optional(),
220
227
  localDir: DeviceLocalDirSchema.optional(),
228
+ // The two per-port mirror switches only. A number rather than a string, so nothing a caller sends can widen the
229
+ // command line it lands in.
230
+ port: PortNumberSchema.optional(),
221
231
  });
222
232
  export type DeviceCommandInput = z.infer<typeof DeviceCommandInputSchema>;
223
233
  // `ok` is the command's own exit status, not this route's: a refusal or non-zero exit is a real answer, not a thrown
@@ -294,9 +304,18 @@ export const DevicePortStateSchema = z.enum([
294
304
  "held-by-sandbox",
295
305
  // Something outside this product already binds the port; not ours to name or take.
296
306
  "busy",
307
+ // The owner told this device to leave this number alone (`sync mirror ignore`); nothing was attempted.
308
+ "ignored",
297
309
  ]);
310
+ export type DevicePortState = z.infer<typeof DevicePortStateSchema>;
311
+
312
+ // Why a port the sandbox serves is not on this machine's localhost: the state minus its one success. Named here
313
+ // because the machine decides it and the browser renders it, so a new reason has to reach both at once.
314
+ export const PortSkipReasonSchema = DevicePortStateSchema.exclude(["mirrored"]);
315
+ export type PortSkipReason = z.infer<typeof PortSkipReasonSchema>;
316
+
298
317
  export const DevicePortSchema = z.object({
299
- port: z.number().int().min(1).max(65535),
318
+ port: PortNumberSchema,
300
319
  host: z.enum(["127.0.0.1", "::1"]),
301
320
  // The sandbox serving the port, whose /ports listed it, not whoever ended up holding the local bind.
302
321
  sandboxId: z.string(),