@intentic/sandbox-contract 1.406.0 → 1.408.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/contracts/agent.contract.d.ts +1 -0
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +2 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/device.contract.d.ts +4 -0
- package/dist/contracts/device.contract.d.ts.map +1 -1
- package/dist/contracts/netdisk.contract.d.ts +1 -0
- package/dist/contracts/netdisk.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.d.ts +252 -250
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +2 -0
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.d.ts +15 -0
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +19 -1
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/events/agent-events.d.ts +2 -0
- package/dist/events/agent-events.d.ts.map +1 -1
- package/dist/events/agent-events.js +1 -0
- package/dist/events/agent-events.js.map +1 -1
- package/dist/events/sandbox-notice.d.ts +5 -0
- package/dist/events/sandbox-notice.d.ts.map +1 -1
- package/dist/events/sandbox-notice.js +1 -0
- package/dist/events/sandbox-notice.js.map +1 -1
- package/dist/ids/conversation-ids.d.ts +5 -0
- package/dist/ids/conversation-ids.d.ts.map +1 -1
- package/dist/ids/conversation-ids.js +20 -109
- package/dist/ids/conversation-ids.js.map +1 -1
- package/dist/ids/conversation-words.d.ts +2 -0
- package/dist/ids/conversation-words.d.ts.map +1 -0
- package/dist/ids/conversation-words.js +35 -0
- package/dist/ids/conversation-words.js.map +1 -0
- package/dist/models/model-roles.d.ts +8 -0
- package/dist/models/model-roles.d.ts.map +1 -1
- package/dist/models/model-roles.js +8 -0
- package/dist/models/model-roles.js.map +1 -1
- package/dist/policy/failure-codes.d.ts +5 -0
- package/dist/policy/failure-codes.d.ts.map +1 -1
- package/dist/policy/failure-codes.js +1 -0
- package/dist/policy/failure-codes.js.map +1 -1
- package/dist/protocol/doors/runner-protocol.d.ts +17 -0
- package/dist/protocol/doors/runner-protocol.d.ts.map +1 -1
- package/dist/protocol/doors/runner-protocol.js +22 -0
- package/dist/protocol/doors/runner-protocol.js.map +1 -1
- package/dist/protocol/peer-dial.d.ts +1 -0
- package/dist/protocol/peer-dial.d.ts.map +1 -1
- package/dist/protocol/peer-dial.js +1 -1
- package/dist/protocol/peer-dial.js.map +1 -1
- package/dist/schemas/agent.d.ts +4 -0
- package/dist/schemas/agent.d.ts.map +1 -1
- package/dist/schemas/capabilities.d.ts +1 -0
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/device-artifacts.d.ts +4 -0
- package/dist/schemas/device-artifacts.d.ts.map +1 -1
- package/dist/schemas/device-artifacts.js +8 -0
- package/dist/schemas/device-artifacts.js.map +1 -1
- package/dist/schemas/hosts.d.ts +2 -0
- package/dist/schemas/hosts.d.ts.map +1 -1
- package/dist/schemas/hosts.js +2 -0
- package/dist/schemas/hosts.js.map +1 -1
- package/dist/schemas/keyring.d.ts +6 -0
- package/dist/schemas/keyring.d.ts.map +1 -1
- package/dist/schemas/keyring.js +3 -0
- package/dist/schemas/keyring.js.map +1 -1
- package/dist/schemas/netdisk.d.ts +4 -0
- package/dist/schemas/netdisk.d.ts.map +1 -1
- package/dist/schemas/netdisk.js +7 -0
- package/dist/schemas/netdisk.js.map +1 -1
- package/dist/schemas/offload.d.ts +5 -0
- package/dist/schemas/offload.d.ts.map +1 -1
- package/dist/schemas/offload.js +2 -0
- package/dist/schemas/offload.js.map +1 -1
- package/dist/schemas/push.d.ts +6 -0
- package/dist/schemas/push.d.ts.map +1 -1
- package/dist/schemas/push.js +2 -0
- package/dist/schemas/push.js.map +1 -1
- package/dist/schemas/settings.d.ts +2 -0
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +1 -1
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/system.d.ts +23 -0
- package/dist/schemas/system.d.ts.map +1 -1
- package/dist/schemas/system.js +13 -0
- package/dist/schemas/system.js.map +1 -1
- package/dist/state/definition.d.ts +6 -4
- package/dist/state/definition.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/contracts/system.contract.ts +33 -1
- package/src/events/agent-events.ts +3 -0
- package/src/events/sandbox-notice.ts +3 -0
- package/src/ids/conversation-ids.test.ts +83 -12
- package/src/ids/conversation-ids.ts +39 -117
- package/src/ids/conversation-words.ts +40 -0
- package/src/models/model-roles.ts +10 -0
- package/src/policy/failure-codes.ts +3 -0
- package/src/policy/tests/failure-codes.test.ts +4 -1
- package/src/protocol/doors/runner-protocol.test.ts +22 -0
- package/src/protocol/doors/runner-protocol.ts +44 -0
- package/src/protocol/peer-dial.test.ts +30 -1
- package/src/protocol/peer-dial.ts +4 -1
- package/src/schemas/device-artifacts.ts +19 -3
- package/src/schemas/hosts.ts +4 -0
- package/src/schemas/keyring.ts +4 -0
- package/src/schemas/netdisk.ts +13 -0
- package/src/schemas/offload.ts +13 -1
- package/src/schemas/push.ts +7 -0
- package/src/schemas/settings.ts +3 -2
- package/src/schemas/system.ts +25 -0
- package/src/schemas/version-seam.test.ts +7 -0
|
@@ -214,6 +214,7 @@ export declare const SandboxDefinitionSchema: z.ZodObject<{
|
|
|
214
214
|
"3.1.1": "3.1.1";
|
|
215
215
|
auto: "auto";
|
|
216
216
|
}>>;
|
|
217
|
+
via: z.ZodOptional<z.ZodString>;
|
|
217
218
|
autoMount: z.ZodDefault<z.ZodEnum<{
|
|
218
219
|
off: "off";
|
|
219
220
|
on: "on";
|
|
@@ -471,7 +472,7 @@ export declare const SandboxDefinitionSchema: z.ZodObject<{
|
|
|
471
472
|
harness?: "claude-code" | "codex" | "muse" | "native" | "opencode" | "pi" | "vendor" | undefined;
|
|
472
473
|
}[] | undefined;
|
|
473
474
|
}[];
|
|
474
|
-
roleSetups: Partial<Record<"acceptance-run" | "approval-queue" | "commit-message" | "deployment-fix" | "documentation-run" | "extension-review" | "handoff-summary" | "loop-iteration" | "loop-verdict" | "maintenance-chore" | "model-router" | "pipeline-fix" | "refactor-run" | "safety-judge" | "session-title" | "spoken-reply" | "workflow-fix", string>>;
|
|
475
|
+
roleSetups: Partial<Record<"acceptance-run" | "approval-queue" | "commit-message" | "deployment-fix" | "documentation-run" | "extension-review" | "handoff-summary" | "loop-iteration" | "loop-verdict" | "maintenance-chore" | "model-router" | "pipeline-fix" | "refactor-run" | "safety-judge" | "session-title" | "spoken-reply" | "subagent-sizing" | "workflow-fix", string>>;
|
|
475
476
|
autoModelGuidance: string;
|
|
476
477
|
changelogRepos: string[];
|
|
477
478
|
agentRetentionDays: number;
|
|
@@ -631,7 +632,7 @@ export declare const SandboxDefinitionSchema: z.ZodObject<{
|
|
|
631
632
|
harness?: "claude-code" | "codex" | "muse" | "native" | "opencode" | "pi" | "vendor" | undefined;
|
|
632
633
|
}[] | undefined;
|
|
633
634
|
}[];
|
|
634
|
-
roleSetups: Partial<Record<"acceptance-run" | "approval-queue" | "commit-message" | "deployment-fix" | "documentation-run" | "extension-review" | "handoff-summary" | "loop-iteration" | "loop-verdict" | "maintenance-chore" | "model-router" | "pipeline-fix" | "refactor-run" | "safety-judge" | "session-title" | "spoken-reply" | "workflow-fix", string>>;
|
|
635
|
+
roleSetups: Partial<Record<"acceptance-run" | "approval-queue" | "commit-message" | "deployment-fix" | "documentation-run" | "extension-review" | "handoff-summary" | "loop-iteration" | "loop-verdict" | "maintenance-chore" | "model-router" | "pipeline-fix" | "refactor-run" | "safety-judge" | "session-title" | "spoken-reply" | "subagent-sizing" | "workflow-fix", string>>;
|
|
635
636
|
autoModelGuidance: string;
|
|
636
637
|
changelogRepos: string[];
|
|
637
638
|
agentRetentionDays: number;
|
|
@@ -1001,6 +1002,7 @@ export declare const BundleManifestSchema: z.ZodObject<{
|
|
|
1001
1002
|
"3.1.1": "3.1.1";
|
|
1002
1003
|
auto: "auto";
|
|
1003
1004
|
}>>;
|
|
1005
|
+
via: z.ZodOptional<z.ZodString>;
|
|
1004
1006
|
autoMount: z.ZodDefault<z.ZodEnum<{
|
|
1005
1007
|
off: "off";
|
|
1006
1008
|
on: "on";
|
|
@@ -1258,7 +1260,7 @@ export declare const BundleManifestSchema: z.ZodObject<{
|
|
|
1258
1260
|
harness?: "claude-code" | "codex" | "muse" | "native" | "opencode" | "pi" | "vendor" | undefined;
|
|
1259
1261
|
}[] | undefined;
|
|
1260
1262
|
}[];
|
|
1261
|
-
roleSetups: Partial<Record<"acceptance-run" | "approval-queue" | "commit-message" | "deployment-fix" | "documentation-run" | "extension-review" | "handoff-summary" | "loop-iteration" | "loop-verdict" | "maintenance-chore" | "model-router" | "pipeline-fix" | "refactor-run" | "safety-judge" | "session-title" | "spoken-reply" | "workflow-fix", string>>;
|
|
1263
|
+
roleSetups: Partial<Record<"acceptance-run" | "approval-queue" | "commit-message" | "deployment-fix" | "documentation-run" | "extension-review" | "handoff-summary" | "loop-iteration" | "loop-verdict" | "maintenance-chore" | "model-router" | "pipeline-fix" | "refactor-run" | "safety-judge" | "session-title" | "spoken-reply" | "subagent-sizing" | "workflow-fix", string>>;
|
|
1262
1264
|
autoModelGuidance: string;
|
|
1263
1265
|
changelogRepos: string[];
|
|
1264
1266
|
agentRetentionDays: number;
|
|
@@ -1418,7 +1420,7 @@ export declare const BundleManifestSchema: z.ZodObject<{
|
|
|
1418
1420
|
harness?: "claude-code" | "codex" | "muse" | "native" | "opencode" | "pi" | "vendor" | undefined;
|
|
1419
1421
|
}[] | undefined;
|
|
1420
1422
|
}[];
|
|
1421
|
-
roleSetups: Partial<Record<"acceptance-run" | "approval-queue" | "commit-message" | "deployment-fix" | "documentation-run" | "extension-review" | "handoff-summary" | "loop-iteration" | "loop-verdict" | "maintenance-chore" | "model-router" | "pipeline-fix" | "refactor-run" | "safety-judge" | "session-title" | "spoken-reply" | "workflow-fix", string>>;
|
|
1423
|
+
roleSetups: Partial<Record<"acceptance-run" | "approval-queue" | "commit-message" | "deployment-fix" | "documentation-run" | "extension-review" | "handoff-summary" | "loop-iteration" | "loop-verdict" | "maintenance-chore" | "model-router" | "pipeline-fix" | "refactor-run" | "safety-judge" | "session-title" | "spoken-reply" | "subagent-sizing" | "workflow-fix", string>>;
|
|
1422
1424
|
autoModelGuidance: string;
|
|
1423
1425
|
changelogRepos: string[];
|
|
1424
1426
|
agentRetentionDays: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/state/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,0BAA0B;;;;kBAOrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAI9E,eAAO,MAAM,yBAAyB;;;kBAKpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,2BAA2B;;;kBAKtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAmBhF,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/state/definition.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/sandbox-contract",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.408.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",
|
|
@@ -373,10 +373,10 @@
|
|
|
373
373
|
}
|
|
374
374
|
},
|
|
375
375
|
"dependencies": {
|
|
376
|
-
"@intentic/base": "1.
|
|
377
|
-
"@intentic/constants": "1.
|
|
378
|
-
"@intentic/extension-manifest": "1.
|
|
379
|
-
"@intentic/registry": "1.
|
|
376
|
+
"@intentic/base": "1.408.0",
|
|
377
|
+
"@intentic/constants": "1.408.0",
|
|
378
|
+
"@intentic/extension-manifest": "1.408.0",
|
|
379
|
+
"@intentic/registry": "1.408.0",
|
|
380
380
|
"@orpc/contract": "1.16.1",
|
|
381
381
|
"zod": "4.6.7"
|
|
382
382
|
},
|
|
@@ -22,7 +22,14 @@ import {
|
|
|
22
22
|
StorageReportSchema,
|
|
23
23
|
} from "../schemas/metrics.js";
|
|
24
24
|
import { OkSchema } from "../schemas/shared.js";
|
|
25
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
DaemonSessionSchema,
|
|
27
|
+
InfoSchema,
|
|
28
|
+
ManifestProblemsSchema,
|
|
29
|
+
ManifestRepairSchema,
|
|
30
|
+
PresentationReadSchema,
|
|
31
|
+
PresentationRefreshSchema,
|
|
32
|
+
} from "../schemas/system.js";
|
|
26
33
|
import { AutoUpdateInputSchema, AutoUpdateSchema, SkipUpdateInputSchema } from "../schemas/updates.js";
|
|
27
34
|
import {
|
|
28
35
|
BrowserNameParamSchema,
|
|
@@ -56,6 +63,31 @@ export const systemContract = {
|
|
|
56
63
|
})
|
|
57
64
|
.meta({ guest: true })
|
|
58
65
|
.output(InfoSchema),
|
|
66
|
+
// (2026-11-09) The sandbox's copy of its name and logo, which only the platform decides. Its own route, never a field
|
|
67
|
+
// on /info: /info is read often, and a logo is up to 150 KB. A file read, so it answers while the boot chain runs, for
|
|
68
|
+
// a switcher drawing the sandbox meanwhile; any member reads it, a guest does not.
|
|
69
|
+
presentation: systemRoute
|
|
70
|
+
.route({
|
|
71
|
+
method: "GET",
|
|
72
|
+
path: "/system/presentation",
|
|
73
|
+
summary: "The sandbox's name and logo",
|
|
74
|
+
description:
|
|
75
|
+
"What the owner calls this sandbox and its logo, as the sandbox last heard them from the platform, which holds them. The sandbox keeps this copy so you can still show them while the platform cannot be reached. Null until it has heard them once.",
|
|
76
|
+
})
|
|
77
|
+
.meta({ beforeBoot: true })
|
|
78
|
+
.output(PresentationReadSchema),
|
|
79
|
+
// Any member may ask: it only makes the sandbox ask the platform again, whose word it keeps. The editor calls it right
|
|
80
|
+
// after a rename or a new logo, rather than waiting for the next announce to say they changed.
|
|
81
|
+
presentationRefresh: systemRoute
|
|
82
|
+
.route({
|
|
83
|
+
method: "POST",
|
|
84
|
+
path: "/system/presentation/refresh",
|
|
85
|
+
summary: "Ask the platform for the sandbox's name and logo again",
|
|
86
|
+
description:
|
|
87
|
+
"Makes the sandbox ask the platform for its name and logo now and keep what it answers, typically right after they were changed. When the platform cannot be reached or refuses, the copy the sandbox already held is answered unchanged and `refreshed` is false.",
|
|
88
|
+
})
|
|
89
|
+
.meta({ beforeBoot: true, floor: "viewer" })
|
|
90
|
+
.output(PresentationRefreshSchema),
|
|
59
91
|
// The owner's "not this one" for the update card; /info's `skippedVersion` reads it back.
|
|
60
92
|
skipUpdate: systemRoute
|
|
61
93
|
.route({
|
|
@@ -66,6 +66,9 @@ export const AgentErrorCodeSchema = z.enum([
|
|
|
66
66
|
// The model can only write one-shot jobs (Model.helperOnly: its server says it cannot call tools, or
|
|
67
67
|
// it is the quick-jobs local model), refused before sending; the words wait for another model.
|
|
68
68
|
"model-helper-only",
|
|
69
|
+
// The turn names a model endpoint (`endpoint/<id>`) nobody has connected here any more: its capability was removed
|
|
70
|
+
// since the conversation last ran on it, refused before sending; the words wait for another model, or the endpoint.
|
|
71
|
+
"endpoint-gone",
|
|
69
72
|
// The privacy shield is on, the provider is untrusted, and the runtime is one it cannot read by content at
|
|
70
73
|
// all (an ACP agent, Pi), refused before sending; the words wait for a covered provider.
|
|
71
74
|
"privacy-unshielded",
|
|
@@ -104,6 +104,9 @@ export const SandboxNoticeSchema = z.discriminatedUnion("code", [
|
|
|
104
104
|
// A turn sent thin for a small window ("16k"): what was left out, and whether the base instructions were swapped too.
|
|
105
105
|
z.object({ code: z.literal("contextTrim"), params: z.object({ window: z.string(), omitted: z.string().optional(), base: z.boolean() }) }),
|
|
106
106
|
z.object({ code: z.literal("resumed"), params: z.object({ reason: ResumeNoticeReasonSchema }) }),
|
|
107
|
+
// A Continue somebody scheduled, gone out by itself when its time came (the daemon's continuation.ts): `waited` how
|
|
108
|
+
// long ago it was scheduled, already worded ("41h 3m"). The turn's own rows follow, whatever became of it.
|
|
109
|
+
z.object({ code: z.literal("scheduledContinue"), params: z.object({ waited: z.string() }) }),
|
|
107
110
|
// How a turn a spent allowance held continued the conversation (schemas/providers/handoff.ts): `tokens` the context
|
|
108
111
|
// it started from and `from` the one carrying the session whole would have re-read (both worded, "118k"); `cleared`
|
|
109
112
|
// older tool outputs a trimmed copy stubbed; `model` the one that wrote a summary. `fellBack` names the hand-off that
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CI_FIX_PREFIX,
|
|
3
3
|
CONVERSATION_ID,
|
|
4
|
+
HOME_PREFIX,
|
|
5
|
+
LAND_FIX_PREFIX,
|
|
6
|
+
LINKED_PREFIX,
|
|
7
|
+
LINK_CONVERSATION_PREFIX,
|
|
8
|
+
looksDrawn,
|
|
9
|
+
SUBAGENT_PREFIX,
|
|
10
|
+
TAIL_ALPHABET,
|
|
4
11
|
homeConversationId,
|
|
5
12
|
isHomeConversationId,
|
|
6
13
|
ciFixConversationId,
|
|
@@ -11,6 +18,7 @@ import {
|
|
|
11
18
|
newConversationId,
|
|
12
19
|
nextFixAttemptId,
|
|
13
20
|
} from "./conversation-ids.js";
|
|
21
|
+
import { CONVERSATION_WORDS } from "./conversation-words.js";
|
|
14
22
|
import { ConversationIdSchema } from "../schemas/agent.js";
|
|
15
23
|
|
|
16
24
|
const mockRandomValues = (values: readonly number[]) => {
|
|
@@ -37,30 +45,93 @@ test("every generated id passes the conversation-id guard", () => {
|
|
|
37
45
|
}
|
|
38
46
|
});
|
|
39
47
|
|
|
40
|
-
test("an id reads as
|
|
48
|
+
test("an id reads as one word and a short tail, and stays short", () => {
|
|
41
49
|
const id = newConversationId();
|
|
42
|
-
expect(id).toMatch(/^[a-z]
|
|
43
|
-
expect(id.length).
|
|
50
|
+
expect(id).toMatch(/^[a-z]{3,6}-[2-9a-hjkmnp-z]{4}$/);
|
|
51
|
+
expect(id.length).toBeLessThanOrEqual(11);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
test("the tail never uses a character people misread", () => {
|
|
55
|
+
expect(TAIL_ALPHABET).toHaveLength(31);
|
|
56
|
+
expect(TAIL_ALPHABET).not.toMatch(/[01ilo]/);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
test("every word is a short lowercase word, listed once", () => {
|
|
60
|
+
expect(CONVERSATION_WORDS.length).toBeGreaterThan(500);
|
|
61
|
+
expect(new Set(CONVERSATION_WORDS).size).toBe(CONVERSATION_WORDS.length);
|
|
62
|
+
for (const word of CONVERSATION_WORDS) {
|
|
63
|
+
expect(word).toMatch(/^[a-z]{3,6}$/);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// A drawn id must never read as a derived one (`home-…`, `ci-fix-…`, `sub-…`) or as a git ref. Every prefix a
|
|
68
|
+
// conversation id is minted under is listed, wherever it is minted: fix agents, home, subagents and links (this file's
|
|
69
|
+
// module), automation fires (`a-`), workflow steps (`wf-`), the public doors (`wc-` Visitor chat, `bug-` issue
|
|
70
|
+
// intake), extension update reviews (`ext-update-`) and the batch packs (`xt-`, `dg-`, `mt-`). Then the neighbours a
|
|
71
|
+
// drawn id would be mistaken for: a borrowed account (`lent-`) and a watch (`watch-k7mq` is its exact shape).
|
|
72
|
+
test("no word collides with a derived id's prefix or a git name", () => {
|
|
73
|
+
const prefixes = [
|
|
74
|
+
HOME_PREFIX,
|
|
75
|
+
CI_FIX_PREFIX,
|
|
76
|
+
LAND_FIX_PREFIX,
|
|
77
|
+
SUBAGENT_PREFIX,
|
|
78
|
+
LINK_CONVERSATION_PREFIX,
|
|
79
|
+
LINKED_PREFIX,
|
|
80
|
+
"a-",
|
|
81
|
+
"wf-",
|
|
82
|
+
"wc-",
|
|
83
|
+
"bug-",
|
|
84
|
+
"ext-update-",
|
|
85
|
+
"xt-",
|
|
86
|
+
"dg-",
|
|
87
|
+
"mt-",
|
|
88
|
+
"lent-",
|
|
89
|
+
"watch-",
|
|
90
|
+
];
|
|
91
|
+
const reserved = prefixes.map((prefix) => prefix.split("-")[0]);
|
|
92
|
+
for (const word of [...reserved, "main", "master", "head", "fork", "branch", "merge", "patch", "tag"]) {
|
|
93
|
+
expect(CONVERSATION_WORDS).not.toContain(word);
|
|
94
|
+
}
|
|
44
95
|
});
|
|
45
96
|
|
|
46
97
|
test("retries a random draw outside the last complete bucket", () => {
|
|
47
|
-
const bucketSize = Math.floor(2 ** 32 /
|
|
48
|
-
const { getRandomValues, remaining } = mockRandomValues([0,
|
|
98
|
+
const bucketSize = Math.floor(2 ** 32 / 31);
|
|
99
|
+
const { getRandomValues, remaining } = mockRandomValues([0, 0xffff_ffff, 0, bucketSize, bucketSize * 2, bucketSize * 3]);
|
|
49
100
|
|
|
50
|
-
expect(newConversationId()).toBe(
|
|
51
|
-
expect(getRandomValues).toHaveBeenCalledTimes(
|
|
101
|
+
expect(newConversationId()).toBe(`${CONVERSATION_WORDS[0]}-2345`);
|
|
102
|
+
expect(getRandomValues).toHaveBeenCalledTimes(6);
|
|
52
103
|
expect(remaining).toEqual([]);
|
|
53
104
|
});
|
|
54
105
|
|
|
55
|
-
test("maps complete random buckets to equal-width
|
|
56
|
-
const bucketSize = Math.floor(2 ** 32 /
|
|
57
|
-
const limit = bucketSize *
|
|
58
|
-
const { remaining } = mockRandomValues([0,
|
|
106
|
+
test("maps complete random buckets to equal-width tail characters", () => {
|
|
107
|
+
const bucketSize = Math.floor(2 ** 32 / 31);
|
|
108
|
+
const limit = bucketSize * 31;
|
|
109
|
+
const { remaining } = mockRandomValues([0, bucketSize - 1, bucketSize, bucketSize * 30, limit - 1]);
|
|
59
110
|
|
|
60
|
-
expect(newConversationId()).toBe(
|
|
111
|
+
expect(newConversationId()).toBe(`${CONVERSATION_WORDS[0]}-23zz`);
|
|
61
112
|
expect(remaining).toEqual([]);
|
|
62
113
|
});
|
|
63
114
|
|
|
115
|
+
test("a drawn id, new or old, looks drawn; a route or a derived id does not", () => {
|
|
116
|
+
expect(looksDrawn(newConversationId())).toBe(true);
|
|
117
|
+
expect(looksDrawn(`otter-kmpq`)).toBe(true);
|
|
118
|
+
expect(looksDrawn(`keen-pine-tkjf`)).toBe(true);
|
|
119
|
+
expect(looksDrawn(`git-view`)).toBe(false);
|
|
120
|
+
expect(looksDrawn(`otter-km0q`)).toBe(false);
|
|
121
|
+
expect(looksDrawn(ciFixConversationId(`web`, 42))).toBe(false);
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// A subagent's and a link's conversations are drawn ids under a prefix, and their tails carry no digit about a third
|
|
125
|
+
// of the time, so the prefix must not hide them.
|
|
126
|
+
test("a drawn id under a subagent or link prefix still looks drawn, in either generation", () => {
|
|
127
|
+
for (const prefix of [SUBAGENT_PREFIX, LINK_CONVERSATION_PREFIX, LINKED_PREFIX]) {
|
|
128
|
+
expect(looksDrawn(`${prefix}${newConversationId()}`)).toBe(true);
|
|
129
|
+
expect(looksDrawn(`${prefix}otter-kmpq`)).toBe(true);
|
|
130
|
+
expect(looksDrawn(`${prefix}keen-pine-tkjf`)).toBe(true);
|
|
131
|
+
expect(looksDrawn(`${prefix}view`)).toBe(false);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
|
|
64
135
|
test("ids are unique across a burst", () => {
|
|
65
136
|
const ids = new Set(Array.from({ length: 5_000 }, newConversationId));
|
|
66
137
|
expect(ids.size).toBe(5_000);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// A conversation's id is the most public string this app produces: the git branch, the worktree directory, the URL, and
|
|
2
|
-
// the card title. `
|
|
2
|
+
// the card title. `word-tail` reads at a glance; the tail keeps it unique and must satisfy
|
|
3
3
|
// ConversationIdSchema. Sandbox-started conversations use their own prefixed, derived ids instead.
|
|
4
4
|
|
|
5
|
+
import { CONVERSATION_WORDS } from "./conversation-words.js";
|
|
6
|
+
|
|
5
7
|
// The injection guard every path that interpolates a conversation id relies on: is this safe to put in a path.
|
|
6
8
|
export const CONVERSATION_ID = /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/;
|
|
7
9
|
|
|
@@ -15,117 +17,14 @@ export const CONVERSATION_TITLE_MAX = 80;
|
|
|
15
17
|
export const clipTitle = (title: string): string =>
|
|
16
18
|
title.length <= CONVERSATION_TITLE_MAX ? title : `${title.slice(0, CONVERSATION_TITLE_MAX - 1).trimEnd()}…`;
|
|
17
19
|
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"crisp",
|
|
27
|
-
"deft",
|
|
28
|
-
"eager",
|
|
29
|
-
"fair",
|
|
30
|
-
"fleet",
|
|
31
|
-
"glad",
|
|
32
|
-
"grand",
|
|
33
|
-
"keen",
|
|
34
|
-
"kind",
|
|
35
|
-
"lively",
|
|
36
|
-
"lucid",
|
|
37
|
-
"mellow",
|
|
38
|
-
"merry",
|
|
39
|
-
"mild",
|
|
40
|
-
"noble",
|
|
41
|
-
"plain",
|
|
42
|
-
"prime",
|
|
43
|
-
"proud",
|
|
44
|
-
"quick",
|
|
45
|
-
"quiet",
|
|
46
|
-
"rapid",
|
|
47
|
-
"ready",
|
|
48
|
-
"rich",
|
|
49
|
-
"ripe",
|
|
50
|
-
"sharp",
|
|
51
|
-
"sleek",
|
|
52
|
-
"smart",
|
|
53
|
-
"snug",
|
|
54
|
-
"solid",
|
|
55
|
-
"spry",
|
|
56
|
-
"stark",
|
|
57
|
-
"steady",
|
|
58
|
-
"still",
|
|
59
|
-
"stout",
|
|
60
|
-
"sunny",
|
|
61
|
-
"swift",
|
|
62
|
-
"tidy",
|
|
63
|
-
"true",
|
|
64
|
-
"vivid",
|
|
65
|
-
"warm",
|
|
66
|
-
"wise",
|
|
67
|
-
"witty",
|
|
68
|
-
] as const;
|
|
69
|
-
|
|
70
|
-
const NOUNS = [
|
|
71
|
-
"alder",
|
|
72
|
-
"anchor",
|
|
73
|
-
"arbor",
|
|
74
|
-
"arrow",
|
|
75
|
-
"aspen",
|
|
76
|
-
"badger",
|
|
77
|
-
"basin",
|
|
78
|
-
"beacon",
|
|
79
|
-
"birch",
|
|
80
|
-
"bison",
|
|
81
|
-
"cedar",
|
|
82
|
-
"cinder",
|
|
83
|
-
"comet",
|
|
84
|
-
"condor",
|
|
85
|
-
"cove",
|
|
86
|
-
"crane",
|
|
87
|
-
"delta",
|
|
88
|
-
"ember",
|
|
89
|
-
"falcon",
|
|
90
|
-
"fern",
|
|
91
|
-
"fjord",
|
|
92
|
-
"forge",
|
|
93
|
-
"gale",
|
|
94
|
-
"glade",
|
|
95
|
-
"harbor",
|
|
96
|
-
"heron",
|
|
97
|
-
"ivy",
|
|
98
|
-
"lantern",
|
|
99
|
-
"ledger",
|
|
100
|
-
"lichen",
|
|
101
|
-
"lynx",
|
|
102
|
-
"maple",
|
|
103
|
-
"marsh",
|
|
104
|
-
"meadow",
|
|
105
|
-
"mesa",
|
|
106
|
-
"moth",
|
|
107
|
-
"otter",
|
|
108
|
-
"pebble",
|
|
109
|
-
"pine",
|
|
110
|
-
"quarry",
|
|
111
|
-
"quill",
|
|
112
|
-
"raven",
|
|
113
|
-
"reef",
|
|
114
|
-
"ridge",
|
|
115
|
-
"rowan",
|
|
116
|
-
"sable",
|
|
117
|
-
"sage",
|
|
118
|
-
"shale",
|
|
119
|
-
"spruce",
|
|
120
|
-
"summit",
|
|
121
|
-
"thistle",
|
|
122
|
-
"tundra",
|
|
123
|
-
"vale",
|
|
124
|
-
"willow",
|
|
125
|
-
"wren",
|
|
126
|
-
] as const;
|
|
127
|
-
|
|
128
|
-
// Four base36 characters is 1.7M values per word pair, far past any workspace's collision risk.
|
|
20
|
+
// One word and a tail: `otter-k7mq`, about ten characters, since every letter counts on the board's rows. The word is
|
|
21
|
+
// what a person reads and says; the tail is what keeps it unique.
|
|
22
|
+
//
|
|
23
|
+
// The tail is lowercase on purpose. The id is also the branch and the worktree directory, and both reach Windows and
|
|
24
|
+
// macOS filesystems that fold case, where `otter-K7mq` and `otter-k7mq` would be one folder. So the tail's alphabet is
|
|
25
|
+
// base36 with the characters people misread dropped (0/o, 1/l/i): 31 symbols, four of them 923,521 values per word,
|
|
26
|
+
// and with the word list about 2^29 ids in all, far past any workspace's collision risk.
|
|
27
|
+
export const TAIL_ALPHABET = "23456789abcdefghjkmnpqrstuvwxyz";
|
|
129
28
|
const TAIL_LENGTH = 4;
|
|
130
29
|
|
|
131
30
|
// Rejects the short remainder above the last full bucket rather than folding it back with `%`, which would bias the
|
|
@@ -146,12 +45,35 @@ const randomBelow = (upperBound: number): number => {
|
|
|
146
45
|
// get the same name.
|
|
147
46
|
const pick = <T>(values: readonly T[]): T => values[randomBelow(values.length)]!;
|
|
148
47
|
|
|
149
|
-
//
|
|
150
|
-
const
|
|
48
|
+
// One TAIL_ALPHABET character per draw, all of which the id guard accepts.
|
|
49
|
+
const TAIL_SYMBOLS = [...TAIL_ALPHABET];
|
|
50
|
+
const tail = (): string => Array.from({ length: TAIL_LENGTH }, () => pick(TAIL_SYMBOLS)).join("");
|
|
51
|
+
|
|
52
|
+
// A fresh id: `<word>-<tail>`, e.g. `otter-k7mq`; about ten characters against a UUID's thirty-six.
|
|
53
|
+
export const newConversationId = (): string => `${pick(CONVERSATION_WORDS)}-${tail()}`;
|
|
54
|
+
|
|
55
|
+
// A DRAWN ID WORN UNDER A PREFIX. Three kinds of conversation draw an id like any other and say what they are in front
|
|
56
|
+
// of it: a spawned subagent (`sub-otter-k7mq`), a conversation a link opened here (`link-…`) and the roster entry for a
|
|
57
|
+
// task running on a linked sandbox (`linked-…`). Kept here beside the word list, since no word may read as one of them.
|
|
58
|
+
export const SUBAGENT_PREFIX = "sub-";
|
|
59
|
+
export const LINK_CONVERSATION_PREFIX = "link-";
|
|
60
|
+
export const LINKED_PREFIX = "linked-";
|
|
61
|
+
const WRAPPING_PREFIXES = [SUBAGENT_PREFIX, LINK_CONVERSATION_PREFIX, LINKED_PREFIX];
|
|
62
|
+
const unwrapped = (id: string): string => {
|
|
63
|
+
const prefix = WRAPPING_PREFIXES.find((candidate) => id.startsWith(candidate));
|
|
64
|
+
return prefix === undefined ? id : id.slice(prefix.length);
|
|
65
|
+
};
|
|
151
66
|
|
|
152
|
-
//
|
|
153
|
-
//
|
|
154
|
-
|
|
67
|
+
// Whether an id is shaped like one `newConversationId` draws, or like the `adjective-noun-xxxx` ids it drew before,
|
|
68
|
+
// bare or under one of the prefixes above. For telling an instance apart from a route (perf rollups), not a guard: a
|
|
69
|
+
// derived id can still look like one.
|
|
70
|
+
const WORDS = new Set(CONVERSATION_WORDS);
|
|
71
|
+
const DRAWN_ID = new RegExp(`^([a-z]+)-[${TAIL_ALPHABET}]{${TAIL_LENGTH}}$`);
|
|
72
|
+
const LEGACY_DRAWN_ID = /^[a-z]+-[a-z]+-[a-z0-9]{4}$/;
|
|
73
|
+
export const looksDrawn = (id: string): boolean => {
|
|
74
|
+
const drawn = unwrapped(id);
|
|
75
|
+
return WORDS.has(DRAWN_ID.exec(drawn)?.[1] ?? "") || LEGACY_DRAWN_ID.test(drawn);
|
|
76
|
+
};
|
|
155
77
|
|
|
156
78
|
// Derived, not drawn, so a re-computed id says whether an agent is already on this failure and a second press continues
|
|
157
79
|
// it. The repo is included (one run id per project) and slugified, not hashed, since people read it.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// The words a fresh conversation id is drawn from (`newConversationId`): everyday concrete nouns (animals, food,
|
|
2
|
+
// nature, things, places) that a non-native English speaker reads and spells at sight, three to six letters, lowercase
|
|
3
|
+
// a-z only. Kept out: rare or hard-to-spell words, slang and words with a rude second meaning, and words that already
|
|
4
|
+
// mean something in git or in this app's id space (`main`, `fork`, `branch`, `home`, `link`, `sub`, `job`, `web`, `watch`), so an
|
|
5
|
+
// id never reads as a ref, a command or one of the derived, prefixed ids. Alphabetical, one space apart, so a
|
|
6
|
+
// duplicate shows; the test holds the rules.
|
|
7
|
+
export const CONVERSATION_WORDS: readonly string[] = `
|
|
8
|
+
acorn alley almond alpaca amber anchor ant apple apron arena arrow aspen atlas atom attic aurora autumn avenue
|
|
9
|
+
badge badger bag bagel bakery ball bamboo banana banjo banner barn barrel basil basket bay beach bean bear
|
|
10
|
+
beaver bed bee beet beetle bell belt bench berry bike birch bird bison boat book boot bottle bowl box bread
|
|
11
|
+
breeze brick bridge brook broom brush bucket bud bun bunny burger bus bush butter button cabin cactus cafe cake
|
|
12
|
+
calf camel camera canal canary candle candy canoe canvas canyon car card carpet carrot cart cashew castle cat
|
|
13
|
+
cave cedar celery cellar cello cereal chair chalk cheese cherry chess chick chili cider city clam cliff clock
|
|
14
|
+
cloud clover coast coat cobra cocoa cod coffee coin comb comet comic cookie copper coral cork corn cosmos cougar
|
|
15
|
+
coyote crab crane crater crayon cream creek crepe crown cub cup curry daisy dawn deer delta desert desk dew
|
|
16
|
+
diary dice dish dog doll domino donkey donut door dove dream dress drum duck dune dusk eagle earth echo egg elk
|
|
17
|
+
ember emu eraser falcon fan farm fawn fence fern ferret field fig fish flag flame floor flour flower flute foal
|
|
18
|
+
fog forest fox frame frog frost fudge galaxy garage garden garlic gate gecko gem ginger glass globe glove glue
|
|
19
|
+
goat gold gong goose grape grass grove guava guitar gulf gull hail hammer harbor hare harp hat hawk hazel helmet
|
|
20
|
+
hen herb heron hill hippo honey hoodie hook horn horse hotel hut ice igloo iguana inn iris iron island ivy
|
|
21
|
+
jacket jade jaguar jam jar jelly jet jewel juice jungle kale kayak kettle kiosk kite kitten kiwi knot koala
|
|
22
|
+
ladder lagoon lake lamb lamp laser latte lava leaf lemon lens lilac lily lime lion lizard llama lobby lodge loft
|
|
23
|
+
lotus lynx magnet mango map maple marble market marsh mask meadow medal melody melon meteor milk mill mint
|
|
24
|
+
mirror mist mitten mocha monkey moon moose moss moth mouse movie muffin mug mule museum nail napkin nebula
|
|
25
|
+
nectar needle noodle noon novel oak oar oasis oat ocean olive onion opal orange orbit orca orchid otter oven owl
|
|
26
|
+
oyster paddle paint palace palm pan panda papaya paper parcel park parrot pasta pea peach peak peanut pear pearl
|
|
27
|
+
pebble pen pencil pepper petal phone photo piano pickle pie pier pigeon pillow pine pixel pizza plane planet
|
|
28
|
+
plate plaza plum pocket poem pollen pond pony pool poppy porch poster pot potato puddle puffin puma puppy purse
|
|
29
|
+
puzzle quartz quilt rabbit radio radish raft rain rake ramen ranch raven reed reef rhino ribbon rice ridge ring
|
|
30
|
+
river robin robot rock rocket roof rope rose ruby rug ruler saddle sage sail salad salmon salt sand sauce scarf
|
|
31
|
+
scone sea seal seed sesame shark sheep shelf shield ship shirt shoe shop shore shovel shrimp silver skate ski
|
|
32
|
+
sky sled sloth smile snail snake snow soap sock soda sofa soil song soup spark spider sponge spoon sprout squash
|
|
33
|
+
squid stamp star statue stone stool stork storm stream street studio sugar summer summit sun sunset sushi swan
|
|
34
|
+
syrup taco tape taxi tea teapot teddy temple tent ticket tide tiger toad toast toffee tofu tomato torch toucan
|
|
35
|
+
towel tower town toy train tram tray tree trophy trout truck tub tuba tulip tuna tundra tunnel turnip turtle
|
|
36
|
+
twig valley van vase vine violet violin wafer waffle wagon wallet walnut walrus wave whale wheel willow
|
|
37
|
+
wind winter wolf wood yak yard yogurt zebra zipper
|
|
38
|
+
`
|
|
39
|
+
.trim()
|
|
40
|
+
.split(/\s+/);
|
|
@@ -95,6 +95,16 @@ export const MODEL_ROLES = [
|
|
|
95
95
|
icon: "sparkles",
|
|
96
96
|
setup: "low",
|
|
97
97
|
},
|
|
98
|
+
{
|
|
99
|
+
// Asked only when a spawned subagent nobody placed could take one of a runner's last free slots while this
|
|
100
|
+
// sandbox still has room for light work (runners/child-placement.ts roomContested); never on a quiet fleet.
|
|
101
|
+
id: "subagent-sizing",
|
|
102
|
+
label: "Subagent sizing",
|
|
103
|
+
blurb: "Whether a subagent's task reads as heavy (builds, tests) or light, when a runner's last free slots should go to the heavier work.",
|
|
104
|
+
kind: "helper",
|
|
105
|
+
icon: "server",
|
|
106
|
+
setup: "low",
|
|
107
|
+
},
|
|
98
108
|
{
|
|
99
109
|
id: "pipeline-fix",
|
|
100
110
|
label: "Pipeline fixes",
|
|
@@ -98,6 +98,9 @@ export const FAILURE_CODES = {
|
|
|
98
98
|
"model-unavailable": { kind: "model", course: "door", anotherModelClears: true },
|
|
99
99
|
"context-window-too-small": { kind: "contextFull", course: "door", anotherModelClears: true },
|
|
100
100
|
"model-helper-only": { kind: "model", course: "door", anotherModelClears: true },
|
|
101
|
+
// The endpoint the turn would run on is no longer connected. Not `repeats`: that names a wall no other model gets
|
|
102
|
+
// past (wayOut.ts), and this one any other model does.
|
|
103
|
+
"endpoint-gone": { kind: "model", course: "door", anotherModelClears: true },
|
|
101
104
|
// The privacy shield refused an untrusted provider on a runtime it cannot read by content at all.
|
|
102
105
|
"privacy-unshielded": { kind: "privacy", course: "door" },
|
|
103
106
|
// The turn carries a tool list its runtime cannot keep.
|
|
@@ -13,7 +13,7 @@ test("every code the wire names has a row, and the table names no code the wire
|
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
// The door course names the codes refused before the model saw a word.
|
|
16
|
-
test("the codes turned away at the door are exactly the
|
|
16
|
+
test("the codes turned away at the door are exactly the twenty refused before the model saw a word", () => {
|
|
17
17
|
const door = codesWhere((code) => failureCourseOf(code) === "door");
|
|
18
18
|
expect(door).toEqual(
|
|
19
19
|
[
|
|
@@ -23,6 +23,7 @@ test("the codes turned away at the door are exactly the nineteen refused before
|
|
|
23
23
|
"unknown-command",
|
|
24
24
|
"context-window-too-small",
|
|
25
25
|
"model-helper-only",
|
|
26
|
+
"endpoint-gone",
|
|
26
27
|
"privacy-unshielded",
|
|
27
28
|
"tools-unenforced",
|
|
28
29
|
"agent-domain-refused",
|
|
@@ -48,6 +49,7 @@ test("another model clears exactly the refusals about the model, its trial or it
|
|
|
48
49
|
"account-not-allowed",
|
|
49
50
|
"context-window-too-small",
|
|
50
51
|
"model-helper-only",
|
|
52
|
+
"endpoint-gone",
|
|
51
53
|
"trial-unavailable",
|
|
52
54
|
"trial-model-unavailable",
|
|
53
55
|
"trial-exhausted",
|
|
@@ -95,6 +97,7 @@ test("every code keeps the kind the board named it by", () => {
|
|
|
95
97
|
"model-unavailable": "model",
|
|
96
98
|
"trial-model-unavailable": "model",
|
|
97
99
|
"model-helper-only": "model",
|
|
100
|
+
"endpoint-gone": "model",
|
|
98
101
|
"context-window-too-small": "contextFull",
|
|
99
102
|
"context-overflow": "contextFull",
|
|
100
103
|
"engine-version-floor": "update",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { runnerLinkReading, RunnerLinkReadingSchema } from "./runner-protocol.js";
|
|
2
|
+
|
|
3
|
+
// What the machine's keeper reads to tell a runner whose link is down from one that is up (runner-protocol.ts).
|
|
4
|
+
|
|
5
|
+
const PARENT = "https://sandbox-a4ba63bf2aa5.sbx.intentic.dev";
|
|
6
|
+
|
|
7
|
+
test("an open link says so and nothing about an outage it is not in", () => {
|
|
8
|
+
const reading = runnerLinkReading({ state: () => "open", outage: () => undefined }, PARENT, false, 0, 1_000);
|
|
9
|
+
expect(reading).toEqual({ at: 1_000, parent: PARENT, state: "open", working: 0 });
|
|
10
|
+
expect(RunnerLinkReadingSchema.parse(reading)).toEqual(reading);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test("a failing link says since when, how many tries, and the work a restart would cut", () => {
|
|
14
|
+
const reading = runnerLinkReading({ state: () => "connecting", outage: () => ({ failures: 7, since: 500 }) }, PARENT, false, 2, 1_000);
|
|
15
|
+
expect(reading).toEqual({ at: 1_000, parent: PARENT, state: "connecting", since: 500, failures: 7, working: 2 });
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test("a refused enrollment is said, since only re-pairing brings that runner back", () => {
|
|
19
|
+
const reading = runnerLinkReading({ state: () => "closed", outage: () => undefined }, PARENT, true, 0, 1_000);
|
|
20
|
+
expect(reading.revoked).toBe(true);
|
|
21
|
+
expect(reading.state).toBe("closed");
|
|
22
|
+
});
|