codiedev 0.9.80 → 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 +12 -5
- 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 +0 -11
- package/dist/cli.js +11 -33
- package/dist/cliSession.js +3 -60
- package/dist/codexHookTrust.js +0 -28
- package/dist/codexLimitScan.js +0 -107
- package/dist/codie.js +64 -57
- package/dist/codieBrandInstall.js +0 -18
- package/dist/codieLauncher.js +1 -72
- package/dist/codieRuntime.js +27 -32
- package/dist/codieRuntimeInstall.js +11 -43
- package/dist/codieUsage.js +0 -49
- 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 +2 -72
- package/dist/commands/evals.js +3 -9
- package/dist/commands/inbox.js +0 -2
- package/dist/commands/library.js +0 -3
- package/dist/commands/pack.js +0 -29
- package/dist/commands/ping.js +0 -2
- package/dist/commands/pull.js +0 -9
- package/dist/commands/push.js +0 -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 +0 -13
- package/dist/commands/tracesLabel.js +0 -8
- package/dist/configDir.js +1 -18
- package/dist/connect.js +3 -75
- package/dist/connectFlow.js +0 -15
- package/dist/copilotHooks.js +0 -67
- package/dist/copilotInstallation.js +0 -1
- package/dist/cursorHooks.js +1 -11
- package/dist/cursorLifecycle.js +1 -7
- package/dist/detection.js +0 -30
- package/dist/harnessDirs.js +0 -19
- package/dist/hook.js +43 -293
- package/dist/inboxFormat.js +0 -24
- package/dist/launchContext.js +0 -50
- package/dist/launcher.js +0 -33
- package/dist/limitEvent.js +2 -34
- package/dist/managedPi.js +2 -50
- package/dist/mcp.js +0 -48
- package/dist/nativeSteering.js +1 -4
- package/dist/packs/codie.js +0 -15
- package/dist/packs/harnesses.js +1 -38
- package/dist/packs/hookGate.js +0 -33
- package/dist/packs/install.js +0 -20
- package/dist/packs/manifest.js +1 -15
- package/dist/packs/paths.js +0 -8
- package/dist/packs/shim.js +0 -8
- package/dist/packs/store.js +0 -12
- package/dist/packs/sync.js +0 -20
- package/dist/piHooks.js +4 -45
- package/dist/piRuntime.js +0 -18
- package/dist/repoResolver.js +0 -19
- package/dist/secret.js +0 -3
- package/dist/selfUpdate.js +2 -77
- package/dist/skillMarker.js +0 -14
- package/dist/subagents.js +0 -18
- package/dist/teamSkillContext.js +0 -1
- package/dist/transcriptModels.js +0 -8
- package/dist/upgradeNudge.js +1 -30
- package/dist/utils.js +165 -768
- package/dist/version.js +0 -10
- package/dist/versionCheck.js +0 -33
- package/package.json +13 -8
- 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/captureSignals.d.ts +0 -47
- package/dist/cli.d.ts +0 -15
- package/dist/cliSession.d.ts +0 -108
- package/dist/codexHookTrust.d.ts +0 -49
- package/dist/codexLimitScan.d.ts +0 -64
- package/dist/codie.d.ts +0 -2
- package/dist/codieBrandInstall.d.ts +0 -11
- package/dist/codieLauncher.d.ts +0 -87
- package/dist/codieRuntime.d.ts +0 -35
- package/dist/codieRuntimeInstall.d.ts +0 -56
- package/dist/codieUsage.d.ts +0 -64
- 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 -9
- package/dist/commands/evals.d.ts +0 -3
- 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/pack.d.ts +0 -54
- package/dist/commands/ping.d.ts +0 -1
- package/dist/commands/pull.d.ts +0 -2
- package/dist/commands/push.d.ts +0 -33
- package/dist/commands/search.d.ts +0 -2
- 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/commands/traces.d.ts +0 -72
- package/dist/commands/tracesLabel.d.ts +0 -24
- package/dist/configDir.d.ts +0 -10
- package/dist/connect.d.ts +0 -1
- package/dist/connectFlow.d.ts +0 -34
- package/dist/copilotHooks.d.ts +0 -85
- package/dist/copilotInstallation.d.ts +0 -10
- package/dist/cursorHooks.d.ts +0 -13
- package/dist/cursorLifecycle.d.ts +0 -2
- package/dist/detection.d.ts +0 -30
- package/dist/harnessDirs.d.ts +0 -15
- package/dist/hook.d.ts +0 -6
- package/dist/inboxFormat.d.ts +0 -38
- package/dist/launchContext.d.ts +0 -46
- package/dist/launcher.d.ts +0 -25
- package/dist/limitEvent.d.ts +0 -15
- package/dist/limitEventReporter.d.ts +0 -21
- package/dist/managedPi.d.ts +0 -48
- package/dist/mcp.d.ts +0 -12
- package/dist/nativeSteering.d.ts +0 -5
- package/dist/packs/codie.d.ts +0 -45
- package/dist/packs/harnesses.d.ts +0 -74
- package/dist/packs/hookGate.d.ts +0 -53
- package/dist/packs/install.d.ts +0 -46
- package/dist/packs/manifest.d.ts +0 -52
- package/dist/packs/paths.d.ts +0 -17
- package/dist/packs/shim.d.ts +0 -26
- package/dist/packs/store.d.ts +0 -42
- package/dist/packs/sync.d.ts +0 -40
- package/dist/piHooks.d.ts +0 -22
- package/dist/piRuntime.d.ts +0 -26
- package/dist/repoResolver.d.ts +0 -17
- package/dist/secret.d.ts +0 -1
- package/dist/selfUpdate.d.ts +0 -64
- package/dist/skillMarker.d.ts +0 -6
- package/dist/subagents.d.ts +0 -36
- package/dist/teamSkillContext.d.ts +0 -9
- package/dist/transcriptModels.d.ts +0 -20
- package/dist/upgradeNudge.d.ts +0 -24
- package/dist/utils.d.ts +0 -396
- package/dist/version.d.ts +0 -1
- package/dist/versionCheck.d.ts +0 -68
package/dist/transcriptModels.js
CHANGED
|
@@ -25,7 +25,6 @@ function* transcriptRecords(content, source) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
catch {
|
|
28
|
-
/* Fall through to JSONL for partial captures. */
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
let start = 0;
|
|
@@ -36,7 +35,6 @@ function* transcriptRecords(content, source) {
|
|
|
36
35
|
yield JSON.parse(content.slice(start, end));
|
|
37
36
|
}
|
|
38
37
|
catch {
|
|
39
|
-
/* partial or non-JSON line */
|
|
40
38
|
}
|
|
41
39
|
start = end + 1;
|
|
42
40
|
}
|
|
@@ -76,8 +74,6 @@ function parseTranscriptModels(content, source) {
|
|
|
76
74
|
cacheReadTokens: positive(raw.cached_input_tokens),
|
|
77
75
|
cacheCreationTokens: 0,
|
|
78
76
|
};
|
|
79
|
-
// Codex reasoning_output_tokens is a subset of output_tokens. Cumulative
|
|
80
|
-
// snapshots must be differenced, including across a model switch.
|
|
81
77
|
usage = { ...empty(model), requests: 1 };
|
|
82
78
|
const reset = positive(raw.input_tokens) <
|
|
83
79
|
previous.inputTokens + previous.cacheReadTokens ||
|
|
@@ -144,8 +140,6 @@ function parseTranscriptModels(content, source) {
|
|
|
144
140
|
model =
|
|
145
141
|
typeof message.model === "string" ? message.model : "Unattributed";
|
|
146
142
|
const raw = message.usage;
|
|
147
|
-
// Copilot's shutdown token totals carry `requests: 0`: its calls are
|
|
148
|
-
// already counted from the assistant records.
|
|
149
143
|
const requests = event.requests;
|
|
150
144
|
usage = {
|
|
151
145
|
...empty(model),
|
|
@@ -159,10 +153,8 @@ function parseTranscriptModels(content, source) {
|
|
|
159
153
|
}
|
|
160
154
|
if (source === "copilot" && event.type === "copilot.usage")
|
|
161
155
|
tokenEvidence.add(usage.model);
|
|
162
|
-
// Client placeholders are not model executions.
|
|
163
156
|
if (!usage.model.trim() || usage.model.startsWith("<"))
|
|
164
157
|
continue;
|
|
165
|
-
// Streaming snapshots repeat message ids; retain the latest snapshot once.
|
|
166
158
|
messages.set(messageId, usage);
|
|
167
159
|
}
|
|
168
160
|
const incompleteCosts = new Set();
|
package/dist/upgradeNudge.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Client-side "you're outdated" warning. Prints at the top of connect/doctor
|
|
3
|
-
// when there's a newer `codiedev` published on npm. Pure helpers tested in
|
|
4
|
-
// __tests__/versionCheck.test.ts; this module does the IO (registry fetch +
|
|
5
|
-
// disk cache) and is exercised by manual smoke.
|
|
6
|
-
//
|
|
7
|
-
// Cache lives at <codiedevStateDir()>/.update-cache.json (~/.codiedev by
|
|
8
|
-
// default; ~/.codiedev-desktop under CODIEDEV_CONFIG_DIR). 24h TTL — long
|
|
9
|
-
// enough that the registry isn't hit on every command, short enough that
|
|
10
|
-
// newly-published versions surface the day after release.
|
|
11
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
3
|
if (k2 === undefined) k2 = k;
|
|
13
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -43,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
43
34
|
})();
|
|
44
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
36
|
exports.maybePrintUpgradeNudge = maybePrintUpgradeNudge;
|
|
37
|
+
exports.promptYesNo = promptYesNo;
|
|
46
38
|
exports.maybeOfferUpgrade = maybeOfferUpgrade;
|
|
47
39
|
const fs = __importStar(require("fs"));
|
|
48
40
|
const path = __importStar(require("path"));
|
|
@@ -74,7 +66,6 @@ function writeCache(entry) {
|
|
|
74
66
|
fs.writeFileSync(CACHE_PATH, JSON.stringify(entry), "utf8");
|
|
75
67
|
}
|
|
76
68
|
catch {
|
|
77
|
-
// ignore — cache is best-effort
|
|
78
69
|
}
|
|
79
70
|
}
|
|
80
71
|
async function fetchLatestFromNpm() {
|
|
@@ -95,12 +86,6 @@ async function fetchLatestFromNpm() {
|
|
|
95
86
|
return null;
|
|
96
87
|
}
|
|
97
88
|
}
|
|
98
|
-
/**
|
|
99
|
-
* Fail-silent — never throws, never blocks on network. If the registry is
|
|
100
|
-
* unreachable or the cache is corrupt, the warning just doesn't print. The
|
|
101
|
-
* worst outcome is "user keeps running an old version" — same as before
|
|
102
|
-
* this feature existed.
|
|
103
|
-
*/
|
|
104
89
|
async function maybePrintUpgradeNudge() {
|
|
105
90
|
const now = Date.now();
|
|
106
91
|
const cache = readCache();
|
|
@@ -125,9 +110,6 @@ async function maybePrintUpgradeNudge() {
|
|
|
125
110
|
}
|
|
126
111
|
}
|
|
127
112
|
const OFFER_CACHE_NAME = ".update-offer-cache.json";
|
|
128
|
-
// This runs before the harness paints, so the timeout is startup latency the
|
|
129
|
-
// user feels. A missed check costs nothing; the next stale-cache launch tries
|
|
130
|
-
// again.
|
|
131
113
|
const OFFER_FETCH_TIMEOUT_MS = 1500;
|
|
132
114
|
const UPGRADE_TIMEOUT_MS = 120_000;
|
|
133
115
|
function offerCachePath(env) {
|
|
@@ -151,8 +133,6 @@ function readOfferCache(env) {
|
|
|
151
133
|
return null;
|
|
152
134
|
}
|
|
153
135
|
}
|
|
154
|
-
// If this cannot be persisted, the whole feature stays off. Without memory,
|
|
155
|
-
// every launch would refetch and re-nag on ephemeral or read-only filesystems.
|
|
156
136
|
function writeOfferCache(entry, env) {
|
|
157
137
|
try {
|
|
158
138
|
const target = offerCachePath(env);
|
|
@@ -189,8 +169,6 @@ async function fetchLatest(fetchImpl) {
|
|
|
189
169
|
return null;
|
|
190
170
|
}
|
|
191
171
|
}
|
|
192
|
-
// Single-keypress y/n prompt. EOF, Ctrl-C, lost raw mode, and tty errors all
|
|
193
|
-
// default to no so update handling can never strand the launcher.
|
|
194
172
|
function promptYesNo(question) {
|
|
195
173
|
return new Promise((resolve) => {
|
|
196
174
|
const stdin = process.stdin;
|
|
@@ -217,7 +195,6 @@ function promptYesNo(question) {
|
|
|
217
195
|
stdin.setRawMode(Boolean(wasRaw));
|
|
218
196
|
}
|
|
219
197
|
catch {
|
|
220
|
-
// Best-effort; the engine resets the tty when it starts.
|
|
221
198
|
}
|
|
222
199
|
stdin.pause();
|
|
223
200
|
process.stdout.write(`${yes ? "y" : "n"}\n`);
|
|
@@ -238,11 +215,6 @@ function runUpgrade() {
|
|
|
238
215
|
});
|
|
239
216
|
return !result.error && result.status === 0;
|
|
240
217
|
}
|
|
241
|
-
/**
|
|
242
|
-
* Prompt-capable sibling of maybePrintUpgradeNudge. Call this before handing
|
|
243
|
-
* the terminal to a TUI. A successful upgrade relaunches the fresh CLI and
|
|
244
|
-
* tells the stale caller to stop rather than continuing with old modules.
|
|
245
|
-
*/
|
|
246
218
|
async function maybeOfferUpgrade(opts = {}) {
|
|
247
219
|
const env = opts.env ?? process.env;
|
|
248
220
|
const argv = opts.argv ?? process.argv;
|
|
@@ -256,7 +228,6 @@ async function maybeOfferUpgrade(opts = {}) {
|
|
|
256
228
|
let fetchedAt = cache?.fetchedAt ?? 0;
|
|
257
229
|
const promptedAt = cache?.promptedAt ?? 0;
|
|
258
230
|
if (!cache || nowMs - cache.fetchedAt > CACHE_TTL_MS) {
|
|
259
|
-
// Probe writability before paying the network cost.
|
|
260
231
|
if (!writeOfferCache(cache ?? { latest: null, fetchedAt: 0, promptedAt: 0 }, env)) {
|
|
261
232
|
return { relaunched: false };
|
|
262
233
|
}
|