@open330/oac 2026.4.3 → 2026.220.2

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 (38) hide show
  1. package/CHANGELOG.md +115 -0
  2. package/README.md +2 -2
  3. package/dist/{chunk-YWIB3TRI.js → chunk-6A37SKAJ.js} +15 -2
  4. package/dist/chunk-6A37SKAJ.js.map +1 -0
  5. package/dist/{chunk-HDMLNOND.js → chunk-6JEFW6B7.js} +92 -20
  6. package/dist/chunk-6JEFW6B7.js.map +1 -0
  7. package/dist/{chunk-ZRYAHZQJ.js → chunk-7C7SC4TZ.js} +1 -1
  8. package/dist/{chunk-XUW3XWTX.js → chunk-LRTQCVQK.js} +145 -121
  9. package/dist/chunk-LRTQCVQK.js.map +1 -0
  10. package/dist/{chunk-CJAJ4MBO.js → chunk-OS3XDHOJ.js} +57 -18
  11. package/dist/chunk-OS3XDHOJ.js.map +1 -0
  12. package/dist/{chunk-7FWC3Z4W.js → chunk-QPVNC7S4.js} +479 -196
  13. package/dist/chunk-QPVNC7S4.js.map +1 -0
  14. package/dist/cli/cli.js +6 -6
  15. package/dist/cli/index.js +6 -6
  16. package/dist/completion/index.d.ts +5 -0
  17. package/dist/completion/index.js +49 -8
  18. package/dist/completion/index.js.map +1 -1
  19. package/dist/core/index.d.ts +16 -1
  20. package/dist/core/index.js +8 -4
  21. package/dist/dashboard/index.js +33 -24
  22. package/dist/dashboard/index.js.map +1 -1
  23. package/dist/discovery/index.d.ts +18 -2
  24. package/dist/discovery/index.js +4 -2
  25. package/dist/execution/index.d.ts +45 -1
  26. package/dist/execution/index.js +7 -3
  27. package/dist/repo/index.d.ts +2 -2
  28. package/dist/repo/index.js +1 -1
  29. package/dist/{types-CYCwgojB.d.ts → types-3_IAAxh5.d.ts} +1 -0
  30. package/docs/config-reference.md +271 -0
  31. package/docs/multi-agent-support-technical-spec.md +312 -0
  32. package/package.json +23 -18
  33. package/dist/chunk-7FWC3Z4W.js.map +0 -1
  34. package/dist/chunk-CJAJ4MBO.js.map +0 -1
  35. package/dist/chunk-HDMLNOND.js.map +0 -1
  36. package/dist/chunk-XUW3XWTX.js.map +0 -1
  37. package/dist/chunk-YWIB3TRI.js.map +0 -1
  38. /package/dist/{chunk-ZRYAHZQJ.js.map → chunk-7C7SC4TZ.js.map} +0 -0
@@ -5,6 +5,7 @@ import {
5
5
  TestGapScanner,
6
6
  TodoScanner,
7
7
  analyzeCodebase,
8
+ buildScanners,
8
9
  computeEpicComplexity,
9
10
  computeEpicPriority,
10
11
  createBacklog,
@@ -20,8 +21,8 @@ import {
20
21
  persistContext,
21
22
  rankTasks,
22
23
  updateBacklog
23
- } from "../chunk-HDMLNOND.js";
24
- import "../chunk-YWIB3TRI.js";
24
+ } from "../chunk-6JEFW6B7.js";
25
+ import "../chunk-6A37SKAJ.js";
25
26
  export {
26
27
  CompositeScanner,
27
28
  GitHubIssuesScanner,
@@ -29,6 +30,7 @@ export {
29
30
  TestGapScanner,
30
31
  TodoScanner,
31
32
  analyzeCodebase,
33
+ buildScanners,
32
34
  computeEpicComplexity,
33
35
  computeEpicPriority,
34
36
  createBacklog,
@@ -85,6 +85,50 @@ declare class CodexAdapter implements AgentProvider {
85
85
  abort(executionId: string): Promise<void>;
86
86
  }
87
87
 
88
+ declare class OpenCodeAdapter implements AgentProvider {
89
+ readonly id: AgentProviderId;
90
+ readonly name = "OpenCode";
91
+ private readonly runningExecutions;
92
+ checkAvailability(): Promise<AgentAvailability>;
93
+ execute(params: AgentExecuteParams): AgentExecution;
94
+ estimateTokens(params: TokenEstimateParams): Promise<TokenEstimate>;
95
+ abort(executionId: string): Promise<void>;
96
+ }
97
+
98
+ /**
99
+ * Factory function that creates a new adapter instance.
100
+ *
101
+ * Using factories (rather than singleton instances) ensures each
102
+ * concurrent pipeline run gets its own `runningExecutions` map.
103
+ */
104
+ type AdapterFactory = () => AgentProvider;
105
+ /**
106
+ * Maintains a registry of agent adapter factories keyed by provider ID.
107
+ *
108
+ * Built-in adapters (claude-code, codex, opencode) are registered at
109
+ * module load time. Custom adapters can be added at runtime with
110
+ * `adapterRegistry.register(id, factory)`.
111
+ */
112
+ declare class AdapterRegistry {
113
+ private readonly factories;
114
+ /** Well-known aliases (e.g. legacy IDs) that map to canonical provider IDs. */
115
+ private readonly aliases;
116
+ /** Register a new adapter factory. Replaces any previous factory for the same ID. */
117
+ register(id: string, factory: AdapterFactory): void;
118
+ /** Add an alias that maps to an existing canonical ID. */
119
+ alias(alias: string, canonicalId: string): void;
120
+ /** Resolve an ID (including aliases) and return the factory, or `undefined`. */
121
+ get(rawId: string): AdapterFactory | undefined;
122
+ /** Canonical ID after alias resolution. */
123
+ resolveId(rawId: string): string;
124
+ /** All registered canonical provider IDs. */
125
+ registeredIds(): string[];
126
+ }
127
+ /**
128
+ * Global singleton registry with built-in adapters pre-registered.
129
+ */
130
+ declare const adapterRegistry: AdapterRegistry;
131
+
88
132
  interface SandboxContext {
89
133
  path: string;
90
134
  branchName: string;
@@ -168,4 +212,4 @@ declare class ExecutionEngine {
168
212
  private buildRunResult;
169
213
  }
170
214
 
171
- export { type AgentAvailability, type AgentEvent, type AgentExecuteParams, type AgentExecution, type AgentProvider, type AgentResult, ClaudeCodeAdapter, CodexAdapter, type ExecuteTaskOptions, ExecutionEngine, type ExecutionEngineConfig, type Job, type JobStatus, type RunResult, type SandboxContext, type TokenEstimateParams, buildEpicPrompt, createSandbox, epicAsTask, executeTask, isTransientError };
215
+ export { type AdapterFactory, type AgentAvailability, type AgentEvent, type AgentExecuteParams, type AgentExecution, type AgentProvider, type AgentResult, ClaudeCodeAdapter, CodexAdapter, type ExecuteTaskOptions, ExecutionEngine, type ExecutionEngineConfig, type Job, type JobStatus, OpenCodeAdapter, type RunResult, type SandboxContext, type TokenEstimateParams, adapterRegistry, buildEpicPrompt, createSandbox, epicAsTask, executeTask, isTransientError };
@@ -2,18 +2,22 @@ import {
2
2
  ClaudeCodeAdapter,
3
3
  CodexAdapter,
4
4
  ExecutionEngine,
5
+ OpenCodeAdapter,
6
+ adapterRegistry,
5
7
  buildEpicPrompt,
6
8
  createSandbox,
7
9
  epicAsTask,
8
10
  executeTask,
9
11
  isTransientError
10
- } from "../chunk-7FWC3Z4W.js";
11
- import "../chunk-ZRYAHZQJ.js";
12
- import "../chunk-YWIB3TRI.js";
12
+ } from "../chunk-QPVNC7S4.js";
13
+ import "../chunk-7C7SC4TZ.js";
14
+ import "../chunk-6A37SKAJ.js";
13
15
  export {
14
16
  ClaudeCodeAdapter,
15
17
  CodexAdapter,
16
18
  ExecutionEngine,
19
+ OpenCodeAdapter,
20
+ adapterRegistry,
17
21
  buildEpicPrompt,
18
22
  createSandbox,
19
23
  epicAsTask,
@@ -1,5 +1,5 @@
1
- import { R as ResolvedRepo } from '../types-CYCwgojB.js';
2
- export { a as RepoPermissions, b as ResolvedRepoGitState, c as ResolvedRepoMeta } from '../types-CYCwgojB.js';
1
+ import { R as ResolvedRepo } from '../types-3_IAAxh5.js';
2
+ export { a as RepoPermissions, b as ResolvedRepoGitState, c as ResolvedRepoMeta } from '../types-3_IAAxh5.js';
3
3
 
4
4
  type RepoResolutionErrorCode = "INVALID_INPUT" | "NOT_FOUND" | "FORBIDDEN" | "ARCHIVED" | "UNKNOWN";
5
5
  declare class RepoResolutionError extends Error {
@@ -6,7 +6,7 @@ import {
6
6
  RepoResolutionError,
7
7
  cloneRepo,
8
8
  resolveRepo
9
- } from "../chunk-CJAJ4MBO.js";
9
+ } from "../chunk-OS3XDHOJ.js";
10
10
  export {
11
11
  DEFAULT_METADATA_CACHE_PATH,
12
12
  DEFAULT_METADATA_CACHE_TTL_MS,
@@ -19,6 +19,7 @@ interface ResolvedRepoMeta {
19
19
  interface ResolvedRepoGitState {
20
20
  headSha: string;
21
21
  remoteUrl: string;
22
+ sshUrl?: string;
22
23
  isShallowClone: boolean;
23
24
  }
24
25
  interface ResolvedRepo {
@@ -0,0 +1,271 @@
1
+ # OAC Configuration Reference
2
+
3
+ > Auto-generated from the Zod schema in `src/core/config.ts`.
4
+ > Version: **2026.2.5**
5
+
6
+ OAC is configured via an `oac.config.ts` (or `.js` / `.json`) file at the project root. Use `defineConfig()` for type-safe authoring:
7
+
8
+ ```ts
9
+ import { defineConfig } from "@open330/oac";
10
+
11
+ export default defineConfig({
12
+ repos: ["facebook/react"],
13
+ budget: { totalTokens: 50_000 },
14
+ execution: { concurrency: 3, mode: "new-pr" },
15
+ });
16
+ ```
17
+
18
+ Environment variables can be interpolated with `${VAR_NAME}` syntax anywhere a string value is accepted.
19
+
20
+ ---
21
+
22
+ ## `repos`
23
+
24
+ Target repositories to contribute to.
25
+
26
+ | Property | Type | Default | Description |
27
+ |----------|------|---------|-------------|
28
+ | `repos` | `Array<string \| { name, branch? }>` | `[]` | List of repos. Each entry is either a GitHub slug (`"owner/repo"`) or an object with `name` (required) and `branch` (optional). |
29
+
30
+ ```ts
31
+ repos: [
32
+ "facebook/react",
33
+ { name: "vercel/next.js", branch: "canary" },
34
+ ]
35
+ ```
36
+
37
+ ---
38
+
39
+ ## `provider`
40
+
41
+ AI agent provider configuration.
42
+
43
+ | Property | Type | Default | Description |
44
+ |----------|------|---------|-------------|
45
+ | `provider.id` | `string` | `"claude-code"` | Provider identifier. |
46
+ | `provider.options` | `Record<string, unknown>` | `{}` | Provider-specific options passed through to the agent. |
47
+
48
+ ---
49
+
50
+ ## `budget`
51
+
52
+ Token budget controls.
53
+
54
+ | Property | Type | Default | Description |
55
+ |----------|------|---------|-------------|
56
+ | `budget.totalTokens` | `integer` | `100000` | Maximum tokens to spend across all tasks. Must be positive. |
57
+ | `budget.reservePercent` | `number` | `0.1` | Fraction of budget to reserve for retries/overhead (0–1). |
58
+ | `budget.estimationPadding` | `number` | `1.2` | Multiplier applied to token estimates for safety margin. Must be positive. |
59
+
60
+ ---
61
+
62
+ ## `discovery`
63
+
64
+ Task discovery and scanning settings.
65
+
66
+ ### `discovery.scanners`
67
+
68
+ Toggle individual scanners on or off.
69
+
70
+ | Property | Type | Default | Description |
71
+ |----------|------|---------|-------------|
72
+ | `discovery.scanners.lint` | `boolean` | `true` | Scan for lint warnings and errors. |
73
+ | `discovery.scanners.todo` | `boolean` | `true` | Scan for TODO/FIXME/HACK comments. |
74
+ | `discovery.scanners.testGap` | `boolean` | `true` | Scan for files missing test coverage. |
75
+ | `discovery.scanners.deadCode` | `boolean` | `false` | Scan for dead/unused code. |
76
+ | `discovery.scanners.githubIssues` | `boolean` | `true` | Fetch open GitHub issues matching labels. |
77
+
78
+ ### Other discovery options
79
+
80
+ | Property | Type | Default | Description |
81
+ |----------|------|---------|-------------|
82
+ | `discovery.issueLabels` | `string[]` | `["good-first-issue", "help-wanted", "bug"]` | GitHub issue labels to match. |
83
+ | `discovery.minPriority` | `integer` | `20` | Minimum priority score (0–100) for a task to be included. |
84
+ | `discovery.maxTasks` | `integer` | `50` | Maximum number of tasks to discover. Must be positive. |
85
+ | `discovery.customScanners` | `string[]` | `[]` | Paths to custom scanner modules. |
86
+ | `discovery.exclude` | `string[]` | `["node_modules", "dist", "build", ".git", "*.min.js", "vendor/"]` | Glob patterns to exclude from scanning. |
87
+
88
+ ---
89
+
90
+ ## `execution`
91
+
92
+ Task execution settings.
93
+
94
+ | Property | Type | Default | Description |
95
+ |----------|------|---------|-------------|
96
+ | `execution.concurrency` | `integer` | `2` | Max parallel task executions. Must be positive. |
97
+ | `execution.taskTimeout` | `integer` | `300` | Timeout per task in seconds. Must be positive. |
98
+ | `execution.maxRetries` | `integer` | `2` | Max retry attempts for failed tasks (0 = no retries). |
99
+ | `execution.mode` | `"new-pr" \| "update-pr" \| "direct-commit"` | `"new-pr"` | How to submit completed work. |
100
+ | `execution.branchPattern` | `string` | `"oac/{date}/{task}"` | Branch naming pattern. `{date}` and `{task}` are interpolated. |
101
+
102
+ ### `execution.validation`
103
+
104
+ Post-execution validation checks.
105
+
106
+ | Property | Type | Default | Description |
107
+ |----------|------|---------|-------------|
108
+ | `execution.validation.lint` | `boolean` | `true` | Run linter after task completion. |
109
+ | `execution.validation.test` | `boolean` | `true` | Run tests after task completion. |
110
+ | `execution.validation.typeCheck` | `boolean` | `true` | Run type checker after task completion. |
111
+ | `execution.validation.maxDiffLines` | `integer` | `500` | Reject diffs exceeding this line count. Must be positive. |
112
+
113
+ ### `execution.pr`
114
+
115
+ Pull request settings.
116
+
117
+ | Property | Type | Default | Description |
118
+ |----------|------|---------|-------------|
119
+ | `execution.pr.draft` | `boolean` | `false` | Create PRs as drafts. |
120
+ | `execution.pr.labels` | `string[]` | `["oac-contribution"]` | Labels to apply to created PRs. |
121
+ | `execution.pr.reviewers` | `string[]` | `[]` | GitHub usernames to request as reviewers. |
122
+ | `execution.pr.assignees` | `string[]` | `[]` | GitHub usernames to assign to the PR. |
123
+
124
+ ---
125
+
126
+ ## `completion`
127
+
128
+ Post-PR completion and monitoring.
129
+
130
+ ### `completion.integrations.linear`
131
+
132
+ Linear issue tracker integration.
133
+
134
+ | Property | Type | Default | Description |
135
+ |----------|------|---------|-------------|
136
+ | `completion.integrations.linear.enabled` | `boolean` | `false` | Enable Linear integration. |
137
+ | `completion.integrations.linear.apiKey` | `string` | — | Linear API key. **Required** when `enabled: true`. Supports `${ENV_VAR}` syntax. |
138
+ | `completion.integrations.linear.teamId` | `string` | — | Linear team ID. **Required** when `enabled: true`. |
139
+
140
+ ### `completion.integrations.jira`
141
+
142
+ Jira issue tracker integration.
143
+
144
+ | Property | Type | Default | Description |
145
+ |----------|------|---------|-------------|
146
+ | `completion.integrations.jira.enabled` | `boolean` | `false` | Enable Jira integration. |
147
+ | `completion.integrations.jira.baseUrl` | `string (URL)` | — | Jira instance URL. **Required** when `enabled: true`. |
148
+ | `completion.integrations.jira.email` | `string` | — | Jira account email. **Required** when `enabled: true`. |
149
+ | `completion.integrations.jira.apiToken` | `string` | — | Jira API token. **Required** when `enabled: true`. Supports `${ENV_VAR}` syntax. |
150
+ | `completion.integrations.jira.projectKey` | `string` | — | Jira project key. **Required** when `enabled: true`. |
151
+
152
+ ### `completion.monitor`
153
+
154
+ PR monitoring settings.
155
+
156
+ | Property | Type | Default | Description |
157
+ |----------|------|---------|-------------|
158
+ | `completion.monitor.enabled` | `boolean` | `false` | Enable post-PR monitoring. |
159
+ | `completion.monitor.pollInterval` | `integer` | `300` | Seconds between status checks. Must be positive. |
160
+ | `completion.monitor.autoRespondToReviews` | `boolean` | `false` | Automatically respond to review comments. |
161
+ | `completion.monitor.autoDeleteBranch` | `boolean` | `true` | Delete branch after PR is merged. |
162
+
163
+ ---
164
+
165
+ ## `tracking`
166
+
167
+ Local state tracking.
168
+
169
+ | Property | Type | Default | Description |
170
+ |----------|------|---------|-------------|
171
+ | `tracking.directory` | `string` | `".oac"` | Directory for local OAC state files. |
172
+ | `tracking.autoCommit` | `boolean` | `false` | Auto-commit tracking changes to git. |
173
+ | `tracking.gitTracked` | `boolean` | `true` | Include tracking directory in git. |
174
+
175
+ ---
176
+
177
+ ## `dashboard`
178
+
179
+ Local dashboard server.
180
+
181
+ | Property | Type | Default | Description |
182
+ |----------|------|---------|-------------|
183
+ | `dashboard.port` | `integer` | `3141` | Port for the dashboard server (1–65535). |
184
+ | `dashboard.openBrowser` | `boolean` | `true` | Automatically open the dashboard in a browser. |
185
+
186
+ ---
187
+
188
+ ## `analyze`
189
+
190
+ Context analysis settings for `oac analyze` / auto-analysis before `oac run`.
191
+
192
+ | Property | Type | Default | Description |
193
+ |----------|------|---------|-------------|
194
+ | `analyze.autoAnalyze` | `boolean` | `true` | Auto-run analysis before `oac run` if context is stale or missing. |
195
+ | `analyze.staleAfterMs` | `integer` | `86400000` | Max age in milliseconds before context is considered stale (default: 24 hours). |
196
+ | `analyze.contextDir` | `string` | `".oac/context"` | Directory for persisted analysis context, relative to repo root. |
197
+
198
+ ---
199
+
200
+ ## Environment Variable Interpolation
201
+
202
+ Any string value in the config supports `${VAR_NAME}` interpolation:
203
+
204
+ ```ts
205
+ export default defineConfig({
206
+ completion: {
207
+ integrations: {
208
+ linear: {
209
+ enabled: true,
210
+ apiKey: "${LINEAR_API_KEY}",
211
+ teamId: "${LINEAR_TEAM_ID}",
212
+ },
213
+ },
214
+ },
215
+ });
216
+ ```
217
+
218
+ If a referenced variable is not set, OAC throws a `CONFIG_SECRET_MISSING` error with the variable name and config path.
219
+
220
+ ---
221
+
222
+ ## Minimal Example
223
+
224
+ ```ts
225
+ import { defineConfig } from "@open330/oac";
226
+
227
+ export default defineConfig({
228
+ repos: ["my-org/my-repo"],
229
+ });
230
+ ```
231
+
232
+ All other options use sensible defaults. See individual sections above for default values.
233
+
234
+ ## Full Example
235
+
236
+ ```ts
237
+ import { defineConfig } from "@open330/oac";
238
+
239
+ export default defineConfig({
240
+ repos: [
241
+ "facebook/react",
242
+ { name: "vercel/next.js", branch: "canary" },
243
+ ],
244
+ provider: { id: "claude-code" },
245
+ budget: {
246
+ totalTokens: 200_000,
247
+ reservePercent: 0.15,
248
+ estimationPadding: 1.3,
249
+ },
250
+ discovery: {
251
+ scanners: { lint: true, todo: true, testGap: true, deadCode: true, githubIssues: true },
252
+ issueLabels: ["good-first-issue", "help-wanted"],
253
+ minPriority: 30,
254
+ maxTasks: 25,
255
+ exclude: ["node_modules", "dist", "vendor/", "**/*.generated.ts"],
256
+ },
257
+ execution: {
258
+ concurrency: 4,
259
+ taskTimeout: 600,
260
+ maxRetries: 1,
261
+ mode: "new-pr",
262
+ branchPattern: "oac/{date}/{task}",
263
+ validation: { lint: true, test: true, typeCheck: true, maxDiffLines: 800 },
264
+ pr: { draft: true, labels: ["oac-contribution", "automated"], reviewers: ["maintainer"] },
265
+ },
266
+ tracking: { directory: ".oac", autoCommit: true },
267
+ dashboard: { port: 3141 },
268
+ analyze: { autoAnalyze: true, staleAfterMs: 43_200_000 },
269
+ });
270
+ ```
271
+