@skrr-ai/cli 0.1.93 → 0.1.95
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/README.md +153 -165
- package/bin/run.js +32 -0
- package/bin/update-npm-runner.cjs +33 -0
- package/bin/update-session.cjs +194 -0
- package/bin/update-worker.cjs +208 -0
- package/dist/base-command.js +0 -15
- package/dist/commands/agents/operating-plan.d.ts +11 -0
- package/dist/commands/agents/operating-plan.js +54 -0
- package/dist/commands/agents/roles/example.d.ts +11 -0
- package/dist/commands/agents/roles/example.js +30 -0
- package/dist/commands/{commitments/mode.d.ts → agents/roles/export.d.ts} +5 -5
- package/dist/commands/agents/roles/export.js +81 -0
- package/dist/commands/agents/roles/install.d.ts +12 -0
- package/dist/commands/agents/roles/install.js +48 -0
- package/dist/commands/agents/roles/list.d.ts +11 -0
- package/dist/commands/agents/roles/list.js +36 -0
- package/dist/commands/agents/roles/preview.d.ts +14 -0
- package/dist/commands/agents/roles/preview.js +49 -0
- package/dist/commands/agents/roles/withdraw.d.ts +13 -0
- package/dist/commands/agents/roles/withdraw.js +43 -0
- package/dist/commands/code/doctor.d.ts +1 -0
- package/dist/commands/code/doctor.js +6 -0
- package/dist/commands/code/index.js +4 -0
- package/dist/commands/code/install.d.ts +5 -62
- package/dist/commands/code/install.js +86 -279
- package/dist/commands/code/rollback.d.ts +8 -0
- package/dist/commands/code/rollback.js +20 -0
- package/dist/commands/code/update.d.ts +8 -37
- package/dist/commands/code/update.js +134 -213
- package/dist/commands/commitments/{autonomy-requests → cadence-requests}/decide.d.ts +5 -7
- package/dist/commands/commitments/{autonomy-requests → cadence-requests}/decide.js +13 -15
- package/dist/commands/commitments/cost.d.ts +1 -1
- package/dist/commands/commitments/cost.js +1 -1
- package/dist/commands/commitments/create.d.ts +0 -7
- package/dist/commands/commitments/create.js +9 -98
- package/dist/commands/commitments/delivery.js +3 -21
- package/dist/commands/commitments/doctor.js +28 -27
- package/dist/commands/commitments/effective-policy.js +5 -36
- package/dist/commands/commitments/evaluations.d.ts +15 -0
- package/dist/commands/commitments/evaluations.js +54 -0
- package/dist/commands/commitments/pack/activate.d.ts +11 -0
- package/dist/commands/commitments/pack/activate.js +22 -0
- package/dist/commands/commitments/pack/bind.js +1 -1
- package/dist/commands/commitments/remediate.js +2 -5
- package/dist/commands/commitments/show.js +1 -1
- package/dist/commands/commitments/update.js +9 -9
- package/dist/commands/commitments/wake-capabilities.d.ts +1 -3
- package/dist/commands/commitments/wake-capabilities.js +5 -21
- package/dist/commands/daemon/install.js +4 -0
- package/dist/commands/generate-recovery-code.d.ts +13 -1
- package/dist/commands/generate-recovery-code.js +146 -13
- package/dist/commands/instructions/guide.d.ts +20 -0
- package/dist/commands/instructions/guide.js +84 -0
- package/dist/commands/instructions/install.js +57 -33
- package/dist/commands/instructions/setup.d.ts +14 -0
- package/dist/commands/instructions/setup.js +72 -0
- package/dist/commands/integrations/execute.js +1 -1
- package/dist/commands/login.d.ts +5 -6
- package/dist/commands/login.js +27 -11
- package/dist/commands/logout.js +7 -7
- package/dist/commands/security/overview.d.ts +11 -0
- package/dist/commands/security/overview.js +158 -0
- package/dist/commands/spaces/claim.d.ts +12 -0
- package/dist/commands/spaces/claim.js +42 -0
- package/dist/commands/spaces/ownership.d.ts +12 -0
- package/dist/commands/spaces/ownership.js +46 -0
- package/dist/commands/tasks/cancel-cascade.js +1 -1
- package/dist/commands/tasks/create-tree.d.ts +5 -1
- package/dist/commands/tasks/create-tree.js +35 -7
- package/dist/commands/tasks/interrupt.js +2 -2
- package/dist/commands/tasks/pause-schedule.js +1 -1
- package/dist/commands/token/list.d.ts +3 -5
- package/dist/commands/token/list.js +99 -57
- package/dist/commands/update.d.ts +14 -0
- package/dist/commands/update.js +61 -0
- package/dist/generated/managed-instruction-guides.json +9 -0
- package/dist/hooks/init.d.ts +5 -0
- package/dist/hooks/init.js +27 -0
- package/dist/lib/commitment-product.d.ts +0 -6
- package/dist/lib/commitment-product.js +1 -30
- package/dist/lib/commitments.d.ts +9 -53
- package/dist/lib/commitments.js +23 -146
- package/dist/lib/daemon-installer.d.ts +2 -0
- package/dist/lib/daemon-installer.js +100 -24
- package/dist/lib/first-party-harness-doctor.js +31 -1
- package/dist/lib/first-party-harness-remote-install.d.ts +71 -0
- package/dist/lib/first-party-harness-remote-install.js +310 -0
- package/dist/lib/first-party-harness-remote-update.d.ts +46 -0
- package/dist/lib/first-party-harness-remote-update.js +242 -0
- package/dist/lib/first-party-harness-startup-update.d.ts +26 -0
- package/dist/lib/first-party-harness-startup-update.js +166 -0
- package/dist/lib/first-party-harness-update.d.ts +46 -0
- package/dist/lib/first-party-harness-update.js +289 -0
- package/dist/lib/first-party-harness.js +7 -4
- package/dist/lib/managed-instruction-local.d.ts +12 -0
- package/dist/lib/managed-instruction-local.js +58 -0
- package/dist/lib/managed-instruction-setup.d.ts +35 -0
- package/dist/lib/managed-instruction-setup.js +306 -0
- package/dist/lib/memory-sync.d.ts +1 -0
- package/dist/lib/memory-sync.js +279 -68
- package/dist/lib/northstars.js +1 -1
- package/dist/lib/platform-update-local.d.ts +2 -0
- package/dist/lib/platform-update-local.js +113 -0
- package/dist/lib/platform-update.d.ts +39 -0
- package/dist/lib/platform-update.js +84 -0
- package/dist/lib/profile-machine-identity-guard.d.ts +2 -0
- package/dist/lib/profile-machine-identity-guard.js +13 -0
- package/dist/lib/prompt.d.ts +1 -0
- package/dist/lib/prompt.js +4 -3
- package/dist/lib/roles.d.ts +98 -0
- package/dist/lib/roles.js +45 -0
- package/dist/lib/task-batch.d.ts +9 -0
- package/dist/lib/task-batch.js +94 -17
- package/dist/lib/task-instruction-offer.d.ts +1 -4
- package/dist/lib/task-instruction-offer.js +3 -129
- package/dist/lib/update-check.d.ts +61 -53
- package/dist/lib/update-check.js +453 -314
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/commitmentExecutionContract.d.ts +45 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/commitmentExecutionContract.js +550 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessChannels.d.ts +3 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessChannels.js +3 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessReleaseKeys.d.ts +82 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessReleaseKeys.js +105 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessUpdater.d.ts +110 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessUpdater.js +945 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/harnessPermissionControls.d.ts +32 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/harnessPermissionControls.js +62 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +2 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +4 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/machineUuid.js +35 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/releasePolicy.d.ts +63 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/releasePolicy.js +169 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/releaseVersions.d.ts +2 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/releaseVersions.js +44 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.d.ts +7 -44
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.js +8 -47
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/commitmentExecutionContract.d.ts +45 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/commitmentExecutionContract.js +545 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessChannels.d.ts +3 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessChannels.js +3 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessReleaseKeys.d.ts +82 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessReleaseKeys.js +102 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessUpdater.d.ts +110 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessUpdater.js +923 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/harnessPermissionControls.d.ts +32 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/harnessPermissionControls.js +59 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +2 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +2 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/machineUuid.js +35 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/releasePolicy.d.ts +63 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/releasePolicy.js +163 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/releaseVersions.d.ts +2 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/releaseVersions.js +41 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.d.ts +7 -44
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.js +8 -47
- package/dist/node_modules/@skrr-ai/auth-core/package.json +41 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +7362 -7232
- package/dist/node_modules/@skrr-ai/data-provider/package.json +2 -2
- package/docs/v1/README.md +28 -0
- package/docs/v1/api.md +55 -0
- package/docs/v1/changelog.md +16 -0
- package/docs/v1/check-examples.mjs +178 -0
- package/docs/v1/examples/api-readonly.mjs +144 -0
- package/docs/v1/operations.md +87 -0
- package/docs/v1/quickstart.md +71 -0
- package/oclif.manifest.json +46381 -45478
- package/package.json +16 -11
- package/dist/commands/commitments/autonomy.d.ts +0 -30
- package/dist/commands/commitments/autonomy.js +0 -67
- package/dist/commands/commitments/mode.js +0 -58
- package/dist/commands/commitments/pack/promote.d.ts +0 -19
- package/dist/commands/commitments/pack/promote.js +0 -46
- package/dist/commands/commitments/pack/shadow.d.ts +0 -20
- package/dist/commands/commitments/pack/shadow.js +0 -42
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_command_1 = require("../../../base-command");
|
|
5
|
+
const roles_1 = require("../../../lib/roles");
|
|
6
|
+
class RolesInstall extends base_command_1.BaseCommand {
|
|
7
|
+
static description = 'Install or reconcile a reviewed role preview as inactive existing objects; never attach credentials or activate work';
|
|
8
|
+
static args = {
|
|
9
|
+
id: core_1.Args.string({ required: true, description: 'Agent ID', ignoreStdin: true }),
|
|
10
|
+
};
|
|
11
|
+
static flags = {
|
|
12
|
+
preview: core_1.Flags.string({
|
|
13
|
+
required: true,
|
|
14
|
+
description: 'Server-generated preview JSON saved by agents roles preview',
|
|
15
|
+
}),
|
|
16
|
+
json: core_1.Flags.boolean({ description: 'Output the installation receipt as JSON' }),
|
|
17
|
+
};
|
|
18
|
+
async run() {
|
|
19
|
+
this.requireAuth();
|
|
20
|
+
const { args, flags } = await this.parse(RolesInstall);
|
|
21
|
+
try {
|
|
22
|
+
const preview = (0, roles_1.readRoleJson)(flags.preview);
|
|
23
|
+
(0, roles_1.assertRolePreview)(preview);
|
|
24
|
+
const receipt = await roles_1.roleApi.install(args.id, preview);
|
|
25
|
+
if (flags.json)
|
|
26
|
+
this.log(JSON.stringify(receipt, null, 2));
|
|
27
|
+
else {
|
|
28
|
+
this.log(receipt.complete ? 'Role installed inactive.' : 'Role installation partially saved.');
|
|
29
|
+
for (const item of receipt.results)
|
|
30
|
+
this.log(` ${item.key || item.id || 'receipt'}: ${item.status}${item.code ? ` (${item.code})` : ''}`);
|
|
31
|
+
this.log('Review and activate the Compass, attach required skills and evidence sources, then activate responsibilities through commitments resume.');
|
|
32
|
+
this.log(`Inspect the joined state: agents operating-plan ${args.id}`);
|
|
33
|
+
}
|
|
34
|
+
if (!receipt.complete)
|
|
35
|
+
this.failWithCliError({
|
|
36
|
+
code: 'ROLE_INSTALL_INCOMPLETE',
|
|
37
|
+
message: 'Some role objects were saved but installation is incomplete. Refresh the preview and reconcile the same revision.',
|
|
38
|
+
retryable: true,
|
|
39
|
+
exit: 1,
|
|
40
|
+
details: receipt,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
this.handleApiError(error);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.default = RolesInstall;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class RolesList extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
};
|
|
10
|
+
run(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_command_1 = require("../../../base-command");
|
|
5
|
+
const roles_1 = require("../../../lib/roles");
|
|
6
|
+
class RolesList extends base_command_1.BaseCommand {
|
|
7
|
+
static description = 'List installed role specifications and their Compass lifecycle';
|
|
8
|
+
static args = {
|
|
9
|
+
id: core_1.Args.string({ required: true, description: 'Agent ID', ignoreStdin: true }),
|
|
10
|
+
};
|
|
11
|
+
static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
|
|
12
|
+
async run() {
|
|
13
|
+
this.requireAuth();
|
|
14
|
+
const { args, flags } = await this.parse(RolesList);
|
|
15
|
+
try {
|
|
16
|
+
const result = await roles_1.roleApi.list(args.id);
|
|
17
|
+
if (flags.json) {
|
|
18
|
+
this.log(JSON.stringify(result, null, 2));
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
for (const role of result.roles)
|
|
22
|
+
this.log(`${role.spec.key}: ${role.spec.title} · revision ${role.spec.revision} · ${role.status} · Compass ${role.compassStatus} v${role.compassVersion}`);
|
|
23
|
+
if (!result.roles.length)
|
|
24
|
+
this.log('No roles installed. Use agents roles example to start a portable configuration.');
|
|
25
|
+
if (result.skillInventory) {
|
|
26
|
+
this.log(`Attached Skill inventory: ${result.skillInventory.status}`);
|
|
27
|
+
for (const skill of result.skillInventory.skills)
|
|
28
|
+
this.log(` ${skill.name}: ${skill.id} · ${skill.versions.join(', ')}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
this.handleApiError(error);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.default = RolesList;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class RolesPreview extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
file: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
bindings: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
output: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const base_command_1 = require("../../../base-command");
|
|
6
|
+
const roles_1 = require("../../../lib/roles");
|
|
7
|
+
class RolesPreview extends base_command_1.BaseCommand {
|
|
8
|
+
static description = 'Validate a portable role spec and preview its Compass, responsibilities, scope, budgets and requirements';
|
|
9
|
+
static args = {
|
|
10
|
+
id: core_1.Args.string({ required: true, description: 'Agent ID', ignoreStdin: true }),
|
|
11
|
+
};
|
|
12
|
+
static flags = {
|
|
13
|
+
file: core_1.Flags.string({ required: true, description: 'Role operating spec JSON file' }),
|
|
14
|
+
bindings: core_1.Flags.string({ description: 'JSON context slot → accessible target ID map' }),
|
|
15
|
+
output: core_1.Flags.string({ description: 'Save the server preview for review and installation' }),
|
|
16
|
+
json: core_1.Flags.boolean({ description: 'Output the complete preview as JSON' }),
|
|
17
|
+
};
|
|
18
|
+
async run() {
|
|
19
|
+
this.requireAuth();
|
|
20
|
+
const { args, flags } = await this.parse(RolesPreview);
|
|
21
|
+
try {
|
|
22
|
+
const result = await roles_1.roleApi.preview(args.id, (0, roles_1.readRoleJson)(flags.file), flags.bindings ? (0, roles_1.readRoleJson)(flags.bindings) : {});
|
|
23
|
+
if (flags.output)
|
|
24
|
+
(0, node_fs_1.writeFileSync)(flags.output, `${JSON.stringify(result, null, 2)}\n`, { mode: 0o600 });
|
|
25
|
+
if (flags.json) {
|
|
26
|
+
this.log(JSON.stringify(result, null, 2));
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
this.log(`${result.spec.title} — revision ${result.spec.revision}`);
|
|
30
|
+
this.log(`Compass ${result.compass.id}: archived; expected version ${result.expectedCompassVersion}`);
|
|
31
|
+
for (const change of result.changes)
|
|
32
|
+
this.log(` ${change.title}: ${change.change}`);
|
|
33
|
+
for (const removed of result.removedResponsibilities)
|
|
34
|
+
this.log(` ${removed.key}: pause removed responsibility`);
|
|
35
|
+
for (const ctx of result.contexts)
|
|
36
|
+
this.log(` context ${ctx.label}: ${ctx.status}${ctx.title ? ` (${ctx.title})` : ''}`);
|
|
37
|
+
for (const requirement of result.pending.skills)
|
|
38
|
+
this.log(` skill requirement: ${requirement.id}@${requirement.version}`);
|
|
39
|
+
for (const warning of result.warnings)
|
|
40
|
+
this.log(warning);
|
|
41
|
+
if (flags.output)
|
|
42
|
+
this.log(`Reviewed preview saved to ${flags.output}. Install with agents roles install ${args.id} --preview ${flags.output}.`);
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
this.handleApiError(error);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.default = RolesPreview;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class RolesWithdraw extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
key: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
'expected-version': import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_command_1 = require("../../../base-command");
|
|
5
|
+
const roles_1 = require("../../../lib/roles");
|
|
6
|
+
class RolesWithdraw extends base_command_1.BaseCommand {
|
|
7
|
+
static description = 'Pause installed responsibilities and archive their Compass, preserving work and history';
|
|
8
|
+
static args = {
|
|
9
|
+
id: core_1.Args.string({ required: true, description: 'Agent ID', ignoreStdin: true }),
|
|
10
|
+
key: core_1.Args.string({ required: true, description: 'Role key', ignoreStdin: true }),
|
|
11
|
+
};
|
|
12
|
+
static flags = {
|
|
13
|
+
'expected-version': core_1.Flags.integer({
|
|
14
|
+
required: true,
|
|
15
|
+
description: 'Compass version from agents roles list',
|
|
16
|
+
}),
|
|
17
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
18
|
+
};
|
|
19
|
+
async run() {
|
|
20
|
+
this.requireAuth();
|
|
21
|
+
const { args, flags } = await this.parse(RolesWithdraw);
|
|
22
|
+
try {
|
|
23
|
+
const receipt = await roles_1.roleApi.withdraw(args.id, args.key, flags['expected-version']);
|
|
24
|
+
this.log(flags.json
|
|
25
|
+
? JSON.stringify(receipt, null, 2)
|
|
26
|
+
: receipt.complete
|
|
27
|
+
? 'Role paused; Compass archived. Existing work and memory retained.'
|
|
28
|
+
: 'Role partially paused. Refresh and retry to reconcile remaining responsibilities.');
|
|
29
|
+
if (!receipt.complete)
|
|
30
|
+
this.failWithCliError({
|
|
31
|
+
code: 'ROLE_WITHDRAW_INCOMPLETE',
|
|
32
|
+
message: 'Withdrawal is incomplete; inspect and retry.',
|
|
33
|
+
retryable: true,
|
|
34
|
+
exit: 1,
|
|
35
|
+
details: receipt,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
this.handleApiError(error);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.default = RolesWithdraw;
|
|
@@ -16,6 +16,7 @@ export default class CodeDoctor extends Command {
|
|
|
16
16
|
static examples: string[];
|
|
17
17
|
static flags: {
|
|
18
18
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
check: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
20
|
};
|
|
20
21
|
run(): Promise<void>;
|
|
21
22
|
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
4
|
const auth_core_1 = require("@skrr-ai/auth-core");
|
|
5
5
|
const first_party_harness_doctor_1 = require("../../lib/first-party-harness-doctor");
|
|
6
|
+
const first_party_harness_update_1 = require("../../lib/first-party-harness-update");
|
|
6
7
|
/**
|
|
7
8
|
* `skrr code doctor` — diagnose the local first-party harness installation.
|
|
8
9
|
*
|
|
@@ -23,9 +24,14 @@ class CodeDoctor extends core_1.Command {
|
|
|
23
24
|
];
|
|
24
25
|
static flags = {
|
|
25
26
|
json: core_1.Flags.boolean({ description: 'Emit the report as JSON' }),
|
|
27
|
+
check: core_1.Flags.boolean({
|
|
28
|
+
description: 'Also check the signed release channel (the default diagnosis is offline)',
|
|
29
|
+
}),
|
|
26
30
|
};
|
|
27
31
|
async run() {
|
|
28
32
|
const { flags } = await this.parse(CodeDoctor);
|
|
33
|
+
if (flags.check)
|
|
34
|
+
await (0, first_party_harness_update_1.checkLocalCodeUpdate)({ force: true });
|
|
29
35
|
const report = (0, first_party_harness_doctor_1.runDoctor)();
|
|
30
36
|
if (flags.json) {
|
|
31
37
|
this.logJson(report);
|
|
@@ -5,6 +5,7 @@ const core_1 = require("@oclif/core");
|
|
|
5
5
|
const auth_core_1 = require("@skrr-ai/auth-core");
|
|
6
6
|
const first_party_harness_1 = require("../../lib/first-party-harness");
|
|
7
7
|
const first_party_harness_broker_1 = require("../../lib/first-party-harness-broker");
|
|
8
|
+
const first_party_harness_startup_update_1 = require("../../lib/first-party-harness-startup-update");
|
|
8
9
|
const first_party_harness_managed_1 = require("../../lib/first-party-harness-managed");
|
|
9
10
|
const first_party_harness_project_trust_1 = require("../../lib/first-party-harness-project-trust");
|
|
10
11
|
/**
|
|
@@ -93,6 +94,9 @@ async function forwardToEngine(cmd, subcommand, passthrough, options = {}) {
|
|
|
93
94
|
// output on stdout, and one friendly sentence in the middle of it is a parse
|
|
94
95
|
// error at the other end.
|
|
95
96
|
const say = (line) => cmd.logToStderr(line);
|
|
97
|
+
if (subcommand === null && options.projectPolicy === 'tui') {
|
|
98
|
+
await (0, first_party_harness_startup_update_1.maybeOfferCodeUpdate)({ argv: engineArgv, say });
|
|
99
|
+
}
|
|
96
100
|
if (agentRef && !options.managed) {
|
|
97
101
|
say(`${first_party_harness_managed_1.SKRR_AGENT_FLAG} has no effect here — this command does not host a managed ` +
|
|
98
102
|
'session. It was removed from the arguments passed to the engine.');
|
|
@@ -1,71 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
* ── Why this command exists ────────────────────────────────────────────────
|
|
6
|
-
*
|
|
7
|
-
* `skrr code`'s not-installed message offered exactly two routes and neither
|
|
8
|
-
* worked without a browser: "In the web app: the runtime menu … → Install", or
|
|
9
|
-
* point the engine-path override at a build you already have — which is the thing
|
|
10
|
-
* you are trying to obtain, and the route that gives up provenance. So the
|
|
11
|
-
* ordinary case for a coding harness (a dev box over SSH, a CI runner, a cloud
|
|
12
|
-
* VM) had no way in (dogfood OSK-276).
|
|
13
|
-
*
|
|
14
|
-
* Nothing underneath was missing. The daemon has performed the verified install
|
|
15
|
-
* since 2026-08-08, and `POST /api/daemons/:id/cli-installers/:provider/install`
|
|
16
|
-
* has fronted it since June. The install was API-exposed and CLI-unreachable —
|
|
17
|
-
* the shape the root `CLAUDE.md` names under CLI ↔ API parity: "an endpoint the
|
|
18
|
-
* API exposes must be reachable from `skrr`."
|
|
19
|
-
*
|
|
20
|
-
* So this adds a SURFACE and no mechanism. Same route the web app posts, same
|
|
21
|
-
* daemon job, same signature verification. A second install path would be a
|
|
22
|
-
* second thing to keep in step with the first, and the first is the one that
|
|
23
|
-
* verifies the signed manifest.
|
|
24
|
-
*/
|
|
25
|
-
export default class CodeInstall extends BaseCommand {
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
/** Install through the shared signed pipeline without a cloud login or local daemon. */
|
|
3
|
+
export default class CodeInstall extends Command {
|
|
26
4
|
static description: string;
|
|
27
5
|
static examples: string[];
|
|
28
6
|
static flags: {
|
|
29
7
|
daemon: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
30
8
|
wait: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
31
9
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
'target-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'allow-downgrade': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
32
12
|
};
|
|
33
13
|
run(): Promise<void>;
|
|
34
|
-
/** Which daemon the install targets, by the rule every daemon-picking command shares. */
|
|
35
|
-
private resolveTarget;
|
|
36
|
-
/**
|
|
37
|
-
* The daemon id to install through, or the refusal.
|
|
38
|
-
*
|
|
39
|
-
* Refuses rather than guessing when several are active. Picking one would mean
|
|
40
|
-
* installing a hundred megabytes onto a machine the user was not thinking
|
|
41
|
-
* about. The candidates are CONNECTED daemons by the id the installer routes
|
|
42
|
-
* take (`listConnectedDaemons`), so the error names values that work — the
|
|
43
|
-
* Daemon resource list `skrr list-daemons` prints is a different id space
|
|
44
|
-
* (OSK-9993).
|
|
45
|
-
*
|
|
46
|
-
* A Dedicated Runtime's own machine is refused here, before any request. The
|
|
47
|
-
* daemon and the API refuse it too; saying so locally is what keeps the answer
|
|
48
|
-
* the same whether or not this machine's daemon is reachable, and whether or
|
|
49
|
-
* not it has published its id. Another of the owner's machines, named with
|
|
50
|
-
* `--daemon`, is not this machine and goes to the API like anywhere else.
|
|
51
|
-
*/
|
|
52
|
-
private installTarget;
|
|
53
|
-
/**
|
|
54
|
-
* What the daemon says about this provider, when it started no job.
|
|
55
|
-
*
|
|
56
|
-
* Read from the SAME list route the web app uses, so the CLI reports the
|
|
57
|
-
* daemon's own words rather than inventing an explanation for silence. Best
|
|
58
|
-
* effort: a failure here means falling back to the honest "does not say why",
|
|
59
|
-
* never to a guess.
|
|
60
|
-
*/
|
|
61
|
-
private installerNote;
|
|
62
|
-
/**
|
|
63
|
-
* Poll the job until it settles, printing each new log line.
|
|
64
|
-
*
|
|
65
|
-
* The daemon already writes a progress log — "Fetching the signed release
|
|
66
|
-
* manifest", "Verified and installed …" — and it is the only account
|
|
67
|
-
* of a hundred-megabyte download the user is waiting on. Printing only the
|
|
68
|
-
* lines not yet seen keeps a poll loop from repeating the whole log.
|
|
69
|
-
*/
|
|
70
|
-
private followJob;
|
|
71
14
|
}
|