@skrr-ai/cli 0.1.23 → 0.1.24
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/bin/run.js +54 -1
- package/dist/base-command.js +74 -1
- package/dist/commands/harnesses/leases/list.js +1 -1
- package/dist/commands/harnesses/products.js +1 -0
- package/dist/commands/machines/dedicated/create.d.ts +18 -0
- package/dist/commands/machines/dedicated/create.js +90 -0
- package/dist/commands/machines/dedicated/destroy.d.ts +14 -0
- package/dist/commands/machines/dedicated/destroy.js +56 -0
- package/dist/commands/machines/dedicated/grow.d.ts +13 -0
- package/dist/commands/machines/dedicated/grow.js +46 -0
- package/dist/commands/machines/dedicated/health-check.d.ts +12 -0
- package/dist/commands/machines/dedicated/health-check.js +42 -0
- package/dist/commands/machines/dedicated/incident-close.d.ts +12 -0
- package/dist/commands/machines/dedicated/incident-close.js +42 -0
- package/dist/commands/machines/dedicated/index.d.ts +6 -0
- package/dist/commands/machines/dedicated/index.js +39 -0
- package/dist/commands/machines/dedicated/list.d.ts +11 -0
- package/dist/commands/machines/dedicated/list.js +58 -0
- package/dist/commands/machines/dedicated/restart.d.ts +12 -0
- package/dist/commands/machines/dedicated/restart.js +42 -0
- package/dist/commands/machines/dedicated/show.d.ts +12 -0
- package/dist/commands/machines/dedicated/show.js +58 -0
- package/dist/commands/machines/dedicated/snapshot.d.ts +12 -0
- package/dist/commands/machines/dedicated/snapshot.js +42 -0
- package/dist/commands/machines/dedicated/start.d.ts +12 -0
- package/dist/commands/machines/dedicated/start.js +42 -0
- package/dist/commands/machines/dedicated/stop.d.ts +12 -0
- package/dist/commands/machines/dedicated/stop.js +42 -0
- package/dist/commands/machines/hosted/index.js +4 -1
- package/dist/commands/spaces/update.js +16 -12
- package/dist/commands/spaces/work-sync/reconcile.d.ts +38 -0
- package/dist/commands/spaces/work-sync/reconcile.js +90 -0
- package/dist/commands/spaces/work-sync/telemetry.d.ts +29 -0
- package/dist/commands/spaces/work-sync/telemetry.js +96 -0
- package/dist/commands/tasks/activity.js +5 -1
- package/dist/commands/tasks/complete.d.ts +5 -1
- package/dist/commands/tasks/complete.js +17 -3
- package/dist/commands/tasks/create.d.ts +1 -0
- package/dist/commands/tasks/create.js +7 -0
- package/dist/commands/tasks/deliverable/add.js +22 -4
- package/dist/commands/tasks/deliverable/list.js +23 -2
- package/dist/commands/tasks/events/append.js +31 -3
- package/dist/commands/tasks/expectations/assess.d.ts +1 -1
- package/dist/commands/tasks/expectations/assess.js +33 -7
- package/dist/commands/tasks/expectations.js +110 -10
- package/dist/commands/tasks/output.d.ts +0 -1
- package/dist/commands/tasks/output.js +21 -1
- package/dist/commands/tasks/report.js +3 -1
- package/dist/commands/tasks/result/show.js +20 -2
- package/dist/commands/tasks/resume/save.js +11 -1
- package/dist/commands/tasks/self-schedule.js +7 -4
- package/dist/commands/tasks/show.js +19 -0
- package/dist/commands/tasks/timeline.js +9 -1
- package/dist/commands/tasks/updates/add.js +23 -2
- package/dist/lib/dedicated-machines.d.ts +66 -0
- package/dist/lib/dedicated-machines.js +161 -0
- package/dist/lib/harnesses.d.ts +5 -0
- package/dist/lib/harnesses.js +5 -2
- package/dist/lib/task-legacy.d.ts +24 -0
- package/dist/lib/task-legacy.js +48 -0
- package/dist/lib/tasks.d.ts +32 -0
- package/dist/lib/tasks.js +47 -1
- package/dist/lib/work-sync.d.ts +70 -0
- package/dist/lib/work-sync.js +29 -0
- package/dist/node_modules/@skrr-ai/data-provider/index.js +2079 -2055
- package/oclif.manifest.json +12229 -11213
- package/package.json +1 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Work Sync's own telemetry, readable.
|
|
3
|
+
*
|
|
4
|
+
* Work Sync v1 is ON at 100% (owner decision, 2026-09-08) with two of its exit
|
|
5
|
+
* criteria knowingly overridden rather than satisfied: `shadow_mismatch` and
|
|
6
|
+
* `resume_error` rows from a one-user sample were unexplained, and
|
|
7
|
+
* revocation-to-purge latency had never been measured. Root `CLAUDE.md` records
|
|
8
|
+
* that an unexplained board divergence is therefore "a live hypothesis, not an
|
|
9
|
+
* impossibility, and is the first thing to suspect".
|
|
10
|
+
*
|
|
11
|
+
* The server has computed the verdict all along — `GET
|
|
12
|
+
* /api/work-sync/spaces/:spaceId/telemetry-summary` returns the per-event counts,
|
|
13
|
+
* the repair backlog, and a `ready`/`hold`/`insufficient_evidence` decision with
|
|
14
|
+
* its reasons. Nothing outside the API could read it, so checking the criteria
|
|
15
|
+
* meant a query against the production database. An exit criterion that can only
|
|
16
|
+
* be read by hand is one that does not get read.
|
|
17
|
+
*
|
|
18
|
+
* A domain lib rather than an inline `/api/...` in the command, per the repo's
|
|
19
|
+
* CLI rule: a command reaches the API through its domain lib or `dataService`,
|
|
20
|
+
* never by composing the URL at the call site.
|
|
21
|
+
*/
|
|
22
|
+
export type WorkSyncEventStats = {
|
|
23
|
+
count: number;
|
|
24
|
+
p50DurationMs: number | null;
|
|
25
|
+
p95DurationMs: number | null;
|
|
26
|
+
p50Bytes: number | null;
|
|
27
|
+
p95Bytes: number | null;
|
|
28
|
+
mismatchCount: number;
|
|
29
|
+
};
|
|
30
|
+
export type WorkSyncTelemetrySummary = {
|
|
31
|
+
sampledEvents: number;
|
|
32
|
+
events: Record<string, WorkSyncEventStats>;
|
|
33
|
+
repairBacklog: number;
|
|
34
|
+
rollout: {
|
|
35
|
+
verdict: 'ready' | 'hold' | 'insufficient_evidence';
|
|
36
|
+
reasons: string[];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
/** What each `rollout.reasons` code means, in the reader's terms. */
|
|
40
|
+
export declare const WORK_SYNC_HOLD_REASONS: Record<string, string>;
|
|
41
|
+
export declare function fetchWorkSyncTelemetrySummary(spaceId: string, { limit }?: {
|
|
42
|
+
limit?: number;
|
|
43
|
+
}): Promise<WorkSyncTelemetrySummary>;
|
|
44
|
+
/**
|
|
45
|
+
* What `POST /reconcile` actually returns, field for field.
|
|
46
|
+
*
|
|
47
|
+
* This was typed `{repaired?: number; remaining?: number}` — two names the server
|
|
48
|
+
* has never sent. A wrong optional type is worse than none: every field reads as
|
|
49
|
+
* `undefined` at runtime and TypeScript agrees it might be, so a command printing
|
|
50
|
+
* `repaired` would have compiled, run, and reported nothing wrong.
|
|
51
|
+
*
|
|
52
|
+
* `upserts` is the one that answers the question a reader is asking: how many
|
|
53
|
+
* projection entries were found STALE against authoritative task truth. It is a
|
|
54
|
+
* divergence count, which is why this command exists — it is the same question the
|
|
55
|
+
* browser's shadow comparison answers, asked server-side and without a browser.
|
|
56
|
+
*/
|
|
57
|
+
export type WorkSyncReconciliation = {
|
|
58
|
+
/** Projection entries found stale against task truth and republished. */
|
|
59
|
+
upserts: number;
|
|
60
|
+
/** TaskCards published for tasks that no longer exist. */
|
|
61
|
+
removes: number;
|
|
62
|
+
summaryUpserts: number;
|
|
63
|
+
summaryRemoves: number;
|
|
64
|
+
/** Pending repair rows queued by earlier failures, before this run settled them. */
|
|
65
|
+
backlog: number;
|
|
66
|
+
/** A scope larger than the 1000-row read cap: the verdict covers only a prefix. */
|
|
67
|
+
truncated: boolean;
|
|
68
|
+
success?: boolean;
|
|
69
|
+
};
|
|
70
|
+
export declare function reconcileWorkSyncScope(spaceId: string): Promise<WorkSyncReconciliation>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WORK_SYNC_HOLD_REASONS = void 0;
|
|
4
|
+
exports.fetchWorkSyncTelemetrySummary = fetchWorkSyncTelemetrySummary;
|
|
5
|
+
exports.reconcileWorkSyncScope = reconcileWorkSyncScope;
|
|
6
|
+
const api_fetch_1 = require("./api-fetch");
|
|
7
|
+
/** What each `rollout.reasons` code means, in the reader's terms. */
|
|
8
|
+
exports.WORK_SYNC_HOLD_REASONS = {
|
|
9
|
+
no_snapshot_evidence: 'No board ever loaded a snapshot in this Space — nothing has been measured.',
|
|
10
|
+
no_shadow_comparison: 'The shadow comparison has not run in this Space, so a divergence between the ' +
|
|
11
|
+
'projection and an authoritative read would not have been seen. It runs once per ' +
|
|
12
|
+
'mounted scope from the Work Sync board hook, re-reading the snapshot endpoint and ' +
|
|
13
|
+
'comparing it against the live projection — so zero usually means no board has been ' +
|
|
14
|
+
'opened in this Space since it shipped. It also re-arms rather than counting itself ' +
|
|
15
|
+
'done when the cursor moves mid-check, which on a very busy Space can defer it. Until ' +
|
|
16
|
+
"2026-09-12 it could not run at all on the projection's own path: it needed the legacy " +
|
|
17
|
+
'collection as a baseline, and `resolveTaskReadPlan` stops fetching that exactly when ' +
|
|
18
|
+
'the projection is canonical (OSK-8492).',
|
|
19
|
+
shadow_mismatch: 'The projection disagreed with an authoritative read. This is the board-divergence hypothesis; it is the first thing to suspect behind an unexplained board.',
|
|
20
|
+
resume_errors: 'A client could not resume from its cursor and had to reset.',
|
|
21
|
+
repair_backlog: 'Change records are waiting in the reconciliation backlog — publishes were missed.',
|
|
22
|
+
};
|
|
23
|
+
async function fetchWorkSyncTelemetrySummary(spaceId, { limit } = {}) {
|
|
24
|
+
const query = limit ? `?limit=${encodeURIComponent(String(limit))}` : '';
|
|
25
|
+
return (0, api_fetch_1.apiFetch)(`/api/work-sync/spaces/${encodeURIComponent(spaceId)}/telemetry-summary${query}`);
|
|
26
|
+
}
|
|
27
|
+
async function reconcileWorkSyncScope(spaceId) {
|
|
28
|
+
return (0, api_fetch_1.apiFetch)(`/api/work-sync/spaces/${encodeURIComponent(spaceId)}/reconcile`, { method: 'POST', body: {} });
|
|
29
|
+
}
|