@capybara-hq/kernel 0.1.0-rc.77 → 0.1.0-rc.79
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/bootstrap.json +6 -6
- package/dist/admin/outbox-dead.service.js +4 -1
- package/dist/agents/admin-agents.js +2 -0
- package/dist/agents/agent-lookup.js +4 -0
- package/dist/agents/agent-profile.service.js +3 -0
- package/dist/agents/agents.service.js +7 -0
- package/dist/agents/org-templates.js +1 -0
- package/dist/agents/pending-connector-requests.js +6 -0
- package/dist/agents/pending-connectors.service.js +2 -0
- package/dist/agents/readiness.service.d.ts +9 -3
- package/dist/agents/readiness.service.js +3 -3
- package/dist/agents/templates.js +1 -0
- package/dist/background/finish.js +3 -0
- package/dist/background/stop.js +2 -0
- package/dist/background/store.js +44 -0
- package/dist/background/tasks.service.js +3 -2
- package/dist/background/wake-rules.js +1 -0
- package/dist/catalog/admin-catalog.controller.d.ts +6 -0
- package/dist/catalog/admin-catalog.controller.js +13 -0
- package/dist/catalog/catalog-content.d.ts +9 -0
- package/dist/catalog/catalog-content.js +3 -1
- package/dist/catalog/catalog-items.js +4 -0
- package/dist/catalog/catalog-scope.service.js +4 -1
- package/dist/catalog/component-promotion.js +2 -0
- package/dist/catalog/component-scope.controller.d.ts +9 -15
- package/dist/catalog/component-scope.controller.js +14 -9
- package/dist/catalog/component-scope.service.js +5 -0
- package/dist/catalog/component-state.d.ts +4 -1
- package/dist/catalog/component-state.js +4 -2
- package/dist/catalog/marketplace-fetch.d.ts +1 -1
- package/dist/catalog/marketplace-fetch.js +1 -1
- package/dist/catalog/marketplaces.service.d.ts +6 -1
- package/dist/catalog/marketplaces.service.js +8 -3
- package/dist/catalog/org-catalog.controller.d.ts +9 -0
- package/dist/catalog/org-catalog.controller.js +18 -0
- package/dist/catalog/org-catalog.schemas.d.ts +2 -4
- package/dist/catalog/org-catalog.schemas.js +2 -3
- package/dist/catalog/org-catalog.service.d.ts +10 -1
- package/dist/catalog/org-catalog.service.js +34 -23
- package/dist/catalog/org-extension-switch.d.ts +3 -10
- package/dist/catalog/org-extension-switch.js +14 -60
- package/dist/catalog/org-extension.controller.d.ts +6 -7
- package/dist/catalog/org-extension.controller.js +4 -4
- package/dist/catalog/org-extension.schemas.d.ts +1 -2
- package/dist/catalog/org-extension.schemas.js +1 -3
- package/dist/catalog/owned-items.js +10 -1
- package/dist/catalog/ownership.js +2 -0
- package/dist/catalog/plugin-import.d.ts +3 -0
- package/dist/catalog/plugin-import.js +10 -1
- package/dist/catalog/plugin-install.d.ts +1 -4
- package/dist/catalog/plugin-install.js +11 -12
- package/dist/catalog/plugin-upgrade.js +4 -1
- package/dist/catalog/request-rules.js +6 -0
- package/dist/catalog/requests.service.js +4 -0
- package/dist/catalog/scope-orgs.js +1 -0
- package/dist/catalog/scope-sync.d.ts +8 -5
- package/dist/catalog/scope-sync.js +21 -23
- package/dist/catalog/template-description.d.ts +17 -0
- package/dist/catalog/template-description.js +18 -0
- package/dist/catalog/unshare.js +3 -0
- package/dist/channels/connections.service.js +1 -0
- package/dist/channels/inbound.js +1 -0
- package/dist/channels/jobs.js +1 -0
- package/dist/channels/outbound.js +6 -0
- package/dist/channels/supervisor.js +1 -0
- package/dist/channels/threads.js +1 -0
- package/dist/client/client-reports.service.js +1 -0
- package/dist/config/fields.js +20 -4
- package/dist/config/schema.d.ts +1 -1
- package/dist/config/schema.js +13 -13
- package/dist/conversations/access.js +1 -0
- package/dist/conversations/attachments.service.js +16 -4
- package/dist/conversations/conversations.service.js +17 -3
- package/dist/conversations/event-log.js +2 -0
- package/dist/conversations/events.d.ts +1 -0
- package/dist/conversations/events.js +3 -1
- package/dist/conversations/files.js +3 -2
- package/dist/conversations/permission-profiles.service.js +1 -0
- package/dist/conversations/prompt-suggestions.js +2 -0
- package/dist/conversations/queue.js +8 -0
- package/dist/conversations/queue.service.js +6 -2
- package/dist/conversations/source.js +2 -0
- package/dist/conversations/titles.js +10 -2
- package/dist/conversations/tree.js +6 -0
- package/dist/db/kernel-schema.d.ts +5 -1
- package/dist/devices/conversation-devices.js +3 -0
- package/dist/devices/device-projects.service.js +2 -0
- package/dist/devices/devices.service.js +5 -0
- package/dist/devices/legacy-cleanup.job.js +5 -2
- package/dist/dial-in/handlers.js +2 -0
- package/dist/dial-in/machines.js +11 -2
- package/dist/dial-in/targets.d.ts +0 -2
- package/dist/dial-in/targets.js +0 -10
- package/dist/errors.d.ts +0 -1
- package/dist/errors.js +0 -1
- package/dist/evals/budget.js +14 -1
- package/dist/evals/run-replay.js +4 -0
- package/dist/evals/runs.service.js +13 -7
- package/dist/evals/sets.service.js +23 -8
- package/dist/evals/trajectory.service.d.ts +1 -1
- package/dist/evals/trajectory.service.js +1 -0
- package/dist/evals/worker.js +5 -1
- package/dist/extensions/admin-ops.js +1 -0
- package/dist/extensions/admin-view.js +3 -1
- package/dist/extensions/bootstrap-packages.d.ts +12 -1
- package/dist/extensions/bootstrap-packages.js +49 -9
- package/dist/extensions/bootstrap.d.ts +17 -2
- package/dist/extensions/bootstrap.js +41 -9
- package/dist/extensions/config-json-schema.d.ts +2 -2
- package/dist/extensions/config-json-schema.js +1 -3
- package/dist/extensions/deployment-config.d.ts +5 -3
- package/dist/extensions/deployment-config.js +3 -3
- package/dist/extensions/effective-config.d.ts +8 -7
- package/dist/extensions/effective-config.js +8 -7
- package/dist/extensions/enabled.js +1 -0
- package/dist/extensions/host.d.ts +4 -3
- package/dist/extensions/host.js +11 -12
- package/dist/extensions/instance.d.ts +1 -1
- package/dist/extensions/instance.js +17 -2
- package/dist/extensions/org-config.d.ts +35 -97
- package/dist/extensions/org-config.js +48 -315
- package/dist/extensions/org-levels.d.ts +22 -9
- package/dist/extensions/org-levels.js +100 -20
- package/dist/extensions/org-overrides.d.ts +14 -15
- package/dist/extensions/org-overrides.js +20 -20
- package/dist/extensions/package.js +1 -1
- package/dist/extensions/permission-set.d.ts +1 -3
- package/dist/extensions/permission-set.js +3 -7
- package/dist/extensions/permission-view.d.ts +3 -1
- package/dist/extensions/permission-view.js +5 -4
- package/dist/extensions/plugin-icons.d.ts +80 -1
- package/dist/extensions/plugin-icons.js +211 -2
- package/dist/extensions/point-defaults.d.ts +17 -18
- package/dist/extensions/point-defaults.js +25 -28
- package/dist/git/gateway.js +1 -1
- package/dist/git/identity.d.ts +1 -1
- package/dist/git/identity.js +2 -2
- package/dist/identity/accounts.js +6 -0
- package/dist/identity/api-tokens.js +8 -0
- package/dist/infra/outbox/outbox.dispatcher.js +4 -1
- package/dist/infra/outbox/outbox.service.js +2 -0
- package/dist/net/public-address.d.ts +3 -3
- package/dist/net/public-address.js +3 -3
- package/dist/orgs/directory-sync.d.ts +9 -6
- package/dist/orgs/directory-sync.js +15 -12
- package/dist/orgs/invitations.service.js +2 -0
- package/dist/orgs/members.service.js +2 -0
- package/dist/orgs/offboarding.js +2 -0
- package/dist/packages/npm.d.ts +10 -2
- package/dist/packages/npm.js +38 -6
- package/dist/platform/exclusions.js +20 -0
- package/dist/platform/ops/admin-items.ops.js +1 -0
- package/dist/platform/ops/agents.ops.js +1 -0
- package/dist/platform/ops/connectors.ops.js +7 -1
- package/dist/platform/ops/extensions.ops.d.ts +6 -8
- package/dist/platform/ops/extensions.ops.js +18 -97
- package/dist/platform/ops/org-plugins.ops.d.ts +3 -6
- package/dist/platform/ops/org-plugins.ops.js +14 -65
- package/dist/platform/ops/outbox.ops.js +1 -0
- package/dist/platform/ops/person-inputs.d.ts +0 -4
- package/dist/platform/ops/person-inputs.js +0 -8
- package/dist/platform/ops/plugins.ops.d.ts +4 -1
- package/dist/platform/ops/plugins.ops.js +27 -34
- package/dist/platform/person-fields.d.ts +1 -1
- package/dist/platform/person-fields.js +1 -1
- package/dist/platform/sealed-reveals.js +2 -0
- package/dist/push/recipients.js +9 -2
- package/dist/runtime/permission-context.service.js +1 -0
- package/dist/runtime/plugin-context.service.js +1 -0
- package/dist/runtime/project/knowledge.service.js +1 -0
- package/dist/runtime/run-context.service.js +1 -0
- package/dist/runtime/run-deletion.js +4 -0
- package/dist/runtime/run-execution.js +2 -0
- package/dist/runtime/run-finish.js +3 -0
- package/dist/runtime/run-jobs.js +3 -0
- package/dist/runtime/run-orphan-check.job.js +7 -0
- package/dist/runtime/run-queue.js +21 -2
- package/dist/runtime/run-worker.js +5 -0
- package/dist/runtime/step-log.js +1 -0
- package/dist/runtime/subagents/child.js +2 -0
- package/dist/runtime/subagents/deliveries.js +3 -0
- package/dist/runtime/subagents/dispatch.js +5 -1
- package/dist/runtime/subagents/messages.js +2 -0
- package/dist/runtime/subagents/org-agents.d.ts +1 -1
- package/dist/runtime/subagents/org-agents.js +2 -1
- package/dist/runtime/usage-report-jobs.js +1 -0
- package/dist/runtime/usage-report.js +3 -0
- package/dist/runtime/waits.js +5 -0
- package/dist/sandbox/cloud-permission-snapshot.js +9 -3
- package/dist/sandbox/device-reports.js +3 -0
- package/dist/sandbox/legacy-retirement.js +5 -1
- package/dist/sandbox/managed-device-context.js +1 -0
- package/dist/sandbox/modes.d.ts +5 -2
- package/dist/sandbox/modes.js +8 -4
- package/dist/sandbox/network-grants.js +2 -0
- package/dist/sandbox/operation-intents.js +58 -0
- package/dist/sandbox/operation-reconcile.job.js +2 -0
- package/dist/sandbox/permission-authority-lock.js +12 -6
- package/dist/sandbox/permission-call-grants.js +6 -0
- package/dist/sandbox/permission-ceiling-writes.js +5 -0
- package/dist/sandbox/permission-config-publication.js +5 -0
- package/dist/sandbox/permission-instance-writes.js +4 -0
- package/dist/sandbox/permission-runtime-reports.js +10 -1
- package/dist/sandbox/permission-transitions.js +3 -0
- package/dist/sandbox/review/review.service.js +8 -5
- package/dist/sandbox/sandbox.service.d.ts +14 -0
- package/dist/sandbox/sandbox.service.js +195 -29
- package/dist/sandbox/unreachable.js +4 -1
- package/dist/schedules/fire.js +9 -3
- package/dist/schedules/pause.js +2 -0
- package/dist/schedules/run-tracker.js +16 -1
- package/dist/schedules/scheduled-tasks.service.js +4 -2
- package/dist/schedules/store.js +8 -0
- package/dist/schedules/unattended.js +4 -0
- package/dist/setup/setup-checks.service.d.ts +1 -10
- package/dist/setup/setup-checks.service.js +19 -29
- package/dist/shares/share-open.service.js +1 -0
- package/dist/shares/shares.service.js +2 -0
- package/dist/skills/agent-skills.service.d.ts +1 -1
- package/dist/skills/agent-skills.service.js +13 -2
- package/dist/skills/catalog.js +3 -0
- package/dist/skills/changes.service.js +10 -2
- package/dist/skills/conversation-catalog.js +1 -0
- package/dist/skills/skills.service.js +4 -0
- package/dist/tools/approvals.service.js +40 -0
- package/dist/tools/builtins/schedules.js +11 -6
- package/dist/tools/builtins/web/fetch.js +1 -1
- package/dist/tools/builtins/web/search.js +1 -1
- package/dist/tools/connector-account-policies.js +3 -0
- package/dist/tools/connectors.controller.d.ts +37 -9
- package/dist/tools/connectors.controller.js +47 -12
- package/dist/tools/connectors.schemas.d.ts +4 -0
- package/dist/tools/connectors.schemas.js +13 -1
- package/dist/tools/connectors.service.d.ts +17 -0
- package/dist/tools/connectors.service.js +36 -2
- package/dist/tools/drift.js +5 -0
- package/dist/tools/git-push-policy.js +3 -0
- package/dist/tools/oauth/discovery.d.ts +2 -2
- package/dist/tools/oauth/discovery.js +2 -2
- package/dist/tools/oauth/flow.js +1 -0
- package/dist/tools/outputs.js +2 -0
- package/dist/tools/permission-approval-jobs.js +3 -0
- package/dist/tools/pipeline.js +2 -0
- package/dist/tools/policy.js +3 -0
- package/dist/tools/questions.service.js +13 -0
- package/package.json +3 -3
- package/src/migrations/0181_connector_description.sql +3 -0
|
@@ -54,6 +54,7 @@ let PermissionInstanceWrites = class PermissionInstanceWrites {
|
|
|
54
54
|
.selectFrom("device_instances")
|
|
55
55
|
.select(["generation", "permission_roots"])
|
|
56
56
|
.where("device_id", "=", deviceId)
|
|
57
|
+
.where("org_id", "=", orgId)
|
|
57
58
|
.forUpdate()
|
|
58
59
|
.executeTakeFirst();
|
|
59
60
|
if (!row || row.generation !== generation)
|
|
@@ -74,6 +75,7 @@ let PermissionInstanceWrites = class PermissionInstanceWrites {
|
|
|
74
75
|
generation: generation + 1,
|
|
75
76
|
})
|
|
76
77
|
.where("device_id", "=", deviceId)
|
|
78
|
+
.where("org_id", "=", orgId)
|
|
77
79
|
.where("generation", "=", generation)
|
|
78
80
|
.returning("created_at")
|
|
79
81
|
.executeTakeFirst();
|
|
@@ -171,6 +173,8 @@ let PermissionInstanceWrites = class PermissionInstanceWrites {
|
|
|
171
173
|
.execute();
|
|
172
174
|
return next;
|
|
173
175
|
}
|
|
176
|
+
// org-filter: only reached from commitHandle, which locked this device row by its org first;
|
|
177
|
+
// the mark must count every recorded generation of the device
|
|
174
178
|
async initialHighWater(deviceId) {
|
|
175
179
|
const [instance, intents, tasks, reports] = await Promise.all([
|
|
176
180
|
this.db
|
|
@@ -92,6 +92,8 @@ export function supportOf(value) {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
/** The revision of the device's stored report (`devices.report`), or null when none is stored. */
|
|
95
|
+
// org-filter: device-id helper; every caller (PermissionFacts, SandboxService) first read this
|
|
96
|
+
// device with its org filter, so the id is already proven to be the caller's org
|
|
95
97
|
async function storedReportRevision(db, deviceId) {
|
|
96
98
|
const row = await db
|
|
97
99
|
.selectFrom("devices")
|
|
@@ -145,6 +147,8 @@ export async function readRuntimeReport(db, deviceId, provider, version) {
|
|
|
145
147
|
* current, which names the installed evidence) and the support it recorded (null unless it is
|
|
146
148
|
* current), whatever availability that support gives.
|
|
147
149
|
*/
|
|
150
|
+
// org-filter: device-id helper; every caller (PermissionFacts, SandboxService) first read this
|
|
151
|
+
// device with its org filter, so the id is already proven to be the caller's org
|
|
148
152
|
export async function readCurrentReport(db, deviceId, provider, version) {
|
|
149
153
|
const unprobed = {
|
|
150
154
|
availability: unprobedPermissionAvailability(),
|
|
@@ -215,6 +219,8 @@ export async function readCurrentReport(db, deviceId, provider, version) {
|
|
|
215
219
|
* applied limits) but no current report is recorded for it (none yet, or one recorded under an
|
|
216
220
|
* earlier report revision). Database reads only.
|
|
217
221
|
*/
|
|
222
|
+
// org-filter: device-id helper; every caller (PermissionFacts, SandboxService) first read this
|
|
223
|
+
// device with its org filter, so the id is already proven to be the caller's org
|
|
218
224
|
export async function reportOwed(db, deviceId, provider, version) {
|
|
219
225
|
if (!version)
|
|
220
226
|
return false;
|
|
@@ -320,7 +326,10 @@ __decorate([
|
|
|
320
326
|
Transactional({ propagation: "mandatory" })
|
|
321
327
|
], PermissionRuntimeReports.prototype, "clearSupport", null);
|
|
322
328
|
PermissionRuntimeReports = __decorate([
|
|
323
|
-
Injectable()
|
|
329
|
+
Injectable()
|
|
330
|
+
// org-filter: every write asserts the device authority writer lock held exclusively, which
|
|
331
|
+
// PermissionAuthorityLock.acquire grants only after checking the device belongs to the subject org
|
|
332
|
+
,
|
|
324
333
|
__param(0, Inject(KernelDb)),
|
|
325
334
|
__param(1, Inject(TransactionHost)),
|
|
326
335
|
__param(2, Inject(PermissionAuthorityLock))
|
|
@@ -62,6 +62,7 @@ let PermissionTransitions = class PermissionTransitions {
|
|
|
62
62
|
.selectFrom("conversations")
|
|
63
63
|
.select("id")
|
|
64
64
|
.where("id", "=", change.rootConversationId)
|
|
65
|
+
.where("org_id", "=", change.orgId)
|
|
65
66
|
.unionAll((q) => q
|
|
66
67
|
.selectFrom("conversations as c")
|
|
67
68
|
.innerJoin("tree", "tree.id", "c.parent_conversation_id")
|
|
@@ -70,6 +71,7 @@ let PermissionTransitions = class PermissionTransitions {
|
|
|
70
71
|
.selectFrom("conversations")
|
|
71
72
|
.select("id")
|
|
72
73
|
.where("id", "in", (q) => q.selectFrom("tree").select("id"))
|
|
74
|
+
.where("org_id", "=", change.orgId)
|
|
73
75
|
.orderBy("id")
|
|
74
76
|
.forUpdate()
|
|
75
77
|
.execute();
|
|
@@ -111,6 +113,7 @@ let PermissionTransitions = class PermissionTransitions {
|
|
|
111
113
|
superseded_reason: change.reason,
|
|
112
114
|
})
|
|
113
115
|
.where("id", "=", card.id)
|
|
116
|
+
.where("org_id", "=", orgId)
|
|
114
117
|
.execute();
|
|
115
118
|
const cardEvents = await this.events.appendIn(card.conversation_id, [
|
|
116
119
|
{
|
|
@@ -321,7 +321,7 @@ let CommandReviewService = class CommandReviewService {
|
|
|
321
321
|
// the person's messages and the session grants live on the root, whatever conversation the
|
|
322
322
|
// caller named (a sub-agent's conversation carries agent-authored task text, never shown here)
|
|
323
323
|
let root;
|
|
324
|
-
const rootOf = async () => (root ??= await this.rootConversationOf(input.conversationId));
|
|
324
|
+
const rootOf = async () => (root ??= await this.rootConversationOf(input.orgId, input.conversationId));
|
|
325
325
|
const facts = {
|
|
326
326
|
workspace,
|
|
327
327
|
cwd: workspace,
|
|
@@ -335,7 +335,7 @@ let CommandReviewService = class CommandReviewService {
|
|
|
335
335
|
? reviewWrites(paths, facts)
|
|
336
336
|
: reviewRules(target, {
|
|
337
337
|
...facts,
|
|
338
|
-
written: await this.writtenInTree(await rootOf(), facts),
|
|
338
|
+
written: await this.writtenInTree(input.orgId, await rootOf(), facts),
|
|
339
339
|
});
|
|
340
340
|
let hit = decidingHit(result.hits, result.outcome);
|
|
341
341
|
if (result.outcome === "deny") {
|
|
@@ -449,7 +449,7 @@ let CommandReviewService = class CommandReviewService {
|
|
|
449
449
|
* that names a sub-agent's conversation still reviews against what the person asked for, never
|
|
450
450
|
* against agent-authored task text. The input is normally the root already (one query).
|
|
451
451
|
*/
|
|
452
|
-
async rootConversationOf(conversationId) {
|
|
452
|
+
async rootConversationOf(orgId, conversationId) {
|
|
453
453
|
let id = conversationId;
|
|
454
454
|
// a tree is shallow (`subagents.maxDepth`); the cap only guards a corrupted parent chain
|
|
455
455
|
for (let depth = 0; depth < 64; depth++) {
|
|
@@ -457,6 +457,7 @@ let CommandReviewService = class CommandReviewService {
|
|
|
457
457
|
.selectFrom("conversations")
|
|
458
458
|
.select(["kind", "parent_conversation_id"])
|
|
459
459
|
.where("id", "=", id)
|
|
460
|
+
.where("org_id", "=", orgId)
|
|
460
461
|
.executeTakeFirst();
|
|
461
462
|
// a missing conversation (or one deleted meanwhile) is left to the reads that follow
|
|
462
463
|
if (row === undefined || row.kind !== "subagent" || row.parent_conversation_id === null) {
|
|
@@ -489,16 +490,18 @@ let CommandReviewService = class CommandReviewService {
|
|
|
489
490
|
* All agents of a tree share the device, so a file one of them wrote is code the run produced,
|
|
490
491
|
* whoever runs it (hardening spec R1).
|
|
491
492
|
*/
|
|
492
|
-
async writtenInTree(rootConversationId, facts) {
|
|
493
|
+
async writtenInTree(orgId, rootConversationId, facts) {
|
|
493
494
|
const rows = await this.db
|
|
494
495
|
.withRecursive("tree(id)", (db) => db
|
|
495
496
|
.selectFrom("conversations")
|
|
496
497
|
.select("id")
|
|
497
498
|
.where("id", "=", rootConversationId)
|
|
499
|
+
.where("org_id", "=", orgId)
|
|
498
500
|
.unionAll((q) => q
|
|
499
501
|
.selectFrom("conversations as c")
|
|
500
502
|
.innerJoin("tree", "tree.id", "c.parent_conversation_id")
|
|
501
|
-
.select("c.id")
|
|
503
|
+
.select("c.id")
|
|
504
|
+
.where("c.org_id", "=", orgId)))
|
|
502
505
|
.selectFrom("conversation_events")
|
|
503
506
|
.select("payload")
|
|
504
507
|
.where("conversation_id", "in", (q) => q.selectFrom("tree").select("id"))
|
|
@@ -410,6 +410,10 @@ export declare class SandboxService {
|
|
|
410
410
|
* the exclusive lease once for a narrowing, so `applyLimits` records it as `unapplied` (the
|
|
411
411
|
* device is then unprobed until the reset, never silently supported); an added host there only
|
|
412
412
|
* waits for the reset (`pendingFilesReset`).
|
|
413
|
+
*
|
|
414
|
+
* A recorded `pending` (an `update` sent and never answered, device update fencing design §7.2)
|
|
415
|
+
* always applies again, even when `applied` already matches `want`: the instance may enforce
|
|
416
|
+
* the in-flight target, and only a newer call with this holder's higher token settles it.
|
|
413
417
|
*/
|
|
414
418
|
private mustApply;
|
|
415
419
|
/**
|
|
@@ -841,6 +845,16 @@ export declare class SandboxService {
|
|
|
841
845
|
* records it suspended (fenced: a lost lease leaves the record to the new holder).
|
|
842
846
|
*/
|
|
843
847
|
private quarantine;
|
|
848
|
+
/**
|
|
849
|
+
* A provider refused a lifecycle call with `StaleFenceError` (device update fencing design
|
|
850
|
+
* §7.1). Normally another holder took the device and applied a higher token, so this holder's
|
|
851
|
+
* lease is gone: a fenced no-op write fails and the lock-lost error its next write would raise
|
|
852
|
+
* is returned. Should the write succeed, the provider holds a token ahead of the device record
|
|
853
|
+
* (a restored database, a provider fault): the row's generation is raised past it (fenced), so
|
|
854
|
+
* the next holder's token wins and the device heals at its next use instead of refusing forever;
|
|
855
|
+
* this use still fails as lock-lost.
|
|
856
|
+
*/
|
|
857
|
+
private staleHolder;
|
|
844
858
|
/** Runs `call` with its own short signal; a failure is warned and returns false. */
|
|
845
859
|
private bestEffort;
|
|
846
860
|
/**
|