thehood 0.1.0-preview.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/CODE_OF_CONDUCT.md +21 -0
- package/CONTRIBUTING.md +58 -0
- package/LICENSE +21 -0
- package/PRIVACY.md +49 -0
- package/README.md +264 -0
- package/SECURITY.md +31 -0
- package/dist/bridges/chatgptWebBridge.d.ts +2 -0
- package/dist/bridges/chatgptWebBridge.js +981 -0
- package/dist/bridges/chatgptWebBridge.js.map +1 -0
- package/dist/cli/args.d.ts +9 -0
- package/dist/cli/args.js +82 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/format.d.ts +56 -0
- package/dist/cli/format.js +752 -0
- package/dist/cli/format.js.map +1 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +996 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/mcpConfig.d.ts +36 -0
- package/dist/cli/mcpConfig.js +98 -0
- package/dist/cli/mcpConfig.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/protocol.d.ts +44 -0
- package/dist/mcp/protocol.js +33 -0
- package/dist/mcp/protocol.js.map +1 -0
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.js +106 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +10 -0
- package/dist/mcp/tools.js +2200 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/mcp/validation.d.ts +8 -0
- package/dist/mcp/validation.js +67 -0
- package/dist/mcp/validation.js.map +1 -0
- package/dist/providers/chatgptWeb.d.ts +2 -0
- package/dist/providers/chatgptWeb.js +26 -0
- package/dist/providers/chatgptWeb.js.map +1 -0
- package/dist/providers/claudeCode.d.ts +4 -0
- package/dist/providers/claudeCode.js +32 -0
- package/dist/providers/claudeCode.js.map +1 -0
- package/dist/providers/codexCli.d.ts +6 -0
- package/dist/providers/codexCli.js +25 -0
- package/dist/providers/codexCli.js.map +1 -0
- package/dist/providers/codexCliModels.d.ts +23 -0
- package/dist/providers/codexCliModels.js +147 -0
- package/dist/providers/codexCliModels.js.map +1 -0
- package/dist/providers/localCommand.d.ts +26 -0
- package/dist/providers/localCommand.js +614 -0
- package/dist/providers/localCommand.js.map +1 -0
- package/dist/providers/markdownPayload.d.ts +7 -0
- package/dist/providers/markdownPayload.js +29 -0
- package/dist/providers/markdownPayload.js.map +1 -0
- package/dist/providers/responseSchema.d.ts +3 -0
- package/dist/providers/responseSchema.js +187 -0
- package/dist/providers/responseSchema.js.map +1 -0
- package/dist/providers/router.d.ts +3 -0
- package/dist/providers/router.js +21 -0
- package/dist/providers/router.js.map +1 -0
- package/dist/providers/stub.d.ts +2 -0
- package/dist/providers/stub.js +177 -0
- package/dist/providers/stub.js.map +1 -0
- package/dist/providers/types.d.ts +37 -0
- package/dist/providers/types.js +2 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/runtime/agentBoard.d.ts +79 -0
- package/dist/runtime/agentBoard.js +166 -0
- package/dist/runtime/agentBoard.js.map +1 -0
- package/dist/runtime/agentBoardArtifact.d.ts +9 -0
- package/dist/runtime/agentBoardArtifact.js +171 -0
- package/dist/runtime/agentBoardArtifact.js.map +1 -0
- package/dist/runtime/agentRunner.d.ts +17 -0
- package/dist/runtime/agentRunner.js +92 -0
- package/dist/runtime/agentRunner.js.map +1 -0
- package/dist/runtime/approvalInbox.d.ts +54 -0
- package/dist/runtime/approvalInbox.js +143 -0
- package/dist/runtime/approvalInbox.js.map +1 -0
- package/dist/runtime/approvalPolicy.d.ts +11 -0
- package/dist/runtime/approvalPolicy.js +58 -0
- package/dist/runtime/approvalPolicy.js.map +1 -0
- package/dist/runtime/artifacts.d.ts +23 -0
- package/dist/runtime/artifacts.js +48 -0
- package/dist/runtime/artifacts.js.map +1 -0
- package/dist/runtime/browserManager.d.ts +37 -0
- package/dist/runtime/browserManager.js +356 -0
- package/dist/runtime/browserManager.js.map +1 -0
- package/dist/runtime/canonicalMemory.d.ts +23 -0
- package/dist/runtime/canonicalMemory.js +134 -0
- package/dist/runtime/canonicalMemory.js.map +1 -0
- package/dist/runtime/chatGptPageReadiness.d.ts +16 -0
- package/dist/runtime/chatGptPageReadiness.js +74 -0
- package/dist/runtime/chatGptPageReadiness.js.map +1 -0
- package/dist/runtime/commandRunner.d.ts +18 -0
- package/dist/runtime/commandRunner.js +115 -0
- package/dist/runtime/commandRunner.js.map +1 -0
- package/dist/runtime/commandSafety.d.ts +7 -0
- package/dist/runtime/commandSafety.js +61 -0
- package/dist/runtime/commandSafety.js.map +1 -0
- package/dist/runtime/config.d.ts +10 -0
- package/dist/runtime/config.js +107 -0
- package/dist/runtime/config.js.map +1 -0
- package/dist/runtime/crewLanes.d.ts +2 -0
- package/dist/runtime/crewLanes.js +123 -0
- package/dist/runtime/crewLanes.js.map +1 -0
- package/dist/runtime/criticPolicy.d.ts +17 -0
- package/dist/runtime/criticPolicy.js +50 -0
- package/dist/runtime/criticPolicy.js.map +1 -0
- package/dist/runtime/defaults.d.ts +5 -0
- package/dist/runtime/defaults.js +100 -0
- package/dist/runtime/defaults.js.map +1 -0
- package/dist/runtime/directives.d.ts +3 -0
- package/dist/runtime/directives.js +218 -0
- package/dist/runtime/directives.js.map +1 -0
- package/dist/runtime/doctor.d.ts +36 -0
- package/dist/runtime/doctor.js +185 -0
- package/dist/runtime/doctor.js.map +1 -0
- package/dist/runtime/errors.d.ts +20 -0
- package/dist/runtime/errors.js +41 -0
- package/dist/runtime/errors.js.map +1 -0
- package/dist/runtime/externalTransfer.d.ts +20 -0
- package/dist/runtime/externalTransfer.js +156 -0
- package/dist/runtime/externalTransfer.js.map +1 -0
- package/dist/runtime/fanout.d.ts +64 -0
- package/dist/runtime/fanout.js +263 -0
- package/dist/runtime/fanout.js.map +1 -0
- package/dist/runtime/gitEvidence.d.ts +10 -0
- package/dist/runtime/gitEvidence.js +80 -0
- package/dist/runtime/gitEvidence.js.map +1 -0
- package/dist/runtime/handoffs.d.ts +32 -0
- package/dist/runtime/handoffs.js +100 -0
- package/dist/runtime/handoffs.js.map +1 -0
- package/dist/runtime/ids.d.ts +2 -0
- package/dist/runtime/ids.js +4 -0
- package/dist/runtime/ids.js.map +1 -0
- package/dist/runtime/localStateIgnore.d.ts +9 -0
- package/dist/runtime/localStateIgnore.js +98 -0
- package/dist/runtime/localStateIgnore.js.map +1 -0
- package/dist/runtime/loop.d.ts +14 -0
- package/dist/runtime/loop.js +1863 -0
- package/dist/runtime/loop.js.map +1 -0
- package/dist/runtime/loopRecommendation.d.ts +109 -0
- package/dist/runtime/loopRecommendation.js +566 -0
- package/dist/runtime/loopRecommendation.js.map +1 -0
- package/dist/runtime/loopResponsibilities.d.ts +2 -0
- package/dist/runtime/loopResponsibilities.js +395 -0
- package/dist/runtime/loopResponsibilities.js.map +1 -0
- package/dist/runtime/loopRunner.d.ts +28 -0
- package/dist/runtime/loopRunner.js +81 -0
- package/dist/runtime/loopRunner.js.map +1 -0
- package/dist/runtime/operatorNextActions.d.ts +2 -0
- package/dist/runtime/operatorNextActions.js +344 -0
- package/dist/runtime/operatorNextActions.js.map +1 -0
- package/dist/runtime/paths.d.ts +9 -0
- package/dist/runtime/paths.js +14 -0
- package/dist/runtime/paths.js.map +1 -0
- package/dist/runtime/permissions.d.ts +9 -0
- package/dist/runtime/permissions.js +73 -0
- package/dist/runtime/permissions.js.map +1 -0
- package/dist/runtime/progressPacket.d.ts +12 -0
- package/dist/runtime/progressPacket.js +512 -0
- package/dist/runtime/progressPacket.js.map +1 -0
- package/dist/runtime/protectedPaths.d.ts +6 -0
- package/dist/runtime/protectedPaths.js +48 -0
- package/dist/runtime/protectedPaths.js.map +1 -0
- package/dist/runtime/providers.d.ts +13 -0
- package/dist/runtime/providers.js +60 -0
- package/dist/runtime/providers.js.map +1 -0
- package/dist/runtime/reconciliation.d.ts +17 -0
- package/dist/runtime/reconciliation.js +283 -0
- package/dist/runtime/reconciliation.js.map +1 -0
- package/dist/runtime/redaction.d.ts +1 -0
- package/dist/runtime/redaction.js +5 -0
- package/dist/runtime/redaction.js.map +1 -0
- package/dist/runtime/remoteRepoContext.d.ts +77 -0
- package/dist/runtime/remoteRepoContext.js +316 -0
- package/dist/runtime/remoteRepoContext.js.map +1 -0
- package/dist/runtime/repoContext.d.ts +50 -0
- package/dist/runtime/repoContext.js +399 -0
- package/dist/runtime/repoContext.js.map +1 -0
- package/dist/runtime/repoGateway.d.ts +64 -0
- package/dist/runtime/repoGateway.js +308 -0
- package/dist/runtime/repoGateway.js.map +1 -0
- package/dist/runtime/responseContracts.d.ts +3 -0
- package/dist/runtime/responseContracts.js +86 -0
- package/dist/runtime/responseContracts.js.map +1 -0
- package/dist/runtime/reviewLanes.d.ts +2 -0
- package/dist/runtime/reviewLanes.js +343 -0
- package/dist/runtime/reviewLanes.js.map +1 -0
- package/dist/runtime/reviewRouting.d.ts +51 -0
- package/dist/runtime/reviewRouting.js +152 -0
- package/dist/runtime/reviewRouting.js.map +1 -0
- package/dist/runtime/revisionPacket.d.ts +38 -0
- package/dist/runtime/revisionPacket.js +144 -0
- package/dist/runtime/revisionPacket.js.map +1 -0
- package/dist/runtime/revisionTrail.d.ts +2 -0
- package/dist/runtime/revisionTrail.js +162 -0
- package/dist/runtime/revisionTrail.js.map +1 -0
- package/dist/runtime/role-assignment.d.ts +4 -0
- package/dist/runtime/role-assignment.js +21 -0
- package/dist/runtime/role-assignment.js.map +1 -0
- package/dist/runtime/roleRoster.d.ts +28 -0
- package/dist/runtime/roleRoster.js +96 -0
- package/dist/runtime/roleRoster.js.map +1 -0
- package/dist/runtime/runInsights.d.ts +121 -0
- package/dist/runtime/runInsights.js +305 -0
- package/dist/runtime/runInsights.js.map +1 -0
- package/dist/runtime/runMonitor.d.ts +33 -0
- package/dist/runtime/runMonitor.js +143 -0
- package/dist/runtime/runMonitor.js.map +1 -0
- package/dist/runtime/runtime.d.ts +15 -0
- package/dist/runtime/runtime.js +199 -0
- package/dist/runtime/runtime.js.map +1 -0
- package/dist/runtime/runtimeInfo.d.ts +9 -0
- package/dist/runtime/runtimeInfo.js +76 -0
- package/dist/runtime/runtimeInfo.js.map +1 -0
- package/dist/runtime/store.d.ts +4 -0
- package/dist/runtime/store.js +48 -0
- package/dist/runtime/store.js.map +1 -0
- package/dist/runtime/summons.d.ts +25 -0
- package/dist/runtime/summons.js +403 -0
- package/dist/runtime/summons.js.map +1 -0
- package/dist/runtime/teamPresets.d.ts +14 -0
- package/dist/runtime/teamPresets.js +153 -0
- package/dist/runtime/teamPresets.js.map +1 -0
- package/dist/runtime/types.d.ts +505 -0
- package/dist/runtime/types.js +28 -0
- package/dist/runtime/types.js.map +1 -0
- package/dist/runtime/validationCommands.d.ts +18 -0
- package/dist/runtime/validationCommands.js +106 -0
- package/dist/runtime/validationCommands.js.map +1 -0
- package/dist/tui/dashboard.d.ts +41 -0
- package/dist/tui/dashboard.js +1115 -0
- package/dist/tui/dashboard.js.map +1 -0
- package/docs/ARCHITECTURE.md +277 -0
- package/docs/CLI_SPEC.md +396 -0
- package/docs/CODEX_SETUP.md +288 -0
- package/docs/COMPLETION_CONTRACT.md +52 -0
- package/docs/CONTRIBUTOR_GUIDE.md +70 -0
- package/docs/DEMO.md +62 -0
- package/docs/GLOSSARY.md +46 -0
- package/docs/GOAL_LOOP_SCHEDULE.md +50 -0
- package/docs/KNOWN_LIMITATIONS.md +29 -0
- package/docs/LICENSING.md +21 -0
- package/docs/LOOP_RECIPES.md +290 -0
- package/docs/LOOP_SELECTION_UX.md +118 -0
- package/docs/MCP_SPEC.md +689 -0
- package/docs/MEMORY_AND_RECONCILIATION.md +222 -0
- package/docs/NPM_PUBLISHING.md +51 -0
- package/docs/OPEN_DECISIONS.md +81 -0
- package/docs/PROMPT_SCHEMAS.md +411 -0
- package/docs/PROVIDER_ADAPTERS.md +323 -0
- package/docs/PROVIDER_MATRIX.md +21 -0
- package/docs/PUBLIC_REPO_READINESS.md +49 -0
- package/docs/RESEARCH_NOTES.md +92 -0
- package/docs/ROADMAP.md +94 -0
- package/docs/ROLE_CONTRACTS.md +252 -0
- package/docs/RUNTIME_LOOP.md +240 -0
- package/docs/SECURITY_AND_PRIVACY.md +161 -0
- package/docs/TESTING_AND_VERIFICATION.md +180 -0
- package/docs/TRUST_MODEL.md +65 -0
- package/docs/decisions/0001-runtime-first-cli-and-mcp.md +23 -0
- package/docs/decisions/0002-provider-neutral-role-mapping.md +43 -0
- package/docs/decisions/0003-separate-implementation-and-verification.md +27 -0
- package/docs/product/README.md +14 -0
- package/docs/product/model-selection.md +88 -0
- package/docs/product/positioning.md +37 -0
- package/docs/product/pro-usage-modes.md +70 -0
- package/docs/product/roadmap.md +57 -0
- package/docs/product/role-policy.md +89 -0
- package/docs/product/runtime-invariants.md +44 -0
- package/docs/release/v0.1.0-preview.0.md +48 -0
- package/examples/stub-demo/README.md +25 -0
- package/package.json +55 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
TheHood is a technical project for careful, safety-minded agent runtime work. Keep discussions focused, respectful, and useful.
|
|
4
|
+
|
|
5
|
+
## Expected Behavior
|
|
6
|
+
|
|
7
|
+
- Be direct without being hostile.
|
|
8
|
+
- Assume good intent, but correct unsafe or misleading claims clearly.
|
|
9
|
+
- Keep bug reports and examples free of secrets, provider transcripts, browser state, private runtime artifacts, and personal data.
|
|
10
|
+
- Respect project boundaries around runtime safety, provider access, permissions, and verification.
|
|
11
|
+
|
|
12
|
+
## Unacceptable Behavior
|
|
13
|
+
|
|
14
|
+
- Harassment, threats, or personal attacks.
|
|
15
|
+
- Publishing secrets, private prompts, credentials, provider session data, or private run logs.
|
|
16
|
+
- Encouraging users to bypass provider access controls, runtime approval gates, or filesystem protections.
|
|
17
|
+
- Repeated off-topic or bad-faith participation after maintainers ask for a change.
|
|
18
|
+
|
|
19
|
+
## Enforcement
|
|
20
|
+
|
|
21
|
+
Maintainers may edit, hide, lock, or remove issues, discussions, comments, or pull requests that violate this policy. Security-sensitive reports should follow `SECURITY.md`.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
TheHood is starting documentation-first because the safety model matters as much as the code. See `docs/CONTRIBUTOR_GUIDE.md` for the full contributor guide.
|
|
4
|
+
|
|
5
|
+
## Before Opening A Change
|
|
6
|
+
|
|
7
|
+
- Read the architecture and role-contract docs.
|
|
8
|
+
- Keep changes narrow.
|
|
9
|
+
- Explain changes to runtime permissions, provider adapters, or verification behavior clearly.
|
|
10
|
+
- Do not mix unrelated concerns in one change.
|
|
11
|
+
|
|
12
|
+
## Project Boundaries
|
|
13
|
+
|
|
14
|
+
Runtime logic belongs in the runtime.
|
|
15
|
+
|
|
16
|
+
Control surfaces should trigger runtime actions:
|
|
17
|
+
|
|
18
|
+
- CLI
|
|
19
|
+
- MCP server
|
|
20
|
+
- macOS menubar app
|
|
21
|
+
|
|
22
|
+
They should not independently implement orchestration policy, role permissions, test gates, or patch integration.
|
|
23
|
+
|
|
24
|
+
## Security Expectations
|
|
25
|
+
|
|
26
|
+
Never include:
|
|
27
|
+
|
|
28
|
+
- API keys
|
|
29
|
+
- browser cookies
|
|
30
|
+
- provider session tokens
|
|
31
|
+
- personal browser profiles
|
|
32
|
+
- private repo logs
|
|
33
|
+
- private customer or payment data
|
|
34
|
+
|
|
35
|
+
Use synthetic fixtures for examples.
|
|
36
|
+
|
|
37
|
+
## Verification Expectations
|
|
38
|
+
|
|
39
|
+
Changes that affect runtime behavior should include evidence from the relevant validation command.
|
|
40
|
+
|
|
41
|
+
Core checks:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm run typecheck
|
|
45
|
+
npm run build
|
|
46
|
+
npm run smoke:mcp
|
|
47
|
+
npm run smoke:codex-config
|
|
48
|
+
npm run smoke:runtime
|
|
49
|
+
git --no-pager diff --check
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Release-sensitive changes should also run:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm run release:check
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The implementer and verifier should be different agents or different review phases.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 TheHood contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/PRIVACY.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Privacy
|
|
2
|
+
|
|
3
|
+
TheHood is a local runtime. By default, it stores runtime state, logs, artifacts, approvals, browser profile references, and configuration on the user's machine.
|
|
4
|
+
|
|
5
|
+
TheHood does not include hosted telemetry or a hosted service in this repository. Provider calls only happen when the user configures and approves a provider path, such as Codex CLI, Claude Code, ChatGPT Web, or a future API adapter.
|
|
6
|
+
|
|
7
|
+
## What Stays Local
|
|
8
|
+
|
|
9
|
+
- `.thehood/` runtime state
|
|
10
|
+
- run records
|
|
11
|
+
- approval events
|
|
12
|
+
- command logs
|
|
13
|
+
- git evidence
|
|
14
|
+
- provider directives and responses
|
|
15
|
+
- final reports and progress packets
|
|
16
|
+
- local provider config
|
|
17
|
+
- browser profile references
|
|
18
|
+
|
|
19
|
+
The public package and repository should not include local `.thehood` state or private run artifacts.
|
|
20
|
+
|
|
21
|
+
## What Can Leave The Machine
|
|
22
|
+
|
|
23
|
+
Data can leave the machine only when the user configures a provider path or MCP host that receives it. Examples:
|
|
24
|
+
|
|
25
|
+
- Codex CLI or Claude Code receives a runtime-built directive through the local command adapter.
|
|
26
|
+
- ChatGPT Web receives a browser-bridge directive after provider invocation and transfer approval policy allow it.
|
|
27
|
+
- A future API adapter may receive a transfer manifest-approved packet.
|
|
28
|
+
- ChatGPT MCP connector mode may receive bounded TheHood tool results through the connected MCP host.
|
|
29
|
+
|
|
30
|
+
External transfers of local repo context, progress packets, or memory bodies must go through TheHood's transfer-manifest and approval policy.
|
|
31
|
+
|
|
32
|
+
## What Not To Publish
|
|
33
|
+
|
|
34
|
+
Never publish:
|
|
35
|
+
|
|
36
|
+
- API keys
|
|
37
|
+
- browser cookies
|
|
38
|
+
- OAuth credentials
|
|
39
|
+
- provider session tokens
|
|
40
|
+
- personal browser profiles
|
|
41
|
+
- `.thehood/` state
|
|
42
|
+
- provider logs
|
|
43
|
+
- private prompts
|
|
44
|
+
- private repo diffs or artifacts
|
|
45
|
+
- environment files
|
|
46
|
+
- generated package archives
|
|
47
|
+
- real customer, payment, or private project data
|
|
48
|
+
|
|
49
|
+
Use synthetic examples and fixtures. See `docs/SECURITY_AND_PRIVACY.md` and `docs/TRUST_MODEL.md` for runtime security and data-boundary details.
|
package/README.md
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# TheHood
|
|
2
|
+
|
|
3
|
+
TheHood is a local, provider-neutral agent runtime for running serious multi-agent software work from Codex, a CLI, and eventually a small macOS menubar companion.
|
|
4
|
+
|
|
5
|
+
Status: developer preview. TheHood is preparing for `v0.1.0-preview.0` as a local CLI/MCP runtime for governed software goal loops. It is useful for early adopters who are comfortable with local tools, explicit approval boundaries, and experimental provider wiring. It is not a hosted agent service, cloud scheduler, or polished app platform.
|
|
6
|
+
|
|
7
|
+
The core idea is simple:
|
|
8
|
+
|
|
9
|
+
- Models suggest.
|
|
10
|
+
- The runtime enforces.
|
|
11
|
+
- Users stay in control.
|
|
12
|
+
|
|
13
|
+
TheHood lets a user assign different models or agent tools to different responsibilities. The product default is Codex-first: Codex can orchestrate, implement, QA, critique, and verify through separate runtime roles, while users can opt into GPT, ChatGPT Pro, Claude Code, future API adapters, or future local models for roles as those paths are wired. Codex becomes the governed workbench; Claude can second-judge or build; Pro can approve strategy when the stakes justify it.
|
|
14
|
+
|
|
15
|
+
The first product surface is a CLI plus an MCP server. The macOS menubar app should remain a thin trigger and status surface over the same local runtime.
|
|
16
|
+
|
|
17
|
+
## Works Today
|
|
18
|
+
|
|
19
|
+
- Local project setup and JSON runtime config under `.thehood/config.json`, with local git excludes for TheHood runtime state.
|
|
20
|
+
- CLI and stdio MCP control surfaces over the same local runtime.
|
|
21
|
+
- Codex-first role mapping with separate orchestrator, planner, implementer, QA, verifier, and critic roles.
|
|
22
|
+
- Local Codex CLI and Claude Code command adapters that must return schema-bound responses.
|
|
23
|
+
- Deterministic `stub` provider for local smoke tests and synthetic demonstrations.
|
|
24
|
+
- Approval gates, protected test/fixture/snapshot/eval classification, isolated patch capture, and runtime-owned integration reports.
|
|
25
|
+
- Runtime-owned evidence: command logs, git status/diff snapshots, provider invocation artifacts, final reports, progress packets, review lanes, revision packets, and agent board snapshots.
|
|
26
|
+
- Same-run summons and bounded fan-out as read-only sidecar evidence, not acceptance votes.
|
|
27
|
+
- ChatGPT Web bridge and ChatGPT MCP connector guidance as experimental, user-configured provider paths.
|
|
28
|
+
|
|
29
|
+
## Planned Or Experimental
|
|
30
|
+
|
|
31
|
+
- OpenAI API, Anthropic API, and local model adapters are represented in provider config but are not wired as production external model adapters yet.
|
|
32
|
+
- Hosted execution, cloud routines, timer schedules, and overnight automation are not part of `v0.1.0-preview.0`.
|
|
33
|
+
- A full web dashboard and macOS menubar app remain future control surfaces over the runtime.
|
|
34
|
+
- ChatGPT MCP connector mode depends on ChatGPT custom connector/tunnel availability in the user's workspace and should be treated as optional.
|
|
35
|
+
- Native Codex visual rendering beyond explicit artifact/dashboard payloads remains a later integration layer.
|
|
36
|
+
|
|
37
|
+
## Current Implementation
|
|
38
|
+
|
|
39
|
+
The first implementation slice is a TypeScript CLI/runtime skeleton.
|
|
40
|
+
|
|
41
|
+
It supports:
|
|
42
|
+
|
|
43
|
+
- local project initialization
|
|
44
|
+
- JSON config under `.thehood/config.json`
|
|
45
|
+
- Codex-first default role mapping for orchestrator, implementer, QA, verifier, and critic
|
|
46
|
+
- provider and role inspection
|
|
47
|
+
- provider and role health inspection
|
|
48
|
+
- agent roster inspection showing role ownership, readiness, and read/edit authority
|
|
49
|
+
- runtime-derived agent board snapshots and dashboard payloads for Codex card-style agent visibility
|
|
50
|
+
- optional repo-local Codex plugin scaffold for TheHood workflow guidance and MCP setup
|
|
51
|
+
- runtime-owned team presets for Codex default, ChatGPT Pro orchestration, Claude second-judge, Spark plus Sonnet, Claude builder, and high-assurance Pro plus Claude setups
|
|
52
|
+
- read-only loop recommendation that routes a plain-language goal into a recipe, recommended stack, completion contract draft, actions, alternatives, and Codex card artifact
|
|
53
|
+
- configurable budget defaults for max provider iterations and fan-out item caps
|
|
54
|
+
- Codex-facing MCP tools for role assignment and guest-agent consultation
|
|
55
|
+
- local-only Pro access preflight so Codex can distinguish runtime autopilot, direct bridge readiness, host-policy blocks, and ChatGPT MCP connector handoff paths
|
|
56
|
+
- role mapping updates
|
|
57
|
+
- run creation for `plan` and `implement`
|
|
58
|
+
- approval, rejection, abort, status, and log inspection
|
|
59
|
+
- bounded CLI artifact and diff inspection
|
|
60
|
+
- hard enforcement that implementer and verifier cannot be the same agent
|
|
61
|
+
- a real stdio MCP server exposing TheHood runtime tools
|
|
62
|
+
- runtime-owned command log artifacts
|
|
63
|
+
- git status/diff evidence capture with protected test-path classification
|
|
64
|
+
- runtime-owned integration reports for approved isolated patch application
|
|
65
|
+
- runtime-owned final reports for completed runs
|
|
66
|
+
- runtime-owned progress packet artifacts for completed runs
|
|
67
|
+
- runtime-owned external transfer manifests before repo context or progress packets leave the machine
|
|
68
|
+
- confirmed GitHub connector-aware repo context routing for clean pushed repos in ChatGPT Web
|
|
69
|
+
- user-configurable approval policy with manual, auto-low-risk, and autopilot modes
|
|
70
|
+
- separate approval gates when integrated patches touch protected test, fixture, snapshot, or eval paths
|
|
71
|
+
- runtime-enforced max iteration limits across resumed runs
|
|
72
|
+
- runtime-captured package validation command evidence during verifier review
|
|
73
|
+
- runtime-owned review routing artifacts that classify implementation risk before model QA/verifier dispatch
|
|
74
|
+
- read-only model-assisted QA tester lane for missed cases and validation suggestions
|
|
75
|
+
- runtime-owned critic trigger artifacts when QA, verifier, or validation evidence indicates risk
|
|
76
|
+
- runtime-owned revision packet artifacts that route fixable QA, critic, or verifier findings back to the implementer
|
|
77
|
+
- provider config merging that preserves newly added built-in models and future-facing model aliases in stale repo-local configs
|
|
78
|
+
- deterministic `stub` provider for local loop smoke tests
|
|
79
|
+
- `continue` advances runs through orchestrator, implementer, evidence capture, and verifier phases
|
|
80
|
+
- `loop` keeps advancing a run until terminal state, manual gate, no progress, or a cycle cap
|
|
81
|
+
- schema-bound agent directives and response validation before runtime state advances
|
|
82
|
+
- provider response contracts that keep JSON mechanical while long plans, reports, and reviews live in markdown payload fields
|
|
83
|
+
- guarded local CLI adapters for Codex CLI and Claude Code
|
|
84
|
+
- runtime-owned local agent execution artifacts for Codex CLI and Claude Code command invocations
|
|
85
|
+
- bridge-backed ChatGPT Web adapter for ChatGPT Pro orchestration
|
|
86
|
+
- provider access-mode metadata for agent bridges, API agents, and MCP connectors
|
|
87
|
+
- persistent TheHood Chrome profile manager for the ChatGPT Web bridge
|
|
88
|
+
- ChatGPT Web auth and composer readiness checks before bridge calls are marked ready
|
|
89
|
+
- branded terminal dashboard shell for runtime, role, and browser readiness
|
|
90
|
+
- terminal approval inbox for pending runtime gates
|
|
91
|
+
- terminal run monitor for provider wait, approval/transfer gates, and review ownership lanes
|
|
92
|
+
- run status insights for latest provider output and final reports
|
|
93
|
+
- run status insights for latest progress, reconciliation, repo context, remote repo context, provider execution, final report, and transfer manifest refs
|
|
94
|
+
- compact MCP host responses that return refs, counts, latest summaries, and bounded lane/card previews by default instead of dumping full run evidence into the Codex session context
|
|
95
|
+
- runtime-derived loop responsibility schedules showing planner, implementer, verifier, runtime QA, QA tester, critic, reconciliation, integration, approval, and completion ownership
|
|
96
|
+
- bounded canonical memory refs injected into provider directives so providers rehydrate from runtime state instead of stale chat history
|
|
97
|
+
- runtime-captured repo context packs when read-only orchestrators request evidence
|
|
98
|
+
- refs-only GitHub connector context when the active ChatGPT Web bridge has confirmed GitHub connector access and can inspect a clean pushed GitHub repo at the current commit
|
|
99
|
+
- targeted follow-up repo context packs when a provider delegates concrete new repo paths
|
|
100
|
+
- schema-bound planner reconciliation from completed run progress packets
|
|
101
|
+
- bounded MCP artifact reads for inspecting guest-agent responses from chat
|
|
102
|
+
- read-only MCP repo gateway tools for tree, search, file reads, git status, and git diff
|
|
103
|
+
|
|
104
|
+
ChatGPT Web is wired through a user-configured bridge command. API provider adapters are not wired to external models yet, though OpenAI and Anthropic API key env names are represented in provider config for future adapters. Local Codex CLI and Claude Code adapters can be selected by role and must return schema-bound responses. Codex CLI discovers live model slugs, while ChatGPT Web and Claude Code expose configured/custom model passthrough so users can select newly available model aliases without waiting for a TheHood release.
|
|
105
|
+
|
|
106
|
+
Users can choose model owners per role:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
node dist/cli/main.js roles set implementer claude-code:sonnet --repo .
|
|
110
|
+
node dist/cli/main.js roles set verifier codex-cli:spark --repo .
|
|
111
|
+
node dist/cli/main.js roles set critic claude-code:fable --repo .
|
|
112
|
+
node dist/cli/main.js teams apply spark-plus-sonnet --repo .
|
|
113
|
+
node dist/cli/main.js teams apply pro-claude-high-assurance --repo .
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Users can choose between two ChatGPT Pro paths:
|
|
117
|
+
|
|
118
|
+
- `agent-bridge`: TheHood invokes the ChatGPT Web bridge as an orchestrator or planner.
|
|
119
|
+
- `mcp-connector`: ChatGPT connects to TheHood as an MCP connector and uses TheHood's repo/run tools directly.
|
|
120
|
+
|
|
121
|
+
Both paths keep repo access, approvals, logs, and verification gates owned by the runtime.
|
|
122
|
+
For connector mode, generate the local setup guide with `thehood mcp tunnel --tunnel-id <tunnel-id> --profile thehood-local`, keep Secure MCP Tunnel running, and validate from a fresh ChatGPT conversation with `thehood_doctor` plus a read-only repo gateway tool. This is separate from the `chatgpt-web` agent bridge and does not use Chrome/CDP bridge environment variables.
|
|
123
|
+
When Codex or a tenant policy blocks a direct external disclosure to ChatGPT Web, that is outside TheHood autopilot. Use `thehood_pro_access` to get the local bridge status and a connector-mode handoff instead of repeating approval prompts.
|
|
124
|
+
For broader Claude/Codex/GPT fan-outs, call `thehood_model_access` before the model-backed request. It does not call providers or send repo context; it returns provider readiness, repo visibility, the data boundary, a compact approval packet, and fallback paths. Dirty or unpushed repos ask the user to choose between committing and pushing a checkpoint, approving bounded local context/diff transfer, using no-repo-context strategy, or cancelling. Clean pushed GitHub repos can use remote refs only when the target provider route is verified. For `chatgpt-web`, TheHood treats remote refs as the default only when the active bridge GitHub connector surface is confirmed; otherwise it presents connector setup, explicit local context approval, no-repo-context, or cancel paths.
|
|
125
|
+
|
|
126
|
+
## Quick Start
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
npm install
|
|
130
|
+
npm run build
|
|
131
|
+
npm run smoke:runtime
|
|
132
|
+
npm run smoke:mcp
|
|
133
|
+
node dist/cli/main.js setup --repo .
|
|
134
|
+
node dist/cli/main.js doctor --repo .
|
|
135
|
+
node dist/cli/main.js roster --repo .
|
|
136
|
+
node dist/cli/main.js agent-board --repo . --artifact --json
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
The full local CLI surface includes:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
node dist/cli/main.js init --repo .
|
|
143
|
+
node dist/cli/main.js setup --repo .
|
|
144
|
+
node dist/cli/main.js doctor --repo .
|
|
145
|
+
node dist/cli/main.js roster --repo .
|
|
146
|
+
node dist/cli/main.js agent-board --repo .
|
|
147
|
+
node dist/cli/main.js agent-board --repo . --artifact --json
|
|
148
|
+
node dist/cli/main.js teams --repo .
|
|
149
|
+
node dist/cli/main.js config set fanout-max-items 4 --repo .
|
|
150
|
+
node dist/cli/main.js roles --repo .
|
|
151
|
+
node dist/cli/main.js recommend-loop "Fix flaky checkout tests" --repo . --max-iterations 5
|
|
152
|
+
node dist/cli/main.js goal "Prepare release metadata" --repo . --max-iterations 5
|
|
153
|
+
node dist/cli/main.js run "Implement the first provider adapter" --repo .
|
|
154
|
+
node dist/cli/main.js run "Exercise the full loop" --repo . --loop
|
|
155
|
+
node dist/cli/main.js status --repo .
|
|
156
|
+
node dist/cli/main.js agent-board <run-id> --repo .
|
|
157
|
+
node dist/cli/main.js artifact <run-id> <artifact-ref> --repo .
|
|
158
|
+
node dist/cli/main.js evidence <run-id> --repo .
|
|
159
|
+
node dist/cli/main.js continue <run-id> --repo .
|
|
160
|
+
node dist/cli/main.js loop <run-id> --repo .
|
|
161
|
+
node dist/cli/main.js transfer preview <run-id> --repo .
|
|
162
|
+
node dist/cli/main.js approvals policy set mode autopilot --repo .
|
|
163
|
+
node dist/cli/main.js ui approvals --repo .
|
|
164
|
+
node dist/cli/main.js ui settings --repo .
|
|
165
|
+
node dist/cli/main.js ui settings crew --repo .
|
|
166
|
+
node dist/cli/main.js ui settings commands --repo .
|
|
167
|
+
node dist/cli/main.js config set max-iterations 8 --repo .
|
|
168
|
+
node dist/cli/main.js browser status
|
|
169
|
+
node dist/cli/main.js ui --repo .
|
|
170
|
+
node dist/cli/main.js mcp tunnel --tunnel-id <tunnel-id>
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
TheHood stores local run history and evidence in `.thehood/`, including run records, logs, provider responses, approval evidence, final reports, and progress packets. This is useful local state, not source code. When TheHood creates repo-local state inside a git checkout, it automatically adds `.thehood/` and `.thehood-browser.json` to `.git/info/exclude` so normal `git status` stays clean without changing the repo's committed `.gitignore`. Do not commit `.thehood/`; delete it when you want to clear local run history.
|
|
174
|
+
|
|
175
|
+
The optional Codex plugin lives at `plugins/thehood-codex` and is listed by the repo marketplace at `.agents/plugins/marketplace.json`. It is not installed by default because repo-root Codex custom agents and plugin-provided surfaces should appear only when a user opts into them.
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
codex plugin marketplace add /path/to/the-hood
|
|
179
|
+
codex plugin add thehood-codex@thehood
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
The plugin expects the `thehood` binary to be available on `PATH` for MCP startup. During local development, use `node dist/cli/main.js mcp config` when you want an absolute-path MCP snippet instead.
|
|
183
|
+
|
|
184
|
+
## Product Shape
|
|
185
|
+
|
|
186
|
+
```text
|
|
187
|
+
Codex / CLI / macOS menubar
|
|
188
|
+
trigger runs, approvals, status, and configuration
|
|
189
|
+
|
|
190
|
+
MCP server
|
|
191
|
+
exposes TheHood tools to Codex
|
|
192
|
+
|
|
193
|
+
Local runtime
|
|
194
|
+
owns state, permissions, logs, worktrees, approvals, and test gates
|
|
195
|
+
|
|
196
|
+
Provider adapters
|
|
197
|
+
connect to ChatGPT Pro, OpenAI API, Anthropic API, Codex, Claude Code, and local models
|
|
198
|
+
|
|
199
|
+
MCP connector mode
|
|
200
|
+
lets ChatGPT, Codex, or another MCP host call TheHood's runtime and repo tools
|
|
201
|
+
|
|
202
|
+
Agents
|
|
203
|
+
orchestrator, planner, researcher, implementer, qa tester, verifier, critic, integrator
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Codex-native Subagents are owned by Codex, not by TheHood MCP tool output. TheHood does not ship repo-root custom agents by default; users can opt into the Codex plugin for TheHood workflow guidance and MCP wiring. TheHood runtime-owned provider calls surface through run status, artifacts, MCP, CLI, TUI, and the agent board.
|
|
207
|
+
|
|
208
|
+
## Foundation Rules
|
|
209
|
+
|
|
210
|
+
- The implementer and verifier must not be the same agent.
|
|
211
|
+
- The verifier does not get edit tools.
|
|
212
|
+
- The QA tester does not get edit tools and cannot satisfy runtime validation gates.
|
|
213
|
+
- Runtime-captured logs are the source of truth, not model summaries.
|
|
214
|
+
- Model session context is disposable; TheHood preserves exact artifacts and rehydrates providers from runtime state.
|
|
215
|
+
- Fixable reviewer findings become runtime revision packets before the implementer gets another pass.
|
|
216
|
+
- Test changes require separate classification and review.
|
|
217
|
+
- The frontend never owns orchestration logic. It triggers runtime actions.
|
|
218
|
+
- Provider choice is user-controlled per role.
|
|
219
|
+
- The runtime should be useful headless before it gets a polished UI.
|
|
220
|
+
|
|
221
|
+
## Documentation
|
|
222
|
+
|
|
223
|
+
- [Architecture](docs/ARCHITECTURE.md)
|
|
224
|
+
- [Codex Setup](docs/CODEX_SETUP.md)
|
|
225
|
+
- [Runtime Loop](docs/RUNTIME_LOOP.md)
|
|
226
|
+
- [Role Contracts](docs/ROLE_CONTRACTS.md)
|
|
227
|
+
- [Trust Model](docs/TRUST_MODEL.md)
|
|
228
|
+
- [Provider Matrix](docs/PROVIDER_MATRIX.md)
|
|
229
|
+
- [Known Limitations](docs/KNOWN_LIMITATIONS.md)
|
|
230
|
+
- [Goal, Loop, Schedule](docs/GOAL_LOOP_SCHEDULE.md)
|
|
231
|
+
- [Loop Selection UX](docs/LOOP_SELECTION_UX.md)
|
|
232
|
+
- [Completion Contract](docs/COMPLETION_CONTRACT.md)
|
|
233
|
+
- [Loop Recipes](docs/LOOP_RECIPES.md)
|
|
234
|
+
- [Synthetic Stub Demo](docs/DEMO.md)
|
|
235
|
+
- [Prompt Schemas](docs/PROMPT_SCHEMAS.md)
|
|
236
|
+
- [Memory And Reconciliation](docs/MEMORY_AND_RECONCILIATION.md)
|
|
237
|
+
- [CLI Spec](docs/CLI_SPEC.md)
|
|
238
|
+
- [MCP Spec](docs/MCP_SPEC.md)
|
|
239
|
+
- [Provider Adapters](docs/PROVIDER_ADAPTERS.md)
|
|
240
|
+
- [Testing And Verification](docs/TESTING_AND_VERIFICATION.md)
|
|
241
|
+
- [Security And Privacy](docs/SECURITY_AND_PRIVACY.md)
|
|
242
|
+
- [Product Strategy](docs/product/README.md)
|
|
243
|
+
- [Model Selection](docs/product/model-selection.md)
|
|
244
|
+
- [Research Notes](docs/RESEARCH_NOTES.md)
|
|
245
|
+
- [Roadmap](docs/ROADMAP.md)
|
|
246
|
+
- [Glossary](docs/GLOSSARY.md)
|
|
247
|
+
- [Licensing](docs/LICENSING.md)
|
|
248
|
+
- [Open Decisions](docs/OPEN_DECISIONS.md)
|
|
249
|
+
- [Public Repo Readiness](docs/PUBLIC_REPO_READINESS.md)
|
|
250
|
+
- [v0.1.0-preview.0 Release Notes](docs/release/v0.1.0-preview.0.md)
|
|
251
|
+
- [Static Preview Site](site/README.md)
|
|
252
|
+
|
|
253
|
+
## Public Repo Docs
|
|
254
|
+
|
|
255
|
+
- [Contributing](CONTRIBUTING.md)
|
|
256
|
+
- [Security Policy](SECURITY.md)
|
|
257
|
+
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
258
|
+
- [Agent Instructions](AGENTS.md)
|
|
259
|
+
|
|
260
|
+
## Decisions
|
|
261
|
+
|
|
262
|
+
- [0001: Runtime First With CLI And MCP](docs/decisions/0001-runtime-first-cli-and-mcp.md)
|
|
263
|
+
- [0002: Provider Neutral Role Mapping](docs/decisions/0002-provider-neutral-role-mapping.md)
|
|
264
|
+
- [0003: Separate Implementation And Verification](docs/decisions/0003-separate-implementation-and-verification.md)
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
TheHood coordinates local tools, provider credentials, browser sessions, source code, and model context. Treat security issues seriously.
|
|
4
|
+
|
|
5
|
+
## Reporting
|
|
6
|
+
|
|
7
|
+
Private vulnerability reporting should be enabled before the repository is made public.
|
|
8
|
+
|
|
9
|
+
Until a private reporting channel is configured, do not publish exploit details in public issues. Share only a minimal, non-sensitive description and request a private contact path.
|
|
10
|
+
|
|
11
|
+
## Sensitive Areas
|
|
12
|
+
|
|
13
|
+
Security-sensitive code includes:
|
|
14
|
+
|
|
15
|
+
- provider authentication
|
|
16
|
+
- browser session handling
|
|
17
|
+
- secret redaction
|
|
18
|
+
- filesystem permissions
|
|
19
|
+
- shell command execution
|
|
20
|
+
- worktree integration
|
|
21
|
+
- MCP tool exposure
|
|
22
|
+
- log storage
|
|
23
|
+
|
|
24
|
+
## Expectations
|
|
25
|
+
|
|
26
|
+
- Do not log secrets.
|
|
27
|
+
- Do not send secrets to model providers by default.
|
|
28
|
+
- Do not bypass provider access controls.
|
|
29
|
+
- Fail closed when permissions or provider identity are uncertain.
|
|
30
|
+
- Require approval for destructive commands and protected file changes.
|
|
31
|
+
|