agy-acp-map 0.5.0

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.
@@ -0,0 +1,152 @@
1
+ export type SafetyMode = 'safe' | 'autonomous' | 'autonomous-unsandboxed';
2
+ export interface LaunchConfig {
3
+ model?: string;
4
+ effort?: string;
5
+ mode?: string;
6
+ agent?: string;
7
+ sandbox?: boolean;
8
+ jsonSchema?: string;
9
+ /** Prefer over raw skipPermissions when set. */
10
+ safety?: SafetyMode;
11
+ /** When true (default), pass --dangerously-skip-permissions. */
12
+ skipPermissions?: boolean;
13
+ /** When true (default), pass --disable-slash-commands. */
14
+ disableSlashCommands?: boolean;
15
+ /** Value for --print-timeout (e.g. "0", "30m", "120s"). Default "0". */
16
+ printTimeout?: string;
17
+ }
18
+ export interface LaunchConfigWithConversation extends LaunchConfig {
19
+ conversationId?: string;
20
+ }
21
+ export interface SessionLaunchFields extends LaunchConfig {
22
+ conversationId?: string;
23
+ [key: string]: unknown;
24
+ }
25
+ export type ApplyConfigResult = {
26
+ ok: true;
27
+ } | {
28
+ ok: false;
29
+ error: string;
30
+ };
31
+ export interface BuildAgyArgsSession {
32
+ cwd: string;
33
+ additionalDirectories?: string[];
34
+ conversationId?: string;
35
+ model?: string;
36
+ effort?: string;
37
+ mode?: string;
38
+ agent?: string;
39
+ sandbox?: boolean;
40
+ jsonSchema?: string;
41
+ /** When set, buildAgyArgs may resolve skip/sandbox via resolveSafety unless explicit flags given. */
42
+ safety?: SafetyMode;
43
+ skipPermissions?: boolean;
44
+ disableSlashCommands?: boolean;
45
+ printTimeout?: string;
46
+ stagingDirName?: string;
47
+ stagingOutsideCwd?: string;
48
+ mapper?: {
49
+ conversationId?: string;
50
+ };
51
+ }
52
+ declare const CONFIG_IDS: Set<string>;
53
+ /**
54
+ * Normalize jsonSchema: object → JSON string; string kept as-is.
55
+ */
56
+ export declare function normalizeJsonSchema(v: unknown): string | undefined;
57
+ /**
58
+ * Truthy sandbox from boolean / string / number.
59
+ * @returns undefined = not set
60
+ */
61
+ export declare function normalizeSandbox(v: unknown): boolean | undefined;
62
+ /** Canonical safety tier values (also listed on BRIDGE_CAPABILITIES.safetyTiers). */
63
+ export declare const SAFETY_TIERS: readonly ['safe', 'autonomous', 'autonomous-unsandboxed'];
64
+ /**
65
+ * Normalize safety mode.
66
+ * Accepts: safe | autonomous | auto | autonomous-unsandboxed | autonomous_unsandboxed | unsandboxed
67
+ */
68
+ export declare function normalizeSafety(v: unknown): SafetyMode | undefined;
69
+ /**
70
+ * Normalize boolean-ish with default when unset.
71
+ */
72
+ export declare function normalizeBool(v: unknown, defaultWhenUnset: boolean): boolean;
73
+ /**
74
+ * Optional bool: undefined when unset.
75
+ */
76
+ export declare function normalizeOptionalBool(v: unknown): boolean | undefined;
77
+ /**
78
+ * Normalize print-timeout string (pass-through; empty → undefined).
79
+ */
80
+ export declare function normalizePrintTimeout(v: unknown): string | undefined;
81
+ export interface ResolvedSafety {
82
+ /** Resolved tier used for launch / logging. */
83
+ safety: SafetyMode;
84
+ /** Whether to pass --dangerously-skip-permissions. */
85
+ skipPermissions: boolean;
86
+ /** Whether to pass --sandbox (false → omit flag). */
87
+ sandbox: boolean;
88
+ }
89
+ export type SafetyResolveInput = {
90
+ safety?: SafetyMode | string;
91
+ sandbox?: boolean;
92
+ skipPermissions?: boolean;
93
+ };
94
+ /**
95
+ * Central three-tier safety resolution.
96
+ *
97
+ * Tiers:
98
+ * safe (default) — no skip-permissions; sandbox only if explicitly true
99
+ * autonomous — skip-permissions; default --sandbox unless sandbox:false
100
+ * autonomous-unsandboxed — skip-permissions; NEVER --sandbox
101
+ *
102
+ * Inputs:
103
+ * session.safety / AGY_ACP_SAFETY
104
+ * AGY_ACP_SKIP_PERMISSIONS=1 ≈ autonomous if safety unset; =0 ≈ safe
105
+ * explicit session.skipPermissions overrides the skip flag only
106
+ * explicit session.sandbox / AGY_ACP_SANDBOX override sandbox except unsandboxed tier
107
+ */
108
+ export declare function resolveSafety(session?: SafetyResolveInput, env?: NodeJS.ProcessEnv): ResolvedSafety;
109
+ /**
110
+ * Resolve whether to pass --dangerously-skip-permissions (via resolveSafety).
111
+ */
112
+ export declare function resolveSkipPermissions(session?: SafetyResolveInput, env?: NodeJS.ProcessEnv): boolean;
113
+ /**
114
+ * Resolve whether to pass --sandbox (via resolveSafety).
115
+ * Returns true/false; callers that previously treated undefined as omit can use === true.
116
+ */
117
+ export declare function resolveSandbox(session?: SafetyResolveInput, env?: NodeJS.ProcessEnv): boolean;
118
+ /**
119
+ * Resolve --disable-slash-commands (default true).
120
+ * Disable via session.disableSlashCommands=false or AGY_ACP_DISABLE_SLASH_COMMANDS=0.
121
+ */
122
+ export declare function resolveDisableSlashCommands(session: {
123
+ disableSlashCommands?: boolean;
124
+ }, env?: NodeJS.ProcessEnv): boolean;
125
+ /**
126
+ * Resolve --print-timeout value (default "0").
127
+ */
128
+ export declare function resolvePrintTimeout(session: {
129
+ printTimeout?: string;
130
+ }, env?: NodeJS.ProcessEnv): string;
131
+ /**
132
+ * Resolve launch flags from session/new (or similar) params + env fallbacks.
133
+ * Preferred fields: top-level, then _meta, then config, then configOptions, then env.
134
+ */
135
+ export declare function extractLaunchConfig(params: Record<string, unknown> | null | undefined, env?: NodeJS.ProcessEnv): LaunchConfigWithConversation;
136
+ /**
137
+ * Apply a single set_config_option onto session launch fields.
138
+ */
139
+ export declare function applyConfigOption(session: SessionLaunchFields, configId: string, value: unknown): ApplyConfigResult;
140
+ /**
141
+ * Build argv for `agy` (without the binary name).
142
+ *
143
+ * When skipPermissions / sandbox are already resolved by the caller (spawnAgy),
144
+ * they are used as-is. Otherwise resolveSafety(session) fills them from safety tier.
145
+ *
146
+ * Defaults:
147
+ * - safety: safe → skipPermissions false, sandbox false
148
+ * - disableSlashCommands: true
149
+ * - printTimeout: "0"
150
+ */
151
+ export declare function buildAgyArgs(session: BuildAgyArgsSession, env?: NodeJS.ProcessEnv): string[];
152
+ export { CONFIG_IDS };
@@ -0,0 +1,28 @@
1
+ export interface DiscoveryResult {
2
+ availableModels: string[];
3
+ availableAgents: string[];
4
+ modelsError?: string;
5
+ agentsError?: string;
6
+ }
7
+ /**
8
+ * Parse `agy models` stdout into model id list.
9
+ * Skips status lines like "Fetching available models...".
10
+ * Takes the first whitespace-separated token per non-empty line.
11
+ */
12
+ export declare function parseAgyModelsStdout(stdout: string): string[];
13
+ /**
14
+ * Parse `agy agents` / `agy agent` stdout into agent id list.
15
+ * Accepts "id\\tname", "id name", or plain id-per-line.
16
+ */
17
+ export declare function parseAgyAgentsStdout(stdout: string): string[];
18
+ /**
19
+ * Discover models + agents once per process. Failures → empty arrays + error notes.
20
+ */
21
+ export declare function discoverAgyCatalog(opts?: {
22
+ bin?: string;
23
+ timeoutMs?: number;
24
+ force?: boolean;
25
+ }): Promise<DiscoveryResult>;
26
+ /** Test helper: clear process-lifetime cache. */
27
+ export declare function clearDiscoveryCache(): void;
28
+ export declare function getCachedDiscovery(): DiscoveryResult | null;
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Cross-platform agy child-process supervision:
3
+ * generation tokens, graceful→force kill, stale NDJSON ignore, spawn error handling.
4
+ */
5
+ import { type ChildProcess } from 'node:child_process';
6
+ export declare const DEFAULT_GRACE_MS = 2000;
7
+ export declare const DEFAULT_WAIT_EXIT_MS = 5000;
8
+ export interface AgyProcessCallbacks {
9
+ /** Parsed NDJSON object from stdout; only invoked when generation is still current. */
10
+ onEvent: (obj: unknown, generation: number) => void;
11
+ onStderr?: (chunk: string, generation: number) => void;
12
+ onExit?: (code: number | null, signal: NodeJS.Signals | null, generation: number) => void;
13
+ onError?: (err: Error, generation: number) => void;
14
+ /** Raw bad line (optional logging). */
15
+ onBadLine?: (line: string, generation: number) => void;
16
+ }
17
+ export interface SpawnAgyOptions extends AgyProcessCallbacks {
18
+ bin: string;
19
+ args: string[];
20
+ cwd: string;
21
+ env?: NodeJS.ProcessEnv;
22
+ /** Optional override; manager increments its own generation when omitted. */
23
+ generation?: number;
24
+ }
25
+ /**
26
+ * Per-session process supervisor. Tracks generation so late lines from a killed
27
+ * child are ignored after a respawn.
28
+ */
29
+ export declare class AgyProcessManager {
30
+ private child;
31
+ private generation;
32
+ private killInFlight;
33
+ get currentChild(): ChildProcess | null;
34
+ get currentGeneration(): number;
35
+ isAlive(): boolean;
36
+ isWritable(): boolean;
37
+ /**
38
+ * Kill any existing child (await exit), then spawn a new one with a fresh generation.
39
+ */
40
+ spawn(opts: SpawnAgyOptions): Promise<{
41
+ child: ChildProcess;
42
+ generation: number;
43
+ }>;
44
+ /**
45
+ * Unified kill used by cancel, set_config_option, close, shutdown.
46
+ * SIGINT → wait → SIGTERM → wait → force (SIGKILL / taskkill on Windows).
47
+ */
48
+ kill(opts?: {
49
+ graceMs?: number;
50
+ awaitExit?: boolean;
51
+ waitExitMs?: number;
52
+ }): Promise<void>;
53
+ /** Write one NDJSON line to the current child's stdin. */
54
+ writeLine(line: string): void;
55
+ }
56
+ /**
57
+ * Soft → hard kill sequence (cross-platform).
58
+ * Windows: child.kill('SIGINT') may be no-op; we still try SIGTERM then force.
59
+ */
60
+ export declare function escalateKill(child: ChildProcess, graceMs?: number): Promise<void>;
61
+ /**
62
+ * Force-terminate. On Windows, prefer taskkill /T /F when pid is known;
63
+ * fall back to child.kill('SIGKILL') / kill(undefined).
64
+ */
65
+ export declare function forceKill(child: ChildProcess): void;
66
+ export declare function waitForExit(child: ChildProcess, timeoutMs: number): Promise<boolean>;
67
+ /** Standalone kill helper for callers that only hold a ChildProcess. */
68
+ export declare function killAgyChild(child: ChildProcess | null | undefined, opts?: {
69
+ graceMs?: number;
70
+ waitExitMs?: number;
71
+ }): Promise<void>;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Pure-ish mapping: agy stream-json NDJSON events → ACP v2 session/update notifications.
3
+ * Image inlining uses fs via rich-content.ts (best-effort). Offline map.mjs still works.
4
+ */
5
+ import { type FileToAcpImageOpts } from './rich-content.ts';
6
+ export interface MapperState {
7
+ conversationId?: string;
8
+ tools?: string[];
9
+ permissionMode?: string;
10
+ agentMessageIds: Map<number, string>;
11
+ toolSeen: Set<number>;
12
+ lastStopReason?: string;
13
+ turnDone?: boolean;
14
+ emittedImageUris: Set<string>;
15
+ /** True when at least one agent_response text_delta was emitted this turn. */
16
+ emittedTextDelta?: boolean;
17
+ /** Session roots for image allowlist (set by server). */
18
+ richRoots?: FileToAcpImageOpts;
19
+ }
20
+ export interface AcpNotification {
21
+ jsonrpc: '2.0';
22
+ method: string;
23
+ params: Record<string, unknown>;
24
+ }
25
+ export declare function createMapperState(richRoots?: FileToAcpImageOpts): MapperState;
26
+ /** Reset per-turn tracking (keep conversationId / tools / richRoots). */
27
+ export declare function resetTurnState(state: MapperState): MapperState;
28
+ export declare function guessToolKind(name: unknown): string;
29
+ /**
30
+ * Map one agy NDJSON event object into zero or more ACP session/update notifications.
31
+ */
32
+ export declare function mapAgyEvent(sessionId: string, event: unknown, state: MapperState): {
33
+ notifications: AcpNotification[];
34
+ state: MapperState;
35
+ };
36
+ /**
37
+ * Flatten ACP ContentBlock[] into a single user string for agy (text-only, no staging).
38
+ */
39
+ export declare function promptBlocksToText(blocks: unknown): {
40
+ text: string;
41
+ notes: string[];
42
+ };
43
+ /**
44
+ * Build agy stream-json stdin user message line.
45
+ */
46
+ export declare function buildAgyUserMessage(text: string): Record<string, unknown>;
47
+ /** Helper for server: build richRoots from session fields. */
48
+ export declare function richRootsFromSession(session: {
49
+ cwd: string;
50
+ additionalDirectories?: string[];
51
+ }): FileToAcpImageOpts;
@@ -0,0 +1,21 @@
1
+ export interface PathAllowlistRoots {
2
+ cwd: string;
3
+ additionalDirectories?: string[];
4
+ stagingDir?: string;
5
+ }
6
+ /**
7
+ * Decode file:// URI / percent-encoding into a filesystem path string
8
+ * suitable for path.resolve (mirrors rich-content decode).
9
+ */
10
+ export declare function decodeFsPath(value: string): string;
11
+ /**
12
+ * Resolve candidate path against session cwd (not process.cwd()), then realpath.
13
+ */
14
+ export declare function resolveAgainstCwd(filePath: string, cwd: string): string | null;
15
+ declare function pathIsInside(candidate: string, root: string): boolean;
16
+ /**
17
+ * True when resolved realpath of filePath is under cwd, stagingDir, or additionalDirectories.
18
+ * Missing files return false (caller should not read).
19
+ */
20
+ export declare function isPathAllowed(filePath: string, roots: PathAllowlistRoots): boolean;
21
+ export { pathIsInside };
@@ -0,0 +1,51 @@
1
+ export interface NormalizeOpts {
2
+ cwd: string;
3
+ stagingDir?: string;
4
+ /** Max decoded bytes for a single blob (default 8MB). */
5
+ maxBlobBytes?: number;
6
+ /** Max total decoded bytes staged this call (default 32MB). */
7
+ maxTotalBytes?: number;
8
+ }
9
+ export interface NormalizeResult {
10
+ text: string;
11
+ notes: string[];
12
+ stagedFiles: string[];
13
+ /** Total bytes written this normalize call. */
14
+ stagedBytes: number;
15
+ /** True when a blob was rejected for size. */
16
+ sizeRejected: boolean;
17
+ }
18
+ declare const STAGING_DIRNAME = ".agy-acp-staging";
19
+ export declare const DEFAULT_MAX_BLOB_BYTES: number;
20
+ export declare const DEFAULT_MAX_TOTAL_BYTES: number;
21
+ /**
22
+ * @param {unknown[]} blocks
23
+ * @param {{ cwd: string, stagingDir?: string }} opts
24
+ */
25
+ export declare function normalizePromptBlocks(blocks: unknown[], opts: NormalizeOpts): Promise<NormalizeResult>;
26
+ /**
27
+ * Sync convenience wrapping the same logic.
28
+ */
29
+ export declare function normalizePromptBlocksSync(blocks: unknown[], opts: NormalizeOpts): NormalizeResult;
30
+ export declare function normalizePromptBlocksAsync(blocks: unknown[], opts: NormalizeOpts): Promise<NormalizeResult>;
31
+ /**
32
+ * Remove staging files. Honors AGY_ACP_KEEP_STAGING=1 to skip cleanup.
33
+ * @param filesOrDir list of files to delete, or a staging directory to empty
34
+ */
35
+ export declare function cleanupStaging(filesOrDir: string[] | string, opts?: {
36
+ keep?: boolean;
37
+ }): {
38
+ removed: string[];
39
+ skipped: boolean;
40
+ };
41
+ /**
42
+ * Clean `<cwd>/.agy-acp-staging` for a session (all files in that dir).
43
+ */
44
+ export declare function cleanupSessionStaging(cwd: string, opts?: {
45
+ keep?: boolean;
46
+ stagingDir?: string;
47
+ }): {
48
+ removed: string[];
49
+ skipped: boolean;
50
+ };
51
+ export { STAGING_DIRNAME, };
@@ -0,0 +1,45 @@
1
+ import { type PathAllowlistRoots } from './path-allowlist.ts';
2
+ export interface AcpImageBlock {
3
+ type: 'image';
4
+ mimeType: string;
5
+ data: string;
6
+ uri?: string;
7
+ }
8
+ export interface AcpTextBlock {
9
+ type: 'text';
10
+ text: string;
11
+ }
12
+ export type AcpContentBlock = AcpImageBlock | AcpTextBlock | Record<string, unknown>;
13
+ export interface ToolContentEntry {
14
+ type: 'content';
15
+ content: AcpContentBlock;
16
+ }
17
+ export interface FileToAcpImageOpts extends Partial<PathAllowlistRoots> {
18
+ maxBytes?: number;
19
+ /** When true and roots provided, enforce allowlist. Default: enforce when cwd set. */
20
+ enforceAllowlist?: boolean;
21
+ }
22
+ export interface BuildRichToolContentOpts extends FileToAcpImageOpts {
23
+ toolName?: string;
24
+ }
25
+ declare const IMAGE_EXT: Set<string>;
26
+ declare const MAX_IMAGE_BYTES: number;
27
+ /**
28
+ * Collect filesystem-looking image paths from a string or JSON-ish object.
29
+ */
30
+ export declare function extractImagePaths(textOrObj: unknown): string[];
31
+ /**
32
+ * Read an image file into an ACP ImageContent block (base64 data).
33
+ * Skips if missing, oversized, or outside allowlisted roots (when cwd provided).
34
+ * Relative paths resolve against opts.cwd (session cwd), not process.cwd().
35
+ */
36
+ export declare function fileToAcpImageBlock(filePath: string, opts?: FileToAcpImageOpts): AcpImageBlock | null;
37
+ /**
38
+ * Build ACP tool_call_update content entries: text + optional image blocks.
39
+ */
40
+ export declare function buildRichToolContent(textOut: string, params?: unknown, output?: unknown, opts?: BuildRichToolContentOpts): {
41
+ content: ToolContentEntry[];
42
+ imagePaths: string[];
43
+ emittedImages: number;
44
+ };
45
+ export { MAX_IMAGE_BYTES, IMAGE_EXT };
@@ -0,0 +1,82 @@
1
+ /** Launch-config snapshot persisted for resume-after-close/restart. */
2
+ export type SessionRecord = {
3
+ sessionId: string;
4
+ conversationId?: string;
5
+ title?: string;
6
+ cwd: string;
7
+ additionalDirectories?: string[];
8
+ model?: string;
9
+ effort?: string;
10
+ mode?: string;
11
+ agent?: string;
12
+ safety?: 'safe' | 'autonomous' | 'autonomous-unsandboxed';
13
+ sandbox?: boolean;
14
+ jsonSchema?: string;
15
+ printTimeout?: string;
16
+ disableSlashCommands?: boolean;
17
+ createdAt: string;
18
+ updatedAt: string;
19
+ };
20
+ export type SessionStoreFile = {
21
+ version: 1;
22
+ sessions: SessionRecord[];
23
+ };
24
+ /** Resolve store file path from env or default under home. */
25
+ export declare function resolveSessionStorePath(env?: NodeJS.ProcessEnv, homedir?: () => string): string;
26
+ export declare function deleteOnCloseEnabled(env?: NodeJS.ProcessEnv): boolean;
27
+ /** Build a store record from a live Session-like object. */
28
+ export declare function sessionToRecord(session: {
29
+ sessionId: string;
30
+ cwd: string;
31
+ createdAt: string;
32
+ updatedAt: string;
33
+ title?: string;
34
+ conversationId?: string;
35
+ additionalDirectories?: string[];
36
+ model?: string;
37
+ effort?: string;
38
+ mode?: string;
39
+ agent?: string;
40
+ safety?: SessionRecord['safety'];
41
+ sandbox?: boolean;
42
+ jsonSchema?: string;
43
+ printTimeout?: string;
44
+ disableSlashCommands?: boolean;
45
+ }): SessionRecord;
46
+ /**
47
+ * Fields needed to rehydrate an in-memory Session (no child process yet).
48
+ * Caller attaches proc/mapper/runtime state.
49
+ */
50
+ export declare function recordLaunchFields(record: SessionRecord): {
51
+ sessionId: string;
52
+ cwd: string;
53
+ additionalDirectories?: string[];
54
+ createdAt: string;
55
+ updatedAt: string;
56
+ title?: string;
57
+ conversationId?: string;
58
+ model?: string;
59
+ effort?: string;
60
+ mode?: string;
61
+ agent?: string;
62
+ safety?: SessionRecord['safety'];
63
+ sandbox?: boolean;
64
+ jsonSchema?: string;
65
+ printTimeout?: string;
66
+ disableSlashCommands?: boolean;
67
+ };
68
+ export declare class SessionStore {
69
+ readonly filePath: string;
70
+ constructor(filePath?: string);
71
+ /** Read all records; missing/corrupt file → []. */
72
+ load(): SessionRecord[];
73
+ /** Atomic write: temp file in same dir + rename. */
74
+ save(records: SessionRecord[]): void;
75
+ upsert(record: SessionRecord): void;
76
+ get(sessionId: string): SessionRecord | undefined;
77
+ list(filter?: {
78
+ cwd?: string;
79
+ }): SessionRecord[];
80
+ delete(sessionId: string): boolean;
81
+ remove(sessionId: string): boolean;
82
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Parse agy / jetski soft-deny signals from stderr and stream-json payloads.
3
+ *
4
+ * Observed stderr (2026-09):
5
+ * jetski: ... a tool required the "command" permission ... auto-denied.
6
+ * Add an allow-rule under permissions.allow in settings.json (e.g. command(<target>)).
7
+ *
8
+ * Also accepts explicit key=value fragments: tool=, allow-rule=, path=
9
+ * And stream-json: tool ERROR with permission/denied wording + result.denied_actions
10
+ *
11
+ * v0.5.0: do NOT treat generic tool ERROR as soft-deny (tighten parseSoftDenyFromEvent).
12
+ */
13
+ export interface SoftDenyInfo {
14
+ tool: string;
15
+ allowRule: string;
16
+ path?: string;
17
+ source?: string;
18
+ }
19
+ /**
20
+ * @param {string} stderrText
21
+ * @returns {SoftDenyInfo[]}
22
+ */
23
+ export declare function parseSoftDeny(stderrText: string): SoftDenyInfo[];
24
+ /**
25
+ * Extract soft-denies from a single agy NDJSON event (tool ERROR / result.denied_actions).
26
+ * Generic tool errors without permission wording are ignored (v0.5.0 tighten).
27
+ */
28
+ export declare function parseSoftDenyFromEvent(event: unknown): SoftDenyInfo[];
29
+ /**
30
+ * Merge and de-dupe soft-deny lists.
31
+ */
32
+ export declare function mergeSoftDenies(...lists: (SoftDenyInfo[] | undefined)[]): SoftDenyInfo[];
33
+ /**
34
+ * Format soft-denies into a short agent-facing note.
35
+ */
36
+ export declare function formatSoftDenyMessage(denies: SoftDenyInfo[]): string;
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bun
2
+ export {};
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "agy-acp-map",
3
+ "version": "0.5.0",
4
+ "description": "Universal ACP v1/v2 bridge for Google Antigravity CLI (agy) supporting Zed, Cursor, and Electron Studio",
5
+ "type": "module",
6
+ "bin": {
7
+ "agy-acp": "dist/bin.js"
8
+ },
9
+ "main": "./dist/index.js",
10
+ "module": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js",
16
+ "default": "./dist/index.js"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "README.md",
22
+ "LICENSE"
23
+ ],
24
+ "scripts": {
25
+ "build": "bun run build:js && bun run build:types",
26
+ "build:js": "bun build src/sdk-server.ts --target node --outfile dist/bin.js && bun build src/index.ts --target node --outfile dist/index.js",
27
+ "build:types": "bunx tsc -p tsconfig.build.json",
28
+ "prepublishOnly": "bun run build && bun test src/lib",
29
+ "start": "bun src/sdk-server.ts",
30
+ "start:dist": "node dist/bin.js",
31
+ "start:legacy": "bun archive/legacy-server.ts",
32
+ "map": "bun src/map.ts",
33
+ "test": "bun test src/lib",
34
+ "test:args": "bun tests/test-agy-args.ts",
35
+ "smoke": "bun tests/smoke/smoke-basic.ts",
36
+ "smoke:flags": "bun tests/smoke/smoke-flags.ts",
37
+ "smoke:permissions": "bun tests/smoke/smoke-permissions.ts",
38
+ "smoke:image-in": "bun tests/smoke/smoke-image-in.ts",
39
+ "smoke:image-out": "bun tests/smoke/smoke-image-out.ts",
40
+ "smoke:robustness": "bun tests/smoke/smoke-robustness.ts",
41
+ "smoke:all": "bun test src/lib && bun tests/test-agy-args.ts && bun tests/smoke/smoke-basic.ts && bun tests/smoke/smoke-flags.ts && bun tests/smoke/smoke-permissions.ts && bun tests/smoke/smoke-image-in.ts && bun tests/smoke/smoke-image-out.ts && bun tests/smoke/smoke-robustness.ts"
42
+ },
43
+ "keywords": [
44
+ "antigravity",
45
+ "acp",
46
+ "agent-client-protocol",
47
+ "google-gemini",
48
+ "agent",
49
+ "zed",
50
+ "cursor"
51
+ ],
52
+ "author": "yitom",
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "git+https://github.com/yitom486/agy-acp-map.git"
56
+ },
57
+ "license": "MIT",
58
+ "devDependencies": {
59
+ "bun-types": "^1.4.2"
60
+ },
61
+ "dependencies": {
62
+ "@agentclientprotocol/sdk": "^1.4.0"
63
+ }
64
+ }