@skrr-ai/cli 0.1.93 → 0.1.94

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.
Files changed (60) hide show
  1. package/dist/commands/agents/operating-plan.d.ts +11 -0
  2. package/dist/commands/agents/operating-plan.js +54 -0
  3. package/dist/commands/agents/roles/example.d.ts +11 -0
  4. package/dist/commands/agents/roles/example.js +30 -0
  5. package/dist/commands/{commitments/mode.d.ts → agents/roles/export.d.ts} +5 -5
  6. package/dist/commands/agents/roles/export.js +81 -0
  7. package/dist/commands/agents/roles/install.d.ts +12 -0
  8. package/dist/commands/agents/roles/install.js +48 -0
  9. package/dist/commands/agents/roles/list.d.ts +11 -0
  10. package/dist/commands/agents/roles/list.js +36 -0
  11. package/dist/commands/agents/roles/preview.d.ts +14 -0
  12. package/dist/commands/agents/roles/preview.js +49 -0
  13. package/dist/commands/agents/roles/withdraw.d.ts +13 -0
  14. package/dist/commands/agents/roles/withdraw.js +43 -0
  15. package/dist/commands/commitments/{autonomy-requests → cadence-requests}/decide.d.ts +5 -7
  16. package/dist/commands/commitments/{autonomy-requests → cadence-requests}/decide.js +13 -15
  17. package/dist/commands/commitments/cost.d.ts +1 -1
  18. package/dist/commands/commitments/cost.js +1 -1
  19. package/dist/commands/commitments/create.d.ts +0 -7
  20. package/dist/commands/commitments/create.js +9 -98
  21. package/dist/commands/commitments/delivery.js +3 -21
  22. package/dist/commands/commitments/doctor.js +28 -27
  23. package/dist/commands/commitments/effective-policy.js +5 -36
  24. package/dist/commands/commitments/evaluations.d.ts +15 -0
  25. package/dist/commands/commitments/evaluations.js +54 -0
  26. package/dist/commands/commitments/pack/activate.d.ts +11 -0
  27. package/dist/commands/commitments/pack/activate.js +22 -0
  28. package/dist/commands/commitments/pack/bind.js +1 -1
  29. package/dist/commands/commitments/remediate.js +2 -5
  30. package/dist/commands/commitments/show.js +1 -1
  31. package/dist/commands/commitments/update.js +9 -9
  32. package/dist/commands/commitments/wake-capabilities.d.ts +1 -3
  33. package/dist/commands/commitments/wake-capabilities.js +5 -21
  34. package/dist/lib/commitment-product.d.ts +0 -6
  35. package/dist/lib/commitment-product.js +1 -30
  36. package/dist/lib/commitments.d.ts +9 -45
  37. package/dist/lib/commitments.js +24 -95
  38. package/dist/lib/northstars.js +1 -1
  39. package/dist/lib/roles.d.ts +98 -0
  40. package/dist/lib/roles.js +45 -0
  41. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/commitmentExecutionContract.d.ts +45 -0
  42. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/commitmentExecutionContract.js +550 -0
  43. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.d.ts +7 -44
  44. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.js +8 -47
  45. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/commitmentExecutionContract.d.ts +45 -0
  46. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/commitmentExecutionContract.js +545 -0
  47. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.d.ts +7 -44
  48. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.js +8 -47
  49. package/dist/node_modules/@skrr-ai/auth-core/package.json +11 -1
  50. package/dist/node_modules/@skrr-ai/data-provider/index.js +7316 -7203
  51. package/dist/node_modules/@skrr-ai/data-provider/package.json +2 -2
  52. package/oclif.manifest.json +22528 -22170
  53. package/package.json +5 -2
  54. package/dist/commands/commitments/autonomy.d.ts +0 -30
  55. package/dist/commands/commitments/autonomy.js +0 -67
  56. package/dist/commands/commitments/mode.js +0 -58
  57. package/dist/commands/commitments/pack/promote.d.ts +0 -19
  58. package/dist/commands/commitments/pack/promote.js +0 -46
  59. package/dist/commands/commitments/pack/shadow.d.ts +0 -20
  60. 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.93",
3
+ "version": "0.1.94",
4
4
  "description": "Command-line interface for skrr",
5
5
  "license": "ISC",
6
6
  "author": "skrr",
@@ -51,7 +51,7 @@
51
51
  "@oclif/core": "^4.0.0",
52
52
  "@oclif/plugin-autocomplete": "^3.2.56",
53
53
  "@oclif/plugin-warn-if-update-available": "^3.1.0",
54
- "@skrr-ai/auth-core": "^0.4.15",
54
+ "@skrr-ai/auth-core": "^0.4.18",
55
55
  "proper-lockfile": "^4.1.2",
56
56
  "qrcode-terminal": "^0.12.0",
57
57
  "socket.io-client": "^4.8.3",
@@ -114,6 +114,9 @@
114
114
  "agents:scene-background": {
115
115
  "description": "An agent's 3D backdrop: upload an image for it (presets are set with --scene-background)"
116
116
  },
117
+ "agents:roles": {
118
+ "description": "Preview, install, export, and withdraw portable agent role specifications"
119
+ },
117
120
  "agents:channels": {
118
121
  "description": "Connect, inspect, test, and disconnect agent channels"
119
122
  },
@@ -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;