@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
@@ -1,33 +1,5 @@
1
- /**
2
- * Session permission authority — the ONE rule that decides whether a session's
3
- * execution contract governs the run's permissions, shared by the server and
4
- * the daemon (OSK-11975 introduced it; it was implemented twice — the server
5
- * read `kind !== 'commitment'`, the daemon read the `permissionSource` marker —
6
- * which is exactly how a new contract kind or a new source value would drift
7
- * them apart).
8
- *
9
- * The wire model:
10
- *
11
- * - The contract is closed (`hasOnlyKeys` on the daemon), so "whose
12
- * permissions govern" can never ride INSIDE it. It is a top-level session
13
- * field: `permissionSource`.
14
- * - `'agent'` means the Agent's own configured permission mode, tool policy,
15
- * Grants, session env, MCP servers and machine consent govern the run,
16
- * exactly as for an unattended Task of the same Agent. Today only a
17
- * `commitment` contract may carry it.
18
- * - A `commitment` contract WITHOUT the marker (an older server mid-deploy)
19
- * still governs permissions — the marker is the version signal, so its
20
- * absence must keep the legacy fence, not silently lift it.
21
- * - `task_delivery` contracts always govern, marker or not.
22
- *
23
- * Server vs daemon asymmetry, on purpose: the server STAMPS the marker
24
- * (`permissionSourceForContract`), so on its own side the predicate reduces to
25
- * "a commitment never governs" — `contractGovernsPermissions(c,
26
- * permissionSourceForContract(c))` is exactly `kind !== 'commitment'`. The
27
- * daemon reads the marker it received, because it cannot distinguish "new
28
- * server, agent permissions" from "old server, contract fence" any other way.
29
- * Both call the same function; only the input differs.
30
- */
1
+ /** Commitment context never overrides Agent permissions. Version 3 admission
2
+ * rejects old contracts; typed Task delivery is a separate frozen operation. */
31
3
  /** The wire vocabulary for `permissionSource`. Top-level session field. */
32
4
  export declare const SESSION_PERMISSION_SOURCES: readonly ["agent"];
33
5
  export type SessionPermissionSource = (typeof SESSION_PERMISSION_SOURCES)[number];
@@ -37,7 +9,7 @@ export type SessionPermissionSource = (typeof SESSION_PERMISSION_SOURCES)[number
37
9
  * a daemon without it (`COMMITMENT_AGENT_PERMISSIONS_RUNTIME_UNSUPPORTED`), so
38
10
  * the marker never reaches a daemon that would ignore it.
39
11
  */
40
- export declare const COMMITMENT_AGENT_PERMISSIONS_CAPABILITY = "commitment_execution_contract_v2_agent_permissions";
12
+ export declare const COMMITMENT_AGENT_PERMISSIONS_CAPABILITY = "commitment_execution_contract_v3";
41
13
  /**
42
14
  * The minimal contract shape this rule reads. The predicate only ever needs
43
15
  * `kind` — keeping the input structural means this module never imports the
@@ -50,8 +22,7 @@ export type PermissionContractKind = {
50
22
  } | null | undefined;
51
23
  /**
52
24
  * Untrusted wire input: anything but an exact vocabulary literal reads as
53
- * absent. Never widen by coercion — an unrecognized future value must degrade
54
- * to "contract governs", the conservative answer.
25
+ * absent. An unknown marker carries no authority. Contract admission is validated separately.
55
26
  */
56
27
  export declare function normalizeSessionPermissionSource(value: unknown): SessionPermissionSource | undefined;
57
28
  /**
@@ -60,18 +31,10 @@ export declare function normalizeSessionPermissionSource(value: unknown): Sessio
60
31
  * kind keeps its own authority and stamps nothing.
61
32
  */
62
33
  export declare function permissionSourceForContract(contract: PermissionContractKind): SessionPermissionSource | undefined;
63
- /**
64
- * Whether the contract is the run's PERMISSION authority — the single place
65
- * this rule lives.
66
- *
67
- * True for a non-commitment contract regardless of marker, and for a
68
- * commitment whose server did not declare agent permissions. False for no
69
- * contract at all, and for a commitment carrying `permissionSource: 'agent'`,
70
- * which then follows the Agent's own permissions exactly as a Task does while
71
- * the contract keeps its non-permission roles (normalized shape, ephemeral
72
- * worktree, result validation, `GIT_OPTIONAL_LOCKS`, provider restriction).
34
+ /** Only typed Task delivery owns an effect-specific permission boundary.
35
+ * A Commitment is context for the Agent and cannot grant or restrict tools.
73
36
  */
74
- export declare function contractGovernsPermissions(contract: PermissionContractKind, permissionSource: unknown): boolean;
37
+ export declare function contractGovernsPermissions(contract: PermissionContractKind, _permissionSource?: unknown): boolean;
75
38
  /**
76
39
  * The contract when it governs permissions, else `undefined` — for the sites
77
40
  * that used `executionContract` as "is this run permission-fenced".
@@ -1,33 +1,5 @@
1
- /**
2
- * Session permission authority — the ONE rule that decides whether a session's
3
- * execution contract governs the run's permissions, shared by the server and
4
- * the daemon (OSK-11975 introduced it; it was implemented twice — the server
5
- * read `kind !== 'commitment'`, the daemon read the `permissionSource` marker —
6
- * which is exactly how a new contract kind or a new source value would drift
7
- * them apart).
8
- *
9
- * The wire model:
10
- *
11
- * - The contract is closed (`hasOnlyKeys` on the daemon), so "whose
12
- * permissions govern" can never ride INSIDE it. It is a top-level session
13
- * field: `permissionSource`.
14
- * - `'agent'` means the Agent's own configured permission mode, tool policy,
15
- * Grants, session env, MCP servers and machine consent govern the run,
16
- * exactly as for an unattended Task of the same Agent. Today only a
17
- * `commitment` contract may carry it.
18
- * - A `commitment` contract WITHOUT the marker (an older server mid-deploy)
19
- * still governs permissions — the marker is the version signal, so its
20
- * absence must keep the legacy fence, not silently lift it.
21
- * - `task_delivery` contracts always govern, marker or not.
22
- *
23
- * Server vs daemon asymmetry, on purpose: the server STAMPS the marker
24
- * (`permissionSourceForContract`), so on its own side the predicate reduces to
25
- * "a commitment never governs" — `contractGovernsPermissions(c,
26
- * permissionSourceForContract(c))` is exactly `kind !== 'commitment'`. The
27
- * daemon reads the marker it received, because it cannot distinguish "new
28
- * server, agent permissions" from "old server, contract fence" any other way.
29
- * Both call the same function; only the input differs.
30
- */
1
+ /** Commitment context never overrides Agent permissions. Version 3 admission
2
+ * rejects old contracts; typed Task delivery is a separate frozen operation. */
31
3
  /** The wire vocabulary for `permissionSource`. Top-level session field. */
32
4
  export const SESSION_PERMISSION_SOURCES = ['agent'];
33
5
  /**
@@ -36,11 +8,10 @@ export const SESSION_PERMISSION_SOURCES = ['agent'];
36
8
  * a daemon without it (`COMMITMENT_AGENT_PERMISSIONS_RUNTIME_UNSUPPORTED`), so
37
9
  * the marker never reaches a daemon that would ignore it.
38
10
  */
39
- export const COMMITMENT_AGENT_PERMISSIONS_CAPABILITY = 'commitment_execution_contract_v2_agent_permissions';
11
+ export const COMMITMENT_AGENT_PERMISSIONS_CAPABILITY = 'commitment_execution_contract_v3';
40
12
  /**
41
13
  * Untrusted wire input: anything but an exact vocabulary literal reads as
42
- * absent. Never widen by coercion — an unrecognized future value must degrade
43
- * to "contract governs", the conservative answer.
14
+ * absent. An unknown marker carries no authority. Contract admission is validated separately.
44
15
  */
45
16
  export function normalizeSessionPermissionSource(value) {
46
17
  return SESSION_PERMISSION_SOURCES.includes(value)
@@ -55,21 +26,11 @@ export function normalizeSessionPermissionSource(value) {
55
26
  export function permissionSourceForContract(contract) {
56
27
  return contract?.kind === 'commitment' ? 'agent' : undefined;
57
28
  }
58
- /**
59
- * Whether the contract is the run's PERMISSION authority — the single place
60
- * this rule lives.
61
- *
62
- * True for a non-commitment contract regardless of marker, and for a
63
- * commitment whose server did not declare agent permissions. False for no
64
- * contract at all, and for a commitment carrying `permissionSource: 'agent'`,
65
- * which then follows the Agent's own permissions exactly as a Task does while
66
- * the contract keeps its non-permission roles (normalized shape, ephemeral
67
- * worktree, result validation, `GIT_OPTIONAL_LOCKS`, provider restriction).
29
+ /** Only typed Task delivery owns an effect-specific permission boundary.
30
+ * A Commitment is context for the Agent and cannot grant or restrict tools.
68
31
  */
69
- export function contractGovernsPermissions(contract, permissionSource) {
70
- if (!contract)
71
- return false;
72
- return !(contract.kind === 'commitment' && normalizeSessionPermissionSource(permissionSource) === 'agent');
32
+ export function contractGovernsPermissions(contract, _permissionSource) {
33
+ return Boolean(contract && contract.kind !== 'commitment');
73
34
  }
74
35
  /**
75
36
  * The contract when it governs permissions, else `undefined` — for the sites
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skrr-ai/auth-core",
3
- "version": "0.4.17",
3
+ "version": "0.4.18",
4
4
  "main": "dist/cjs/index.js",
5
5
  "types": "dist/esm/index.d.ts",
6
6
  "exports": {
@@ -133,6 +133,16 @@
133
133
  "types": "./dist/cjs/dedicatedRuntimeWakeWire.d.ts",
134
134
  "default": "./dist/cjs/dedicatedRuntimeWakeWire.js"
135
135
  }
136
+ },
137
+ "./commitment-execution-contract": {
138
+ "import": {
139
+ "types": "./dist/esm/commitmentExecutionContract.d.ts",
140
+ "default": "./dist/esm/commitmentExecutionContract.js"
141
+ },
142
+ "require": {
143
+ "types": "./dist/cjs/commitmentExecutionContract.d.ts",
144
+ "default": "./dist/cjs/commitmentExecutionContract.js"
145
+ }
136
146
  }
137
147
  },
138
148
  "dependencies": {