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.
- package/.agents/plugins/marketplace.json +20 -0
- package/CONTRIBUTING.md +54 -0
- package/LICENSE +21 -0
- package/README.md +215 -0
- package/README.zh-CN.md +215 -0
- package/SECURITY.md +39 -0
- package/assets/brand/README.md +35 -0
- package/assets/brand/holo-codex-icon.svg +28 -0
- package/assets/brand/holo-codex-lockup.svg +49 -0
- package/assets/brand/holo-codex-mark.svg +33 -0
- package/assets/brand/holo-codex-plugin-card.png +0 -0
- package/assets/brand/holo-codex-plugin-card.svg +81 -0
- package/assets/brand/holo-codex-readme-hero.png +0 -0
- package/assets/brand/holo-codex-readme-hero.svg +140 -0
- package/assets/brand/holo-codex-social-preview.png +0 -0
- package/assets/brand/holo-codex-social-preview.svg +130 -0
- package/assets/brand/holo-codex-wordmark-options.svg +52 -0
- package/docs/checklists/agent-loop-first-delivery-audit.md +129 -0
- package/docs/examples/generic-loop-repo-hygiene.md +168 -0
- package/docs/install.md +190 -0
- package/docs/local-release-readiness.md +206 -0
- package/docs/release-checklist.md +144 -0
- package/docs/self-bootstrap.md +150 -0
- package/docs/trust-and-safety.md +45 -0
- package/package.json +83 -0
- package/plugins/autonomous-pr-loop/.codex-plugin/plugin.json +17 -0
- package/plugins/autonomous-pr-loop/.mcp.json +13 -0
- package/plugins/autonomous-pr-loop/bin/agent-loop.mjs +31 -0
- package/plugins/autonomous-pr-loop/core/artifacts.ts +164 -0
- package/plugins/autonomous-pr-loop/core/autonomy-policy.ts +206 -0
- package/plugins/autonomous-pr-loop/core/ci.ts +131 -0
- package/plugins/autonomous-pr-loop/core/cli-i18n.ts +123 -0
- package/plugins/autonomous-pr-loop/core/cli.ts +1413 -0
- package/plugins/autonomous-pr-loop/core/command-runner.ts +446 -0
- package/plugins/autonomous-pr-loop/core/command.ts +47 -0
- package/plugins/autonomous-pr-loop/core/config-editor.ts +140 -0
- package/plugins/autonomous-pr-loop/core/config.ts +293 -0
- package/plugins/autonomous-pr-loop/core/controller-host.ts +19 -0
- package/plugins/autonomous-pr-loop/core/dashboard-server.ts +536 -0
- package/plugins/autonomous-pr-loop/core/delivery-work-item.ts +217 -0
- package/plugins/autonomous-pr-loop/core/doctor.ts +335 -0
- package/plugins/autonomous-pr-loop/core/errors.ts +82 -0
- package/plugins/autonomous-pr-loop/core/gate-recovery.ts +176 -0
- package/plugins/autonomous-pr-loop/core/gates.ts +26 -0
- package/plugins/autonomous-pr-loop/core/generic-lifecycle.ts +399 -0
- package/plugins/autonomous-pr-loop/core/git.ts +213 -0
- package/plugins/autonomous-pr-loop/core/github.ts +269 -0
- package/plugins/autonomous-pr-loop/core/gitnexus.ts +90 -0
- package/plugins/autonomous-pr-loop/core/happy.ts +42 -0
- package/plugins/autonomous-pr-loop/core/hook-capture.ts +115 -0
- package/plugins/autonomous-pr-loop/core/hook-events.ts +22 -0
- package/plugins/autonomous-pr-loop/core/hook-installation.ts +85 -0
- package/plugins/autonomous-pr-loop/core/hook-observer.ts +84 -0
- package/plugins/autonomous-pr-loop/core/hook-policy.ts +423 -0
- package/plugins/autonomous-pr-loop/core/hook-router.ts +452 -0
- package/plugins/autonomous-pr-loop/core/index.ts +32 -0
- package/plugins/autonomous-pr-loop/core/local-install.ts +778 -0
- package/plugins/autonomous-pr-loop/core/locale.ts +60 -0
- package/plugins/autonomous-pr-loop/core/loop-shapes.ts +190 -0
- package/plugins/autonomous-pr-loop/core/mcp-controller.ts +1479 -0
- package/plugins/autonomous-pr-loop/core/notification-feed.ts +263 -0
- package/plugins/autonomous-pr-loop/core/plan-parser.ts +206 -0
- package/plugins/autonomous-pr-loop/core/plugin-paths.ts +32 -0
- package/plugins/autonomous-pr-loop/core/policy.ts +65 -0
- package/plugins/autonomous-pr-loop/core/pr-lifecycle.ts +464 -0
- package/plugins/autonomous-pr-loop/core/pr-selector.ts +284 -0
- package/plugins/autonomous-pr-loop/core/profiles.ts +439 -0
- package/plugins/autonomous-pr-loop/core/redaction.ts +17 -0
- package/plugins/autonomous-pr-loop/core/repo-root.ts +22 -0
- package/plugins/autonomous-pr-loop/core/review-comments.ts +77 -0
- package/plugins/autonomous-pr-loop/core/scope-guard.ts +179 -0
- package/plugins/autonomous-pr-loop/core/state-machine.ts +828 -0
- package/plugins/autonomous-pr-loop/core/state-types.ts +130 -0
- package/plugins/autonomous-pr-loop/core/storage.ts +2527 -0
- package/plugins/autonomous-pr-loop/core/types.ts +567 -0
- package/plugins/autonomous-pr-loop/core/worker-events.ts +412 -0
- package/plugins/autonomous-pr-loop/core/worker-policy.ts +72 -0
- package/plugins/autonomous-pr-loop/core/worker-prompts.ts +182 -0
- package/plugins/autonomous-pr-loop/core/worker.ts +809 -0
- package/plugins/autonomous-pr-loop/core/workflow-board.ts +1515 -0
- package/plugins/autonomous-pr-loop/hooks/dist/permission-request.js +2462 -0
- package/plugins/autonomous-pr-loop/hooks/dist/post-compact.js +2462 -0
- package/plugins/autonomous-pr-loop/hooks/dist/post-tool-use.js +2462 -0
- package/plugins/autonomous-pr-loop/hooks/dist/pre-compact.js +2462 -0
- package/plugins/autonomous-pr-loop/hooks/dist/pre-tool-use.js +3460 -0
- package/plugins/autonomous-pr-loop/hooks/dist/session-start.js +2462 -0
- package/plugins/autonomous-pr-loop/hooks/dist/stop.js +2462 -0
- package/plugins/autonomous-pr-loop/hooks/dist/user-prompt-submit.js +2462 -0
- package/plugins/autonomous-pr-loop/hooks/hooks.json +106 -0
- package/plugins/autonomous-pr-loop/hooks/observe-runner.ts +25 -0
- package/plugins/autonomous-pr-loop/hooks/permission-request.ts +4 -0
- package/plugins/autonomous-pr-loop/hooks/post-compact.ts +4 -0
- package/plugins/autonomous-pr-loop/hooks/post-tool-use.ts +4 -0
- package/plugins/autonomous-pr-loop/hooks/pre-compact.ts +4 -0
- package/plugins/autonomous-pr-loop/hooks/pre-tool-use.ts +44 -0
- package/plugins/autonomous-pr-loop/hooks/session-start.ts +4 -0
- package/plugins/autonomous-pr-loop/hooks/stop.ts +4 -0
- package/plugins/autonomous-pr-loop/hooks/user-prompt-submit.ts +4 -0
- package/plugins/autonomous-pr-loop/mcp-server/src/index.ts +87 -0
- package/plugins/autonomous-pr-loop/mcp-server/src/tools.ts +205 -0
- package/plugins/autonomous-pr-loop/package.json +9 -0
- package/plugins/autonomous-pr-loop/schemas/config.schema.json +74 -0
- package/plugins/autonomous-pr-loop/schemas/marketplace.schema.json +46 -0
- package/plugins/autonomous-pr-loop/schemas/plugin.schema.json +32 -0
- package/plugins/autonomous-pr-loop/schemas/state.schema.json +19 -0
- package/plugins/autonomous-pr-loop/schemas/worker-event.schema.json +19 -0
- package/plugins/autonomous-pr-loop/schemas/worker-result.schema.json +58 -0
- package/plugins/autonomous-pr-loop/scripts/agent-loop.ts +44 -0
- package/plugins/autonomous-pr-loop/skills/autonomous-pr-loop/SKILL.md +26 -0
- package/plugins/autonomous-pr-loop/skills/autonomous-pr-loop/agents/openai.yaml +6 -0
- package/plugins/autonomous-pr-loop/ui/index.html +26 -0
- package/plugins/autonomous-pr-loop/ui/public/favicon.svg +7 -0
- package/plugins/autonomous-pr-loop/ui/src/api.ts +639 -0
- package/plugins/autonomous-pr-loop/ui/src/app.tsx +238 -0
- package/plugins/autonomous-pr-loop/ui/src/components/ActivityBadge.tsx +31 -0
- package/plugins/autonomous-pr-loop/ui/src/components/BrandMark.tsx +36 -0
- package/plugins/autonomous-pr-loop/ui/src/components/Collapsible.tsx +6 -0
- package/plugins/autonomous-pr-loop/ui/src/components/CommandPreview.tsx +15 -0
- package/plugins/autonomous-pr-loop/ui/src/components/ConfigEditor.tsx +389 -0
- package/plugins/autonomous-pr-loop/ui/src/components/EmptyState.tsx +10 -0
- package/plugins/autonomous-pr-loop/ui/src/components/ErrorState.tsx +12 -0
- package/plugins/autonomous-pr-loop/ui/src/components/List.tsx +7 -0
- package/plugins/autonomous-pr-loop/ui/src/components/MetricRow.tsx +6 -0
- package/plugins/autonomous-pr-loop/ui/src/components/ResponsiveTable.tsx +65 -0
- package/plugins/autonomous-pr-loop/ui/src/components/RiskBadge.tsx +10 -0
- package/plugins/autonomous-pr-loop/ui/src/components/StatusBadge.tsx +29 -0
- package/plugins/autonomous-pr-loop/ui/src/components/TopMetric.tsx +10 -0
- package/plugins/autonomous-pr-loop/ui/src/fixtures.ts +1152 -0
- package/plugins/autonomous-pr-loop/ui/src/i18n.ts +1105 -0
- package/plugins/autonomous-pr-loop/ui/src/main.tsx +14 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/CommandCenter.tsx +470 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/CommandCenterParts.tsx +276 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/agent-timeline/AgentTimelineView.tsx +73 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/artifact-viewer/ArtifactViewer.tsx +44 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/dry-run-preview/DryRunPreview.tsx +66 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/event-ledger/EventLedger.tsx +17 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/gate-center/GateCenter.tsx +34 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/mission-control/MissionControl.tsx +104 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/mission-control/WorkflowBoard.tsx +577 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/notifications/NotificationsView.tsx +30 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/plan-navigator/PlanNavigator.tsx +19 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/policy-config/PolicyConfig.tsx +22 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/pr-inbox/PrInbox.tsx +26 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/recovery-center/RecoveryCenter.tsx +125 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/scope-guard/ScopeGuard.tsx +16 -0
- package/plugins/autonomous-pr-loop/ui/src/pages/worker-runs/WorkerRuns.tsx +39 -0
- package/plugins/autonomous-pr-loop/ui/src/styles.css +2673 -0
- package/plugins/autonomous-pr-loop/ui/src/theme.ts +57 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import type { AgentLoopGateKind, AgentLoopStatus } from "./types.js";
|
|
2
|
+
|
|
3
|
+
/** Loop state names handled by the declarative state machine. */
|
|
4
|
+
export type AgentLoopState =
|
|
5
|
+
| "SYNC_MAIN"
|
|
6
|
+
| "DISCOVER_PROGRESS"
|
|
7
|
+
| "SELECT_NEXT_PR"
|
|
8
|
+
| "WRITE_SPEC"
|
|
9
|
+
| "CREATE_BRANCH"
|
|
10
|
+
| "IMPLEMENT"
|
|
11
|
+
| "SELF_CHECK"
|
|
12
|
+
| "COMMIT_PUSH_PR"
|
|
13
|
+
| "WAIT_REVIEW_OR_CI"
|
|
14
|
+
| "FIX_REVIEW"
|
|
15
|
+
| "PUSH_FIX"
|
|
16
|
+
| "READY_TO_MERGE"
|
|
17
|
+
| "MERGE"
|
|
18
|
+
| "DEFINE_GOAL"
|
|
19
|
+
| "COLLECT_CONTEXT"
|
|
20
|
+
| "PLAN_WORK"
|
|
21
|
+
| "EXECUTE_STEP"
|
|
22
|
+
| "SELF_REVIEW"
|
|
23
|
+
| "HUMAN_GATE"
|
|
24
|
+
| "DELIVER"
|
|
25
|
+
| "COMPLETE"
|
|
26
|
+
| "BLOCKED"
|
|
27
|
+
| "STOPPED";
|
|
28
|
+
|
|
29
|
+
/** State machine trigger names represented in the transition table. */
|
|
30
|
+
export type AgentLoopTrigger = "step" | "stop";
|
|
31
|
+
|
|
32
|
+
/** Runtime artifact kind allowlist used to keep artifact paths constrained. */
|
|
33
|
+
export const ARTIFACT_KINDS = [
|
|
34
|
+
"spec",
|
|
35
|
+
"command-output",
|
|
36
|
+
"dry-run-plan",
|
|
37
|
+
"state-snapshot",
|
|
38
|
+
"log",
|
|
39
|
+
"worker-prompt",
|
|
40
|
+
"worker-result",
|
|
41
|
+
"worker-jsonl",
|
|
42
|
+
"generic-context",
|
|
43
|
+
"generic-plan",
|
|
44
|
+
"generic-deliverable"
|
|
45
|
+
] as const;
|
|
46
|
+
|
|
47
|
+
/** Artifact kinds persisted under `.agent-loop/artifacts`. */
|
|
48
|
+
export type ArtifactKind = (typeof ARTIFACT_KINDS)[number];
|
|
49
|
+
|
|
50
|
+
/** Declarative state transition row. Guards are named so tests can inspect the table. */
|
|
51
|
+
export interface StateTransition {
|
|
52
|
+
from: AgentLoopState;
|
|
53
|
+
to: AgentLoopState;
|
|
54
|
+
trigger: AgentLoopTrigger;
|
|
55
|
+
guard?:
|
|
56
|
+
| "always"
|
|
57
|
+
| "config_present"
|
|
58
|
+
| "next_pr_unique"
|
|
59
|
+
| "goal_clear"
|
|
60
|
+
| "goal_unclear"
|
|
61
|
+
| "skip_context"
|
|
62
|
+
| "scope_change_requested"
|
|
63
|
+
| "scope_change_approved"
|
|
64
|
+
| "review_passed"
|
|
65
|
+
| "fix_needed_cycles_remain"
|
|
66
|
+
| "review_cycles_exhausted"
|
|
67
|
+
| "deliverable_approved"
|
|
68
|
+
| "request_changes"
|
|
69
|
+
| "rejected";
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Named transition guard selected by shape-aware lifecycle code. */
|
|
73
|
+
export type TransitionGuard = NonNullable<StateTransition["guard"]>;
|
|
74
|
+
|
|
75
|
+
/** Structured command plan. Commands are never represented as shell strings. */
|
|
76
|
+
export interface CommandPlan {
|
|
77
|
+
id: string;
|
|
78
|
+
file: string;
|
|
79
|
+
args: string[];
|
|
80
|
+
cwd: string;
|
|
81
|
+
purpose: string;
|
|
82
|
+
timeoutMs?: number;
|
|
83
|
+
outputLimitBytes?: number;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** Result of executing or dry-running a command plan. */
|
|
87
|
+
export interface CommandRunResult {
|
|
88
|
+
plan: CommandPlan;
|
|
89
|
+
dryRun: boolean;
|
|
90
|
+
allowed: boolean;
|
|
91
|
+
exitCode: number;
|
|
92
|
+
stdout: string;
|
|
93
|
+
stderr: string;
|
|
94
|
+
durationMs: number;
|
|
95
|
+
timedOut: boolean;
|
|
96
|
+
artifactIds: string[];
|
|
97
|
+
rejectionReason?: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** Artifact metadata persisted in SQLite and verified by sha256 on read. */
|
|
101
|
+
export interface ArtifactRecord {
|
|
102
|
+
id: string;
|
|
103
|
+
runId: string;
|
|
104
|
+
kind: ArtifactKind;
|
|
105
|
+
name: string;
|
|
106
|
+
path: string;
|
|
107
|
+
sha256: string;
|
|
108
|
+
createdAt: string;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Snapshot of real git state used to prevent unsafe resume behavior. */
|
|
112
|
+
export interface RealitySnapshot {
|
|
113
|
+
branch: string;
|
|
114
|
+
worktreeClean: boolean;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** Result returned by state-machine operations and CLI JSON output. */
|
|
118
|
+
export interface StateMachineResult {
|
|
119
|
+
ok: boolean;
|
|
120
|
+
runId?: string;
|
|
121
|
+
status: AgentLoopStatus;
|
|
122
|
+
currentState?: AgentLoopState;
|
|
123
|
+
transitions: Array<{ from: AgentLoopState; to: AgentLoopState }>;
|
|
124
|
+
gate?: {
|
|
125
|
+
kind: AgentLoopGateKind;
|
|
126
|
+
message: string;
|
|
127
|
+
details?: unknown;
|
|
128
|
+
};
|
|
129
|
+
artifacts: ArtifactRecord[];
|
|
130
|
+
}
|