codiedev 0.10.0-beta.1 → 0.10.0-beta.10
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/README.md +11 -5
- package/assets/opencode-plugin.mjs +6 -0
- package/assets/session-key.mjs +48 -0
- package/assets/tui-brand-plugin.tsx +73 -0
- package/dist/backup/cache.js +1 -5
- package/dist/backup/match.js +0 -6
- package/dist/backup/run.js +3 -35
- package/dist/captureExclusions.js +0 -12
- package/dist/captureLog.js +0 -28
- package/dist/captureReadiness.js +0 -58
- package/dist/captureSignals.js +184 -0
- package/dist/cli.js +135 -72
- package/dist/cliSession.js +456 -0
- package/dist/codexHookTrust.js +125 -6
- package/dist/codexLimitScan.js +359 -0
- package/dist/codie.js +77 -130
- package/dist/codieBrandInstall.js +80 -0
- package/dist/codieLauncher.js +76 -79
- package/dist/codieRuntime.js +19 -23
- package/dist/codieRuntimeInstall.js +108 -23
- package/dist/codieUsage.js +181 -0
- package/dist/commands/agentTemplates.generated.js +136 -0
- package/dist/commands/agents.js +1088 -0
- package/dist/commands/agentsSdk.generated.js +7 -0
- package/dist/commands/ask.js +0 -3
- package/dist/commands/capture.js +0 -2
- package/dist/commands/createTicket.js +0 -10
- package/dist/commands/doctor.js +53 -120
- package/dist/commands/evals.js +187 -0
- package/dist/commands/inbox.js +0 -2
- package/dist/commands/library.js +0 -3
- package/dist/commands/pack.js +573 -0
- package/dist/commands/ping.js +0 -2
- package/dist/commands/pull.js +6 -10
- package/dist/commands/push.js +2 -12
- package/dist/commands/search.js +0 -4
- package/dist/commands/send.js +0 -5
- package/dist/commands/share.js +0 -4
- package/dist/commands/shared.js +0 -35
- package/dist/commands/traces.js +344 -0
- package/dist/commands/tracesLabel.js +348 -0
- package/dist/configDir.js +18 -11
- package/dist/connect.js +55 -118
- package/dist/connectFlow.js +35 -9
- package/dist/copilotHooks.js +391 -0
- package/dist/copilotInstallation.js +64 -0
- package/dist/cursorHooks.js +38 -30
- package/dist/cursorLifecycle.js +109 -0
- package/dist/detection.js +0 -30
- package/dist/harnessDirs.js +77 -0
- package/dist/hook.js +256 -445
- package/dist/inboxFormat.js +0 -24
- package/dist/launchContext.js +150 -0
- package/dist/launcher.js +168 -0
- package/dist/limitEvent.js +44 -13
- package/dist/limitEventReporter.js +1 -1
- package/dist/managedPi.js +256 -0
- package/dist/mcp.js +5 -384
- package/dist/nativeSteering.js +24 -0
- package/dist/packs/codie.js +182 -0
- package/dist/packs/harnesses.js +411 -0
- package/dist/packs/hookGate.js +256 -0
- package/dist/packs/install.js +286 -0
- package/dist/packs/manifest.js +126 -0
- package/dist/packs/paths.js +81 -0
- package/dist/packs/shim.js +214 -0
- package/dist/packs/store.js +155 -0
- package/dist/packs/sync.js +170 -0
- package/dist/piHooks.js +216 -0
- package/dist/piRuntime.js +120 -0
- package/dist/repoResolver.js +0 -19
- package/dist/secret.js +0 -3
- package/dist/selfUpdate.js +376 -0
- package/dist/skillMarker.js +23 -0
- package/dist/subagents.js +135 -0
- package/dist/teamSkillContext.js +10 -0
- package/dist/transcriptModels.js +205 -0
- package/dist/upgradeNudge.js +0 -30
- package/dist/utils.js +502 -828
- package/dist/version.js +0 -10
- package/dist/versionCheck.js +0 -33
- package/package.json +9 -10
- package/dist/backup/cache.d.ts +0 -14
- package/dist/backup/match.d.ts +0 -2
- package/dist/backup/run.d.ts +0 -25
- package/dist/captureExclusions.d.ts +0 -30
- package/dist/captureLog.d.ts +0 -20
- package/dist/captureReadiness.d.ts +0 -65
- package/dist/cli.d.ts +0 -16
- package/dist/codexHookTrust.d.ts +0 -34
- package/dist/codie.d.ts +0 -2
- package/dist/codieLauncher.d.ts +0 -53
- package/dist/codieRuntime.d.ts +0 -29
- package/dist/codieRuntimeInstall.d.ts +0 -28
- package/dist/codieStartup.d.ts +0 -26
- package/dist/codieStartup.js +0 -30
- package/dist/commands/ask.d.ts +0 -1
- package/dist/commands/capture.d.ts +0 -14
- package/dist/commands/createTicket.d.ts +0 -27
- package/dist/commands/delete.d.ts +0 -1
- package/dist/commands/doctor.d.ts +0 -1
- package/dist/commands/inbox.d.ts +0 -3
- package/dist/commands/library.d.ts +0 -2
- package/dist/commands/note.d.ts +0 -1
- package/dist/commands/ping.d.ts +0 -1
- package/dist/commands/promote.d.ts +0 -1
- package/dist/commands/promote.js +0 -53
- package/dist/commands/pull.d.ts +0 -2
- package/dist/commands/push.d.ts +0 -33
- package/dist/commands/react.d.ts +0 -2
- package/dist/commands/react.js +0 -40
- package/dist/commands/reverseTicket.d.ts +0 -2
- package/dist/commands/reverseTicket.js +0 -477
- package/dist/commands/search.d.ts +0 -2
- package/dist/commands/security.d.ts +0 -1
- package/dist/commands/security.js +0 -156
- package/dist/commands/send.d.ts +0 -2
- package/dist/commands/share.d.ts +0 -2
- package/dist/commands/shared.d.ts +0 -64
- package/dist/configDir.d.ts +0 -1
- package/dist/connect.d.ts +0 -1
- package/dist/connectFlow.d.ts +0 -13
- package/dist/cursorHooks.d.ts +0 -23
- package/dist/detection.d.ts +0 -30
- package/dist/hook.d.ts +0 -6
- package/dist/inboxFormat.d.ts +0 -38
- package/dist/limitEvent.d.ts +0 -16
- package/dist/limitEventReporter.d.ts +0 -21
- package/dist/mcp.d.ts +0 -12
- package/dist/prUrl.d.ts +0 -9
- package/dist/prUrl.js +0 -33
- package/dist/repoResolver.d.ts +0 -17
- package/dist/secret.d.ts +0 -1
- package/dist/security.d.ts +0 -102
- package/dist/security.js +0 -437
- package/dist/securityDeepScan.d.ts +0 -41
- package/dist/securityDeepScan.js +0 -248
- package/dist/securityDoctor.d.ts +0 -32
- package/dist/securityDoctor.js +0 -63
- package/dist/securityFeature.d.ts +0 -5
- package/dist/securityFeature.js +0 -7
- package/dist/securityInstall.d.ts +0 -63
- package/dist/securityInstall.js +0 -239
- package/dist/securityInventory.d.ts +0 -54
- package/dist/securityInventory.js +0 -556
- package/dist/securityPilot.d.ts +0 -19
- package/dist/securityPilot.js +0 -61
- package/dist/securityPolicy.d.ts +0 -33
- package/dist/securityPolicy.js +0 -188
- package/dist/securitySession.d.ts +0 -6
- package/dist/securitySession.js +0 -72
- package/dist/upgradeNudge.d.ts +0 -25
- package/dist/utils.d.ts +0 -342
- package/dist/version.d.ts +0 -1
- package/dist/versionCheck.d.ts +0 -68
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.EVALS_HELP = void 0;
|
|
37
|
+
exports.runEvals = runEvals;
|
|
38
|
+
const fs = __importStar(require("fs"));
|
|
39
|
+
const path = __importStar(require("path"));
|
|
40
|
+
const shared_1 = require("./shared");
|
|
41
|
+
exports.EVALS_HELP = `
|
|
42
|
+
codiedev evals — experiments and their runs, shared with the team
|
|
43
|
+
|
|
44
|
+
codiedev evals report <run.json> [--harness name]
|
|
45
|
+
File one variant's scores under an
|
|
46
|
+
experiment (created on first use)
|
|
47
|
+
codiedev evals last <subject> [--json] The latest experiment on a subject,
|
|
48
|
+
its runs, and the current champion
|
|
49
|
+
|
|
50
|
+
run.json:
|
|
51
|
+
{
|
|
52
|
+
"subject": "session-summaries", // agent name or workload
|
|
53
|
+
"question": "Is Terra medium as good as GLM high?",
|
|
54
|
+
"experimentId": "…", // optional, instead of subject + question
|
|
55
|
+
"dataset": "30 Signal & Code sessions", // optional
|
|
56
|
+
"run": {
|
|
57
|
+
"label": "terra-med-v2", "model": "openai/gpt-6.1-terra",
|
|
58
|
+
"provider": "openai", "reasoningEffort": "medium", "prompt": "summary_extract_v2",
|
|
59
|
+
"gitSha": "…", "isControl": false, "judgeModel": "anthropic/claude-sonnet-5.5",
|
|
60
|
+
"casesTotal": 30, "casesScored": 30, "errors": 0,
|
|
61
|
+
"scoringRevision": 1, // required once experiment scoring rules are defined
|
|
62
|
+
"score": 3.85, "metrics": { "fidelity": 3.6 },
|
|
63
|
+
"costPerCaseUsd": 0.026, "latencyMsAvg": 21000,
|
|
64
|
+
"wins": 20, "losses": 8, "ties": 2, "note": "…",
|
|
65
|
+
"cases": [{ "key": "case-1", "score": 4, "note": "…" }]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
Read scoring rules and their current revision with: codiedev evals last <subject> --json
|
|
70
|
+
|
|
71
|
+
Scores and notes only: never put prompts, transcripts or outputs in it.
|
|
72
|
+
`.trim();
|
|
73
|
+
function flag(args, i, name) {
|
|
74
|
+
const a = args[i];
|
|
75
|
+
if (a === name && i + 1 < args.length)
|
|
76
|
+
return { value: args[i + 1], skip: 1 };
|
|
77
|
+
if (a.startsWith(`${name}=`))
|
|
78
|
+
return { value: a.slice(name.length + 1), skip: 0 };
|
|
79
|
+
return { skip: -1 };
|
|
80
|
+
}
|
|
81
|
+
function variant(run) {
|
|
82
|
+
return [run.model, run.reasoningEffort, run.prompt].filter(Boolean).join(" · ");
|
|
83
|
+
}
|
|
84
|
+
function fmtScore(n) {
|
|
85
|
+
return n === null ? "–" : n.toFixed(2);
|
|
86
|
+
}
|
|
87
|
+
function fmtCost(n) {
|
|
88
|
+
return n === null ? "–" : `$${n.toFixed(4)}`;
|
|
89
|
+
}
|
|
90
|
+
async function runReport(args, config) {
|
|
91
|
+
let file;
|
|
92
|
+
let harness;
|
|
93
|
+
for (let i = 0; i < args.length; i++) {
|
|
94
|
+
const f = flag(args, i, "--harness");
|
|
95
|
+
if (f.skip >= 0) {
|
|
96
|
+
harness = f.value;
|
|
97
|
+
i += f.skip;
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
if (!args[i].startsWith("-") && !file)
|
|
101
|
+
file = args[i];
|
|
102
|
+
}
|
|
103
|
+
if (!file) {
|
|
104
|
+
console.error("Usage: codiedev evals report <run.json> [--harness name]");
|
|
105
|
+
process.exit(1);
|
|
106
|
+
}
|
|
107
|
+
let body;
|
|
108
|
+
try {
|
|
109
|
+
body = JSON.parse(fs.readFileSync(path.resolve(process.cwd(), file), "utf8"));
|
|
110
|
+
}
|
|
111
|
+
catch (err) {
|
|
112
|
+
console.error(`Couldn't read ${file}: ${err.message}`);
|
|
113
|
+
process.exit(1);
|
|
114
|
+
}
|
|
115
|
+
if (!body.subject || !body.question || !body.run?.label || !body.run?.model || typeof body.run?.casesTotal !== "number") {
|
|
116
|
+
console.error(`${file} needs subject, question, and run.label, run.model, run.casesTotal. See: codiedev evals help`);
|
|
117
|
+
process.exit(1);
|
|
118
|
+
}
|
|
119
|
+
const start = Date.now();
|
|
120
|
+
try {
|
|
121
|
+
const res = await (0, shared_1.apiRequest)("POST", "/api/cli/evals/runs", {
|
|
122
|
+
config,
|
|
123
|
+
body: { ...body, run: { ...body.run, harness: harness ?? body.run.harness ?? undefined } },
|
|
124
|
+
});
|
|
125
|
+
(0, shared_1.recordAgentEvent)(config, { tool: "codiedev_evals_report", ok: true, latencyMs: Date.now() - start });
|
|
126
|
+
console.log(`✓ Reported ${body.run.label} on ${body.subject}${res.created ? " (new experiment)" : ""}: "${body.question}"`);
|
|
127
|
+
console.log(` experiment ${res.experimentId}. See it in Codiedev → Traces → Evals.`);
|
|
128
|
+
}
|
|
129
|
+
catch (err) {
|
|
130
|
+
const e = err;
|
|
131
|
+
(0, shared_1.recordAgentEvent)(config, { tool: "codiedev_evals_report", ok: false, latencyMs: Date.now() - start, error: e.message });
|
|
132
|
+
console.error(`Couldn't report: ${e.message}`);
|
|
133
|
+
process.exit(1);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
async function runLast(args, config) {
|
|
137
|
+
const json = args.includes("--json");
|
|
138
|
+
const subject = args.find((a) => !a.startsWith("-"));
|
|
139
|
+
if (!subject) {
|
|
140
|
+
console.error("Usage: codiedev evals last <subject> [--json]");
|
|
141
|
+
process.exit(1);
|
|
142
|
+
}
|
|
143
|
+
let res;
|
|
144
|
+
try {
|
|
145
|
+
res = await (0, shared_1.apiRequest)("GET", `/api/cli/evals/last?subject=${encodeURIComponent(subject)}`, { config });
|
|
146
|
+
}
|
|
147
|
+
catch (err) {
|
|
148
|
+
const e = err;
|
|
149
|
+
console.error(e.status === 404 ? `No evals on ${subject} yet.` : `Couldn't load evals: ${e.message}`);
|
|
150
|
+
process.exit(1);
|
|
151
|
+
}
|
|
152
|
+
if (json) {
|
|
153
|
+
console.log(JSON.stringify(res, null, 2));
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const { experiment, runs, champion } = res;
|
|
157
|
+
if (champion) {
|
|
158
|
+
console.log(`Champion: ${champion.run.label} (${variant(champion.run)}), score ${fmtScore(champion.run.score)}, ${fmtCost(champion.run.costPerCaseUsd)}/case`);
|
|
159
|
+
if (champion.decisionNote)
|
|
160
|
+
console.log(` Why: ${champion.decisionNote}`);
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
console.log("Champion: none picked yet");
|
|
164
|
+
}
|
|
165
|
+
console.log("");
|
|
166
|
+
console.log(`Latest experiment (${res.experiments} on ${experiment.subject}): ${experiment.question}`);
|
|
167
|
+
if (experiment.dataset)
|
|
168
|
+
console.log(` Dataset: ${experiment.dataset}`);
|
|
169
|
+
console.log(` id ${experiment.id}, by ${experiment.createdBy}, updated ${new Date(experiment.updatedAt).toISOString().slice(0, 16).replace("T", " ")}`);
|
|
170
|
+
console.log("");
|
|
171
|
+
for (const run of [...runs].sort((a, b) => a.ranAt - b.ranAt)) {
|
|
172
|
+
const h2h = run.wins !== null ? ` · ${run.wins}W/${run.losses ?? 0}L/${run.ties ?? 0}T` : "";
|
|
173
|
+
console.log(` ${run.isControl ? "[control] " : ""}${run.label.padEnd(24)} ${fmtScore(run.score).padStart(5)} ${fmtCost(run.costPerCaseUsd).padStart(8)}/case${h2h} ${variant(run)}`);
|
|
174
|
+
}
|
|
175
|
+
console.log("");
|
|
176
|
+
console.log(`Next run on this experiment: put "experimentId": "${experiment.id}" in run.json, then codiedev evals report run.json`);
|
|
177
|
+
}
|
|
178
|
+
async function runEvals(args, configOverride) {
|
|
179
|
+
const [sub, ...rest] = args;
|
|
180
|
+
if (sub === "report")
|
|
181
|
+
return runReport(rest, configOverride ?? (0, shared_1.requireConfig)());
|
|
182
|
+
if (sub === "last")
|
|
183
|
+
return runLast(rest, configOverride ?? (0, shared_1.requireConfig)());
|
|
184
|
+
console.log(exports.EVALS_HELP);
|
|
185
|
+
if (sub && sub !== "help")
|
|
186
|
+
process.exit(1);
|
|
187
|
+
}
|
package/dist/commands/inbox.js
CHANGED
|
@@ -70,8 +70,6 @@ async function runRead(args) {
|
|
|
70
70
|
const config = (0, shared_1.requireConfig)();
|
|
71
71
|
const start = Date.now();
|
|
72
72
|
try {
|
|
73
|
-
// First, fetch inbox so we can show the full body (markRead endpoint
|
|
74
|
-
// doesn't return content).
|
|
75
73
|
const listRes = await (0, shared_1.apiRequest)("GET", "/api/cli/inbox", {
|
|
76
74
|
config,
|
|
77
75
|
query: { limit: 100 },
|
package/dist/commands/library.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// `codiedev library [--scope mine|shared|all] [--kind doc|skill] [--tag X]
|
|
3
|
-
// [--type spec|...] [--limit N]` — list artifacts in your Codiedev workspace.
|
|
4
|
-
// Server applies companyId scoping; --scope filters within that.
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.runLibrary = runLibrary;
|
|
7
4
|
const shared_1 = require("./shared");
|