@capybara-hq/kernel 0.1.0-rc.68 → 0.1.0-rc.69
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.module.js +2 -0
- package/dist/admin/health.service.d.ts +11 -4
- package/dist/admin/health.service.js +33 -17
- package/dist/background/poll.job.js +2 -2
- package/dist/background/tasks.service.d.ts +5 -5
- package/dist/background/tasks.service.js +9 -8
- package/dist/catalog/marketplaces.service.d.ts +1 -1
- package/dist/catalog/requests.service.js +1 -1
- package/dist/config/schema.d.ts +1 -1
- package/dist/config/schema.js +9 -9
- package/dist/conversations/conversations.controller.d.ts +8 -3
- package/dist/conversations/conversations.controller.js +8 -3
- package/dist/conversations/conversations.service.d.ts +33 -15
- package/dist/conversations/conversations.service.js +60 -10
- package/dist/conversations/events.d.ts +21 -41
- package/dist/conversations/events.js +57 -31
- package/dist/conversations/permission-profiles.controller.d.ts +6 -4
- package/dist/conversations/permission-profiles.service.d.ts +6 -4
- package/dist/ctx/create-ctx.d.ts +20 -1
- package/dist/ctx/create-ctx.js +77 -6
- package/dist/ctx/device-provider-check.d.ts +6 -2
- package/dist/ctx/device-provider-check.js +17 -2
- package/dist/db/kernel-schema.d.ts +10 -48
- package/dist/devices/access.d.ts +3 -4
- package/dist/devices/access.js +3 -4
- package/dist/devices/conversation-devices.d.ts +1 -3
- package/dist/devices/conversation-devices.js +2 -7
- package/dist/devices/device-projects.service.js +24 -29
- package/dist/devices/device-provider-selection.d.ts +5 -6
- package/dist/devices/device-provider-selection.js +8 -9
- package/dist/devices/devices.controller.d.ts +8 -21
- package/dist/devices/devices.controller.js +9 -34
- package/dist/devices/devices.module.js +6 -4
- package/dist/devices/devices.schemas.d.ts +1 -5
- package/dist/devices/devices.schemas.js +1 -5
- package/dist/devices/devices.service.d.ts +84 -147
- package/dist/devices/devices.service.js +134 -229
- package/dist/devices/dto.d.ts +5 -32
- package/dist/devices/dto.js +5 -37
- package/dist/devices/errors.d.ts +6 -5
- package/dist/devices/errors.js +7 -8
- package/dist/devices/project-rules.d.ts +9 -11
- package/dist/devices/project-rules.js +7 -7
- package/dist/devices/working-root.d.ts +3 -6
- package/dist/devices/working-root.js +3 -8
- package/dist/dial-in/access.d.ts +23 -0
- package/dist/dial-in/access.js +64 -0
- package/dist/{local-devices/device-auth.controller.d.ts → dial-in/auth.controller.d.ts} +12 -6
- package/dist/{local-devices/device-auth.controller.js → dial-in/auth.controller.js} +30 -15
- package/dist/dial-in/auth.module.d.ts +7 -0
- package/dist/dial-in/auth.module.js +27 -0
- package/dist/{local-devices/device-auth.d.ts → dial-in/auth.service.d.ts} +42 -13
- package/dist/{local-devices/device-auth.js → dial-in/auth.service.js} +83 -32
- package/dist/dial-in/dial-in.module.d.ts +9 -0
- package/dist/dial-in/dial-in.module.js +37 -0
- package/dist/{local-devices → dial-in}/dto.d.ts +17 -2
- package/dist/{local-devices → dial-in}/dto.js +14 -2
- package/dist/dial-in/envelope.d.ts +95 -0
- package/dist/dial-in/envelope.js +89 -0
- package/dist/dial-in/gateway.d.ts +214 -0
- package/dist/{local-devices/local-device-gateway.js → dial-in/gateway.js} +337 -181
- package/dist/dial-in/handlers.d.ts +47 -0
- package/dist/dial-in/handlers.js +84 -0
- package/dist/dial-in/machines.d.ts +155 -0
- package/dist/dial-in/machines.js +383 -0
- package/dist/dial-in/relay.d.ts +135 -0
- package/dist/dial-in/relay.js +444 -0
- package/dist/dial-in/relay.module.d.ts +7 -0
- package/dist/dial-in/relay.module.js +24 -0
- package/dist/{local-devices/device-routes.d.ts → dial-in/routes.d.ts} +19 -11
- package/dist/{local-devices/device-routes.js → dial-in/routes.js} +45 -25
- package/dist/{local-devices → dial-in}/targets.d.ts +3 -18
- package/dist/{local-devices → dial-in}/targets.js +3 -48
- package/dist/errors.d.ts +8 -27
- package/dist/errors.js +8 -27
- package/dist/extensions/bootstrap.d.ts +5 -0
- package/dist/extensions/bootstrap.js +10 -1
- package/dist/extensions/extensions.module.js +6 -0
- package/dist/extensions/host.d.ts +6 -0
- package/dist/extensions/host.js +12 -2
- package/dist/extensions/permission-set.d.ts +15 -1
- package/dist/extensions/permission-set.js +11 -1
- package/dist/extensions/permission-view.d.ts +1 -1
- package/dist/extensions/permission-view.js +4 -1
- package/dist/http/api.module.js +4 -4
- package/dist/http/gateway-routes.d.ts +1 -1
- package/dist/http/gateway-routes.js +1 -1
- package/dist/http/meta.controller.js +1 -1
- package/dist/identity/settings.d.ts +1 -1
- package/dist/identity/settings.js +6 -8
- package/dist/infra/config/kernel-config.service.js +2 -2
- package/dist/infra/outbox/registry.d.ts +0 -14
- package/dist/infra/outbox/registry.js +0 -15
- package/dist/infra/throttler/named-throttlers.d.ts +1 -1
- package/dist/infra/throttler/named-throttlers.js +1 -1
- package/dist/kernel.module.js +0 -3
- package/dist/orgs/settings.service.js +5 -10
- package/dist/overrides.d.ts +0 -4
- package/dist/overrides.js +0 -2
- package/dist/platform/exclusions.js +5 -5
- package/dist/platform/ops/admin.ops.js +1 -1
- package/dist/platform/ops/conversations.ops.js +5 -2
- package/dist/platform/ops/devices.ops.js +11 -24
- package/dist/platform/ops/inbox.ops.js +1 -1
- package/dist/roles/gateway-role.d.ts +3 -3
- package/dist/roles/gateway-role.js +4 -4
- package/dist/roles/gateway.module.d.ts +1 -1
- package/dist/roles/gateway.module.js +5 -5
- package/dist/runtime/context/device-paths.d.ts +4 -1
- package/dist/runtime/context/permission-profile.js +5 -5
- package/dist/runtime/maintenance.d.ts +2 -5
- package/dist/runtime/maintenance.js +9 -19
- package/dist/runtime/project/knowledge.js +4 -5
- package/dist/runtime/project/knowledge.service.js +2 -1
- package/dist/sandbox/cloud-permission-snapshot.d.ts +1 -1
- package/dist/sandbox/cloud-permission-snapshot.js +1 -3
- package/dist/sandbox/device-reports.d.ts +74 -14
- package/dist/sandbox/device-reports.js +190 -33
- package/dist/sandbox/device-reports.module.d.ts +7 -0
- package/dist/sandbox/device-reports.module.js +25 -0
- package/dist/sandbox/device-sandbox.d.ts +39 -41
- package/dist/sandbox/device-sandbox.js +44 -83
- package/dist/sandbox/kernel-read.d.ts +2 -2
- package/dist/sandbox/legacy-retirement.d.ts +11 -59
- package/dist/sandbox/legacy-retirement.js +34 -186
- package/dist/sandbox/legacy-retirement.module.d.ts +2 -2
- package/dist/sandbox/legacy-retirement.module.js +2 -2
- package/dist/sandbox/managed-device-context.d.ts +16 -4
- package/dist/sandbox/managed-device-context.js +25 -8
- package/dist/sandbox/managed-device-context.module.js +4 -0
- package/dist/sandbox/modes.d.ts +3 -12
- package/dist/sandbox/modes.js +2 -14
- package/dist/{local-devices → sandbox}/network-grants.d.ts +2 -21
- package/dist/{local-devices → sandbox}/network-grants.js +4 -49
- package/dist/sandbox/operation-authority-types.d.ts +2 -1
- package/dist/sandbox/operation-authority.d.ts +6 -20
- package/dist/sandbox/operation-authority.js +43 -104
- package/dist/sandbox/operation-authority.module.js +1 -1
- package/dist/sandbox/operation-intents.d.ts +4 -1
- package/dist/sandbox/operation-intents.js +11 -2
- package/dist/sandbox/operation-reconcile.job.js +2 -4
- package/dist/sandbox/permission-availability.d.ts +6 -7
- package/dist/sandbox/permission-availability.js +7 -10
- package/dist/sandbox/permission-call-grants.d.ts +2 -1
- package/dist/sandbox/permission-call-grants.js +1 -7
- package/dist/sandbox/permission-call-types.d.ts +4 -4
- package/dist/sandbox/permission-ceiling-writes.d.ts +7 -23
- package/dist/sandbox/permission-ceiling-writes.js +8 -35
- package/dist/sandbox/permission-config-publication.d.ts +9 -1
- package/dist/sandbox/permission-config-publication.js +29 -21
- package/dist/sandbox/permission-context-types.d.ts +17 -10
- package/dist/sandbox/permission-facts.d.ts +98 -95
- package/dist/sandbox/permission-facts.js +160 -314
- package/dist/sandbox/permission-instance-writes.d.ts +23 -37
- package/dist/sandbox/permission-instance-writes.js +44 -121
- package/dist/sandbox/permission-runtime-reports.d.ts +38 -30
- package/dist/sandbox/permission-runtime-reports.js +105 -122
- package/dist/sandbox/providers.d.ts +26 -38
- package/dist/sandbox/providers.js +36 -18
- package/dist/sandbox/request-not-sent.d.ts +2 -13
- package/dist/sandbox/request-not-sent.js +2 -13
- package/dist/sandbox/review/permission-candidate.d.ts +13 -8
- package/dist/sandbox/review/permission-candidate.js +38 -48
- package/dist/sandbox/sandbox.module.js +7 -3
- package/dist/sandbox/sandbox.service.d.ts +49 -59
- package/dist/sandbox/sandbox.service.js +139 -259
- package/dist/schedules/fire.d.ts +15 -6
- package/dist/schedules/fire.js +27 -13
- package/dist/schedules/grant-rules.js +1 -1
- package/dist/schedules/scheduled-tasks.service.d.ts +0 -7
- package/dist/schedules/scheduled-tasks.service.js +1 -4
- package/dist/schedules/schedules.module.js +5 -3
- package/dist/skills/invoke.d.ts +1 -1
- package/dist/skills/invoke.js +2 -3
- package/dist/tools/approvals.service.d.ts +8 -5
- package/dist/tools/approvals.service.js +5 -5
- package/dist/tools/builtins/sandbox/bash.js +1 -2
- package/dist/tools/builtins/sandbox/common.d.ts +15 -9
- package/dist/tools/builtins/sandbox/common.js +37 -38
- package/dist/tools/network-asks.d.ts +19 -22
- package/dist/tools/network-asks.js +15 -21
- package/dist/tools/pipeline.d.ts +6 -7
- package/dist/tools/pipeline.js +17 -21
- package/dist/tools/tools.module.js +3 -7
- package/package.json +3 -4
- package/src/migrations/0177_dial_in_contract.sql +32 -0
- package/dist/local-devices/device-auth.module.d.ts +0 -7
- package/dist/local-devices/device-auth.module.js +0 -25
- package/dist/local-devices/device-policy.service.d.ts +0 -213
- package/dist/local-devices/device-policy.service.js +0 -605
- package/dist/local-devices/instance-bindings.d.ts +0 -82
- package/dist/local-devices/instance-bindings.js +0 -307
- package/dist/local-devices/local-device-gateway.d.ts +0 -153
- package/dist/local-devices/local-device-provider.d.ts +0 -122
- package/dist/local-devices/local-device-provider.js +0 -326
- package/dist/local-devices/local-devices.module.d.ts +0 -31
- package/dist/local-devices/local-devices.module.js +0 -100
- package/dist/local-devices/machines.d.ts +0 -211
- package/dist/local-devices/machines.js +0 -766
- package/dist/local-devices/owner-report.d.ts +0 -81
- package/dist/local-devices/owner-report.js +0 -150
- package/dist/local-devices/owner-reports.d.ts +0 -48
- package/dist/local-devices/owner-reports.js +0 -208
- package/dist/local-devices/policy-op-jobs.d.ts +0 -15
- package/dist/local-devices/policy-op-jobs.js +0 -12
- package/dist/local-devices/policy-summary.d.ts +0 -102
- package/dist/local-devices/policy-summary.js +0 -155
- package/dist/local-devices/relay.d.ts +0 -166
- package/dist/local-devices/relay.js +0 -559
- package/dist/tools/device-op-resolver.d.ts +0 -34
- package/dist/tools/device-op-resolver.js +0 -120
- /package/dist/{local-devices → dial-in}/keys.d.ts +0 -0
- /package/dist/{local-devices → dial-in}/keys.js +0 -0
- /package/dist/{local-devices → sandbox}/network-grants.module.d.ts +0 -0
- /package/dist/{local-devices → sandbox}/network-grants.module.js +0 -0
|
@@ -17,11 +17,11 @@ type Scope = DeviceProjectScope;
|
|
|
17
17
|
*/
|
|
18
18
|
export interface WorkingFacts {
|
|
19
19
|
/**
|
|
20
|
-
* The device's workspace: the
|
|
21
|
-
*
|
|
20
|
+
* The device's workspace: the held instance's committed roots, else the latest `device_paths`
|
|
21
|
+
* roots recorded in the calling conversation, else the root's, else the default.
|
|
22
22
|
*/
|
|
23
23
|
workspace: string;
|
|
24
|
-
/** The owner's home: the
|
|
24
|
+
/** The owner's home: the provider's reported home, else the workspace's home prefix; null: unknown. */
|
|
25
25
|
home: string | null;
|
|
26
26
|
/** The root conversation's latest project snapshot; null: free, or none recorded yet. */
|
|
27
27
|
project: WorkingProject | null;
|
|
@@ -35,37 +35,25 @@ export declare class PermissionFacts {
|
|
|
35
35
|
private readonly devices;
|
|
36
36
|
constructor(db: KernelDb, config: Pick<KernelConfigService, "get" | "fieldSource">, providers: Pick<DeviceProviders, "forDevice">, devices: Pick<DeviceAccess, "usable">);
|
|
37
37
|
/**
|
|
38
|
-
* Current policy
|
|
39
|
-
*
|
|
40
|
-
* assumed before one is recorded), the same under every permission
|
|
38
|
+
* Current policy and the device sandbox; access is checked by the caller. `sandbox` is the device
|
|
39
|
+
* sandbox under the device's current runtime report (else the support stored with its report,
|
|
40
|
+
* else the provider layer assumed before one is recorded), the same under every permission
|
|
41
|
+
* profile.
|
|
41
42
|
*/
|
|
42
43
|
readDevice(orgId: string, deviceId: string): Promise<{
|
|
43
44
|
policy: EffectiveDevicePolicy;
|
|
44
|
-
owner: {
|
|
45
|
-
state: "blocked" | "report";
|
|
46
|
-
outsideSandbox: boolean;
|
|
47
|
-
restrictedProjectReach: import("../local-devices/owner-report.js").RestrictedProjectReach;
|
|
48
|
-
network: "allowlist" | "open";
|
|
49
|
-
allowedDomains: string[];
|
|
50
|
-
} | null;
|
|
51
45
|
sandbox: DeviceSandbox;
|
|
52
46
|
hostCeiling: HostGrantCeiling;
|
|
53
47
|
hostRefusal: (host: string) => string | null;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
networkCeiling: "none" | import("./device-sandbox.js").DeviceNetworkMode;
|
|
57
|
-
networkMode: "none" | import("./device-sandbox.js").DeviceNetworkMode;
|
|
58
|
-
restrictedProjectReach: "os-user" | "workspace";
|
|
59
|
-
hostCeiling: HostGrantCeiling;
|
|
60
|
-
};
|
|
61
|
-
roots: {} | null;
|
|
62
|
-
home: string | null;
|
|
48
|
+
/** The provider's description of the device (its stored report, English), or null. */
|
|
49
|
+
description: string | null;
|
|
63
50
|
}>;
|
|
64
51
|
/**
|
|
65
52
|
* The effective device sandbox (approval-only profiles design, "Settings model"): the platform,
|
|
66
|
-
* org, device and provider layers read live and combined by {@link effectiveDeviceSandbox}
|
|
67
|
-
*
|
|
68
|
-
*
|
|
53
|
+
* org, device and provider layers read live and combined by {@link effectiveDeviceSandbox}, one
|
|
54
|
+
* path for every provider. The device layer is its stored network choice; the provider layer
|
|
55
|
+
* its current runtime report, else the support stored with its device report (device-provider
|
|
56
|
+
* spec §6.7), else the layer assumed before any ({@link providerLayerOf}).
|
|
69
57
|
*/
|
|
70
58
|
deviceSandbox(orgId: string, deviceId: string, availability?: PermissionAvailability): Promise<DeviceSandbox>;
|
|
71
59
|
/**
|
|
@@ -74,21 +62,31 @@ export declare class PermissionFacts {
|
|
|
74
62
|
* crossing ceilings a Full access consent covers ({@link ConsentReach}).
|
|
75
63
|
*/
|
|
76
64
|
deviceSandboxFacts(orgId: string, deviceId: string, availability?: PermissionAvailability,
|
|
77
|
-
/**
|
|
78
|
-
|
|
65
|
+
/** The device's network as it would be stored (a change checked before it is written). */
|
|
66
|
+
pending?: {
|
|
79
67
|
networkMode: "open" | "allowlist" | "none" | null;
|
|
80
68
|
networkHosts: string[];
|
|
81
|
-
}
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* Which provider layer: `ceilings` (the support chain, {@link providerLayerOf}; the consent
|
|
72
|
+
* reach reads it too) or `lifecycle` (no support: the network an instance is created with is
|
|
73
|
+
* the device's own choice within the ceilings, never a support read after an earlier
|
|
74
|
+
* instance, so a support arriving never makes the next use recreate the instance; the
|
|
75
|
+
* provider enforces what it can).
|
|
76
|
+
*/
|
|
77
|
+
layer?: "ceilings" | "lifecycle"): Promise<{
|
|
82
78
|
box: DeviceSandbox;
|
|
83
79
|
hostCeiling: HostGrantCeiling;
|
|
84
80
|
/** The org's effective hosts: what a device's own host list may narrow, never add to. */
|
|
85
81
|
orgHosts: string[];
|
|
86
82
|
refusal: (host: string) => string | null;
|
|
83
|
+
description: string | null;
|
|
84
|
+
/** Its provider enforces a sandbox allowlist (its support): a blocked host may be asked about. */
|
|
85
|
+
allowlist: boolean;
|
|
87
86
|
reach: {
|
|
88
87
|
outsideSandbox: boolean;
|
|
89
88
|
networkCeiling: "none" | import("./device-sandbox.js").DeviceNetworkMode;
|
|
90
89
|
networkMode: "none" | import("./device-sandbox.js").DeviceNetworkMode;
|
|
91
|
-
restrictedProjectReach: "os-user" | "workspace";
|
|
92
90
|
hostCeiling: HostGrantCeiling;
|
|
93
91
|
};
|
|
94
92
|
}>;
|
|
@@ -106,11 +104,10 @@ export declare class PermissionFacts {
|
|
|
106
104
|
} | null>;
|
|
107
105
|
/**
|
|
108
106
|
* The device's lifecycle policy: the kernel-internal mode tier (`auto` / `sandbox`, recorded with
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* choice (`network_mode`, `network_hosts`).
|
|
107
|
+
* an instance's applied limits) and the network an instance is created with: its device sandbox
|
|
108
|
+
* network ({@link deviceSandbox}), the same for every provider. The B1 snapshot's
|
|
109
|
+
* `outer_network` is no longer read: migrations 0165 and 0167 and the snapshot writer copy an
|
|
110
|
+
* allowlist snapshot into the device's own network choice (`network_mode`, `network_hosts`).
|
|
114
111
|
*/
|
|
115
112
|
devicePolicy(device: {
|
|
116
113
|
orgId: string;
|
|
@@ -124,22 +121,16 @@ export declare class PermissionFacts {
|
|
|
124
121
|
*/
|
|
125
122
|
assertCloudReconciled(orgId: string, deviceId: string): Promise<void>;
|
|
126
123
|
/**
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
124
|
+
* The mode tier a device chose: the narrower of its old switch and its B1 owner snapshot
|
|
125
|
+
* (`cloudChosenMode`), or null for a device that follows the platform and the org; `found`:
|
|
126
|
+
* a live device of the org. The tier is kernel-internal (instance limits); whether a call may
|
|
127
|
+
* run outside the sandbox is the device sandbox's.
|
|
130
128
|
*/
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* The mode tier a device chose: a local device's derived one (`ownerModeOf`: `auto` only when
|
|
134
|
-
* its owner allows running outside the sandbox); a cloud device's narrower of its old switch and
|
|
135
|
-
* its B1 owner snapshot (`cloudChosenMode`), or null for a cloud device that follows the
|
|
136
|
-
* platform and the org. The tier is kernel-internal (instance limits, reach): a cloud device
|
|
137
|
-
* never runs outside its sandbox.
|
|
138
|
-
*/
|
|
139
|
-
private deviceChosenMode;
|
|
129
|
+
private chosenMode;
|
|
140
130
|
/**
|
|
141
131
|
* The device's current permission availability: the provider's capability shape, then the
|
|
142
|
-
* runtime report recorded for its current identity
|
|
132
|
+
* runtime report recorded for its current identity under the provider's version, the same for
|
|
133
|
+
* every provider. No probe or provider call.
|
|
143
134
|
*/
|
|
144
135
|
private availability;
|
|
145
136
|
readWorkingFacts({ orgId, rootConversationId, holderConversationId: conversationId, deviceId, }: {
|
|
@@ -161,11 +152,15 @@ export declare class PermissionFacts {
|
|
|
161
152
|
workingProject(orgId: string, rootConversationId: string): Promise<WorkingProject | null>;
|
|
162
153
|
/** The workspace root of a conversation's latest `device_paths` event, or null. */
|
|
163
154
|
private recordedWorkspace;
|
|
155
|
+
/** The owner's home the device's provider last reported (`devices.report`), or null. */
|
|
156
|
+
private reportedHome;
|
|
164
157
|
/**
|
|
165
|
-
* The
|
|
166
|
-
* (
|
|
158
|
+
* The owner's live device's project scope: whether its provider offers projects (it has
|
|
159
|
+
* `list`), the home its provider last reported (the base the picker starts from; null: none,
|
|
160
|
+
* the workspace) and the workspace as last known (the instance's handle). What a project path
|
|
161
|
+
* may be is the provider's rule (device-provider spec §6.1): it refuses one it will not serve,
|
|
162
|
+
* so the kernel narrows no path below a reported home.
|
|
167
163
|
*/
|
|
168
|
-
private machineRoots;
|
|
169
164
|
projectScope(orgId: string, accountId: string, deviceId: string): Promise<Scope>;
|
|
170
165
|
resolveProjectForBinding(orgId: string, deviceId: string, accountId: string, name: string): Promise<{
|
|
171
166
|
name: string;
|
|
@@ -181,18 +176,18 @@ export declare class PermissionFacts {
|
|
|
181
176
|
outsideSandbox: boolean;
|
|
182
177
|
networkCeiling: "none" | import("./device-sandbox.js").DeviceNetworkMode;
|
|
183
178
|
networkMode: "none" | import("./device-sandbox.js").DeviceNetworkMode;
|
|
184
|
-
restrictedProjectReach: "os-user" | "workspace";
|
|
185
179
|
hostCeiling: HostGrantCeiling;
|
|
186
180
|
};
|
|
187
181
|
availability: PermissionAvailability;
|
|
188
|
-
location: "cloud" | "local";
|
|
189
182
|
sandbox: DeviceSandbox;
|
|
190
183
|
outsideSandboxCeiling: boolean;
|
|
191
|
-
broadProjectReach: boolean;
|
|
192
184
|
}>;
|
|
193
185
|
/**
|
|
194
186
|
* The preview people see before choosing a profile: availability is the device-work verdict
|
|
195
|
-
* ({@link deviceWorkAvailability}). Kernel callers only use it as a check.
|
|
187
|
+
* ({@link deviceWorkAvailability}). Kernel callers only use it as a check. `consentReach` is the
|
|
188
|
+
* reach an Auto consent confirmed against this `scopeRevision` records (the same layer as the
|
|
189
|
+
* crossing ceilings, whatever the runtime's state): the confirmation names exactly what it
|
|
190
|
+
* covers, never a guess from the runtime availability.
|
|
196
191
|
*/
|
|
197
192
|
preview(orgId: string, accountId: string, deviceId: string, project?: string): Promise<{
|
|
198
193
|
deviceId: string;
|
|
@@ -203,13 +198,10 @@ export declare class PermissionFacts {
|
|
|
203
198
|
outsideSandbox: boolean;
|
|
204
199
|
networkCeiling: "none" | import("./device-sandbox.js").DeviceNetworkMode;
|
|
205
200
|
networkMode: "none" | import("./device-sandbox.js").DeviceNetworkMode;
|
|
206
|
-
restrictedProjectReach: "os-user" | "workspace";
|
|
207
201
|
hostCeiling: HostGrantCeiling;
|
|
208
202
|
};
|
|
209
|
-
location: "cloud" | "local";
|
|
210
203
|
sandbox: DeviceSandbox;
|
|
211
204
|
outsideSandboxCeiling: boolean;
|
|
212
|
-
broadProjectReach: boolean;
|
|
213
205
|
availability: PermissionAvailability;
|
|
214
206
|
}>;
|
|
215
207
|
view(orgId: string, accountId: string, row: PermissionRoot): Promise<{
|
|
@@ -224,7 +216,13 @@ export declare class PermissionFacts {
|
|
|
224
216
|
scopeRevision: string | null;
|
|
225
217
|
availability: PermissionAvailability;
|
|
226
218
|
outsideSandboxCeiling: boolean;
|
|
227
|
-
|
|
219
|
+
/** What an Auto consent confirmed now records (the confirmation names exactly this). */
|
|
220
|
+
consentReach: {
|
|
221
|
+
outsideSandbox: boolean;
|
|
222
|
+
networkCeiling: "none" | import("./device-sandbox.js").DeviceNetworkMode;
|
|
223
|
+
networkMode: "none" | import("./device-sandbox.js").DeviceNetworkMode;
|
|
224
|
+
hostCeiling: HostGrantCeiling;
|
|
225
|
+
} | null;
|
|
228
226
|
sandbox: DeviceSandbox | null;
|
|
229
227
|
startingWorkNotice: string;
|
|
230
228
|
}>;
|
|
@@ -245,7 +243,13 @@ export declare class PermissionFacts {
|
|
|
245
243
|
} | null;
|
|
246
244
|
scopeRevision: string | null;
|
|
247
245
|
outsideSandboxCeiling: boolean;
|
|
248
|
-
|
|
246
|
+
/** What an Auto consent confirmed now records (the confirmation names exactly this). */
|
|
247
|
+
consentReach: {
|
|
248
|
+
outsideSandbox: boolean;
|
|
249
|
+
networkCeiling: "none" | import("./device-sandbox.js").DeviceNetworkMode;
|
|
250
|
+
networkMode: "none" | import("./device-sandbox.js").DeviceNetworkMode;
|
|
251
|
+
hostCeiling: HostGrantCeiling;
|
|
252
|
+
} | null;
|
|
249
253
|
sandbox: DeviceSandbox | null;
|
|
250
254
|
startingWorkNotice: string;
|
|
251
255
|
}>;
|
|
@@ -256,7 +260,8 @@ export declare class PermissionFacts {
|
|
|
256
260
|
*/
|
|
257
261
|
viewWithAccess(orgId: string, accountId: string, row: PermissionRoot): Promise<{
|
|
258
262
|
access: "actor-device-access" | "device" | "no-device" | "provider-unavailable";
|
|
259
|
-
|
|
263
|
+
/** Whether the device's scope was read (a usable device): its availability is a verdict. */
|
|
264
|
+
previewed: boolean;
|
|
260
265
|
view: {
|
|
261
266
|
profile: PermissionProfile;
|
|
262
267
|
revision: number;
|
|
@@ -269,20 +274,31 @@ export declare class PermissionFacts {
|
|
|
269
274
|
scopeRevision: string | null;
|
|
270
275
|
availability: PermissionAvailability;
|
|
271
276
|
outsideSandboxCeiling: boolean;
|
|
272
|
-
|
|
277
|
+
/** What an Auto consent confirmed now records (the confirmation names exactly this). */
|
|
278
|
+
consentReach: {
|
|
279
|
+
outsideSandbox: boolean;
|
|
280
|
+
networkCeiling: "none" | import("./device-sandbox.js").DeviceNetworkMode;
|
|
281
|
+
networkMode: "none" | import("./device-sandbox.js").DeviceNetworkMode;
|
|
282
|
+
hostCeiling: HostGrantCeiling;
|
|
283
|
+
} | null;
|
|
273
284
|
sandbox: DeviceSandbox | null;
|
|
274
285
|
startingWorkNotice: string;
|
|
275
286
|
};
|
|
276
287
|
}>;
|
|
277
288
|
/**
|
|
278
|
-
* The installed environment of the device's current instance (B1 adapter
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
* ones
|
|
284
|
-
*
|
|
285
|
-
*
|
|
289
|
+
* The installed environment of the device's current instance (B1 adapter), read under the
|
|
290
|
+
* caller's device authority lock: its provider's current runtime report recorded with the
|
|
291
|
+
* kernel-built identity ({@link readCurrentReport}, which binds the device's report revision),
|
|
292
|
+
* the same for every provider. Null whenever it cannot be proved: no live instance (none,
|
|
293
|
+
* creating, destroyed), an instance of another provider than the device's, roots differing from
|
|
294
|
+
* the committed ones, missing or stale evidence, desired limits waiting for a file reset
|
|
295
|
+
* (`unapplied`) and applied limits more permissive than the effective desired ones in any
|
|
296
|
+
* dimension (network kind, a host the desired allowlist does not cover; spec §124): a pending
|
|
297
|
+
* desired change is never projected as installed. Applied limits narrower than desired stand;
|
|
298
|
+
* the next use's lifecycle lease applies any change before admitting an operation, and its new
|
|
299
|
+
* limits change the identity, so that use records the evidence again. Never desired policy,
|
|
300
|
+
* never a provider call, probe, resume or provisioning; a suspended instance is read as
|
|
301
|
+
* recorded.
|
|
286
302
|
*/
|
|
287
303
|
readAppliedEnvironmentLocked(input: {
|
|
288
304
|
orgId: string;
|
|
@@ -298,43 +314,30 @@ export declare class PermissionFacts {
|
|
|
298
314
|
deviceId: string;
|
|
299
315
|
}): Promise<AppliedEnvironment | null>;
|
|
300
316
|
private readAppliedEnvironment;
|
|
301
|
-
/**
|
|
302
|
-
* A cloud instance's installed environment (B-15, Q1 option A): its current runtime report
|
|
303
|
-
* recorded with the kernel-built cloud identity (provider plugin and version, handle,
|
|
304
|
-
* generation, applied limits; `readCurrentReport`), named by that report's identity hash in
|
|
305
|
-
* place of a binding id. Null while the evidence is missing or stale, while desired limits wait
|
|
306
|
-
* for a file reset (`unapplied`) and while the applied limits are more permissive than the
|
|
307
|
-
* effective desired ones in any dimension (mode, network kind, a host the desired allowlist
|
|
308
|
-
* does not cover; spec §124): a pending desired change is never projected as installed. Applied
|
|
309
|
-
* limits narrower than desired stand (the outer boundary is the applied network, and restricted
|
|
310
|
-
* hosts are cut to it); the next use's lifecycle lease applies any change before admitting an
|
|
311
|
-
* operation, and its new limits change the identity, so that use records the evidence again.
|
|
312
|
-
*/
|
|
313
|
-
private cloudAppliedLocked;
|
|
314
317
|
}
|
|
315
318
|
/**
|
|
316
|
-
* The outer boundary
|
|
317
|
-
* allowlist (empty: network disabled). Null when the allowlist cannot be stated as
|
|
318
|
-
* context hosts (a host that is not a normalized authority host, or more than the cap).
|
|
319
|
+
* The outer boundary an instance-boundary instance's applied network proves: public addresses, or
|
|
320
|
+
* its exact allowlist (empty: network disabled). Null when the allowlist cannot be stated as
|
|
321
|
+
* recorded context hosts (a host that is not a normalized authority host, or more than the cap).
|
|
319
322
|
*/
|
|
320
|
-
export declare function
|
|
323
|
+
export declare function instanceOuterNetwork(network: DeviceNetwork): AppliedOuterNetwork | null;
|
|
321
324
|
/**
|
|
322
|
-
* Restricted hosts within
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
+
* Restricted hosts within an instance's applied outer boundary (narrowing only): a host the outer
|
|
326
|
+
* allowlist does not cover cannot be reached, so neither admission nor the recorded context names
|
|
327
|
+
* it. An operation-boundary runtime's host environment keeps every host.
|
|
325
328
|
*/
|
|
326
329
|
export declare function hostsWithinOuter(hosts: readonly string[], outer: AppliedOuterNetwork | undefined): string[];
|
|
327
330
|
/**
|
|
328
|
-
* The network a device sandbox gives
|
|
329
|
-
*
|
|
331
|
+
* The network a device sandbox gives an instance's outer boundary: the open public internet, or
|
|
332
|
+
* its allowlist (empty under the kill switch, which closes it).
|
|
330
333
|
*/
|
|
331
334
|
export declare function networkOfSandbox(box: DeviceSandbox): DeviceNetwork;
|
|
332
335
|
/**
|
|
333
|
-
* A
|
|
334
|
-
* follows the org). A B1 snapshot is copied into it by migrations 0165 and
|
|
335
|
-
* writer and every publication (`copyCloudSnapshotNetworks`), never read here.
|
|
336
|
+
* A device's own sandbox network, whatever its provider: its stored choice (`network_mode`,
|
|
337
|
+
* `network_hosts`; null follows the org). A B1 snapshot is copied into it by migrations 0165 and
|
|
338
|
+
* 0167, the snapshot writer and every publication (`copyCloudSnapshotNetworks`), never read here.
|
|
336
339
|
*/
|
|
337
|
-
export declare function
|
|
340
|
+
export declare function ownNetwork(row: {
|
|
338
341
|
network_mode?: unknown;
|
|
339
342
|
network_hosts?: unknown;
|
|
340
343
|
} | undefined): {
|