codiedev 0.10.0-beta.4 → 0.10.0-beta.5
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 +7 -1
- package/assets/tui-brand-plugin.tsx +14 -2
- 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 +66 -3
- package/dist/cli.js +41 -18
- package/dist/codexHookTrust.js +61 -5
- package/dist/codexLimitScan.js +2 -109
- package/dist/codie.js +27 -40
- package/dist/codieBrandInstall.js +0 -18
- package/dist/codieLauncher.js +2 -70
- package/dist/codieRuntime.js +19 -23
- package/dist/codieRuntimeInstall.js +108 -23
- package/dist/codieStartup.js +0 -3
- package/dist/codieUsage.js +38 -41
- 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 +41 -82
- 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/react.js +0 -2
- package/dist/commands/reverseTicket.js +0 -33
- 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 +280 -0
- package/dist/configDir.js +0 -10
- package/dist/connect.js +21 -77
- package/dist/connectFlow.js +0 -9
- package/dist/copilotHooks.js +395 -0
- package/dist/copilotInstallation.js +64 -0
- package/dist/cursorHooks.js +40 -17
- package/dist/cursorLifecycle.js +109 -0
- package/dist/detection.js +0 -30
- package/dist/harnessDirs.js +73 -0
- package/dist/hook.js +193 -316
- package/dist/inboxFormat.js +0 -24
- package/dist/launchContext.js +150 -0
- package/dist/launcher.js +140 -0
- package/dist/limitEvent.js +41 -35
- package/dist/limitEventReporter.js +1 -1
- package/dist/mcp.js +3 -77
- package/dist/nativeSteering.js +24 -0
- package/dist/packs/codie.js +182 -0
- package/dist/packs/harnesses.js +374 -0
- package/dist/packs/hookGate.js +256 -0
- package/dist/packs/install.js +285 -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/prUrl.js +0 -5
- package/dist/repoResolver.js +0 -19
- package/dist/secret.js +0 -3
- package/dist/security.js +0 -20
- package/dist/securityDeepScan.js +1 -14
- package/dist/securityDoctor.js +0 -2
- package/dist/securityFeature.js +0 -1
- package/dist/securityInstall.js +6 -13
- package/dist/securityInventory.js +23 -13
- package/dist/securityPilot.js +0 -2
- package/dist/securityPolicy.js +0 -7
- package/dist/selfUpdate.js +331 -0
- package/dist/skillMarker.js +23 -0
- package/dist/subagents.js +135 -0
- package/dist/teamSkillContext.js +10 -0
- package/dist/transcriptModels.js +6 -8
- package/dist/upgradeNudge.js +0 -30
- package/dist/utils.js +286 -733
- package/dist/version.js +0 -10
- package/dist/versionCheck.js +0 -33
- package/package.json +7 -6
- 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 -19
- package/dist/cli.d.ts +0 -16
- package/dist/codexHookTrust.d.ts +0 -34
- 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 -86
- package/dist/codieRuntime.d.ts +0 -29
- package/dist/codieRuntimeInstall.d.ts +0 -28
- package/dist/codieStartup.d.ts +0 -26
- package/dist/codieUsage.d.ts +0 -57
- 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/pull.d.ts +0 -2
- package/dist/commands/push.d.ts +0 -33
- package/dist/commands/react.d.ts +0 -2
- package/dist/commands/reverseTicket.d.ts +0 -2
- package/dist/commands/search.d.ts +0 -2
- package/dist/commands/security.d.ts +0 -1
- 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/repoResolver.d.ts +0 -17
- package/dist/secret.d.ts +0 -1
- package/dist/security.d.ts +0 -102
- package/dist/securityDeepScan.d.ts +0 -41
- package/dist/securityDoctor.d.ts +0 -32
- package/dist/securityFeature.d.ts +0 -5
- package/dist/securityInstall.d.ts +0 -63
- package/dist/securityInventory.d.ts +0 -54
- package/dist/securityPilot.d.ts +0 -19
- package/dist/securityPolicy.d.ts +0 -33
- package/dist/securitySession.d.ts +0 -6
- package/dist/transcriptModels.d.ts +0 -18
- package/dist/upgradeNudge.d.ts +0 -25
- package/dist/utils.d.ts +0 -346
- package/dist/version.d.ts +0 -1
- package/dist/versionCheck.d.ts +0 -68
package/dist/codieUsage.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export interface CodieUsageBudget {
|
|
2
|
-
companyBudgetUsd: number | null;
|
|
3
|
-
companySpentUsd: number;
|
|
4
|
-
companyHeldUsd: number;
|
|
5
|
-
userBudgetUsd: number | null;
|
|
6
|
-
userSpentUsd: number;
|
|
7
|
-
userHeldUsd: number;
|
|
8
|
-
keyBudgetUsd: number | null;
|
|
9
|
-
keySpentUsd: number;
|
|
10
|
-
keyHeldUsd: number | null;
|
|
11
|
-
}
|
|
12
|
-
export interface CodieUsageInFlight {
|
|
13
|
-
/** Reservations open inside the gateway's hold TTL: real work running now. */
|
|
14
|
-
requests: number;
|
|
15
|
-
heldUsd: number;
|
|
16
|
-
/** Reservations past the TTL, waiting for the sweep. They hold budget
|
|
17
|
-
* without doing work, so they are never counted as live work. */
|
|
18
|
-
staleRequests: number;
|
|
19
|
-
staleHeldUsd: number;
|
|
20
|
-
}
|
|
21
|
-
export interface CodieUsage {
|
|
22
|
-
enabled: boolean;
|
|
23
|
-
user: {
|
|
24
|
-
name: string;
|
|
25
|
-
email: string;
|
|
26
|
-
role: string;
|
|
27
|
-
} | null;
|
|
28
|
-
budget: CodieUsageBudget;
|
|
29
|
-
inFlight: CodieUsageInFlight;
|
|
30
|
-
since?: {
|
|
31
|
-
costUsd: number;
|
|
32
|
-
promptTokens: number;
|
|
33
|
-
completionTokens: number;
|
|
34
|
-
requests: number;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* One line: who is spending, how much, against what, and what is running.
|
|
39
|
-
* Returns "" when there is nothing honest to say.
|
|
40
|
-
*/
|
|
41
|
-
export declare function formatUsageLine(usage: CodieUsage | null | undefined): string;
|
|
42
|
-
/**
|
|
43
|
-
* What this session just cost. Returns "" when the session billed nothing,
|
|
44
|
-
* because a developer who spent nothing does not need to be told a number.
|
|
45
|
-
*/
|
|
46
|
-
export declare function formatSessionCostLine(usage: CodieUsage | null | undefined): string;
|
|
47
|
-
/**
|
|
48
|
-
* Read the developer's budget snapshot. Returns null on any refusal, network
|
|
49
|
-
* failure, timeout, or malformed answer — a status poll is never worth an
|
|
50
|
-
* error in front of a developer who asked for none.
|
|
51
|
-
*/
|
|
52
|
-
export declare function fetchCodieUsage({ baseUrl, key, sinceMs, fetchImpl, }: {
|
|
53
|
-
baseUrl?: string;
|
|
54
|
-
key: string;
|
|
55
|
-
sinceMs?: number;
|
|
56
|
-
fetchImpl?: typeof fetch;
|
|
57
|
-
}): Promise<CodieUsage | null>;
|
package/dist/commands/ask.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function runAsk(args: string[]): Promise<void>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type CodiedevConfig } from "../utils";
|
|
2
|
-
import { apiRequest } from "./shared";
|
|
3
|
-
export interface CaptureCommandDeps {
|
|
4
|
-
readConfig: () => CodiedevConfig | null;
|
|
5
|
-
writeConfig: (config: CodiedevConfig) => void;
|
|
6
|
-
apiRequest: typeof apiRequest;
|
|
7
|
-
log: (line: string) => void;
|
|
8
|
-
warn: (line: string) => void;
|
|
9
|
-
randomUUID: () => string;
|
|
10
|
-
hostname: () => string;
|
|
11
|
-
normalizePath: (value: string) => string;
|
|
12
|
-
configForRequest: (config: CodiedevConfig) => CodiedevConfig;
|
|
13
|
-
}
|
|
14
|
-
export declare function runCaptureCommand(args: string[], depsOverride?: Partial<CaptureCommandDeps>): Promise<void>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { CodiedevConfig } from "../utils";
|
|
2
|
-
export declare function substitutePrompt(protocol: string, prompt: string | undefined): string;
|
|
3
|
-
interface ConnectedRepo {
|
|
4
|
-
repoId: string;
|
|
5
|
-
fullName: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function validatePlanHasRepo(parsedPlan: any): string | null;
|
|
8
|
-
export declare function resolveRepoIds(fullNames: string[], repos: ConnectedRepo[]): string[];
|
|
9
|
-
export interface CreateTicketArgs {
|
|
10
|
-
mode: "bare" | "submit";
|
|
11
|
-
prompt?: string;
|
|
12
|
-
submitSource?: "stdin" | string;
|
|
13
|
-
}
|
|
14
|
-
export declare function parseCreateTicketArgs(args: string[]): CreateTicketArgs;
|
|
15
|
-
export declare function runCreateTicket(args: string[]): Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Bare-mode entrypoint. Fetches the protocol body from the backend so we can
|
|
18
|
-
* iterate on it without shipping a new CLI, substitutes the user's prompt,
|
|
19
|
-
* and writes the result to stdout for the agent to follow. Hard-errors on
|
|
20
|
-
* fetch failure rather than falling back to a stale local copy — the whole
|
|
21
|
-
* point of moving the protocol server-side is that the freshest version is
|
|
22
|
-
* the only version.
|
|
23
|
-
*/
|
|
24
|
-
export declare function runBare(config: CodiedevConfig, prompt: string | undefined): Promise<void>;
|
|
25
|
-
export declare function runSubmit(config: CodiedevConfig, rawJson: string): Promise<void>;
|
|
26
|
-
export declare function readSubmitInput(source: "stdin" | string): string;
|
|
27
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function runDelete(args: string[]): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function runDoctor(_args: string[]): Promise<void>;
|
package/dist/commands/inbox.d.ts
DELETED
package/dist/commands/note.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function runNote(args: string[]): Promise<void>;
|
package/dist/commands/ping.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function runPing(args: string[]): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function runPromote(args: string[]): Promise<void>;
|
package/dist/commands/pull.d.ts
DELETED
package/dist/commands/push.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { requireConfig } from "./shared";
|
|
2
|
-
interface PushResponse {
|
|
3
|
-
ok: boolean;
|
|
4
|
-
artifactId: string;
|
|
5
|
-
key: string;
|
|
6
|
-
version: number;
|
|
7
|
-
type: string;
|
|
8
|
-
kind: "doc" | "skill";
|
|
9
|
-
tags: string[];
|
|
10
|
-
destination: string;
|
|
11
|
-
}
|
|
12
|
-
export interface ParsedArgs {
|
|
13
|
-
file: string;
|
|
14
|
-
type?: string;
|
|
15
|
-
kind?: string;
|
|
16
|
-
tags: string[];
|
|
17
|
-
force: boolean;
|
|
18
|
-
as?: string;
|
|
19
|
-
private?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare function parseArgs(args: string[]): ParsedArgs;
|
|
22
|
-
export declare function pushFile(config: ReturnType<typeof requireConfig>, opts: {
|
|
23
|
-
absPath: string;
|
|
24
|
-
key: string;
|
|
25
|
-
visibility?: "private" | "team";
|
|
26
|
-
contentHash?: string;
|
|
27
|
-
type?: string;
|
|
28
|
-
kind?: string;
|
|
29
|
-
tags?: string[];
|
|
30
|
-
force?: boolean;
|
|
31
|
-
}): Promise<PushResponse>;
|
|
32
|
-
export declare function runPush(args: string[]): Promise<void>;
|
|
33
|
-
export {};
|
package/dist/commands/react.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function runSecurityCommand(args: string[]): Promise<void>;
|
package/dist/commands/send.d.ts
DELETED
package/dist/commands/share.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { CodiedevConfig } from "../utils";
|
|
2
|
-
/**
|
|
3
|
-
* Layer per-command env overrides on top of the on-disk config. Useful for
|
|
4
|
-
* ad-hoc testing — point a prod-connected CLI at a dev Convex deployment
|
|
5
|
-
* without re-running `codiedev connect`. Both CODIEDEV_URL and CODIEDEV_TOKEN
|
|
6
|
-
* must be set together (half-overrides would mismatch URL and auth realm).
|
|
7
|
-
* Other fields (companyId, repos[]) come from the file unchanged.
|
|
8
|
-
*/
|
|
9
|
-
export declare function applyConfigEnvOverrides(config: CodiedevConfig): CodiedevConfig;
|
|
10
|
-
/**
|
|
11
|
-
* Require a connected Codiedev config. Exits the process with a helpful
|
|
12
|
-
* message if the user hasn't run `codiedev connect` yet.
|
|
13
|
-
*/
|
|
14
|
-
export declare function requireConfig(): CodiedevConfig;
|
|
15
|
-
/**
|
|
16
|
-
* Perform an authenticated HTTP request against the Codiedev backend.
|
|
17
|
-
* Returns the parsed JSON response body. Throws on non-2xx.
|
|
18
|
-
*/
|
|
19
|
-
export declare function apiRequest<T = unknown>(method: "GET" | "POST", path: string, options: {
|
|
20
|
-
config: CodiedevConfig;
|
|
21
|
-
body?: Record<string, unknown>;
|
|
22
|
-
query?: Record<string, string | number | undefined>;
|
|
23
|
-
}): Promise<T>;
|
|
24
|
-
/**
|
|
25
|
-
* Fire-and-forget per-invocation telemetry from CLI subcommands. Mirrors
|
|
26
|
-
* the MCP server's emitTelemetry but stamps `source: "cli"` so adoption
|
|
27
|
-
* dashboards can distinguish between the two surfaces. Never blocks the
|
|
28
|
-
* user's command, never throws — telemetry must not change behavior.
|
|
29
|
-
*/
|
|
30
|
-
export declare function recordAgentEvent(config: CodiedevConfig, event: {
|
|
31
|
-
tool: string;
|
|
32
|
-
ok: boolean;
|
|
33
|
-
latencyMs: number;
|
|
34
|
-
error?: string;
|
|
35
|
-
}): void;
|
|
36
|
-
/**
|
|
37
|
-
* Per-step install telemetry for `npx codiedev connect`. One row per phase
|
|
38
|
-
* (started, detect, install_target, validate_token, completed, failed) so
|
|
39
|
-
* the admin company page can show a timeline when a customer says "it says
|
|
40
|
-
* connected but it doesn't work." Fire-and-forget, never throws. Auto-stamps
|
|
41
|
-
* platform + node + cli version so call sites only need step/target/ok/error.
|
|
42
|
-
*/
|
|
43
|
-
export type InstallTelemetryStep = "started" | "detect" | "install_target" | "validate_token" | "completed" | "failed";
|
|
44
|
-
export declare function recordInstallEvent(config: CodiedevConfig, event: {
|
|
45
|
-
step: InstallTelemetryStep;
|
|
46
|
-
target?: string;
|
|
47
|
-
ok: boolean;
|
|
48
|
-
error?: string;
|
|
49
|
-
}): void;
|
|
50
|
-
/**
|
|
51
|
-
* Wraps a CLI subcommand body so success and failure both record telemetry
|
|
52
|
-
* and the original error propagates after the event is queued. Use this in
|
|
53
|
-
* each `runXxx` command instead of inline timing + try/catch boilerplate.
|
|
54
|
-
*/
|
|
55
|
-
export declare function withTelemetry<T>(config: CodiedevConfig, tool: string, fn: () => Promise<T>): Promise<T>;
|
|
56
|
-
/**
|
|
57
|
-
* Relative-time formatter for inbox / listing output.
|
|
58
|
-
*/
|
|
59
|
-
export declare function timeAgo(ts: number): string;
|
|
60
|
-
/**
|
|
61
|
-
* Strip surrounding quotes from a CLI argument if the user wrapped it.
|
|
62
|
-
* `codiedev ping <name> "hey"` on some shells passes the quotes through.
|
|
63
|
-
*/
|
|
64
|
-
export declare function stripQuotes(s: string): string;
|
package/dist/configDir.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function codiedevStateDir(): string;
|
package/dist/connect.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function runConnect(args?: string[]): Promise<void>;
|
package/dist/connectFlow.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { CodiedevConfig } from "./utils";
|
|
2
|
-
export type ConnectTokenSource = "reused" | "prompt-required";
|
|
3
|
-
export interface ConnectTokenInput {
|
|
4
|
-
savedConfig: CodiedevConfig | null;
|
|
5
|
-
force: boolean;
|
|
6
|
-
}
|
|
7
|
-
export type ConnectTokenResult = {
|
|
8
|
-
source: "reused";
|
|
9
|
-
token: string;
|
|
10
|
-
} | {
|
|
11
|
-
source: "prompt-required";
|
|
12
|
-
};
|
|
13
|
-
export declare function resolveConnectToken(input: ConnectTokenInput): ConnectTokenResult;
|
package/dist/cursorHooks.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** Cursor's native hook payload is close to Claude Code's, but its stable
|
|
2
|
-
* conversation identifier and several tool fields use different names. Keep
|
|
3
|
-
* the translation at the process boundary so the shared capture/security
|
|
4
|
-
* pipeline never has to guess which surface produced an event. */
|
|
5
|
-
export declare function normalizeCursorHookInput<T extends Record<string, unknown>>(input: T): T & Record<string, unknown>;
|
|
6
|
-
/** Cursor stores JSONL message roles in `role`; the shared capture pipeline
|
|
7
|
-
* uses Claude's top-level `type` discriminator. Preserve all original fields
|
|
8
|
-
* and add only that discriminator so the existing parsers see real messages. */
|
|
9
|
-
export declare function normalizeCursorTranscript(content: string): string;
|
|
10
|
-
/** Cursor may change its private JSONL record shape independently of the hook
|
|
11
|
-
* contract. Only a byte-empty snapshot is safe to discard; a non-empty file
|
|
12
|
-
* that the current normalizer cannot parse must still be uploaded for backend
|
|
13
|
-
* recovery and diagnosis. */
|
|
14
|
-
export declare function isCursorTranscriptEmpty(content: string): boolean;
|
|
15
|
-
export declare function cursorPreToolBlockResponse(reason: string): {
|
|
16
|
-
permission: "deny";
|
|
17
|
-
user_message: string;
|
|
18
|
-
agent_message: string;
|
|
19
|
-
};
|
|
20
|
-
export declare function cursorPromptBlockResponse(reason: string): {
|
|
21
|
-
continue: false;
|
|
22
|
-
user_message: string;
|
|
23
|
-
};
|
package/dist/detection.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export interface ClaudeCodeProbe {
|
|
2
|
-
dirExists: boolean;
|
|
3
|
-
binOnPath: boolean;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Claude Code is "installed" if either ~/.claude exists (the user has
|
|
7
|
-
* launched the app at least once) OR the `claude` binary is on PATH (the
|
|
8
|
-
* user installed via npm/brew but hasn't launched yet). Either signal is
|
|
9
|
-
* sufficient — we want to wire up the hook the moment the user has
|
|
10
|
-
* obviously committed to the tool.
|
|
11
|
-
*/
|
|
12
|
-
export declare function detectClaudeCode(probe: ClaudeCodeProbe): boolean;
|
|
13
|
-
/**
|
|
14
|
-
* True iff `cmd` looks like a hook command codiedev itself wrote. Used
|
|
15
|
-
* both by the install filter (so `connect` replaces the existing entry
|
|
16
|
-
* instead of stacking another one) and by `codiedev doctor` (so it can
|
|
17
|
-
* grade whether the hook is wired up).
|
|
18
|
-
*
|
|
19
|
-
* Must match every form codiedev can write:
|
|
20
|
-
* - Legacy `npx codiedev-hook <subcommand>`
|
|
21
|
-
* - Absolute path from npm-registry install:
|
|
22
|
-
* `<node> /.../node_modules/codiedev/dist/hook.js <subcommand>`
|
|
23
|
-
* - Absolute path from `npm link` dev install (the monorepo folder
|
|
24
|
-
* is named `codiedev-cli`, not `codiedev`):
|
|
25
|
-
* `<node> /.../codiedev-cli/dist/hook.js <subcommand>`
|
|
26
|
-
*
|
|
27
|
-
* The `codiedev[^/\\]*` allows the trailing `-cli` (or any future suffix)
|
|
28
|
-
* without matching unrelated paths like `notcodiedev/dist/hook.js`.
|
|
29
|
-
*/
|
|
30
|
-
export declare function isCodiedevHookCommand(cmd: string | undefined): boolean;
|
package/dist/hook.d.ts
DELETED
package/dist/inboxFormat.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export interface InboxPing {
|
|
2
|
-
pingId: string;
|
|
3
|
-
createdAt: number;
|
|
4
|
-
readAt?: number;
|
|
5
|
-
from: {
|
|
6
|
-
name: string;
|
|
7
|
-
email: string;
|
|
8
|
-
} | null;
|
|
9
|
-
subjectKey: string | null;
|
|
10
|
-
subject: {
|
|
11
|
-
title?: string;
|
|
12
|
-
} | null;
|
|
13
|
-
preview: string;
|
|
14
|
-
}
|
|
15
|
-
export interface InboxMention {
|
|
16
|
-
mentionId: string;
|
|
17
|
-
createdAt: number;
|
|
18
|
-
readAt?: number | null;
|
|
19
|
-
from: {
|
|
20
|
-
name: string;
|
|
21
|
-
email: string;
|
|
22
|
-
} | null;
|
|
23
|
-
postTitle: string | null;
|
|
24
|
-
preview: string | null;
|
|
25
|
-
url: string | null;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Render the inbox for BOTH surfaces — `codiedev inbox` and the MCP
|
|
29
|
-
* `codiedev_inbox` tool an agent calls for "any messages?". Shared so the
|
|
30
|
-
* agent path can never drift back to pings-only while the human path shows
|
|
31
|
-
* mentions.
|
|
32
|
-
*/
|
|
33
|
-
export declare function formatInbox(opts: {
|
|
34
|
-
pings: InboxPing[];
|
|
35
|
-
mentions?: InboxMention[];
|
|
36
|
-
unreadOnly: boolean;
|
|
37
|
-
limit?: number;
|
|
38
|
-
}): string[];
|
package/dist/limitEvent.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export type LimitKind = "session" | "user_spend" | "org_spend" | "other";
|
|
2
|
-
export interface LimitEvent {
|
|
3
|
-
kind: LimitKind;
|
|
4
|
-
at: number;
|
|
5
|
-
resetText: string | null;
|
|
6
|
-
reason?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function classifyLimitKind(text: string): LimitKind;
|
|
9
|
-
export declare function parseLimitEventFromTranscript(transcript: string): LimitEvent | null;
|
|
10
|
-
/**
|
|
11
|
-
* Codex writes a structured RateLimitSnapshot on token_count events. A normal
|
|
12
|
-
* turn has `rate_limit_reached_type: null`; a blocked turn names the exact
|
|
13
|
-
* boundary. Reading that field avoids locale-dependent terminal copy.
|
|
14
|
-
*/
|
|
15
|
-
export declare function parseCodexLimitEventFromTranscript(transcript: string): LimitEvent | null;
|
|
16
|
-
export declare function tailForLimitEvent(transcript: string, maxChars?: number): string;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type LimitEvent } from "./limitEvent";
|
|
2
|
-
export type LimitEventSource = "claude-code" | "codex";
|
|
3
|
-
export type LimitEventPayload = LimitEvent & {
|
|
4
|
-
source: LimitEventSource;
|
|
5
|
-
sessionId?: string;
|
|
6
|
-
transcriptTail?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare function postLimitEvent(config: {
|
|
9
|
-
backendUrl: string;
|
|
10
|
-
token: string;
|
|
11
|
-
}, payload: LimitEventPayload, timeoutMs?: number): Promise<void>;
|
|
12
|
-
export declare function reportTranscriptLimitEvent(args: {
|
|
13
|
-
config: {
|
|
14
|
-
backendUrl: string;
|
|
15
|
-
token: string;
|
|
16
|
-
};
|
|
17
|
-
source: LimitEventSource;
|
|
18
|
-
sessionId?: string;
|
|
19
|
-
transcript: string;
|
|
20
|
-
emitMinimalOnMiss?: boolean;
|
|
21
|
-
}): Promise<boolean>;
|
package/dist/mcp.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Codiedev MCP server.
|
|
4
|
-
*
|
|
5
|
-
* Exposes the Codiedev artifact-collaboration surface as Model Context
|
|
6
|
-
* Protocol tools so Claude Code / Codex / any MCP-capable agent can invoke
|
|
7
|
-
* them natively from natural language (e.g. "push the spec we just worked on").
|
|
8
|
-
*
|
|
9
|
-
* Reads the same ~/.codiedev/config.json the CLI uses. Install + wire up by
|
|
10
|
-
* running `npx codiedev connect`.
|
|
11
|
-
*/
|
|
12
|
-
export {};
|
package/dist/prUrl.d.ts
DELETED
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/security.d.ts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
export type SecurityHookPhase = "pre" | "post" | "failure";
|
|
2
|
-
export type AgentSurface = "claude-code" | "codex" | "cursor" | "codie-harness";
|
|
3
|
-
export declare const SECURITY_RUNTIME_VERSION = 1;
|
|
4
|
-
export interface RawSecurityHookInput {
|
|
5
|
-
session_id?: string;
|
|
6
|
-
sessionId?: string;
|
|
7
|
-
cwd?: string;
|
|
8
|
-
hook_event_name?: string;
|
|
9
|
-
hookEventName?: string;
|
|
10
|
-
tool_name?: string;
|
|
11
|
-
toolName?: string;
|
|
12
|
-
tool_input?: unknown;
|
|
13
|
-
toolInput?: unknown;
|
|
14
|
-
tool_response?: unknown;
|
|
15
|
-
toolResponse?: unknown;
|
|
16
|
-
tool_use_id?: string;
|
|
17
|
-
toolUseId?: string;
|
|
18
|
-
duration_ms?: number;
|
|
19
|
-
durationMs?: number;
|
|
20
|
-
error?: unknown;
|
|
21
|
-
prompt?: string;
|
|
22
|
-
}
|
|
23
|
-
export interface SecurityWorkflowEvent {
|
|
24
|
-
schemaVersion: 1;
|
|
25
|
-
source: AgentSurface;
|
|
26
|
-
phase: SecurityHookPhase;
|
|
27
|
-
sessionId: string;
|
|
28
|
-
toolName: string;
|
|
29
|
-
toolUseId?: string;
|
|
30
|
-
cwd?: string;
|
|
31
|
-
observedAt: number;
|
|
32
|
-
toolDurationMs?: number;
|
|
33
|
-
payload: unknown;
|
|
34
|
-
redactionCount: number;
|
|
35
|
-
localDecision?: LocalSecurityAction;
|
|
36
|
-
localCategory?: LocalSecurityDecision["category"];
|
|
37
|
-
endpointId?: string;
|
|
38
|
-
endpointName?: string;
|
|
39
|
-
cliVersion?: string;
|
|
40
|
-
securityRuntimeVersion?: number;
|
|
41
|
-
securityPolicyVersion?: number;
|
|
42
|
-
}
|
|
43
|
-
export type LocalSecurityAction = "allow" | "alert" | "block";
|
|
44
|
-
export type SecurityCategory = "secret_in_prompt" | "secret_exfiltration" | "destructive_outside_workspace" | "sensitive_file_read" | "sensitive_file_write" | "protected_agent_config_write" | "unapproved_network_egress" | "untrusted_mcp_tool" | "unapproved_command" | "obfuscated_shell_command" | "package_install" | "sensitive_read_then_egress";
|
|
45
|
-
export interface EndpointSecurityPolicy {
|
|
46
|
-
schemaVersion: 1;
|
|
47
|
-
policyVersion: number;
|
|
48
|
-
enforcementMode: "alert" | "block";
|
|
49
|
-
rules: Partial<Record<SecurityCategory, LocalSecurityAction>>;
|
|
50
|
-
constraints?: {
|
|
51
|
-
allowedMcpServers?: string[];
|
|
52
|
-
allowedHosts?: string[];
|
|
53
|
-
allowedCommands?: string[];
|
|
54
|
-
};
|
|
55
|
-
exceptions: Array<{
|
|
56
|
-
scope: "company" | "user" | "source" | "repository" | "tool" | "category";
|
|
57
|
-
scopeValue: string;
|
|
58
|
-
}>;
|
|
59
|
-
fetchedAt: number;
|
|
60
|
-
signature?: {
|
|
61
|
-
algorithm: "Ed25519";
|
|
62
|
-
keyId: string;
|
|
63
|
-
signedAt: number;
|
|
64
|
-
value: string;
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
export interface LocalSecurityDecision {
|
|
68
|
-
action: LocalSecurityAction;
|
|
69
|
-
category?: SecurityCategory;
|
|
70
|
-
reason?: string;
|
|
71
|
-
}
|
|
72
|
-
export declare function withEndpointIdentity(event: SecurityWorkflowEvent, identity: {
|
|
73
|
-
endpointId?: string;
|
|
74
|
-
endpointName?: string;
|
|
75
|
-
cliVersion?: string;
|
|
76
|
-
securityRuntimeVersion?: number;
|
|
77
|
-
securityPolicyVersion?: number;
|
|
78
|
-
}): SecurityWorkflowEvent;
|
|
79
|
-
/**
|
|
80
|
-
* Runs before a user prompt reaches the model. This is intentionally narrow:
|
|
81
|
-
* block credential material, but allow safe references such as
|
|
82
|
-
* `$OPENAI_API_KEY` so developers can ask agents to use environment variables
|
|
83
|
-
* without pasting their values.
|
|
84
|
-
*/
|
|
85
|
-
export declare function evaluatePromptSecurity(prompt: string | undefined, policy?: EndpointSecurityPolicy, source?: AgentSurface): LocalSecurityDecision;
|
|
86
|
-
/** Runs synchronously before a tool executes. No network or model is involved. */
|
|
87
|
-
export declare function evaluateToolSecurity(input: RawSecurityHookInput, phase: SecurityHookPhase, policy?: EndpointSecurityPolicy, source?: AgentSurface, sessionContext?: {
|
|
88
|
-
sensitiveReadAt?: number;
|
|
89
|
-
now?: number;
|
|
90
|
-
}): LocalSecurityDecision;
|
|
91
|
-
export declare function securityInputHasSensitivePath(input: RawSecurityHookInput): boolean;
|
|
92
|
-
export declare function buildSecurityWorkflowEvent(input: RawSecurityHookInput, phase: SecurityHookPhase, source: AgentSurface, now?: () => number): SecurityWorkflowEvent | null;
|
|
93
|
-
/**
|
|
94
|
-
* Captures the intent side of the causal chain without weakening the local
|
|
95
|
-
* privacy boundary. A prompt that the deterministic policy blocks never
|
|
96
|
-
* becomes an uploadable event; allowed prompts are redacted and bounded using
|
|
97
|
-
* the same sanitizer as tool payloads.
|
|
98
|
-
*/
|
|
99
|
-
export declare function buildSecurityPromptEvent(input: Pick<RawSecurityHookInput, "session_id" | "sessionId" | "cwd" | "prompt">, source: AgentSurface, now?: () => number, policy?: EndpointSecurityPolicy): SecurityWorkflowEvent | null;
|
|
100
|
-
/** Audit-safe evidence for a blocked prompt. The secret-bearing prompt is
|
|
101
|
-
* intentionally omitted; administrators still see that prevention occurred. */
|
|
102
|
-
export declare function buildBlockedSecurityPromptEvent(input: Pick<RawSecurityHookInput, "session_id" | "sessionId" | "cwd">, source: AgentSurface, category: NonNullable<LocalSecurityDecision["category"]>, now?: () => number): SecurityWorkflowEvent | null;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { type SpawnSyncReturns } from "child_process";
|
|
2
|
-
import type { SecurityFindingSeverity, SecurityInventoryReport } from "./securityInventory";
|
|
3
|
-
export interface ExternalSecurityFinding {
|
|
4
|
-
scanner: string;
|
|
5
|
-
componentKey?: string;
|
|
6
|
-
severity: SecurityFindingSeverity;
|
|
7
|
-
ruleId?: string;
|
|
8
|
-
title: string;
|
|
9
|
-
}
|
|
10
|
-
export interface ExternalScannerRun {
|
|
11
|
-
scanner: string;
|
|
12
|
-
status: "passed" | "findings" | "unavailable" | "error" | "skipped";
|
|
13
|
-
detail: string;
|
|
14
|
-
findings: ExternalSecurityFinding[];
|
|
15
|
-
}
|
|
16
|
-
export interface DeepSecurityScanReport {
|
|
17
|
-
schemaVersion: 1;
|
|
18
|
-
generatedAt: string;
|
|
19
|
-
runs: ExternalScannerRun[];
|
|
20
|
-
findings: ExternalSecurityFinding[];
|
|
21
|
-
}
|
|
22
|
-
/** Adds component-addressable OSS scanner findings to the uploadable inventory.
|
|
23
|
-
* Workspace-level findings (for example OSV dependency results) stay in the
|
|
24
|
-
* deep-scan report because they do not identify one agent component. */
|
|
25
|
-
export declare function mergeDeepScanFindings(report: SecurityInventoryReport, deep: DeepSecurityScanReport): SecurityInventoryReport;
|
|
26
|
-
type Runner = (command: string, args: string[], timeoutMs: number) => SpawnSyncReturns<string>;
|
|
27
|
-
/**
|
|
28
|
-
* Runs optional open-source scanners. No scanner is downloaded implicitly.
|
|
29
|
-
* MCP server connection is a separate opt-in because scanning a live stdio
|
|
30
|
-
* server starts third-party code; the normal deep scan remains static.
|
|
31
|
-
*/
|
|
32
|
-
export declare function runDeepSecurityScan(report: SecurityInventoryReport, options?: {
|
|
33
|
-
homeDir?: string;
|
|
34
|
-
workspace?: string;
|
|
35
|
-
connectMcp?: boolean;
|
|
36
|
-
supplyChain?: boolean;
|
|
37
|
-
timeoutMs?: number;
|
|
38
|
-
runner?: Runner;
|
|
39
|
-
now?: () => number;
|
|
40
|
-
}): DeepSecurityScanReport;
|
|
41
|
-
export {};
|
package/dist/securityDoctor.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { type SecurityInstallInspection, type SecurityInstallManifest } from "./securityInstall";
|
|
2
|
-
export type SecurityDoctorStatus = "pass" | "fail" | "warn";
|
|
3
|
-
export interface SecurityDoctorCheck {
|
|
4
|
-
name: string;
|
|
5
|
-
status: SecurityDoctorStatus;
|
|
6
|
-
detail: string;
|
|
7
|
-
}
|
|
8
|
-
export interface SecurityDoctorReport {
|
|
9
|
-
schemaVersion: 1;
|
|
10
|
-
ok: boolean;
|
|
11
|
-
integrity: {
|
|
12
|
-
ok: boolean;
|
|
13
|
-
detail: string;
|
|
14
|
-
};
|
|
15
|
-
manifest: SecurityInstallManifest | null;
|
|
16
|
-
installations: SecurityInstallInspection[];
|
|
17
|
-
policyExists: boolean;
|
|
18
|
-
/** Retained for `codiedev security doctor --json` compatibility. */
|
|
19
|
-
policySignature: {
|
|
20
|
-
ok: boolean;
|
|
21
|
-
trusted: boolean;
|
|
22
|
-
detail: string;
|
|
23
|
-
};
|
|
24
|
-
policySelfTest: {
|
|
25
|
-
ok: boolean;
|
|
26
|
-
cases: number;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
/** One security-health model shared by `doctor` and its legacy alias. */
|
|
30
|
-
export declare function collectSecurityDoctorReport(companyId?: string): SecurityDoctorReport;
|
|
31
|
-
/** Convert security health into the same compact rows used by core doctor. */
|
|
32
|
-
export declare function securityDoctorChecks(report: SecurityDoctorReport): SecurityDoctorCheck[];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export interface AgentSecurityEntitlement {
|
|
2
|
-
agentSecurityEnabled?: boolean;
|
|
3
|
-
}
|
|
4
|
-
/** Security is opt-in per company. Missing/stale entitlement data is dormant. */
|
|
5
|
-
export declare function isAgentSecurityEnabled(config: AgentSecurityEntitlement | null | undefined): boolean;
|