humanish 0.88.0 → 0.88.1

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/dist/stats.js CHANGED
@@ -170,7 +170,7 @@ export function formatStatsHuman(result) {
170
170
  `humanish stats${scope.length === 0 ? "" : ` (${scope.join(", ")})`}`,
171
171
  `runs: ${t.runs} (${t.live} live, ${t.dryRun} dry-run${t.running > 0 ? `, ${t.running} running` : ""})`,
172
172
  `estimated spend: ${money(t.estimatedSpendUsd)} over ${t.runs - t.unpricedRuns} priced run(s); ${t.unpricedRuns} unpriced (counted, not $0)`,
173
- `participants: ${t.participants.reachedGoal}/${t.participants.total} reached the goal, ${t.participants.reportedFriction} reported friction`,
173
+ `participants: ${t.participants.reachedGoal}/${t.participants.total} recorded goal completions, ${t.participants.reportedFriction} reported friction`,
174
174
  `verdicts: ${Object.entries(t.verdicts).map(([verdict, count]) => `${verdict} ${count}`).join(", ") || "none recorded"}`
175
175
  ];
176
176
  if (result.labs.length > 0) {
package/dist/stats.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"stats.js","sourceRoot":"","sources":["../src/stats.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,EAAE;AACF,gGAAgG;AAChG,kGAAkG;AAClG,iGAAiG;AACjG,oFAAoF;AAEpF,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAC;AA6DhD,MAAM,CAAC,MAAM,UAAU,GACrB,wGAAwG;MACtG,4IAA4I,CAAC;AAiBjJ,SAAS,MAAM,CAAC,MAAgB;IAC9B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,C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IAAI,CAAC,CAAC;IAC5B,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACjC,CAAC"}
@@ -0,0 +1,75 @@
1
+ # Run a local app through its state contract
2
+
3
+ This complete library example starts a synthetic loopback HTTP app, reads its
4
+ state with a `CuaExecutor`, sends a greeting through its action endpoint, and
5
+ verifies the resulting Humanish run. It uses a deterministic `CuaProvider` with
6
+ no model calls, API keys, browser, screenshots or E2B resources. It demonstrates
7
+ the integration; it does not test persona behavior or the quality of an app's UI.
8
+
9
+ ## Run from an npm installation
10
+
11
+ Use Node.js 20.3 or later (`AbortSignal.any`), in a new directory:
12
+
13
+ ```bash
14
+ npm init -y
15
+ npm install humanish
16
+ node node_modules/humanish/docs/architecture/examples/state-driven-local-app/runner.mjs
17
+ ```
18
+
19
+ The package includes both [runner.mjs](runner.mjs) and [app.mjs](app.mjs).
20
+ No checkout, TypeScript loader or initialization command is needed. Each
21
+ invocation starts a fresh app and writes a new run under `.humanish/runs/` in
22
+ your current directory. Run the last command again for an independent repeat.
23
+ Add `.humanish/` to your project's `.gitignore` before adapting this example to
24
+ real app data; running the library directly does not create that ignore rule.
25
+
26
+ Expected output includes `goal_satisfied`, `sandboxCreated: false`, zero
27
+ screenshots, a successful `verification`, and a synthetic app receipt with
28
+ `greeted: true` and `messages: 1`. The final cleanup line shows
29
+ `serverClosed: true`; `finally` closes the server even when the run or verification
30
+ fails. The evidence remains on disk.
31
+
32
+ Review the bundle and its sharing grade:
33
+
34
+ ```bash
35
+ npx humanish verify --run latest --json
36
+ npx humanish review --run latest --json
37
+ ```
38
+
39
+ `appState` drives the loop in memory and is not persisted in the actor trace.
40
+ This example separately prints only its own synthetic counters. A successful
41
+ verification describes the evidence bundle, not persona efficacy or human
42
+ task completion. The reported cost basis comes from executing only local code
43
+ and loopback requests; absent model usage is not treated as a billing receipt.
44
+
45
+ ## Adapt the two ports
46
+
47
+ In `runner.mjs`, replace `createAppContractExecutor` with your trusted bridge to
48
+ your app's `getState()` and actions. Here those calls use `GET /state` and
49
+ `POST /chat`; a browser bridge could call `window.app` through `page.evaluate`.
50
+ Map supported actions explicitly and reject unsupported ones. Forward the
51
+ optional execution signal and check it before dispatching an input.
52
+
53
+ Replace the deterministic provider if you want a model to choose actions from
54
+ `request.observation.appState`. Keep `requiresFrame: false` for a state-only
55
+ provider. Your replacement owns its model credentials and costs. The
56
+ `openai-computer-use` actor id selects the registered CUA route; the injected
57
+ `buildProvider` chooses the actual provider, so this example never invokes OpenAI.
58
+
59
+ The runner shows both required discriminant checks: `parseLabConfig` receives
60
+ an object containing `schema: LAB_CONFIG_SCHEMA` and is narrowed on `.ok`;
61
+ `runLab` is narrowed on `backend === "cua"` before inspecting its result.
62
+ Supplying both `buildExecutor` and `buildProvider` selects the library-assisted
63
+ route. It is not a config-only CLI actor or an out-of-tree actor registration API.
64
+
65
+ Both JavaScript files carry JSDoc types against the public `humanish` exports.
66
+ To check an installed copy against its packaged declarations:
67
+
68
+ ```bash
69
+ npm install --save-dev typescript @types/node@20
70
+ npx tsc --allowJs --checkJs --noEmit --strict --skipLibCheck --types node --target ES2022 --module NodeNext --moduleResolution NodeNext node_modules/humanish/docs/architecture/examples/state-driven-local-app/*.mjs
71
+ ```
72
+
73
+ See the [state-driven executor guide](../../state-driven-executor.md) for progress
74
+ projection limits, runtime-only state, unpinned local-app provenance, and the
75
+ fail-closed guards on this route.
@@ -0,0 +1,48 @@
1
+ // @ts-check
2
+ import { once } from "node:events";
3
+ import { createServer } from "node:http";
4
+
5
+ /** A synthetic app with a real loopback HTTP state/action contract. */
6
+ export async function startLocalApp() {
7
+ let greeted = false;
8
+ let messages = 0;
9
+ let stateReads = 0;
10
+ const server = createServer(async (request, response) => {
11
+ if (request.method === "GET" && request.url === "/state") {
12
+ stateReads += 1;
13
+ response.writeHead(200, { "content-type": "application/json" });
14
+ response.end(JSON.stringify({ greeted, messages }));
15
+ } else if (request.method === "POST" && request.url === "/chat") {
16
+ // The demo accepts only a short synthetic message; it stores no raw text.
17
+ let text = "";
18
+ for await (const chunk of request) {
19
+ text += chunk.toString();
20
+ if (text.length > 1024) {
21
+ response.writeHead(413).end();
22
+ return;
23
+ }
24
+ }
25
+ messages += 1;
26
+ if (text.toLowerCase().includes("hello")) greeted = true;
27
+ response.writeHead(204).end();
28
+ } else {
29
+ response.writeHead(404).end();
30
+ }
31
+ });
32
+ server.listen(0, "127.0.0.1");
33
+ await once(server, "listening");
34
+ const address = server.address();
35
+ if (!address || typeof address === "string") throw new Error("No loopback port");
36
+
37
+ return {
38
+ appUrl: `http://127.0.0.1:${address.port}/`,
39
+ // These counters make real HTTP reads and state-changing writes inspectable.
40
+ getReceipt: () => ({ greeted, messages, stateReads, serverClosed: !server.listening }),
41
+ async close() {
42
+ await new Promise((resolve, reject) => {
43
+ server.close((error) => error ? reject(error) : resolve(undefined));
44
+ server.closeAllConnections();
45
+ });
46
+ }
47
+ };
48
+ }
@@ -0,0 +1,104 @@
1
+ // @ts-check
2
+ import { LAB_CONFIG_SCHEMA, parseLabConfig, runLab, stableProgressKey, verifyRun } from "humanish";
3
+ import { startLocalApp } from "./app.mjs";
4
+
5
+ /** @param {string} appUrl @returns {import("humanish").CuaExecutor} */
6
+ function createAppContractExecutor(appUrl) {
7
+ return {
8
+ async observe() {
9
+ const response = await fetch(new URL("state", appUrl), { signal: AbortSignal.timeout(5000) });
10
+ if (!response.ok) throw new Error(`State read failed: HTTP ${response.status}`);
11
+ const state = await response.json();
12
+ if (typeof state?.greeted !== "boolean" || !Number.isInteger(state?.messages)) {
13
+ throw new Error("Unexpected app state");
14
+ }
15
+ const appState = { greeted: state.greeted, messages: state.messages };
16
+ return { stateSignature: stableProgressKey(appState), appState };
17
+ },
18
+ async execute(action, signal) {
19
+ signal?.throwIfAborted();
20
+ if (action.kind !== "type") throw new Error(`Unsupported app action: ${action.kind}`);
21
+ const response = await fetch(new URL("chat", appUrl), {
22
+ method: "POST",
23
+ body: action.text,
24
+ signal: AbortSignal.any([AbortSignal.timeout(5000), ...(signal ? [signal] : [])])
25
+ });
26
+ if (!response.ok) throw new Error(`Chat write failed: HTTP ${response.status}`);
27
+ }
28
+ };
29
+ }
30
+
31
+ // A deterministic rule, not an AI participant: no model SDK, requests or credentials.
32
+ /** @type {import("humanish").CuaProvider} */
33
+ const provider = {
34
+ id: "local-app-deterministic-example",
35
+ version: "1.0.0",
36
+ requiresFrame: false,
37
+ capabilities: {
38
+ headless: true,
39
+ structuredTrace: true,
40
+ lanes: ["computer-use"],
41
+ producesScreenshots: false,
42
+ byoModel: true,
43
+ preGrantableApprovals: false,
44
+ inProcessTools: false,
45
+ license: "open"
46
+ },
47
+ async nextTurn(request, signal) {
48
+ signal.throwIfAborted();
49
+ const greeted = request.observation.appState?.greeted;
50
+ if (typeof greeted !== "boolean") throw new Error("Missing greeted observation");
51
+ return {
52
+ actions: greeted ? [] : [{ kind: "type", text: "hello there" }],
53
+ pendingSafetyChecks: [],
54
+ done: greeted,
55
+ message: greeted ? "The app accepted the greeting." : "Sending a greeting."
56
+ };
57
+ }
58
+ };
59
+
60
+ const app = await startLocalApp();
61
+ try {
62
+ // parseLabConfig accepts a decoded OBJECT, not a YAML string.
63
+ const parsed = parseLabConfig({
64
+ schema: LAB_CONFIG_SCHEMA,
65
+ id: "state-driven-local-app-example",
66
+ title: "Deterministic local-app integration example",
67
+ subject: { source: "local-app", appUrl: app.appUrl },
68
+ // This registry id selects the CUA loop. buildProvider supplies the actual provider.
69
+ actors: [{ type: "openai-computer-use", persona: "pixel-pat", mission: "Greet the app." }],
70
+ scenario: { mode: "live" },
71
+ execution: { timeoutMs: 15_000 }
72
+ });
73
+ if (!parsed.ok) throw new Error(parsed.error.message);
74
+ const outcome = await runLab(parsed.config, {
75
+ cwd: process.cwd(),
76
+ dryRun: false,
77
+ cuaHooks: {
78
+ buildExecutor: async ({ appUrl }) => createAppContractExecutor(appUrl),
79
+ buildProvider: async () => provider
80
+ }
81
+ });
82
+ if (outcome.backend !== "cua") throw new Error(`Unexpected backend: ${outcome.backend}`);
83
+ const { result } = outcome;
84
+ const verified = await verifyRun(process.cwd(), result.runId);
85
+ console.log(JSON.stringify({
86
+ runId: result.runId,
87
+ ok: result.ok,
88
+ completionReason: result.session?.completionReason,
89
+ provider: provider.id,
90
+ sandboxCreated: result.sandbox !== undefined,
91
+ screenshots: result.session?.screenshots,
92
+ verification: verified,
93
+ app: app.getReceipt(),
94
+ // A mechanism statement, not an inference from missing provider usage/rates.
95
+ costBasis: "No model calls or hosted resources; only this process and loopback HTTP."
96
+ }, null, 2));
97
+ if (!result.ok || !verified.ok || result.session?.completionReason !== "goal_satisfied"
98
+ || result.sandbox !== undefined || !app.getReceipt().greeted) {
99
+ throw new Error(result.error?.message ?? "Local-app example did not complete and verify");
100
+ }
101
+ } finally {
102
+ await app.close();
103
+ console.log(JSON.stringify({ cleanup: app.getReceipt() }));
104
+ }
@@ -52,8 +52,9 @@ wait and does not cache a previous action's position.
52
52
  `redaction.screenshots` resolves to `"n/a"`. No fabricated `Buffer.alloc(0)`
53
53
  ever reaches disk. (A vision executor still returns a frame, exactly as before.)
54
54
  - **`stateSignature` is still required.** Derive it from your own state — e.g.
55
- `JSON.stringify({ route, turn, modal })`. It is the canonical fallback progress
56
- key when `appState` is absent. It is never written to the trace as text.
55
+ `stableProgressKey({ route, turn, modal })` (exported from `humanish`). It is the
56
+ canonical fallback progress key when `appState` is absent. It is never written
57
+ to the trace as text.
57
58
  - **`appState` is the preferred progress input.** When present, the loop's
58
59
  friction / no-progress detection keys off a deterministic, sorted-key,
59
60
  depth/length-capped projection of it (`stableProgressKey`) rather than the
@@ -168,33 +169,25 @@ from your own state, pair it with a non-vision `CuaProvider`, and call
168
169
 
169
170
  ### 2. `runLab` + `buildExecutor` / `buildProvider` (keeps the composition)
170
171
 
171
- The supported library path. It keeps personas, the Observer, the evidence
172
- bundle, redaction, and the friction loop, while skipping E2B entirely:
172
+ The supported library path keeps personas, the Observer, the evidence bundle,
173
+ redaction, and the friction loop, while skipping E2B entirely. Start with the
174
+ [complete runnable example](examples/state-driven-local-app/README.md), which
175
+ ships in the npm package:
173
176
 
174
- ```ts
175
- import { runLab, parseLabConfig, type CuaExecutor, type CuaProvider } from "humanish";
176
-
177
- // local-app YAML (shareable; fails closed without hooks):
178
- // schema: humanish.lab.v2
179
- // id: downstream-local-app-state
180
- // subject: { source: local-app, appUrl: http://localhost:5173 }
181
- // actors: [{ type: openai-computer-use, persona: curious-tester, mission: "…" }]
182
- // scenario: { mode: live }
183
- const parsed = parseLabConfig(yaml);
184
- if (!parsed.ok) throw new Error(parsed.error.message);
185
-
186
- const outcome = await runLab(parsed.config, {
187
- cwd: process.cwd(),
188
- dryRun: false,
189
- cuaHooks: {
190
- buildExecutor: async ({ appUrl }) => createAppContractExecutor(bridge, appUrl),
191
- buildProvider: async () => createStateBrain(),
192
- },
193
- });
194
- // outcome.backend === "cua"; outcome.result.sandbox === undefined (NO E2B); the
195
- // trace's provider id is the injected brain's id.
177
+ ```bash
178
+ npm install humanish
179
+ node node_modules/humanish/docs/architecture/examples/state-driven-local-app/runner.mjs
196
180
  ```
197
181
 
182
+ The example includes a real loopback app, HTTP state/action bridge, full config
183
+ object (`schema: LAB_CONFIG_SCHEMA`), deterministic non-vision provider,
184
+ `stableProgressKey`, `runLab`, verification, a printed report and `finally`
185
+ cleanup. It makes no model calls and does not demonstrate persona efficacy.
186
+ `parseLabConfig` accepts a decoded object, not a YAML string; narrow its result
187
+ on `.ok`, then narrow `runLab`'s result on `backend === "cua"` before accessing
188
+ the CUA result. The example defines all helpers rather than requiring a consumer
189
+ to reconstruct them.
190
+
198
191
  When `cuaHooks.buildExecutor` is set, `runCuaActorLab` takes a branch that NEVER
199
192
  loads the E2B module, creates a sandbox, runs `prepareDesktop`, provisions a
200
193
  clone, opens a browser, or starts a stream. `sandboxId`/`streamUrl` stay
@@ -3,7 +3,7 @@
3
3
  Date: 2026-06-02 (current-state note updated 2026-07-14)
4
4
 
5
5
  Status: reference map for the major contracts shipped through source version
6
- `0.88.0`; it is not an exhaustive inventory of command/result envelopes. Exported types,
6
+ `0.88.1`; it is not an exhaustive inventory of command/result envelopes. Exported types,
7
7
  schema constants, parsers, and validators in `src/` are authoritative. Rows
8
8
  marked "reserved" name layering intent only — no code emits or validates them
9
9
  yet. Do not emit a reserved schema.
@@ -210,7 +210,11 @@ A lab is a composition over code primitives, not a hardcoded kind:
210
210
  template actually used is recorded in the run bundle as `desktopTemplate`
211
211
  (public-safe — a template name is not a secret). Inert (warned) on every route
212
212
  that creates no desktop, incl. the in-process `local-app` cua route and the
213
- meta route — never silently ignored (invariant 6);
213
+ meta route — never silently ignored (invariant 6). Custom images need the
214
+ Desktop SDK's `xdotool` input support and `xclip` or `xsel` on `PATH` for
215
+ clipboard recovery when direct typing fails. If both clipboard utilities are
216
+ absent, recovery fails with `clipboard-utility-missing`; a dry-run does not
217
+ inspect the image's installed tools;
214
218
  - `execution.desktop.browser` (e2b-desktop computer-use/fan-out routes, plus
215
219
  sequential and concurrent shared-world actor seats): optional browser family
216
220
  preference: `default`, `chrome`, `chromium`, or `firefox`. Absent/default
@@ -1228,6 +1232,16 @@ the stream shape, the meaningful-use rubric, and hard-failure rules.
1228
1232
  Review summarizes whether evidence supports the claim. It does not replace
1229
1233
  verification or maintainer acceptance.
1230
1234
 
1235
+ `verdict` is the run gate result. `participants.reachedGoal` retains the count of
1236
+ recorded successful sessions; it is not an independent adjudication of their
1237
+ claims. Computer-use review and Observer labels distinguish a participant's
1238
+ reported completion from a recorded `stopWhen` or dwell condition match. A
1239
+ condition match establishes that condition, not every aspect of the mission.
1240
+ Missing or malformed completion evidence is labeled unavailable. Other actor
1241
+ routes retain their own completion semantics. Re-reading a historical review
1242
+ refreshes these labels without rewriting the original bundle or actor trace.
1243
+ Share-safety verification does not establish task success.
1244
+
1231
1245
  Core-owned fields:
1232
1246
 
1233
1247
  - `schema`
@@ -1,9 +1,9 @@
1
1
  # Current Goals
2
2
 
3
- Status date: 2026-09-11. Published baseline: `0.88.0`.
3
+ Status date: 2026-09-12. Published baseline: `0.88.1`.
4
4
 
5
5
  This page guides work on current merged source. Published behavior is described
6
- in the [release notes](../release/0.88.0-study-diagnostics.md).
6
+ in the [release notes](../release/0.88.1-completion-evidence-and-local-app.md).
7
7
  The [September 9 history](https://github.com/danielgwilson/humanish/blob/main/docs/goals/current-history-2026-09-09.md)
8
8
  preserves the former status log; its queues do not supersede this page.
9
9
 
@@ -88,7 +88,7 @@ requires decision-equivalent retained evidence and a real deletion branch.
88
88
  No first-party deletion branch has met that gate. Public demonstrations do not
89
89
  substitute for it.
90
90
 
91
- ## Current Program Truth (source `0.88.0`)
91
+ ## Current Program Truth (source `0.88.1`)
92
92
 
93
93
  | Surface | Available in merged source | Remaining boundary |
94
94
  | --- | --- | --- |
@@ -98,7 +98,7 @@ substitute for it.
98
98
  | Task protocol | Hidden criteria and per-task outcomes on supported per-lane CUA paths, including local-agent and desktop-cli | Shared-world, terminal-product, scripted and synthetic routes reject `tasks` before execution |
99
99
  | Shared state | Sequential and concurrent single-origin shared-world studies with retained evidence | Multi-origin implementation remains gated; concurrent state change does not establish per-action causation |
100
100
  | Observer | Live/recorded views, participant assignments, action-specific links, saved moments, zoom, comparison and phone-width review | Sparse captures cannot prove every action's effect; visual comparison alone is not a controlled experiment |
101
- | Review and feedback | Verification grades, feedback drafts, portable HTML and redacted bundle derivatives | Sharing requires the appropriate grade; generated findings still need adjudication |
101
+ | Review and feedback | Verification grades, feedback drafts, portable HTML, redacted bundle derivatives and computer-use completion-source labels | Sharing requires the appropriate grade; participant reports and condition matches still need task adjudication |
102
102
  | TUI and serving | Detached starts, run stopping, reclamation, Observer attachment, loopback serving and run library | Stopping a process does not itself prove sandbox cleanup; TUI views over CLI `stats`/`export` remain follow-ups |
103
103
  | Off-app communication | In-sandbox email/SMS catch and digest-only thread evidence | This does not establish real-provider delivery |
104
104
  | Mobile and media | Hosted viewport/emulation, desktop geometry checks, bounded dwell and declared camera feed | Physical-device and touch fidelity remain unproven; unsupported microphone declarations are rejected |
@@ -108,6 +108,11 @@ Use the [task support matrix](../architecture/task-protocol-support.md),
108
108
  and [CLI reference](https://humanish.dev/docs/cli) when choosing a concrete path.
109
109
  Source behavior and required tests outrank stale status prose.
110
110
 
111
+ The library-assisted `local-app` route now includes a
112
+ [runnable npm example](../architecture/examples/state-driven-local-app/README.md).
113
+ Its deterministic provider demonstrates the integration with a real loopback
114
+ app; it does not establish persona effectiveness or independent adoption.
115
+
111
116
  ## Gates And Deferred Work
112
117
 
113
118
  - Live OSS meta-lab execution remains disabled until repository-derived
@@ -2,7 +2,7 @@
2
2
 
3
3
  Status: public-safe contributor and agent ramp.
4
4
 
5
- Package/source version in this tree: `0.88.0` (2026-09-11). The Observer is phone-usable as a stated requirement (observer/AGENTS.md); interactive primitives start from Base UI. The Observer renderer is the observer/ workspace artifact only; the legacy string-concat renderer was deleted at cutover (#426), and rollback is a version pin to 0.42.0. The containment boundary introduced in
5
+ Package/source version in this tree: `0.88.1` (2026-09-12). The Observer is phone-usable as a stated requirement (observer/AGENTS.md); interactive primitives start from Base UI. The Observer renderer is the observer/ workspace artifact only; the legacy string-concat renderer was deleted at cutover (#426), and rollback is a version pin to 0.42.0. The containment boundary introduced in
6
6
  `0.15.1` remains in force: managed run and output paths bind to validated
7
7
  physical filesystem identities, and stored provider IDs are evidence, not
8
8
  cleanup authority. The bundled OSS meta-lab is dry-run only until
@@ -47,6 +47,12 @@ If a change does not improve one of those loops, it probably belongs elsewhere.
47
47
 
48
48
  ## Current State
49
49
 
50
+ The [0.88.1 release note](../release/0.88.1-completion-evidence-and-local-app.md)
51
+ describes computer-use labels that distinguish participant reports from
52
+ recorded condition matches. It also covers the complete npm local-app example
53
+ and public `stableProgressKey` export, plus the clipboard fallback correction
54
+ for inherited output pipes.
55
+
50
56
  The [0.88.0 release note](../release/0.88.0-study-diagnostics.md) describes
51
57
  computer-use CLI diagnostics, explicit local admission limits and retained
52
58
  uncertainty when an earlier provider request did not report usage.
@@ -0,0 +1,79 @@
1
+ # Humanish 0.88.1: distinguish reported completion from condition matches
2
+
3
+ When a computer-use participant says it finished, review and Observer now
4
+ label that completion as **participant-reported**. A recorded `stopWhen` match
5
+ or completed dwell window identifies a **recorded completion condition** instead.
6
+ Missing, malformed or conflicting completion evidence is labeled unavailable.
7
+ Zero-completion counts use **0/N recorded completions**, and aggregate stats use
8
+ **recorded goal completions**.
9
+
10
+ A matched condition establishes only that condition, not every aspect of the
11
+ mission. The run gate and share-safety verification remain separate from task
12
+ adjudication. This release adds no automatic semantic evaluator.
13
+
14
+ Existing actor statuses, `participants.reachedGoal`, verdict values and
15
+ denominators stay unchanged. Current review commands, Observer rendering and
16
+ newly generated feedback drafts apply these labels to older runs while
17
+ preserving original bundles and actor traces. Existing HTML exports keep their
18
+ original renderer. Other actor routes retain their own completion semantics.
19
+
20
+ ## Run a local app from npm
21
+
22
+ To connect your local app's state and actions to Humanish, start with the
23
+ [complete npm example](../architecture/examples/state-driven-local-app/README.md):
24
+
25
+ ```bash
26
+ npm install humanish@0.88.1
27
+ node node_modules/humanish/docs/architecture/examples/state-driven-local-app/runner.mjs
28
+ ```
29
+
30
+ It starts a synthetic loopback app, reads its state, sends a greeting through
31
+ its HTTP action endpoint and verifies the recorded run. A `finally` block closes
32
+ the app. The provider follows a deterministic rule, so the example needs no
33
+ model credentials or E2B desktop. Use Node.js 20.3 or later.
34
+
35
+ The runner supplies both `CuaExecutor` and `CuaProvider`, passes a decoded object
36
+ to `parseLabConfig`, and checks the config and backend discriminants. The
37
+ existing `stableProgressKey` utility is now exported from `humanish`, so callers
38
+ can use the same bounded state projection as the loop. Replace the two ports
39
+ with your app bridge and provider; the example guide explains the responsibilities
40
+ that remain with them.
41
+
42
+ ## Clipboard fallback returns after the write
43
+
44
+ When direct desktop typing fails, Humanish can write the text to the X clipboard
45
+ and paste it. `xclip` and `xsel` fork a process to keep the selection available;
46
+ inherited output pipes could leave the command runner waiting until timeout.
47
+ Both clipboard-write commands now detach their output while preserving the
48
+ existing exit checks, temporary-file cleanup and paste dispatch.
49
+
50
+ Custom desktop images still need a working `xclip` or `xsel`. Missing utilities
51
+ continue to report `clipboard-utility-missing`. This patch adds no typing retry,
52
+ and recovery after a primary write inserted an unknown partial prefix remains
53
+ unproven. [Issue #340](https://github.com/danielgwilson/humanish/issues/340) remains
54
+ open for that broader typing problem.
55
+
56
+ ## Verification and limits
57
+
58
+ [Completion label checks](https://github.com/danielgwilson/humanish/pull/765)
59
+ cover participant reports, recorded condition matches, zero completions and
60
+ unavailable legacy detail. They preserve recorded counts and statuses while
61
+ refreshing historical review and feedback projections. Existing adapter
62
+ narrative remains available.
63
+
64
+ [The packaged example](https://github.com/danielgwilson/humanish/pull/762) completed
65
+ two independent local runs on Node 20.20.2 and 24.12.0. Each made two HTTP state
66
+ reads and one state-changing request, reached `goal_satisfied`, verified as
67
+ `share_ready` and closed its server. These checks used locally packed candidate
68
+ source labeled 0.88.0, distinct from the registry release with that version.
69
+
70
+ [The clipboard correction](https://github.com/danielgwilson/humanish/pull/761)
71
+ passed two real desktop conformance cases, one with explicitly installed `xclip`
72
+ and one with `xsel`. Each preserved the exact Unicode/newline/quoted text with
73
+ one paste and removed its transfer file. Both cases refused the primary write
74
+ before it could type anything. They do not establish default-image clipboard
75
+ availability or recovery from partial typing.
76
+
77
+ Both checks were model-free. They establish the tested integration and executor
78
+ behavior; persona effectiveness and independent maintainer adoption remain
79
+ separate questions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "humanish",
3
- "version": "0.88.0",
3
+ "version": "0.88.1",
4
4
  "description": "Open-source-safe CLI for persona simulation, observer review, and public-safe feedback drafts.",
5
5
  "author": "Daniel G Wilson <daniel@danielgwilson.com>",
6
6
  "keywords": [