@open330/oac 2026.4.3 → 2026.220.1

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 (37) 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-ZRYAHZQJ.js → chunk-7C7SC4TZ.js} +1 -1
  6. package/dist/{chunk-XUW3XWTX.js → chunk-7Y4LZUDP.js} +89 -121
  7. package/dist/chunk-7Y4LZUDP.js.map +1 -0
  8. package/dist/{chunk-CJAJ4MBO.js → chunk-OS3XDHOJ.js} +57 -18
  9. package/dist/chunk-OS3XDHOJ.js.map +1 -0
  10. package/dist/{chunk-HDMLNOND.js → chunk-OTPXGXO7.js} +44 -18
  11. package/dist/chunk-OTPXGXO7.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.js +4 -8
  17. package/dist/completion/index.js.map +1 -1
  18. package/dist/core/index.d.ts +16 -1
  19. package/dist/core/index.js +8 -4
  20. package/dist/dashboard/index.js +33 -24
  21. package/dist/dashboard/index.js.map +1 -1
  22. package/dist/discovery/index.d.ts +18 -2
  23. package/dist/discovery/index.js +4 -2
  24. package/dist/execution/index.d.ts +45 -1
  25. package/dist/execution/index.js +7 -3
  26. package/dist/repo/index.d.ts +2 -2
  27. package/dist/repo/index.js +1 -1
  28. package/dist/{types-CYCwgojB.d.ts → types-3_IAAxh5.d.ts} +1 -0
  29. package/docs/config-reference.md +271 -0
  30. package/docs/multi-agent-support-technical-spec.md +312 -0
  31. package/package.json +23 -18
  32. package/dist/chunk-7FWC3Z4W.js.map +0 -1
  33. package/dist/chunk-CJAJ4MBO.js.map +0 -1
  34. package/dist/chunk-HDMLNOND.js.map +0 -1
  35. package/dist/chunk-XUW3XWTX.js.map +0 -1
  36. package/dist/chunk-YWIB3TRI.js.map +0 -1
  37. /package/dist/{chunk-ZRYAHZQJ.js.map → chunk-7C7SC4TZ.js.map} +0 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,115 @@
1
+ # Changelog
2
+
3
+ All notable changes to OAC (Open Agent Contribution) are documented here.
4
+
5
+ ## [Unreleased]
6
+
7
+ _No unreleased changes._
8
+
9
+ ---
10
+
11
+ ## [2026.2.5] — 2026-02-20
12
+
13
+ > **Note**: Versions `2026.3.x` and `2026.4.x` were published with an incorrect CalVer month.
14
+ > This release corrects the version to `2026.2.5` (year=2026, month=February, patch=5th iteration).
15
+
16
+ ### Config Loader Fix (`fb57557`)
17
+ - **fix**: Config loader now matches `@open330/oac` import (previously only matched `@open330/oac-core`)
18
+
19
+ ### OpenCode Provider Integration (`afdf725`)
20
+ - **feat**: OpenCode adapter (`src/execution/agents/opencode.adapter.ts`)
21
+ - **feat**: Adapter registry replacing hard-coded switch (`src/execution/agents/registry.ts`)
22
+ - **fix**: 7 pre-existing typecheck errors resolved (`doctor.ts`, `explain.ts`, `init.ts`, `task.ts`)
23
+
24
+ ### Security & Quality Fixes (`55780e4`)
25
+ - **security**: Fixed shell injection in dashboard browser opener (replaced `exec` with `open` library)
26
+ - **security**: Sanitized branch names in `sandbox.ts` against path traversal
27
+ - **security**: Replaced `sh -c` shell redirect with `execa` piping in `github-auth.ts`
28
+ - **security**: Added `AbortSignal.timeout` to all GitHub API `fetch` calls
29
+ - **security**: SHA-pinned all CI/CD workflow actions
30
+ - **refactor**: Consolidated `truncate()` and `isRecord()` into `core/utils.ts`
31
+ - **refactor**: Unified error normalization into shared `normalizeError` module
32
+ - **refactor**: Extracted `AsyncEventQueue` into shared module for agent adapters
33
+ - **refactor**: Created scanner factory to eliminate construction duplication
34
+ - **chore**: Annotated all 10 empty catch blocks with `// best-effort` comments
35
+ - **ci**: Added `pnpm audit --prod` to CI pipeline
36
+
37
+ ### Deploy Readiness (`91898c8`)
38
+ - **chore**: Added `LICENSE`, `CHANGELOG.md`, `docs/` to npm `files` array
39
+ - **chore**: Added `prepublishOnly` script (`pnpm build && pnpm test`)
40
+ - **chore**: Restored CI/CD workflows (SHA-pinned actions)
41
+ - **chore**: Lowered Node.js requirement from `>=24` to `>=20`
42
+ - **chore**: Fixed repository URL in `package.json`
43
+
44
+ ### Wave 9 — Final P3/T3 Polish (`f8ff2ae`)
45
+ - **feat**: `oac init --minimal` for quick, non-interactive setup
46
+ - **feat**: `oac explain <task-id>` command — inspect why a task/epic was selected
47
+ - **feat**: Colored diff output in `--dry-run` mode (source files, complexity, scanner)
48
+ - **docs**: Comprehensive troubleshooting section in README
49
+ - **perf**: Streaming file reads in analyzer for large files (>1MB threshold)
50
+ - **perf**: Memory pressure monitoring — PQueue auto-throttles when heap usage exceeds 85%
51
+
52
+ ### Wave 8 — Final UX Polish (`806a170`)
53
+ - **docs**: Auto-generated config reference from Zod schema (`docs/config-reference.md`)
54
+ - **docs**: Added CHANGELOG
55
+
56
+ ### Maintenance
57
+ - **chore**: Temporarily removed CI/CD workflows during dev phase (`cb90214`)
58
+
59
+ ---
60
+
61
+ ## [2026.4.3] — 2026-02-18 _(deprecated — wrong CalVer month)_
62
+
63
+ ### Wave 7 — Quick Wins Bundle (`7c179a0`)
64
+ - **feat**: `oac r` alias for `oac run` (power-user shortcut)
65
+ - **feat**: Distinct exit codes for CI/CD integration:
66
+ - `0` — all tasks succeeded or dry-run
67
+ - `1` — unhandled error
68
+ - `2` — config/validation error
69
+ - `3` — every task/epic failed
70
+ - `4` — partial success (some tasks failed)
71
+ - **feat**: Resettable token counters (`claudeCounter.reset()`, `codexCounter.reset()`) for correctness in long-lived processes
72
+ - **feat**: Progress percentages on long operations (file analysis, task estimation, epic execution)
73
+
74
+ ### Wave 6 — Single-Command Pipeline (`156c7d2`)
75
+ - **feat**: `oac run` now performs the full scan → analyze → execute pipeline in one command
76
+ - **ux**: Clarified distinction between `oac scan` (discover tasks) and `oac analyze` (build context)
77
+
78
+ ### Wave 5 — Run Module Decomposition (`aea2760`)
79
+ - **refactor**: Decomposed the 1,692-line `run.ts` monolith into `src/cli/commands/run/` with 8 focused modules:
80
+ - `index.ts` — command definition and option parsing
81
+ - `pipeline.ts` — top-level orchestration
82
+ - `epic.ts` — epic-based execution flow
83
+ - `task.ts` — single-task execution
84
+ - `retry.ts` — `--retry-failed` pipeline
85
+ - `output.ts` — summary rendering and JSON output
86
+ - `validation.ts` — config and input validation
87
+ - `types.ts` — shared types, exit codes, `ConfigError`
88
+
89
+ ### Wave 4 — Timeout, Completion, & Retry (`cb1af6c`)
90
+ - **feat**: PR creation timeout (prevents hanging on GitHub API issues)
91
+ - **perf**: Replaced hand-rolled `runWithConcurrency` with `PQueue` for bounded parallelism
92
+ - **feat**: `oac completion` command for shell tab-completion (bash/zsh/fish)
93
+ - **feat**: `--retry-failed` flag to re-run only previously failed tasks
94
+
95
+ ### Wave 3 — UX & CLI Improvements (`9869073`)
96
+ - **ux**: Usage examples in every `--help` screen
97
+ - **feat**: Global `--quiet` flag suppresses spinner/progress output (for CI pipelines)
98
+ - **ux**: Failed task/epic details included in run summary
99
+ - **perf**: Parallelized epic execution pipeline with bounded concurrency
100
+
101
+ ### Wave 2 — Helpers, Parallelism, & Cleanup (`417fc85`)
102
+ - **refactor**: Extracted 11 duplicated helper functions into `src/cli/helpers.ts`
103
+ - **perf**: Parallelized `analyzer.ts` file processing with `PQueue`
104
+ - **perf**: Parallelized `todo-scanner.ts` file processing
105
+ - **chore**: Removed dead `withTimeout` utility
106
+
107
+ ### Wave 1 — Foundation Fixes (`4196c59`)
108
+ - **fix**: `withWorktreeLock` now correctly releases locks on error
109
+ - **perf**: Bounded `Promise.all` with `PQueue` to prevent unbounded parallelism
110
+ - **perf**: Replaced `child_process.spawn` with `execa` for better error handling
111
+ - **feat**: SIGINT handler for graceful shutdown
112
+ - **fix**: Removed simulation fallback that silently skipped real execution
113
+ - **feat**: `defineConfig()` wrapper for type-safe config files
114
+ - **ux**: Getting Started help text for first-time users
115
+
package/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  [![npm](https://img.shields.io/npm/v/@open330/oac?label=npm&color=CB3837&logo=npm)](https://www.npmjs.com/package/@open330/oac)
16
16
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
17
- [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D24-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
17
+ [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D20-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
18
18
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.7+-3178C6?logo=typescript&logoColor=white)](https://typescriptlang.org/)
19
19
 
20
20
  [Getting Started](#-getting-started) · [How It Works](#-how-it-works) · [Commands](#commands) · [Configuration](#configuration) · [Architecture](#architecture) · [Contributing](#contributing)
@@ -93,7 +93,7 @@ npx @open330/oac run --repo facebook/react --tokens unlimited
93
93
 
94
94
  ### Prerequisites
95
95
 
96
- - **Node.js** >= 24 (see `engines` in package.json)
96
+ - **Node.js** >= 20 (see `engines` in package.json)
97
97
  - **git** installed
98
98
  - At least one AI agent CLI: [Claude Code](https://claude.ai/code), [Codex](https://github.com/openai/codex), or [OpenCode](https://github.com/opencode-ai/opencode)
99
99
 
@@ -38,8 +38,21 @@ function createMemoryMonitor(options) {
38
38
  };
39
39
  }
40
40
 
41
+ // src/core/utils.ts
42
+ function truncate(value, maxLength, ellipsis = "\u2026") {
43
+ if (value.length <= maxLength) {
44
+ return value;
45
+ }
46
+ return `${value.slice(0, Math.max(0, maxLength - ellipsis.length))}${ellipsis}`;
47
+ }
48
+ function isRecord(value) {
49
+ return typeof value === "object" && value !== null;
50
+ }
51
+
41
52
  export {
42
53
  getMemorySnapshot,
43
- createMemoryMonitor
54
+ createMemoryMonitor,
55
+ truncate,
56
+ isRecord
44
57
  };
45
- //# sourceMappingURL=chunk-YWIB3TRI.js.map
58
+ //# sourceMappingURL=chunk-6A37SKAJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/memory.ts","../src/core/utils.ts"],"sourcesContent":["/**\n * Memory pressure monitoring utilities.\n *\n * Provides lightweight heap-usage checks that callers can use to\n * throttle work when the process is approaching memory limits.\n */\n\n/** Default threshold: pause work when heap usage exceeds 85% of the limit. */\nconst DEFAULT_PRESSURE_RATIO = 0.85;\n\nexport interface MemorySnapshot {\n heapUsedMB: number;\n heapTotalMB: number;\n rssUsedMB: number;\n /** Ratio of heapUsed / heapTotal (0–1). */\n heapPressure: number;\n /** True when heapPressure exceeds the configured threshold. */\n isUnderPressure: boolean;\n}\n\n/**\n * Take a snapshot of current memory usage.\n *\n * @param pressureRatio - Threshold ratio (0–1) above which `isUnderPressure`\n * is set to `true`. Defaults to 0.85.\n */\nexport function getMemorySnapshot(pressureRatio = DEFAULT_PRESSURE_RATIO): MemorySnapshot {\n const mem = process.memoryUsage();\n const heapUsedMB = mem.heapUsed / 1_048_576;\n const heapTotalMB = mem.heapTotal / 1_048_576;\n const rssUsedMB = mem.rss / 1_048_576;\n const heapPressure = mem.heapTotal > 0 ? mem.heapUsed / mem.heapTotal : 0;\n\n return {\n heapUsedMB: Math.round(heapUsedMB * 10) / 10,\n heapTotalMB: Math.round(heapTotalMB * 10) / 10,\n rssUsedMB: Math.round(rssUsedMB * 10) / 10,\n heapPressure: Math.round(heapPressure * 1000) / 1000,\n isUnderPressure: heapPressure >= pressureRatio,\n };\n}\n\n/**\n * Creates a monitor that periodically checks memory pressure and calls\n * `onPressure` when the threshold is exceeded. The monitor can be used\n * to pause a PQueue or reduce concurrency under load.\n *\n * Returns a `stop` function to clear the interval.\n */\nexport function createMemoryMonitor(options: {\n /** Polling interval in milliseconds (default: 5 000). */\n intervalMs?: number;\n /** Heap pressure ratio threshold (default: 0.85). */\n pressureRatio?: number;\n /** Called when heap pressure exceeds the threshold. */\n onPressure: (snapshot: MemorySnapshot) => void;\n /** Called when heap pressure drops back below the threshold. */\n onRelief?: (snapshot: MemorySnapshot) => void;\n}): { stop: () => void } {\n const intervalMs = options.intervalMs ?? 5_000;\n const pressureRatio = options.pressureRatio ?? DEFAULT_PRESSURE_RATIO;\n let wasPressured = false;\n\n const timer = setInterval(() => {\n const snapshot = getMemorySnapshot(pressureRatio);\n\n if (snapshot.isUnderPressure && !wasPressured) {\n wasPressured = true;\n options.onPressure(snapshot);\n } else if (!snapshot.isUnderPressure && wasPressured) {\n wasPressured = false;\n options.onRelief?.(snapshot);\n }\n }, intervalMs);\n\n // Unref so this doesn't keep the process alive\n if (typeof timer === \"object\" && \"unref\" in timer) {\n timer.unref();\n }\n\n return {\n stop() {\n clearInterval(timer);\n },\n };\n}\n\n","/**\n * Shared utility functions used across the codebase.\n */\n\n/**\n * Truncate a string to `maxLength`, appending an ellipsis when trimmed.\n * Defaults to the unicode ellipsis `\"…\"` (1 char). Pass `\"...\"` for the\n * three-dot ASCII variant.\n */\nexport function truncate(\n value: string,\n maxLength: number,\n ellipsis = \"…\",\n): string {\n if (value.length <= maxLength) {\n return value;\n }\n return `${value.slice(0, Math.max(0, maxLength - ellipsis.length))}${ellipsis}`;\n}\n\n/**\n * Type guard: returns `true` when `value` is a non-null object\n * (i.e.\\ a `Record<string, unknown>`).\n */\nexport function isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null;\n}\n\n"],"mappings":";AAQA,IAAM,yBAAyB;AAkBxB,SAAS,kBAAkB,gBAAgB,wBAAwC;AACxF,QAAM,MAAM,QAAQ,YAAY;AAChC,QAAM,aAAa,IAAI,WAAW;AAClC,QAAM,cAAc,IAAI,YAAY;AACpC,QAAM,YAAY,IAAI,MAAM;AAC5B,QAAM,eAAe,IAAI,YAAY,IAAI,IAAI,WAAW,IAAI,YAAY;AAExE,SAAO;AAAA,IACL,YAAY,KAAK,MAAM,aAAa,EAAE,IAAI;AAAA,I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