@skrr-ai/cli 0.1.108 → 0.1.109
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 +10 -0
- package/dist/base-command.d.ts +59 -0
- package/dist/base-command.js +118 -7
- package/dist/commands/agents/update.d.ts +14 -0
- package/dist/commands/agents/update.js +40 -1
- package/dist/commands/commitments/accounting.js +7 -2
- package/dist/commands/commitments/cost.d.ts +11 -0
- package/dist/commands/commitments/cost.js +26 -3
- package/dist/commands/commitments/create.js +2 -1
- package/dist/commands/commitments/operating-review.d.ts +15 -0
- package/dist/commands/commitments/operating-review.js +103 -50
- package/dist/commands/commitments/update.js +12 -5
- package/dist/commands/doctor.js +9 -0
- package/dist/commands/goals/list.js +6 -1
- package/dist/commands/grants/rotate.js +4 -0
- package/dist/commands/login.js +42 -14
- package/dist/commands/machines/list.js +28 -6
- package/dist/commands/projects/show.js +1 -1
- package/dist/commands/revoke-daemon.js +2 -1
- package/dist/commands/spaces/workflows/archive.d.ts +1 -0
- package/dist/commands/spaces/workflows/archive.js +1 -0
- package/dist/commands/spaces/workflows/artifact.d.ts +1 -0
- package/dist/commands/spaces/workflows/artifact.js +1 -0
- package/dist/commands/spaces/workflows/cancel-node.d.ts +1 -0
- package/dist/commands/spaces/workflows/cancel-node.js +1 -0
- package/dist/commands/spaces/workflows/cancel.d.ts +1 -0
- package/dist/commands/spaces/workflows/cancel.js +6 -2
- package/dist/commands/spaces/workflows/create.d.ts +1 -0
- package/dist/commands/spaces/workflows/create.js +7 -1
- package/dist/commands/spaces/workflows/events.d.ts +1 -0
- package/dist/commands/spaces/workflows/events.js +1 -0
- package/dist/commands/spaces/workflows/fixtures/create.d.ts +1 -0
- package/dist/commands/spaces/workflows/fixtures/create.js +1 -0
- package/dist/commands/spaces/workflows/fixtures/list.d.ts +1 -0
- package/dist/commands/spaces/workflows/fixtures/list.js +1 -0
- package/dist/commands/spaces/workflows/lifecycle-diagnostics.d.ts +1 -0
- package/dist/commands/spaces/workflows/lifecycle-diagnostics.js +1 -0
- package/dist/commands/spaces/workflows/list.d.ts +1 -0
- package/dist/commands/spaces/workflows/list.js +1 -0
- package/dist/commands/spaces/workflows/node-types.d.ts +2 -0
- package/dist/commands/spaces/workflows/node-types.js +24 -6
- package/dist/commands/spaces/workflows/pause.d.ts +1 -0
- package/dist/commands/spaces/workflows/pause.js +1 -0
- package/dist/commands/spaces/workflows/plan/show.d.ts +1 -0
- package/dist/commands/spaces/workflows/plan/show.js +1 -0
- package/dist/commands/spaces/workflows/plan/update.d.ts +1 -0
- package/dist/commands/spaces/workflows/plan/update.js +1 -0
- package/dist/commands/spaces/workflows/proposals/apply.d.ts +1 -0
- package/dist/commands/spaces/workflows/proposals/apply.js +1 -0
- package/dist/commands/spaces/workflows/proposals/confirm.d.ts +1 -0
- package/dist/commands/spaces/workflows/proposals/confirm.js +1 -0
- package/dist/commands/spaces/workflows/proposals/create.d.ts +1 -0
- package/dist/commands/spaces/workflows/proposals/create.js +1 -0
- package/dist/commands/spaces/workflows/proposals/dismiss.d.ts +1 -0
- package/dist/commands/spaces/workflows/proposals/dismiss.js +1 -0
- package/dist/commands/spaces/workflows/proposals/list.d.ts +1 -0
- package/dist/commands/spaces/workflows/proposals/list.js +1 -0
- package/dist/commands/spaces/workflows/publish.d.ts +1 -0
- package/dist/commands/spaces/workflows/publish.js +9 -0
- package/dist/commands/spaces/workflows/reconcile.d.ts +1 -0
- package/dist/commands/spaces/workflows/reconcile.js +1 -0
- package/dist/commands/spaces/workflows/resume.d.ts +1 -0
- package/dist/commands/spaces/workflows/resume.js +1 -0
- package/dist/commands/spaces/workflows/retry.d.ts +1 -0
- package/dist/commands/spaces/workflows/retry.js +1 -0
- package/dist/commands/spaces/workflows/run.d.ts +1 -0
- package/dist/commands/spaces/workflows/run.js +14 -7
- package/dist/commands/spaces/workflows/runs.d.ts +1 -0
- package/dist/commands/spaces/workflows/runs.js +1 -0
- package/dist/commands/spaces/workflows/show.d.ts +25 -0
- package/dist/commands/spaces/workflows/show.js +42 -4
- package/dist/commands/spaces/workflows/signal.d.ts +12 -0
- package/dist/commands/spaces/workflows/signal.js +40 -2
- package/dist/commands/spaces/workflows/start.d.ts +1 -0
- package/dist/commands/spaces/workflows/start.js +1 -0
- package/dist/commands/spaces/workflows/task-execution/create.d.ts +1 -0
- package/dist/commands/spaces/workflows/task-execution/create.js +1 -0
- package/dist/commands/spaces/workflows/test.d.ts +1 -0
- package/dist/commands/spaces/workflows/test.js +1 -0
- package/dist/commands/spaces/workflows/triggers/create.d.ts +1 -0
- package/dist/commands/spaces/workflows/triggers/create.js +1 -0
- package/dist/commands/spaces/workflows/triggers/fire.d.ts +1 -0
- package/dist/commands/spaces/workflows/triggers/fire.js +1 -0
- package/dist/commands/spaces/workflows/triggers/list.d.ts +1 -0
- package/dist/commands/spaces/workflows/triggers/list.js +1 -0
- package/dist/commands/spaces/workflows/triggers/update.d.ts +1 -0
- package/dist/commands/spaces/workflows/triggers/update.js +1 -0
- package/dist/commands/spaces/workflows/update.d.ts +1 -0
- package/dist/commands/spaces/workflows/update.js +4 -0
- package/dist/commands/spaces/workflows/validate.d.ts +1 -0
- package/dist/commands/spaces/workflows/validate.js +15 -0
- package/dist/commands/tasks/activity.js +6 -2
- package/dist/commands/tasks/bulk-update.d.ts +1 -0
- package/dist/commands/tasks/bulk-update.js +7 -0
- package/dist/commands/tasks/complete.js +2 -1
- package/dist/commands/tasks/create-tree.d.ts +69 -0
- package/dist/commands/tasks/create-tree.js +413 -47
- package/dist/commands/tasks/list.d.ts +2 -0
- package/dist/commands/tasks/list.js +19 -1
- package/dist/commands/tasks/rearm-recurrence.d.ts +22 -0
- package/dist/commands/tasks/rearm-recurrence.js +68 -0
- package/dist/commands/tasks/show.d.ts +1 -0
- package/dist/commands/tasks/show.js +17 -3
- package/dist/commands/tasks/timeline.js +4 -0
- package/dist/commands/tasks/update.d.ts +1 -0
- package/dist/commands/tasks/update.js +6 -1
- package/dist/commands/triggers/create.js +8 -2
- package/dist/commands/triggers/parse-intent.d.ts +7 -0
- package/dist/commands/triggers/parse-intent.js +31 -9
- package/dist/commands/workspaces/grants.js +23 -3
- package/dist/commands/workspaces/members.d.ts +20 -0
- package/dist/commands/workspaces/members.js +64 -0
- package/dist/commands/workspaces/stewardship.js +14 -2
- package/dist/help.js +12 -0
- package/dist/hooks/command-not-found.js +27 -1
- package/dist/lib/command-miss.d.ts +52 -2
- package/dist/lib/command-miss.js +187 -18
- package/dist/lib/commitment-loop-status.d.ts +8 -0
- package/dist/lib/commitment-loop-status.js +45 -0
- package/dist/lib/commitments.d.ts +16 -2
- package/dist/lib/commitments.js +48 -8
- package/dist/lib/daemon-command-hint.d.ts +15 -0
- package/dist/lib/daemon-command-hint.js +21 -0
- package/dist/lib/daemon-setup.js +10 -1
- package/dist/lib/daemonBrokerRefusal.js +3 -2
- package/dist/lib/daemonHandoff.js +2 -1
- package/dist/lib/deployed-build.d.ts +43 -0
- package/dist/lib/deployed-build.js +66 -0
- package/dist/lib/grants.d.ts +27 -1
- package/dist/lib/grants.js +39 -21
- package/dist/lib/json-mode.d.ts +11 -0
- package/dist/lib/json-mode.js +19 -0
- package/dist/lib/json-output.d.ts +25 -0
- package/dist/lib/json-output.js +30 -0
- package/dist/lib/list-output.d.ts +9 -0
- package/dist/lib/list-output.js +20 -1
- package/dist/lib/local-daemon-readiness.d.ts +90 -0
- package/dist/lib/local-daemon-readiness.js +143 -0
- package/dist/lib/machines.d.ts +117 -0
- package/dist/lib/machines.js +139 -0
- package/dist/lib/managed-instruction-local.d.ts +2 -0
- package/dist/lib/managed-instruction-local.js +2 -0
- package/dist/lib/profile-machine-identity-guard.d.ts +18 -0
- package/dist/lib/profile-machine-identity-guard.js +29 -0
- package/dist/lib/request-field-flags.d.ts +20 -0
- package/dist/lib/request-field-flags.js +34 -0
- package/dist/lib/stewardship-output.d.ts +1 -1
- package/dist/lib/stewardship-output.js +26 -30
- package/dist/lib/task-batch.d.ts +61 -4
- package/dist/lib/task-batch.js +316 -80
- package/dist/lib/task-economics.d.ts +5 -0
- package/dist/lib/task-economics.js +15 -0
- package/dist/lib/task-recurrence-outcome.d.ts +6 -6
- package/dist/lib/task-recurrence-outcome.js +27 -3
- package/dist/lib/tasks.d.ts +39 -0
- package/dist/lib/tasks.js +132 -0
- package/dist/lib/triggers.d.ts +31 -1
- package/dist/lib/triggers.js +55 -1
- package/dist/lib/workflow-issues.d.ts +14 -0
- package/dist/lib/workflow-issues.js +32 -0
- package/dist/lib/workflow-run-view.d.ts +55 -0
- package/dist/lib/workflow-run-view.js +105 -0
- package/dist/lib/workspaces.d.ts +31 -4
- package/dist/lib/workspaces.js +43 -0
- package/dist/lib/write-target.d.ts +29 -0
- package/dist/lib/write-target.js +72 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/workspaceIsolationProbeWire.d.ts +51 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/workspaceIsolationProbeWire.js +50 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/workspaceIsolationProbeWire.d.ts +51 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/workspaceIsolationProbeWire.js +46 -0
- package/dist/node_modules/@skrr-ai/auth-core/package.json +11 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +6718 -6370
- package/oclif.manifest.json +376 -52
- package/package.json +19 -1
|
@@ -4,6 +4,7 @@ exports.printStewardshipCoverage = printStewardshipCoverage;
|
|
|
4
4
|
exports.printWorkspaceGrants = printWorkspaceGrants;
|
|
5
5
|
exports.printWorkspaceStewardship = printWorkspaceStewardship;
|
|
6
6
|
const format_1 = require("./format");
|
|
7
|
+
const grants_1 = require("./grants");
|
|
7
8
|
function printStewardshipCoverage(report, log) {
|
|
8
9
|
if (report.coverage.complete) {
|
|
9
10
|
log('Coverage: complete within the bounded sources.');
|
|
@@ -41,23 +42,24 @@ function printStewardshipCoverage(report, log) {
|
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
|
-
/**
|
|
45
|
-
function
|
|
46
|
-
const value = principal;
|
|
47
|
-
if (!value?.kind)
|
|
48
|
-
return '—';
|
|
49
|
-
const id = value.agentId ?? value.commitmentId;
|
|
50
|
-
return id ? `${value.kind} ${id}` : value.kind;
|
|
51
|
-
}
|
|
52
|
-
/** What the Grant allows: its capability names, or an honest dash when it lists none. */
|
|
53
|
-
function accessText(capabilities) {
|
|
45
|
+
/** What the Grant's capabilities name, or an honest dash when it lists none. */
|
|
46
|
+
function capabilitiesText(capabilities) {
|
|
54
47
|
return Array.isArray(capabilities) && capabilities.length ? capabilities.join(', ') : '—';
|
|
55
48
|
}
|
|
56
|
-
|
|
49
|
+
/**
|
|
50
|
+
* The owner as a person reads it: `Name (id)` when the id belongs to a current
|
|
51
|
+
* member, the bare id otherwise — an owner who has left is not a member, and
|
|
52
|
+
* the id is still the thing to act on.
|
|
53
|
+
*/
|
|
54
|
+
function ownerText(ownerUserId, members) {
|
|
55
|
+
const name = members?.get(ownerUserId);
|
|
56
|
+
return name ? `${name} (${ownerUserId})` : ownerUserId;
|
|
57
|
+
}
|
|
58
|
+
function printWorkspaceGrants(report, log, members) {
|
|
57
59
|
printStewardshipCoverage(report, log);
|
|
58
|
-
printGrantRows(report, log);
|
|
60
|
+
printGrantRows(report, log, members);
|
|
59
61
|
}
|
|
60
|
-
function printGrantRows(report, log) {
|
|
62
|
+
function printGrantRows(report, log, members) {
|
|
61
63
|
if (report.grants === null) {
|
|
62
64
|
log('Grants: unavailable.');
|
|
63
65
|
return;
|
|
@@ -69,30 +71,24 @@ function printGrantRows(report, log) {
|
|
|
69
71
|
: 'No workspace Grants observed.');
|
|
70
72
|
return;
|
|
71
73
|
}
|
|
74
|
+
// The columns `skrr grants list` shows come from the same function, so a
|
|
75
|
+
// header means the same thing in both tables (OSK-15357); the workspace view
|
|
76
|
+
// adds who owns the Grant, its capabilities, its expiry and what uses it.
|
|
72
77
|
(0, format_1.renderTable)(report.grants.map((row) => ({
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
principal: principalText(row.principal),
|
|
77
|
-
access: accessText(row.capabilities),
|
|
78
|
-
owner: row.ownerUserId,
|
|
79
|
-
active: row.active ? 'yes' : 'no',
|
|
78
|
+
...(0, grants_1.grantTableCells)(row),
|
|
79
|
+
owner: ownerText(row.ownerUserId, members),
|
|
80
|
+
capabilities: capabilitiesText(row.capabilities),
|
|
80
81
|
// No expiry is a fact about the Grant; a blank cell read as "not readable" (OSK-15357).
|
|
81
82
|
expires: row.expiresAt ?? 'never',
|
|
82
|
-
envKeys: row.credential?.envKeys.length ? row.credential.envKeys.join(', ') : '—',
|
|
83
83
|
referencedBy: row.referencedBy === null
|
|
84
84
|
? 'unavailable'
|
|
85
|
-
: `${row.referencedBy.join(', ')}${row.referencesTruncated ? ' (truncated)' : ''}`,
|
|
85
|
+
: `${row.referencedBy.join(', ') || '—'}${row.referencesTruncated ? ' (truncated)' : ''}`,
|
|
86
86
|
})), [
|
|
87
|
-
{ key: 'id', header: 'ID' },
|
|
88
|
-
|
|
89
|
-
{ key: 'provider', header: 'PROVIDER' },
|
|
90
|
-
{ key: 'principal', header: 'HELD BY' },
|
|
91
|
-
{ key: 'access', header: 'ACCESS' },
|
|
87
|
+
{ key: 'id', header: 'ID', verbatim: true },
|
|
88
|
+
...grants_1.GRANT_TABLE_COLUMNS,
|
|
92
89
|
{ key: 'owner', header: 'OWNER' },
|
|
93
|
-
{ key: '
|
|
90
|
+
{ key: 'capabilities', header: 'CAPABILITIES' },
|
|
94
91
|
{ key: 'expires', header: 'EXPIRES' },
|
|
95
|
-
{ key: 'envKeys', header: 'ENV NAMES' },
|
|
96
92
|
{ key: 'referencedBy', header: 'REFERENCED BY' },
|
|
97
93
|
], log);
|
|
98
94
|
}
|
|
@@ -101,7 +97,7 @@ function printWorkspaceStewardship(report, log) {
|
|
|
101
97
|
log(`Membership: ${report.membership.status}${report.membership.role ? ` (${report.membership.role})` : ''}${
|
|
102
98
|
// "Absent" is all the report knows: a removed member and an id that never existed read alike (OSK-15356).
|
|
103
99
|
report.membership.status === 'absent'
|
|
104
|
-
? ' — not a current member; this report cannot tell a removed member from an id that never existed'
|
|
100
|
+
? ' — not a current member; this report cannot tell a removed member from an id that never existed (`skrr workspaces members <workspace-id>` lists current members)'
|
|
105
101
|
: ''}`);
|
|
106
102
|
const isCut = (source) => report.coverage.sources.some((entry) => entry.name === source && entry.truncated);
|
|
107
103
|
const count = (rows, source) => rows === null
|
package/dist/lib/task-batch.d.ts
CHANGED
|
@@ -26,6 +26,12 @@ export declare function batchIdempotencyKey(kind: 'create' | 'patch', items: unk
|
|
|
26
26
|
export type BatchCreateNode = {
|
|
27
27
|
key: string;
|
|
28
28
|
parentKey?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Keys of other nodes that block this one. Each blocker must come BEFORE this
|
|
31
|
+
* node in the list; the batch resolves them to real ids on the server (same
|
|
32
|
+
* chunk) or from `mapping` (an earlier chunk, or a task that already existed).
|
|
33
|
+
*/
|
|
34
|
+
blockerKeys?: string[];
|
|
29
35
|
payload: Record<string, unknown>;
|
|
30
36
|
};
|
|
31
37
|
export type BatchCreatedRow = {
|
|
@@ -56,13 +62,64 @@ export type BatchCreateOutcome = {
|
|
|
56
62
|
supported: true;
|
|
57
63
|
rows: BatchCreatedRow[];
|
|
58
64
|
failures: BatchCreateFailure[];
|
|
65
|
+
/** Requests made to the batch route, retries included. */
|
|
66
|
+
rounds: number;
|
|
67
|
+
};
|
|
68
|
+
/** What a long create reports between requests (the command decides whether anyone sees it). */
|
|
69
|
+
export type BatchProgress = {
|
|
70
|
+
/** Nodes confirmed to exist so far, created now or found already there. */
|
|
71
|
+
confirmed: number;
|
|
72
|
+
total: number;
|
|
73
|
+
round: number;
|
|
74
|
+
elapsedMs: number;
|
|
75
|
+
/** Set while waiting before the next attempt, with why. */
|
|
76
|
+
waiting?: {
|
|
77
|
+
ms: number;
|
|
78
|
+
reason: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
export type BatchCreateOptions = {
|
|
82
|
+
onProgress?: (progress: BatchProgress) => void;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* How a create that is not finishing is retried. A seam rather than constants so
|
|
86
|
+
* a test can run the whole policy without waiting through it.
|
|
87
|
+
*
|
|
88
|
+
* Each round that confirms nothing waits the next interval and counts toward the
|
|
89
|
+
* limit; a round that confirms anything resets it. The total wait is bounded
|
|
90
|
+
* (about 15 s), on purpose: this is a courtesy to a server that is briefly slow
|
|
91
|
+
* or rate-limited, not a promise to outlast an outage — past it the command says
|
|
92
|
+
* what is unknown and how to continue.
|
|
93
|
+
*/
|
|
94
|
+
export declare const batchRetryPolicy: {
|
|
95
|
+
backoffMs: number[];
|
|
96
|
+
sleep: (ms: number) => Promise<void>;
|
|
59
97
|
};
|
|
60
98
|
/**
|
|
61
|
-
* Create `nodes`
|
|
62
|
-
*
|
|
63
|
-
*
|
|
99
|
+
* Create `nodes` — parents and blockers BEFORE what depends on them — until every
|
|
100
|
+
* one exists, or say precisely which do not and why.
|
|
101
|
+
*
|
|
102
|
+
* One request is a bounded unit of work, not the whole job: the server answers
|
|
103
|
+
* within a response budget, creating what it can and reporting the rest as not
|
|
104
|
+
* started (`BATCH_DEADLINE_EXCEEDED`) or still in flight (`pending`). That is a
|
|
105
|
+
* normal, successful answer, so this loop is what turns it into a finished tree:
|
|
106
|
+
* submit, record what is confirmed, submit what is left. It used to stop at the
|
|
107
|
+
* first row the server had not confirmed and hand the person a `--resume` to
|
|
108
|
+
* type — once per row or two, against a server that confirms a row or two per
|
|
109
|
+
* request (OSK-S-440 #1, #3, #4).
|
|
110
|
+
*
|
|
111
|
+
* The one rule that makes resubmitting safe is the one the server enforces: a
|
|
112
|
+
* node with a stable `externalKey` can be created once. A submitted write whose
|
|
113
|
+
* outcome is unknown is therefore READ first (`reconcileSubmittedNodes`), and only
|
|
114
|
+
* if the key is still absent is the node sent again — where, if the first write
|
|
115
|
+
* has landed in the meantime, the unique index turns it into `exists`. A node with
|
|
116
|
+
* no stable key is never resubmitted after an uncertain outcome, because nothing
|
|
117
|
+
* could tell the second write from a duplicate; that case stops and says so, as
|
|
118
|
+
* before.
|
|
119
|
+
*
|
|
120
|
+
* `mapping` holds key -> id for nodes that already exist and is extended in place.
|
|
64
121
|
*/
|
|
65
|
-
export declare function createNodesViaBatch(nodes: BatchCreateNode[], mapping: Record<string, string
|
|
122
|
+
export declare function createNodesViaBatch(nodes: BatchCreateNode[], mapping: Record<string, string>, options?: BatchCreateOptions): Promise<BatchCreateOutcome>;
|
|
66
123
|
export type BatchPatchOutcome = {
|
|
67
124
|
supported: false;
|
|
68
125
|
} | {
|