holo-codex 0.1.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.
Files changed (149) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/CONTRIBUTING.md +54 -0
  3. package/LICENSE +21 -0
  4. package/README.md +215 -0
  5. package/README.zh-CN.md +215 -0
  6. package/SECURITY.md +39 -0
  7. package/assets/brand/README.md +35 -0
  8. package/assets/brand/holo-codex-icon.svg +28 -0
  9. package/assets/brand/holo-codex-lockup.svg +49 -0
  10. package/assets/brand/holo-codex-mark.svg +33 -0
  11. package/assets/brand/holo-codex-plugin-card.png +0 -0
  12. package/assets/brand/holo-codex-plugin-card.svg +81 -0
  13. package/assets/brand/holo-codex-readme-hero.png +0 -0
  14. package/assets/brand/holo-codex-readme-hero.svg +140 -0
  15. package/assets/brand/holo-codex-social-preview.png +0 -0
  16. package/assets/brand/holo-codex-social-preview.svg +130 -0
  17. package/assets/brand/holo-codex-wordmark-options.svg +52 -0
  18. package/docs/checklists/agent-loop-first-delivery-audit.md +129 -0
  19. package/docs/examples/generic-loop-repo-hygiene.md +168 -0
  20. package/docs/install.md +190 -0
  21. package/docs/local-release-readiness.md +206 -0
  22. package/docs/release-checklist.md +144 -0
  23. package/docs/self-bootstrap.md +150 -0
  24. package/docs/trust-and-safety.md +45 -0
  25. package/package.json +83 -0
  26. package/plugins/autonomous-pr-loop/.codex-plugin/plugin.json +17 -0
  27. package/plugins/autonomous-pr-loop/.mcp.json +13 -0
  28. package/plugins/autonomous-pr-loop/bin/agent-loop.mjs +31 -0
  29. package/plugins/autonomous-pr-loop/core/artifacts.ts +164 -0
  30. package/plugins/autonomous-pr-loop/core/autonomy-policy.ts +206 -0
  31. package/plugins/autonomous-pr-loop/core/ci.ts +131 -0
  32. package/plugins/autonomous-pr-loop/core/cli-i18n.ts +123 -0
  33. package/plugins/autonomous-pr-loop/core/cli.ts +1413 -0
  34. package/plugins/autonomous-pr-loop/core/command-runner.ts +446 -0
  35. package/plugins/autonomous-pr-loop/core/command.ts +47 -0
  36. package/plugins/autonomous-pr-loop/core/config-editor.ts +140 -0
  37. package/plugins/autonomous-pr-loop/core/config.ts +293 -0
  38. package/plugins/autonomous-pr-loop/core/controller-host.ts +19 -0
  39. package/plugins/autonomous-pr-loop/core/dashboard-server.ts +536 -0
  40. package/plugins/autonomous-pr-loop/core/delivery-work-item.ts +217 -0
  41. package/plugins/autonomous-pr-loop/core/doctor.ts +335 -0
  42. package/plugins/autonomous-pr-loop/core/errors.ts +82 -0
  43. package/plugins/autonomous-pr-loop/core/gate-recovery.ts +176 -0
  44. package/plugins/autonomous-pr-loop/core/gates.ts +26 -0
  45. package/plugins/autonomous-pr-loop/core/generic-lifecycle.ts +399 -0
  46. package/plugins/autonomous-pr-loop/core/git.ts +213 -0
  47. package/plugins/autonomous-pr-loop/core/github.ts +269 -0
  48. package/plugins/autonomous-pr-loop/core/gitnexus.ts +90 -0
  49. package/plugins/autonomous-pr-loop/core/happy.ts +42 -0
  50. package/plugins/autonomous-pr-loop/core/hook-capture.ts +115 -0
  51. package/plugins/autonomous-pr-loop/core/hook-events.ts +22 -0
  52. package/plugins/autonomous-pr-loop/core/hook-installation.ts +85 -0
  53. package/plugins/autonomous-pr-loop/core/hook-observer.ts +84 -0
  54. package/plugins/autonomous-pr-loop/core/hook-policy.ts +423 -0
  55. package/plugins/autonomous-pr-loop/core/hook-router.ts +452 -0
  56. package/plugins/autonomous-pr-loop/core/index.ts +32 -0
  57. package/plugins/autonomous-pr-loop/core/local-install.ts +778 -0
  58. package/plugins/autonomous-pr-loop/core/locale.ts +60 -0
  59. package/plugins/autonomous-pr-loop/core/loop-shapes.ts +190 -0
  60. package/plugins/autonomous-pr-loop/core/mcp-controller.ts +1479 -0
  61. package/plugins/autonomous-pr-loop/core/notification-feed.ts +263 -0
  62. package/plugins/autonomous-pr-loop/core/plan-parser.ts +206 -0
  63. package/plugins/autonomous-pr-loop/core/plugin-paths.ts +32 -0
  64. package/plugins/autonomous-pr-loop/core/policy.ts +65 -0
  65. package/plugins/autonomous-pr-loop/core/pr-lifecycle.ts +464 -0
  66. package/plugins/autonomous-pr-loop/core/pr-selector.ts +284 -0
  67. package/plugins/autonomous-pr-loop/core/profiles.ts +439 -0
  68. package/plugins/autonomous-pr-loop/core/redaction.ts +17 -0
  69. package/plugins/autonomous-pr-loop/core/repo-root.ts +22 -0
  70. package/plugins/autonomous-pr-loop/core/review-comments.ts +77 -0
  71. package/plugins/autonomous-pr-loop/core/scope-guard.ts +179 -0
  72. package/plugins/autonomous-pr-loop/core/state-machine.ts +828 -0
  73. package/plugins/autonomous-pr-loop/core/state-types.ts +130 -0
  74. package/plugins/autonomous-pr-loop/core/storage.ts +2527 -0
  75. package/plugins/autonomous-pr-loop/core/types.ts +567 -0
  76. package/plugins/autonomous-pr-loop/core/worker-events.ts +412 -0
  77. package/plugins/autonomous-pr-loop/core/worker-policy.ts +72 -0
  78. package/plugins/autonomous-pr-loop/core/worker-prompts.ts +182 -0
  79. package/plugins/autonomous-pr-loop/core/worker.ts +809 -0
  80. package/plugins/autonomous-pr-loop/core/workflow-board.ts +1515 -0
  81. package/plugins/autonomous-pr-loop/hooks/dist/permission-request.js +2462 -0
  82. package/plugins/autonomous-pr-loop/hooks/dist/post-compact.js +2462 -0
  83. package/plugins/autonomous-pr-loop/hooks/dist/post-tool-use.js +2462 -0
  84. package/plugins/autonomous-pr-loop/hooks/dist/pre-compact.js +2462 -0
  85. package/plugins/autonomous-pr-loop/hooks/dist/pre-tool-use.js +3460 -0
  86. package/plugins/autonomous-pr-loop/hooks/dist/session-start.js +2462 -0
  87. package/plugins/autonomous-pr-loop/hooks/dist/stop.js +2462 -0
  88. package/plugins/autonomous-pr-loop/hooks/dist/user-prompt-submit.js +2462 -0
  89. package/plugins/autonomous-pr-loop/hooks/hooks.json +106 -0
  90. package/plugins/autonomous-pr-loop/hooks/observe-runner.ts +25 -0
  91. package/plugins/autonomous-pr-loop/hooks/permission-request.ts +4 -0
  92. package/plugins/autonomous-pr-loop/hooks/post-compact.ts +4 -0
  93. package/plugins/autonomous-pr-loop/hooks/post-tool-use.ts +4 -0
  94. package/plugins/autonomous-pr-loop/hooks/pre-compact.ts +4 -0
  95. package/plugins/autonomous-pr-loop/hooks/pre-tool-use.ts +44 -0
  96. package/plugins/autonomous-pr-loop/hooks/session-start.ts +4 -0
  97. package/plugins/autonomous-pr-loop/hooks/stop.ts +4 -0
  98. package/plugins/autonomous-pr-loop/hooks/user-prompt-submit.ts +4 -0
  99. package/plugins/autonomous-pr-loop/mcp-server/src/index.ts +87 -0
  100. package/plugins/autonomous-pr-loop/mcp-server/src/tools.ts +205 -0
  101. package/plugins/autonomous-pr-loop/package.json +9 -0
  102. package/plugins/autonomous-pr-loop/schemas/config.schema.json +74 -0
  103. package/plugins/autonomous-pr-loop/schemas/marketplace.schema.json +46 -0
  104. package/plugins/autonomous-pr-loop/schemas/plugin.schema.json +32 -0
  105. package/plugins/autonomous-pr-loop/schemas/state.schema.json +19 -0
  106. package/plugins/autonomous-pr-loop/schemas/worker-event.schema.json +19 -0
  107. package/plugins/autonomous-pr-loop/schemas/worker-result.schema.json +58 -0
  108. package/plugins/autonomous-pr-loop/scripts/agent-loop.ts +44 -0
  109. package/plugins/autonomous-pr-loop/skills/autonomous-pr-loop/SKILL.md +26 -0
  110. package/plugins/autonomous-pr-loop/skills/autonomous-pr-loop/agents/openai.yaml +6 -0
  111. package/plugins/autonomous-pr-loop/ui/index.html +26 -0
  112. package/plugins/autonomous-pr-loop/ui/public/favicon.svg +7 -0
  113. package/plugins/autonomous-pr-loop/ui/src/api.ts +639 -0
  114. package/plugins/autonomous-pr-loop/ui/src/app.tsx +238 -0
  115. package/plugins/autonomous-pr-loop/ui/src/components/ActivityBadge.tsx +31 -0
  116. package/plugins/autonomous-pr-loop/ui/src/components/BrandMark.tsx +36 -0
  117. package/plugins/autonomous-pr-loop/ui/src/components/Collapsible.tsx +6 -0
  118. package/plugins/autonomous-pr-loop/ui/src/components/CommandPreview.tsx +15 -0
  119. package/plugins/autonomous-pr-loop/ui/src/components/ConfigEditor.tsx +389 -0
  120. package/plugins/autonomous-pr-loop/ui/src/components/EmptyState.tsx +10 -0
  121. package/plugins/autonomous-pr-loop/ui/src/components/ErrorState.tsx +12 -0
  122. package/plugins/autonomous-pr-loop/ui/src/components/List.tsx +7 -0
  123. package/plugins/autonomous-pr-loop/ui/src/components/MetricRow.tsx +6 -0
  124. package/plugins/autonomous-pr-loop/ui/src/components/ResponsiveTable.tsx +65 -0
  125. package/plugins/autonomous-pr-loop/ui/src/components/RiskBadge.tsx +10 -0
  126. package/plugins/autonomous-pr-loop/ui/src/components/StatusBadge.tsx +29 -0
  127. package/plugins/autonomous-pr-loop/ui/src/components/TopMetric.tsx +10 -0
  128. package/plugins/autonomous-pr-loop/ui/src/fixtures.ts +1152 -0
  129. package/plugins/autonomous-pr-loop/ui/src/i18n.ts +1105 -0
  130. package/plugins/autonomous-pr-loop/ui/src/main.tsx +14 -0
  131. package/plugins/autonomous-pr-loop/ui/src/pages/CommandCenter.tsx +470 -0
  132. package/plugins/autonomous-pr-loop/ui/src/pages/CommandCenterParts.tsx +276 -0
  133. package/plugins/autonomous-pr-loop/ui/src/pages/agent-timeline/AgentTimelineView.tsx +73 -0
  134. package/plugins/autonomous-pr-loop/ui/src/pages/artifact-viewer/ArtifactViewer.tsx +44 -0
  135. package/plugins/autonomous-pr-loop/ui/src/pages/dry-run-preview/DryRunPreview.tsx +66 -0
  136. package/plugins/autonomous-pr-loop/ui/src/pages/event-ledger/EventLedger.tsx +17 -0
  137. package/plugins/autonomous-pr-loop/ui/src/pages/gate-center/GateCenter.tsx +34 -0
  138. package/plugins/autonomous-pr-loop/ui/src/pages/mission-control/MissionControl.tsx +104 -0
  139. package/plugins/autonomous-pr-loop/ui/src/pages/mission-control/WorkflowBoard.tsx +577 -0
  140. package/plugins/autonomous-pr-loop/ui/src/pages/notifications/NotificationsView.tsx +30 -0
  141. package/plugins/autonomous-pr-loop/ui/src/pages/plan-navigator/PlanNavigator.tsx +19 -0
  142. package/plugins/autonomous-pr-loop/ui/src/pages/policy-config/PolicyConfig.tsx +22 -0
  143. package/plugins/autonomous-pr-loop/ui/src/pages/pr-inbox/PrInbox.tsx +26 -0
  144. package/plugins/autonomous-pr-loop/ui/src/pages/recovery-center/RecoveryCenter.tsx +125 -0
  145. package/plugins/autonomous-pr-loop/ui/src/pages/scope-guard/ScopeGuard.tsx +16 -0
  146. package/plugins/autonomous-pr-loop/ui/src/pages/worker-runs/WorkerRuns.tsx +39 -0
  147. package/plugins/autonomous-pr-loop/ui/src/styles.css +2673 -0
  148. package/plugins/autonomous-pr-loop/ui/src/theme.ts +57 -0
  149. package/tsconfig.json +18 -0
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://holo-codex.local/schemas/state.schema.json",
4
+ "title": "AgentLoopStateSnapshot",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "status"],
7
+ "additionalProperties": true,
8
+ "properties": {
9
+ "schemaVersion": { "type": "integer", "const": 1 },
10
+ "status": { "type": "string" },
11
+ "gate": {
12
+ "type": ["object", "null"],
13
+ "properties": {
14
+ "kind": { "type": "string" },
15
+ "message": { "type": "string" }
16
+ }
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://holo-codex.local/schemas/worker-event.schema.json",
4
+ "title": "WorkerEvent",
5
+ "type": "object",
6
+ "required": ["eventType"],
7
+ "additionalProperties": true,
8
+ "properties": {
9
+ "eventType": { "type": "string" },
10
+ "itemType": { "type": "string" },
11
+ "itemId": { "type": "string" },
12
+ "itemStatus": { "type": "string" },
13
+ "threadId": { "type": "string" },
14
+ "backend": { "enum": ["codex-exec", "codex-app-server"] },
15
+ "summary": {},
16
+ "usage": {},
17
+ "artifactIds": { "type": "array", "items": { "type": "string" } }
18
+ }
19
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://holo-codex.local/schemas/worker-result.schema.json",
4
+ "title": "WorkerResult",
5
+ "type": "object",
6
+ "required": ["ok", "summary", "changedFiles", "commandsRun", "testsRun", "gitnexus", "outOfScope", "followUps"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "ok": { "type": "boolean" },
10
+ "summary": { "type": "string" },
11
+ "changedFiles": { "type": "array", "items": { "type": "string" } },
12
+ "commandsRun": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "object",
16
+ "required": ["command", "exitCode"],
17
+ "additionalProperties": false,
18
+ "properties": {
19
+ "command": { "type": "string" },
20
+ "exitCode": { "type": "integer" }
21
+ }
22
+ }
23
+ },
24
+ "testsRun": { "type": "array", "items": { "type": "string" } },
25
+ "gitnexus": {
26
+ "type": "object",
27
+ "required": ["impactRun", "detectChangesRun"],
28
+ "additionalProperties": false,
29
+ "properties": {
30
+ "impactRun": { "type": "boolean" },
31
+ "detectChangesRun": { "type": "boolean" },
32
+ "notes": { "type": "string" }
33
+ }
34
+ },
35
+ "outOfScope": {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "object",
39
+ "required": ["item", "reason"],
40
+ "additionalProperties": false,
41
+ "properties": {
42
+ "item": { "type": "string" },
43
+ "reason": { "type": "string" }
44
+ }
45
+ }
46
+ },
47
+ "followUps": { "type": "array", "items": { "type": "string" } },
48
+ "error": {
49
+ "type": "object",
50
+ "required": ["kind", "message"],
51
+ "additionalProperties": false,
52
+ "properties": {
53
+ "kind": { "type": "string" },
54
+ "message": { "type": "string" }
55
+ }
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env node
2
+ import { parseCliInvocation, runAgentLoopCli } from "../core/cli.js";
3
+
4
+ const args = process.argv.slice(2);
5
+ const parsedInvocation = parseInvocation(args);
6
+ const controller = new AbortController();
7
+ let signalCount = 0;
8
+ const onSignal = (): void => {
9
+ signalCount += 1;
10
+ if (signalCount > 1) {
11
+ process.exit(130);
12
+ }
13
+ controller.abort();
14
+ };
15
+ process.on("SIGINT", onSignal);
16
+ process.on("SIGTERM", onSignal);
17
+
18
+ let result = await runAgentLoopCli(args, process.cwd(), { signal: controller.signal });
19
+ if (controller.signal.aborted && parsedInvocation?.command !== "stop") {
20
+ result = await runAgentLoopCli([
21
+ "stop",
22
+ "--repo",
23
+ parsedInvocation?.targetRepoRoot ?? process.cwd(),
24
+ ...(args.includes("--json") ? ["--json"] : [])
25
+ ], process.cwd());
26
+ }
27
+ if (result.stdout) {
28
+ process.stdout.write(result.stdout);
29
+ }
30
+ if (result.stderr) {
31
+ process.stderr.write(result.stderr);
32
+ }
33
+ process.exitCode = result.exitCode;
34
+ if ((parsedInvocation?.command ?? args[0]) !== "dashboard" || args.includes("--help") || args.includes("-h")) {
35
+ process.exit(result.exitCode);
36
+ }
37
+
38
+ function parseInvocation(rawArgs: string[]): ReturnType<typeof parseCliInvocation> | undefined {
39
+ try {
40
+ return parseCliInvocation(rawArgs, process.cwd());
41
+ } catch {
42
+ return undefined;
43
+ }
44
+ }
@@ -0,0 +1,26 @@
1
+ # HOLO-Codex
2
+
3
+ Use this skill when the user asks Codex to enter or continue the HOLO-Codex Human On Loop delivery workflow.
4
+
5
+ ## Required startup
6
+
7
+ 1. Read the current repository `AGENTS.md` before doing any work.
8
+ 2. Read `.agent-loop/config.json` before inferring repository state.
9
+ 3. Prefer the plugin MCP control plane when available. If MCP is unavailable, run `pnpm agent-loop status`.
10
+ 4. Read state from the configured storage. Do not use chat history as the source of truth.
11
+
12
+ ## Gate behavior
13
+
14
+ - If status is `BLOCKED`, report the blocker and stop unless the user explicitly gives the next action.
15
+ - If config is missing, report `needs_repo_init` and ask the user to run `pnpm agent-loop init` or provide config.
16
+ - Do not bypass policy gates with direct shell commands.
17
+
18
+ ## Worker boundary
19
+
20
+ - Supervisor may create branches, run checks, commit, push, and create PRs when the state machine allows it.
21
+ - Worker agents must not commit, push, create PRs, merge, or modify protected runtime state.
22
+ - Worker agents return implementation output for supervisor review.
23
+
24
+ ## Current boundary
25
+
26
+ This plugin version provides the shell, config, storage, policy gates, PR lifecycle supervision, worker orchestration, Codex hooks, MCP control plane, and a local dashboard. It does not provide GitHub webhooks, a hosted service, or a permanent daemon.
@@ -0,0 +1,6 @@
1
+ name: autonomous-pr-loop-worker
2
+ description: Implementation worker profile for future HOLO-Codex orchestration.
3
+ instructions: |
4
+ Implement only the task assigned by the supervisor.
5
+ Do not commit, push, create pull requests, merge branches, or bypass gates.
6
+ Return a concise summary, changed files, and verification results.
@@ -0,0 +1,26 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
7
+ <title>HOLO-Codex Dashboard</title>
8
+ <script>
9
+ (() => {
10
+ try {
11
+ const key = "agent-loop-dashboard-theme";
12
+ const stored = window.localStorage?.getItem(key);
13
+ const setting = stored === "light" || stored === "dark" || stored === "system" ? stored : "system";
14
+ const prefersDark = window.matchMedia?.("(prefers-color-scheme: dark)").matches ?? true;
15
+ document.documentElement.dataset.theme = setting === "system" ? (prefersDark ? "dark" : "light") : setting;
16
+ } catch {
17
+ document.documentElement.dataset.theme = "dark";
18
+ }
19
+ })();
20
+ </script>
21
+ </head>
22
+ <body>
23
+ <div id="root"></div>
24
+ <script type="module" src="/src/main.tsx"></script>
25
+ </body>
26
+ </html>
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
2
+ <rect x="8" y="8" width="112" height="112" rx="28" fill="#f8fafc" />
3
+ <path d="M111.3 52.6A49 49 0 1 1 84 19.2" fill="none" stroke="#111827" stroke-width="8" stroke-linecap="round" />
4
+ <circle cx="98.6" cy="29.4" r="6.5" fill="#f59e0b" />
5
+ <path d="M41 48L62 64L41 80" fill="none" stroke="#111827" stroke-width="8" stroke-linecap="round" stroke-linejoin="round" />
6
+ <path d="M70 81H91" fill="none" stroke="#111827" stroke-width="8" stroke-linecap="round" />
7
+ </svg>