@intentic/sandbox-contract 1.279.1 → 1.281.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/dist/events/resume.d.ts +1 -0
- package/dist/events/resume.d.ts.map +1 -1
- package/dist/events/resume.js +2 -0
- package/dist/events/resume.js.map +1 -1
- package/dist/ids/share-paths.d.ts.map +1 -1
- package/dist/ids/share-paths.js +1 -0
- package/dist/ids/share-paths.js.map +1 -1
- package/dist/schemas/inventory.d.ts +3 -0
- package/dist/schemas/inventory.d.ts.map +1 -1
- package/dist/schemas/inventory.js +15 -5
- package/dist/schemas/inventory.js.map +1 -1
- package/dist/schemas/secrets.d.ts +2 -0
- package/dist/schemas/secrets.d.ts.map +1 -1
- package/dist/schemas/secrets.js +5 -6
- package/dist/schemas/secrets.js.map +1 -1
- package/package.json +5 -5
- package/src/events/resume.ts +3 -0
- package/src/ids/share-paths.test.ts +6 -0
- package/src/ids/share-paths.ts +4 -1
- package/src/schemas/inventory.ts +19 -5
- package/src/schemas/secrets.ts +9 -6
package/dist/events/resume.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export declare const RESUME_NOTES: {
|
|
|
3
3
|
readonly auth: "The Claude credential that interrupted this conversation has been renewed, and this turn resumed automatically. The interrupted request is repeated below, where part of it was already completed in this session, continue from that point instead of starting over.";
|
|
4
4
|
readonly outage: "The model provider was briefly unavailable and interrupted this conversation; this turn resumed automatically. The interrupted request is repeated below, where part of it was already completed in this session, continue from that point instead of starting over.";
|
|
5
5
|
readonly restart: "The sandbox restarted while this turn was running, which stopped it, and this turn resumed automatically once it came back. The interrupted request is repeated below, where part of it was already completed in this session, continue from that point instead of starting over.";
|
|
6
|
+
readonly stopped: "The previous attempt at this request stopped before it finished, and it has been sent again. The interrupted request is repeated below, where part of it was already completed in this session, continue from that point instead of starting over.";
|
|
6
7
|
readonly limit: "The model provider's usage allowance ran out while this turn was running, which stopped it, and it has been sent again. The interrupted request is repeated below, where part of it was already completed in this session, continue from that point instead of starting over.";
|
|
7
8
|
readonly switched: "The model provider's usage allowance ran out while this turn was running, which stopped it, and it has been sent again on a different account, which starts a fresh session. The conversation so far has been carried across above, including the part of the request that was already completed, and the sandbox has measured where the work actually stands (the files changed on this branch, what was verified, what the checklist still holds) in the note headed 'Where the work stands': trust that note over anything recalled, then continue from that point instead of starting over.";
|
|
8
9
|
readonly carried: "The model provider's usage allowance ran out while this turn was running, which stopped it, and it has been sent again on a different account of the same provider, in this same session: everything you knew is still here. The interrupted request is repeated below, where part of it was already completed in this session, continue from that point instead of starting over.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resume.d.ts","sourceRoot":"","sources":["../../src/events/resume.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAQhD,eAAO,MAAM,YAAY;aACrB,IAAI;aACJ,MAAM;aACN,OAAO;aAEP,KAAK;aACL,QAAQ,EACJ,ikBAAikB;aAErkB,OAAO;aACP,OAAO,EACH,gXAAgX;aAEpX,QAAQ,EACJ,4KAA4K;CAC1K,CAAC;AAGX,eAAO,MAAM,cAAc,WAAY,MAAM,QAAQ,MAAM,KAAG,MAC6C,CAAC;AAI5G,eAAO,MAAM,iBAAiB,WAAY,MAAM,KAAG,MAGlD,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,YAAY,CAAC;AAIrD,MAAM,MAAM,gBAAgB,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"resume.d.ts","sourceRoot":"","sources":["../../src/events/resume.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAQhD,eAAO,MAAM,YAAY;aACrB,IAAI;aACJ,MAAM;aACN,OAAO;aAEP,OAAO;aAEP,KAAK;aACL,QAAQ,EACJ,ikBAAikB;aAErkB,OAAO;aACP,OAAO,EACH,gXAAgX;aAEpX,QAAQ,EACJ,4KAA4K;CAC1K,CAAC;AAGX,eAAO,MAAM,cAAc,WAAY,MAAM,QAAQ,MAAM,KAAG,MAC6C,CAAC;AAI5G,eAAO,MAAM,iBAAiB,WAAY,MAAM,KAAG,MAGlD,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,YAAY,CAAC;AAIrD,MAAM,MAAM,gBAAgB,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAiBvI,eAAO,MAAM,gBAAgB,WAAY,MAAM,KAAG,gBAAgB,GAAG,SAGpE,CAAC"}
|
package/dist/events/resume.js
CHANGED
|
@@ -3,6 +3,7 @@ export const RESUME_NOTES = {
|
|
|
3
3
|
auth: `The Claude credential that interrupted this conversation has been renewed, and this turn resumed automatically. ${REPEATED}`,
|
|
4
4
|
outage: `The model provider was briefly unavailable and interrupted this conversation; this turn resumed automatically. ${REPEATED}`,
|
|
5
5
|
restart: `The sandbox restarted while this turn was running, which stopped it, and this turn resumed automatically once it came back. ${REPEATED}`,
|
|
6
|
+
stopped: `The previous attempt at this request stopped before it finished, and it has been sent again. ${REPEATED}`,
|
|
6
7
|
limit: `The model provider's usage allowance ran out while this turn was running, which stopped it, and it has been sent again. ${REPEATED}`,
|
|
7
8
|
switched: "The model provider's usage allowance ran out while this turn was running, which stopped it, and it has been sent again on a different account, which starts a fresh session. The conversation so far has been carried across above, including the part of the request that was already completed, and the sandbox has measured where the work actually stands (the files changed on this branch, what was verified, what the checklist still holds) in the note headed 'Where the work stands': trust that note over anything recalled, then continue from that point instead of starting over.",
|
|
8
9
|
carried: `The model provider's usage allowance ran out while this turn was running, which stopped it, and it has been sent again on a different account of the same provider, in this same session: everything you knew is still here. ${REPEATED}`,
|
|
@@ -18,6 +19,7 @@ const RESUME_DISCLOSURES = {
|
|
|
18
19
|
auth: { kind: "notice", text: "Claude sign-in renewed, this turn picked up where it left off." },
|
|
19
20
|
outage: { kind: "notice", text: "The model provider came back, this turn picked up where it left off." },
|
|
20
21
|
restart: { kind: "notice", text: "The sandbox came back, this turn picked up where it left off." },
|
|
22
|
+
stopped: { kind: "notice", text: "Sent again after the turn stopped short, picking up where it left off." },
|
|
21
23
|
limit: { kind: "notice", text: "Sent again after the allowance ran out mid-turn, picking up where it left off." },
|
|
22
24
|
switched: { kind: "notice", text: "Sent again on the switched account after the allowance ran out mid-turn, in a fresh session." },
|
|
23
25
|
carried: { kind: "notice", text: "Sent again on the switched account after the allowance ran out mid-turn, carrying the session with it." },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../../src/events/resume.ts"],"names":[],"mappings":"AAMA,MAAM,QAAQ,GACV,uJAAuJ,CAAC;AAC5J,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,IAAI,EAAE,mHAAmH,QAAQ,EAAE;IACnI,MAAM,EAAE,kHAAkH,QAAQ,EAAE;IACpI,OAAO,EAAE,+HAA+H,QAAQ,EAAE;IAElJ,KAAK,EAAE,2HAA2H,QAAQ,EAAE;IAC5I,QAAQ,EACJ,ikBAAikB;IAErkB,OAAO,EAAE,gOAAgO,QAAQ,EAAE;IACnP,OAAO,EACH,gXAAgX;IAEpX,QAAQ,EACJ,4KAA4K;CAC1K,CAAC;AAGX,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAc,EAAE,IAAY,EAAU,EAAE,CACnE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,C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8F,EAAE;IAClI,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,wGAAwG,EAAE;IAC3I,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,6DAA6D,EAAE;IAChG,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,wCAAwC,EAAE,IAAI,EAAE,YAAY,CAAC,QAAQ,EAAE,EAAE;CACrH,CAAC;AAIF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAc,EAAgC,EAAE;IAC7E,MAAM,MAAM,GAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAoB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACjH,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;AACzE,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"share-paths.d.ts","sourceRoot":"","sources":["../../src/ids/share-paths.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS,kBAAkB,CAAC;AAGzC,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAG1C,eAAO,MAAM,eAAe,UAAU,CAAC;AAGvC,eAAO,MAAM,iBAAiB,4BAAuC,CAAC;AAMtE,eAAO,MAAM,SAAS,UAAW,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"share-paths.d.ts","sourceRoot":"","sources":["../../src/ids/share-paths.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS,kBAAkB,CAAC;AAGzC,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAG1C,eAAO,MAAM,eAAe,UAAU,CAAC;AAGvC,eAAO,MAAM,iBAAiB,4BAAuC,CAAC;AAMtE,eAAO,MAAM,SAAS,UAAW,MAAM,KAAG,MAczC,CAAC;AAGF,eAAO,MAAM,OAAO,UAAW,MAAM,UAAU,MAAM,KAAG,MAGvD,CAAC;AAGF,eAAO,MAAM,QAAQ,QAA8B,CAAC"}
|
package/dist/ids/share-paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"share-paths.js","sourceRoot":"","sources":["../../src/ids/share-paths.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAC;AAGzC,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAG1C,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC;AAGvC,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,SAAS,IAAI,gBAAgB,GAAG,CAAC;AAItE,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAa,EAAU,EAAE;IAC/C,MAAM,IAAI,GAAG,KAAK;SACb,WAAW,EAAE;SACb,SAAS,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"share-paths.js","sourceRoot":"","sources":["../../src/ids/share-paths.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAC;AAGzC,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAG1C,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC;AAGvC,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,SAAS,IAAI,gBAAgB,GAAG,CAAC;AAItE,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAa,EAAU,EAAE;IAC/C,MAAM,IAAI,GAAG,KAAK;SACb,WAAW,EAAE;SACb,SAAS,CAAC,MAAM,CAAC;SAGjB,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SAEvB,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC;SAClB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAExB,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AAGF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAa,EAAE,MAAc,EAAU,EAAE;IAC7D,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAC9B,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,MAAM,EAAE,CAAC;AACtD,CAAC,CAAC;AAGF,MAAM,CAAC,MAAM,QAAQ,GAAG,2BAA2B,CAAC"}
|
|
@@ -17,6 +17,9 @@ export declare const ServiceKindSchema: z.ZodEnum<{
|
|
|
17
17
|
}>;
|
|
18
18
|
export type ServiceKind = z.infer<typeof ServiceKindSchema>;
|
|
19
19
|
export declare const InventoryValuesSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
20
|
+
export declare const INVENTORY_NAME_MAX = 60;
|
|
21
|
+
export declare const INVENTORY_NAME_RE: RegExp;
|
|
22
|
+
export declare const inventoryIdentifier: (raw: string) => string;
|
|
20
23
|
export declare const BackendEntrySchema: z.ZodObject<{
|
|
21
24
|
kind: z.ZodLiteral<"backend">;
|
|
22
25
|
provider: z.ZodEnum<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inventory.d.ts","sourceRoot":"","sources":["../../src/schemas/inventory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,uBAAuB;;;;;;EAA+D,CAAC;AACpG,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;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;;iBAAmE,CAAC;AACzG,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE9B,CAAC;AAGH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;iBAUhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -2,11 +2,21 @@ import { z } from "zod";
|
|
|
2
2
|
export const InventoryProviderSchema = z.enum(["host", "cloudflare", "github", "gitlab", "stripe"]);
|
|
3
3
|
export const ServiceKindSchema = z.enum(["signoz", "outline", "paperless", "openproject", "invoiceninja", "infisical"]);
|
|
4
4
|
export const InventoryValuesSchema = z.record(z.string(), z.union([z.string(), z.number()]));
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
export const INVENTORY_NAME_MAX = 60;
|
|
6
|
+
export const INVENTORY_NAME_RE = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
|
|
7
|
+
const inventoryName = z.string().min(1).max(INVENTORY_NAME_MAX).regex(INVENTORY_NAME_RE);
|
|
8
|
+
export const inventoryIdentifier = (raw) => {
|
|
9
|
+
const cleaned = raw
|
|
10
|
+
.trim()
|
|
11
|
+
.replace(/[^a-zA-Z0-9_]+/gu, "_")
|
|
12
|
+
.replace(/_{2,}/g, "_")
|
|
13
|
+
.replace(/_+$/, "")
|
|
14
|
+
.slice(0, INVENTORY_NAME_MAX);
|
|
15
|
+
if (cleaned === "" || cleaned === "_") {
|
|
16
|
+
return "";
|
|
17
|
+
}
|
|
18
|
+
return /^[0-9]/.test(cleaned) ? `_${cleaned}`.slice(0, INVENTORY_NAME_MAX) : cleaned;
|
|
19
|
+
};
|
|
10
20
|
export const BackendEntrySchema = z.object({
|
|
11
21
|
kind: z.literal("backend").describe("Something you already have: a machine, an account with a hosting provider."),
|
|
12
22
|
provider: InventoryProviderSchema.describe("Which provider it is with."),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inventory.js","sourceRoot":"","sources":["../../src/schemas/inventory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEpG,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC,CAAC;AAIxH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;AAE7F,MAAM,aAAa,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"inventory.js","sourceRoot":"","sources":["../../src/schemas/inventory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEpG,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC,CAAC;AAIxH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CA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ourceRoot":"","sources":["../../src/schemas/secrets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/schemas/secrets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,aAAa,QAA6B,CAAC;AACxD,eAAO,MAAM,cAAc,MAAM,CAAC;AAGlC,eAAO,MAAM,eAAe;;;iBAG1B,CAAC;AACH,eAAO,MAAM,gBAAgB;;iBAE3B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;iBAAkE,CAAC;AACpG,eAAO,MAAM,kBAAkB;;iBAAiH,CAAC;AAIjJ,eAAO,MAAM,yBAAyB;;;EAIjC,CAAC;AACN,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAI5E,eAAO,MAAM,wBAAwB;;;EAEsG,CAAC;AAC5I,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,oBAAoB;;;;;;EAEgI,CAAC;AAClK,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,oBAAoB;;;;;;;;;;;iBAY/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;iBAIhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,gCAAgC;;iBAE3C,CAAC;AAIH,eAAO,MAAM,uBAAuB;;;;iBAKlC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;iBAIhC,CAAC;AAIH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6CrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIhC,CAAC"}
|
package/dist/schemas/secrets.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export const SECRET_KEY_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
3
|
+
export const SECRET_KEY_MAX = 128;
|
|
4
|
+
const secretKey = z.string().regex(SECRET_KEY_RE).max(SECRET_KEY_MAX);
|
|
2
5
|
export const SecretSetSchema = z.object({
|
|
3
|
-
key:
|
|
4
|
-
.string()
|
|
5
|
-
.regex(/^[A-Za-z_][A-Za-z0-9_]*$/)
|
|
6
|
-
.max(128)
|
|
7
|
-
.describe("The name to store it under, which is the name a process will find it by."),
|
|
6
|
+
key: secretKey.describe("The name to store it under, which is the name a process will find it by."),
|
|
8
7
|
value: z.string().min(1).describe("The value. It goes straight to your sandbox and never through the platform."),
|
|
9
8
|
});
|
|
10
9
|
export const SecretKeysSchema = z.object({
|
|
11
10
|
keys: z.array(z.string()).describe("The names that exist here. Only the names: the values never leave the sandbox."),
|
|
12
11
|
});
|
|
13
|
-
export const SecretKeyParamSchema = z.object({ key:
|
|
12
|
+
export const SecretKeyParamSchema = z.object({ key: secretKey.describe("Which secret, by name.") });
|
|
14
13
|
export const SecretRevealSchema = z.object({ value: z.string().describe("The value itself. The only place in this API one is ever returned.") });
|
|
15
14
|
export const CredentialGateScopeSchema = z
|
|
16
15
|
.enum(["use", "conversation"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.js","sourceRoot":"","sources":["../../src/schemas/secrets.ts"],"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K,EAAE,yBAAyB;KACnC,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,CAAC,uHAAuH,CAAC;CACzI,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,CAAC;SACL,KAAK,CAAC,0BAA0B,CAAC;SACjC,QAAQ,CAAC,6FAA6F,CAAC;CAC/G,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/sandbox-contract",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.281.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",
|
|
@@ -196,10 +196,10 @@
|
|
|
196
196
|
}
|
|
197
197
|
},
|
|
198
198
|
"dependencies": {
|
|
199
|
-
"@intentic/base": "1.
|
|
200
|
-
"@intentic/constants": "1.
|
|
201
|
-
"@intentic/extension-manifest": "1.
|
|
202
|
-
"@intentic/registry": "1.
|
|
199
|
+
"@intentic/base": "1.281.0",
|
|
200
|
+
"@intentic/constants": "1.281.0",
|
|
201
|
+
"@intentic/extension-manifest": "1.281.0",
|
|
202
|
+
"@intentic/registry": "1.281.0",
|
|
203
203
|
"@orpc/contract": "1.14.13",
|
|
204
204
|
"tslib": "2.8.1",
|
|
205
205
|
"zod": "4.5.4"
|
package/src/events/resume.ts
CHANGED
|
@@ -10,6 +10,8 @@ export const RESUME_NOTES = {
|
|
|
10
10
|
auth: `The Claude credential that interrupted this conversation has been renewed, and this turn resumed automatically. ${REPEATED}`,
|
|
11
11
|
outage: `The model provider was briefly unavailable and interrupted this conversation; this turn resumed automatically. ${REPEATED}`,
|
|
12
12
|
restart: `The sandbox restarted while this turn was running, which stopped it, and this turn resumed automatically once it came back. ${REPEATED}`,
|
|
13
|
+
// Anything that killed a turn with no remedy of its own: a runtime that hung, a harness that crashed.
|
|
14
|
+
stopped: `The previous attempt at this request stopped before it finished, and it has been sent again. ${REPEATED}`,
|
|
13
15
|
// Three notes, one allowance failure: `limit` continues, `switched` opens fresh, `refused` says the opposite.
|
|
14
16
|
limit: `The model provider's usage allowance ran out while this turn was running, which stopped it, and it has been sent again. ${REPEATED}`,
|
|
15
17
|
switched:
|
|
@@ -44,6 +46,7 @@ const RESUME_DISCLOSURES: Record<ResumeReason, ResumeDisclosure> = {
|
|
|
44
46
|
auth: { kind: "notice", text: "Claude sign-in renewed, this turn picked up where it left off." },
|
|
45
47
|
outage: { kind: "notice", text: "The model provider came back, this turn picked up where it left off." },
|
|
46
48
|
restart: { kind: "notice", text: "The sandbox came back, this turn picked up where it left off." },
|
|
49
|
+
stopped: { kind: "notice", text: "Sent again after the turn stopped short, picking up where it left off." },
|
|
47
50
|
// None of these four auto-resumed, a person pressed Continue; `switched`/`carried` name the differing account.
|
|
48
51
|
limit: { kind: "notice", text: "Sent again after the allowance ran out mid-turn, picking up where it left off." },
|
|
49
52
|
switched: { kind: "notice", text: "Sent again on the switched account after the allowance ran out mid-turn, in a fresh session." },
|
|
@@ -31,6 +31,12 @@ describe("the safe half", () => {
|
|
|
31
31
|
[" spaces everywhere ", "spaces-everywhere"],
|
|
32
32
|
["Emoji 🎉 title", "emoji-title"],
|
|
33
33
|
["UPPER Case", "upper-case"],
|
|
34
|
+
// An accent folds into its letter rather than becoming a word boundary: NFKD splits it off, and left in place
|
|
35
|
+
// the mark reads as punctuation and cuts the word in half (`cafe-re-sume`).
|
|
36
|
+
["Café résumé", "cafe-resume"],
|
|
37
|
+
["Äpfel für alle", "apfel-fur-alle"],
|
|
38
|
+
["Ölçü", "olcu"],
|
|
39
|
+
["naïve Zoë", "naive-zoe"],
|
|
34
40
|
])("reduces %j to a name that can only be a name", (title, stem) => {
|
|
35
41
|
expect(shareStem(title)).toBe(stem);
|
|
36
42
|
expect(SHARE_ID.test(shareId(title, "3f9c"))).toBe(true);
|
package/src/ids/share-paths.ts
CHANGED
|
@@ -24,7 +24,10 @@ export const shareStem = (title: string): string => {
|
|
|
24
24
|
const stem = title
|
|
25
25
|
.toLowerCase()
|
|
26
26
|
.normalize("NFKD")
|
|
27
|
-
//
|
|
27
|
+
// NFKD splits an accent off its letter; the mark has to go before the separator pass, or `café` decomposes to
|
|
28
|
+
// `cafe` + a mark and comes out `cafe-`, i.e. a word boundary where the accent was.
|
|
29
|
+
.replace(/\p{M}+/gu, "")
|
|
30
|
+
// Anything not a plain letter or digit becomes a separator, dropping punctuation and emoji.
|
|
28
31
|
.replace(/[^a-z0-9]+/g, "-")
|
|
29
32
|
.replace(/^-+|-+$/g, "")
|
|
30
33
|
.slice(0, STEM_MAX)
|
package/src/schemas/inventory.ts
CHANGED
|
@@ -10,11 +10,25 @@ export type ServiceKind = z.infer<typeof ServiceKindSchema>;
|
|
|
10
10
|
// the wire.
|
|
11
11
|
export const InventoryValuesSchema = z.record(z.string(), z.union([z.string(), z.number()]));
|
|
12
12
|
// `const <name>` binding in deploy.config.ts, so it must be a valid identifier.
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
export const INVENTORY_NAME_MAX = 60;
|
|
14
|
+
export const INVENTORY_NAME_RE = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
|
|
15
|
+
const inventoryName = z.string().min(1).max(INVENTORY_NAME_MAX).regex(INVENTORY_NAME_RE);
|
|
16
|
+
|
|
17
|
+
// Repairs a name into the identifier the rule above demands, so a form can offer one rather than refuse what it
|
|
18
|
+
// pre-filled: app directories are `web-app`, and `const web-app` is not a binding. Empty means nothing was salvageable.
|
|
19
|
+
export const inventoryIdentifier = (raw: string): string => {
|
|
20
|
+
const cleaned = raw
|
|
21
|
+
.trim()
|
|
22
|
+
.replace(/[^a-zA-Z0-9_]+/gu, "_")
|
|
23
|
+
.replace(/_{2,}/g, "_")
|
|
24
|
+
.replace(/_+$/, "")
|
|
25
|
+
.slice(0, INVENTORY_NAME_MAX);
|
|
26
|
+
if (cleaned === "" || cleaned === "_") {
|
|
27
|
+
return "";
|
|
28
|
+
}
|
|
29
|
+
// A leading digit is the one repair that has to add rather than remove.
|
|
30
|
+
return /^[0-9]/.test(cleaned) ? `_${cleaned}`.slice(0, INVENTORY_NAME_MAX) : cleaned;
|
|
31
|
+
};
|
|
18
32
|
export const BackendEntrySchema = z.object({
|
|
19
33
|
kind: z.literal("backend").describe("Something you already have: a machine, an account with a hosting provider."),
|
|
20
34
|
provider: InventoryProviderSchema.describe("Which provider it is with."),
|
package/src/schemas/secrets.ts
CHANGED
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
// Straight to the sandbox daemon, never through the platform; `apply` reloads .env with no restart. `list` returns keys
|
|
4
4
|
// only; `reveal` is the one owner-only exception that returns a value.
|
|
5
|
+
// An env var name, as a shell exports it. Exported so the browser validates against this rather than restating it:
|
|
6
|
+
// stated twice, the two drifted, and a box with no limit fed a rejection the user could not have predicted.
|
|
7
|
+
export const SECRET_KEY_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
8
|
+
export const SECRET_KEY_MAX = 128;
|
|
9
|
+
const secretKey = z.string().regex(SECRET_KEY_RE).max(SECRET_KEY_MAX);
|
|
10
|
+
|
|
5
11
|
export const SecretSetSchema = z.object({
|
|
6
|
-
key:
|
|
7
|
-
.string()
|
|
8
|
-
.regex(/^[A-Za-z_][A-Za-z0-9_]*$/)
|
|
9
|
-
.max(128)
|
|
10
|
-
.describe("The name to store it under, which is the name a process will find it by."),
|
|
12
|
+
key: secretKey.describe("The name to store it under, which is the name a process will find it by."),
|
|
11
13
|
value: z.string().min(1).describe("The value. It goes straight to your sandbox and never through the platform."),
|
|
12
14
|
});
|
|
13
15
|
export const SecretKeysSchema = z.object({
|
|
14
16
|
keys: z.array(z.string()).describe("The names that exist here. Only the names: the values never leave the sandbox."),
|
|
15
17
|
});
|
|
16
|
-
|
|
18
|
+
// Same rule as `set`: one name rule for a secret, whichever verb is asking about it.
|
|
19
|
+
export const SecretKeyParamSchema = z.object({ key: secretKey.describe("Which secret, by name.") });
|
|
17
20
|
export const SecretRevealSchema = z.object({ value: z.string().describe("The value itself. The only place in this API one is ever returned.") });
|
|
18
21
|
|
|
19
22
|
// A wall against the agent's own judgment, not a compromised container: a shell here can read the policy same as the
|