@capybara-hq/kernel 0.1.0-rc.67 → 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/bootstrap.json +9 -1
- 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/credential-key.d.ts +10 -0
- package/dist/catalog/credential-key.js +28 -0
- package/dist/catalog/marketplaces.service.d.ts +1 -1
- package/dist/catalog/plugin-upgrade.js +1 -19
- 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/connectors.controller.d.ts +2 -0
- package/dist/tools/connectors.schemas.d.ts +2 -0
- package/dist/tools/credentials.d.ts +2 -0
- package/dist/tools/network-asks.d.ts +19 -22
- package/dist/tools/network-asks.js +15 -21
- package/dist/tools/oauth/authorization-params.d.ts +7 -0
- package/dist/tools/oauth/authorization-params.js +19 -0
- package/dist/tools/oauth/flow.js +7 -0
- package/dist/tools/oauth/tokens.js +2 -1
- 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
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { DeviceLocalPolicySummary } from "@capybara-hq/plugin-sdk";
|
|
2
1
|
import type { z } from "zod";
|
|
3
2
|
import { type Principal } from "../identity/principal.js";
|
|
4
3
|
import { type OrgContext } from "../orgs/org.guard.js";
|
|
5
4
|
import { type DeviceProjectCandidates, type DeviceProjectList, DeviceProjectsService, type DeviceProjectView } from "./device-projects.service.js";
|
|
6
5
|
import { type DeviceList, DevicesService, type DeviceView } from "./devices.service.js";
|
|
7
|
-
import { type DeviceCreateBody, type DeviceParams, type DevicePatchBody, type
|
|
6
|
+
import { type DeviceCreateBody, type DeviceParams, type DevicePatchBody, type DeviceProjectAddBody, type DeviceProjectParams } from "./dto.js";
|
|
8
7
|
/**
|
|
9
8
|
* A person's devices in an org (`/api/v1/orgs/:orgId/devices`, spec
|
|
10
9
|
* 2026-11-07-environments-design §9; `agents.use`, human users only: a service token gets 403).
|
|
@@ -16,25 +15,16 @@ import { type DeviceCreateBody, type DeviceParams, type DevicePatchBody, type De
|
|
|
16
15
|
* - `POST / { name, provider? }` → 201 `{ device }`, bound for life to `provider` (one of
|
|
17
16
|
* `providers`, else 400 `validation_failed` at `provider`) or the default provider (none: 400
|
|
18
17
|
* `device.provider_required`); `GET /:id` → `{ device }`;
|
|
19
|
-
* - `PATCH /:id { name?, network? }` → `{ device }`: renames it and sets
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* `device.
|
|
24
|
-
* it (400 `device.network_not_allowed`);
|
|
18
|
+
* - `PATCH /:id { name?, network? }` → `{ device }`: renames it and sets its sandbox network
|
|
19
|
+
* (`{ mode: open | allowlist | none | null, hosts? }`, approval-only profiles design, "Settings
|
|
20
|
+
* model") within its org's and the platform's ceilings (400 `device.network_not_allowed` above
|
|
21
|
+
* them), whatever its provider. An API token may only narrow it (400
|
|
22
|
+
* `device.network_not_allowed`);
|
|
25
23
|
* - `DELETE /:id` → 202 (destroyed by a job after the response);
|
|
26
24
|
* - `POST /:id/files/reset` → 202 (the reset is enqueued: a worker empties the files, the next use
|
|
27
|
-
* starts empty);
|
|
28
|
-
* - `DELETE /:id/machine` → 204: a
|
|
25
|
+
* starts empty; 409 `device.files_on_device` when its provider's report offers no reset);
|
|
26
|
+
* - `DELETE /:id/machine` → 204: a dial-in device's machine is disconnected (its credential
|
|
29
27
|
* revoked; it must sign in again);
|
|
30
|
-
* - `POST /:id/policy { remove?, ownerCeiling? }` → `{ policy }`: the owner narrows the local
|
|
31
|
-
* device's sandbox on its machine (hosts removed; `outsideSandbox: false`, `network:
|
|
32
|
-
* "allowlist"`, `restrictedProjectReach: "workspace"`); widening happens on the machine only.
|
|
33
|
-
* Web session only
|
|
34
|
-
* (`@SessionOnly`: a personal access token → 403 `auth.session_required`, a service token → 403):
|
|
35
|
-
* a person changes their own machine's network policy, nothing model-driven does. Offline → 503
|
|
36
|
-
* `device.offline`; cloud or an older program → 409 `device.policy_unsupported`; the machine's
|
|
37
|
-
* refusal → 409 `device.policy_refused`.
|
|
38
28
|
* - a device's projects (project root design §4.1, §4.2), owner only (anyone else:
|
|
39
29
|
* `device.not_found`): `GET /:id/projects` → the ones its current mode can read;
|
|
40
30
|
* `GET /:id/projects/candidates` → the device's suggestions under its base;
|
|
@@ -58,9 +48,6 @@ export declare class DevicesController {
|
|
|
58
48
|
remove(principal: Principal, org: OrgContext, params: z.infer<typeof DeviceParams>): Promise<void>;
|
|
59
49
|
resetFiles(principal: Principal, org: OrgContext, params: z.infer<typeof DeviceParams>): Promise<void>;
|
|
60
50
|
revokeMachine(principal: Principal, org: OrgContext, params: z.infer<typeof DeviceParams>): Promise<void>;
|
|
61
|
-
changePolicy(principal: Principal, org: OrgContext, params: z.infer<typeof DeviceParams>, body: z.infer<typeof DevicePolicyBody>): Promise<{
|
|
62
|
-
policy: DeviceLocalPolicySummary;
|
|
63
|
-
}>;
|
|
64
51
|
listProjects(principal: Principal, org: OrgContext, params: z.infer<typeof DeviceParams>): Promise<DeviceProjectList>;
|
|
65
52
|
projectCandidates(principal: Principal, org: OrgContext, params: z.infer<typeof DeviceParams>): Promise<DeviceProjectCandidates>;
|
|
66
53
|
addProject(principal: Principal, org: OrgContext, params: z.infer<typeof DeviceParams>, body: z.infer<typeof DeviceProjectAddBody>): Promise<{
|
|
@@ -8,12 +8,12 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
8
8
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
9
9
|
};
|
|
10
10
|
import { Controller, Delete, Get, HttpCode, Inject, Patch, Post } from "@nestjs/common";
|
|
11
|
-
import { CurrentPrincipal, patTokenId, requireUser,
|
|
11
|
+
import { CurrentPrincipal, patTokenId, requireUser, } from "../identity/principal.js";
|
|
12
12
|
import { ZBody, ZParam } from "../infra/validation/zod-params.js";
|
|
13
13
|
import { CurrentOrg, OrgAction } from "../orgs/org.guard.js";
|
|
14
14
|
import { DeviceProjectsService, } from "./device-projects.service.js";
|
|
15
15
|
import { DevicesService } from "./devices.service.js";
|
|
16
|
-
import { DeviceCreateBodyDto, DeviceParamsDto, DevicePatchBodyDto,
|
|
16
|
+
import { DeviceCreateBodyDto, DeviceParamsDto, DevicePatchBodyDto, DeviceProjectAddBodyDto, DeviceProjectParamsDto, } from "./dto.js";
|
|
17
17
|
/**
|
|
18
18
|
* A person's devices in an org (`/api/v1/orgs/:orgId/devices`, spec
|
|
19
19
|
* 2026-11-07-environments-design §9; `agents.use`, human users only: a service token gets 403).
|
|
@@ -25,25 +25,16 @@ import { DeviceCreateBodyDto, DeviceParamsDto, DevicePatchBodyDto, DevicePolicyB
|
|
|
25
25
|
* - `POST / { name, provider? }` → 201 `{ device }`, bound for life to `provider` (one of
|
|
26
26
|
* `providers`, else 400 `validation_failed` at `provider`) or the default provider (none: 400
|
|
27
27
|
* `device.provider_required`); `GET /:id` → `{ device }`;
|
|
28
|
-
* - `PATCH /:id { name?, network? }` → `{ device }`: renames it and sets
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* `device.
|
|
33
|
-
* it (400 `device.network_not_allowed`);
|
|
28
|
+
* - `PATCH /:id { name?, network? }` → `{ device }`: renames it and sets its sandbox network
|
|
29
|
+
* (`{ mode: open | allowlist | none | null, hosts? }`, approval-only profiles design, "Settings
|
|
30
|
+
* model") within its org's and the platform's ceilings (400 `device.network_not_allowed` above
|
|
31
|
+
* them), whatever its provider. An API token may only narrow it (400
|
|
32
|
+
* `device.network_not_allowed`);
|
|
34
33
|
* - `DELETE /:id` → 202 (destroyed by a job after the response);
|
|
35
34
|
* - `POST /:id/files/reset` → 202 (the reset is enqueued: a worker empties the files, the next use
|
|
36
|
-
* starts empty);
|
|
37
|
-
* - `DELETE /:id/machine` → 204: a
|
|
35
|
+
* starts empty; 409 `device.files_on_device` when its provider's report offers no reset);
|
|
36
|
+
* - `DELETE /:id/machine` → 204: a dial-in device's machine is disconnected (its credential
|
|
38
37
|
* revoked; it must sign in again);
|
|
39
|
-
* - `POST /:id/policy { remove?, ownerCeiling? }` → `{ policy }`: the owner narrows the local
|
|
40
|
-
* device's sandbox on its machine (hosts removed; `outsideSandbox: false`, `network:
|
|
41
|
-
* "allowlist"`, `restrictedProjectReach: "workspace"`); widening happens on the machine only.
|
|
42
|
-
* Web session only
|
|
43
|
-
* (`@SessionOnly`: a personal access token → 403 `auth.session_required`, a service token → 403):
|
|
44
|
-
* a person changes their own machine's network policy, nothing model-driven does. Offline → 503
|
|
45
|
-
* `device.offline`; cloud or an older program → 409 `device.policy_unsupported`; the machine's
|
|
46
|
-
* refusal → 409 `device.policy_refused`.
|
|
47
38
|
* - a device's projects (project root design §4.1, §4.2), owner only (anyone else:
|
|
48
39
|
* `device.not_found`): `GET /:id/projects` → the ones its current mode can read;
|
|
49
40
|
* `GET /:id/projects/candidates` → the device's suggestions under its base;
|
|
@@ -95,12 +86,6 @@ let DevicesController = class DevicesController {
|
|
|
95
86
|
const p = requireUser(principal);
|
|
96
87
|
await this.devices.revokeMachine(org.orgId, p.account.id, params.id, patTokenId(p));
|
|
97
88
|
}
|
|
98
|
-
async changePolicy(principal, org, params, body) {
|
|
99
|
-
const p = requireUser(principal);
|
|
100
|
-
return {
|
|
101
|
-
policy: await this.devices.changePolicy(org.orgId, p.account, params.id, body),
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
89
|
async listProjects(principal, org, params) {
|
|
105
90
|
const p = requireUser(principal);
|
|
106
91
|
return this.projects.list(org.orgId, p.account.id, params.id);
|
|
@@ -172,16 +157,6 @@ __decorate([
|
|
|
172
157
|
__param(1, CurrentOrg()),
|
|
173
158
|
__param(2, ZParam(DeviceParamsDto))
|
|
174
159
|
], DevicesController.prototype, "revokeMachine", null);
|
|
175
|
-
__decorate([
|
|
176
|
-
Post(":id/policy"),
|
|
177
|
-
HttpCode(200),
|
|
178
|
-
SessionOnly(),
|
|
179
|
-
OrgAction("agents.use"),
|
|
180
|
-
__param(0, CurrentPrincipal()),
|
|
181
|
-
__param(1, CurrentOrg()),
|
|
182
|
-
__param(2, ZParam(DeviceParamsDto)),
|
|
183
|
-
__param(3, ZBody(DevicePolicyBodyDto))
|
|
184
|
-
], DevicesController.prototype, "changePolicy", null);
|
|
185
160
|
__decorate([
|
|
186
161
|
Get(":id/projects"),
|
|
187
162
|
OrgAction("agents.use"),
|
|
@@ -5,9 +5,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { Module } from "@nestjs/common";
|
|
8
|
+
import { DialInModule } from "../dial-in/dial-in.module.js";
|
|
8
9
|
import { ExtensionsModule } from "../extensions/extensions.module.js";
|
|
9
|
-
import { LocalDevicesModule } from "../local-devices/local-devices.module.js";
|
|
10
10
|
import { PermissionFactsModule } from "../sandbox/permission-facts.module.js";
|
|
11
|
+
import { SandboxProviderRegistryModule } from "../sandbox/providers.module.js";
|
|
11
12
|
import { SandboxModule } from "../sandbox/sandbox.module.js";
|
|
12
13
|
import { SandboxFileReader } from "../sandbox/sandbox-file-reader.js";
|
|
13
14
|
import { DeviceAccess } from "./access.js";
|
|
@@ -26,12 +27,13 @@ let DevicesModule = class DevicesModule {
|
|
|
26
27
|
};
|
|
27
28
|
DevicesModule = __decorate([
|
|
28
29
|
Module({
|
|
29
|
-
// ExtensionsModule: the provider display names;
|
|
30
|
-
//
|
|
30
|
+
// ExtensionsModule: the provider display names; DialInModule: deleting a dial-in device
|
|
31
|
+
// revokes its machine, and whether its machine is online
|
|
31
32
|
imports: [
|
|
32
33
|
SandboxModule,
|
|
34
|
+
SandboxProviderRegistryModule,
|
|
33
35
|
ExtensionsModule,
|
|
34
|
-
|
|
36
|
+
DialInModule,
|
|
35
37
|
DeviceAccessModule,
|
|
36
38
|
DeviceProviderSelectionModule,
|
|
37
39
|
PermissionFactsModule,
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { RouteSchemas } from "../platform/route-schemas.js";
|
|
2
|
-
/** The body of the excluded `POST /devices/:id/policy` route (human-only). */
|
|
3
|
-
export { DevicePolicyBody } from "./dto.js";
|
|
4
2
|
/**
|
|
5
|
-
* The devices routes the Platform operations mirror (`check:platform-ops` keys).
|
|
6
|
-
* machine's sandbox (`POST /devices/:id/policy`, body {@link DevicePolicyBody}) is a person's act
|
|
7
|
-
* on their own machine and stays excluded, so it has no entry here. `PATCH /devices/:id`
|
|
3
|
+
* The devices routes the Platform operations mirror (`check:platform-ops` keys). `PATCH /devices/:id`
|
|
8
4
|
* ({@link DevicePatchBody}) is mirrored by `devices.rename` (the name) and `devices.set-network`
|
|
9
5
|
* (a cloud device's network, narrow only).
|
|
10
6
|
*/
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { DeviceCreateBody, DeviceParams, DevicePatchBody, DeviceProjectAddBody, DeviceProjectParams, } from "./dto.js";
|
|
2
|
-
/** The body of the excluded `POST /devices/:id/policy` route (human-only). */
|
|
3
|
-
export { DevicePolicyBody } from "./dto.js";
|
|
4
2
|
/**
|
|
5
|
-
* The devices routes the Platform operations mirror (`check:platform-ops` keys).
|
|
6
|
-
* machine's sandbox (`POST /devices/:id/policy`, body {@link DevicePolicyBody}) is a person's act
|
|
7
|
-
* on their own machine and stays excluded, so it has no entry here. `PATCH /devices/:id`
|
|
3
|
+
* The devices routes the Platform operations mirror (`check:platform-ops` keys). `PATCH /devices/:id`
|
|
8
4
|
* ({@link DevicePatchBody}) is mirrored by `devices.rename` (the name) and `devices.set-network`
|
|
9
5
|
* (a cloud device's network, narrow only).
|
|
10
6
|
*/
|