@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skrr-ai/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.95",
|
|
4
4
|
"description": "Command-line interface for skrr",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "skrr",
|
|
@@ -26,8 +26,10 @@
|
|
|
26
26
|
"main": "dist/index.js",
|
|
27
27
|
"files": [
|
|
28
28
|
"bin",
|
|
29
|
+
"docs/v1/**",
|
|
29
30
|
"dist/**/*.js",
|
|
30
31
|
"dist/**/*.d.ts",
|
|
32
|
+
"dist/generated/managed-instruction-guides.json",
|
|
31
33
|
"!dist/**/*.test.js",
|
|
32
34
|
"!dist/**/*.test.d.ts",
|
|
33
35
|
"!dist/**/*.spec.js",
|
|
@@ -40,18 +42,20 @@
|
|
|
40
42
|
"build": "node ../scripts/with-build-lock.js npm run build:locked",
|
|
41
43
|
"build:locked": "npm run build:siblings && npm run build:compile",
|
|
42
44
|
"build:siblings": "cd .. && bash scripts/worktree-link-node-modules.sh && npm run build:auth-core && npm run build:inference-broker && npm run build:data-provider:only && npm run build:avatar-schemas && npm run build:data-schemas:only",
|
|
43
|
-
"build:compile": "rimraf dist && tsc -p tsconfig.build.json && node scripts/write-command-build-manifest.cjs && node scripts/vendor-monorepo-deps.js && cross-env OCLIF_SKIP_NEW_VERSION_CHECK=1 node ./node_modules/oclif/bin/run.js manifest && npm run verify:thread-cli",
|
|
45
|
+
"build:compile": "node scripts/generate-instruction-guides.cjs && rimraf dist && tsc -p tsconfig.build.json && node scripts/write-command-build-manifest.cjs && node scripts/vendor-monorepo-deps.js && cross-env OCLIF_SKIP_NEW_VERSION_CHECK=1 node ./node_modules/oclif/bin/run.js manifest && node scripts/canonicalize-oclif-manifest.cjs && npm run verify:thread-cli",
|
|
46
|
+
"check:instruction-guides": "node scripts/generate-instruction-guides.cjs --check",
|
|
44
47
|
"verify:thread-cli": "node scripts/verify-thread-commands.cjs",
|
|
48
|
+
"verify:install-contract": "node scripts/verify-install-contract.cjs",
|
|
45
49
|
"test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --max-old-space-size=4096\" jest --ci",
|
|
46
50
|
"watch": "tsc -w -p tsconfig.build.json",
|
|
47
51
|
"clean": "rimraf dist",
|
|
48
|
-
"prepack": "npm run build && cross-env OCLIF_SKIP_NEW_VERSION_CHECK=1 node ./node_modules/oclif/bin/run.js manifest"
|
|
52
|
+
"prepack": "npm run build && cross-env OCLIF_SKIP_NEW_VERSION_CHECK=1 node ./node_modules/oclif/bin/run.js manifest && node scripts/canonicalize-oclif-manifest.cjs"
|
|
49
53
|
},
|
|
50
54
|
"dependencies": {
|
|
51
55
|
"@oclif/core": "^4.0.0",
|
|
52
56
|
"@oclif/plugin-autocomplete": "^3.2.56",
|
|
53
57
|
"@oclif/plugin-warn-if-update-available": "^3.1.0",
|
|
54
|
-
"@skrr-ai/auth-core": "^0.4.
|
|
58
|
+
"@skrr-ai/auth-core": "^0.4.20",
|
|
55
59
|
"proper-lockfile": "^4.1.2",
|
|
56
60
|
"qrcode-terminal": "^0.12.0",
|
|
57
61
|
"socket.io-client": "^4.8.3",
|
|
@@ -74,18 +78,13 @@
|
|
|
74
78
|
"dirname": "skrr",
|
|
75
79
|
"commands": "./dist/commands",
|
|
76
80
|
"hooks": {
|
|
81
|
+
"init": "./dist/hooks/init",
|
|
77
82
|
"command_not_found": "./dist/hooks/command-not-found"
|
|
78
83
|
},
|
|
79
84
|
"topicSeparator": " ",
|
|
80
85
|
"plugins": [
|
|
81
|
-
"@oclif/plugin-autocomplete"
|
|
82
|
-
"@oclif/plugin-warn-if-update-available"
|
|
86
|
+
"@oclif/plugin-autocomplete"
|
|
83
87
|
],
|
|
84
|
-
"warn-if-update-available": {
|
|
85
|
-
"timeoutInDays": 14,
|
|
86
|
-
"registry": "https://registry.npmjs.org",
|
|
87
|
-
"message": "<%= config.name %> <%= config.version %> is out of date — <%= latest %> is available. Run `npm update -g @skrr-ai/cli` (or update the skrr app)."
|
|
88
|
-
},
|
|
89
88
|
"topics": {
|
|
90
89
|
"convos": {
|
|
91
90
|
"description": "Manage conversations"
|
|
@@ -114,6 +113,9 @@
|
|
|
114
113
|
"agents:scene-background": {
|
|
115
114
|
"description": "An agent's 3D backdrop: upload an image for it (presets are set with --scene-background)"
|
|
116
115
|
},
|
|
116
|
+
"agents:roles": {
|
|
117
|
+
"description": "Preview, install, export, and withdraw portable agent role specifications"
|
|
118
|
+
},
|
|
117
119
|
"agents:channels": {
|
|
118
120
|
"description": "Connect, inspect, test, and disconnect agent channels"
|
|
119
121
|
},
|
|
@@ -450,6 +452,9 @@
|
|
|
450
452
|
"tokens": {
|
|
451
453
|
"description": "Create, list and revoke personal access tokens (osk_pat_*) — the expiring, revocable credential CI uses as SKRR_TOKEN"
|
|
452
454
|
},
|
|
455
|
+
"security": {
|
|
456
|
+
"description": "Review your account's sign-ins, sessions, and access tokens"
|
|
457
|
+
},
|
|
453
458
|
"integrations": {
|
|
454
459
|
"description": "Invoke integration tools and manage toolkit connections for an agent"
|
|
455
460
|
},
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { BaseCommand } from '../../base-command';
|
|
2
|
-
/**
|
|
3
|
-
* `skrr commitments autonomy <id> --mode <mode>` — grant or withdraw how much the
|
|
4
|
-
* commitment may do on its own.
|
|
5
|
-
*
|
|
6
|
-
* The one public autonomy axis:
|
|
7
|
-
* monitor — observe and report; never execute external work
|
|
8
|
-
* prepare — reason and freeze a plan for approval
|
|
9
|
-
* execute — act within the explicit execution policy
|
|
10
|
-
*
|
|
11
|
-
* Use this rather than `commitments update`: the API replaces `policy` wholesale,
|
|
12
|
-
* whereas this endpoint merges the change into the existing policy.
|
|
13
|
-
*
|
|
14
|
-
* The merge is field-by-field over the policy fields the Commitment Store owns;
|
|
15
|
-
* report destinations remain the separate `reports[]` contract.
|
|
16
|
-
*/
|
|
17
|
-
export default class CommitmentsAutonomy extends BaseCommand {
|
|
18
|
-
static hidden: boolean;
|
|
19
|
-
static description: string;
|
|
20
|
-
static examples: string[];
|
|
21
|
-
static args: {
|
|
22
|
-
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
23
|
-
};
|
|
24
|
-
static flags: {
|
|
25
|
-
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
26
|
-
mode: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
27
|
-
reason: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
28
|
-
};
|
|
29
|
-
run(): Promise<void>;
|
|
30
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
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 web_url_1 = require("../../lib/web-url");
|
|
6
|
-
const commitments_1 = require("../../lib/commitments");
|
|
7
|
-
/**
|
|
8
|
-
* `skrr commitments autonomy <id> --mode <mode>` — grant or withdraw how much the
|
|
9
|
-
* commitment may do on its own.
|
|
10
|
-
*
|
|
11
|
-
* The one public autonomy axis:
|
|
12
|
-
* monitor — observe and report; never execute external work
|
|
13
|
-
* prepare — reason and freeze a plan for approval
|
|
14
|
-
* execute — act within the explicit execution policy
|
|
15
|
-
*
|
|
16
|
-
* Use this rather than `commitments update`: the API replaces `policy` wholesale,
|
|
17
|
-
* whereas this endpoint merges the change into the existing policy.
|
|
18
|
-
*
|
|
19
|
-
* The merge is field-by-field over the policy fields the Commitment Store owns;
|
|
20
|
-
* report destinations remain the separate `reports[]` contract.
|
|
21
|
-
*/
|
|
22
|
-
class CommitmentsAutonomy extends base_command_1.BaseCommand {
|
|
23
|
-
// Kept callable for existing scripts, but omitted from command discovery so
|
|
24
|
-
// new users see one product vocabulary: Monitor, Prepare, Execute.
|
|
25
|
-
static hidden = true;
|
|
26
|
-
static description = "Set a commitment's autonomy mode (how much it may act unattended)";
|
|
27
|
-
static examples = [
|
|
28
|
-
'<%= config.bin %> commitments mode <commitment-id> prepare',
|
|
29
|
-
'<%= config.bin %> commitments mode <commitment-id> execute',
|
|
30
|
-
];
|
|
31
|
-
static args = {
|
|
32
|
-
id: core_1.Args.string({ description: 'Commitment ID', required: true, ignoreStdin: true }),
|
|
33
|
-
};
|
|
34
|
-
static flags = {
|
|
35
|
-
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
36
|
-
mode: core_1.Flags.string({
|
|
37
|
-
description: 'Compatibility command. Prefer commitments mode <id> monitor|prepare|execute; use commitments pause to stop wakes.',
|
|
38
|
-
options: [...commitments_1.COMMITMENT_AUTHORABLE_AUTONOMY_MODES],
|
|
39
|
-
required: true,
|
|
40
|
-
}),
|
|
41
|
-
reason: core_1.Flags.string({
|
|
42
|
-
description: 'Why the change — recorded on the contract-change ledger',
|
|
43
|
-
}),
|
|
44
|
-
};
|
|
45
|
-
async run() {
|
|
46
|
-
this.requireAuth();
|
|
47
|
-
const { args, flags } = await this.parse(CommitmentsAutonomy);
|
|
48
|
-
let commitment;
|
|
49
|
-
const storedMode = (0, commitments_1.storedAutonomyModeForAuthoring)(flags.mode);
|
|
50
|
-
try {
|
|
51
|
-
commitment = await commitments_1.commitmentApi.autonomy(args.id, {
|
|
52
|
-
autonomyMode: storedMode,
|
|
53
|
-
...(flags.reason ? { reason: flags.reason } : {}),
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
catch (err) {
|
|
57
|
-
this.handleApiError(err);
|
|
58
|
-
}
|
|
59
|
-
if (flags.json) {
|
|
60
|
-
this.log(JSON.stringify((0, web_url_1.withCommitmentUrl)(this.cliConfig.baseURL, commitment), null, 2));
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
this.log('Compatibility command accepted. Use commitments mode <id> monitor|prepare|execute for new workflows.');
|
|
64
|
-
(0, commitments_1.renderCommitmentSummary)(commitment, (line) => this.log(line));
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
exports.default = CommitmentsAutonomy;
|
|
@@ -1,58 +0,0 @@
|
|
|
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 commitments_1 = require("../../lib/commitments");
|
|
6
|
-
const commitment_product_1 = require("../../lib/commitment-product");
|
|
7
|
-
const web_url_1 = require("../../lib/web-url");
|
|
8
|
-
class CommitmentsMode extends base_command_1.BaseCommand {
|
|
9
|
-
static description = 'Choose how a commitment progresses: Monitor, Prepare, or Execute';
|
|
10
|
-
static examples = ['<%= config.bin %> commitments mode <id> execute'];
|
|
11
|
-
static args = {
|
|
12
|
-
id: core_1.Args.string({ required: true, ignoreStdin: true }),
|
|
13
|
-
mode: core_1.Args.string({
|
|
14
|
-
required: true,
|
|
15
|
-
ignoreStdin: true,
|
|
16
|
-
options: [...commitment_product_1.COMMITMENT_PRODUCT_MODES],
|
|
17
|
-
}),
|
|
18
|
-
};
|
|
19
|
-
static flags = {
|
|
20
|
-
json: core_1.Flags.boolean({ description: 'Output the complete contract as JSON' }),
|
|
21
|
-
verbose: core_1.Flags.boolean({ description: 'Include compatibility values' }),
|
|
22
|
-
reason: core_1.Flags.string({ description: 'Reason recorded with this contract change' }),
|
|
23
|
-
};
|
|
24
|
-
async run() {
|
|
25
|
-
this.requireAuth();
|
|
26
|
-
const { args, flags } = await this.parse(CommitmentsMode);
|
|
27
|
-
try {
|
|
28
|
-
if (args.mode === 'off') {
|
|
29
|
-
this.error('Use commitments pause <id> to stop wakes; lifecycle is separate from mode.');
|
|
30
|
-
}
|
|
31
|
-
const result = await commitments_1.commitmentApi.mode(args.id, {
|
|
32
|
-
mode: (0, commitment_product_1.productMode)(args.mode),
|
|
33
|
-
...(flags.reason ? { reason: flags.reason } : {}),
|
|
34
|
-
});
|
|
35
|
-
const linked = (0, web_url_1.withCommitmentUrl)(this.cliConfig.baseURL, result);
|
|
36
|
-
if (flags.json)
|
|
37
|
-
return this.log(JSON.stringify(linked, null, 2));
|
|
38
|
-
const stagingForPromotion = result.pack?.phase === 'shadow';
|
|
39
|
-
this.log(stagingForPromotion
|
|
40
|
-
? `Promotion mode staged as ${(0, commitment_product_1.productModeLabel)(args.mode)}.`
|
|
41
|
-
: `Mode set to ${(0, commitment_product_1.productModeLabel)(args.mode)}.`);
|
|
42
|
-
if (stagingForPromotion) {
|
|
43
|
-
this.log('Live Pack Shadow remains Monitor until explicit promotion.');
|
|
44
|
-
}
|
|
45
|
-
if ((0, commitment_product_1.productMode)(args.mode) === 'monitor') {
|
|
46
|
-
this.log(`${stagingForPromotion ? 'Promotion delivery' : 'Delivery'} set to Report only. Monitor cannot create patches, branches, or pull requests.`);
|
|
47
|
-
}
|
|
48
|
-
(0, commitments_1.renderCommitmentSummary)(result, (line) => this.log(line));
|
|
49
|
-
if (flags.verbose)
|
|
50
|
-
this.log(`Compatibility value: ${result.policy?.autonomyMode}`);
|
|
51
|
-
this.log(`URL: ${linked.url}`);
|
|
52
|
-
}
|
|
53
|
-
catch (error) {
|
|
54
|
-
this.handleApiError(error);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.default = CommitmentsMode;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { BaseCommand } from '../../../base-command';
|
|
2
|
-
/**
|
|
3
|
-
* Graduate a Pack out of shadow and restore the saved Mode and delivery.
|
|
4
|
-
*
|
|
5
|
-
* Explicit by design — promotion is never inferred from a passing preflight.
|
|
6
|
-
* The saved policy tracks explicit policy writes made DURING shadow, so an
|
|
7
|
-
* autonomy change made while observing is not discarded here.
|
|
8
|
-
*/
|
|
9
|
-
export default class CommitmentsPackPromote extends BaseCommand {
|
|
10
|
-
static description: string;
|
|
11
|
-
static examples: string[];
|
|
12
|
-
static args: {
|
|
13
|
-
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
14
|
-
};
|
|
15
|
-
static flags: {
|
|
16
|
-
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
|
-
};
|
|
18
|
-
run(): Promise<void>;
|
|
19
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
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 commitments_1 = require("../../../lib/commitments");
|
|
6
|
-
const commitment_product_1 = require("../../../lib/commitment-product");
|
|
7
|
-
/**
|
|
8
|
-
* Graduate a Pack out of shadow and restore the saved Mode and delivery.
|
|
9
|
-
*
|
|
10
|
-
* Explicit by design — promotion is never inferred from a passing preflight.
|
|
11
|
-
* The saved policy tracks explicit policy writes made DURING shadow, so an
|
|
12
|
-
* autonomy change made while observing is not discarded here.
|
|
13
|
-
*/
|
|
14
|
-
class CommitmentsPackPromote extends base_command_1.BaseCommand {
|
|
15
|
-
static description = 'Graduate a Pack out of shadow, restoring its staged Mode and delivery';
|
|
16
|
-
static examples = ['<%= config.bin %> commitments pack promote <commitment-id>'];
|
|
17
|
-
static args = {
|
|
18
|
-
id: core_1.Args.string({ description: 'Commitment ID', required: true, ignoreStdin: true }),
|
|
19
|
-
};
|
|
20
|
-
static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
|
|
21
|
-
async run() {
|
|
22
|
-
this.requireAuth();
|
|
23
|
-
const { args, flags } = await this.parse(CommitmentsPackPromote);
|
|
24
|
-
let result;
|
|
25
|
-
try {
|
|
26
|
-
result = await commitments_1.commitmentPackApi.promote(args.id);
|
|
27
|
-
}
|
|
28
|
-
catch (err) {
|
|
29
|
-
this.handleApiError(err);
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
if (flags.json) {
|
|
33
|
-
this.log(JSON.stringify(result, null, 2));
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
this.log(`Pack: ${result.pack?.id}@${result.pack?.version}`);
|
|
37
|
-
this.log(`Phase: ${result.phase}`);
|
|
38
|
-
const mode = result.commitment?.policy?.autonomyMode;
|
|
39
|
-
if (mode)
|
|
40
|
-
this.log(`Mode: ${(0, commitment_product_1.productModeLabel)(mode)}`);
|
|
41
|
-
if (result.commitment?.delivery?.mode) {
|
|
42
|
-
this.log(`Delivery: ${(0, commitment_product_1.deliveryLabel)(result.commitment.delivery.mode)}`);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.default = CommitmentsPackPromote;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { BaseCommand } from '../../../base-command';
|
|
2
|
-
export declare const SHADOW_ACTIVE_COPY = "Shadow is active in Monitor: checks continue, but delivery cannot run and live delivery stays\nReport only. The prior Mode and delivery are saved as the promotion target;\n`skrr commitments pack promote` applies them.";
|
|
3
|
-
/**
|
|
4
|
-
* Activate shadow: the Commitment goes active in Monitor and starts checking.
|
|
5
|
-
* Its prior Mode and delivery are saved as the target for `promote`.
|
|
6
|
-
*
|
|
7
|
-
* Requires a STORED preflight verdict of `ready`, which is why
|
|
8
|
-
* `pack preflight` exists as its own command.
|
|
9
|
-
*/
|
|
10
|
-
export default class CommitmentsPackShadow extends BaseCommand {
|
|
11
|
-
static description: string;
|
|
12
|
-
static examples: string[];
|
|
13
|
-
static args: {
|
|
14
|
-
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
15
|
-
};
|
|
16
|
-
static flags: {
|
|
17
|
-
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
|
-
};
|
|
19
|
-
run(): Promise<void>;
|
|
20
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SHADOW_ACTIVE_COPY = void 0;
|
|
4
|
-
const core_1 = require("@oclif/core");
|
|
5
|
-
const base_command_1 = require("../../../base-command");
|
|
6
|
-
const commitments_1 = require("../../../lib/commitments");
|
|
7
|
-
exports.SHADOW_ACTIVE_COPY = 'Shadow is active in Monitor: checks continue, but delivery cannot run and live delivery stays\nReport only. The prior Mode and delivery are saved as the promotion target;\n`skrr commitments pack promote` applies them.';
|
|
8
|
-
/**
|
|
9
|
-
* Activate shadow: the Commitment goes active in Monitor and starts checking.
|
|
10
|
-
* Its prior Mode and delivery are saved as the target for `promote`.
|
|
11
|
-
*
|
|
12
|
-
* Requires a STORED preflight verdict of `ready`, which is why
|
|
13
|
-
* `pack preflight` exists as its own command.
|
|
14
|
-
*/
|
|
15
|
-
class CommitmentsPackShadow extends base_command_1.BaseCommand {
|
|
16
|
-
static description = 'Activate shadow: run the Pack in Monitor while saving its Mode and delivery promotion target';
|
|
17
|
-
static examples = ['<%= config.bin %> commitments pack shadow <commitment-id>'];
|
|
18
|
-
static args = {
|
|
19
|
-
id: core_1.Args.string({ description: 'Commitment ID', required: true, ignoreStdin: true }),
|
|
20
|
-
};
|
|
21
|
-
static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
|
|
22
|
-
async run() {
|
|
23
|
-
this.requireAuth();
|
|
24
|
-
const { args, flags } = await this.parse(CommitmentsPackShadow);
|
|
25
|
-
let result;
|
|
26
|
-
try {
|
|
27
|
-
result = await commitments_1.commitmentPackApi.shadow(args.id);
|
|
28
|
-
}
|
|
29
|
-
catch (err) {
|
|
30
|
-
this.handleApiError(err);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (flags.json) {
|
|
34
|
-
this.log(JSON.stringify(result, null, 2));
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
this.log(`Pack: ${result.pack?.id}@${result.pack?.version}`);
|
|
38
|
-
this.log(`Phase: ${result.phase}`);
|
|
39
|
-
this.log(`\n${exports.SHADOW_ACTIVE_COPY}`);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.default = CommitmentsPackShadow;
|