expandai 0.0.0 → 0.0.2
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 +241 -6
- package/build/dts/ApiClient.d.ts +231 -0
- package/build/dts/ApiClient.d.ts.map +1 -0
- package/build/dts/Authentication.d.ts +23 -0
- package/build/dts/Authentication.d.ts.map +1 -0
- package/build/dts/BrowserOAuth.d.ts +99 -0
- package/build/dts/BrowserOAuth.d.ts.map +1 -0
- package/build/dts/Commands/Fetch.d.ts +30 -0
- package/build/dts/Commands/Fetch.d.ts.map +1 -0
- package/build/dts/Commands/Hook.d.ts +17 -0
- package/build/dts/Commands/Hook.d.ts.map +1 -0
- package/build/dts/Commands/Mcp.d.ts +11 -0
- package/build/dts/Commands/Mcp.d.ts.map +1 -0
- package/build/dts/Commands/McpRun.d.ts +5 -0
- package/build/dts/Commands/McpRun.d.ts.map +1 -0
- package/build/dts/Commands/Search.d.ts +21 -0
- package/build/dts/Commands/Search.d.ts.map +1 -0
- package/build/dts/Commands/Skill.d.ts +12 -0
- package/build/dts/Commands/Skill.d.ts.map +1 -0
- package/build/dts/Commands/Uninstall.d.ts +9 -0
- package/build/dts/Commands/Uninstall.d.ts.map +1 -0
- package/build/dts/Config.d.ts +105 -0
- package/build/dts/Config.d.ts.map +1 -0
- package/build/dts/DeviceAuth.d.ts +87 -0
- package/build/dts/DeviceAuth.d.ts.map +1 -0
- package/build/dts/Hook/Claude.d.ts +13 -0
- package/build/dts/Hook/Claude.d.ts.map +1 -0
- package/build/dts/Hook/Errors.d.ts +20 -0
- package/build/dts/Hook/Errors.d.ts.map +1 -0
- package/build/dts/Hook/Opencode.d.ts +13 -0
- package/build/dts/Hook/Opencode.d.ts.map +1 -0
- package/build/dts/Hook/SnapshotNote.d.ts +8 -0
- package/build/dts/Hook/SnapshotNote.d.ts.map +1 -0
- package/build/dts/Install/Claude/Hook.d.ts +60 -0
- package/build/dts/Install/Claude/Hook.d.ts.map +1 -0
- package/build/dts/Install/Claude/Mcp.d.ts +45 -0
- package/build/dts/Install/Claude/Mcp.d.ts.map +1 -0
- package/build/dts/Install/Claude/Skill.d.ts +24 -0
- package/build/dts/Install/Claude/Skill.d.ts.map +1 -0
- package/build/dts/Install/Codex/Mcp.d.ts +39 -0
- package/build/dts/Install/Codex/Mcp.d.ts.map +1 -0
- package/build/dts/Install/Codex/Skill.d.ts +20 -0
- package/build/dts/Install/Codex/Skill.d.ts.map +1 -0
- package/build/dts/Install/Cursor/Mcp.d.ts +45 -0
- package/build/dts/Install/Cursor/Mcp.d.ts.map +1 -0
- package/build/dts/Install/Cursor/Skill.d.ts +27 -0
- package/build/dts/Install/Cursor/Skill.d.ts.map +1 -0
- package/build/dts/Install/Domain.d.ts +73 -0
- package/build/dts/Install/Domain.d.ts.map +1 -0
- package/build/dts/Install/Hook.d.ts +30 -0
- package/build/dts/Install/Hook.d.ts.map +1 -0
- package/build/dts/Install/Mcp.d.ts +28 -0
- package/build/dts/Install/Mcp.d.ts.map +1 -0
- package/build/dts/Install/Opencode/Hook.d.ts +23 -0
- package/build/dts/Install/Opencode/Hook.d.ts.map +1 -0
- package/build/dts/Install/Opencode/Mcp.d.ts +47 -0
- package/build/dts/Install/Opencode/Mcp.d.ts.map +1 -0
- package/build/dts/Install/Opencode/Skill.d.ts +24 -0
- package/build/dts/Install/Opencode/Skill.d.ts.map +1 -0
- package/build/dts/Install/Skill.d.ts +32 -0
- package/build/dts/Install/Skill.d.ts.map +1 -0
- package/build/dts/Install/Uninstall.d.ts +32 -0
- package/build/dts/Install/Uninstall.d.ts.map +1 -0
- package/build/dts/Mcp/ExpandDocs.d.ts +7 -0
- package/build/dts/Mcp/ExpandDocs.d.ts.map +1 -0
- package/build/dts/Mcp/RequestHeaders.d.ts +15 -0
- package/build/dts/Mcp/RequestHeaders.d.ts.map +1 -0
- package/build/dts/Mcp/Server.d.ts +10 -0
- package/build/dts/Mcp/Server.d.ts.map +1 -0
- package/build/dts/Mcp/Toolkit.d.ts +3 -0
- package/build/dts/Mcp/Toolkit.d.ts.map +1 -0
- package/build/dts/Mcp/tools/Citations.d.ts +237 -0
- package/build/dts/Mcp/tools/Citations.d.ts.map +1 -0
- package/build/dts/Mcp/tools/Fetch.d.ts +167 -0
- package/build/dts/Mcp/tools/Fetch.d.ts.map +1 -0
- package/build/dts/Snippets.d.ts +19 -0
- package/build/dts/Snippets.d.ts.map +1 -0
- package/build/dts/index.d.ts +2 -0
- package/build/dts/index.d.ts.map +1 -0
- package/build/dts/main.d.ts +3 -0
- package/build/dts/main.d.ts.map +1 -0
- package/build/esm/ApiClient.js +182 -0
- package/build/esm/ApiClient.js.map +1 -0
- package/build/esm/Authentication.js +112 -0
- package/build/esm/Authentication.js.map +1 -0
- package/build/esm/BrowserOAuth.js +254 -0
- package/build/esm/BrowserOAuth.js.map +1 -0
- package/build/esm/Commands/Fetch.js +95 -0
- package/build/esm/Commands/Fetch.js.map +1 -0
- package/build/esm/Commands/Hook.js +20 -0
- package/build/esm/Commands/Hook.js.map +1 -0
- package/build/esm/Commands/Mcp.js +19 -0
- package/build/esm/Commands/Mcp.js.map +1 -0
- package/build/esm/Commands/McpRun.js +15 -0
- package/build/esm/Commands/McpRun.js.map +1 -0
- package/build/esm/Commands/Search.js +43 -0
- package/build/esm/Commands/Search.js.map +1 -0
- package/build/esm/Commands/Skill.js +17 -0
- package/build/esm/Commands/Skill.js.map +1 -0
- package/build/esm/Commands/Uninstall.js +28 -0
- package/build/esm/Commands/Uninstall.js.map +1 -0
- package/build/esm/Config.js +145 -0
- package/build/esm/Config.js.map +1 -0
- package/build/esm/DeviceAuth.js +127 -0
- package/build/esm/DeviceAuth.js.map +1 -0
- package/build/esm/Hook/Claude.js +74 -0
- package/build/esm/Hook/Claude.js.map +1 -0
- package/build/esm/Hook/Errors.js +18 -0
- package/build/esm/Hook/Errors.js.map +1 -0
- package/build/esm/Hook/Opencode.js +50 -0
- package/build/esm/Hook/Opencode.js.map +1 -0
- package/build/esm/Hook/SnapshotNote.js +18 -0
- package/build/esm/Hook/SnapshotNote.js.map +1 -0
- package/build/esm/Install/Claude/Hook.js +89 -0
- package/build/esm/Install/Claude/Hook.js.map +1 -0
- package/build/esm/Install/Claude/Mcp.js +71 -0
- package/build/esm/Install/Claude/Mcp.js.map +1 -0
- package/build/esm/Install/Claude/Skill.js +34 -0
- package/build/esm/Install/Claude/Skill.js.map +1 -0
- package/build/esm/Install/Codex/Mcp.js +92 -0
- package/build/esm/Install/Codex/Mcp.js.map +1 -0
- package/build/esm/Install/Codex/Skill.js +30 -0
- package/build/esm/Install/Codex/Skill.js.map +1 -0
- package/build/esm/Install/Cursor/Mcp.js +71 -0
- package/build/esm/Install/Cursor/Mcp.js.map +1 -0
- package/build/esm/Install/Cursor/Skill.js +37 -0
- package/build/esm/Install/Cursor/Skill.js.map +1 -0
- package/build/esm/Install/Domain.js +105 -0
- package/build/esm/Install/Domain.js.map +1 -0
- package/build/esm/Install/Hook.js +38 -0
- package/build/esm/Install/Hook.js.map +1 -0
- package/build/esm/Install/Mcp.js +40 -0
- package/build/esm/Install/Mcp.js.map +1 -0
- package/build/esm/Install/Opencode/Hook.js +44 -0
- package/build/esm/Install/Opencode/Hook.js.map +1 -0
- package/build/esm/Install/Opencode/Mcp.js +73 -0
- package/build/esm/Install/Opencode/Mcp.js.map +1 -0
- package/build/esm/Install/Opencode/Skill.js +34 -0
- package/build/esm/Install/Opencode/Skill.js.map +1 -0
- package/build/esm/Install/Opencode/expandai-webfetch.js +38 -0
- package/build/esm/Install/Skill.js +41 -0
- package/build/esm/Install/Skill.js.map +1 -0
- package/build/esm/Install/Uninstall.js +49 -0
- package/build/esm/Install/Uninstall.js.map +1 -0
- package/build/esm/Mcp/ExpandDocs.js +64 -0
- package/build/esm/Mcp/ExpandDocs.js.map +1 -0
- package/build/esm/Mcp/RequestHeaders.js +13 -0
- package/build/esm/Mcp/RequestHeaders.js.map +1 -0
- package/build/esm/Mcp/Server.js +11 -0
- package/build/esm/Mcp/Server.js.map +1 -0
- package/build/esm/Mcp/Toolkit.js +16 -0
- package/build/esm/Mcp/Toolkit.js.map +1 -0
- package/build/esm/Mcp/tools/Citations.js +92 -0
- package/build/esm/Mcp/tools/Citations.js.map +1 -0
- package/build/esm/Mcp/tools/Fetch.js +141 -0
- package/build/esm/Mcp/tools/Fetch.js.map +1 -0
- package/build/esm/Snippets.js +18 -0
- package/build/esm/Snippets.js.map +1 -0
- package/build/esm/index.js +2 -0
- package/build/esm/index.js.map +1 -0
- package/build/esm/main.js +97 -0
- package/build/esm/main.js.map +1 -0
- package/build/skills/expandai/SKILL.md +72 -0
- package/package.json +72 -10
- package/src/ApiClient.ts +257 -0
- package/src/Authentication.ts +164 -0
- package/src/BrowserOAuth.ts +361 -0
- package/src/Commands/Fetch.ts +157 -0
- package/src/Commands/Hook.ts +48 -0
- package/src/Commands/Mcp.ts +30 -0
- package/src/Commands/McpRun.ts +25 -0
- package/src/Commands/Search.ts +92 -0
- package/src/Commands/Skill.ts +30 -0
- package/src/Commands/Uninstall.ts +38 -0
- package/src/Config.ts +195 -0
- package/src/DeviceAuth.ts +193 -0
- package/src/Hook/Claude.ts +81 -0
- package/src/Hook/Errors.ts +19 -0
- package/src/Hook/Opencode.ts +58 -0
- package/src/Hook/SnapshotNote.ts +18 -0
- package/src/Install/Claude/Hook.ts +133 -0
- package/src/Install/Claude/Mcp.ts +82 -0
- package/src/Install/Claude/Skill.ts +44 -0
- package/src/Install/Codex/Mcp.ts +109 -0
- package/src/Install/Codex/Skill.ts +40 -0
- package/src/Install/Cursor/Mcp.ts +82 -0
- package/src/Install/Cursor/Skill.ts +47 -0
- package/src/Install/Domain.ts +148 -0
- package/src/Install/Hook.ts +50 -0
- package/src/Install/Mcp.ts +71 -0
- package/src/Install/Opencode/Hook.ts +55 -0
- package/src/Install/Opencode/Mcp.ts +84 -0
- package/src/Install/Opencode/Skill.ts +44 -0
- package/src/Install/Opencode/expandai-webfetch.d.ts +23 -0
- package/src/Install/Opencode/expandai-webfetch.js +38 -0
- package/src/Install/Skill.ts +57 -0
- package/src/Install/Uninstall.ts +82 -0
- package/src/Mcp/ExpandDocs.ts +71 -0
- package/src/Mcp/RequestHeaders.ts +16 -0
- package/src/Mcp/Server.ts +14 -0
- package/src/Mcp/Toolkit.ts +21 -0
- package/src/Mcp/tools/Citations.ts +110 -0
- package/src/Mcp/tools/Fetch.ts +177 -0
- package/src/Snippets.ts +32 -0
- package/src/index.ts +1 -0
- package/src/main.ts +146 -0
- package/bun.lockb +0 -0
- package/index.ts +0 -1
- package/tsconfig.json +0 -27
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fetch.d.ts","sourceRoot":"","sources":["../../../src/Commands/Fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,OAAO,EAAW,MAAM,aAAa,CAAA;AAE7D,OAAO,EAAW,MAAM,EAAS,MAAM,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAA;;;;;;AAIvE,qBAAa,mBAAoB,SAAQ,wBAEvC;IACD,IAAI,OAAO,WAEV;CACD;;;;;;;AAED,qBAAa,mBAAoB,SAAQ,wBAGvC;IACD,IAAI,OAAO,WAEV;CACD;AAaD,eAAO,MAAM,WAAW,6DAatB,CAAA;AAmCF,UAAU,kBAAkB;IAC3B,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAA;IACjB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CACzB;AAED,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,kBAAkB,CAkErF,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command } from '@effect/cli';
|
|
2
|
+
import { ClaudeHook } from '../Hook/Claude.js';
|
|
3
|
+
import { OpencodeHook } from '../Hook/Opencode.js';
|
|
4
|
+
import { HookInstaller } from '../Install/Hook.js';
|
|
5
|
+
export declare const HumanHookCommand: Command.Command<"hook", HookInstaller | ClaudeHook | OpencodeHook, import("effect/ParseResult").ParseError | import("@effect/platform/Error").PlatformError | import("../Install/Domain.js").McpParseError | import("../Install/Domain.js").McpWriteError | import("../Hook/Errors.js").HookProtocolFailed, {
|
|
6
|
+
readonly subcommand: import("effect/Option").Option<{} | {
|
|
7
|
+
readonly host: "claude-code" | "opencode";
|
|
8
|
+
readonly scope: "project" | "global";
|
|
9
|
+
} | {
|
|
10
|
+
readonly host: "claude-code" | "opencode";
|
|
11
|
+
readonly scope: "project" | "global";
|
|
12
|
+
}>;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const AgentHookCommand: Command.Command<"hook", ClaudeHook | OpencodeHook, import("../Hook/Errors.js").HookProtocolFailed, {
|
|
15
|
+
readonly subcommand: import("effect/Option").Option<{}>;
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=Hook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Hook.d.ts","sourceRoot":"","sources":["../../../src/Commands/Hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,MAAM,aAAa,CAAA;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAmClD,eAAO,MAAM,gBAAgB;;;;;;;;EAG5B,CAAA;AAED,eAAO,MAAM,gBAAgB;;EAG5B,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Command } from '@effect/cli';
|
|
2
|
+
import { Mcp } from '../Install/Mcp.js';
|
|
3
|
+
export declare const InstallSubCommand: Command.Command<"install", Mcp, import("@effect/platform/Error").PlatformError | import("../Install/Domain.js").McpParseError | import("../Install/Domain.js").McpWriteError, {
|
|
4
|
+
readonly host: "claude-code" | "cursor" | "opencode" | "codex";
|
|
5
|
+
readonly scope: "project" | "global";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const UninstallSubCommand: Command.Command<"uninstall", Mcp, import("@effect/platform/Error").PlatformError | import("../Install/Domain.js").McpParseError | import("../Install/Domain.js").McpWriteError, {
|
|
8
|
+
readonly host: "claude-code" | "cursor" | "opencode" | "codex";
|
|
9
|
+
readonly scope: "project" | "global";
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=Mcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Mcp.d.ts","sourceRoot":"","sources":["../../../src/Commands/Mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,MAAM,aAAa,CAAA;AAE3C,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAcvC,eAAO,MAAM,iBAAiB;;;EAQ7B,CAAA;AAED,eAAO,MAAM,mBAAmB;;;EAG/B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpRun.d.ts","sourceRoot":"","sources":["../../../src/Commands/McpRun.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAW,MAAM,aAAa,CAAA;AAU9C,eAAO,MAAM,aAAa;;EAazB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Command } from '@effect/cli';
|
|
2
|
+
import { Schema } from 'effect';
|
|
3
|
+
declare const SnapshotSnippetsUnavailable_base: Schema.TaggedErrorClass<SnapshotSnippetsUnavailable, "SnapshotSnippetsUnavailable", {
|
|
4
|
+
readonly _tag: Schema.tag<"SnapshotSnippetsUnavailable">;
|
|
5
|
+
} & {
|
|
6
|
+
snapshotId: typeof Schema.String;
|
|
7
|
+
query: typeof Schema.String;
|
|
8
|
+
}>;
|
|
9
|
+
export declare class SnapshotSnippetsUnavailable extends SnapshotSnippetsUnavailable_base {
|
|
10
|
+
get message(): string;
|
|
11
|
+
}
|
|
12
|
+
interface SearchCommandConfig {
|
|
13
|
+
readonly snapshotId: string;
|
|
14
|
+
readonly query: string;
|
|
15
|
+
readonly format: 'text' | 'json';
|
|
16
|
+
readonly maxResults: number;
|
|
17
|
+
readonly minScore: number;
|
|
18
|
+
}
|
|
19
|
+
export declare const SearchCommand: Command.Command<'search', never, unknown, SearchCommandConfig>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=Search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../src/Commands/Search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAW,MAAM,aAAa,CAAA;AACpD,OAAO,EAAiC,MAAM,EAAE,MAAM,QAAQ,CAAA;;;;;;;AAK9D,qBAAa,2BAA4B,SAAQ,gCAMhD;IACA,IAAI,OAAO,WAEV;CACD;AAkCD,UAAU,mBAAmB;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CACzB;AAED,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,mBAAmB,CAiCxF,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command } from '@effect/cli';
|
|
2
|
+
import { Skill } from '../Install/Skill.js';
|
|
3
|
+
export declare const SkillCommand: Command.Command<"skill", Skill, import("@effect/platform/Error").PlatformError, {
|
|
4
|
+
readonly subcommand: import("effect/Option").Option<{
|
|
5
|
+
readonly host: "claude-code" | "cursor" | "opencode" | "codex";
|
|
6
|
+
readonly scope: "project" | "global";
|
|
7
|
+
} | {
|
|
8
|
+
readonly host: "claude-code" | "cursor" | "opencode" | "codex";
|
|
9
|
+
readonly scope: "project" | "global";
|
|
10
|
+
}>;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=Skill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skill.d.ts","sourceRoot":"","sources":["../../../src/Commands/Skill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,MAAM,aAAa,CAAA;AAE3C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAwB3C,eAAO,MAAM,YAAY;;;;;;;;EAGxB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Command } from '@effect/cli';
|
|
2
|
+
import { Option } from 'effect';
|
|
3
|
+
import { Uninstall } from '../Install/Uninstall.js';
|
|
4
|
+
export declare const UninstallCommand: Command.Command<"uninstall", Uninstall, import("effect/ParseResult").ParseError | import("@effect/platform/Error").PlatformError | import("../Install/Domain.js").McpParseError | import("../Install/Domain.js").McpWriteError, {
|
|
5
|
+
readonly target: Option.Option<"mcp" | "all" | "hook" | "skill">;
|
|
6
|
+
readonly host: Option.Option<"claude-code" | "cursor" | "opencode" | "codex">;
|
|
7
|
+
readonly scope: Option.Option<"project" | "global">;
|
|
8
|
+
}>;
|
|
9
|
+
//# sourceMappingURL=Uninstall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Uninstall.d.ts","sourceRoot":"","sources":["../../../src/Commands/Uninstall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAqBnD,eAAO,MAAM,gBAAgB;;;;EAc5B,CAAA"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { FileSystem, Path } from '@effect/platform';
|
|
2
|
+
import { DateTime, Effect, Schema } from 'effect';
|
|
3
|
+
/** Production API endpoint used when neither `EXPAND_API_URL` nor the config file overrides it. */
|
|
4
|
+
export declare const DEFAULT_API_URL = "https://api.expand.ai";
|
|
5
|
+
export declare const ApiKey: Schema.Redacted<Schema.brand<typeof Schema.NonEmptyTrimmedString, "ApiKey">>;
|
|
6
|
+
export declare const ApiKeyConfig: Schema.TaggedStruct<"ApiKey", {
|
|
7
|
+
apiKey: Schema.Redacted<Schema.brand<typeof Schema.NonEmptyTrimmedString, "ApiKey">>;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const OAuthConfig: Schema.TaggedStruct<"OAuth", {
|
|
10
|
+
accessToken: Schema.Redacted<typeof Schema.String>;
|
|
11
|
+
refreshToken: Schema.optional<Schema.Redacted<typeof Schema.String>>;
|
|
12
|
+
expiresAt: typeof Schema.DateTimeUtc;
|
|
13
|
+
}>;
|
|
14
|
+
declare const ExpandCliConfig_base: Schema.Class<ExpandCliConfig, {
|
|
15
|
+
apiUrl: Schema.optional<typeof Schema.URL>;
|
|
16
|
+
authMethod: Schema.optional<Schema.Union<[Schema.TaggedStruct<"ApiKey", {
|
|
17
|
+
apiKey: Schema.Redacted<Schema.brand<typeof Schema.NonEmptyTrimmedString, "ApiKey">>;
|
|
18
|
+
}>, Schema.TaggedStruct<"OAuth", {
|
|
19
|
+
accessToken: Schema.Redacted<typeof Schema.String>;
|
|
20
|
+
refreshToken: Schema.optional<Schema.Redacted<typeof Schema.String>>;
|
|
21
|
+
expiresAt: typeof Schema.DateTimeUtc;
|
|
22
|
+
}>]>>;
|
|
23
|
+
}, Schema.Struct.Encoded<{
|
|
24
|
+
apiUrl: Schema.optional<typeof Schema.URL>;
|
|
25
|
+
authMethod: Schema.optional<Schema.Union<[Schema.TaggedStruct<"ApiKey", {
|
|
26
|
+
apiKey: Schema.Redacted<Schema.brand<typeof Schema.NonEmptyTrimmedString, "ApiKey">>;
|
|
27
|
+
}>, Schema.TaggedStruct<"OAuth", {
|
|
28
|
+
accessToken: Schema.Redacted<typeof Schema.String>;
|
|
29
|
+
refreshToken: Schema.optional<Schema.Redacted<typeof Schema.String>>;
|
|
30
|
+
expiresAt: typeof Schema.DateTimeUtc;
|
|
31
|
+
}>]>>;
|
|
32
|
+
}>, never, {
|
|
33
|
+
readonly apiUrl?: URL | undefined;
|
|
34
|
+
} & {
|
|
35
|
+
readonly authMethod?: {
|
|
36
|
+
readonly apiKey: import("effect/Redacted").Redacted<string & import("effect/Brand").Brand<"ApiKey">>;
|
|
37
|
+
readonly _tag: "ApiKey";
|
|
38
|
+
} | {
|
|
39
|
+
readonly accessToken: import("effect/Redacted").Redacted<string>;
|
|
40
|
+
readonly refreshToken?: import("effect/Redacted").Redacted<string> | undefined;
|
|
41
|
+
readonly expiresAt: DateTime.Utc;
|
|
42
|
+
readonly _tag: "OAuth";
|
|
43
|
+
} | undefined;
|
|
44
|
+
}, {}, {}>;
|
|
45
|
+
export declare class ExpandCliConfig extends ExpandCliConfig_base {
|
|
46
|
+
static readonly Json: Schema.transform<Schema.SchemaClass<unknown, string, never>, typeof ExpandCliConfig>;
|
|
47
|
+
}
|
|
48
|
+
declare const ConfigNotWritable_base: Schema.TaggedErrorClass<ConfigNotWritable, "ConfigNotWritable", {
|
|
49
|
+
readonly _tag: Schema.tag<"ConfigNotWritable">;
|
|
50
|
+
} & {
|
|
51
|
+
path: typeof Schema.String;
|
|
52
|
+
}>;
|
|
53
|
+
export declare class ConfigNotWritable extends ConfigNotWritable_base {
|
|
54
|
+
get message(): string;
|
|
55
|
+
}
|
|
56
|
+
declare const ConfigParseError_base: Schema.TaggedErrorClass<ConfigParseError, "ConfigParseError", {
|
|
57
|
+
readonly _tag: Schema.tag<"ConfigParseError">;
|
|
58
|
+
} & {
|
|
59
|
+
path: typeof Schema.String;
|
|
60
|
+
error: typeof Schema.Defect;
|
|
61
|
+
}>;
|
|
62
|
+
export declare class ConfigParseError extends ConfigParseError_base {
|
|
63
|
+
get message(): string;
|
|
64
|
+
}
|
|
65
|
+
declare const NotAuthenticated_base: Schema.TaggedErrorClass<NotAuthenticated, "NotAuthenticated", {
|
|
66
|
+
readonly _tag: Schema.tag<"NotAuthenticated">;
|
|
67
|
+
}>;
|
|
68
|
+
export declare class NotAuthenticated extends NotAuthenticated_base {
|
|
69
|
+
get message(): string;
|
|
70
|
+
}
|
|
71
|
+
declare const OAuthTokenExpired_base: Schema.TaggedErrorClass<OAuthTokenExpired, "OAuthTokenExpired", {
|
|
72
|
+
readonly _tag: Schema.tag<"OAuthTokenExpired">;
|
|
73
|
+
} & {
|
|
74
|
+
expiredAt: typeof Schema.DateTimeUtc;
|
|
75
|
+
}>;
|
|
76
|
+
export declare class OAuthTokenExpired extends OAuthTokenExpired_base {
|
|
77
|
+
get message(): string;
|
|
78
|
+
}
|
|
79
|
+
declare const ConfigManager_base: Effect.Service.Class<ConfigManager, "@expandai/cli/Config/ConfigManager", {
|
|
80
|
+
readonly dependencies: readonly [import("effect/Layer").Layer<FileSystem.FileSystem, never, never>, import("effect/Layer").Layer<Path.Path, never, never>];
|
|
81
|
+
readonly effect: Effect.Effect<{
|
|
82
|
+
readonly configPath: string;
|
|
83
|
+
readonly loadConfig: () => Effect.Effect<{
|
|
84
|
+
apiUrl: URL;
|
|
85
|
+
authMethod: NonNullable<{
|
|
86
|
+
readonly apiKey: import("effect/Redacted").Redacted<string & import("effect/Brand").Brand<"ApiKey">>;
|
|
87
|
+
readonly _tag: "ApiKey";
|
|
88
|
+
} | {
|
|
89
|
+
readonly accessToken: import("effect/Redacted").Redacted<string>;
|
|
90
|
+
readonly refreshToken?: import("effect/Redacted").Redacted<string> | undefined;
|
|
91
|
+
readonly expiresAt: DateTime.Utc;
|
|
92
|
+
readonly _tag: "OAuth";
|
|
93
|
+
} | undefined>;
|
|
94
|
+
}, ConfigParseError | NotAuthenticated | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, never>;
|
|
95
|
+
readonly saveConfig: (config: ExpandCliConfig) => Effect.Effect<void, ConfigNotWritable | import("effect/ParseResult").ParseError, never>;
|
|
96
|
+
readonly updateConfig: (patch: Partial<ExpandCliConfig>) => Effect.Effect<void, ConfigNotWritable | import("effect/ParseResult").ParseError, never>;
|
|
97
|
+
readonly clearConfig: () => Effect.Effect<void, ConfigNotWritable | import("effect/ParseResult").ParseError, never>;
|
|
98
|
+
readonly getApiUrl: () => Effect.Effect<URL, ConfigParseError | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, never>;
|
|
99
|
+
readonly getPlaygroundHost: () => Effect.Effect<string, import("effect/ConfigError").ConfigError, never>;
|
|
100
|
+
}, import("effect/ConfigError").ConfigError, FileSystem.FileSystem | Path.Path>;
|
|
101
|
+
}>;
|
|
102
|
+
export declare class ConfigManager extends ConfigManager_base {
|
|
103
|
+
}
|
|
104
|
+
export {};
|
|
105
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAGnD,OAAO,EAAU,QAAQ,EAAE,MAAM,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEjE,mGAAmG;AACnG,eAAO,MAAM,eAAe,0BAA0B,CAAA;AAEtD,eAAO,MAAM,MAAM,8EAA6E,CAAA;AAEhG,eAAO,MAAM,YAAY;;EAAoD,CAAA;AAC7E,eAAO,MAAM,WAAW;;;;EAItB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,qBAAa,eAAgB,SAAQ,oBAGnC;IACD,MAAM,CAAC,QAAQ,CAAC,IAAI,uFAAoC;CACxD;;;;;;AAED,qBAAa,iBAAkB,SAAQ,sBAErC;IACD,IAAI,OAAO,WAEV;CACD;;;;;;;AAED,qBAAa,gBAAiB,SAAQ,qBAGpC;IACD,IAAI,OAAO,WAEV;CACD;;;;AAED,qBAAa,gBAAiB,SAAQ,qBAA8D;IACnG,IAAI,OAAO,WAEV;CACD;;;;;;AAED,qBAAa,iBAAkB,SAAQ,sBAErC;IACD,IAAI,OAAO,WAEV;CACD;;;;;;;;;;;;;;;;;;;;;;;;AAYD,qBAAa,aAAc,SAAQ,kBA2HjC;CAAG"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { HttpClient } from '@effect/platform';
|
|
2
|
+
import { Duration, Effect, Schema } from 'effect';
|
|
3
|
+
import { ConfigManager } from './Config.js';
|
|
4
|
+
declare const DeviceCodeResponse_base: Schema.Class<DeviceCodeResponse, {
|
|
5
|
+
device_code: typeof Schema.String;
|
|
6
|
+
user_code: Schema.transform<typeof Schema.String, typeof Schema.String>;
|
|
7
|
+
verification_uri: typeof Schema.String;
|
|
8
|
+
verification_uri_complete: typeof Schema.String;
|
|
9
|
+
expires_in: Schema.transform<typeof Schema.Number, typeof Schema.DurationFromSelf>;
|
|
10
|
+
interval: Schema.transform<typeof Schema.Number, typeof Schema.DurationFromSelf>;
|
|
11
|
+
}, Schema.Struct.Encoded<{
|
|
12
|
+
device_code: typeof Schema.String;
|
|
13
|
+
user_code: Schema.transform<typeof Schema.String, typeof Schema.String>;
|
|
14
|
+
verification_uri: typeof Schema.String;
|
|
15
|
+
verification_uri_complete: typeof Schema.String;
|
|
16
|
+
expires_in: Schema.transform<typeof Schema.Number, typeof Schema.DurationFromSelf>;
|
|
17
|
+
interval: Schema.transform<typeof Schema.Number, typeof Schema.DurationFromSelf>;
|
|
18
|
+
}>, never, {
|
|
19
|
+
readonly expires_in: Duration.Duration;
|
|
20
|
+
} & {
|
|
21
|
+
readonly device_code: string;
|
|
22
|
+
} & {
|
|
23
|
+
readonly user_code: string;
|
|
24
|
+
} & {
|
|
25
|
+
readonly verification_uri: string;
|
|
26
|
+
} & {
|
|
27
|
+
readonly verification_uri_complete: string;
|
|
28
|
+
} & {
|
|
29
|
+
readonly interval: Duration.Duration;
|
|
30
|
+
}, {}, {}>;
|
|
31
|
+
export declare class DeviceCodeResponse extends DeviceCodeResponse_base {
|
|
32
|
+
}
|
|
33
|
+
declare const TokenResponse_base: Schema.Class<TokenResponse, {
|
|
34
|
+
access_token: typeof Schema.String;
|
|
35
|
+
expires_in: Schema.transform<typeof Schema.Number, typeof Schema.DurationFromSelf>;
|
|
36
|
+
token_type: typeof Schema.String;
|
|
37
|
+
scope: Schema.optional<typeof Schema.String>;
|
|
38
|
+
}, Schema.Struct.Encoded<{
|
|
39
|
+
access_token: typeof Schema.String;
|
|
40
|
+
expires_in: Schema.transform<typeof Schema.Number, typeof Schema.DurationFromSelf>;
|
|
41
|
+
token_type: typeof Schema.String;
|
|
42
|
+
scope: Schema.optional<typeof Schema.String>;
|
|
43
|
+
}>, never, {
|
|
44
|
+
readonly access_token: string;
|
|
45
|
+
} & {
|
|
46
|
+
readonly expires_in: Duration.Duration;
|
|
47
|
+
} & {
|
|
48
|
+
readonly token_type: string;
|
|
49
|
+
} & {
|
|
50
|
+
readonly scope?: string | undefined;
|
|
51
|
+
}, {}, {}>;
|
|
52
|
+
export declare class TokenResponse extends TokenResponse_base {
|
|
53
|
+
}
|
|
54
|
+
declare const DeviceAuthRequestFailed_base: Schema.TaggedErrorClass<DeviceAuthRequestFailed, "DeviceAuthRequestFailed", {
|
|
55
|
+
readonly _tag: Schema.tag<"DeviceAuthRequestFailed">;
|
|
56
|
+
} & {
|
|
57
|
+
endpoint: typeof Schema.String;
|
|
58
|
+
error: typeof Schema.Defect;
|
|
59
|
+
status: Schema.optional<typeof Schema.Number>;
|
|
60
|
+
}>;
|
|
61
|
+
export declare class DeviceAuthRequestFailed extends DeviceAuthRequestFailed_base {
|
|
62
|
+
get message(): string;
|
|
63
|
+
}
|
|
64
|
+
declare const DeviceAuthorizationDenied_base: Schema.TaggedErrorClass<DeviceAuthorizationDenied, "DeviceAuthorizationDenied", {
|
|
65
|
+
readonly _tag: Schema.tag<"DeviceAuthorizationDenied">;
|
|
66
|
+
}>;
|
|
67
|
+
export declare class DeviceAuthorizationDenied extends DeviceAuthorizationDenied_base {
|
|
68
|
+
get message(): string;
|
|
69
|
+
}
|
|
70
|
+
declare const DeviceAuthorizationExpired_base: Schema.TaggedErrorClass<DeviceAuthorizationExpired, "DeviceAuthorizationExpired", {
|
|
71
|
+
readonly _tag: Schema.tag<"DeviceAuthorizationExpired">;
|
|
72
|
+
}>;
|
|
73
|
+
export declare class DeviceAuthorizationExpired extends DeviceAuthorizationExpired_base {
|
|
74
|
+
get message(): string;
|
|
75
|
+
}
|
|
76
|
+
declare const DeviceAuthService_base: Effect.Service.Class<DeviceAuthService, "@expandai/cli/DeviceAuthService", {
|
|
77
|
+
readonly dependencies: readonly [import("effect/Layer").Layer<HttpClient.HttpClient, never, never>, import("effect/Layer").Layer<ConfigManager, import("effect/ConfigError").ConfigError, never>];
|
|
78
|
+
readonly effect: Effect.Effect<{
|
|
79
|
+
readonly requestDeviceCode: () => Effect.Effect<DeviceCodeResponse, import("@effect/platform/HttpBody").HttpBodyError | DeviceAuthRequestFailed, never>;
|
|
80
|
+
readonly pollForToken: (deviceCode: string, interval: Duration.Duration, expiresIn: Duration.Duration) => Effect.Effect<TokenResponse, DeviceAuthRequestFailed | DeviceAuthorizationDenied | DeviceAuthorizationExpired, never>;
|
|
81
|
+
readonly saveToken: (tokenResponse: TokenResponse) => Effect.Effect<void, import("./Config.js").ConfigNotWritable | import("effect/ParseResult").ParseError, never>;
|
|
82
|
+
}, import("./Config.js").ConfigParseError | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, ConfigManager | HttpClient.HttpClient>;
|
|
83
|
+
}>;
|
|
84
|
+
export declare class DeviceAuthService extends DeviceAuthService_base {
|
|
85
|
+
}
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=DeviceAuth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceAuth.d.ts","sourceRoot":"","sources":["../../src/DeviceAuth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAyC,MAAM,kBAAkB,CAAA;AAEpF,OAAO,EAAY,QAAQ,EAAE,MAAM,EAA6C,MAAM,EAAU,MAAM,QAAQ,CAAA;AAC9G,OAAO,EAAE,aAAa,EAAe,MAAM,aAAa,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBxD,qBAAa,kBAAmB,SAAQ,uBAOtC;CAAG;;;;;;;;;;;;;;;;;;;;AAEL,qBAAa,aAAc,SAAQ,kBAKjC;CAAG;;;;;;;;AAEL,qBAAa,uBAAwB,SAAQ,4BAI3C;IACD,IAAI,OAAO,WAEV;CACD;;;;AAED,qBAAa,yBAA0B,SAAQ,8BAG9C;IACA,IAAI,OAAO,WAEV;CACD;;;;AAED,qBAAa,0BAA2B,SAAQ,+BAG/C;IACA,IAAI,OAAO,WAEV;CACD;;;;;;;;;AAID,qBAAa,iBAAkB,SAAQ,sBA8HrC;CAAG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { ApiClient } from '../ApiClient.js';
|
|
3
|
+
import { HookProtocolFailed } from './Errors.js';
|
|
4
|
+
declare const ClaudeHook_base: Effect.Service.Class<ClaudeHook, "@expandai/cli/Hook/Claude", {
|
|
5
|
+
readonly dependencies: readonly [import("effect/Layer").Layer<ApiClient, import("effect/ConfigError").ConfigError, never>];
|
|
6
|
+
readonly effect: Effect.Effect<{
|
|
7
|
+
readonly runProtocol: () => Effect.Effect<void, HookProtocolFailed, never>;
|
|
8
|
+
}, never, ApiClient>;
|
|
9
|
+
}>;
|
|
10
|
+
export declare class ClaudeHook extends ClaudeHook_base {
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=Claude.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Claude.d.ts","sourceRoot":"","sources":["../../../src/Hook/Claude.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,MAAM,EAAkB,MAAM,QAAQ,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,OAAO,EAAE,kBAAkB,EAAkB,MAAM,aAAa,CAAA;;;;;;;AAqChE,qBAAa,UAAW,SAAQ,eAuC9B;CAAG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
declare const StdinReadError_base: Schema.TaggedErrorClass<StdinReadError, "StdinReadError", {
|
|
3
|
+
readonly _tag: Schema.tag<"StdinReadError">;
|
|
4
|
+
} & {
|
|
5
|
+
error: typeof Schema.Defect;
|
|
6
|
+
}>;
|
|
7
|
+
export declare class StdinReadError extends StdinReadError_base {
|
|
8
|
+
get message(): string;
|
|
9
|
+
}
|
|
10
|
+
declare const HookProtocolFailed_base: Schema.TaggedErrorClass<HookProtocolFailed, "HookProtocolFailed", {
|
|
11
|
+
readonly _tag: Schema.tag<"HookProtocolFailed">;
|
|
12
|
+
} & {
|
|
13
|
+
error: typeof Schema.Defect;
|
|
14
|
+
url: Schema.optional<typeof Schema.String>;
|
|
15
|
+
}>;
|
|
16
|
+
export declare class HookProtocolFailed extends HookProtocolFailed_base {
|
|
17
|
+
get message(): string;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=Errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../../src/Hook/Errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;;;;;;AAE/B,qBAAa,cAAe,SAAQ,mBAElC;IACD,IAAI,OAAO,WAEV;CACD;;;;;;;AAED,qBAAa,kBAAmB,SAAQ,uBAGtC;IACD,IAAI,OAAO,WAGV;CACD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { ApiClient } from '../ApiClient.js';
|
|
3
|
+
import { HookProtocolFailed } from './Errors.js';
|
|
4
|
+
declare const OpencodeHook_base: Effect.Service.Class<OpencodeHook, "@expandai/cli/Hook/Opencode", {
|
|
5
|
+
readonly dependencies: readonly [import("effect/Layer").Layer<ApiClient, import("effect/ConfigError").ConfigError, never>];
|
|
6
|
+
readonly effect: Effect.Effect<{
|
|
7
|
+
readonly runProtocol: () => Effect.Effect<void, HookProtocolFailed, never>;
|
|
8
|
+
}, never, ApiClient>;
|
|
9
|
+
}>;
|
|
10
|
+
export declare class OpencodeHook extends OpencodeHook_base {
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=Opencode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Opencode.d.ts","sourceRoot":"","sources":["../../../src/Hook/Opencode.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,MAAM,EAAkB,MAAM,QAAQ,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,OAAO,EAAE,kBAAkB,EAAkB,MAAM,aAAa,CAAA;;;;;;;AAqBhE,qBAAa,YAAa,SAAQ,iBAgChC;CAAG"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prepends a short note to fetched markdown carrying the snapshot handle and the public
|
|
3
|
+
* playground link, and telling the agent how to search the already-captured page by handle
|
|
4
|
+
* (rather than fetching the URL again) and cite specific passages back to the user. Both the
|
|
5
|
+
* Claude Code and OpenCode hooks inject this so the surfaced guidance stays identical.
|
|
6
|
+
*/
|
|
7
|
+
export declare function withSnapshotNote(markdown: string, snapshotId: string, playgroundUrl: string): string;
|
|
8
|
+
//# sourceMappingURL=SnapshotNote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SnapshotNote.d.ts","sourceRoot":"","sources":["../../../src/Hook/SnapshotNote.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CASpG"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Effect, Schema } from 'effect';
|
|
2
|
+
import { ConfigIo } from '../Domain.js';
|
|
3
|
+
/**
|
|
4
|
+
* Claude Code hook config — `~/.claude/settings.json` (global) or
|
|
5
|
+
* `<cwd>/.claude/settings.json` (project). PreToolUse hooks fire on built-in
|
|
6
|
+
* tools; we register the WebFetch matcher to route to `expandai hook claude-code`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const HOOK_COMMAND = "expandai hook claude-code";
|
|
9
|
+
export declare const WEBFETCH_MATCHER = "WebFetch";
|
|
10
|
+
export declare const HookCommandEntry: Schema.Struct<{
|
|
11
|
+
type: Schema.Literal<["command"]>;
|
|
12
|
+
command: typeof Schema.String;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const HookMatcher: Schema.Struct<{
|
|
15
|
+
matcher: Schema.optional<typeof Schema.String>;
|
|
16
|
+
hooks: Schema.Array$<Schema.Struct<{
|
|
17
|
+
type: Schema.Literal<["command"]>;
|
|
18
|
+
command: typeof Schema.String;
|
|
19
|
+
}>>;
|
|
20
|
+
}>;
|
|
21
|
+
declare const HooksSection: Schema.TypeLiteral<{
|
|
22
|
+
PreToolUse: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
23
|
+
matcher: Schema.optional<typeof Schema.String>;
|
|
24
|
+
hooks: Schema.Array$<Schema.Struct<{
|
|
25
|
+
type: Schema.Literal<["command"]>;
|
|
26
|
+
command: typeof Schema.String;
|
|
27
|
+
}>>;
|
|
28
|
+
}>>>;
|
|
29
|
+
}, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>;
|
|
30
|
+
export declare const SettingsSchema: Schema.transform<Schema.SchemaClass<unknown, string, never>, Schema.TypeLiteral<{
|
|
31
|
+
hooks: Schema.optionalWith<Schema.TypeLiteral<{
|
|
32
|
+
PreToolUse: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
33
|
+
matcher: Schema.optional<typeof Schema.String>;
|
|
34
|
+
hooks: Schema.Array$<Schema.Struct<{
|
|
35
|
+
type: Schema.Literal<["command"]>;
|
|
36
|
+
command: typeof Schema.String;
|
|
37
|
+
}>>;
|
|
38
|
+
}>>>;
|
|
39
|
+
}, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>, {
|
|
40
|
+
default: () => typeof HooksSection.Type;
|
|
41
|
+
}>;
|
|
42
|
+
}, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>>;
|
|
43
|
+
export declare const expandaiMatcher: {
|
|
44
|
+
matcher: string;
|
|
45
|
+
hooks: {
|
|
46
|
+
type: "command";
|
|
47
|
+
command: string;
|
|
48
|
+
}[];
|
|
49
|
+
};
|
|
50
|
+
declare const ClaudeHook_base: Effect.Service.Class<ClaudeHook, "@expandai/cli/Install/Claude/Hook", {
|
|
51
|
+
readonly dependencies: readonly [import("effect/Layer").Layer<ConfigIo, never, never>];
|
|
52
|
+
readonly effect: Effect.Effect<{
|
|
53
|
+
readonly install: (scope: "project" | "global") => Effect.Effect<void, import("effect/ParseResult").ParseError | import("@effect/platform/Error").PlatformError, never>;
|
|
54
|
+
readonly uninstall: (scope: "project" | "global") => Effect.Effect<void, import("effect/ParseResult").ParseError | import("@effect/platform/Error").PlatformError, never>;
|
|
55
|
+
}, import("effect/ConfigError").ConfigError, ConfigIo>;
|
|
56
|
+
}>;
|
|
57
|
+
export declare class ClaudeHook extends ClaudeHook_base {
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=Hook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Hook.d.ts","sourceRoot":"","sources":["../../../../src/Install/Claude/Hook.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,MAAM,EAAS,MAAM,EAAE,MAAM,QAAQ,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAGvC;;;;GAIG;AAEH,eAAO,MAAM,YAAY,8BAA8B,CAAA;AACvD,eAAO,MAAM,gBAAgB,aAAa,CAAA;AAE1C,eAAO,MAAM,gBAAgB;;;EAG3B,CAAA;AAEF,eAAO,MAAM,WAAW;;;;;;EAGtB,CAAA;AAEF,QAAA,MAAM,YAAY;;;;;;;;0EAGjB,CAAA;AAED,eAAO,MAAM,cAAc;;;;;;;;;;uBAE2C,OAAO,YAAY,CAAC,IAAI;;2EAI7F,CAAA;AAED,eAAO,MAAM,eAAe;;;;;;CAG3B,CAAA;;;;;;;;AAED,qBAAa,UAAW,SAAQ,eA0F9B;CAAG"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Effect, Schema } from 'effect';
|
|
2
|
+
import { ConfigIo, McpParseError, McpWriteError } from '../Domain.js';
|
|
3
|
+
declare const Entry_base: Schema.Class<Entry, {
|
|
4
|
+
type: Schema.Literal<["stdio"]>;
|
|
5
|
+
command: typeof Schema.NonEmptyTrimmedString;
|
|
6
|
+
args: Schema.Array$<typeof Schema.String>;
|
|
7
|
+
env: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
|
|
8
|
+
}, Schema.Struct.Encoded<{
|
|
9
|
+
type: Schema.Literal<["stdio"]>;
|
|
10
|
+
command: typeof Schema.NonEmptyTrimmedString;
|
|
11
|
+
args: Schema.Array$<typeof Schema.String>;
|
|
12
|
+
env: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
|
|
13
|
+
}>, never, {
|
|
14
|
+
readonly type: "stdio";
|
|
15
|
+
} & {
|
|
16
|
+
readonly command: string;
|
|
17
|
+
} & {
|
|
18
|
+
readonly args: readonly string[];
|
|
19
|
+
} & {
|
|
20
|
+
readonly env?: {
|
|
21
|
+
readonly [x: string]: string;
|
|
22
|
+
} | undefined;
|
|
23
|
+
}, {}, {}>;
|
|
24
|
+
/**
|
|
25
|
+
* Claude Code MCP descriptor — `mcpServers` shape (de facto Claude Desktop
|
|
26
|
+
* convention; also read by Cursor and other clients).
|
|
27
|
+
*
|
|
28
|
+
* - global → `~/.claude.json` (Claude Code's user-scope store)
|
|
29
|
+
* - project → `<cwd>/.mcp.json` (the agent-agnostic project file)
|
|
30
|
+
*/
|
|
31
|
+
export declare class Entry extends Entry_base {
|
|
32
|
+
}
|
|
33
|
+
declare const ClaudeMcp_base: Effect.Service.Class<ClaudeMcp, "@expandai/cli/Install/Claude/Mcp", {
|
|
34
|
+
readonly dependencies: readonly [import("effect/Layer").Layer<ConfigIo, never, never>];
|
|
35
|
+
readonly effect: Effect.Effect<{
|
|
36
|
+
readonly install: (scope: "project" | "global") => Effect.Effect<void, McpParseError | McpWriteError, never>;
|
|
37
|
+
readonly uninstall: (scope: "project" | "global") => Effect.Effect<void, McpParseError | McpWriteError, never>;
|
|
38
|
+
readonly isInstalled: (scope: "project" | "global") => Effect.Effect<boolean, McpParseError, never>;
|
|
39
|
+
readonly pathFor: (scope: "project" | "global") => Effect.Effect<string, never, never>;
|
|
40
|
+
}, import("effect/ConfigError").ConfigError, ConfigIo>;
|
|
41
|
+
}>;
|
|
42
|
+
export declare class ClaudeMcp extends ClaudeMcp_base {
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=Mcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Mcp.d.ts","sourceRoot":"","sources":["../../../../src/Install/Claude/Mcp.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,MAAM,EAAiB,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAA0B,aAAa,EAAc,MAAM,cAAc,CAAA;;;;;;;;;;;;;;;;;;;;;;AAGzG;;;;;;GAMG;AACH,qBAAa,KAAM,SAAQ,UAKzB;CAAG;;;;;;;;;;AAEL,qBAAa,SAAU,SAAQ,cA8D7B;CAAG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { SkillIo } from '../Domain.js';
|
|
3
|
+
/**
|
|
4
|
+
* Claude Code skills live under `<scope>/.claude/skills/<name>/SKILL.md`.
|
|
5
|
+
*
|
|
6
|
+
* - global → `~/.claude/skills/expandai/SKILL.md`
|
|
7
|
+
* - project → `<cwd>/.claude/skills/expandai/SKILL.md`
|
|
8
|
+
*
|
|
9
|
+
* (Globally-scoped Claude Code skills are also reachable via `npx skills`,
|
|
10
|
+
* but file-copy gives us a uniform install path with OpenCode and works
|
|
11
|
+
* without npm.)
|
|
12
|
+
*/
|
|
13
|
+
export declare const SKILL_NAME = "expandai";
|
|
14
|
+
declare const ClaudeSkill_base: Effect.Service.Class<ClaudeSkill, "@expandai/cli/Install/Claude/Skill", {
|
|
15
|
+
readonly dependencies: readonly [import("effect/Layer").Layer<SkillIo, import("@effect/platform/Error").BadArgument, never>];
|
|
16
|
+
readonly effect: Effect.Effect<{
|
|
17
|
+
readonly install: (scope: "project" | "global") => Effect.Effect<string, import("@effect/platform/Error").PlatformError, never>;
|
|
18
|
+
readonly uninstall: (scope: "project" | "global") => Effect.Effect<string, import("@effect/platform/Error").PlatformError, never>;
|
|
19
|
+
}, import("effect/ConfigError").ConfigError, SkillIo>;
|
|
20
|
+
}>;
|
|
21
|
+
export declare class ClaudeSkill extends ClaudeSkill_base {
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=Skill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skill.d.ts","sourceRoot":"","sources":["../../../../src/Install/Claude/Skill.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,MAAM,EAAS,MAAM,QAAQ,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC;;;;;;;;;GASG;AAEH,eAAO,MAAM,UAAU,aAAa,CAAA;;;;;;;;AAEpC,qBAAa,WAAY,SAAQ,gBAyB/B;CAAG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Effect, Schema } from 'effect';
|
|
2
|
+
import { ConfigIo, McpParseError, McpWriteError } from '../Domain.js';
|
|
3
|
+
declare const Entry_base: Schema.Class<Entry, {
|
|
4
|
+
command: typeof Schema.NonEmptyTrimmedString;
|
|
5
|
+
args: Schema.Array$<typeof Schema.String>;
|
|
6
|
+
enabled: typeof Schema.Boolean;
|
|
7
|
+
}, Schema.Struct.Encoded<{
|
|
8
|
+
command: typeof Schema.NonEmptyTrimmedString;
|
|
9
|
+
args: Schema.Array$<typeof Schema.String>;
|
|
10
|
+
enabled: typeof Schema.Boolean;
|
|
11
|
+
}>, never, {
|
|
12
|
+
readonly command: string;
|
|
13
|
+
} & {
|
|
14
|
+
readonly args: readonly string[];
|
|
15
|
+
} & {
|
|
16
|
+
readonly enabled: boolean;
|
|
17
|
+
}, {}, {}>;
|
|
18
|
+
export declare class Entry extends Entry_base {
|
|
19
|
+
}
|
|
20
|
+
declare const CodexMcp_base: Effect.Service.Class<CodexMcp, "@expandai/cli/Install/Codex/Mcp", {
|
|
21
|
+
readonly dependencies: readonly [import("effect/Layer").Layer<ConfigIo, never, never>];
|
|
22
|
+
readonly effect: Effect.Effect<{
|
|
23
|
+
readonly install: (scope: "project" | "global") => Effect.Effect<void, import("@effect/platform/Error").PlatformError | McpParseError | McpWriteError, never>;
|
|
24
|
+
readonly uninstall: (scope: "project" | "global") => Effect.Effect<void, import("@effect/platform/Error").PlatformError | McpParseError | McpWriteError, never>;
|
|
25
|
+
readonly isInstalled: (scope: "project" | "global") => Effect.Effect<boolean, import("@effect/platform/Error").PlatformError | McpParseError, never>;
|
|
26
|
+
readonly pathFor: (scope: "project" | "global") => Effect.Effect<string, never, never>;
|
|
27
|
+
}, import("effect/ConfigError").ConfigError, ConfigIo>;
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* Codex MCP descriptor — Codex stores MCP servers in TOML config under
|
|
31
|
+
* `[mcp_servers.<name>]`.
|
|
32
|
+
*
|
|
33
|
+
* - global → `~/.codex/config.toml`
|
|
34
|
+
* - project → `<cwd>/.codex/config.toml`
|
|
35
|
+
*/
|
|
36
|
+
export declare class CodexMcp extends CodexMcp_base {
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=Mcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Mcp.d.ts","sourceRoot":"","sources":["../../../../src/Install/Codex/Mcp.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,MAAM,EAAiB,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEvE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAc,MAAM,cAAc,CAAA;;;;;;;;;;;;;;;;AAGjF,qBAAa,KAAM,SAAQ,UAIzB;CAAG;;;;;;;;;;AAgBL;;;;;;GAMG;AACH,qBAAa,QAAS,SAAQ,aA2E5B;CAAG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { SkillIo } from '../Domain.js';
|
|
3
|
+
/**
|
|
4
|
+
* Codex skills use the open agent skills locations:
|
|
5
|
+
*
|
|
6
|
+
* - global → `~/.agents/skills/<name>/`
|
|
7
|
+
* - project → `<cwd>/.agents/skills/<name>/`
|
|
8
|
+
*/
|
|
9
|
+
export declare const SKILL_NAME = "expandai";
|
|
10
|
+
declare const CodexSkill_base: Effect.Service.Class<CodexSkill, "@expandai/cli/Install/Codex/Skill", {
|
|
11
|
+
readonly dependencies: readonly [import("effect/Layer").Layer<SkillIo, import("@effect/platform/Error").BadArgument, never>];
|
|
12
|
+
readonly effect: Effect.Effect<{
|
|
13
|
+
readonly install: (scope: "project" | "global") => Effect.Effect<string, import("@effect/platform/Error").PlatformError, never>;
|
|
14
|
+
readonly uninstall: (scope: "project" | "global") => Effect.Effect<string, import("@effect/platform/Error").PlatformError, never>;
|
|
15
|
+
}, import("effect/ConfigError").ConfigError, SkillIo>;
|
|
16
|
+
}>;
|
|
17
|
+
export declare class CodexSkill extends CodexSkill_base {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=Skill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skill.d.ts","sourceRoot":"","sources":["../../../../src/Install/Codex/Skill.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,MAAM,EAAS,MAAM,QAAQ,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC;;;;;GAKG;AAEH,eAAO,MAAM,UAAU,aAAa,CAAA;;;;;;;;AAEpC,qBAAa,UAAW,SAAQ,eAyB9B;CAAG"}
|