patchwork-os 1.1.0-beta.4.canary.539 → 1.1.0-beta.4.canary.540
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.
|
@@ -3,7 +3,23 @@ import { type WorkerManifest } from "./worker.js";
|
|
|
3
3
|
import { type AuditEvent, type BoardRow, WorkerLevelStore } from "./workerLevelStore.js";
|
|
4
4
|
/**
|
|
5
5
|
* Replay an outcome sequence for a worker and capture the per-step dial
|
|
6
|
-
* trajectory.
|
|
6
|
+
* trajectory.
|
|
7
|
+
*
|
|
8
|
+
* ## Named `dialTrajectory`, not `shadowRun`
|
|
9
|
+
*
|
|
10
|
+
* It was `src/workers/shadowRun.ts`, which collided with the unrelated
|
|
11
|
+
* `src/testing/shadowRun.ts` — a different harness, with its own reference
|
|
12
|
+
* document (`documents/shadow-run-harness.md`) describing only that one.
|
|
13
|
+
*
|
|
14
|
+
* The collision had a cost. An audit looking for dead code found this file had
|
|
15
|
+
* zero production importers and recommended deleting it. That reasoning was
|
|
16
|
+
* wrong: this has tests, and `docs/design/worker-ramp-v0.md` lists it as a
|
|
17
|
+
* deliberate Phase-1 artifact. It has no production caller because it is an
|
|
18
|
+
* ANALYSIS HARNESS — you run it against recorded outcomes to answer "how many
|
|
19
|
+
* observations does a worker need to climb each class, and how fast does one
|
|
20
|
+
* catastrophic outcome demote it". A tool with no caller is not the same thing
|
|
21
|
+
* as a tool with no purpose, and a name that suggests otherwise costs more
|
|
22
|
+
* than a rename. This is the cheapest test of the evidence-latency risk: it shows,
|
|
7
23
|
* deterministically, how many real observations (and how much wall-clock) a
|
|
8
24
|
* worker needs to climb each class — and how one catastrophic outcome demotes
|
|
9
25
|
* it in a single step. No model calls, no live gate — pure replay.
|
|
@@ -24,7 +40,7 @@ export interface ShadowRunResult {
|
|
|
24
40
|
events: AuditEvent[];
|
|
25
41
|
store: WorkerLevelStore;
|
|
26
42
|
}
|
|
27
|
-
export declare function
|
|
43
|
+
export declare function dialTrajectory(worker: WorkerManifest, outcomes: Outcome[], opts?: {
|
|
28
44
|
cfg?: GraduationConfig;
|
|
29
45
|
store?: WorkerLevelStore;
|
|
30
46
|
}): ShadowRunResult;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_GRADUATION_CONFIG, } from "./graduation.js";
|
|
2
2
|
import { priorFor } from "./worker.js";
|
|
3
3
|
import { WorkerLevelStore, } from "./workerLevelStore.js";
|
|
4
|
-
export function
|
|
4
|
+
export function dialTrajectory(worker, outcomes, opts = {}) {
|
|
5
5
|
const store = opts.store ?? new WorkerLevelStore();
|
|
6
6
|
const cfg = opts.cfg ?? DEFAULT_GRADUATION_CONFIG;
|
|
7
7
|
const prior = priorFor(worker);
|
|
@@ -41,4 +41,4 @@ export function cadence(toolName, count, opts = {}) {
|
|
|
41
41
|
at: start + i * interval,
|
|
42
42
|
}));
|
|
43
43
|
}
|
|
44
|
-
//# sourceMappingURL=
|
|
44
|
+
//# sourceMappingURL=dialTrajectory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialTrajectory.js","sourceRoot":"","sources":["../../src/workers/dialTrajectory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,GAG1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAuB,MAAM,aAAa,CAAC;AAC5D,OAAO,EAGL,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AA4C/B,MAAM,UAAU,cAAc,CAC5B,MAAsB,EACtB,QAAmB,EACnB,OAA6D,EAAE;IAE/D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,gBAAgB,EAAE,CAAC;IACnD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,yBAAyB,CAAC;IAClD,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/B,MAAM,UAAU,GAAqB,EAAE,CAAC;IACxC,QAAQ,CAAC,OAAO,CAAC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IAC7D,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC;IAC/B,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9C,QAAQ;QACR,IAAI;QACJ,EAAE,EAAE,KAAK,GAAG,CAAC,GAAG,QAAQ;KACzB,CAAC,CAAC,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "patchwork-os",
|
|
3
|
-
"version": "1.1.0-beta.4.canary.
|
|
3
|
+
"version": "1.1.0-beta.4.canary.540",
|
|
4
4
|
"description": "Your personal AI runtime, local-first. Patchwork OS gives any AI model a consistent set of tools, YAML recipes, a delegation policy with approval queue, and a durable trace memory — all on your machine, all under your policy.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shadowRun.js","sourceRoot":"","sources":["../../src/workers/shadowRun.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,GAG1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAuB,MAAM,aAAa,CAAC;AAC5D,OAAO,EAGL,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AA4B/B,MAAM,UAAU,SAAS,CACvB,MAAsB,EACtB,QAAmB,EACnB,OAA6D,EAAE;IAE/D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,gBAAgB,EAAE,CAAC;IACnD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,yBAAyB,CAAC;IAClD,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/B,MAAM,UAAU,GAAqB,EAAE,CAAC;IACxC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,E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