@capybara-hq/kernel 0.1.0-rc.53 → 0.1.0-rc.55
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/admin/admin.schemas.d.ts +11 -1
- package/dist/catalog/catalog.module.js +1 -1
- package/dist/catalog/marketplaces.service.d.ts +1 -1
- package/dist/catalog/requests.service.d.ts +5 -5
- package/dist/catalog/requests.service.js +9 -9
- package/dist/channels/cards.d.ts +4 -3
- package/dist/channels/cards.js +25 -16
- package/dist/channels/phrases.d.ts +15 -4
- package/dist/channels/phrases.js +15 -1
- package/dist/config/load.d.ts +26 -7
- package/dist/config/load.js +60 -9
- package/dist/config/permission-migration.d.ts +17 -9
- package/dist/config/permission-migration.js +60 -9
- package/dist/config/schema.d.ts +15 -1
- package/dist/config/schema.js +66 -11
- package/dist/conversations/events.d.ts +247 -5
- package/dist/conversations/events.js +127 -16
- package/dist/conversations/permission-profiles.controller.d.ts +12 -2
- package/dist/conversations/permission-profiles.service.d.ts +12 -2
- package/dist/conversations/permission-profiles.service.js +11 -4
- package/dist/db/kernel-schema.d.ts +18 -2
- package/dist/devices/device-projects.service.d.ts +1 -1
- package/dist/devices/device-projects.service.js +6 -6
- package/dist/devices/devices.controller.d.ts +10 -8
- package/dist/devices/devices.controller.js +14 -18
- package/dist/devices/devices.schemas.d.ts +5 -5
- package/dist/devices/devices.schemas.js +5 -5
- package/dist/devices/devices.service.d.ts +188 -175
- package/dist/devices/devices.service.js +284 -292
- package/dist/devices/dto.d.ts +43 -23
- package/dist/devices/dto.js +45 -49
- package/dist/devices/project-rules.d.ts +0 -10
- package/dist/devices/project-rules.js +0 -5
- package/dist/errors.d.ts +43 -19
- package/dist/errors.js +43 -19
- package/dist/evals/reconstruct.d.ts +12 -3
- package/dist/evals/reconstruct.js +10 -6
- package/dist/evals/recorded-permission-context.d.ts +6 -4
- package/dist/evals/recorded-permission-context.js +15 -9
- package/dist/evals/run-replay.d.ts +6 -1
- package/dist/evals/run-replay.js +7 -2
- package/dist/evals/worker.js +3 -1
- package/dist/http/api.module.js +8 -0
- package/dist/http/app.js +9 -0
- package/dist/http/meta.controller.d.ts +33 -0
- package/dist/http/meta.controller.js +72 -0
- package/dist/identity/app-auth.controller.d.ts +25 -0
- package/dist/identity/app-auth.controller.js +64 -0
- package/dist/identity/app-auth.d.ts +66 -0
- package/dist/identity/app-auth.js +203 -0
- package/dist/identity/app-auth.schemas.d.ts +47 -0
- package/dist/identity/app-auth.schemas.js +43 -0
- package/dist/identity/identity.module.d.ts +1 -1
- package/dist/identity/identity.module.js +4 -1
- package/dist/identity/settings.d.ts +45 -18
- package/dist/identity/settings.js +151 -51
- package/dist/infra/config/kernel-config.service.d.ts +1 -1
- package/dist/infra/config/kernel-config.service.js +19 -5
- package/dist/infra/outbox/registry.d.ts +14 -0
- package/dist/infra/outbox/registry.js +15 -0
- package/dist/infra/throttler/named-throttlers.d.ts +3 -2
- package/dist/infra/throttler/named-throttlers.js +14 -2
- package/dist/local-devices/device-auth.controller.d.ts +1 -1
- package/dist/local-devices/device-auth.controller.js +1 -1
- package/dist/local-devices/device-auth.d.ts +4 -4
- package/dist/local-devices/device-auth.js +1 -1
- package/dist/local-devices/device-policy.service.d.ts +18 -9
- package/dist/local-devices/device-policy.service.js +21 -61
- package/dist/local-devices/device-routes.d.ts +3 -1
- package/dist/local-devices/device-routes.js +15 -4
- package/dist/local-devices/instance-bindings.js +5 -2
- package/dist/local-devices/local-device-gateway.d.ts +2 -2
- package/dist/local-devices/local-device-gateway.js +3 -3
- package/dist/local-devices/local-device-provider.d.ts +4 -4
- package/dist/local-devices/local-device-provider.js +23 -9
- package/dist/local-devices/local-devices.module.d.ts +1 -1
- package/dist/local-devices/local-devices.module.js +1 -1
- package/dist/local-devices/machines.d.ts +40 -16
- package/dist/local-devices/machines.js +89 -61
- package/dist/local-devices/owner-report.d.ts +16 -14
- package/dist/local-devices/owner-report.js +24 -30
- package/dist/local-devices/owner-reports.js +26 -8
- package/dist/local-devices/policy-summary.d.ts +25 -44
- package/dist/local-devices/policy-summary.js +26 -71
- package/dist/local-devices/relay.d.ts +6 -6
- package/dist/local-devices/relay.js +10 -8
- package/dist/net/public-address.d.ts +1 -1
- package/dist/net/public-address.js +5 -2
- package/dist/orgs/device-network-setting.d.ts +82 -0
- package/dist/orgs/device-network-setting.js +142 -0
- package/dist/orgs/settings.service.d.ts +103 -66
- package/dist/orgs/settings.service.js +201 -137
- package/dist/overrides.d.ts +5 -1
- package/dist/overrides.js +2 -0
- package/dist/platform/exclusions.js +24 -1
- package/dist/platform/operation.js +2 -2
- package/dist/platform/ops/admin.ops.js +20 -11
- package/dist/platform/ops/devices.ops.js +70 -5
- package/dist/platform/ops/org-settings.ops.js +10 -6
- package/dist/platform/ops/orgs.ops.js +2 -1
- package/dist/platform/ops/platform-icons.ops.d.ts +14 -0
- package/dist/platform/ops/platform-icons.ops.js +117 -0
- package/dist/platform/platform-ops.module.d.ts +2 -1
- package/dist/platform/platform-ops.module.js +3 -0
- package/dist/platform/route-schemas.js +3 -0
- package/dist/runtime/context/permission-profile.d.ts +17 -8
- package/dist/runtime/context/permission-profile.js +126 -45
- package/dist/runtime/maintenance.d.ts +5 -2
- package/dist/runtime/maintenance.js +15 -4
- package/dist/runtime/permission-context.service.d.ts +1 -1
- package/dist/runtime/permission-context.service.js +5 -3
- package/dist/runtime/project/knowledge.d.ts +5 -4
- package/dist/runtime/project/knowledge.js +2 -1
- package/dist/runtime/project/knowledge.service.js +16 -13
- package/dist/sandbox/cloud-permission-snapshot.js +22 -3
- package/dist/sandbox/device-sandbox-settings.d.ts +230 -0
- package/dist/sandbox/device-sandbox-settings.js +470 -0
- package/dist/sandbox/device-sandbox.d.ts +187 -0
- package/dist/sandbox/device-sandbox.js +236 -0
- package/dist/sandbox/held-operations.js +15 -7
- package/dist/sandbox/modes.d.ts +49 -24
- package/dist/sandbox/modes.js +27 -19
- package/dist/sandbox/operation-authority-types.d.ts +6 -5
- package/dist/sandbox/operation-authority-types.js +7 -8
- package/dist/sandbox/operation-authority.d.ts +23 -9
- package/dist/sandbox/operation-authority.js +179 -97
- package/dist/sandbox/permission-auto-grants.d.ts +42 -0
- package/dist/sandbox/permission-auto-grants.js +145 -0
- package/dist/sandbox/permission-call-grants.d.ts +12 -4
- package/dist/sandbox/permission-call-grants.js +84 -35
- package/dist/sandbox/permission-call-grants.module.js +10 -3
- package/dist/sandbox/permission-call-types.d.ts +39 -5
- package/dist/sandbox/permission-ceiling-writes.d.ts +29 -3
- package/dist/sandbox/permission-ceiling-writes.js +38 -4
- package/dist/sandbox/permission-config-publication.d.ts +44 -2
- package/dist/sandbox/permission-config-publication.js +230 -59
- package/dist/sandbox/permission-context-types.d.ts +2 -2
- package/dist/sandbox/permission-facts.d.ts +144 -15
- package/dist/sandbox/permission-facts.js +258 -70
- package/dist/sandbox/permission-runtime-reports.d.ts +5 -4
- package/dist/sandbox/permission-runtime-reports.js +19 -29
- package/dist/sandbox/review/classifier.d.ts +8 -0
- package/dist/sandbox/review/classifier.js +10 -0
- package/dist/sandbox/review/permission-candidate.d.ts +69 -5
- package/dist/sandbox/review/permission-candidate.js +153 -30
- package/dist/sandbox/review/review.service.d.ts +19 -3
- package/dist/sandbox/review/review.service.js +59 -11
- package/dist/sandbox/review/rules.js +23 -3
- package/dist/sandbox/sandbox.service.d.ts +29 -11
- package/dist/sandbox/sandbox.service.js +51 -26
- package/dist/skills/invoke.js +3 -2
- package/dist/themes/platform-icon-objects.d.ts +51 -0
- package/dist/themes/platform-icon-objects.js +113 -0
- package/dist/themes/platform-icon-public.controller.d.ts +17 -0
- package/dist/themes/platform-icon-public.controller.js +58 -0
- package/dist/themes/platform-icon.controller.d.ts +22 -0
- package/dist/themes/platform-icon.controller.js +65 -0
- package/dist/themes/platform-icon.schemas.d.ts +48 -0
- package/dist/themes/platform-icon.schemas.js +53 -0
- package/dist/themes/platform-icon.service.d.ts +83 -0
- package/dist/themes/platform-icon.service.js +301 -0
- package/dist/themes/themes.module.d.ts +4 -1
- package/dist/themes/themes.module.js +9 -4
- package/dist/tools/approvals.service.d.ts +26 -116
- package/dist/tools/approvals.service.js +42 -346
- package/dist/tools/builtins/sandbox/bash.d.ts +16 -3
- package/dist/tools/builtins/sandbox/bash.js +80 -28
- package/dist/tools/builtins/sandbox/common.d.ts +39 -14
- package/dist/tools/builtins/sandbox/common.js +47 -24
- package/dist/tools/builtins/sandbox/deliver.js +7 -4
- package/dist/tools/builtins/skill-load.d.ts +2 -2
- package/dist/tools/builtins/skill-load.js +4 -3
- package/dist/tools/device-op-resolver.d.ts +4 -10
- package/dist/tools/device-op-resolver.js +8 -19
- package/dist/tools/network-asks.d.ts +52 -15
- package/dist/tools/network-asks.js +55 -25
- package/dist/tools/pipeline.d.ts +26 -14
- package/dist/tools/pipeline.js +144 -61
- package/dist/tools/registry.d.ts +6 -0
- package/dist/tools/tools.module.js +1 -1
- package/package.json +4 -4
- package/src/migrations/0164_platform_icons.sql +10 -0
- package/src/migrations/0165_device_network_columns.sql +50 -0
- package/src/migrations/0166_permission_grant_full_access.sql +17 -0
- package/src/migrations/0167_device_network_backfill.sql +32 -0
- package/src/migrations/0168_binding_installed_connection.sql +6 -0
- package/dist/orgs/cloud-network-setting.d.ts +0 -33
- package/dist/orgs/cloud-network-setting.js +0 -47
- package/dist/sandbox/platform-full-access.d.ts +0 -110
- package/dist/sandbox/platform-full-access.js +0 -198
|
@@ -6,7 +6,6 @@ import { KernelDb } from "../infra/database/kernel-db.js";
|
|
|
6
6
|
import { TransactionHost } from "../infra/database/transaction-host.js";
|
|
7
7
|
import { KernelEvents } from "../infra/events/kernel-events.js";
|
|
8
8
|
import { LockService } from "../infra/lock/lock.service.js";
|
|
9
|
-
import { DevicePolicyService, type PolicyOpResult } from "../local-devices/device-policy.service.js";
|
|
10
9
|
import { type OrgRole } from "../orgs/roles.js";
|
|
11
10
|
import { RunResume } from "../runtime/run-jobs.js";
|
|
12
11
|
import { PermissionAuthorityLock } from "../sandbox/permission-authority-lock.js";
|
|
@@ -66,30 +65,8 @@ export interface NetworkAskDetail {
|
|
|
66
65
|
result: KeptToolResult;
|
|
67
66
|
/** The hosts the decision allowed (every approved decision writes them; none: nothing). */
|
|
68
67
|
grantedHosts?: string[];
|
|
69
|
-
/**
|
|
70
|
-
|
|
71
|
-
* the device could not be reached or lacks the feature (`once_fallback`), or nothing because the
|
|
72
|
-
* device refused the change (`refused`: its owner takes no remote grants; no run grant either).
|
|
73
|
-
*/
|
|
74
|
-
outcome?: "once" | "always" | "once_fallback" | "refused";
|
|
75
|
-
/** Why 「一直允许」 did not reach the device's policy. */
|
|
76
|
-
fallback?: "offline" | "refused" | "unsupported";
|
|
77
|
-
/**
|
|
78
|
-
* Set while the ask is still pending: the last 「一直允许」 whose device change was recorded only
|
|
79
|
-
* after a crash (transactional outbox spec §7.4) and did not take effect: `failed` (the device
|
|
80
|
-
* refused it, never received it or stopped while applying it) or `unknown` (the device did not
|
|
81
|
-
* answer; its next connection tells), with the reason. The owner may decide again.
|
|
82
|
-
*/
|
|
83
|
-
attempt?: NetworkAskAttempt;
|
|
84
|
-
}
|
|
85
|
-
/** Why a pending network ask's last 「一直允许」 did not decide it ({@link NetworkAskDetail.attempt}). */
|
|
86
|
-
export interface NetworkAskAttempt {
|
|
87
|
-
/**
|
|
88
|
-
* `applied_undecided`: the device applied the change, but the account that chose it can no
|
|
89
|
-
* longer decide this ask (someone else must).
|
|
90
|
-
*/
|
|
91
|
-
outcome: "failed" | "unknown" | "applied_undecided";
|
|
92
|
-
message: string;
|
|
68
|
+
/** What took effect: a run grant (`once`, the only decision under device protocol 4). */
|
|
69
|
+
outcome?: "once";
|
|
93
70
|
}
|
|
94
71
|
/** A network ask's detail as the API shows it: without the kept command result. */
|
|
95
72
|
export type NetworkAskView = Omit<NetworkAskDetail, "result">;
|
|
@@ -130,11 +107,14 @@ export interface CommandAskDetail {
|
|
|
130
107
|
deviceId: string;
|
|
131
108
|
deviceName: string;
|
|
132
109
|
mode: "auto" | "sandbox";
|
|
133
|
-
/**
|
|
134
|
-
|
|
135
|
-
|
|
110
|
+
/**
|
|
111
|
+
* A shell command (`Bash`), a file write outside the scope (`Write` / `Edit`) or a file read
|
|
112
|
+
* outside it (`Read`).
|
|
113
|
+
*/
|
|
114
|
+
kind: "command" | "write" | "read";
|
|
115
|
+
/** The command text (clipped), or the tool key of the write or read. */
|
|
136
116
|
command: string;
|
|
137
|
-
/** A write's target path. */
|
|
117
|
+
/** A write's or read's target path. */
|
|
138
118
|
path?: string;
|
|
139
119
|
/**
|
|
140
120
|
* The working root the call was reviewed against (project root spec §4.3), always recorded (the
|
|
@@ -304,18 +284,26 @@ export interface NetworkAskInput {
|
|
|
304
284
|
callId: string;
|
|
305
285
|
/** The device owner: the only person who may decide. */
|
|
306
286
|
requestedFor: string;
|
|
307
|
-
detail: Omit<NetworkAskDetail, "grantedHosts" | "outcome"
|
|
308
|
-
/**
|
|
309
|
-
|
|
287
|
+
detail: Omit<NetworkAskDetail, "grantedHosts" | "outcome">;
|
|
288
|
+
/**
|
|
289
|
+
* Always `["once"]`: a run grant (approval-only profiles design). The deployment never adds a
|
|
290
|
+
* host to a local device's own allowlist (device protocol 4), so "always" is never offered.
|
|
291
|
+
*/
|
|
292
|
+
scopes: "once"[];
|
|
310
293
|
}
|
|
311
294
|
/** The tool key a network ask is recorded under (the command ran in `Bash`). */
|
|
312
295
|
export declare const NETWORK_ASK_TOOL_KEY = "Bash";
|
|
313
296
|
/** The tool key a git ask is recorded under (the push ran in a `Bash` command). */
|
|
314
297
|
export declare const GIT_ASK_TOOL_KEY = "Bash";
|
|
315
|
-
/**
|
|
298
|
+
/**
|
|
299
|
+
* The tool key a command ask is recorded under (a command runs in `Bash`; a write under `Write`, a
|
|
300
|
+
* read under `Read`).
|
|
301
|
+
*/
|
|
316
302
|
export declare const COMMAND_ASK_TOOL_KEY = "Bash";
|
|
317
303
|
/** The tool key a file-write ask is recorded under. */
|
|
318
304
|
export declare const COMMAND_WRITE_TOOL_KEY = "Write";
|
|
305
|
+
/** The tool key a file-read ask is recorded under. */
|
|
306
|
+
export declare const COMMAND_READ_TOOL_KEY = "Read";
|
|
319
307
|
/** A new git push ask (sandbox git credentials spec §7), made by the tool pipeline. */
|
|
320
308
|
export interface GitAskInput {
|
|
321
309
|
orgId: string;
|
|
@@ -358,12 +346,7 @@ export declare class ApprovalsService {
|
|
|
358
346
|
private readonly schedules;
|
|
359
347
|
/** A trial approval is kept only for a tool the task may hold as a grant (its agent's tools). */
|
|
360
348
|
private readonly registry;
|
|
361
|
-
/**
|
|
362
|
-
* 「这台设备一直允许」 records the device change's intent, sends the `policy` op, then records
|
|
363
|
-
* its outcome with the decision.
|
|
364
|
-
*/
|
|
365
|
-
private readonly policies;
|
|
366
|
-
/** One decision of a network ask at a time, across replicas (the op is sent before the transaction). */
|
|
349
|
+
/** One decision of a network ask at a time, across replicas. */
|
|
367
350
|
readonly lockService: LockService;
|
|
368
351
|
/** A trial run's 「这次允许」 becomes a task grant only within the org's egress. */
|
|
369
352
|
private readonly sandbox;
|
|
@@ -374,12 +357,7 @@ export declare class ApprovalsService {
|
|
|
374
357
|
constructor(db: KernelDb, config: Pick<KernelConfigService, "get">, eventLog: Pick<EventLog, "appendIn" | "notify">, events: Pick<KernelEvents, "emit">, txHost: TransactionHost, schedules: Pick<ScheduledTaskStore, "addGrant">,
|
|
375
358
|
/** A trial approval is kept only for a tool the task may hold as a grant (its agent's tools). */
|
|
376
359
|
registry: Pick<ToolRegistry, "forAgent">,
|
|
377
|
-
/**
|
|
378
|
-
* 「这台设备一直允许」 records the device change's intent, sends the `policy` op, then records
|
|
379
|
-
* its outcome with the decision.
|
|
380
|
-
*/
|
|
381
|
-
policies: Pick<DevicePolicyService, "begin" | "send" | "settleIn" | "summary" | "lockMachineDevice">,
|
|
382
|
-
/** One decision of a network ask at a time, across replicas (the op is sent before the transaction). */
|
|
360
|
+
/** One decision of a network ask at a time, across replicas. */
|
|
383
361
|
lockService: LockService,
|
|
384
362
|
/** A trial run's 「这次允许」 becomes a task grant only within the org's egress. */
|
|
385
363
|
sandbox: Pick<SandboxService, "ceilingLimits">,
|
|
@@ -434,13 +412,9 @@ export declare class ApprovalsService {
|
|
|
434
412
|
* A network ask's decision (network ask-to-allow spec §5.2), one at a time per ask across
|
|
435
413
|
* replicas: only the device owner (`requested_for`) decides, in a signed-in session (a personal
|
|
436
414
|
* access token is refused; the route already refuses service and embed tokens); the allowed
|
|
437
|
-
* hosts are a subset of those asked.
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
* remote grants) as `always` with outcome `refused` and nothing granted; the decision and the
|
|
441
|
-
* op's outcome are one transaction. Every decision resumes the run in its transaction and is
|
|
442
|
-
* announced after the commit; a change the device applied after the ask closed is audited
|
|
443
|
-
* (`late`) and answered with a 409 that says so.
|
|
415
|
+
* hosts are a subset of those asked. The decision is a run grant only (`once`): under device
|
|
416
|
+
* protocol 4 the deployment never adds a host to a local device, so `always` is refused. Every
|
|
417
|
+
* decision resumes the run in its transaction and is announced after the commit.
|
|
444
418
|
*/
|
|
445
419
|
private decideNetwork;
|
|
446
420
|
/**
|
|
@@ -461,70 +435,6 @@ export declare class ApprovalsService {
|
|
|
461
435
|
*/
|
|
462
436
|
private decideCommand;
|
|
463
437
|
private commandSubject;
|
|
464
|
-
/**
|
|
465
|
-
* 「这台设备一直允许」 (transactional outbox spec §7): the intent of the device change (naming the
|
|
466
|
-
* ask) is recorded, the `policy` op sent (no transaction open), then {@link settleNetworkOp}
|
|
467
|
-
* decides the ask and records the op's outcome in one transaction. When nothing could be sent
|
|
468
|
-
* (the device is offline, deleted, or its program lacks the feature) the decision is a run
|
|
469
|
-
* grant with the reason. The device's answer decides: applied → `always`; refused → `always`
|
|
470
|
-
* with outcome `refused`, nothing granted; no answer → a run grant (`once_fallback`, `offline`)
|
|
471
|
-
* while the op stays `unknown` for the machine's next hello or the resolver. A device that
|
|
472
|
-
* reconnects during the call and reports the op applied lets the resolver approve the ask as
|
|
473
|
-
* this owner first: that decision is returned (`toSeq` null: already announced), never a 409;
|
|
474
|
-
* when it granted other hosts than this call's (another of the owner's changes) and this call's
|
|
475
|
-
* change was not confirmed, `approval.already_decided` says so. A device deleted during the
|
|
476
|
-
* call is `device.not_found` (the op recorded unknown).
|
|
477
|
-
*/
|
|
478
|
-
private decideAlways;
|
|
479
|
-
/** Records only the op's outcome, in its own transaction (the ask is left as it is). */
|
|
480
|
-
private settleOpOnly;
|
|
481
|
-
/**
|
|
482
|
-
* {@link settleNetworkOp} with the device's permission authority lock as its ordered prelude
|
|
483
|
-
* (`DevicePolicyService.lockMachineDevice`): the global order puts it before the ask's
|
|
484
|
-
* conversation row, as a fenced device writer of the same tree takes it (device project writes).
|
|
485
|
-
*/
|
|
486
|
-
private settleNetworkOpOrdered;
|
|
487
|
-
/**
|
|
488
|
-
* The resolve transaction of a network ask's device change: the ask decided as `network` says
|
|
489
|
-
* ({@link decideTx}: lock order conversation → approval → run), then the op's outcome recorded
|
|
490
|
-
* (`DevicePolicyService.settleIn`: the machine's row). When the ask closed meanwhile (a reply,
|
|
491
|
-
* the expiry, a stop) only the op's outcome is recorded, and a change the device applied is
|
|
492
|
-
* audited `device.network_allowed` with `late: true` in the same transaction.
|
|
493
|
-
*/
|
|
494
|
-
private settleNetworkOp;
|
|
495
|
-
/**
|
|
496
|
-
* The op's outcome for an ask that is no longer pending (in the caller's transaction): recorded,
|
|
497
|
-
* and a change the device applied audited `device.network_allowed` `late` (the change stands:
|
|
498
|
-
* the owner chose it; no inverse change is sent). True when it was audited late. `undecided`:
|
|
499
|
-
* the ask is still pending but the op's account can no longer decide it; the allow is audited
|
|
500
|
-
* without `late` (it is not after the ask) and the caller gives the ask the reason.
|
|
501
|
-
*/
|
|
502
|
-
private settleClosedIn;
|
|
503
|
-
/** The live intent `opId` on machine `machineId` (null: settled already, or expired). */
|
|
504
|
-
private pendingOpOf;
|
|
505
|
-
/**
|
|
506
|
-
* The `device-op-resolve` job's outcome of an op that answers network ask `op.source.approvalId`
|
|
507
|
-
* (transactional outbox spec §7.4), in the resolver's transaction: under the ask's locks
|
|
508
|
-
* (conversation, then the approval) the op is read again (settled meanwhile: nothing to do).
|
|
509
|
-
* Applied, and the ask still pending → approved `always` by the op's account (`via` as it
|
|
510
|
-
* asked), the run resumed in this transaction as every decision does; the ask closed → audited
|
|
511
|
-
* `late`; still pending but the op's account can no longer decide it → the allow audited (not
|
|
512
|
-
* late) and the ask left pending with `applied_undecided`. Not applied (refused, never received,
|
|
513
|
-
* interrupted) or still unknown → the op's outcome recorded and the ask left pending with the
|
|
514
|
-
* reason (`detail.attempt`) and an `approval_updated` event so the card shows it: no person is
|
|
515
|
-
* there to fall back to a run grant (D2). The caller locked the machine's device first
|
|
516
|
-
* (`DevicePolicyService.lockMachineDevice`, before the ask's conversation row).
|
|
517
|
-
*/
|
|
518
|
-
settleFromResolver(ref: {
|
|
519
|
-
machineId: string;
|
|
520
|
-
opId: string;
|
|
521
|
-
approvalId: string;
|
|
522
|
-
}, result: PolicyOpResult): Promise<void>;
|
|
523
|
-
/**
|
|
524
|
-
* A pending network ask's reason (`detail.attempt`) and its `approval_updated` event (one per
|
|
525
|
-
* op and outcome), in the caller's transaction with the ask locked; notified after the commit.
|
|
526
|
-
*/
|
|
527
|
-
private attemptIn;
|
|
528
438
|
/** The owner of a live device of the org (null: none, deleted, or of another org). */
|
|
529
439
|
private deviceOwnerOf;
|
|
530
440
|
/** After the commit: the decision's events reach the page, the run's waits and IM delivery. */
|