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/packs/manifest.d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
export interface PackManifestFile {
|
|
2
|
-
name: string;
|
|
3
|
-
content: string;
|
|
4
|
-
/** Skills only: the artifact the content came from (identity marker). */
|
|
5
|
-
artifactId?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface PackManifest {
|
|
8
|
-
slug: string;
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
version: number;
|
|
12
|
-
contentHash: string;
|
|
13
|
-
skills: PackManifestFile[];
|
|
14
|
-
agents: PackManifestFile[];
|
|
15
|
-
hooksJson: string | null;
|
|
16
|
-
/** Release channel the manifest resolved to (stable|beta|alpha|draft). */
|
|
17
|
-
channel?: string;
|
|
18
|
-
/** Display emoji/icon; never used in paths. */
|
|
19
|
-
icon?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface PackSummary {
|
|
22
|
-
slug: string;
|
|
23
|
-
name: string;
|
|
24
|
-
description?: string;
|
|
25
|
-
version: number;
|
|
26
|
-
channel?: string;
|
|
27
|
-
icon?: string;
|
|
28
|
-
itemCount?: number;
|
|
29
|
-
agentCount?: number;
|
|
30
|
-
hasHooks?: boolean;
|
|
31
|
-
}
|
|
32
|
-
export declare function isSafeSegment(value: unknown): value is string;
|
|
33
|
-
export declare function isSafeSkillName(value: unknown): value is string;
|
|
34
|
-
export declare class ManifestError extends Error {
|
|
35
|
-
}
|
|
36
|
-
/** Validate a manifest from the server. Throws ManifestError on anything
|
|
37
|
-
* unsafe or malformed — a partial install of a tampered pack is worse than
|
|
38
|
-
* none. */
|
|
39
|
-
export declare function parseManifest(input: unknown): PackManifest;
|
|
40
|
-
/** Short display-only label from the server: printable, no control chars. */
|
|
41
|
-
export declare function cleanLabel(value: unknown, max: number): string | undefined;
|
|
42
|
-
/** "🧰 Backend starter" when an icon is set. */
|
|
43
|
-
export declare function displayName(pack: {
|
|
44
|
-
name?: string;
|
|
45
|
-
slug: string;
|
|
46
|
-
icon?: unknown;
|
|
47
|
-
}): string;
|
|
48
|
-
/** Parse leading `---` YAML-ish frontmatter (flat `key: value` lines only). */
|
|
49
|
-
export declare function parseFrontmatter(content: string): {
|
|
50
|
-
data: Record<string, string>;
|
|
51
|
-
body: string;
|
|
52
|
-
};
|
package/dist/packs/paths.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const MARKETPLACE_NAME = "codiedev-packs";
|
|
2
|
-
export declare function packsRoot(env?: NodeJS.ProcessEnv, home?: string): string;
|
|
3
|
-
export declare function pluginsDir(root: string): string;
|
|
4
|
-
export declare function pluginDir(root: string, slug: string): string;
|
|
5
|
-
/** Codex, Copilot and Cursor read a "portable" copy of each plugin: agent
|
|
6
|
-
* `model:` levels (opus/sonnet/haiku) are Claude Code aliases, so those tools
|
|
7
|
-
* get the line removed and use their own default. Same marketplace name, its
|
|
8
|
-
* own root. */
|
|
9
|
-
export declare function portableRoot(root: string): string;
|
|
10
|
-
export declare function marketplacePath(root: string): string;
|
|
11
|
-
export declare function registryPath(root: string): string;
|
|
12
|
-
export declare function shimPath(root: string): string;
|
|
13
|
-
/** Stamp of the last background `pack install --quiet` spawn. */
|
|
14
|
-
export declare function lastSyncPath(root: string): string;
|
|
15
|
-
/** Cached `pack status`, written by every sync/status run, read by the nag. */
|
|
16
|
-
export declare function statusCachePath(root: string): string;
|
|
17
|
-
export declare function lastNagPath(root: string): string;
|
package/dist/packs/shim.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export interface ShimPack {
|
|
2
|
-
slug: string;
|
|
3
|
-
root: string;
|
|
4
|
-
hooks: Record<string, unknown>;
|
|
5
|
-
}
|
|
6
|
-
export declare const SHIM_EVENTS: readonly ["SessionStart", "PreToolUse", "PostToolUse", "Stop"];
|
|
7
|
-
interface ShimHandler {
|
|
8
|
-
command: string;
|
|
9
|
-
timeout?: number;
|
|
10
|
-
}
|
|
11
|
-
interface ShimGroup {
|
|
12
|
-
matcher?: string;
|
|
13
|
-
hooks: ShimHandler[];
|
|
14
|
-
}
|
|
15
|
-
/** Per pack, the hook events in its hooks.json the shim cannot wire. */
|
|
16
|
-
export declare function unsupportedShimEvents(packs: ShimPack[]): Map<string, string[]>;
|
|
17
|
-
export declare function shimPacks(packs: ShimPack[]): Array<{
|
|
18
|
-
slug: string;
|
|
19
|
-
root: string;
|
|
20
|
-
hooks: Record<string, ShimGroup[]>;
|
|
21
|
-
}>;
|
|
22
|
-
export declare function generateShimSource(packs: ShimPack[]): string;
|
|
23
|
-
/** Write (or remove, when no pack has wireable hooks) the shim. Returns the
|
|
24
|
-
* path when a shim exists afterwards. */
|
|
25
|
-
export declare function writeShim(file: string, packs: ShimPack[]): string | null;
|
|
26
|
-
export {};
|
package/dist/packs/store.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { PackManifest } from "./manifest";
|
|
2
|
-
export interface RegistryEntry {
|
|
3
|
-
version: number;
|
|
4
|
-
contentHash: string;
|
|
5
|
-
dir: string;
|
|
6
|
-
installedAt: number;
|
|
7
|
-
harnesses: string[];
|
|
8
|
-
name?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
channel?: string;
|
|
11
|
-
icon?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface Registry {
|
|
14
|
-
packs: Record<string, RegistryEntry>;
|
|
15
|
-
}
|
|
16
|
-
export declare function pluginVersion(version: number): string;
|
|
17
|
-
/** Write a file via temp + rename so readers never see a partial file. */
|
|
18
|
-
export declare function writeFileAtomic(file: string, content: string, mode?: number): void;
|
|
19
|
-
export declare const AGENT_LEVELS: Set<string>;
|
|
20
|
-
/** Agent file for tools other than Claude Code: drop a `model:` line unless it
|
|
21
|
-
* is a full `provider/model` id (levels and `inherit` are Claude aliases). */
|
|
22
|
-
export declare function portableAgentContent(content: string): string;
|
|
23
|
-
/** The full file set for a pack's plugin dir, relative path → content. */
|
|
24
|
-
export declare function pluginFiles(manifest: PackManifest, options?: {
|
|
25
|
-
portable?: boolean;
|
|
26
|
-
}): Record<string, string>;
|
|
27
|
-
/** Build the plugin dir in a sibling temp dir and swap it into place, so a
|
|
28
|
-
* failed write never leaves a half-updated plugin and stale files (a removed
|
|
29
|
-
* skill, hooks that were cleared) never linger. */
|
|
30
|
-
export declare function writePluginDir(root: string, manifest: PackManifest, options?: {
|
|
31
|
-
portable?: boolean;
|
|
32
|
-
}): string;
|
|
33
|
-
export declare function readRegistry(root: string): Registry;
|
|
34
|
-
export declare function writeRegistry(root: string, registry: Registry): void;
|
|
35
|
-
export interface MarketplaceEntry {
|
|
36
|
-
slug: string;
|
|
37
|
-
description?: string;
|
|
38
|
-
version: number;
|
|
39
|
-
}
|
|
40
|
-
export declare function marketplaceDocument(entries: MarketplaceEntry[]): Record<string, unknown>;
|
|
41
|
-
/** Rewrite marketplace.json atomically with one entry per pack. */
|
|
42
|
-
export declare function writeMarketplace(root: string, entries: MarketplaceEntry[]): void;
|
package/dist/packs/sync.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { spawn as nodeSpawn } from "child_process";
|
|
2
|
-
export declare const SYNC_INTERVAL_MS: number;
|
|
3
|
-
/** CI mode: a pack-scoped CI key (`cdvci_…`) or CI=true. No auto-sync, no
|
|
4
|
-
* nudge, no server writes, no pruning — CI machines are ephemeral and CI keys
|
|
5
|
-
* can only read packs. */
|
|
6
|
-
export declare function isPackCiMode(env?: NodeJS.ProcessEnv): boolean;
|
|
7
|
-
export declare const NAG_INTERVAL_MS: number;
|
|
8
|
-
export declare const EMPTY_RECHECK_MS: number;
|
|
9
|
-
export interface StatusCache {
|
|
10
|
-
checkedAt: number;
|
|
11
|
-
available: number;
|
|
12
|
-
outdated: Array<{
|
|
13
|
-
slug: string;
|
|
14
|
-
name?: string;
|
|
15
|
-
}>;
|
|
16
|
-
}
|
|
17
|
-
export declare function readStatusCache(root: string): StatusCache | null;
|
|
18
|
-
export declare function writeStatusCache(root: string, cache: StatusCache): void;
|
|
19
|
-
export declare function autosyncDisabled(env: NodeJS.ProcessEnv): boolean;
|
|
20
|
-
export type SyncDecision = "spawn-install" | "spawn-check" | "throttled" | "no-packs";
|
|
21
|
-
/** Pure decision for the hourly background sync. */
|
|
22
|
-
export declare function decideSync(root: string, env: NodeJS.ProcessEnv, now: number): SyncDecision;
|
|
23
|
-
export declare function cliEntry(): string;
|
|
24
|
-
export interface SpawnSyncOptions {
|
|
25
|
-
env?: NodeJS.ProcessEnv;
|
|
26
|
-
home?: string;
|
|
27
|
-
now?: number;
|
|
28
|
-
spawn?: typeof nodeSpawn;
|
|
29
|
-
cli?: string;
|
|
30
|
-
connected?: boolean;
|
|
31
|
-
}
|
|
32
|
-
/** Called from session-start hooks. Never throws, never waits. */
|
|
33
|
-
export declare function maybeSpawnPackSync(options?: SpawnSyncOptions): SyncDecision | "error" | "not-connected" | "ci";
|
|
34
|
-
/** One-line nudge when the cached status shows an outdated pack, at most once
|
|
35
|
-
* a day. Returns null (and records nothing) when there's nothing to say. */
|
|
36
|
-
export declare function packNagLine(options?: {
|
|
37
|
-
env?: NodeJS.ProcessEnv;
|
|
38
|
-
home?: string;
|
|
39
|
-
now?: number;
|
|
40
|
-
}): string | null;
|
package/dist/piHooks.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/** customType of the context message the Codiedev extension injects. */
|
|
2
|
-
export declare const PI_CONTEXT_CUSTOM_TYPE = "codiedev";
|
|
3
|
-
/**
|
|
4
|
-
* pi session JSONL → Claude Code-shaped JSONL.
|
|
5
|
-
*
|
|
6
|
-
* Every message entry is kept in file order, abandoned /tree branches
|
|
7
|
-
* included: they were real model calls and real tokens. Usage is pi's own
|
|
8
|
-
* per-call record (`input` is already the uncached part). Skill runs, user
|
|
9
|
-
* interrupts and provider errors become the records the shared parsers read:
|
|
10
|
-
* `pi.skill_invoked`, Claude's interrupt marker and a native `agent.error`.
|
|
11
|
-
*/
|
|
12
|
-
export declare function normalizePiTranscript(content: string): string;
|
|
13
|
-
/** pi writes the session header at startup; no message yet means nothing to capture. */
|
|
14
|
-
export declare function isPiTranscriptEmpty(content: string): boolean;
|
|
15
|
-
/** How pi was launched, from its own argv (the extension runs in pi's process). */
|
|
16
|
-
export declare function piLaunchFromArgv(argv: string[]): string;
|
|
17
|
-
export declare function piExtensionPath(agentDir?: string): string;
|
|
18
|
-
/** What `doctor` and the security install check report for pi. */
|
|
19
|
-
export declare function inspectPiExtension(file?: string, security?: boolean): {
|
|
20
|
-
status: "pass" | "fail" | "not-installed";
|
|
21
|
-
detail: string;
|
|
22
|
-
};
|
package/dist/piRuntime.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare const PI_PACKAGE = "@mariozechner/pi-coding-agent";
|
|
2
|
-
export declare const PI_VERSION = "0.73.1";
|
|
3
|
-
export declare const PI_RUNTIME_SPEC = "@mariozechner/pi-coding-agent@0.73.1";
|
|
4
|
-
export declare function piRuntimeDir(stateDir: string): string;
|
|
5
|
-
/** The installed pi's CLI entry, when it is the pinned version. */
|
|
6
|
-
export declare function installedPiEntry(installDir: string, readFile?: (file: string) => string): string | null;
|
|
7
|
-
export interface PiRuntimeDeps {
|
|
8
|
-
stateDir: string;
|
|
9
|
-
exists?: (file: string) => boolean;
|
|
10
|
-
readFile?: (file: string) => string;
|
|
11
|
-
makeStagingDir?: () => string;
|
|
12
|
-
run?: (args: string[]) => {
|
|
13
|
-
status: number | null;
|
|
14
|
-
stderr: string;
|
|
15
|
-
};
|
|
16
|
-
rename?: (from: string, to: string) => void;
|
|
17
|
-
remove?: (target: string) => void;
|
|
18
|
-
log?: (message: string) => void;
|
|
19
|
-
sleep?: (ms: number) => void;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* The pi CLI entry to run, installing the pinned version first if it is
|
|
23
|
-
* missing or a different version. Staged then renamed, so an interrupted
|
|
24
|
-
* download never leaves a half-installed pi that looks ready.
|
|
25
|
-
*/
|
|
26
|
-
export declare function ensurePiRuntime(deps: PiRuntimeDeps): string;
|
package/dist/repoResolver.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export type ResolveSource = "provided" | "resolved" | "unmatched";
|
|
2
|
-
export interface RepoLite {
|
|
3
|
-
_id: string;
|
|
4
|
-
owner: string;
|
|
5
|
-
name: string;
|
|
6
|
-
gitProvider?: "github" | "gitlab";
|
|
7
|
-
}
|
|
8
|
-
export interface ResolveInput {
|
|
9
|
-
remoteUrl: string | null | undefined;
|
|
10
|
-
providedRepoId: string | null;
|
|
11
|
-
companyRepos: ReadonlyArray<RepoLite>;
|
|
12
|
-
}
|
|
13
|
-
export interface ResolveResult {
|
|
14
|
-
repoId: string | null;
|
|
15
|
-
source: ResolveSource;
|
|
16
|
-
}
|
|
17
|
-
export declare function resolveRepoForCapture(input: ResolveInput): ResolveResult;
|
package/dist/secret.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function maskToken(token: string | null | undefined): string;
|
package/dist/selfUpdate.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
export type SelfUpdatePlan = {
|
|
2
|
-
kind: "npm";
|
|
3
|
-
prefix: string;
|
|
4
|
-
} | {
|
|
5
|
-
kind: "pnpm";
|
|
6
|
-
} | {
|
|
7
|
-
kind: "bun";
|
|
8
|
-
} | {
|
|
9
|
-
kind: "skip";
|
|
10
|
-
reason: string;
|
|
11
|
-
};
|
|
12
|
-
export interface PlanDeps {
|
|
13
|
-
hookScriptReal: string;
|
|
14
|
-
env: NodeJS.ProcessEnv;
|
|
15
|
-
platform: NodeJS.Platform;
|
|
16
|
-
isContainer: boolean;
|
|
17
|
-
isWritable: (dir: string) => boolean;
|
|
18
|
-
viaLauncher?: boolean;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Decide which package manager owns this install, from where hook.js really
|
|
22
|
-
* lives. We only ever upgrade the install we are running from: running
|
|
23
|
-
* whatever `npm` is first on PATH would, under nvm/Homebrew mixes, upgrade a
|
|
24
|
-
* different global tree than the one the harness config points at.
|
|
25
|
-
*/
|
|
26
|
-
export declare function planSelfUpdate(deps: PlanDeps): SelfUpdatePlan;
|
|
27
|
-
export interface SelfUpdateState {
|
|
28
|
-
lastAttemptAt: number;
|
|
29
|
-
lastResult?: string;
|
|
30
|
-
fromVersion?: string;
|
|
31
|
-
toVersion?: string;
|
|
32
|
-
}
|
|
33
|
-
export declare function isSelfUpdateDue(state: SelfUpdateState | null, nowMs: number): boolean;
|
|
34
|
-
export declare function readSelfUpdateState(): SelfUpdateState | null;
|
|
35
|
-
/**
|
|
36
|
-
* Called on every hook invocation, so the not-due path is one small file read.
|
|
37
|
-
* Stamps the attempt before spawning so a burst of parallel hooks spawns one
|
|
38
|
-
* child, not one each; the child's lock covers whatever still slips through.
|
|
39
|
-
*/
|
|
40
|
-
export declare function maybeSpawnSelfUpdate(hookEntry: string | undefined): void;
|
|
41
|
-
/**
|
|
42
|
-
* First hook call on a new CLI version (self-updated or installed by hand)
|
|
43
|
-
* re-renders the codiedev block in the harness instruction files, so they
|
|
44
|
-
* stop listing commands this version no longer has. The steady-state cost is
|
|
45
|
-
* one small file read. Honors the same opt-outs as the self-update.
|
|
46
|
-
*/
|
|
47
|
-
export declare function maybeRefreshInstructions(refresh?: () => string[]): void;
|
|
48
|
-
export declare const BIN_NAMES: readonly ["codiedev", "codiedev-hook", "codie"];
|
|
49
|
-
/**
|
|
50
|
-
* The .ps1 shims missing from a Windows npm prefix. The IT kit deletes them so
|
|
51
|
-
* PowerShell falls back to the .cmd shims, which run under the Restricted
|
|
52
|
-
* execution policy Windows client machines default to; `npm i -g` puts them
|
|
53
|
-
* back, so an update must delete again exactly the ones that were gone.
|
|
54
|
-
*/
|
|
55
|
-
export declare function missingPs1Shims(prefix: string, exists?: (p: string) => boolean): string[];
|
|
56
|
-
/**
|
|
57
|
-
* Where the just-installed copy lives. npm/bun reinstall in place. pnpm's
|
|
58
|
-
* `root -g` is <root>/node_modules up to v10 but the bare global/v11 parent
|
|
59
|
-
* from v11 on, with each install in a hashed child — so check both shapes and
|
|
60
|
-
* take the copy that is actually at the version we just installed.
|
|
61
|
-
*/
|
|
62
|
-
export declare function findInstalledHookScript(plan: SelfUpdatePlan, hookEntry: string, version: string, pnpmRoot?: () => string | null): string | null;
|
|
63
|
-
/** Body of the detached `codiedev-hook self-update` child. Never throws. */
|
|
64
|
-
export declare function runSelfUpdate(hookEntry: string): Promise<SelfUpdateState>;
|
package/dist/skillMarker.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/** Is this a SKILL.md-style file (frontmatter with name + description)? */
|
|
2
|
-
export declare function looksLikeSkill(markdown: string): boolean;
|
|
3
|
-
/** Remove every marker line (idempotent). */
|
|
4
|
-
export declare function stripSkillMarker(markdown: string): string;
|
|
5
|
-
/** Stamp (or re-stamp) the marker. Leaves the text alone for a bad id. */
|
|
6
|
-
export declare function stampSkillMarker(markdown: string, artifactId: string | undefined | null): string;
|
package/dist/subagents.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { type CaptureSignals } from "./captureSignals";
|
|
2
|
-
import { type TranscriptModelUsage } from "./transcriptModels";
|
|
3
|
-
/**
|
|
4
|
-
* Claude Code writes each subagent's transcript next to its parent's:
|
|
5
|
-
*
|
|
6
|
-
* ~/.claude/projects/<project>/<sessionId>.jsonl (parent)
|
|
7
|
-
* ~/.claude/projects/<project>/<sessionId>/subagents/agent-*.jsonl
|
|
8
|
-
*
|
|
9
|
-
* Lines there carry `isSidechain: true` and the parent's sessionId. They are
|
|
10
|
-
* part of the parent session's work, not sessions of their own: their skill
|
|
11
|
-
* runs, tool calls and token usage fold into the parent's signals and usage,
|
|
12
|
-
* and they are never uploaded separately. Other harnesses (Codex, Codie,
|
|
13
|
-
* Cursor) keep sub-agents inside the one transcript or don't have them, so
|
|
14
|
-
* this is Claude Code only.
|
|
15
|
-
*/
|
|
16
|
-
export declare const SUBAGENT_LIMITS: {
|
|
17
|
-
files: number;
|
|
18
|
-
bytes: number;
|
|
19
|
-
};
|
|
20
|
-
export declare function subagentDir(transcriptPath: string, sessionId?: string): string;
|
|
21
|
-
export type SubagentTranscripts = {
|
|
22
|
-
contents: string[];
|
|
23
|
-
count: number;
|
|
24
|
-
truncated: boolean;
|
|
25
|
-
};
|
|
26
|
-
/** Read the session's subagent transcripts in full, up to 20 files / 20 MB
|
|
27
|
-
* in total (oldest first); anything past that is counted as truncated. */
|
|
28
|
-
export declare function readSubagentTranscripts(transcriptPath: string, sessionId?: string, limits?: {
|
|
29
|
-
files: number;
|
|
30
|
-
bytes: number;
|
|
31
|
-
}): SubagentTranscripts;
|
|
32
|
-
/** Parent signals plus every subagent's skill runs, pulls and tool calls.
|
|
33
|
-
* Launch values, timing and record counts stay the parent's own. */
|
|
34
|
-
export declare function foldSubagentSignals(parent: CaptureSignals, subs: SubagentTranscripts, source?: string): CaptureSignals;
|
|
35
|
-
/** Parent model usage plus each subagent's, summed per model. */
|
|
36
|
-
export declare function foldSubagentModelUsage(parent: TranscriptModelUsage[], subs: SubagentTranscripts, source?: string): TranscriptModelUsage[];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/** Session-start context uses each client's supported output contract. */
|
|
2
|
-
export declare const TEAM_SKILL_CONTEXT = "This machine is connected to Codiedev, the team's artifact and skill library.\nBefore a substantial coding task, run codiedev search \"<brief task description>\" and reuse a relevant team skill by running codiedev pull <exact-key> and following its instructions. If no skill fits, continue the task.\nUse codiedev push <file.md> to share an artifact when asked, codiedev ask \"<question>\" for team knowledge, and codiedev inbox to check messages. Use codiedev --help for other commands. If codiedev is unavailable, use npx codiedev@latest.";
|
|
3
|
-
export declare function teamSkillSessionOutput(source: "cursor" | "copilot", context?: string): {
|
|
4
|
-
additional_context: string;
|
|
5
|
-
additionalContext?: undefined;
|
|
6
|
-
} | {
|
|
7
|
-
additionalContext: string;
|
|
8
|
-
additional_context?: undefined;
|
|
9
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/** Compact per-model usage, derived from captured transcript records. */
|
|
2
|
-
export type TranscriptModelUsage = {
|
|
3
|
-
model: string;
|
|
4
|
-
/** False for Copilot model/request hints before token totals arrive. */
|
|
5
|
-
tokensAvailable?: boolean;
|
|
6
|
-
/** Assistant message IDs; nonzero cumulative usage events for Codex. */
|
|
7
|
-
requests: number;
|
|
8
|
-
inputTokens: number;
|
|
9
|
-
outputTokens: number;
|
|
10
|
-
cacheReadTokens: number;
|
|
11
|
-
cacheCreationTokens: number;
|
|
12
|
-
costUsd?: number;
|
|
13
|
-
/** Reported provider figure, retained separately from trusted billing inputs. */
|
|
14
|
-
reportedCostUsd?: number;
|
|
15
|
-
/** Reported reasoning is included in outputTokens, never added again. */
|
|
16
|
-
reasoningTokens?: number;
|
|
17
|
-
};
|
|
18
|
-
export declare function transcriptRecords(content: string, source?: string): Generator<unknown>;
|
|
19
|
-
export declare function parseTranscriptModels(content: string, source?: string): TranscriptModelUsage[];
|
|
20
|
-
export declare function totalModelTokens(row: Omit<TranscriptModelUsage, "model" | "requests">): number;
|
package/dist/upgradeNudge.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fail-silent — never throws, never blocks on network. If the registry is
|
|
3
|
-
* unreachable or the cache is corrupt, the warning just doesn't print. The
|
|
4
|
-
* worst outcome is "user keeps running an old version" — same as before
|
|
5
|
-
* this feature existed.
|
|
6
|
-
*/
|
|
7
|
-
export declare function maybePrintUpgradeNudge(): Promise<void>;
|
|
8
|
-
export interface OfferOpts {
|
|
9
|
-
env?: NodeJS.ProcessEnv;
|
|
10
|
-
argv?: string[];
|
|
11
|
-
nowMs?: number;
|
|
12
|
-
fetchImpl?: typeof fetch;
|
|
13
|
-
log?: (line: string) => void;
|
|
14
|
-
isTty?: boolean;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Prompt-capable sibling of maybePrintUpgradeNudge. Call this before handing
|
|
18
|
-
* the terminal to a TUI. A successful upgrade relaunches the fresh CLI and
|
|
19
|
-
* tells the stale caller to stop rather than continuing with old modules.
|
|
20
|
-
*/
|
|
21
|
-
export declare function maybeOfferUpgrade(opts?: OfferOpts): Promise<{
|
|
22
|
-
relaunched: boolean;
|
|
23
|
-
status?: number;
|
|
24
|
-
}>;
|