opencode-autoresearch 3.1.0-beta.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 (71) hide show
  1. package/.opencode-plugin/plugin.json +37 -0
  2. package/LICENSE +21 -0
  3. package/README.md +74 -0
  4. package/commands/autoresearch/debug.md +23 -0
  5. package/commands/autoresearch/fix.md +21 -0
  6. package/commands/autoresearch/learn.md +21 -0
  7. package/commands/autoresearch/plan.md +25 -0
  8. package/commands/autoresearch/predict.md +21 -0
  9. package/commands/autoresearch/scenario.md +21 -0
  10. package/commands/autoresearch/security.md +21 -0
  11. package/commands/autoresearch/ship.md +22 -0
  12. package/commands/autoresearch.md +45 -0
  13. package/dist/cli.d.ts +3 -0
  14. package/dist/cli.d.ts.map +1 -0
  15. package/dist/cli.js +202 -0
  16. package/dist/cli.js.map +1 -0
  17. package/dist/constants.d.ts +13 -0
  18. package/dist/constants.d.ts.map +1 -0
  19. package/dist/constants.js +13 -0
  20. package/dist/constants.js.map +1 -0
  21. package/dist/helpers.d.ts +19 -0
  22. package/dist/helpers.d.ts.map +1 -0
  23. package/dist/helpers.js +137 -0
  24. package/dist/helpers.js.map +1 -0
  25. package/dist/index.d.ts +4 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +3 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/run-manager.d.ts +9 -0
  30. package/dist/run-manager.d.ts.map +1 -0
  31. package/dist/run-manager.js +239 -0
  32. package/dist/run-manager.js.map +1 -0
  33. package/dist/subagent-pool.d.ts +7 -0
  34. package/dist/subagent-pool.d.ts.map +1 -0
  35. package/dist/subagent-pool.js +101 -0
  36. package/dist/subagent-pool.js.map +1 -0
  37. package/dist/types.d.ts +129 -0
  38. package/dist/types.d.ts.map +1 -0
  39. package/dist/types.js +2 -0
  40. package/dist/types.js.map +1 -0
  41. package/dist/wizard.d.ts +3 -0
  42. package/dist/wizard.d.ts.map +1 -0
  43. package/dist/wizard.js +56 -0
  44. package/dist/wizard.js.map +1 -0
  45. package/docs/ARCHITECTURE.md +88 -0
  46. package/docs/CNAME +1 -0
  47. package/docs/OPENCODE_INSTALL.md +48 -0
  48. package/docs/RELEASE.md +67 -0
  49. package/docs/autoresearch-loop.svg +95 -0
  50. package/docs/index.html +249 -0
  51. package/hooks/init.sh +21 -0
  52. package/hooks/status.sh +23 -0
  53. package/hooks/stop.sh +27 -0
  54. package/package.json +49 -0
  55. package/skills/autoresearch/SKILL.md +77 -0
  56. package/skills/autoresearch/references/core-principles.md +20 -0
  57. package/skills/autoresearch/references/debug-workflow.md +31 -0
  58. package/skills/autoresearch/references/fix-workflow.md +25 -0
  59. package/skills/autoresearch/references/interaction-wizard.md +33 -0
  60. package/skills/autoresearch/references/learn-workflow.md +15 -0
  61. package/skills/autoresearch/references/loop-workflow.md +35 -0
  62. package/skills/autoresearch/references/plan-workflow.md +42 -0
  63. package/skills/autoresearch/references/predict-workflow.md +15 -0
  64. package/skills/autoresearch/references/results-logging.md +29 -0
  65. package/skills/autoresearch/references/runtime-hard-invariants.md +13 -0
  66. package/skills/autoresearch/references/scenario-workflow.md +15 -0
  67. package/skills/autoresearch/references/security-workflow.md +15 -0
  68. package/skills/autoresearch/references/ship-workflow.md +15 -0
  69. package/skills/autoresearch/references/state-management.md +39 -0
  70. package/skills/autoresearch/references/structured-output-spec.md +34 -0
  71. package/skills/autoresearch/references/subagent-orchestration.md +42 -0
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "autoresearch",
3
+ "version": "3.1.0-beta.2",
4
+ "description": "Auto Research for OpenCode. Run a structured autonomous iteration loop with a standing subagent pool.",
5
+ "author": {
6
+ "name": "Maleick",
7
+ "url": "https://github.com/Maleick"
8
+ },
9
+ "homepage": "https://github.com/Maleick/AutoResearch",
10
+ "repository": "https://github.com/Maleick/AutoResearch",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "opencode",
14
+ "autoresearch",
15
+ "automation",
16
+ "workflows"
17
+ ],
18
+ "skills": "./skills/",
19
+ "commands": "./commands/",
20
+ "hooks": "./hooks/",
21
+ "interface": {
22
+ "displayName": "Auto Research",
23
+ "shortDescription": "Subagent-first autonomous iteration loop for OpenCode",
24
+ "longDescription": "Run a structured improve-verify loop using a standing subagent pool, mode-specific workflows, and mechanical verification. Activate with /autoresearch or specialized modes like /autoresearch:plan, /autoresearch:debug, /autoresearch:fix, /autoresearch:learn, /autoresearch:predict, /autoresearch:scenario, /autoresearch:security, /autoresearch:ship.",
25
+ "developerName": "Maleick",
26
+ "category": "Productivity",
27
+ "capabilities": [
28
+ "Read",
29
+ "Write",
30
+ "Run"
31
+ ],
32
+ "websiteURL": "https://github.com/Maleick/AutoResearch",
33
+ "privacyPolicyURL": "https://github.com/Maleick/AutoResearch/blob/main/SECURITY.md",
34
+ "termsOfServiceURL": "https://github.com/Maleick/AutoResearch/blob/main/LICENSE",
35
+ "brandColor": "#0F766E"
36
+ }
37
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 maleick
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/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # Auto Research
2
+
3
+ [![GitHub Release](https://img.shields.io/github/v/release/Maleick/AutoResearch?style=flat-square&label=release)](https://github.com/Maleick/AutoResearch/releases)
4
+ [![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](LICENSE)
5
+ [![Runtime](https://img.shields.io/badge/runtime-OpenCode-0F766E?style=flat-square)](.)
6
+
7
+ > **v3.1.0** — OpenCode-only npm package
8
+
9
+ Auto Research is a subagent-first autonomous iteration engine for OpenCode. It keeps the existing `/autoresearch` command surface intact and adds specialized mode workflows.
10
+
11
+ Inspired by [Karpathy's autoresearch](https://github.com/karpathy/autoresearch). The core loop is still the same:
12
+
13
+ **Modify -> Verify -> Keep or Discard -> Repeat**
14
+
15
+ ## Runtime surfaces
16
+
17
+ | Surface | Entry point |
18
+ | --- | --- |
19
+ | OpenCode | `/autoresearch`, `/autoresearch:plan`, `/autoresearch:debug`, `/autoresearch:fix`, `/autoresearch:learn`, `/autoresearch:predict`, `/autoresearch:scenario`, `/autoresearch:security`, `/autoresearch:ship` |
20
+
21
+ ## Install
22
+
23
+ ```bash
24
+ npm install -g opencode-autoresearch
25
+ opencode-autoresearch doctor
26
+ ```
27
+
28
+ See [docs/OPENCODE_INSTALL.md](docs/OPENCODE_INSTALL.md) for full install and verification steps.
29
+
30
+ ## Core loop
31
+
32
+ Auto Research requires a goal, scope, and a mechanical verification command. It then:
33
+
34
+ 1. Baselines the current state.
35
+ 2. Makes one focused experiment.
36
+ 3. Verifies it mechanically.
37
+ 4. Keeps strict improvements and discards regressions.
38
+ 5. Records the result and continues until the stop condition is met.
39
+
40
+ ## Runtime artifacts
41
+
42
+ | Artifact | Purpose |
43
+ | --- | --- |
44
+ | `.autoresearch/state.json` | Checkpoint state for the current run |
45
+ | `autoresearch-results.tsv` | Iteration log |
46
+ | `autoresearch-report.md` | End-of-run report |
47
+ | `autoresearch-memory.md` | Reusable memory for later runs |
48
+
49
+ ## Development
50
+
51
+ ```bash
52
+ npm run typecheck # Type check the TypeScript sources
53
+ npm run build # Compile TypeScript to dist/
54
+ npm pack --dry-run # Preview shipped package contents
55
+ ```
56
+
57
+ ## Repository layout
58
+
59
+ ```text
60
+ src/ # TypeScript source (runtime helpers, CLI, subagent pool)
61
+ dist/ # Compiled JavaScript output
62
+ commands/ # OpenCode command surfaces
63
+ skills/autoresearch/ # Skill bundle with references
64
+ hooks/ # Shell hooks for session lifecycle
65
+ docs/ # Install and architecture docs
66
+ .autoresearch/ # Runtime state directory
67
+ .opencode-plugin/ # Plugin manifest
68
+ ```
69
+
70
+ ## Notes
71
+
72
+ - This is an **OpenCode-only** package. No Claude or Codex runtime is supported.
73
+ - The CLI uses Node.js ESM modules.
74
+ - Python scripts were used in earlier releases and are no longer shipped.
@@ -0,0 +1,23 @@
1
+ # /autoresearch:debug
2
+
3
+ Run the debugging workflow using the improve-verify loop.
4
+
5
+ ## Activation
6
+
7
+ 1. Read `skills/autoresearch/references/debug-workflow.md`
8
+ 2. Read `skills/autoresearch/references/loop-workflow.md`
9
+ 3. Read `skills/autoresearch/references/core-principles.md`
10
+
11
+ ## When to Use
12
+
13
+ Use this when the user wants to debug an issue through structured iteration rather than one-shot fixes.
14
+
15
+ ## Execution
16
+
17
+ 1. Identify the failing surface.
18
+ 2. Form a hypothesis for each experiment.
19
+ 3. Apply one targeted fix per iteration.
20
+ 4. Verify mechanically before keeping.
21
+ 5. Keep discards, track the repair path.
22
+
23
+ Follow the debug workflow reference for output format and stopping conditions.
@@ -0,0 +1,21 @@
1
+ # /autoresearch:fix
2
+
3
+ Run the fix workflow for targeted repairs.
4
+
5
+ ## Activation
6
+
7
+ 1. Read `skills/autoresearch/references/fix-workflow.md`
8
+ 2. Read `skills/autoresearch/references/loop-workflow.md`
9
+
10
+ ## When to Use
11
+
12
+ Use this when the user wants a structured repair cycle rather than ad-hoc edits. Prioritize `autoresearch:debug` for root-cause investigation.
13
+
14
+ ## Execution
15
+
16
+ 1. Scope the fix to one surface per iteration.
17
+ 2. Verify the repair mechanically.
18
+ 3. Record keep or discard before the next iteration.
19
+ 4. Do not scope-creep into unrelated changes.
20
+
21
+ Follow the fix workflow reference for output format.
@@ -0,0 +1,21 @@
1
+ # /autoresearch:learn
2
+
3
+ Run the learning workflow for knowledge acquisition and baseline comparison.
4
+
5
+ ## Activation
6
+
7
+ 1. Read `skills/autoresearch/references/learn-workflow.md`
8
+ 2. Read `skills/autoresearch/references/results-logging.md`
9
+
10
+ ## When to Use
11
+
12
+ Use this when the user wants to build a reusable knowledge baseline or compare approaches before committing to a direction.
13
+
14
+ ## Execution
15
+
16
+ 1. Define the learning scope.
17
+ 2. Compare candidate approaches with mechanical verification.
18
+ 3. Record results to `autoresearch-results.tsv`.
19
+ 4. Summarize findings and carry reusable defaults to `autoresearch-memory.md`.
20
+
21
+ Follow the learn workflow reference for output format.
@@ -0,0 +1,25 @@
1
+ # /autoresearch:plan
2
+
3
+ Run the planning workflow for a structured improvement cycle.
4
+
5
+ ## Activation
6
+
7
+ 1. Read `skills/autoresearch/references/plan-workflow.md`
8
+ 2. Read `skills/autoresearch/references/interaction-wizard.md`
9
+ 3. Read `skills/autoresearch/references/core-principles.md`
10
+
11
+ ## When to Use
12
+
13
+ Use this when the user wants to plan a focused improvement cycle before iterating. Prefer `autoresearch wizard` to generate the setup summary first.
14
+
15
+ ## Execution
16
+
17
+ 1. Identify the target subsystem or concern.
18
+ 2. Define the metric and direction.
19
+ 3. Set the verify command.
20
+ 4. Establish scope boundaries.
21
+ 5. Present the setup summary for confirmation before launching.
22
+
23
+ ## Output
24
+
25
+ Follow the planning reference output format. Print the full setup summary with clarification questions resolved before marking the plan ready.
@@ -0,0 +1,21 @@
1
+ # /autoresearch:predict
2
+
3
+ Run the prediction workflow for outcome forecasting.
4
+
5
+ ## Activation
6
+
7
+ 1. Read `skills/autoresearch/references/predict-workflow.md`
8
+ 2. Read `skills/autoresearch/references/core-principles.md`
9
+
10
+ ## When to Use
11
+
12
+ Use this when the user wants to predict outcomes or estimate impact before committing to a change.
13
+
14
+ ## Execution
15
+
16
+ 1. Define the change and its expected effect.
17
+ 2. Set up comparison baselines.
18
+ 3. Verify predictions mechanically.
19
+ 4. Record accuracy for future reference.
20
+
21
+ Follow the predict workflow reference for output format.
@@ -0,0 +1,21 @@
1
+ # /autoresearch:scenario
2
+
3
+ Run the scenario expansion workflow.
4
+
5
+ ## Activation
6
+
7
+ 1. Read `skills/autoresearch/references/scenario-workflow.md`
8
+ 2. Read `skills/autoresearch/references/loop-workflow.md`
9
+
10
+ ## When to Use
11
+
12
+ Use this when the user wants to explore multiple scenarios and compare outcomes before committing to a direction.
13
+
14
+ ## Execution
15
+
16
+ 1. Define the scenarios to compare.
17
+ 2. Run each through the verify loop.
18
+ 3. Record comparative results.
19
+ 4. Present the ranked scenarios with evidence.
20
+
21
+ Follow the scenario workflow reference for output format.
@@ -0,0 +1,21 @@
1
+ # /autoresearch:security
2
+
3
+ Run the security review workflow.
4
+
5
+ ## Activation
6
+
7
+ 1. Read `skills/autoresearch/references/security-workflow.md`
8
+ 2. Read `skills/autoresearch/references/loop-workflow.md`
9
+
10
+ ## When to Use
11
+
12
+ Use this when the user wants a structured security pass before shipping. Combines the improve-verify loop with a security-specialized subagent pool.
13
+
14
+ ## Execution
15
+
16
+ 1. Identify the attack surface.
17
+ 2. Run the security-specific subagent pool.
18
+ 3. Verify each finding mechanically.
19
+ 4. Record and prioritize findings.
20
+
21
+ Follow the security workflow reference for output format and severity gates.
@@ -0,0 +1,22 @@
1
+ # /autoresearch:ship
2
+
3
+ Run the ship-readiness workflow.
4
+
5
+ ## Activation
6
+
7
+ 1. Read `skills/autoresearch/references/ship-workflow.md`
8
+ 2. Read `skills/autoresearch/references/loop-workflow.md`
9
+
10
+ ## When to Use
11
+
12
+ Use this when the user wants to prepare a change for release. Runs the full verify loop with a ship-readiness subagent pool.
13
+
14
+ ## Execution
15
+
16
+ 1. Baseline the current state.
17
+ 2. Run the full improve-verify loop with ship-readiness gates.
18
+ 3. Verify rollout risk and user-visible regressions mechanically.
19
+ 4. Record final state.
20
+ 5. Present the ship readiness summary.
21
+
22
+ Follow the ship workflow reference for release gates and handoff format.
@@ -0,0 +1,45 @@
1
+ # /autoresearch
2
+
3
+ Run a **subagent-first structured improve-verify loop** in OpenCode.
4
+
5
+ ## Activation
6
+
7
+ 1. Read `skills/autoresearch/references/loop-workflow.md`
8
+ 2. Read `skills/autoresearch/references/core-principles.md`
9
+ 3. Read `skills/autoresearch/references/state-management.md`
10
+ 4. Read `skills/autoresearch/references/results-logging.md`
11
+ 5. For interactive setup, read `skills/autoresearch/references/interaction-wizard.md`
12
+
13
+ ## Required Fields
14
+
15
+ Collect these before launching:
16
+
17
+ - **Goal** — What outcome should this run optimize?
18
+ - **Metric** — What numeric metric tracks progress?
19
+ - **Direction** — `lower` or `higher`
20
+ - **Verify** — The mechanical command that measures the metric
21
+
22
+ ## Execution Rules
23
+
24
+ 1. Baseline exactly once at run start.
25
+ 2. Make one focused experiment per iteration.
26
+ 3. Verify mechanically. Do not keep on intuition alone.
27
+ 4. Record every iteration before the next one starts.
28
+ 5. Keep strict improvements, discard regressions.
29
+ 6. Continue until the stop condition is met.
30
+
31
+ ## Background Control
32
+
33
+ ```bash
34
+ autoresearch init --goal "..." --metric "..." --direction "lower" --verify "npm test"
35
+ autoresearch status
36
+ autoresearch stop
37
+ autoresearch resume
38
+ autoresearch complete
39
+ ```
40
+
41
+ ## Output
42
+
43
+ Print a setup summary before the first iteration, progress updates during the loop, and a completion summary when done.
44
+
45
+ Follow `skills/autoresearch/references/structured-output-spec.md` for format.
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,202 @@
1
+ #!/usr/bin/env node
2
+ import { printJson } from "./helpers.js";
3
+ function usage() {
4
+ console.error("Usage: autoresearch <command> [options]");
5
+ console.error("");
6
+ console.error("Commands:");
7
+ console.error(" init Initialize a run");
8
+ console.error(" wizard Generate a setup summary");
9
+ console.error(" status Print run status");
10
+ console.error(" launch Launch a background run");
11
+ console.error(" complete Mark a run complete");
12
+ console.error(" stop Request a background run stop");
13
+ console.error(" resume Resume a background run");
14
+ console.error(" record Record an experiment result");
15
+ console.error(" doctor Verify package installation and version");
16
+ console.error(" help Show this help");
17
+ console.error("");
18
+ console.error("Options:");
19
+ console.error(" --repo Repository root (default: current directory)");
20
+ console.error(" --goal Desired run outcome");
21
+ console.error(" --metric Metric name to track");
22
+ console.error(" --direction lower or higher");
23
+ console.error(" --verify Mechanical verification command");
24
+ console.error(" --mode foreground or background");
25
+ console.error(" --scope In-scope files or subsystem");
26
+ console.error(" --iterations Iteration cap");
27
+ console.error(" --duration Wall-clock cap (e.g., 5h or 300m)");
28
+ console.error(" --results-path Custom results TSV path");
29
+ console.error(" --state-path Custom state JSON path");
30
+ console.error(" --fresh-start Archive previous artifacts before starting");
31
+ console.error("");
32
+ console.error("Examples:");
33
+ console.error(" autoresearch wizard --goal \"optimize response time\"");
34
+ console.error(" autoresearch init --goal \"reduce errors\" --metric errors --direction lower --verify \"npm test\"");
35
+ console.error(" autoresearch status");
36
+ }
37
+ function parseArgs(args) {
38
+ const result = {};
39
+ for (let i = 0; i < args.length; i++) {
40
+ if (args[i].startsWith("--")) {
41
+ const key = args[i].slice(2);
42
+ if (i + 1 < args.length && !args[i + 1].startsWith("--")) {
43
+ result[key] = args[++i];
44
+ }
45
+ else {
46
+ result[key] = "true";
47
+ }
48
+ }
49
+ }
50
+ return result;
51
+ }
52
+ async function main() {
53
+ const args = process.argv.slice(2);
54
+ if (args.length === 0 || args[0] === "--help" || args[0] === "-h" || args[0] === "help") {
55
+ usage();
56
+ return 0;
57
+ }
58
+ const [cmd, ...cmdArgs] = args;
59
+ const pargs = parseArgs(cmdArgs);
60
+ // Group args by collecting multi-word options (like required-keep-labels)
61
+ const grouped = {};
62
+ for (const [k, v] of Object.entries(pargs)) {
63
+ if (k === "required-keep-labels" || k === "required-stop-labels" || k === "labels") {
64
+ grouped[k] = v.split(/\s+/).filter(Boolean);
65
+ }
66
+ else {
67
+ grouped[k] = v;
68
+ }
69
+ }
70
+ try {
71
+ switch (cmd) {
72
+ case "wizard": {
73
+ const { buildSetupSummary } = await import("./wizard.js");
74
+ const config = {
75
+ goal: grouped.goal,
76
+ scope: grouped.scope,
77
+ metric: grouped.metric,
78
+ direction: grouped.direction,
79
+ verify: grouped.verify,
80
+ guard: grouped.guard,
81
+ mode: grouped.mode,
82
+ iterations: grouped.iterations ? parseInt(grouped.iterations) : undefined,
83
+ duration: grouped.duration,
84
+ memory_path: grouped["memory-path"],
85
+ required_keep_labels: grouped["required-keep-labels"],
86
+ required_stop_labels: grouped["required-stop-labels"],
87
+ stop_condition: grouped["stop-condition"],
88
+ rollback_strategy: grouped["rollback-strategy"],
89
+ };
90
+ printJson(buildSetupSummary(grouped.repo, config));
91
+ break;
92
+ }
93
+ case "init": {
94
+ const { initializeRun } = await import("./run-manager.js");
95
+ const config = {
96
+ goal: grouped.goal,
97
+ metric: grouped.metric,
98
+ direction: grouped.direction || "lower",
99
+ verify: grouped.verify,
100
+ mode: grouped.mode || "foreground",
101
+ scope: grouped.scope,
102
+ guard: grouped.guard,
103
+ iterations: grouped.iterations ? parseInt(grouped.iterations) : undefined,
104
+ duration: grouped.duration,
105
+ memory_path: grouped["memory-path"],
106
+ required_keep_labels: grouped["required-keep-labels"],
107
+ required_stop_labels: grouped["required-stop-labels"],
108
+ run_tag: grouped["run-tag"],
109
+ stop_condition: grouped["stop-condition"],
110
+ baseline: grouped.baseline,
111
+ };
112
+ const state = await initializeRun(grouped.repo, grouped["results-path"], grouped["state-path"], config, grouped["fresh-start"] === "true");
113
+ printJson(state);
114
+ break;
115
+ }
116
+ case "status": {
117
+ const { buildSupervisorSnapshot } = await import("./run-manager.js");
118
+ const snapshot = await buildSupervisorSnapshot(grouped.repo, grouped["results-path"], grouped["state-path"]);
119
+ printJson(snapshot);
120
+ break;
121
+ }
122
+ case "launch": {
123
+ const { resolvePath } = await import("./helpers.js");
124
+ const { initializeRun } = await import("./run-manager.js");
125
+ const { writeFileSync } = await import("fs");
126
+ const { LAUNCH_DEFAULT } = await import("./constants.js");
127
+ const config = {
128
+ goal: grouped.goal,
129
+ metric: grouped.metric,
130
+ direction: grouped.direction || "lower",
131
+ verify: grouped.verify,
132
+ mode: "background",
133
+ scope: grouped.scope,
134
+ guard: grouped.guard,
135
+ iterations: grouped.iterations ? parseInt(grouped.iterations) : undefined,
136
+ duration: grouped.duration,
137
+ memory_path: grouped["memory-path"],
138
+ required_keep_labels: grouped["required-keep-labels"],
139
+ required_stop_labels: grouped["required-stop-labels"],
140
+ run_tag: grouped["run-tag"],
141
+ stop_condition: grouped["stop-condition"],
142
+ baseline: grouped.baseline,
143
+ };
144
+ const state = await initializeRun(grouped.repo, grouped["results-path"], grouped["state-path"], config, grouped["fresh-start"] === "true");
145
+ const launchPath = resolvePath(grouped.repo, grouped["launch-path"], LAUNCH_DEFAULT);
146
+ writeFileSync(launchPath, JSON.stringify({ run_id: state.run_id, goal: state.goal, mode: "background" }, null, 2) + "\n", "utf-8");
147
+ printJson({ status: "launched", run_id: state.run_id, launch_path: launchPath });
148
+ break;
149
+ }
150
+ case "complete": {
151
+ const { completeRun } = await import("./run-manager.js");
152
+ const state = await completeRun(grouped.repo, grouped["state-path"]);
153
+ printJson({ status: "completed", run_id: state.run_id });
154
+ break;
155
+ }
156
+ case "stop": {
157
+ const { setStopRequested } = await import("./run-manager.js");
158
+ const state = await setStopRequested(grouped.repo, grouped["state-path"]);
159
+ printJson({ status: "stop_requested", run_id: state.run_id });
160
+ break;
161
+ }
162
+ case "resume": {
163
+ const { resumeBackgroundRun } = await import("./run-manager.js");
164
+ const state = await resumeBackgroundRun(grouped.repo, grouped["state-path"]);
165
+ printJson({ status: "resumed", run_id: state.run_id });
166
+ break;
167
+ }
168
+ case "record": {
169
+ const { appendIteration } = await import("./run-manager.js");
170
+ const { normalizeResultStatus } = await import("./helpers.js");
171
+ const vs = grouped["verify-status"] || "pass";
172
+ const gs = grouped["guard-status"] || "skip";
173
+ const state = await appendIteration(grouped.repo, grouped["results-path"], grouped["state-path"], grouped.decision, grouped["metric-value"], normalizeResultStatus(vs, "verify_status"), normalizeResultStatus(gs, "guard_status"), grouped.hypothesis, grouped["change-summary"], grouped.labels ? (Array.isArray(grouped.labels) ? grouped.labels : [grouped.labels]) : undefined, grouped.note, grouped.iteration ? parseInt(grouped.iteration) : undefined);
174
+ printJson(state);
175
+ break;
176
+ }
177
+ case "doctor": {
178
+ const { VERSION, PACKAGE_NAME, SKILL_NAME } = await import("./constants.js");
179
+ console.log(`${SKILL_NAME} ${VERSION} (${PACKAGE_NAME})`);
180
+ console.log("Runtime: Node.js " + process.version);
181
+ console.log("Commands: OK");
182
+ console.log("Skills: OK");
183
+ console.log("Hooks: OK");
184
+ break;
185
+ }
186
+ default:
187
+ console.error(`Unknown command: ${cmd}`);
188
+ console.error("Run 'autoresearch --help' for usage.");
189
+ return 1;
190
+ }
191
+ }
192
+ catch (exc) {
193
+ console.error(exc.message);
194
+ return 2;
195
+ }
196
+ return 0;
197
+ }
198
+ main().then((code) => process.exit(code)).catch((err) => {
199
+ console.error(err);
200
+ process.exit(1);
201
+ });
202
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,SAAS,KAAK;IACZ,OAAO,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;IACzD,OAAO,CAAC,KAAK,C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1B,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;gBACzB,MAAM;YACR,CAAC;YACD;gBACE,OAAO,CAAC,KAAK,CAAC,oBAAoB,GAAG,EAAE,CAAC,CAAC;gBACzC,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;gBACtD,OAAO,CAAC,CAAC;QACb,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAE,GAAa,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,CAAC,CAAC;IACX,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACtD,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const VERSION = "3.1.0-beta.2";
2
+ export declare const PACKAGE_NAME = "opencode-autoresearch";
3
+ export declare const SKILL_NAME = "autoresearch";
4
+ export declare const COMMAND_NAMESPACE = "autoresearch";
5
+ export declare const PRODUCT_BRAND = "Auto Research";
6
+ export declare const RUNTIME_DIR = ".autoresearch";
7
+ export declare const RESULTS_DEFAULT = "autoresearch-results.tsv";
8
+ export declare const STATE_DEFAULT = ".autoresearch/state.json";
9
+ export declare const LAUNCH_DEFAULT = ".autoresearch/launch.json";
10
+ export declare const REPORT_DEFAULT = "autoresearch-report.md";
11
+ export declare const SELF_IMPROVEMENT_DEFAULT = ".autoresearch/self-improvement.md";
12
+ export declare const MEMORY_DEFAULT = "autoresearch-memory.md";
13
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC;AACtC,eAAO,MAAM,YAAY,0BAA0B,CAAC;AACpD,eAAO,MAAM,UAAU,iBAAiB,CAAC;AACzC,eAAO,MAAM,iBAAiB,iBAAiB,CAAC;AAChD,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,WAAW,kBAAkB,CAAC;AAC3C,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAC1D,eAAO,MAAM,aAAa,6BAA6B,CAAC;AACxD,eAAO,MAAM,cAAc,8BAA8B,CAAC;AAC1D,eAAO,MAAM,cAAc,2BAA2B,CAAC;AACvD,eAAO,MAAM,wBAAwB,sCAAsC,CAAC;AAC5E,eAAO,MAAM,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,13 @@
1
+ export const VERSION = "3.1.0-beta.2";
2
+ export const PACKAGE_NAME = "opencode-autoresearch";
3
+ export const SKILL_NAME = "autoresearch";
4
+ export const COMMAND_NAMESPACE = "autoresearch";
5
+ export const PRODUCT_BRAND = "Auto Research";
6
+ export const RUNTIME_DIR = ".autoresearch";
7
+ export const RESULTS_DEFAULT = "autoresearch-results.tsv";
8
+ export const STATE_DEFAULT = ".autoresearch/state.json";
9
+ export const LAUNCH_DEFAULT = ".autoresearch/launch.json";
10
+ export const REPORT_DEFAULT = "autoresearch-report.md";
11
+ export const SELF_IMPROVEMENT_DEFAULT = ".autoresearch/self-improvement.md";
12
+ export const MEMORY_DEFAULT = "autoresearch-memory.md";
13
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC;AACtC,MAAM,CAAC,MAAM,YAAY,GAAG,uBAAuB,CAAC;AACpD,MAAM,CAAC,MAAM,UAAU,GAAG,cAAc,CAAC;AACzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAChD,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;AAC7C,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;AAC3C,MAAM,CAAC,MAAM,eAAe,GAAG,0BAA0B,CAAC;AAC1D,MAAM,CAAC,MAAM,aAAa,GAAG,0BAA0B,CAAC;AACxD,MAAM,CAAC,MAAM,cAAc,GAAG,2BAA2B,CAAC;AAC1D,MAAM,CAAC,MAAM,cAAc,GAAG,wBAAwB,CAAC;AACvD,MAAM,CAAC,MAAM,wBAAwB,GAAG,mCAAmC,CAAC;AAC5E,MAAM,CAAC,MAAM,cAAc,GAAG,wBAAwB,CAAC"}
@@ -0,0 +1,19 @@
1
+ export declare class AutoresearchError extends Error {
2
+ constructor(message: string);
3
+ }
4
+ export declare function printJson(payload: unknown): void;
5
+ export declare function utcNow(): string;
6
+ export declare function resolveRepo(repo?: string): string;
7
+ export declare function ensureParent(filePath: string): void;
8
+ export declare function atomicWriteText(filePath: string, content: string): Promise<void>;
9
+ export declare function atomicWriteJson(filePath: string, payload: unknown): Promise<void>;
10
+ export declare function readJsonFile(filePath: string): Record<string, unknown>;
11
+ export declare function resolvePath(repo: string | undefined, value: string | undefined, defaultName: string): string;
12
+ export declare function normalizeDirection(value: string | undefined | null): string;
13
+ export declare function normalizeMode(value: string | undefined | null): string;
14
+ export declare function normalizeResultStatus(value: string | undefined | null, fieldName: string): string;
15
+ export declare function parseDurationSeconds(value: string | undefined | null): number | null;
16
+ export declare function inferVerifyCommand(repo?: string): string;
17
+ export declare function normalizeLabels(values?: string | string[] | null): string[];
18
+ export declare function missingRequiredLabels(labels: string[], required: string[]): string[];
19
+ //# sourceMappingURL=helpers.d.ts.map