humanish 0.0.1 → 0.15.0
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/AGENTS.md +77 -0
- package/CONTRIBUTING.md +39 -0
- package/LICENSE +21 -0
- package/README.md +435 -8
- package/SECURITY.md +34 -0
- package/dist/actor-contract.d.ts +107 -0
- package/dist/actor-contract.js +286 -0
- package/dist/actor-contract.js.map +1 -0
- package/dist/actor-registry.d.ts +73 -0
- package/dist/actor-registry.js +93 -0
- package/dist/actor-registry.js.map +1 -0
- package/dist/adapter-extension.d.ts +54 -0
- package/dist/adapter-extension.js +214 -0
- package/dist/adapter-extension.js.map +1 -0
- package/dist/argv.d.ts +1 -0
- package/dist/argv.js +8 -0
- package/dist/argv.js.map +1 -0
- package/dist/artifact-reference.d.ts +22 -0
- package/dist/artifact-reference.js +47 -0
- package/dist/artifact-reference.js.map +1 -0
- package/dist/browser-evidence-hygiene.d.ts +7 -0
- package/dist/browser-evidence-hygiene.js +40 -0
- package/dist/browser-evidence-hygiene.js.map +1 -0
- package/dist/claude-agent-sdk.d.ts +94 -0
- package/dist/claude-agent-sdk.js +356 -0
- package/dist/claude-agent-sdk.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +5 -0
- package/dist/cli.js.map +1 -0
- package/dist/codex-app-server-ui.d.ts +39 -0
- package/dist/codex-app-server-ui.js +327 -0
- package/dist/codex-app-server-ui.js.map +1 -0
- package/dist/codex-app-server.d.ts +141 -0
- package/dist/codex-app-server.js +747 -0
- package/dist/codex-app-server.js.map +1 -0
- package/dist/command-failure.d.ts +29 -0
- package/dist/command-failure.js +54 -0
- package/dist/command-failure.js.map +1 -0
- package/dist/computer-use-actor.d.ts +52 -0
- package/dist/computer-use-actor.js +48 -0
- package/dist/computer-use-actor.js.map +1 -0
- package/dist/computer-use.d.ts +232 -0
- package/dist/computer-use.js +615 -0
- package/dist/computer-use.js.map +1 -0
- package/dist/concurrency.d.ts +1 -0
- package/dist/concurrency.js +27 -0
- package/dist/concurrency.js.map +1 -0
- package/dist/concurrent-shared-world-lab.d.ts +115 -0
- package/dist/concurrent-shared-world-lab.js +1092 -0
- package/dist/concurrent-shared-world-lab.js.map +1 -0
- package/dist/core/git-state.d.ts +31 -0
- package/dist/core/git-state.js +142 -0
- package/dist/core/git-state.js.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +3 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/run-primitives.d.ts +66 -0
- package/dist/core/run-primitives.js +120 -0
- package/dist/core/run-primitives.js.map +1 -0
- package/dist/cua-actor-lab.d.ts +620 -0
- package/dist/cua-actor-lab.js +2834 -0
- package/dist/cua-actor-lab.js.map +1 -0
- package/dist/device-presets.d.ts +67 -0
- package/dist/device-presets.js +50 -0
- package/dist/device-presets.js.map +1 -0
- package/dist/e2b-desktop-executor.d.ts +101 -0
- package/dist/e2b-desktop-executor.js +309 -0
- package/dist/e2b-desktop-executor.js.map +1 -0
- package/dist/e2b-desktop-launch.d.ts +144 -0
- package/dist/e2b-desktop-launch.js +59 -0
- package/dist/e2b-desktop-launch.js.map +1 -0
- package/dist/e2b-detached.d.ts +53 -0
- package/dist/e2b-detached.js +130 -0
- package/dist/e2b-detached.js.map +1 -0
- package/dist/e2b-terminal-lab.d.ts +345 -0
- package/dist/e2b-terminal-lab.js +1467 -0
- package/dist/e2b-terminal-lab.js.map +1 -0
- package/dist/env-file.d.ts +14 -0
- package/dist/env-file.js +108 -0
- package/dist/env-file.js.map +1 -0
- package/dist/feedback.d.ts +51 -0
- package/dist/feedback.js +313 -0
- package/dist/feedback.js.map +1 -0
- package/dist/image-evidence.d.ts +2 -0
- package/dist/image-evidence.js +33 -0
- package/dist/image-evidence.js.map +1 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/init-templates.d.ts +12 -0
- package/dist/init-templates.js +369 -0
- package/dist/init-templates.js.map +1 -0
- package/dist/init.d.ts +26 -0
- package/dist/init.js +343 -0
- package/dist/init.js.map +1 -0
- package/dist/lab-app-runner.d.ts +78 -0
- package/dist/lab-app-runner.js +403 -0
- package/dist/lab-app-runner.js.map +1 -0
- package/dist/lab-config.d.ts +578 -0
- package/dist/lab-config.js +1751 -0
- package/dist/lab-config.js.map +1 -0
- package/dist/lab-engine.d.ts +77 -0
- package/dist/lab-engine.js +216 -0
- package/dist/lab-engine.js.map +1 -0
- package/dist/lab-preflight.d.ts +67 -0
- package/dist/lab-preflight.js +385 -0
- package/dist/lab-preflight.js.map +1 -0
- package/dist/labs.d.ts +53 -0
- package/dist/labs.js +176 -0
- package/dist/labs.js.map +1 -0
- package/dist/observer-assets.d.ts +2 -0
- package/dist/observer-assets.js +2630 -0
- package/dist/observer-assets.js.map +1 -0
- package/dist/observer-data.d.ts +63 -0
- package/dist/observer-data.js +145 -0
- package/dist/observer-data.js.map +1 -0
- package/dist/observer-static.d.ts +39 -0
- package/dist/observer-static.js +192 -0
- package/dist/observer-static.js.map +1 -0
- package/dist/observer.d.ts +46 -0
- package/dist/observer.js +353 -0
- package/dist/observer.js.map +1 -0
- package/dist/openai-responses-cu.d.ts +113 -0
- package/dist/openai-responses-cu.js +531 -0
- package/dist/openai-responses-cu.js.map +1 -0
- package/dist/oss-lab.d.ts +52 -0
- package/dist/oss-lab.js +299 -0
- package/dist/oss-lab.js.map +1 -0
- package/dist/oss-meta-lab-scoring.d.ts +15 -0
- package/dist/oss-meta-lab-scoring.js +145 -0
- package/dist/oss-meta-lab-scoring.js.map +1 -0
- package/dist/oss-meta-lab.d.ts +279 -0
- package/dist/oss-meta-lab.js +4889 -0
- package/dist/oss-meta-lab.js.map +1 -0
- package/dist/oss-remote-telemetry.d.ts +77 -0
- package/dist/oss-remote-telemetry.js +403 -0
- package/dist/oss-remote-telemetry.js.map +1 -0
- package/dist/persona.d.ts +35 -0
- package/dist/persona.js +133 -0
- package/dist/persona.js.map +1 -0
- package/dist/pi-agent-core.d.ts +77 -0
- package/dist/pi-agent-core.js +203 -0
- package/dist/pi-agent-core.js.map +1 -0
- package/dist/program.d.ts +54 -0
- package/dist/program.js +2347 -0
- package/dist/program.js.map +1 -0
- package/dist/redaction.d.ts +90 -0
- package/dist/redaction.js +292 -0
- package/dist/redaction.js.map +1 -0
- package/dist/run.d.ts +784 -0
- package/dist/run.js +4555 -0
- package/dist/run.js.map +1 -0
- package/dist/scripted-browser-actor.d.ts +294 -0
- package/dist/scripted-browser-actor.js +1286 -0
- package/dist/scripted-browser-actor.js.map +1 -0
- package/dist/scripted-browser-lab.d.ts +107 -0
- package/dist/scripted-browser-lab.js +738 -0
- package/dist/scripted-browser-lab.js.map +1 -0
- package/dist/shared-world-lab.d.ts +208 -0
- package/dist/shared-world-lab.js +1048 -0
- package/dist/shared-world-lab.js.map +1 -0
- package/dist/source-archive.d.ts +82 -0
- package/dist/source-archive.js +365 -0
- package/dist/source-archive.js.map +1 -0
- package/dist/stop-conditions.d.ts +26 -0
- package/dist/stop-conditions.js +66 -0
- package/dist/stop-conditions.js.map +1 -0
- package/dist/terminal-agent-actor.d.ts +36 -0
- package/dist/terminal-agent-actor.js +23 -0
- package/dist/terminal-agent-actor.js.map +1 -0
- package/docs/architecture/actor-contract.md +431 -0
- package/docs/architecture/github-feedback-loop.md +189 -0
- package/docs/architecture/local-codex-tui-actor.md +213 -0
- package/docs/architecture/observer.md +118 -0
- package/docs/architecture/oss-lab-poc.md +242 -0
- package/docs/architecture/project-layout.md +166 -0
- package/docs/architecture/state-driven-executor.md +203 -0
- package/docs/architecture/terminal-product-lane.md +148 -0
- package/docs/contracts/adapter-fixtures.md +80 -0
- package/docs/contracts/core.md +71 -0
- package/docs/contracts/feedback.md +145 -0
- package/docs/contracts/policy.md +305 -0
- package/docs/contracts/run-bundle.md +358 -0
- package/docs/contracts/schemas.md +984 -0
- package/docs/goals/current.md +409 -0
- package/docs/principles/invariants-and-defaults.md +135 -0
- package/docs/principles/self-driving-harness.md +129 -0
- package/docs/product/open-source-install-experience.md +229 -0
- package/docs/ramp/README.md +200 -0
- package/docs/release/open-source-readiness.md +208 -0
- package/docs/release/public-readiness-standard.md +205 -0
- package/docs/roadmap/world-class-open-source-v0.md +311 -0
- package/package.json +102 -8
- package/skills/humanish/SKILL.md +244 -0
- package/skills/humanish/agents/openai.yaml +7 -0
- package/index.js +0 -1
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Public GitHub Feedback Loop Architecture
|
|
2
|
+
|
|
3
|
+
Date: 2026-06-01
|
|
4
|
+
|
|
5
|
+
Status: design note. The v0 dry-run issue draft path is implemented locally;
|
|
6
|
+
live GitHub mutation remains out of scope.
|
|
7
|
+
|
|
8
|
+
## Goal
|
|
9
|
+
|
|
10
|
+
Make feedback a first-class CLI path that can safely turn persona simulation
|
|
11
|
+
evidence into a public-safe GitHub issue draft without requiring hosted
|
|
12
|
+
infrastructure or GitHub credentials.
|
|
13
|
+
|
|
14
|
+
Target loop:
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
humanish run
|
|
18
|
+
-> run bundle
|
|
19
|
+
-> humanish review
|
|
20
|
+
-> humanish verify
|
|
21
|
+
-> humanish feedback draft
|
|
22
|
+
-> humanish feedback issue
|
|
23
|
+
-> user files public GitHub issue
|
|
24
|
+
-> maintainer triage / project cockpit
|
|
25
|
+
-> scoped implementation when accepted
|
|
26
|
+
-> rerun
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Public And Privacy Boundary
|
|
30
|
+
|
|
31
|
+
The GitHub loop must assume repository contents, issue bodies, project fields,
|
|
32
|
+
and future examples may become public.
|
|
33
|
+
|
|
34
|
+
Never place PII, PHI, secrets, tokens, raw customer data, raw patient data,
|
|
35
|
+
private transcripts, private screenshots, private source snippets, or provider
|
|
36
|
+
payloads into GitHub. Feedback drafting must redact or block unsafe fields
|
|
37
|
+
before printing an issue body or issue URL.
|
|
38
|
+
|
|
39
|
+
## Command Shape
|
|
40
|
+
|
|
41
|
+
Likely v0 commands:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
humanish feedback list --run latest
|
|
45
|
+
humanish feedback draft --run latest --json
|
|
46
|
+
humanish feedback verify --run latest --json
|
|
47
|
+
humanish feedback issue --run latest --repo owner/repo --format markdown
|
|
48
|
+
humanish feedback issue-url --run latest --repo owner/repo
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`issue` and `issue-url` should fail closed unless the draft contains:
|
|
52
|
+
|
|
53
|
+
- run id;
|
|
54
|
+
- adapter id;
|
|
55
|
+
- scenario id;
|
|
56
|
+
- persona id or persona class;
|
|
57
|
+
- actor runtime;
|
|
58
|
+
- substrate;
|
|
59
|
+
- failure owner;
|
|
60
|
+
- observed behavior;
|
|
61
|
+
- expected behavior;
|
|
62
|
+
- evidence pointers;
|
|
63
|
+
- redaction result;
|
|
64
|
+
- duplicate/idempotency key;
|
|
65
|
+
- proposed next state;
|
|
66
|
+
- acceptance proof.
|
|
67
|
+
|
|
68
|
+
The default public CLI should not create GitHub issues, update Projects, call
|
|
69
|
+
hosted queues, require tokens, or depend on private infrastructure. It should
|
|
70
|
+
produce a high-quality issue draft and clear filing instructions.
|
|
71
|
+
|
|
72
|
+
## Feedback States
|
|
73
|
+
|
|
74
|
+
| State | Meaning | GitHub action |
|
|
75
|
+
| --- | --- | --- |
|
|
76
|
+
| `watch` | Useful observation, not yet work | Keep as bundle-local feedback or low-priority issue |
|
|
77
|
+
| `needs_spec` | Real signal, scope unclear | Create issue with spec task |
|
|
78
|
+
| `spec_ready` | Docs/spec work can clarify it | Create issue with docs-only authority |
|
|
79
|
+
| `agent_ready` | Narrow enough for autonomous PR draft | Include readiness block for maintainers |
|
|
80
|
+
| `blocked` | Needs human/operator input | Create or update issue with blocker |
|
|
81
|
+
| `wontfix` | Accounted for and rejected | Keep in review packet; no issue by default |
|
|
82
|
+
|
|
83
|
+
## Issue Body Contract
|
|
84
|
+
|
|
85
|
+
Promoted feedback should use this stable body shape:
|
|
86
|
+
|
|
87
|
+
```yaml
|
|
88
|
+
humanish_feedback:
|
|
89
|
+
schema: humanish.feedback.v1
|
|
90
|
+
run_id: "<run-id>"
|
|
91
|
+
adapter_id: "<adapter-id>"
|
|
92
|
+
scenario_id: "<scenario-id>"
|
|
93
|
+
persona_id: "<persona-id-or-class>"
|
|
94
|
+
actor: "<actor-runtime>"
|
|
95
|
+
substrate: "<substrate>"
|
|
96
|
+
failure_owner: "harness|target-app|actor|environment|unknown"
|
|
97
|
+
source_bundle: "<path-or-url>"
|
|
98
|
+
evidence:
|
|
99
|
+
- "<relative artifact pointer>"
|
|
100
|
+
redaction:
|
|
101
|
+
status: passed
|
|
102
|
+
notes: "no sensitive data promoted"
|
|
103
|
+
idempotency_key: "<stable-key>"
|
|
104
|
+
proposed_next_state: "watch|needs_spec|spec_ready|agent_ready|blocked"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
For maintainer/agent-ready work, the issue can also include:
|
|
108
|
+
|
|
109
|
+
```yaml
|
|
110
|
+
humanish_swarm:
|
|
111
|
+
schema: humanish.swarm-readiness.v1
|
|
112
|
+
status: needs_spec
|
|
113
|
+
authority: draft_spec
|
|
114
|
+
blocked_by: []
|
|
115
|
+
can_parallel_with: []
|
|
116
|
+
exclusive_files: []
|
|
117
|
+
allowed_write_paths:
|
|
118
|
+
- docs/**
|
|
119
|
+
denied_write_paths:
|
|
120
|
+
- .env*
|
|
121
|
+
- .github/workflows/**
|
|
122
|
+
- infra/**
|
|
123
|
+
artifact_schema_version: humanish.run-bundle.v1
|
|
124
|
+
credential_manifest: []
|
|
125
|
+
network_policy: no_network
|
|
126
|
+
spend_policy: no_spend
|
|
127
|
+
idempotency_key: "<issue-or-feedback-key>"
|
|
128
|
+
proof_commands:
|
|
129
|
+
- "<exact command>"
|
|
130
|
+
telemetry_expectations:
|
|
131
|
+
- "none for docs-only work"
|
|
132
|
+
stop_conditions:
|
|
133
|
+
- "required field missing"
|
|
134
|
+
- "changed files outside allowed_write_paths"
|
|
135
|
+
- "proof command fails"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The readiness block is authority, not decoration. Labels and Project fields may
|
|
139
|
+
mirror it, but they do not replace it.
|
|
140
|
+
|
|
141
|
+
## Labels
|
|
142
|
+
|
|
143
|
+
Initial label taxonomy:
|
|
144
|
+
|
|
145
|
+
| Label | Meaning |
|
|
146
|
+
| --- | --- |
|
|
147
|
+
| `product-feedback` | Persona/user friction captured as public-safe feedback |
|
|
148
|
+
| `agent-candidate` | May become autonomous work after spec/readiness |
|
|
149
|
+
| `needs-spec` | Requires scope or acceptance criteria before mutation |
|
|
150
|
+
| `agent-ready` | Has valid readiness block and narrow write scope |
|
|
151
|
+
| `proof-required` | Cannot close without run bundle or command proof |
|
|
152
|
+
| `harness` | Harness/core/observer/review work |
|
|
153
|
+
| `adapter` | Product adapter work |
|
|
154
|
+
| `feedback-loop` | Feedback, issue-draft, or queue plumbing |
|
|
155
|
+
| `privacy-boundary` | Public/PII/PHI/secret-safety concern |
|
|
156
|
+
|
|
157
|
+
## GitHub Projects
|
|
158
|
+
|
|
159
|
+
Projects are useful for maintainer operating visibility, not canonical truth.
|
|
160
|
+
The public CLI should not require Projects. Canonical state should live in:
|
|
161
|
+
|
|
162
|
+
- issue body YAML blocks;
|
|
163
|
+
- labels;
|
|
164
|
+
- issue comments;
|
|
165
|
+
- PR bodies;
|
|
166
|
+
- checks;
|
|
167
|
+
- run bundles and proof artifacts.
|
|
168
|
+
|
|
169
|
+
The first maintainer Project can track broad workstreams and status. It should
|
|
170
|
+
not be the only place a field such as authority, write scope, or proof command
|
|
171
|
+
exists.
|
|
172
|
+
|
|
173
|
+
## Issue Draft Rules
|
|
174
|
+
|
|
175
|
+
- Capture generously, execute rigorously.
|
|
176
|
+
- Vague feedback can become `watch`; it cannot become `agent_ready`.
|
|
177
|
+
- A GitHub issue may say `contributes to` broader goals, but should not say
|
|
178
|
+
`closes` without product proof.
|
|
179
|
+
- The issue draft includes an idempotency key so maintainers can dedupe.
|
|
180
|
+
- Redaction failure blocks issue drafting.
|
|
181
|
+
- Missing evidence blocks issue drafting.
|
|
182
|
+
- Any PII/PHI/secret ambiguity blocks issue drafting.
|
|
183
|
+
|
|
184
|
+
## Optional Maintainer Tooling
|
|
185
|
+
|
|
186
|
+
Maintainers may later add repo-local tooling that reads a verified draft and
|
|
187
|
+
uses GitHub APIs to create or update issues. That tooling should be separate
|
|
188
|
+
from the default public CLI, dry-run first, token-explicit, and disabled unless
|
|
189
|
+
the maintainer asks for mutation.
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# Local Codex TUI Actor Contract
|
|
2
|
+
|
|
3
|
+
Date: 2026-06-02
|
|
4
|
+
|
|
5
|
+
Status: incremental implementation on issue #28. The repo supports one explicit
|
|
6
|
+
local Codex TUI actor with sanitized lifecycle evidence and fail-fast Codex
|
|
7
|
+
workspace-trust preflight. It also supports explicit noninteractive
|
|
8
|
+
`codex-exec` actor fanout for autonomous local dogfood proof. Requested exec
|
|
9
|
+
lanes are not capped by total run count; they run through bounded concurrency
|
|
10
|
+
controlled by `HUMANISH_LOCAL_CODEX_EXEC_MAX_CONCURRENCY` (default 4). TUI
|
|
11
|
+
autonomous completion and TUI live Observer follow remain follow-up work.
|
|
12
|
+
|
|
13
|
+
## Goal
|
|
14
|
+
|
|
15
|
+
Let `humanish run` dogfood `humanish` with a real local Codex TUI actor while
|
|
16
|
+
preserving the public-safe harness contract:
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
spawn actor
|
|
20
|
+
-> submit bounded prompt
|
|
21
|
+
-> stream sanitized lifecycle events
|
|
22
|
+
-> write run bundle
|
|
23
|
+
-> render Observer while active
|
|
24
|
+
-> verify final bundle
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This actor proves the local harness substrate. It must not claim target product
|
|
28
|
+
behavior beyond the commands and artifacts it actually observes.
|
|
29
|
+
|
|
30
|
+
## Explicit Opt-In
|
|
31
|
+
|
|
32
|
+
The first live actor must require an explicit flag or env var. Non-dry-run
|
|
33
|
+
without opt-in should continue to fail closed.
|
|
34
|
+
|
|
35
|
+
Suggested gate:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
humanish run --actor codex-tui --sims 1 --timeout-ms 240000
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
or, for noninteractive local autonomy:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
humanish run --actor codex-exec --sims 4 --timeout-ms 240000
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
or:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
HUMANISH_ENABLE_LOCAL_CODEX_TUI=1 humanish run --sims 1
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
or:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
HUMANISH_ENABLE_LOCAL_CODEX_EXEC=1 humanish run --sims 1
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Provider spend, E2B, GitHub mutation, and external network calls remain off
|
|
60
|
+
unless separately and explicitly requested. When real Codex exec auth is used,
|
|
61
|
+
`HUMANISH_LOCAL_CODEX_EXEC_MAX_CONCURRENCY` is the cost/resource rail; there is
|
|
62
|
+
no arbitrary total lane cap.
|
|
63
|
+
|
|
64
|
+
For deterministic tests or local substrate debugging, `HUMANISH_CODEX_ACTOR_COMMAND`
|
|
65
|
+
can point at a safe fixture command. Real Codex TUI launch uses a Linux
|
|
66
|
+
`script` PTY wrapper when available because the Codex TUI requires a terminal.
|
|
67
|
+
Humanish answers the minimal terminal cursor/color queries needed for headless
|
|
68
|
+
TUI startup and normalizes terminal control sequences before classifying the
|
|
69
|
+
final actor transcript. Once a final
|
|
70
|
+
`HUMANISH_ACTOR_VERDICT=* HUMANISH_ACTOR_NONCE=<run-nonce>` marker appears,
|
|
71
|
+
Humanish terminates the local actor process and records the marker verdict rather
|
|
72
|
+
than waiting for the TUI session to stay open until timeout. The nonce prevents
|
|
73
|
+
the classifier from accepting an echoed prompt or inspected docs as a final
|
|
74
|
+
actor verdict.
|
|
75
|
+
Real Codex exec launch uses `codex exec --skip-git-repo-check --ignore-rules
|
|
76
|
+
--ephemeral --sandbox read-only --json` so it can complete without an
|
|
77
|
+
interactive TUI trust prompt while still running with read-only local command
|
|
78
|
+
permissions.
|
|
79
|
+
|
|
80
|
+
## Lifecycle Events
|
|
81
|
+
|
|
82
|
+
The actor should append deterministic events to `events.ndjson`:
|
|
83
|
+
|
|
84
|
+
| Event | Required fields |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| `actor.spawned` | `simId`, `streamId`, command name, cwd, startedAt |
|
|
87
|
+
| `actor.prompt.submitted` | prompt digest, prompt class, no raw prompt if unsafe |
|
|
88
|
+
| `actor.running` | running snapshot available in `run.json` and `observer/observer-data.json` |
|
|
89
|
+
| `actor.observation` | sanitized transcript tail, byte count, redaction status |
|
|
90
|
+
| `actor.artifact` | relative artifact path, kind, digest |
|
|
91
|
+
| `actor.verdict` | `passed`, `failed`, `blocked`, or `timed_out`; reason |
|
|
92
|
+
| `actor.exited` | exit code, signal, durationMs |
|
|
93
|
+
| `actor.timeout` | timeoutMs, last safe observation |
|
|
94
|
+
| `actor.cancelled` | signal and operator reason |
|
|
95
|
+
|
|
96
|
+
The Observer should be able to render a live terminal stream from those events
|
|
97
|
+
while the actor is active, then render the final transcript and artifacts after
|
|
98
|
+
exit.
|
|
99
|
+
|
|
100
|
+
For local Codex actors, the run writes a provisional running bundle and
|
|
101
|
+
`observer/observer-data.json` before awaiting actor completion, then refreshes
|
|
102
|
+
those files with final verdicts and artifact links. This lets an existing
|
|
103
|
+
served Observer poll the same local evidence path during the run.
|
|
104
|
+
|
|
105
|
+
## Runtime State
|
|
106
|
+
|
|
107
|
+
All generated state stays under ignored `.humanish/`:
|
|
108
|
+
|
|
109
|
+
```text
|
|
110
|
+
.humanish/runs/<run-id>/
|
|
111
|
+
run.json
|
|
112
|
+
review.json
|
|
113
|
+
review.md
|
|
114
|
+
events.ndjson
|
|
115
|
+
actor.json
|
|
116
|
+
actors/sim-02-codex-exec.json
|
|
117
|
+
transcripts/codex-tui-sanitized.txt
|
|
118
|
+
transcripts/codex-exec-sanitized.jsonl
|
|
119
|
+
transcripts/sim-02-codex-exec-sanitized.jsonl
|
|
120
|
+
observer/
|
|
121
|
+
index.html
|
|
122
|
+
observer-data.json
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
No raw terminal output is public by default. The transcript artifact must be
|
|
126
|
+
sanitized before it is linked from the bundle.
|
|
127
|
+
|
|
128
|
+
For TUI runs, `.humanish/runs/latest.json` is published only after a valid
|
|
129
|
+
running bundle, review, and Observer data exist, then refreshed after final
|
|
130
|
+
artifacts exist. This keeps `humanish verify --run latest` from pointing at an
|
|
131
|
+
incomplete TUI run while still allowing live Observer follow on the active run.
|
|
132
|
+
|
|
133
|
+
## Redaction Rules
|
|
134
|
+
|
|
135
|
+
Before any transcript tail or event payload is written:
|
|
136
|
+
|
|
137
|
+
- redact OpenAI, E2B, GitHub, npm, and generic private-key patterns;
|
|
138
|
+
- redact absolute local home/workspace paths when they are not necessary for
|
|
139
|
+
proof;
|
|
140
|
+
- block the run if redaction cannot prove `status: passed`;
|
|
141
|
+
- record env var names only, never values.
|
|
142
|
+
|
|
143
|
+
## Initial Prompt Class
|
|
144
|
+
|
|
145
|
+
The first actor prompt should be bounded to public-safe dogfood work:
|
|
146
|
+
|
|
147
|
+
- inspect `humanish/` dogfood config;
|
|
148
|
+
- run at most two read-only inspection commands;
|
|
149
|
+
- avoid commands that write runtime artifacts or temp config, including
|
|
150
|
+
`pnpm humanish`, `humanish watch`, `humanish feedback`, `humanish init`, tests,
|
|
151
|
+
builds, installs, and commands that write `.humanish/`;
|
|
152
|
+
- inspect existing artifacts and explain the strongest write-required proof as a
|
|
153
|
+
follow-up when the TUI actor is running in a read-only sandbox;
|
|
154
|
+
- use `passed` when read-only inspection confirms the committed harness and
|
|
155
|
+
existing evidence contract; write-required follow-ups alone are not blockers;
|
|
156
|
+
- do not commit, push, publish, file issues, or print secrets;
|
|
157
|
+
- summarize blockers using public-safe evidence paths;
|
|
158
|
+
- finish with exactly one final
|
|
159
|
+
`HUMANISH_ACTOR_VERDICT=<status> HUMANISH_ACTOR_NONCE=<run-nonce>` line, where
|
|
160
|
+
`<status>` is `passed`, `blocked`, or `failed`.
|
|
161
|
+
|
|
162
|
+
The raw prompt can live in source only if it contains no private context and no
|
|
163
|
+
credential values.
|
|
164
|
+
|
|
165
|
+
## Stop Conditions
|
|
166
|
+
|
|
167
|
+
The actor must stop and mark the lane `blocked` or `failed` if:
|
|
168
|
+
|
|
169
|
+
- Codex CLI is not installed or not authenticated;
|
|
170
|
+
- a command requests approval in a non-interactive run;
|
|
171
|
+
- redaction fails;
|
|
172
|
+
- output contains a likely secret after redaction;
|
|
173
|
+
- the actor touches files outside allowed runtime paths without explicit scope;
|
|
174
|
+
- timeout is reached.
|
|
175
|
+
|
|
176
|
+
## Known First-Slice Boundary
|
|
177
|
+
|
|
178
|
+
The first real local TUI proof in this environment reached Codex's workspace
|
|
179
|
+
trust prompt. The current TUI implementation detects missing exact project-root
|
|
180
|
+
trust before spawn and writes a `blocked` run bundle instead of waiting for the
|
|
181
|
+
TUI timeout. A follow-up PTY probe showed that the Codex TUI still prompts when
|
|
182
|
+
only a trusted ancestor is configured, so Humanish only treats the exact trust
|
|
183
|
+
root as sufficient for autonomous launch.
|
|
184
|
+
|
|
185
|
+
With exact trust present, Humanish answers Codex's terminal startup query, strips
|
|
186
|
+
TUI control sequences from the captured transcript, and terminates/classifies on
|
|
187
|
+
an explicit nonce-bearing `HUMANISH_ACTOR_VERDICT=*` marker when present. If
|
|
188
|
+
Codex exits cleanly without a marker, the run is still considered process-passed
|
|
189
|
+
but the transcript remains available for review.
|
|
190
|
+
|
|
191
|
+
The noninteractive `codex-exec` mode is a separate actor contract for autonomous
|
|
192
|
+
local completion. It can run requested bounded read-only lanes with distinct
|
|
193
|
+
focuses across install readability, public safety, Observer evidence, and
|
|
194
|
+
verification/release gates. It does not replace the TUI contract because it does
|
|
195
|
+
not prove PTY rendering, keyboard focus, or visible live TUI observation.
|
|
196
|
+
|
|
197
|
+
The next implementation slice should decide whether TUI-specific fanout is
|
|
198
|
+
needed beyond the current 1x TUI proof plus bounded-concurrency noninteractive
|
|
199
|
+
`codex-exec` fanout split.
|
|
200
|
+
|
|
201
|
+
## Acceptance For First Slice
|
|
202
|
+
|
|
203
|
+
The implementation slice for this spec should prove:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
pnpm humanish:doctor
|
|
207
|
+
pnpm humanish -- run --actor codex-tui --sims 1 --timeout-ms 240000 --json
|
|
208
|
+
pnpm humanish -- run --actor codex-exec --sims 1 --timeout-ms 240000 --json
|
|
209
|
+
pnpm humanish -- run --actor codex-exec --sims 4 --timeout-ms 240000 --json
|
|
210
|
+
pnpm humanish -- watch --run latest --detach --json --no-open
|
|
211
|
+
pnpm humanish -- verify --run latest --json
|
|
212
|
+
pnpm check
|
|
213
|
+
```
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Observer Architecture
|
|
2
|
+
|
|
3
|
+
Date: 2026-06-01
|
|
4
|
+
|
|
5
|
+
Status: implemented for synthetic stream contracts and local `codex-exec`
|
|
6
|
+
active-run Observer snapshots; broader live actor adapters next.
|
|
7
|
+
|
|
8
|
+
## Decision
|
|
9
|
+
|
|
10
|
+
The Observer is a mission-control surface over durable run artifacts, not a
|
|
11
|
+
static report page.
|
|
12
|
+
|
|
13
|
+
Every run writes immutable local evidence under `.humanish/runs/<run-id>/`:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
.humanish/runs/<run-id>/
|
|
17
|
+
run.json
|
|
18
|
+
review.json
|
|
19
|
+
review.md
|
|
20
|
+
events.ndjson
|
|
21
|
+
observer/
|
|
22
|
+
index.html
|
|
23
|
+
observer-data.json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`run.json` remains the source bundle. `observer/observer-data.json` is the
|
|
27
|
+
normalized view model consumed by the Observer. `events.ndjson` is the appendable
|
|
28
|
+
event stream contract that live adapters will update while a run is active.
|
|
29
|
+
|
|
30
|
+
## Stream Model
|
|
31
|
+
|
|
32
|
+
Streams are the central abstraction. A stream is one watchable persona lane,
|
|
33
|
+
regardless of substrate:
|
|
34
|
+
|
|
35
|
+
- `ui`: browser/VNC style UI simulation lane;
|
|
36
|
+
- `browser`: browser-specific lane when the app and actor are separate;
|
|
37
|
+
- `terminal`: CLI persona lane with stdout/stderr evidence;
|
|
38
|
+
- `tui`: PTY/ANSI terminal UI lane;
|
|
39
|
+
- `codex-ui`: Codex-style app-server session lane;
|
|
40
|
+
- `artifact`: artifact-only evidence lane;
|
|
41
|
+
- `summary`: run-level synthesis lane.
|
|
42
|
+
|
|
43
|
+
Each stream points back to a simulation and carries its own transport,
|
|
44
|
+
terminal tail, UI state, artifact links, event timeline, and public-safe
|
|
45
|
+
metadata.
|
|
46
|
+
|
|
47
|
+
## Live Watch
|
|
48
|
+
|
|
49
|
+
`humanish watch` now:
|
|
50
|
+
|
|
51
|
+
1. creates a fresh four-lane synthetic run bundle;
|
|
52
|
+
2. writes `observer-data.json` and `events.ndjson`;
|
|
53
|
+
3. starts a localhost Observer server;
|
|
54
|
+
4. opens the served Observer URL;
|
|
55
|
+
5. keeps the shell attached until Ctrl-C.
|
|
56
|
+
|
|
57
|
+
The browser polls `observer-data.json` with `no-store` caching. Static
|
|
58
|
+
`file://` opening still works for immutable review, but follow mode is the
|
|
59
|
+
operator path. Agents and CI should use `humanish watch --json --no-open` for
|
|
60
|
+
the same fresh evidence without browser open or a long-running process.
|
|
61
|
+
|
|
62
|
+
Local `codex-exec` actor runs now publish an initial running `run.json` and
|
|
63
|
+
`observer/observer-data.json` before actor completion, then refresh both after
|
|
64
|
+
sanitized transcripts, traces, and verdict events are available. This gives a
|
|
65
|
+
served Observer a truthful active state to poll while noninteractive local
|
|
66
|
+
actors are still running.
|
|
67
|
+
|
|
68
|
+
## UI Shape
|
|
69
|
+
|
|
70
|
+
The Observer shell has:
|
|
71
|
+
|
|
72
|
+
- top mission-control band with run status and metrics;
|
|
73
|
+
- stream filters for UI, CLI, TUI, and Codex UI lanes;
|
|
74
|
+
- grid mode with one tile per sim stream;
|
|
75
|
+
- focus mode with left stream rail, center stage, and right tabs;
|
|
76
|
+
- terminal/TUI transcript stage;
|
|
77
|
+
- right evidence rail for events, artifacts, and known gaps.
|
|
78
|
+
|
|
79
|
+
## Codex UI Contract
|
|
80
|
+
|
|
81
|
+
`codex-ui` streams are normalized session/event projections. Public artifacts
|
|
82
|
+
must not store raw provider payloads, raw prompts, raw private transcripts,
|
|
83
|
+
private screenshots, PHI, PII, secrets, or upstream data.
|
|
84
|
+
|
|
85
|
+
A host adapter may provide:
|
|
86
|
+
|
|
87
|
+
- session identity;
|
|
88
|
+
- redacted lifecycle/status;
|
|
89
|
+
- event source or snapshot URL;
|
|
90
|
+
- optional embed URL;
|
|
91
|
+
- normalized event timeline;
|
|
92
|
+
- approval metadata;
|
|
93
|
+
- public-safe artifact links.
|
|
94
|
+
|
|
95
|
+
If no embed URL exists, the Observer still renders the Codex-style timeline and
|
|
96
|
+
session contract instead of failing the lane.
|
|
97
|
+
|
|
98
|
+
## Current Gaps
|
|
99
|
+
|
|
100
|
+
This slice implemented the Observer substrate, synthetic stream contracts, and
|
|
101
|
+
active-run Observer snapshots for local `codex-exec`.
|
|
102
|
+
|
|
103
|
+
Since shipped (updated 2026-06-11):
|
|
104
|
+
|
|
105
|
+
- Playwright-backed browser proof with scripted, app-specific
|
|
106
|
+
`browser.steps` authored in `humanish/scenarios/*.yaml` (`src/run.ts`);
|
|
107
|
+
- native Codex app-server session adapter (`src/codex-app-server.ts`,
|
|
108
|
+
registered in `src/actor-registry.ts`);
|
|
109
|
+
- E2B desktop substrate lanes on the meta and computer-use routes;
|
|
110
|
+
- computer-use bundles persist a `screenshots/` directory and the Observer
|
|
111
|
+
renders the frames (`src/cua-actor-lab.ts`).
|
|
112
|
+
|
|
113
|
+
Intentionally still adapter work:
|
|
114
|
+
|
|
115
|
+
- local PTY capture;
|
|
116
|
+
- Codex TUI live follow after workspace trust bootstrap;
|
|
117
|
+
- richer screenshot/trace galleries across multi-step product journeys;
|
|
118
|
+
- reviewer acceptance gates over real product behavior.
|