@iowarp/clio-coder 0.3.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/CHANGELOG.md +407 -0
- package/CODE_OF_CONDUCT.md +21 -0
- package/CONTRIBUTING.md +224 -0
- package/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +798 -0
- package/SECURITY.md +72 -0
- package/assets/clio-coder-logo-128.webp +0 -0
- package/damage-control-rules.yaml +419 -0
- package/dist/acp-UMLFVA3F.js +92 -0
- package/dist/agents-Q4MYPMUW.js +91 -0
- package/dist/auth-O6HYIJ6J.js +521 -0
- package/dist/chunk-262G75JS.js +35 -0
- package/dist/chunk-26BZQOAD.js +1281 -0
- package/dist/chunk-2J63S4SF.js +508 -0
- package/dist/chunk-3DANZDGR.js +717 -0
- package/dist/chunk-4UQA7NCT.js +29 -0
- package/dist/chunk-527KG6XR.js +497 -0
- package/dist/chunk-5LDRNKX2.js +1063 -0
- package/dist/chunk-5N2FG33Q.js +25 -0
- package/dist/chunk-67MTHP2E.js +135 -0
- package/dist/chunk-6CWDTGUC.js +20 -0
- package/dist/chunk-7BHLZB3A.js +2115 -0
- package/dist/chunk-7RBKDI66.js +348 -0
- package/dist/chunk-AMFR5YA3.js +541 -0
- package/dist/chunk-BBUH4VAA.js +1224 -0
- package/dist/chunk-BYEU76JP.js +899 -0
- package/dist/chunk-CLJ5HLUD.js +458 -0
- package/dist/chunk-D5YD55AR.js +116 -0
- package/dist/chunk-DXQNI4PC.js +61 -0
- package/dist/chunk-E3NYWENM.js +1004 -0
- package/dist/chunk-GNGDQYDU.js +34688 -0
- package/dist/chunk-GOTUR54M.js +9 -0
- package/dist/chunk-HBU5MTAM.js +41 -0
- package/dist/chunk-HMYNFFY4.js +28 -0
- package/dist/chunk-JPOWPFCU.js +1010 -0
- package/dist/chunk-JWHCJDCI.js +1215 -0
- package/dist/chunk-KBR4MZZR.js +41 -0
- package/dist/chunk-KKKPTZLM.js +93 -0
- package/dist/chunk-ME6DNWIU.js +66 -0
- package/dist/chunk-NI4DEJMC.js +88 -0
- package/dist/chunk-O4EJEDHO.js +659 -0
- package/dist/chunk-PIDUD6M2.js +31 -0
- package/dist/chunk-PS4PFJQP.js +29459 -0
- package/dist/chunk-QV47YRF4.js +48 -0
- package/dist/chunk-RQDWMVRB.js +279 -0
- package/dist/chunk-TFSSEXL6.js +136 -0
- package/dist/chunk-TKHQ4DGZ.js +8290 -0
- package/dist/chunk-TPOCL34A.js +2876 -0
- package/dist/chunk-UGYAX5YI.js +565 -0
- package/dist/chunk-UHTSULZS.js +461 -0
- package/dist/chunk-UU3R62TT.js +128 -0
- package/dist/chunk-UWIJNAOB.js +3906 -0
- package/dist/chunk-VOO7NYPP.js +914 -0
- package/dist/chunk-VPAWTYLY.js +117 -0
- package/dist/chunk-WD6AJM35.js +1216 -0
- package/dist/chunk-X3BR7HWV.js +115 -0
- package/dist/chunk-X3NE4WVW.js +120 -0
- package/dist/chunk-XNISANGE.js +1395 -0
- package/dist/chunk-XV4ZJ6ZM.js +3177 -0
- package/dist/cli/index.js +236 -0
- package/dist/clio-KIQ5SNDS.js +53 -0
- package/dist/components-JVHMUBEB.js +653 -0
- package/dist/config-ZFCDBMDC.js +372 -0
- package/dist/configure-G4E3A2PG.js +27 -0
- package/dist/context-CDXTP2MP.js +293 -0
- package/dist/context-E3KIFVXI.js +185 -0
- package/dist/context-clear-3F4PLXOS.js +102 -0
- package/dist/context-index-Q7YSYTR3.js +106 -0
- package/dist/docs-YIETIWZI.js +280 -0
- package/dist/doctor-M5HJJZOL.js +61 -0
- package/dist/domains/agents/builtins/architect.md +33 -0
- package/dist/domains/agents/builtins/coder.md +31 -0
- package/dist/domains/agents/builtins/context-bootstrap.md +38 -0
- package/dist/domains/agents/builtins/debugger.md +30 -0
- package/dist/domains/agents/builtins/documenter.md +31 -0
- package/dist/domains/agents/builtins/git-master.md +30 -0
- package/dist/domains/agents/builtins/provenance.md +30 -0
- package/dist/domains/agents/builtins/researcher.md +71 -0
- package/dist/domains/agents/builtins/scout.md +42 -0
- package/dist/domains/agents/builtins/tester.md +31 -0
- package/dist/domains/agents/builtins/verifier.md +30 -0
- package/dist/domains/agents/builtins/wiki-writer.md +41 -0
- package/dist/eval-B3KZZESM.js +2674 -0
- package/dist/evidence-V67CHM35.js +233 -0
- package/dist/evolve-YDZSUQYA.js +518 -0
- package/dist/extensions-SRG7XCAH.js +207 -0
- package/dist/fleet-CA2CRTVG.js +760 -0
- package/dist/fleet-preflight-CLIAX7YR.js +21 -0
- package/dist/init-2OZDJE2D.js +227 -0
- package/dist/memory-3PIQQAKX.js +207 -0
- package/dist/models-DY35XI7Y.js +237 -0
- package/dist/paths-5OMXW7Z4.js +57 -0
- package/dist/preload-KZVHET2B.js +11 -0
- package/dist/reset-PIFYNOS3.js +216 -0
- package/dist/run-3VSPP24F.js +735 -0
- package/dist/share-D36RQCXM.js +241 -0
- package/dist/skills-F2MRLELY.js +445 -0
- package/dist/skills-eval-E2ZTW4PL.js +932 -0
- package/dist/targets-DZMEZAH4.js +977 -0
- package/dist/trace-7NYCUI2J.js +250 -0
- package/dist/uninstall-AD3JWHBB.js +322 -0
- package/dist/upgrade-WYYBKGDY.js +301 -0
- package/dist/usage-ULIDAGFF.js +755 -0
- package/dist/version-ROZ6CZKH.js +16 -0
- package/dist/wiki-generate-PKFIX6OB.js +377 -0
- package/dist/worker/entry.js +1739 -0
- package/docs/README.md +93 -0
- package/docs/acp.md +120 -0
- package/docs/alcf-provider.md +72 -0
- package/docs/architecture.md +172 -0
- package/docs/artifact-versions.md +54 -0
- package/docs/built-in-agents.md +265 -0
- package/docs/capacity-and-scheduling.md +97 -0
- package/docs/commands-and-modes.md +554 -0
- package/docs/config-knobs-audit.md +115 -0
- package/docs/configuration-and-targets.md +812 -0
- package/docs/context-engine.md +236 -0
- package/docs/dispatch-architecture-rationale.md +126 -0
- package/docs/documentation-coverage.md +46 -0
- package/docs/documentation-guide.md +166 -0
- package/docs/environment-variables.md +105 -0
- package/docs/eval-runner.md +205 -0
- package/docs/evals-internal.md +298 -0
- package/docs/evidence-and-memory.md +243 -0
- package/docs/evolution.md +143 -0
- package/docs/exit-codes-and-output.md +74 -0
- package/docs/extensions-and-sharing.md +306 -0
- package/docs/fleet-demo-runbook.md +179 -0
- package/docs/fleet-dispatch.md +591 -0
- package/docs/glossary.md +75 -0
- package/docs/html/agents_blueprint.html +936 -0
- package/docs/html/alcf_blueprint.html +324 -0
- package/docs/html/architecture_blueprint.html +850 -0
- package/docs/html/commands_blueprint.html +794 -0
- package/docs/html/config_knobs_audit_blueprint.html +178 -0
- package/docs/html/configuration_blueprint.html +1080 -0
- package/docs/html/context_blueprint.html +603 -0
- package/docs/html/documentation_blueprint.html +832 -0
- package/docs/html/environment_blueprint.html +404 -0
- package/docs/html/eval_blueprint.html +743 -0
- package/docs/html/evals_internal_blueprint.html +190 -0
- package/docs/html/evolution_blueprint.html +674 -0
- package/docs/html/extensions_blueprint.html +2065 -0
- package/docs/html/fleet_dispatch_blueprint.html +286 -0
- package/docs/html/index.html +919 -0
- package/docs/html/lifecycle_blueprint.html +723 -0
- package/docs/html/memory_blueprint.html +699 -0
- package/docs/html/middleware_blueprint.html +664 -0
- package/docs/html/models_blueprint.html +2366 -0
- package/docs/html/observability_blueprint.html +683 -0
- package/docs/html/provider_adapter_blueprint.html +245 -0
- package/docs/html/safety_blueprint.html +1386 -0
- package/docs/html/shared.css +571 -0
- package/docs/html/shared.js +143 -0
- package/docs/html/skills_blueprint.html +671 -0
- package/docs/html/soak_blueprint.html +182 -0
- package/docs/html/tool_usage_blueprint.html +350 -0
- package/docs/html/tools_blueprint.html +2249 -0
- package/docs/html/trace_blueprint.html +235 -0
- package/docs/html/tui_design_blueprint.html +314 -0
- package/docs/html/validation_blueprint.html +961 -0
- package/docs/html/worker_dispatch_blueprint.html +231 -0
- package/docs/installation-and-lifecycle.md +308 -0
- package/docs/middleware-and-components.md +148 -0
- package/docs/model-catalog.md +189 -0
- package/docs/observability.md +233 -0
- package/docs/proactive-memory.md +452 -0
- package/docs/prompt-envelope-and-tools.md +142 -0
- package/docs/provider-adapter-cookbook.md +148 -0
- package/docs/release-cut-checklist.md +138 -0
- package/docs/safety-model.md +357 -0
- package/docs/scientific-validation.md +105 -0
- package/docs/session-lifecycle.md +156 -0
- package/docs/skills-marketplace.md +46 -0
- package/docs/tool-usage.md +527 -0
- package/docs/trace-store.md +132 -0
- package/docs/troubleshooting.md +33 -0
- package/docs/tui-design.md +239 -0
- package/docs/worker-dispatch-mechanics.md +242 -0
- package/package.json +132 -0
- package/skills/README.md +408 -0
- package/skills/git/commit-crafting/SKILL.md +79 -0
- package/skills/git/commit-crafting/evals.md +92 -0
- package/skills/git/create-pr/SKILL.md +116 -0
- package/skills/git/create-pr/evals.md +114 -0
- package/skills/git/investigate-issue/SKILL.md +139 -0
- package/skills/git/investigate-issue/evals.md +94 -0
- package/skills/git/resolve-merge-conflicts/SKILL.md +96 -0
- package/skills/git/resolve-merge-conflicts/evals.md +58 -0
- package/skills/git/review-changes/SKILL.md +103 -0
- package/skills/git/review-changes/evals.md +85 -0
- package/skills/git/worktree-create/SKILL.md +92 -0
- package/skills/git/worktree-create/evals.md +97 -0
- package/skills/git/worktree-create/references/worktree-setup.md +66 -0
- package/skills/git/worktree-merge/SKILL.md +95 -0
- package/skills/git/worktree-merge/evals.md +114 -0
- package/skills/skill-marketplace.json +261 -0
- package/skills/workflow/cut-it/SKILL.md +86 -0
- package/skills/workflow/cut-it/evals.md +42 -0
- package/src/domains/agents/builtins/architect.md +33 -0
- package/src/domains/agents/builtins/coder.md +31 -0
- package/src/domains/agents/builtins/context-bootstrap.md +38 -0
- package/src/domains/agents/builtins/debugger.md +30 -0
- package/src/domains/agents/builtins/documenter.md +31 -0
- package/src/domains/agents/builtins/git-master.md +30 -0
- package/src/domains/agents/builtins/provenance.md +30 -0
- package/src/domains/agents/builtins/researcher.md +71 -0
- package/src/domains/agents/builtins/scout.md +42 -0
- package/src/domains/agents/builtins/tester.md +31 -0
- package/src/domains/agents/builtins/verifier.md +30 -0
- package/src/domains/agents/builtins/wiki-writer.md +41 -0
- package/src/domains/agents/fleets/build-review.md +34 -0
- package/src/domains/agents/fleets/build-test.md +35 -0
- package/src/domains/agents/fleets/sdlc.md +86 -0
- package/src/domains/prompts/fragments/identity/clio-worker.md +11 -0
- package/src/domains/prompts/fragments/identity/clio.md +26 -0
- package/src/domains/prompts/fragments/operating/contract.md +64 -0
- package/src/domains/prompts/fragments/safety/auto-edit.md +14 -0
- package/src/domains/prompts/fragments/safety/full-auto.md +14 -0
- package/src/domains/prompts/fragments/safety/read-only.md +13 -0
- package/src/domains/prompts/fragments/safety/suggest.md +13 -0
- package/src/domains/prompts/fragments/wiki/page.md +75 -0
- package/src/domains/prompts/fragments/wiki/plan.md +48 -0
- package/src/domains/providers/models/cloud-models/alcf.yaml +40 -0
- package/src/domains/providers/models/local-models/clio-local-coding-targets.yaml +993 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/core/safe-id.ts
|
|
2
|
+
var InvalidIdError = class extends Error {
|
|
3
|
+
constructor(message) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.name = "InvalidIdError";
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
function isSafeId(id) {
|
|
9
|
+
if (id.length === 0) return false;
|
|
10
|
+
if (id.includes("/") || id.includes("\\")) return false;
|
|
11
|
+
if (id.includes("\0")) return false;
|
|
12
|
+
if (id === "." || id === "..") return false;
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
function assertSafeId(id, kind) {
|
|
16
|
+
if (!isSafeId(id)) {
|
|
17
|
+
throw new InvalidIdError(`invalid ${kind} id '${id}': must not contain path separators or path segments`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
InvalidIdError,
|
|
23
|
+
assertSafeId
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=chunk-5N2FG33Q.js.map
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// src/cli/argv.ts
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
function printError(message, detail) {
|
|
4
|
+
const head = chalk.red("error:");
|
|
5
|
+
process.stderr.write(`${head} ${message}
|
|
6
|
+
`);
|
|
7
|
+
if (detail) process.stderr.write(` ${detail}
|
|
8
|
+
`);
|
|
9
|
+
}
|
|
10
|
+
function printOk(message) {
|
|
11
|
+
process.stdout.write(`${chalk.green("ok:")} ${message}
|
|
12
|
+
`);
|
|
13
|
+
}
|
|
14
|
+
function printHeader(message) {
|
|
15
|
+
process.stdout.write(`${chalk.cyan(message)}
|
|
16
|
+
`);
|
|
17
|
+
}
|
|
18
|
+
function columnWidths(rows) {
|
|
19
|
+
const widths = [];
|
|
20
|
+
for (const row of rows) {
|
|
21
|
+
for (let i = 0; i < row.length; i += 1) {
|
|
22
|
+
widths[i] = Math.max(widths[i] ?? 0, row[i]?.length ?? 0);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return widths;
|
|
26
|
+
}
|
|
27
|
+
function formatColumnRow(row, widths, gap = 2) {
|
|
28
|
+
return row.map((cell, index) => {
|
|
29
|
+
if (index === row.length - 1) return cell;
|
|
30
|
+
return cell.padEnd((widths[index] ?? cell.length) + gap);
|
|
31
|
+
}).join("").trimEnd();
|
|
32
|
+
}
|
|
33
|
+
function formatColumns(rows, gap = 2) {
|
|
34
|
+
if (rows.length === 0) return "";
|
|
35
|
+
const widths = columnWidths(rows);
|
|
36
|
+
return `${rows.map((row) => formatColumnRow(row, widths, gap)).join("\n")}
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
39
|
+
function parseFlags(argv) {
|
|
40
|
+
const flags = /* @__PURE__ */ new Set();
|
|
41
|
+
const positional = [];
|
|
42
|
+
for (const arg of argv) {
|
|
43
|
+
if (arg.startsWith("--")) flags.add(arg.slice(2));
|
|
44
|
+
else if (arg.startsWith("-") && arg.length > 1) flags.add(arg.slice(1));
|
|
45
|
+
else positional.push(arg);
|
|
46
|
+
}
|
|
47
|
+
return { flags, positional };
|
|
48
|
+
}
|
|
49
|
+
var ROOT_FLAG_TOKENS = /* @__PURE__ */ new Set(["--help", "-h", "--all", "--version", "-v"]);
|
|
50
|
+
var GLOBAL_ONLY_FLAGS = /* @__PURE__ */ new Map([
|
|
51
|
+
["--api-key", "--api-key <key>"],
|
|
52
|
+
["--no-context-files", "--no-context-files"],
|
|
53
|
+
["-nc", "-nc"]
|
|
54
|
+
]);
|
|
55
|
+
function globalFlagPositionHint(arg, command) {
|
|
56
|
+
const usage = GLOBAL_ONLY_FLAGS.get(arg);
|
|
57
|
+
if (usage === void 0) return null;
|
|
58
|
+
return `${arg} is a global option and must come before the subcommand: clio-coder ${usage} ${command} ...`;
|
|
59
|
+
}
|
|
60
|
+
function extractGlobalFlags(argv, isSubcommand = () => false) {
|
|
61
|
+
const rest = [];
|
|
62
|
+
let apiKey;
|
|
63
|
+
let noContextFiles = false;
|
|
64
|
+
let noSkills = false;
|
|
65
|
+
const skillPaths = [];
|
|
66
|
+
for (let i = 0; i < argv.length; i++) {
|
|
67
|
+
const arg = argv[i];
|
|
68
|
+
if (arg === void 0) continue;
|
|
69
|
+
if (arg === "--") {
|
|
70
|
+
rest.push(...argv.slice(i + 1));
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
if (!arg.startsWith("-")) {
|
|
74
|
+
rest.push(...argv.slice(i));
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
if (ROOT_FLAG_TOKENS.has(arg)) {
|
|
78
|
+
rest.push(arg);
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (arg === "--no-context-files" || arg === "-nc") {
|
|
82
|
+
noContextFiles = true;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
if (arg === "--no-skills") {
|
|
86
|
+
noSkills = true;
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
if (arg === "--api-key" || arg === "--skill") {
|
|
90
|
+
const value = argv[i + 1];
|
|
91
|
+
if (value === void 0 || value.startsWith("-") || isSubcommand(value)) {
|
|
92
|
+
return {
|
|
93
|
+
noContextFiles,
|
|
94
|
+
noSkills,
|
|
95
|
+
skillPaths,
|
|
96
|
+
rest,
|
|
97
|
+
error: `${arg} requires a value`,
|
|
98
|
+
...apiKey === void 0 ? {} : { apiKey }
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
if (arg === "--api-key") apiKey = value;
|
|
102
|
+
else skillPaths.push(value);
|
|
103
|
+
i += 1;
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
noContextFiles,
|
|
108
|
+
noSkills,
|
|
109
|
+
skillPaths,
|
|
110
|
+
rest,
|
|
111
|
+
error: `unknown global option: ${arg}`,
|
|
112
|
+
...apiKey === void 0 ? {} : { apiKey }
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
noContextFiles,
|
|
117
|
+
noSkills,
|
|
118
|
+
skillPaths,
|
|
119
|
+
rest,
|
|
120
|
+
...apiKey === void 0 ? {} : { apiKey }
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export {
|
|
125
|
+
printError,
|
|
126
|
+
printOk,
|
|
127
|
+
printHeader,
|
|
128
|
+
columnWidths,
|
|
129
|
+
formatColumnRow,
|
|
130
|
+
formatColumns,
|
|
131
|
+
parseFlags,
|
|
132
|
+
globalFlagPositionHint,
|
|
133
|
+
extractGlobalFlags
|
|
134
|
+
};
|
|
135
|
+
//# sourceMappingURL=chunk-67MTHP2E.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/core/boot-trace.ts
|
|
2
|
+
var BOOT_TRACE_ENV = "CLIO_CODER_TRACE_BOOT";
|
|
3
|
+
function isBootTraceEnabled() {
|
|
4
|
+
return process.env[BOOT_TRACE_ENV] === "1";
|
|
5
|
+
}
|
|
6
|
+
function traceBoot(phase, detail) {
|
|
7
|
+
if (!isBootTraceEnabled()) return;
|
|
8
|
+
try {
|
|
9
|
+
const elapsedMs = performance.now();
|
|
10
|
+
const suffix = detail !== void 0 && detail.length > 0 ? ` (${detail})` : "";
|
|
11
|
+
process.stderr.write(`[clio:boot] +${elapsedMs.toFixed(1)}ms ${phase}${suffix}
|
|
12
|
+
`);
|
|
13
|
+
} catch {
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
traceBoot
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=chunk-6CWDTGUC.js.map
|