codiedev 0.10.0-beta.1 → 0.10.0-beta.11
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 +1101 -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 +8 -9
- 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,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CAPTURE_SIGNALS_VERSION = void 0;
|
|
4
|
+
exports.parseCaptureSignals = parseCaptureSignals;
|
|
5
|
+
exports.withLaunch = withLaunch;
|
|
6
|
+
const transcriptModels_1 = require("./transcriptModels");
|
|
7
|
+
exports.CAPTURE_SIGNALS_VERSION = 1;
|
|
8
|
+
const IDLE_MS = 5 * 60_000;
|
|
9
|
+
const LIMIT = 100;
|
|
10
|
+
const skillKey = (value) => typeof value === "string"
|
|
11
|
+
? value
|
|
12
|
+
.replace(/^\//, "")
|
|
13
|
+
.replace(/\.md$/i, "")
|
|
14
|
+
.replace(/["'`]/g, "")
|
|
15
|
+
.trim()
|
|
16
|
+
.toLowerCase()
|
|
17
|
+
: "";
|
|
18
|
+
function parseCaptureSignals(content, source) {
|
|
19
|
+
const timestamps = new Set();
|
|
20
|
+
const invocationCounts = new Map();
|
|
21
|
+
const invocations = new Set(), pulls = new Set(), entrypoints = new Set();
|
|
22
|
+
const tools = new Map(), calls = new Set();
|
|
23
|
+
let parsedRecords = 0, truncated = false;
|
|
24
|
+
let premiumRequests, nanoAiu;
|
|
25
|
+
let cursorSubagents;
|
|
26
|
+
const artifacts = new Map();
|
|
27
|
+
let lastInvoked = null;
|
|
28
|
+
const marker = (text) => {
|
|
29
|
+
if (!lastInvoked || artifacts.has(lastInvoked))
|
|
30
|
+
return;
|
|
31
|
+
const m = text.match(/codiedev:artifact=([a-z0-9]{16,64})/i);
|
|
32
|
+
if (m && artifacts.size < LIMIT)
|
|
33
|
+
artifacts.set(lastInvoked, m[1]);
|
|
34
|
+
};
|
|
35
|
+
const addSkill = (set, value) => {
|
|
36
|
+
const key = skillKey(value);
|
|
37
|
+
if (!key || key.length > 200 || !/^[a-z0-9][a-z0-9_:/.-]*$/i.test(key))
|
|
38
|
+
return;
|
|
39
|
+
if (set.size >= LIMIT && !set.has(key)) {
|
|
40
|
+
truncated = true;
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
set.add(key);
|
|
44
|
+
if (set === invocations) {
|
|
45
|
+
invocationCounts.set(key, (invocationCounts.get(key) ?? 0) + 1);
|
|
46
|
+
lastInvoked = key;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const command = (value) => {
|
|
50
|
+
if (typeof value !== "string")
|
|
51
|
+
return;
|
|
52
|
+
for (const match of value.matchAll(/\bcodiedev\s+pull\s+([^\s"'`]+)/gi))
|
|
53
|
+
addSkill(pulls, match[1]);
|
|
54
|
+
};
|
|
55
|
+
const tool = (name, id, input) => {
|
|
56
|
+
if (typeof name !== "string" || !name || name.length > 100)
|
|
57
|
+
return;
|
|
58
|
+
const key = typeof id === "string" ? id : `${parsedRecords}:${calls.size}`;
|
|
59
|
+
if (calls.has(key))
|
|
60
|
+
return;
|
|
61
|
+
calls.add(key);
|
|
62
|
+
if (tools.size < LIMIT || tools.has(name))
|
|
63
|
+
tools.set(name, (tools.get(name) ?? 0) + 1);
|
|
64
|
+
else
|
|
65
|
+
truncated = true;
|
|
66
|
+
let args = input;
|
|
67
|
+
if (typeof args === "string") {
|
|
68
|
+
try {
|
|
69
|
+
args = JSON.parse(args);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
command(args);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (name.toLowerCase() === "skill")
|
|
77
|
+
addSkill(invocations, args?.skill ?? args?.name);
|
|
78
|
+
command(args?.command ?? args?.cmd);
|
|
79
|
+
};
|
|
80
|
+
for (const record of (0, transcriptModels_1.transcriptRecords)(content, source)) {
|
|
81
|
+
if (!record || typeof record !== "object")
|
|
82
|
+
continue;
|
|
83
|
+
const e = record;
|
|
84
|
+
parsedRecords++;
|
|
85
|
+
const entrypoint = (value) => {
|
|
86
|
+
if (typeof value === "string" &&
|
|
87
|
+
entrypoints.size < 10 &&
|
|
88
|
+
/^[a-z0-9][a-z0-9_.:-]{0,39}$/i.test(value))
|
|
89
|
+
entrypoints.add(value.toLowerCase());
|
|
90
|
+
};
|
|
91
|
+
entrypoint(e.entrypoint);
|
|
92
|
+
if (e.type === "session_meta" && e.payload) {
|
|
93
|
+
const src = e.payload.source;
|
|
94
|
+
entrypoint(typeof src === "string"
|
|
95
|
+
? `codex:${src}`
|
|
96
|
+
: src && typeof src === "object"
|
|
97
|
+
? `codex:${Object.keys(src)[0] ?? "other"}`
|
|
98
|
+
: undefined);
|
|
99
|
+
}
|
|
100
|
+
if (e.type === "cursor.subagent_summary" && Number.isSafeInteger(e.count) && e.count > 0) {
|
|
101
|
+
cursorSubagents = { count: e.count, truncated: e.truncated === true };
|
|
102
|
+
}
|
|
103
|
+
if (e.type === "copilot.skill_invoked")
|
|
104
|
+
addSkill(invocations, e.skill);
|
|
105
|
+
if (e.type === "pi.skill_invoked")
|
|
106
|
+
addSkill(invocations, e.skill);
|
|
107
|
+
if (e.type === "copilot.usage_summary") {
|
|
108
|
+
if (typeof e.premiumRequests === "number" && e.premiumRequests >= 0)
|
|
109
|
+
premiumRequests = e.premiumRequests;
|
|
110
|
+
if (typeof e.nanoAiu === "number" && e.nanoAiu >= 0)
|
|
111
|
+
nanoAiu = e.nanoAiu;
|
|
112
|
+
}
|
|
113
|
+
const time = typeof e.timestamp === "string"
|
|
114
|
+
? Date.parse(e.timestamp)
|
|
115
|
+
: e.info?.time?.created;
|
|
116
|
+
if (typeof time === "number" && Number.isFinite(time) && time > 0)
|
|
117
|
+
timestamps.add(time);
|
|
118
|
+
const blocks = e.message?.content;
|
|
119
|
+
if (Array.isArray(blocks))
|
|
120
|
+
for (const part of blocks) {
|
|
121
|
+
if (part?.type === "tool_use")
|
|
122
|
+
tool(part.name, part.id, part.input);
|
|
123
|
+
if (part?.type === "tool_result")
|
|
124
|
+
marker(typeof part.content === "string" ? part.content : JSON.stringify(part.content ?? ""));
|
|
125
|
+
if (part?.type === "text" && e.type === "user") {
|
|
126
|
+
for (const match of String(part.text ?? "").matchAll(/<command-name>\/?([a-z0-9:_-]+)<\/command-name>/gi))
|
|
127
|
+
addSkill(invocations, match[1]);
|
|
128
|
+
marker(String(part.text ?? ""));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (typeof blocks === "string" && e.type === "user") {
|
|
132
|
+
for (const match of blocks.matchAll(/<command-name>\/?([a-z0-9:_-]+)<\/command-name>/gi))
|
|
133
|
+
addSkill(invocations, match[1]);
|
|
134
|
+
marker(blocks);
|
|
135
|
+
}
|
|
136
|
+
if (e.type === "response_item" &&
|
|
137
|
+
["function_call", "custom_tool_call"].includes(e.payload?.type))
|
|
138
|
+
tool(e.payload.name, e.payload.call_id, e.payload.arguments ?? e.payload.input);
|
|
139
|
+
if (e.info?.role === "assistant" && Array.isArray(e.parts))
|
|
140
|
+
for (const part of e.parts) {
|
|
141
|
+
if (part?.type === "tool")
|
|
142
|
+
tool(part.tool, part.callID ?? part.id, part.state?.input);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const sorted = [...timestamps].sort((a, b) => a - b);
|
|
146
|
+
let activeMs = 0;
|
|
147
|
+
for (let i = 1; i < sorted.length; i++) {
|
|
148
|
+
const gap = sorted[i] - sorted[i - 1];
|
|
149
|
+
if (gap <= IDLE_MS)
|
|
150
|
+
activeMs += gap;
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
version: exports.CAPTURE_SIGNALS_VERSION,
|
|
154
|
+
parsedRecords,
|
|
155
|
+
timestampCount: sorted.length,
|
|
156
|
+
...(sorted.length
|
|
157
|
+
? { firstAt: sorted[0], lastAt: sorted[sorted.length - 1] }
|
|
158
|
+
: {}),
|
|
159
|
+
activeMs,
|
|
160
|
+
idleThresholdMs: IDLE_MS,
|
|
161
|
+
skillInvocations: [...invocations].sort(),
|
|
162
|
+
skillInvocationCounts: [...invocationCounts]
|
|
163
|
+
.map(([skill, count]) => ({ skill, count }))
|
|
164
|
+
.sort((a, b) => a.skill.localeCompare(b.skill)),
|
|
165
|
+
...(artifacts.size
|
|
166
|
+
? { skillInvocationArtifacts: [...artifacts].map(([skill, artifactId]) => ({ skill, artifactId })).sort((a, b) => a.skill.localeCompare(b.skill)) }
|
|
167
|
+
: {}),
|
|
168
|
+
skillPulls: [...pulls].sort(),
|
|
169
|
+
toolCalls: [...tools]
|
|
170
|
+
.map(([name, calls]) => ({ name, calls }))
|
|
171
|
+
.sort((a, b) => a.name.localeCompare(b.name)),
|
|
172
|
+
...(cursorSubagents ? { subagents: cursorSubagents } : {}),
|
|
173
|
+
...(entrypoints.size ? { entrypoints: [...entrypoints].sort() } : {}),
|
|
174
|
+
...(premiumRequests !== undefined ? { premiumRequests } : {}),
|
|
175
|
+
...(nanoAiu !== undefined ? { nanoAiu } : {}),
|
|
176
|
+
truncated,
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
function withLaunch(signals, launch) {
|
|
180
|
+
if (!launch || !/^[a-z0-9][a-z0-9_.:-]{0,39}$/.test(launch))
|
|
181
|
+
return signals;
|
|
182
|
+
const all = new Set([...(signals.entrypoints ?? []), launch]);
|
|
183
|
+
return all.size > 10 ? signals : { ...signals, entrypoints: [...all].sort() };
|
|
184
|
+
}
|
package/dist/cli.js
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
-
/**
|
|
4
|
-
* Codiedev CLI dispatcher.
|
|
5
|
-
*
|
|
6
|
-
* Subcommands:
|
|
7
|
-
* codiedev connect — link agent CLIs to your org
|
|
8
|
-
* codiedev push <file> — author/update a spec/review/decision/etc.
|
|
9
|
-
* codiedev pull <key> — fetch an artifact by filename key
|
|
10
|
-
* codiedev ping <user> "<msg>" — send a message (optionally --with <key>)
|
|
11
|
-
* codiedev inbox — list pings (use --unread to filter)
|
|
12
|
-
* codiedev read <ping-id> — mark read + show full message
|
|
13
|
-
* codiedev note "<text>" — capture a thought
|
|
14
|
-
* codiedev promote <artifact-id> — promote an extracted artifact to authored
|
|
15
|
-
* codiedev help — show this help
|
|
16
|
-
*/
|
|
17
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
4
|
const connect_1 = require("./connect");
|
|
5
|
+
const cliSession_1 = require("./cliSession");
|
|
6
|
+
const utils_1 = require("./utils");
|
|
19
7
|
const push_1 = require("./commands/push");
|
|
20
8
|
const delete_1 = require("./commands/delete");
|
|
21
9
|
const pull_1 = require("./commands/pull");
|
|
@@ -23,17 +11,19 @@ const ask_1 = require("./commands/ask");
|
|
|
23
11
|
const ping_1 = require("./commands/ping");
|
|
24
12
|
const inbox_1 = require("./commands/inbox");
|
|
25
13
|
const note_1 = require("./commands/note");
|
|
26
|
-
const promote_1 = require("./commands/promote");
|
|
27
|
-
const reverseTicket_1 = require("./commands/reverseTicket");
|
|
28
14
|
const createTicket_1 = require("./commands/createTicket");
|
|
29
15
|
const doctor_1 = require("./commands/doctor");
|
|
30
16
|
const search_1 = require("./commands/search");
|
|
31
17
|
const library_1 = require("./commands/library");
|
|
32
18
|
const share_1 = require("./commands/share");
|
|
33
19
|
const send_1 = require("./commands/send");
|
|
34
|
-
const react_1 = require("./commands/react");
|
|
35
20
|
const capture_1 = require("./commands/capture");
|
|
36
|
-
const
|
|
21
|
+
const pack_1 = require("./commands/pack");
|
|
22
|
+
const traces_1 = require("./commands/traces");
|
|
23
|
+
const agents_1 = require("./commands/agents");
|
|
24
|
+
const evals_1 = require("./commands/evals");
|
|
25
|
+
const hookGate_1 = require("./packs/hookGate");
|
|
26
|
+
const sync_1 = require("./packs/sync");
|
|
37
27
|
const version_1 = require("./version");
|
|
38
28
|
const HELP = `
|
|
39
29
|
Codiedev CLI
|
|
@@ -43,14 +33,11 @@ Codiedev CLI
|
|
|
43
33
|
someone left off across sessions and providers.
|
|
44
34
|
|
|
45
35
|
Connect:
|
|
46
|
-
codiedev connect
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
codiedev
|
|
50
|
-
|
|
51
|
-
codiedev security scan --deep Run installed open-source scanners too
|
|
52
|
-
codiedev security sync Fetch administrator policy locally
|
|
53
|
-
codiedev security rollback --yes Restore pre-update hook configuration
|
|
36
|
+
codiedev connect Sign in with your browser and link
|
|
37
|
+
Claude Code / Codex / Cursor /
|
|
38
|
+
GitHub Copilot / pi to your org
|
|
39
|
+
codiedev logout Sign this machine out
|
|
40
|
+
codiedev doctor Verify setup and capture
|
|
54
41
|
|
|
55
42
|
Harness:
|
|
56
43
|
codie Launch the governed Codie harness.
|
|
@@ -70,14 +57,6 @@ Artifacts:
|
|
|
70
57
|
team's collective memory. Returns an
|
|
71
58
|
LLM-synthesized answer with citations
|
|
72
59
|
pointing at sessions + artifacts.
|
|
73
|
-
codiedev promote <artifact-id> Promote an auto-extracted artifact
|
|
74
|
-
to an authored one
|
|
75
|
-
codiedev reverse-ticket [<pr-url>] Generate a Jira ticket draft.
|
|
76
|
-
No URL = branch mode (uses your current
|
|
77
|
-
local git branch, no PR needed).
|
|
78
|
-
Draft lands in /portal/agentic-ticketing.
|
|
79
|
-
codiedev reverse-ticket --base <ref> Override the base ref in branch mode
|
|
80
|
-
(defaults to origin/main).
|
|
81
60
|
codiedev create-ticket [<prompt>] Forward-write a scoped ticket plan.
|
|
82
61
|
Claude investigates the codebase, asks
|
|
83
62
|
"single repo or multiple? where?", then
|
|
@@ -96,6 +75,30 @@ Messaging:
|
|
|
96
75
|
codiedev inbox [--unread] [--limit N] Show messages
|
|
97
76
|
codiedev read <ping-id> Mark read + show full message
|
|
98
77
|
|
|
78
|
+
Starter packs:
|
|
79
|
+
codiedev pack list Packs assigned to your team
|
|
80
|
+
codiedev pack install [slug] [--harness claude,codex,copilot,cursor,codie,pi]
|
|
81
|
+
[--dry-run] [--json]
|
|
82
|
+
Install a pack (or all) into every
|
|
83
|
+
detected tool
|
|
84
|
+
codiedev pack status Installed packs, up to date or not
|
|
85
|
+
|
|
86
|
+
Traces (agents on the gateway):
|
|
87
|
+
codiedev agents init | deploy | run | runs | show | secrets | webhook
|
|
88
|
+
Deploy agents and run them in fresh sandboxes
|
|
89
|
+
(codiedev agents help)
|
|
90
|
+
codiedev traces agents Agents you maintain, with saved test cases
|
|
91
|
+
codiedev traces cases <agent> [--dataset name [--version n]] [--model id]
|
|
92
|
+
Pull an agent's test cases (or one dataset)
|
|
93
|
+
into this repo for your coding agent to
|
|
94
|
+
run, optionally on another model
|
|
95
|
+
codiedev traces report <results.json> Send the results back to Traces
|
|
96
|
+
codiedev traces overview | runs | run | score | scores | score-kinds | queue | judge | import | add-example | versions | save-version
|
|
97
|
+
Agents, runs, failures, scores, review queues,
|
|
98
|
+
automatic scoring and datasets (codiedev traces help)
|
|
99
|
+
codiedev evals report <run.json> File one variant's eval scores under an experiment
|
|
100
|
+
codiedev evals last <subject> Latest experiment on a subject + its champion
|
|
101
|
+
|
|
99
102
|
Discovery:
|
|
100
103
|
codiedev search "<query>" Semantic search across the team's
|
|
101
104
|
captured sessions and artifacts
|
|
@@ -103,9 +106,6 @@ Discovery:
|
|
|
103
106
|
[--type T] [--tag X] [--limit N]
|
|
104
107
|
List artifacts in your workspace
|
|
105
108
|
|
|
106
|
-
Feed:
|
|
107
|
-
codiedev react <postId> <emoji> Toggle a reaction on a feed post
|
|
108
|
-
|
|
109
109
|
Privacy:
|
|
110
110
|
codiedev ignore <path> Never capture this folder or its children
|
|
111
111
|
codiedev unignore <path> Stop ignoring a folder
|
|
@@ -159,21 +159,49 @@ locally before any capture leaves your machine, so an offline or failed portal
|
|
|
159
159
|
status sync never weakens it.
|
|
160
160
|
`.trim();
|
|
161
161
|
const COMMAND_HELP = {
|
|
162
|
+
pack: pack_1.PACK_HELP,
|
|
163
|
+
traces: traces_1.TRACES_HELP,
|
|
164
|
+
agents: agents_1.AGENTS_HELP,
|
|
165
|
+
evals: evals_1.EVALS_HELP,
|
|
162
166
|
connect: `
|
|
163
167
|
codiedev connect — link your agent CLI to Codiedev
|
|
164
168
|
|
|
165
|
-
|
|
166
|
-
|
|
169
|
+
Opens your browser to sign in (approve once, no API key to copy), then
|
|
170
|
+
installs:
|
|
171
|
+
- ~/.codiedev/config.json (sign-in + org + tracked repos)
|
|
167
172
|
- ~/.claude/settings.json hook (captures session transcripts)
|
|
168
173
|
- ~/.claude/CLAUDE.md instructions (teaches Claude the commands)
|
|
169
174
|
- ~/.codex/hooks.json hook (same, for Codex)
|
|
170
175
|
- ~/.codex/AGENTS.md instructions (same, for Codex)
|
|
171
|
-
- ~/.cursor/hooks.json hooks (session,
|
|
176
|
+
- ~/.cursor/hooks.json hooks (session, backup, capture)
|
|
172
177
|
- ~/.cursor/rules/codiedev.mdc (teaches Cursor the commands)
|
|
178
|
+
- ~/.copilot/hooks/codiedev.json (GitHub Copilot: VS Code + CLI capture)
|
|
179
|
+
- ~/.pi/agent/extensions/codiedev.ts (pi: session, prompt, capture)
|
|
180
|
+
- ~/.pi/agent/AGENTS.md (teaches pi the commands)
|
|
173
181
|
|
|
174
182
|
Re-run anytime to swap accounts or refresh the instruction block.
|
|
175
183
|
|
|
176
|
-
|
|
184
|
+
Over SSH or on a machine with no display it shows a link and a short code
|
|
185
|
+
instead: open the link on your laptop or phone, check the code, approve.
|
|
186
|
+
Detected automatically.
|
|
187
|
+
|
|
188
|
+
Options:
|
|
189
|
+
--token Paste an API token instead of signing in with a browser
|
|
190
|
+
(CI, or a machine with no browser anywhere). Create one at
|
|
191
|
+
https://codiedev.com/portal/integrations/claude-code
|
|
192
|
+
--force, -f Sign in again even if this machine is already connected.
|
|
193
|
+
|
|
194
|
+
Browser sign-in stores a 24-hour access token and a refresh token that
|
|
195
|
+
rotates on every use; nothing long-lived is saved. Revoke a machine from
|
|
196
|
+
Integrations in the portal, or run 'codiedev logout' on it.
|
|
197
|
+
`.trim(),
|
|
198
|
+
logout: `
|
|
199
|
+
codiedev logout — sign this machine out
|
|
200
|
+
|
|
201
|
+
Ends this machine's browser sign-in on the server and removes it from
|
|
202
|
+
~/.codiedev/config.json. Device settings (ignored folders) are kept.
|
|
203
|
+
For a pasted API token, it's only forgotten locally: revoke it in the
|
|
204
|
+
portal under Integrations.
|
|
177
205
|
`.trim(),
|
|
178
206
|
push: `
|
|
179
207
|
codiedev push — author or update an artifact
|
|
@@ -275,20 +303,6 @@ codiedev note — capture a passing thought, linked to your session
|
|
|
275
303
|
unignore: IGNORE_HELP,
|
|
276
304
|
ignored: IGNORE_HELP,
|
|
277
305
|
capture: IGNORE_HELP,
|
|
278
|
-
promote: `
|
|
279
|
-
codiedev promote — promote an auto-extracted artifact to authored
|
|
280
|
-
|
|
281
|
-
Usage:
|
|
282
|
-
codiedev promote <artifact-id> [--key filename.md]
|
|
283
|
-
|
|
284
|
-
The session-capture pipeline auto-extracts spec/bugfix/decision
|
|
285
|
-
artifacts from each agent session. Promote turns one of those into
|
|
286
|
-
a first-class authored artifact your team can ping, pull, and
|
|
287
|
-
update versions of.
|
|
288
|
-
|
|
289
|
-
Find artifact-ids in the portal under Knowledge → Memory, or via
|
|
290
|
-
the portal search.
|
|
291
|
-
`.trim(),
|
|
292
306
|
"create-ticket": `
|
|
293
307
|
codiedev create-ticket — forward-write a scoped ticket plan
|
|
294
308
|
|
|
@@ -406,16 +420,37 @@ Run 'codiedev help <command>' for each, or see the quick list:
|
|
|
406
420
|
|
|
407
421
|
codiedev help
|
|
408
422
|
|
|
409
|
-
##
|
|
423
|
+
## Signing in
|
|
410
424
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
3. Copy the cdv_... string and paste it into 'codiedev connect'
|
|
425
|
+
'codiedev connect' opens your browser; approve, and you're done. Nothing
|
|
426
|
+
long-lived is stored: a 24-hour access token plus a rotating refresh token.
|
|
414
427
|
|
|
415
|
-
|
|
428
|
+
Over SSH it shows a link and code to approve from your laptop or phone,
|
|
429
|
+
automatically. For CI, create a token at
|
|
430
|
+
https://codiedev.com/portal/integrations/claude-code and run
|
|
431
|
+
'codiedev connect --token'.
|
|
416
432
|
`.trim();
|
|
433
|
+
const REMOVED_COMMANDS = {
|
|
434
|
+
promote: "Share an auto-saved spec with 'Promote to team' in the portal's My artifacts list.",
|
|
435
|
+
"reverse-ticket": "Use 'codiedev create-ticket' to draft Jira tickets.",
|
|
436
|
+
reverseTicket: "Use 'codiedev create-ticket' to draft Jira tickets.",
|
|
437
|
+
react: "React to feed posts in the portal.",
|
|
438
|
+
};
|
|
439
|
+
function removedCommand(command) {
|
|
440
|
+
console.error(`'codiedev ${command}' has been removed. ${REMOVED_COMMANDS[command] ?? ""}`.trim());
|
|
441
|
+
process.exit(1);
|
|
442
|
+
}
|
|
417
443
|
async function main() {
|
|
418
444
|
const [, , command, ...rest] = process.argv;
|
|
445
|
+
if (command === "hook-gate") {
|
|
446
|
+
(0, hookGate_1.runHookGateCli)(rest);
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
if (command && !["pack", "packs", "help", "docs", "version", "--version", "-v", "--help", "-h"].includes(command) && !rest.includes("--json")) {
|
|
450
|
+
const nag = (0, sync_1.packNagLine)();
|
|
451
|
+
if (nag)
|
|
452
|
+
console.error(`\n${nag}\n`);
|
|
453
|
+
}
|
|
419
454
|
if (!command || command === "--help" || command === "-h") {
|
|
420
455
|
console.log(HELP);
|
|
421
456
|
return;
|
|
@@ -438,7 +473,6 @@ async function main() {
|
|
|
438
473
|
console.log(DOCS);
|
|
439
474
|
return;
|
|
440
475
|
}
|
|
441
|
-
// Support `codiedev <command> --help` too.
|
|
442
476
|
if (rest.includes("--help") || rest.includes("-h")) {
|
|
443
477
|
if (COMMAND_HELP[command]) {
|
|
444
478
|
console.log(COMMAND_HELP[command]);
|
|
@@ -449,18 +483,40 @@ async function main() {
|
|
|
449
483
|
console.log(`codiedev v${version_1.CLI_VERSION}`);
|
|
450
484
|
return;
|
|
451
485
|
}
|
|
486
|
+
if (command !== "connect" && command !== "logout") {
|
|
487
|
+
const fresh = await (0, cliSession_1.ensureFreshToken)({ configPath: utils_1.CONFIG_PATH }).catch(() => null);
|
|
488
|
+
if (fresh?.status === "signed_out") {
|
|
489
|
+
console.error("\nYour Codiedev sign-in has ended (revoked or expired). Run `codiedev connect` to sign in again.\n");
|
|
490
|
+
}
|
|
491
|
+
}
|
|
452
492
|
try {
|
|
453
493
|
switch (command) {
|
|
454
494
|
case "connect":
|
|
455
495
|
await (0, connect_1.runConnect)(rest);
|
|
456
496
|
return;
|
|
497
|
+
case "session-refresh": {
|
|
498
|
+
await (0, cliSession_1.ensureFreshToken)({ configPath: utils_1.CONFIG_PATH }, 60 * 60_000).catch(() => null);
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
case "logout": {
|
|
502
|
+
const out = await (0, cliSession_1.logout)({ configPath: utils_1.CONFIG_PATH });
|
|
503
|
+
if (!out.wasConnected) {
|
|
504
|
+
console.log("This machine isn't signed in.");
|
|
505
|
+
}
|
|
506
|
+
else if (out.hadBrowserAuth) {
|
|
507
|
+
console.log(out.serverRevoked
|
|
508
|
+
? "Signed out. This machine's sign-in is revoked."
|
|
509
|
+
: "Signed out on this machine. Couldn't reach Codiedev to revoke the sign-in; revoke it under Integrations in the portal.");
|
|
510
|
+
}
|
|
511
|
+
else {
|
|
512
|
+
console.log("Removed the API token from this machine. It still works elsewhere until you revoke it under Integrations in the portal.");
|
|
513
|
+
}
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
457
516
|
case "doctor":
|
|
458
517
|
case "verify":
|
|
459
518
|
await (0, doctor_1.runDoctor)(rest);
|
|
460
519
|
return;
|
|
461
|
-
case "security":
|
|
462
|
-
await (0, security_1.runSecurityCommand)(rest);
|
|
463
|
-
return;
|
|
464
520
|
case "push":
|
|
465
521
|
await (0, push_1.runPush)(rest);
|
|
466
522
|
return;
|
|
@@ -479,7 +535,6 @@ async function main() {
|
|
|
479
535
|
return;
|
|
480
536
|
case "inbox":
|
|
481
537
|
case "check":
|
|
482
|
-
// Support `codiedev check inbox` as an alias.
|
|
483
538
|
if (command === "check" && rest[0] === "inbox") {
|
|
484
539
|
await (0, inbox_1.runInbox)(rest.slice(1));
|
|
485
540
|
}
|
|
@@ -494,11 +549,10 @@ async function main() {
|
|
|
494
549
|
await (0, note_1.runNote)(rest);
|
|
495
550
|
return;
|
|
496
551
|
case "promote":
|
|
497
|
-
await (0, promote_1.runPromote)(rest);
|
|
498
|
-
return;
|
|
499
552
|
case "reverse-ticket":
|
|
500
553
|
case "reverseTicket":
|
|
501
|
-
|
|
554
|
+
case "react":
|
|
555
|
+
removedCommand(command);
|
|
502
556
|
return;
|
|
503
557
|
case "create-ticket":
|
|
504
558
|
case "createTicket":
|
|
@@ -511,22 +565,31 @@ async function main() {
|
|
|
511
565
|
case "ls":
|
|
512
566
|
await (0, library_1.runLibrary)(rest);
|
|
513
567
|
return;
|
|
568
|
+
case "traces":
|
|
569
|
+
await (0, traces_1.runTraces)(rest);
|
|
570
|
+
return;
|
|
571
|
+
case "agents":
|
|
572
|
+
await (0, agents_1.runAgents)(rest);
|
|
573
|
+
return;
|
|
574
|
+
case "evals":
|
|
575
|
+
await (0, evals_1.runEvals)(rest);
|
|
576
|
+
return;
|
|
514
577
|
case "share":
|
|
515
578
|
await (0, share_1.runShare)(rest);
|
|
516
579
|
return;
|
|
517
580
|
case "send":
|
|
518
581
|
await (0, send_1.runSend)(rest);
|
|
519
582
|
return;
|
|
520
|
-
case "react":
|
|
521
|
-
await (0, react_1.runReact)(rest);
|
|
522
|
-
return;
|
|
523
583
|
case "ignore":
|
|
524
584
|
case "unignore":
|
|
525
585
|
case "ignored":
|
|
526
586
|
await (0, capture_1.runCaptureCommand)([command, ...rest]);
|
|
527
587
|
return;
|
|
588
|
+
case "pack":
|
|
589
|
+
case "packs":
|
|
590
|
+
await (0, pack_1.runPack)(rest);
|
|
591
|
+
return;
|
|
528
592
|
case "capture":
|
|
529
|
-
// Back-compat alias for the earlier `codiedev capture <sub>` form.
|
|
530
593
|
await (0, capture_1.runCaptureCommand)(rest);
|
|
531
594
|
return;
|
|
532
595
|
default:
|