expandai 0.0.3 → 0.0.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/build/{esm/Install/Opencode → assets/opencode}/expandai-webfetch.js +22 -4
- package/build/dts/Mcp/RequestHeaders.d.ts +0 -1
- package/build/dts/Mcp/Server.d.ts +1 -2
- package/build/dts/index.d.ts +0 -1
- package/build/esm/index.js +180 -2
- package/build/esm/main.js +677 -200
- package/build/skills/expandai/SKILL.md +12 -6
- package/package.json +19 -11
- package/build/dts/ApiClient.d.ts +0 -165
- package/build/dts/ApiClient.d.ts.map +0 -1
- package/build/dts/Auth/Domain.d.ts +0 -95
- package/build/dts/Auth/Domain.d.ts.map +0 -1
- package/build/dts/Auth/ManualAuthorization.d.ts +0 -107
- package/build/dts/Auth/ManualAuthorization.d.ts.map +0 -1
- package/build/dts/Auth/PendingInit.d.ts +0 -35
- package/build/dts/Auth/PendingInit.d.ts.map +0 -1
- package/build/dts/Auth/Pkce.d.ts +0 -10
- package/build/dts/Auth/Pkce.d.ts.map +0 -1
- package/build/dts/Auth/SetupGrantAuthorization.d.ts +0 -34
- package/build/dts/Auth/SetupGrantAuthorization.d.ts.map +0 -1
- package/build/dts/Authentication.d.ts +0 -24
- package/build/dts/Authentication.d.ts.map +0 -1
- package/build/dts/BrowserOAuth.d.ts +0 -99
- package/build/dts/BrowserOAuth.d.ts.map +0 -1
- package/build/dts/CommandPath.d.ts +0 -2
- package/build/dts/CommandPath.d.ts.map +0 -1
- package/build/dts/Commands/Fetch.d.ts +0 -30
- package/build/dts/Commands/Fetch.d.ts.map +0 -1
- package/build/dts/Commands/Hook.d.ts +0 -17
- package/build/dts/Commands/Hook.d.ts.map +0 -1
- package/build/dts/Commands/Init.d.ts +0 -55
- package/build/dts/Commands/Init.d.ts.map +0 -1
- package/build/dts/Commands/Mcp.d.ts +0 -11
- package/build/dts/Commands/Mcp.d.ts.map +0 -1
- package/build/dts/Commands/McpRun.d.ts +0 -5
- package/build/dts/Commands/McpRun.d.ts.map +0 -1
- package/build/dts/Commands/Search.d.ts +0 -21
- package/build/dts/Commands/Search.d.ts.map +0 -1
- package/build/dts/Commands/Skill.d.ts +0 -12
- package/build/dts/Commands/Skill.d.ts.map +0 -1
- package/build/dts/Commands/Status.d.ts +0 -27
- package/build/dts/Commands/Status.d.ts.map +0 -1
- package/build/dts/Commands/Telemetry.d.ts +0 -7
- package/build/dts/Commands/Telemetry.d.ts.map +0 -1
- package/build/dts/Commands/Uninstall.d.ts +0 -9
- package/build/dts/Commands/Uninstall.d.ts.map +0 -1
- package/build/dts/Config.d.ts +0 -196
- package/build/dts/Config.d.ts.map +0 -1
- package/build/dts/Hook/Claude.d.ts +0 -13
- package/build/dts/Hook/Claude.d.ts.map +0 -1
- package/build/dts/Hook/Errors.d.ts +0 -20
- package/build/dts/Hook/Errors.d.ts.map +0 -1
- package/build/dts/Hook/Opencode.d.ts +0 -13
- package/build/dts/Hook/Opencode.d.ts.map +0 -1
- package/build/dts/Hook/SnapshotNote.d.ts +0 -12
- package/build/dts/Hook/SnapshotNote.d.ts.map +0 -1
- package/build/dts/Init/ClaudeAdapter.d.ts +0 -61
- package/build/dts/Init/ClaudeAdapter.d.ts.map +0 -1
- package/build/dts/Init/ClaudeProfile.d.ts +0 -78
- package/build/dts/Init/ClaudeProfile.d.ts.map +0 -1
- package/build/dts/Init/Domain.d.ts +0 -139
- package/build/dts/Init/Domain.d.ts.map +0 -1
- package/build/dts/Init/HarnessAdapter.d.ts +0 -33
- package/build/dts/Init/HarnessAdapter.d.ts.map +0 -1
- package/build/dts/Init/HarnessDetector.d.ts +0 -19
- package/build/dts/Init/HarnessDetector.d.ts.map +0 -1
- package/build/dts/Init/HarnessRegistry.d.ts +0 -50
- package/build/dts/Init/HarnessRegistry.d.ts.map +0 -1
- package/build/dts/Init/MutationTransaction.d.ts +0 -96
- package/build/dts/Init/MutationTransaction.d.ts.map +0 -1
- package/build/dts/Init/Service.d.ts +0 -72
- package/build/dts/Init/Service.d.ts.map +0 -1
- package/build/dts/Init/StandardAdapters.d.ts +0 -42
- package/build/dts/Init/StandardAdapters.d.ts.map +0 -1
- package/build/dts/Init/Status.d.ts +0 -149
- package/build/dts/Init/Status.d.ts.map +0 -1
- package/build/dts/Install/Claude/Hook.d.ts +0 -120
- package/build/dts/Install/Claude/Hook.d.ts.map +0 -1
- package/build/dts/Install/Claude/Mcp.d.ts +0 -48
- package/build/dts/Install/Claude/Mcp.d.ts.map +0 -1
- package/build/dts/Install/Claude/Skill.d.ts +0 -23
- package/build/dts/Install/Claude/Skill.d.ts.map +0 -1
- package/build/dts/Install/Codex/Mcp.d.ts +0 -45
- package/build/dts/Install/Codex/Mcp.d.ts.map +0 -1
- package/build/dts/Install/Codex/Skill.d.ts +0 -22
- package/build/dts/Install/Codex/Skill.d.ts.map +0 -1
- package/build/dts/Install/Cursor/Mcp.d.ts +0 -45
- package/build/dts/Install/Cursor/Mcp.d.ts.map +0 -1
- package/build/dts/Install/Cursor/Skill.d.ts +0 -29
- package/build/dts/Install/Cursor/Skill.d.ts.map +0 -1
- package/build/dts/Install/Domain.d.ts +0 -103
- package/build/dts/Install/Domain.d.ts.map +0 -1
- package/build/dts/Install/Hook.d.ts +0 -30
- package/build/dts/Install/Hook.d.ts.map +0 -1
- package/build/dts/Install/Mcp.d.ts +0 -28
- package/build/dts/Install/Mcp.d.ts.map +0 -1
- package/build/dts/Install/Opencode/Hook.d.ts +0 -24
- package/build/dts/Install/Opencode/Hook.d.ts.map +0 -1
- package/build/dts/Install/Opencode/Mcp.d.ts +0 -47
- package/build/dts/Install/Opencode/Mcp.d.ts.map +0 -1
- package/build/dts/Install/Opencode/Skill.d.ts +0 -26
- package/build/dts/Install/Opencode/Skill.d.ts.map +0 -1
- package/build/dts/Install/Skill.d.ts +0 -32
- package/build/dts/Install/Skill.d.ts.map +0 -1
- package/build/dts/Install/Uninstall.d.ts +0 -32
- package/build/dts/Install/Uninstall.d.ts.map +0 -1
- package/build/dts/MarkdownAnsi.d.ts +0 -29
- package/build/dts/MarkdownAnsi.d.ts.map +0 -1
- package/build/dts/Mcp/ExpandDocs.d.ts +0 -19
- package/build/dts/Mcp/ExpandDocs.d.ts.map +0 -1
- package/build/dts/Mcp/RequestHeaders.d.ts.map +0 -1
- package/build/dts/Mcp/Server.d.ts.map +0 -1
- package/build/dts/Mcp/Toolkit.d.ts +0 -3
- package/build/dts/Mcp/Toolkit.d.ts.map +0 -1
- package/build/dts/Mcp/tools/Citations.d.ts +0 -266
- package/build/dts/Mcp/tools/Citations.d.ts.map +0 -1
- package/build/dts/Mcp/tools/Fetch.d.ts +0 -168
- package/build/dts/Mcp/tools/Fetch.d.ts.map +0 -1
- package/build/dts/SecureFile.d.ts +0 -23
- package/build/dts/SecureFile.d.ts.map +0 -1
- package/build/dts/Snippets.d.ts +0 -18
- package/build/dts/Snippets.d.ts.map +0 -1
- package/build/dts/Telemetry.d.ts +0 -30
- package/build/dts/Telemetry.d.ts.map +0 -1
- package/build/dts/Version.d.ts +0 -2
- package/build/dts/Version.d.ts.map +0 -1
- package/build/dts/Xdg.d.ts +0 -11
- package/build/dts/Xdg.d.ts.map +0 -1
- package/build/dts/index.d.ts.map +0 -1
- package/build/dts/main.d.ts +0 -3
- package/build/dts/main.d.ts.map +0 -1
- package/build/esm/ApiClient.js +0 -305
- package/build/esm/ApiClient.js.map +0 -1
- package/build/esm/Auth/Domain.js +0 -56
- package/build/esm/Auth/Domain.js.map +0 -1
- package/build/esm/Auth/ManualAuthorization.js +0 -253
- package/build/esm/Auth/ManualAuthorization.js.map +0 -1
- package/build/esm/Auth/PendingInit.js +0 -267
- package/build/esm/Auth/PendingInit.js.map +0 -1
- package/build/esm/Auth/Pkce.js +0 -23
- package/build/esm/Auth/Pkce.js.map +0 -1
- package/build/esm/Auth/SetupGrantAuthorization.js +0 -91
- package/build/esm/Auth/SetupGrantAuthorization.js.map +0 -1
- package/build/esm/Authentication.js +0 -143
- package/build/esm/Authentication.js.map +0 -1
- package/build/esm/BrowserOAuth.js +0 -251
- package/build/esm/BrowserOAuth.js.map +0 -1
- package/build/esm/CommandPath.js +0 -31
- package/build/esm/CommandPath.js.map +0 -1
- package/build/esm/Commands/Fetch.js +0 -119
- package/build/esm/Commands/Fetch.js.map +0 -1
- package/build/esm/Commands/Hook.js +0 -20
- package/build/esm/Commands/Hook.js.map +0 -1
- package/build/esm/Commands/Init.js +0 -371
- package/build/esm/Commands/Init.js.map +0 -1
- package/build/esm/Commands/Mcp.js +0 -19
- package/build/esm/Commands/Mcp.js.map +0 -1
- package/build/esm/Commands/McpRun.js +0 -15
- package/build/esm/Commands/McpRun.js.map +0 -1
- package/build/esm/Commands/Search.js +0 -46
- package/build/esm/Commands/Search.js.map +0 -1
- package/build/esm/Commands/Skill.js +0 -17
- package/build/esm/Commands/Skill.js.map +0 -1
- package/build/esm/Commands/Status.js +0 -186
- package/build/esm/Commands/Status.js.map +0 -1
- package/build/esm/Commands/Telemetry.js +0 -23
- package/build/esm/Commands/Telemetry.js.map +0 -1
- package/build/esm/Commands/Uninstall.js +0 -28
- package/build/esm/Commands/Uninstall.js.map +0 -1
- package/build/esm/Config.js +0 -619
- package/build/esm/Config.js.map +0 -1
- package/build/esm/Hook/Claude.js +0 -74
- package/build/esm/Hook/Claude.js.map +0 -1
- package/build/esm/Hook/Errors.js +0 -18
- package/build/esm/Hook/Errors.js.map +0 -1
- package/build/esm/Hook/Opencode.js +0 -50
- package/build/esm/Hook/Opencode.js.map +0 -1
- package/build/esm/Hook/SnapshotNote.js +0 -65
- package/build/esm/Hook/SnapshotNote.js.map +0 -1
- package/build/esm/Init/ClaudeAdapter.js +0 -137
- package/build/esm/Init/ClaudeAdapter.js.map +0 -1
- package/build/esm/Init/ClaudeProfile.js +0 -380
- package/build/esm/Init/ClaudeProfile.js.map +0 -1
- package/build/esm/Init/Domain.js +0 -118
- package/build/esm/Init/Domain.js.map +0 -1
- package/build/esm/Init/HarnessAdapter.js +0 -21
- package/build/esm/Init/HarnessAdapter.js.map +0 -1
- package/build/esm/Init/HarnessDetector.js +0 -65
- package/build/esm/Init/HarnessDetector.js.map +0 -1
- package/build/esm/Init/HarnessRegistry.js +0 -58
- package/build/esm/Init/HarnessRegistry.js.map +0 -1
- package/build/esm/Init/MutationTransaction.js +0 -494
- package/build/esm/Init/MutationTransaction.js.map +0 -1
- package/build/esm/Init/Service.js +0 -319
- package/build/esm/Init/Service.js.map +0 -1
- package/build/esm/Init/StandardAdapters.js +0 -116
- package/build/esm/Init/StandardAdapters.js.map +0 -1
- package/build/esm/Init/Status.js +0 -215
- package/build/esm/Init/Status.js.map +0 -1
- package/build/esm/Install/Claude/Hook.js +0 -221
- package/build/esm/Install/Claude/Hook.js.map +0 -1
- package/build/esm/Install/Claude/Mcp.js +0 -101
- package/build/esm/Install/Claude/Mcp.js.map +0 -1
- package/build/esm/Install/Claude/Skill.js +0 -56
- package/build/esm/Install/Claude/Skill.js.map +0 -1
- package/build/esm/Install/Codex/Mcp.js +0 -97
- package/build/esm/Install/Codex/Mcp.js.map +0 -1
- package/build/esm/Install/Codex/Skill.js +0 -33
- package/build/esm/Install/Codex/Skill.js.map +0 -1
- package/build/esm/Install/Cursor/Mcp.js +0 -74
- package/build/esm/Install/Cursor/Mcp.js.map +0 -1
- package/build/esm/Install/Cursor/Skill.js +0 -40
- package/build/esm/Install/Cursor/Skill.js.map +0 -1
- package/build/esm/Install/Domain.js +0 -162
- package/build/esm/Install/Domain.js.map +0 -1
- package/build/esm/Install/Hook.js +0 -38
- package/build/esm/Install/Hook.js.map +0 -1
- package/build/esm/Install/Mcp.js +0 -40
- package/build/esm/Install/Mcp.js.map +0 -1
- package/build/esm/Install/Opencode/Hook.js +0 -44
- package/build/esm/Install/Opencode/Hook.js.map +0 -1
- package/build/esm/Install/Opencode/Mcp.js +0 -76
- package/build/esm/Install/Opencode/Mcp.js.map +0 -1
- package/build/esm/Install/Opencode/Skill.js +0 -37
- package/build/esm/Install/Opencode/Skill.js.map +0 -1
- package/build/esm/Install/Skill.js +0 -41
- package/build/esm/Install/Skill.js.map +0 -1
- package/build/esm/Install/Uninstall.js +0 -49
- package/build/esm/Install/Uninstall.js.map +0 -1
- package/build/esm/MarkdownAnsi.js +0 -142
- package/build/esm/MarkdownAnsi.js.map +0 -1
- package/build/esm/Mcp/ExpandDocs.js +0 -56
- package/build/esm/Mcp/ExpandDocs.js.map +0 -1
- package/build/esm/Mcp/RequestHeaders.js +0 -13
- package/build/esm/Mcp/RequestHeaders.js.map +0 -1
- package/build/esm/Mcp/Server.js +0 -12
- package/build/esm/Mcp/Server.js.map +0 -1
- package/build/esm/Mcp/Toolkit.js +0 -16
- package/build/esm/Mcp/Toolkit.js.map +0 -1
- package/build/esm/Mcp/tools/Citations.js +0 -193
- package/build/esm/Mcp/tools/Citations.js.map +0 -1
- package/build/esm/Mcp/tools/Fetch.js +0 -165
- package/build/esm/Mcp/tools/Fetch.js.map +0 -1
- package/build/esm/SecureFile.js +0 -36
- package/build/esm/SecureFile.js.map +0 -1
- package/build/esm/Snippets.js +0 -29
- package/build/esm/Snippets.js.map +0 -1
- package/build/esm/Telemetry.js +0 -157
- package/build/esm/Telemetry.js.map +0 -1
- package/build/esm/Version.js +0 -4
- package/build/esm/Version.js.map +0 -1
- package/build/esm/Xdg.js +0 -15
- package/build/esm/Xdg.js.map +0 -1
- package/build/esm/index.js.map +0 -1
- package/build/esm/main.js.map +0 -1
- package/src/ApiClient.ts +0 -450
- package/src/Auth/Domain.ts +0 -63
- package/src/Auth/ManualAuthorization.ts +0 -296
- package/src/Auth/PendingInit.ts +0 -338
- package/src/Auth/Pkce.ts +0 -26
- package/src/Auth/SetupGrantAuthorization.ts +0 -116
- package/src/Authentication.ts +0 -202
- package/src/BrowserOAuth.ts +0 -359
- package/src/CommandPath.ts +0 -30
- package/src/Commands/Fetch.ts +0 -188
- package/src/Commands/Hook.ts +0 -48
- package/src/Commands/Init.ts +0 -489
- package/src/Commands/Mcp.ts +0 -30
- package/src/Commands/McpRun.ts +0 -25
- package/src/Commands/Search.ts +0 -97
- package/src/Commands/Skill.ts +0 -30
- package/src/Commands/Status.ts +0 -228
- package/src/Commands/Telemetry.ts +0 -42
- package/src/Commands/Uninstall.ts +0 -38
- package/src/Config.ts +0 -840
- package/src/Hook/Claude.ts +0 -81
- package/src/Hook/Errors.ts +0 -19
- package/src/Hook/Opencode.ts +0 -58
- package/src/Hook/SnapshotNote.ts +0 -66
- package/src/Init/ClaudeAdapter.ts +0 -191
- package/src/Init/ClaudeProfile.ts +0 -496
- package/src/Init/Domain.ts +0 -153
- package/src/Init/HarnessAdapter.ts +0 -35
- package/src/Init/HarnessDetector.ts +0 -77
- package/src/Init/HarnessRegistry.ts +0 -87
- package/src/Init/MutationTransaction.ts +0 -747
- package/src/Init/Service.ts +0 -385
- package/src/Init/StandardAdapters.ts +0 -141
- package/src/Init/Status.ts +0 -253
- package/src/Install/Claude/Hook.ts +0 -286
- package/src/Install/Claude/Mcp.ts +0 -129
- package/src/Install/Claude/Skill.ts +0 -77
- package/src/Install/Codex/Mcp.ts +0 -114
- package/src/Install/Codex/Skill.ts +0 -44
- package/src/Install/Cursor/Mcp.ts +0 -85
- package/src/Install/Cursor/Skill.ts +0 -51
- package/src/Install/Domain.ts +0 -221
- package/src/Install/Hook.ts +0 -50
- package/src/Install/Mcp.ts +0 -71
- package/src/Install/Opencode/Hook.ts +0 -55
- package/src/Install/Opencode/Mcp.ts +0 -87
- package/src/Install/Opencode/Skill.ts +0 -48
- package/src/Install/Opencode/expandai-webfetch.d.ts +0 -23
- package/src/Install/Opencode/expandai-webfetch.js +0 -56
- package/src/Install/Skill.ts +0 -57
- package/src/Install/Uninstall.ts +0 -82
- package/src/MarkdownAnsi.ts +0 -162
- package/src/Mcp/ExpandDocs.ts +0 -62
- package/src/Mcp/RequestHeaders.ts +0 -16
- package/src/Mcp/Server.ts +0 -15
- package/src/Mcp/Toolkit.ts +0 -21
- package/src/Mcp/tools/Citations.ts +0 -219
- package/src/Mcp/tools/Fetch.ts +0 -203
- package/src/SecureFile.ts +0 -70
- package/src/Snippets.ts +0 -39
- package/src/Telemetry.ts +0 -186
- package/src/Version.ts +0 -3
- package/src/Xdg.ts +0 -18
- package/src/index.ts +0 -1
- package/src/main.ts +0 -305
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: expandai
|
|
3
|
-
description:
|
|
3
|
+
description: Use when any public http(s) URL needs to be read — documentation, articles, GitHub pages, blog posts, release notes, or a link the user pasted — and before calling WebFetch or curl on it. WebFetch does not execute JavaScript, so also use this whenever a fetch came back empty, truncated, 403, paywalled, or asking you to enable JavaScript. Quoting a captured page requires the citation protocol below. Not for localhost, private or internal hosts, or JSON API endpoints.
|
|
4
4
|
metadata:
|
|
5
5
|
expandai-profile-version: 0.0.2
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# expandai
|
|
9
9
|
|
|
10
|
+
**Before answering from a page you fetched, read the Citations section below.**
|
|
11
|
+
|
|
10
12
|
Fetch any URL as clean markdown.
|
|
11
13
|
|
|
12
14
|
```bash
|
|
@@ -15,7 +17,12 @@ expandai fetch <url>
|
|
|
15
17
|
|
|
16
18
|
## When to use
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
Reach for `expandai fetch` before `curl` or `WebFetch`. It renders the live page in a browser —
|
|
21
|
+
JavaScript, SPAs, bot protection — and returns markdown rather than raw HTML. `WebFetch` has no
|
|
22
|
+
JavaScript engine, so on a client-rendered page it returns the empty shell and nothing else.
|
|
23
|
+
|
|
24
|
+
Skip it for localhost, private or internal hosts, and JSON API endpoints; `curl` is the right
|
|
25
|
+
tool there.
|
|
19
26
|
|
|
20
27
|
## Usage
|
|
21
28
|
|
|
@@ -33,9 +40,8 @@ expandai fetch https://example.com --format json # object-mode { meta, markdown
|
|
|
33
40
|
|
|
34
41
|
## Search a page you already fetched
|
|
35
42
|
|
|
36
|
-
Every fetch produces a snapshot handle (`meta.snapshotId`).
|
|
37
|
-
|
|
38
|
-
extract specific passages by **searching the snapshot by handle** — don't fetch the URL again:
|
|
43
|
+
Every fetch produces a snapshot handle (`meta.snapshotId`). Once a page is captured, extract
|
|
44
|
+
specific passages by **searching the snapshot by handle** — don't fetch the URL again:
|
|
39
45
|
|
|
40
46
|
```bash
|
|
41
47
|
expandai search <snapshotId> "your query" # snippets from the stored snapshot
|
|
@@ -52,7 +58,7 @@ prefer `expandai search` (or `fetch_search`), which reuses the existing capture.
|
|
|
52
58
|
## Citations
|
|
53
59
|
|
|
54
60
|
Cite every claim you take from a fetched page. This is not optional, and it applies however
|
|
55
|
-
the page arrived — `expandai fetch`, `expandai search`, the MCP tools
|
|
61
|
+
the page arrived — `expandai fetch`, `expandai search`, or the MCP tools.
|
|
56
62
|
|
|
57
63
|
Captured markdown stamps an evidence id next to the text it belongs to, written as `{1199}`.
|
|
58
64
|
For each sentence you use, take the id nearest that text and end your answer with:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expandai",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.5",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Unified CLI and MCP server for ExpandAI",
|
|
7
7
|
"author": "ExpandAI",
|
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
|
-
"build/
|
|
17
|
+
"build/assets",
|
|
18
|
+
"build/dts/index.d.ts",
|
|
19
|
+
"build/dts/Mcp/RequestHeaders.d.ts",
|
|
20
|
+
"build/dts/Mcp/Server.d.ts",
|
|
18
21
|
"build/esm",
|
|
19
22
|
"build/skills",
|
|
20
|
-
"src",
|
|
21
23
|
"!**/*.tsbuildinfo"
|
|
22
24
|
],
|
|
23
25
|
"bin": {
|
|
@@ -29,14 +31,14 @@
|
|
|
29
31
|
"types": "./build/dts/index.d.ts",
|
|
30
32
|
"import": "./build/esm/index.js"
|
|
31
33
|
},
|
|
32
|
-
"
|
|
33
|
-
"types": "./
|
|
34
|
-
"import": "./build/esm
|
|
34
|
+
"./Mcp/Server": {
|
|
35
|
+
"types": "./build/dts/Mcp/Server.d.ts",
|
|
36
|
+
"import": "./build/esm/index.js"
|
|
35
37
|
}
|
|
36
38
|
},
|
|
37
39
|
"scripts": {
|
|
38
40
|
"dev": "tsx --watch src/main.ts",
|
|
39
|
-
"build": "tsc -b tsconfig.build.json &&
|
|
41
|
+
"build": "rm -rf build/dts build/esm build/skills build/assets && tsc -b tsconfig.build.json --force && bun build --target=node --minify --external=msgpackr-extract --outfile=build/esm/main.js src/main.ts && bun build --target=node --minify --external=msgpackr-extract --outfile=build/esm/index.js src/index.ts && cp -R skills build/skills && mkdir -p build/assets/opencode && cp assets/opencode/expandai-webfetch.js build/assets/opencode/expandai-webfetch.js && chmod +x build/esm/main.js",
|
|
40
42
|
"build:bin": "bun ./scripts/build.ts --single",
|
|
41
43
|
"build:bin:all": "bun ./scripts/build.ts",
|
|
42
44
|
"check": "tsc -b tsconfig.json",
|
|
@@ -49,7 +51,15 @@
|
|
|
49
51
|
"test:integration": "bun run build && vitest run integration",
|
|
50
52
|
"coverage": "vitest --coverage"
|
|
51
53
|
},
|
|
52
|
-
"
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"effect": "^3.21.2"
|
|
56
|
+
},
|
|
57
|
+
"peerDependenciesMeta": {
|
|
58
|
+
"effect": {
|
|
59
|
+
"optional": true
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
53
63
|
"@effect/ai": "0.35.0",
|
|
54
64
|
"@effect/cli": "0.75.1",
|
|
55
65
|
"@effect/platform": "0.96.1",
|
|
@@ -57,9 +67,7 @@
|
|
|
57
67
|
"@expandai/sdk": "0.18.0",
|
|
58
68
|
"effect": "3.21.2",
|
|
59
69
|
"open": "^11.0.0",
|
|
60
|
-
"smol-toml": "^1.6.1"
|
|
61
|
-
},
|
|
62
|
-
"devDependencies": {
|
|
70
|
+
"smol-toml": "^1.6.1",
|
|
63
71
|
"@anthropic-ai/claude-agent-sdk": "0.3.150",
|
|
64
72
|
"@biomejs/biome": "^2.4.14",
|
|
65
73
|
"@effect/vitest": "0.29.0",
|
package/build/dts/ApiClient.d.ts
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@effect/platform';
|
|
2
|
-
import * as Generated from '@expandai/sdk/Generated';
|
|
3
|
-
import { Effect, Redacted, Schema } from 'effect';
|
|
4
|
-
import { BrowserOAuthService } from './BrowserOAuth.js';
|
|
5
|
-
import { ConfigManager, OAuthTokenExpired } from './Config.js';
|
|
6
|
-
declare const DeviceAuthorizationCreated_base: Schema.Class<DeviceAuthorizationCreated, {
|
|
7
|
-
deviceCode: Schema.Redacted<typeof Schema.NonEmptyString>;
|
|
8
|
-
userCode: typeof Schema.NonEmptyString;
|
|
9
|
-
verificationUri: typeof Schema.URL;
|
|
10
|
-
expiresIn: Schema.filter<typeof Schema.Int>;
|
|
11
|
-
interval: Schema.filter<typeof Schema.Int>;
|
|
12
|
-
}, Schema.Struct.Encoded<{
|
|
13
|
-
deviceCode: Schema.Redacted<typeof Schema.NonEmptyString>;
|
|
14
|
-
userCode: typeof Schema.NonEmptyString;
|
|
15
|
-
verificationUri: typeof Schema.URL;
|
|
16
|
-
expiresIn: Schema.filter<typeof Schema.Int>;
|
|
17
|
-
interval: Schema.filter<typeof Schema.Int>;
|
|
18
|
-
}>, never, {
|
|
19
|
-
readonly deviceCode: Redacted.Redacted<string>;
|
|
20
|
-
} & {
|
|
21
|
-
readonly expiresIn: number;
|
|
22
|
-
} & {
|
|
23
|
-
readonly interval: number;
|
|
24
|
-
} & {
|
|
25
|
-
readonly userCode: string;
|
|
26
|
-
} & {
|
|
27
|
-
readonly verificationUri: URL;
|
|
28
|
-
}, {}, {}>;
|
|
29
|
-
export declare class DeviceAuthorizationCreated extends DeviceAuthorizationCreated_base {
|
|
30
|
-
}
|
|
31
|
-
declare const ManualAuthorizationTokenResponse: Schema.Struct<{
|
|
32
|
-
access_token: Schema.Redacted<typeof Schema.NonEmptyString>;
|
|
33
|
-
refresh_token: Schema.Redacted<typeof Schema.NonEmptyString>;
|
|
34
|
-
token_type: typeof Schema.NonEmptyString;
|
|
35
|
-
expires_in: Schema.filter<typeof Schema.Number>;
|
|
36
|
-
scope: Schema.optional<typeof Schema.String>;
|
|
37
|
-
}>;
|
|
38
|
-
export type ManualAuthorizationTokenResponse = typeof ManualAuthorizationTokenResponse.Type;
|
|
39
|
-
/**
|
|
40
|
-
* RFC 8628 §3.5 poll outcomes. These are results, not errors: an agent-driven
|
|
41
|
-
* CLI returns immediately on every one of them, and only a transport failure
|
|
42
|
-
* is exceptional.
|
|
43
|
-
*/
|
|
44
|
-
export type DevicePollOutcome = {
|
|
45
|
-
readonly _tag: 'Tokens';
|
|
46
|
-
readonly token: ManualAuthorizationTokenResponse;
|
|
47
|
-
} | {
|
|
48
|
-
readonly _tag: 'Pending';
|
|
49
|
-
} | {
|
|
50
|
-
readonly _tag: 'SlowDown';
|
|
51
|
-
} | {
|
|
52
|
-
readonly _tag: 'Denied';
|
|
53
|
-
} | {
|
|
54
|
-
readonly _tag: 'Expired';
|
|
55
|
-
} | {
|
|
56
|
-
readonly _tag: 'Invalid';
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* The server refused for a reason a fresh code cannot fix — a misconfigured
|
|
60
|
-
* client, resource, or scope. Distinct from `Invalid` because the recovery is
|
|
61
|
-
* opposite: `Invalid` means start over, this means stop and report. Carries
|
|
62
|
-
* the server's own `error` so the message names the actual cause instead of
|
|
63
|
-
* guessing.
|
|
64
|
-
*/
|
|
65
|
-
| {
|
|
66
|
-
readonly _tag: 'Refused';
|
|
67
|
-
readonly error: string;
|
|
68
|
-
readonly description?: string;
|
|
69
|
-
};
|
|
70
|
-
declare const ManualAuthorizationApiError_base: Schema.TaggedErrorClass<ManualAuthorizationApiError, "ManualAuthorizationApiError", {
|
|
71
|
-
readonly _tag: Schema.tag<"ManualAuthorizationApiError">;
|
|
72
|
-
} & {
|
|
73
|
-
operation: Schema.Literal<["create", "poll"]>;
|
|
74
|
-
kind: Schema.Literal<["request_failed", "rejected", "invalid_response"]>;
|
|
75
|
-
status: Schema.optional<typeof Schema.Number>;
|
|
76
|
-
recoverable: typeof Schema.Boolean;
|
|
77
|
-
}>;
|
|
78
|
-
export declare class ManualAuthorizationApiError extends ManualAuthorizationApiError_base {
|
|
79
|
-
get message(): string;
|
|
80
|
-
}
|
|
81
|
-
declare const ApiRequestFailed_base: Schema.TaggedErrorClass<ApiRequestFailed, "ApiRequestFailed", {
|
|
82
|
-
readonly _tag: Schema.tag<"ApiRequestFailed">;
|
|
83
|
-
} & {
|
|
84
|
-
detail: typeof Schema.String;
|
|
85
|
-
}>;
|
|
86
|
-
/**
|
|
87
|
-
* Single user-facing error for any failure crossing the API boundary. The
|
|
88
|
-
* generated client raises a half-dozen status-specific tagged classes plus
|
|
89
|
-
* transport/decode errors; we collapse them here so the rest of the app sees
|
|
90
|
-
* one tag with a ready-made `.message` and never has to know about
|
|
91
|
-
* `Generated.ts` types.
|
|
92
|
-
*/
|
|
93
|
-
export declare class ApiRequestFailed extends ApiRequestFailed_base {
|
|
94
|
-
get message(): string;
|
|
95
|
-
}
|
|
96
|
-
declare const OAuthAuthMethodChanged_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
97
|
-
readonly _tag: "OAuthAuthMethodChanged";
|
|
98
|
-
} & Readonly<A>;
|
|
99
|
-
declare class OAuthAuthMethodChanged extends OAuthAuthMethodChanged_base<Record<string, never>> {
|
|
100
|
-
}
|
|
101
|
-
declare const ManualAuthorizationApiClient_base: Effect.Service.Class<ManualAuthorizationApiClient, "@expandai/cli/ManualAuthorizationApiClient", {
|
|
102
|
-
readonly dependencies: readonly [import("effect/Layer").Layer<HttpClient.HttpClient, never, never>, import("effect/Layer").Layer<ConfigManager, import("effect/ConfigError").ConfigError, never>];
|
|
103
|
-
readonly effect: Effect.Effect<{
|
|
104
|
-
readonly create: (input: {
|
|
105
|
-
readonly harness: 'agent-harnesses';
|
|
106
|
-
readonly scope: 'project' | 'global';
|
|
107
|
-
readonly platform: string;
|
|
108
|
-
readonly machineLabel: string;
|
|
109
|
-
readonly cliVersion: string;
|
|
110
|
-
}) => Effect.Effect<DeviceAuthorizationCreated, import("./Config.js").ConfigParseError | import("./Config.js").CredentialStoreInsecure | ManualAuthorizationApiError | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, never>;
|
|
111
|
-
readonly poll: (deviceCode: Redacted.Redacted<string>) => Effect.Effect<{
|
|
112
|
-
_tag: "Tokens";
|
|
113
|
-
token: {
|
|
114
|
-
readonly access_token: Redacted.Redacted<string>;
|
|
115
|
-
readonly refresh_token: Redacted.Redacted<string>;
|
|
116
|
-
readonly token_type: string;
|
|
117
|
-
readonly expires_in: number;
|
|
118
|
-
readonly scope?: string | undefined;
|
|
119
|
-
};
|
|
120
|
-
} | {
|
|
121
|
-
token?: undefined;
|
|
122
|
-
_tag: "Pending";
|
|
123
|
-
} | {
|
|
124
|
-
token?: undefined;
|
|
125
|
-
_tag: "SlowDown";
|
|
126
|
-
} | {
|
|
127
|
-
token?: undefined;
|
|
128
|
-
_tag: "Denied";
|
|
129
|
-
} | {
|
|
130
|
-
token?: undefined;
|
|
131
|
-
_tag: "Expired";
|
|
132
|
-
} | {
|
|
133
|
-
token?: undefined;
|
|
134
|
-
_tag: "Refused";
|
|
135
|
-
error: string;
|
|
136
|
-
description?: string | undefined;
|
|
137
|
-
} | {
|
|
138
|
-
token?: undefined;
|
|
139
|
-
_tag: "Invalid";
|
|
140
|
-
}, import("./Config.js").ConfigParseError | import("./Config.js").CredentialStoreInsecure | ManualAuthorizationApiError | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, never>;
|
|
141
|
-
}, never, ConfigManager | HttpClient.HttpClient>;
|
|
142
|
-
}>;
|
|
143
|
-
/** Public, unauthenticated HTTP boundary for device-flow CLI authorization. */
|
|
144
|
-
export declare class ManualAuthorizationApiClient extends ManualAuthorizationApiClient_base {
|
|
145
|
-
}
|
|
146
|
-
declare const ApiClient_base: Effect.Service.Class<ApiClient, "@expandai/cli/ApiClient", {
|
|
147
|
-
readonly dependencies: readonly [import("effect/Layer").Layer<HttpClient.HttpClient, never, never>, import("effect/Layer").Layer<ConfigManager, import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<BrowserOAuthService, import("effect/ConfigError").ConfigError, never>];
|
|
148
|
-
readonly scoped: Effect.Effect<{
|
|
149
|
-
readonly fetchFetch: (...args: Parameters<Generated.Client['fetchFetch']>) => Effect.Effect<string, ApiRequestFailed | import("./BrowserOAuth.js").BrowserOAuthRequestFailed | import("./Config.js").ConfigCleanupError | import("./Config.js").ConfigNotWritable | import("./Config.js").ConfigParseError | import("./Config.js").CredentialStoreInsecure | import("./Config.js").NotAuthenticated | OAuthAuthMethodChanged | OAuthTokenExpired | import("effect/ParseResult").ParseError | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, never>;
|
|
150
|
-
readonly fetchFetchResult: (...args: Parameters<Generated.Client['fetchFetchJson']>) => Effect.Effect<import("@expandai/sdk/FetchJson").FetchObjectModeResultWithJson, ApiRequestFailed | import("./BrowserOAuth.js").BrowserOAuthRequestFailed | import("./Config.js").ConfigCleanupError | import("./Config.js").ConfigNotWritable | import("./Config.js").ConfigParseError | import("./Config.js").CredentialStoreInsecure | import("./Config.js").NotAuthenticated | OAuthAuthMethodChanged | OAuthTokenExpired | import("effect/ParseResult").ParseError | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, never>;
|
|
151
|
-
readonly fetchFetchJson: (...args: Parameters<Generated.Client['fetchFetchJson']>) => Effect.Effect<import("@expandai/sdk/FetchJson").FetchObjectModeResultWithJson, ApiRequestFailed | import("./BrowserOAuth.js").BrowserOAuthRequestFailed | import("./Config.js").ConfigCleanupError | import("./Config.js").ConfigNotWritable | import("./Config.js").ConfigParseError | import("./Config.js").CredentialStoreInsecure | import("./Config.js").NotAuthenticated | OAuthAuthMethodChanged | OAuthTokenExpired | import("effect/ParseResult").ParseError | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, never>;
|
|
152
|
-
readonly fetchFetchSearch: (...args: Parameters<Generated.Client['fetchFetchSearch']>) => Effect.Effect<import("@expandai/sdk/FetchJson").FetchSnapshotSearchResultWithJson, ApiRequestFailed | import("./BrowserOAuth.js").BrowserOAuthRequestFailed | import("./Config.js").ConfigCleanupError | import("./Config.js").ConfigNotWritable | import("./Config.js").ConfigParseError | import("./Config.js").CredentialStoreInsecure | import("./Config.js").NotAuthenticated | OAuthAuthMethodChanged | OAuthTokenExpired | import("effect/ParseResult").ParseError | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, never>;
|
|
153
|
-
readonly fetchBatched: (...args: Parameters<Generated.Client['fetchBatched']>) => Effect.Effect<Generated.BatchedRun, ApiRequestFailed | import("./BrowserOAuth.js").BrowserOAuthRequestFailed | import("./Config.js").ConfigCleanupError | import("./Config.js").ConfigNotWritable | import("./Config.js").ConfigParseError | import("./Config.js").CredentialStoreInsecure | import("./Config.js").NotAuthenticated | OAuthAuthMethodChanged | OAuthTokenExpired | import("effect/ParseResult").ParseError | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, never>;
|
|
154
|
-
readonly fetchGetBatched: (...args: Parameters<Generated.Client['fetchGetBatched']>) => Effect.Effect<Generated.BatchedStatus, ApiRequestFailed | import("./BrowserOAuth.js").BrowserOAuthRequestFailed | import("./Config.js").ConfigCleanupError | import("./Config.js").ConfigNotWritable | import("./Config.js").ConfigParseError | import("./Config.js").CredentialStoreInsecure | import("./Config.js").NotAuthenticated | OAuthAuthMethodChanged | OAuthTokenExpired | import("effect/ParseResult").ParseError | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, never>;
|
|
155
|
-
}, never, BrowserOAuthService | ConfigManager | HttpClient.HttpClient>;
|
|
156
|
-
}>;
|
|
157
|
-
/**
|
|
158
|
-
* Resolves outgoing API auth per call. When the current request scope carries
|
|
159
|
-
* an `Authorization` header (via `CurrentRequestHeaders`), that value is
|
|
160
|
-
* forwarded; otherwise auth comes from `~/.config/expandai/config.json`.
|
|
161
|
-
*/
|
|
162
|
-
export declare class ApiClient extends ApiClient_base {
|
|
163
|
-
}
|
|
164
|
-
export {};
|
|
165
|
-
//# sourceMappingURL=ApiClient.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ApiClient.d.ts","sourceRoot":"","sources":["../../src/ApiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAyC,MAAM,kBAAkB,CAAA;AAGpF,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAA;AAEpD,OAAO,EAA4B,MAAM,EAAuB,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEhG,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAe,iBAAiB,EAAE,MAAM,aAAa,CAAA;;;;;;;;;;;;;;;;;;;;;;;;AAG3E,qBAAa,0BAA2B,SAAQ,+BAc9C;CAAG;AAEL,QAAA,MAAM,gCAAgC;;;;;;EAMpC,CAAA;AAEF,MAAM,MAAM,gCAAgC,GAAG,OAAO,gCAAgC,CAAC,IAAI,CAAA;AAE3F;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAC1B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,gCAAgC,CAAA;CAAE,GAC7E;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GAC7B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE;AAC9B;;;;;;GAMG;GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;;;;;;;;;AAItF,qBAAa,2BAA4B,SAAQ,gCAQhD;IACA,IAAI,OAAO,WAIV;CACD;;;;;;AAED;;;;;;GAMG;AACH,qBAAa,gBAAiB,SAAQ,qBAEpC;IACD,IAAI,OAAO,WAEV;CACD;;;;AAcD,cAAM,sBAAuB,SAAQ,4BAA2C,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CAAG;;;;;8BAgFnF,iBAAiB;4BACnB,SAAS,GAAG,QAAQ;+BACjB,MAAM;mCACF,MAAM;iCACR,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA1B/B,+EAA+E;AAC/E,qBAAa,4BAA6B,SAAQ,iCA8HjD;CAAG;;;;uCAmJqB,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;6CAEpC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;2CAEhD,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;6CAE5C,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;yCAEpD,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;4CAEzC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;;;AA3J7E;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,cA0J7B;CAAG"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
/**
|
|
3
|
-
* The OAuth client for browser-approved CLI setup. Distinct from the
|
|
4
|
-
* `expandai-cli` client that `expandai login` uses: that one keeps loopback
|
|
5
|
-
* redirect URIs and must keep showing a consent screen, because Better Auth
|
|
6
|
-
* matches loopback URIs without comparing the port.
|
|
7
|
-
*/
|
|
8
|
-
export declare const CLI_AUTHORIZATION_CLIENT_ID = "expandai-cli-browser";
|
|
9
|
-
export declare const PendingInitKey: Schema.Struct<{
|
|
10
|
-
apiOrigin: typeof Schema.String;
|
|
11
|
-
clientId: Schema.Literal<["expandai-cli-browser"]>;
|
|
12
|
-
harness: Schema.Literal<["agent-harnesses"]>;
|
|
13
|
-
scope: Schema.Literal<["project", "global"]>;
|
|
14
|
-
canonicalScopeRoot: typeof Schema.String;
|
|
15
|
-
}>;
|
|
16
|
-
export type PendingInitKey = typeof PendingInitKey.Type;
|
|
17
|
-
declare const PendingInitRecord_base: Schema.Class<PendingInitRecord, {
|
|
18
|
-
key: Schema.Struct<{
|
|
19
|
-
apiOrigin: typeof Schema.String;
|
|
20
|
-
clientId: Schema.Literal<["expandai-cli-browser"]>;
|
|
21
|
-
harness: Schema.Literal<["agent-harnesses"]>;
|
|
22
|
-
scope: Schema.Literal<["project", "global"]>;
|
|
23
|
-
canonicalScopeRoot: typeof Schema.String;
|
|
24
|
-
}>;
|
|
25
|
-
deviceCode: Schema.Redacted<typeof Schema.String>;
|
|
26
|
-
userCode: typeof Schema.String;
|
|
27
|
-
verificationUri: typeof Schema.String;
|
|
28
|
-
intervalSeconds: typeof Schema.Number;
|
|
29
|
-
nextPollAt: typeof Schema.DateTimeUtc;
|
|
30
|
-
approvalExpiresAt: typeof Schema.DateTimeUtc;
|
|
31
|
-
}, Schema.Struct.Encoded<{
|
|
32
|
-
key: Schema.Struct<{
|
|
33
|
-
apiOrigin: typeof Schema.String;
|
|
34
|
-
clientId: Schema.Literal<["expandai-cli-browser"]>;
|
|
35
|
-
harness: Schema.Literal<["agent-harnesses"]>;
|
|
36
|
-
scope: Schema.Literal<["project", "global"]>;
|
|
37
|
-
canonicalScopeRoot: typeof Schema.String;
|
|
38
|
-
}>;
|
|
39
|
-
deviceCode: Schema.Redacted<typeof Schema.String>;
|
|
40
|
-
userCode: typeof Schema.String;
|
|
41
|
-
verificationUri: typeof Schema.String;
|
|
42
|
-
intervalSeconds: typeof Schema.Number;
|
|
43
|
-
nextPollAt: typeof Schema.DateTimeUtc;
|
|
44
|
-
approvalExpiresAt: typeof Schema.DateTimeUtc;
|
|
45
|
-
}>, never, {
|
|
46
|
-
readonly approvalExpiresAt: import("effect/DateTime").Utc;
|
|
47
|
-
} & {
|
|
48
|
-
readonly deviceCode: import("effect/Redacted").Redacted<string>;
|
|
49
|
-
} & {
|
|
50
|
-
readonly intervalSeconds: number;
|
|
51
|
-
} & {
|
|
52
|
-
readonly key: {
|
|
53
|
-
readonly apiOrigin: string;
|
|
54
|
-
readonly clientId: "expandai-cli-browser";
|
|
55
|
-
readonly harness: "agent-harnesses";
|
|
56
|
-
readonly scope: "global" | "project";
|
|
57
|
-
readonly canonicalScopeRoot: string;
|
|
58
|
-
};
|
|
59
|
-
} & {
|
|
60
|
-
readonly nextPollAt: import("effect/DateTime").Utc;
|
|
61
|
-
} & {
|
|
62
|
-
readonly userCode: string;
|
|
63
|
-
} & {
|
|
64
|
-
readonly verificationUri: string;
|
|
65
|
-
}, {}, {}>;
|
|
66
|
-
/**
|
|
67
|
-
* One pending RFC 8628 device authorization. The `deviceCode` is the whole
|
|
68
|
-
* credential — better-auth binds it to our client id server-side and it never
|
|
69
|
-
* leaves this machine — so the record keeps the same 0600/no-symlink storage
|
|
70
|
-
* discipline the PKCE verifier had.
|
|
71
|
-
*/
|
|
72
|
-
export declare class PendingInitRecord extends PendingInitRecord_base {
|
|
73
|
-
}
|
|
74
|
-
declare const PendingInitCorrupt_base: Schema.TaggedErrorClass<PendingInitCorrupt, "PendingInitCorrupt", {
|
|
75
|
-
readonly _tag: Schema.tag<"PendingInitCorrupt">;
|
|
76
|
-
} & {
|
|
77
|
-
path: typeof Schema.String;
|
|
78
|
-
error: typeof Schema.Defect;
|
|
79
|
-
}>;
|
|
80
|
-
export declare class PendingInitCorrupt extends PendingInitCorrupt_base {
|
|
81
|
-
readonly recoverable = true;
|
|
82
|
-
get message(): string;
|
|
83
|
-
}
|
|
84
|
-
declare const PendingInitStorageError_base: Schema.TaggedErrorClass<PendingInitStorageError, "PendingInitStorageError", {
|
|
85
|
-
readonly _tag: Schema.tag<"PendingInitStorageError">;
|
|
86
|
-
} & {
|
|
87
|
-
path: typeof Schema.String;
|
|
88
|
-
error: typeof Schema.Defect;
|
|
89
|
-
}>;
|
|
90
|
-
export declare class PendingInitStorageError extends PendingInitStorageError_base {
|
|
91
|
-
readonly recoverable = true;
|
|
92
|
-
get message(): string;
|
|
93
|
-
}
|
|
94
|
-
export {};
|
|
95
|
-
//# sourceMappingURL=Domain.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Domain.d.ts","sourceRoot":"","sources":["../../../src/Auth/Domain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,yBAAyB,CAAA;AAEjE,eAAO,MAAM,cAAc;;;;;;EAMzB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvD;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,sBAcrC;CAAG;;;;;;;AAEL,qBAAa,kBAAmB,SAAQ,uBAGtC;IACD,QAAQ,CAAC,WAAW,QAAO;IAE3B,IAAI,OAAO,WAEV;CACD;;;;;;;AAED,qBAAa,uBAAwB,SAAQ,4BAG3C;IACD,QAAQ,CAAC,WAAW,QAAO;IAE3B,IAAI,OAAO,WAEV;CACD"}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { DateTime, Effect, Schema } from 'effect';
|
|
2
|
-
import { ManualAuthorizationApiClient, ManualAuthorizationApiError } from '../ApiClient.js';
|
|
3
|
-
import { ConfigManager } from '../Config.js';
|
|
4
|
-
import { PendingInitStore } from './PendingInit.js';
|
|
5
|
-
export { ALREADY_AUTHENTICATED_MESSAGE, AUTHORIZATION_CONSUMED_MESSAGE, AUTHORIZATION_REQUIRED_MESSAGE, } from '../Init/Domain.js';
|
|
6
|
-
declare const ManualAuthorizationInput_base: Schema.Class<ManualAuthorizationInput, {
|
|
7
|
-
harness: Schema.Literal<["agent-harnesses"]>;
|
|
8
|
-
scope: Schema.Literal<["project", "global"]>;
|
|
9
|
-
cwd: Schema.optional<typeof Schema.String>;
|
|
10
|
-
platform: Schema.optional<typeof Schema.String>;
|
|
11
|
-
}, Schema.Struct.Encoded<{
|
|
12
|
-
harness: Schema.Literal<["agent-harnesses"]>;
|
|
13
|
-
scope: Schema.Literal<["project", "global"]>;
|
|
14
|
-
cwd: Schema.optional<typeof Schema.String>;
|
|
15
|
-
platform: Schema.optional<typeof Schema.String>;
|
|
16
|
-
}>, never, {
|
|
17
|
-
readonly cwd?: string | undefined;
|
|
18
|
-
} & {
|
|
19
|
-
readonly platform?: string | undefined;
|
|
20
|
-
} & {
|
|
21
|
-
readonly harness: "agent-harnesses";
|
|
22
|
-
} & {
|
|
23
|
-
readonly scope: "global" | "project";
|
|
24
|
-
}, {}, {}>;
|
|
25
|
-
export declare class ManualAuthorizationInput extends ManualAuthorizationInput_base {
|
|
26
|
-
}
|
|
27
|
-
declare const ManualAuthorizationRequired_base: Schema.Class<ManualAuthorizationRequired, {
|
|
28
|
-
verificationUri: typeof Schema.String;
|
|
29
|
-
userCode: typeof Schema.NonEmptyString;
|
|
30
|
-
approvalExpiresAt: typeof Schema.DateTimeUtc;
|
|
31
|
-
}, Schema.Struct.Encoded<{
|
|
32
|
-
verificationUri: typeof Schema.String;
|
|
33
|
-
userCode: typeof Schema.NonEmptyString;
|
|
34
|
-
approvalExpiresAt: typeof Schema.DateTimeUtc;
|
|
35
|
-
}>, never, {
|
|
36
|
-
readonly approvalExpiresAt: DateTime.Utc;
|
|
37
|
-
} & {
|
|
38
|
-
readonly userCode: string;
|
|
39
|
-
} & {
|
|
40
|
-
readonly verificationUri: string;
|
|
41
|
-
}, {}, {}>;
|
|
42
|
-
/** What the agent relays: where to approve, and the code to type there. */
|
|
43
|
-
export declare class ManualAuthorizationRequired extends ManualAuthorizationRequired_base {
|
|
44
|
-
}
|
|
45
|
-
declare const TokensSaved_base: Schema.TaggedClass<TokensSaved, "TokensSaved", {
|
|
46
|
-
readonly _tag: Schema.tag<"TokensSaved">;
|
|
47
|
-
}>;
|
|
48
|
-
/**
|
|
49
|
-
* One `advance` call moves the flow as far as it can without blocking, then
|
|
50
|
-
* returns. RFC 8628's polling loop is inverted: the agent re-invokes the CLI,
|
|
51
|
-
* and each invocation polls the token endpoint at most once — or not at all,
|
|
52
|
-
* when the persisted interval says the server would answer `slow_down`.
|
|
53
|
-
*/
|
|
54
|
-
export declare class TokensSaved extends TokensSaved_base {
|
|
55
|
-
}
|
|
56
|
-
declare const AuthorizationPending_base: Schema.TaggedClass<AuthorizationPending, "AuthorizationPending", {
|
|
57
|
-
readonly _tag: Schema.tag<"AuthorizationPending">;
|
|
58
|
-
} & {
|
|
59
|
-
pending: typeof ManualAuthorizationRequired;
|
|
60
|
-
}>;
|
|
61
|
-
export declare class AuthorizationPending extends AuthorizationPending_base {
|
|
62
|
-
}
|
|
63
|
-
export declare const ManualAuthorizationOutcome: Schema.Union<[typeof TokensSaved, typeof AuthorizationPending]>;
|
|
64
|
-
export type ManualAuthorizationOutcome = typeof ManualAuthorizationOutcome.Type;
|
|
65
|
-
declare const ManualAuthorizationDenied_base: Schema.TaggedErrorClass<ManualAuthorizationDenied, "ManualAuthorizationDenied", {
|
|
66
|
-
readonly _tag: Schema.tag<"ManualAuthorizationDenied">;
|
|
67
|
-
} & {
|
|
68
|
-
recoverable: Schema.Literal<[true]>;
|
|
69
|
-
}>;
|
|
70
|
-
export declare class ManualAuthorizationDenied extends ManualAuthorizationDenied_base {
|
|
71
|
-
get message(): string;
|
|
72
|
-
}
|
|
73
|
-
declare const ManualAuthorizationRefused_base: Schema.TaggedErrorClass<ManualAuthorizationRefused, "ManualAuthorizationRefused", {
|
|
74
|
-
readonly _tag: Schema.tag<"ManualAuthorizationRefused">;
|
|
75
|
-
} & {
|
|
76
|
-
error: typeof Schema.String;
|
|
77
|
-
description: Schema.optional<typeof Schema.String>;
|
|
78
|
-
recoverable: Schema.Literal<[false]>;
|
|
79
|
-
}>;
|
|
80
|
-
/**
|
|
81
|
-
* The server refused redemption for a reason a fresh code cannot fix. Kept
|
|
82
|
-
* separate from every other failure because the correct response is the
|
|
83
|
-
* opposite of the usual one: do not start over, stop and report. Re-minting
|
|
84
|
-
* here is what produced an endless approve loop — each new code is approved by
|
|
85
|
-
* the user and then refused identically, with nothing surfaced.
|
|
86
|
-
*/
|
|
87
|
-
export declare class ManualAuthorizationRefused extends ManualAuthorizationRefused_base {
|
|
88
|
-
get message(): string;
|
|
89
|
-
}
|
|
90
|
-
declare const ManualAuthorizationCredentialSaveFailed_base: Schema.TaggedErrorClass<ManualAuthorizationCredentialSaveFailed, "ManualAuthorizationCredentialSaveFailed", {
|
|
91
|
-
readonly _tag: Schema.tag<"ManualAuthorizationCredentialSaveFailed">;
|
|
92
|
-
} & {
|
|
93
|
-
recoverable: Schema.Literal<[false]>;
|
|
94
|
-
}>;
|
|
95
|
-
export declare class ManualAuthorizationCredentialSaveFailed extends ManualAuthorizationCredentialSaveFailed_base {
|
|
96
|
-
get message(): string;
|
|
97
|
-
}
|
|
98
|
-
declare const ManualAuthorization_base: Effect.Service.Class<ManualAuthorization, "@expandai/cli/Auth/ManualAuthorization", {
|
|
99
|
-
readonly dependencies: readonly [import("effect/Layer").Layer<ConfigManager, import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<PendingInitStore, import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<ManualAuthorizationApiClient, import("effect/ConfigError").ConfigError, never>];
|
|
100
|
-
readonly effect: Effect.Effect<{
|
|
101
|
-
readonly advance: (input: ManualAuthorizationInput) => Effect.Effect<AuthorizationPending | TokensSaved, import("../Config.js").ConfigParseError | import("../Config.js").CredentialStoreInsecure | ManualAuthorizationApiError | ManualAuthorizationCredentialSaveFailed | ManualAuthorizationDenied | ManualAuthorizationRefused | import("./Domain.js").PendingInitCorrupt | import("./Domain.js").PendingInitStorageError | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, never>;
|
|
102
|
-
readonly redeemPreApproved: (deviceCode: import("effect/Redacted").Redacted<string>) => Effect.Effect<undefined, import("../Config.js").ConfigParseError | import("../Config.js").CredentialStoreInsecure | ManualAuthorizationApiError | ManualAuthorizationCredentialSaveFailed | ManualAuthorizationDenied | ManualAuthorizationRefused | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, never>;
|
|
103
|
-
}, never, ConfigManager | ManualAuthorizationApiClient | PendingInitStore>;
|
|
104
|
-
}>;
|
|
105
|
-
export declare class ManualAuthorization extends ManualAuthorization_base {
|
|
106
|
-
}
|
|
107
|
-
//# sourceMappingURL=ManualAuthorization.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ManualAuthorization.d.ts","sourceRoot":"","sources":["../../../src/Auth/ManualAuthorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAY,MAAM,EAAkB,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC3E,OAAO,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAA;AAC3F,OAAO,EAAE,aAAa,EAAe,MAAM,cAAc,CAAA;AAIzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,EACN,6BAA6B,EAC7B,8BAA8B,EAC9B,8BAA8B,GAC9B,MAAM,mBAAmB,CAAA;;;;;;;;;;;;;;;;;;;;AAO1B,qBAAa,wBAAyB,SAAQ,6BAK5C;CAAG;;;;;;;;;;;;;;;;AAEL,2EAA2E;AAC3E,qBAAa,2BAA4B,SAAQ,gCAM/C;CAAG;;;;AAEL;;;;;GAKG;AACH,qBAAa,WAAY,SAAQ,gBAAoD;CAAG;;;;;;AAExF,qBAAa,oBAAqB,SAAQ,yBAExC;CAAG;AAEL,eAAO,MAAM,0BAA0B,iEAAkD,CAAA;AACzF,MAAM,MAAM,0BAA0B,GAAG,OAAO,0BAA0B,CAAC,IAAI,CAAA;;;;;;AAE/E,qBAAa,yBAA0B,SAAQ,8BAK9C;IACA,IAAI,OAAO,WAEV;CACD;;;;;;;;AAED;;;;;;GAMG;AACH,qBAAa,0BAA2B,SAAQ,+BAO/C;IACA,IAAI,OAAO,WAGV;CACD;;;;;;AAED,qBAAa,uCAAwC,SAAQ,4CAK5D;IACA,IAAI,OAAO,WAEV;CACD;;;;;;;;AAcD,qBAAa,mBAAoB,SAAQ,wBA8LxC;CAAG"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { FileSystem, Path } from '@effect/platform';
|
|
2
|
-
import { NodeContext } from '@effect/platform-node';
|
|
3
|
-
import { Effect, Option } from 'effect';
|
|
4
|
-
import { PendingInitCorrupt, type PendingInitKey, PendingInitRecord, PendingInitStorageError } from './Domain.js';
|
|
5
|
-
/** Canonical, collision-free serialization of all pending authorization key fields. */
|
|
6
|
-
export declare function serializePendingInitKey(key: PendingInitKey): string;
|
|
7
|
-
declare const PendingInitStore_base: Effect.Service.Class<PendingInitStore, "@expandai/cli/Auth/PendingInitStore", {
|
|
8
|
-
readonly dependencies: readonly [import("effect/Layer").Layer<NodeContext.NodeContext, never, never>];
|
|
9
|
-
readonly effect: Effect.Effect<{
|
|
10
|
-
readonly pendingPath: string;
|
|
11
|
-
readonly get: (key: {
|
|
12
|
-
readonly apiOrigin: string;
|
|
13
|
-
readonly clientId: "expandai-cli-browser";
|
|
14
|
-
readonly harness: "agent-harnesses";
|
|
15
|
-
readonly scope: "global" | "project";
|
|
16
|
-
readonly canonicalScopeRoot: string;
|
|
17
|
-
}) => Effect.Effect<Option.Option<PendingInitRecord>, PendingInitCorrupt | PendingInitStorageError, never>;
|
|
18
|
-
readonly peek: (key: {
|
|
19
|
-
readonly apiOrigin: string;
|
|
20
|
-
readonly clientId: "expandai-cli-browser";
|
|
21
|
-
readonly harness: "agent-harnesses";
|
|
22
|
-
readonly scope: "global" | "project";
|
|
23
|
-
readonly canonicalScopeRoot: string;
|
|
24
|
-
}) => Effect.Effect<Option.Option<PendingInitRecord>, PendingInitCorrupt | PendingInitStorageError, never>;
|
|
25
|
-
readonly putIfAbsent: (record: PendingInitRecord) => Effect.Effect<PendingInitRecord, PendingInitCorrupt | PendingInitStorageError, never>;
|
|
26
|
-
readonly replaceIfMatch: (previous: PendingInitRecord, next: PendingInitRecord) => Effect.Effect<boolean, PendingInitCorrupt | PendingInitStorageError, never>;
|
|
27
|
-
readonly removeIfMatch: (record: PendingInitRecord) => Effect.Effect<boolean, PendingInitCorrupt | PendingInitStorageError, never>;
|
|
28
|
-
readonly pruneExpired: () => Effect.Effect<number, PendingInitStorageError, never>;
|
|
29
|
-
readonly canonicalScopeRoot: (scope: "global" | "project", cwd?: any) => Effect.Effect<string, PendingInitStorageError, never>;
|
|
30
|
-
}, import("effect/ConfigError").ConfigError, FileSystem.FileSystem | Path.Path>;
|
|
31
|
-
}>;
|
|
32
|
-
export declare class PendingInitStore extends PendingInitStore_base {
|
|
33
|
-
}
|
|
34
|
-
export {};
|
|
35
|
-
//# sourceMappingURL=PendingInit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PendingInit.d.ts","sourceRoot":"","sources":["../../../src/Auth/PendingInit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,IAAI,EAA0B,MAAM,kBAAkB,CAAA;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAY,MAAM,EAAU,MAAM,EAAU,MAAM,QAAQ,CAAA;AAEjE,OAAO,EAEN,kBAAkB,EAClB,KAAK,cAAc,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,MAAM,aAAa,CAAA;AA0BpB,uFAAuF;AACvF,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,CAQnE;;;;;;;;;;;;;;;;;;;;;;;;;;AAOD,qBAAa,gBAAiB,SAAQ,qBA4RpC;CAAG"}
|
package/build/dts/Auth/Pkce.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Redacted } from 'effect';
|
|
2
|
-
/** PKCE code verifier. Redacted so it cannot reach a log or a JSON result. */
|
|
3
|
-
export declare function createCodeVerifier(): Redacted.Redacted<string>;
|
|
4
|
-
export declare function codeChallengeFor(verifier: Redacted.Redacted<string>): string;
|
|
5
|
-
/**
|
|
6
|
-
* Opaque high-entropy value for non-PKCE uses such as the OAuth `state`
|
|
7
|
-
* parameter. Same entropy and encoding, different purpose.
|
|
8
|
-
*/
|
|
9
|
-
export declare function createHighEntropySecret(): string;
|
|
10
|
-
//# sourceMappingURL=Pkce.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Pkce.d.ts","sourceRoot":"","sources":["../../../src/Auth/Pkce.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AASjC,8EAA8E;AAC9E,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAE9D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,CAE5E;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Effect, Redacted, Schema } from 'effect';
|
|
2
|
-
import { ConfigManager } from '../Config.js';
|
|
3
|
-
import { ManualAuthorization } from './ManualAuthorization.js';
|
|
4
|
-
interface SetupGrantAuthorizationInput {
|
|
5
|
-
readonly setupToken: Redacted.Redacted<string>;
|
|
6
|
-
readonly harness: 'agent-harnesses';
|
|
7
|
-
readonly scope: 'project' | 'global';
|
|
8
|
-
}
|
|
9
|
-
declare const SetupGrantAuthorizationError_base: Schema.TaggedErrorClass<SetupGrantAuthorizationError, "SetupGrantAuthorizationError", {
|
|
10
|
-
readonly _tag: Schema.tag<"SetupGrantAuthorizationError">;
|
|
11
|
-
} & {
|
|
12
|
-
code: Schema.Literal<["invalid_or_expired", "stored_credential_conflict", "request_failed", "denied", "credential_save_failed", "refused", "config_unreadable"]>;
|
|
13
|
-
recoverable: typeof Schema.Boolean;
|
|
14
|
-
}>;
|
|
15
|
-
export declare class SetupGrantAuthorizationError extends SetupGrantAuthorizationError_base {
|
|
16
|
-
get message(): "An Expand API key is already stored on this machine, and completing this setup would replace it with no way to recover it. Nothing was changed and your setup prompt is still valid. Run `expandai logout` to clear the stored key, then run this setup command again." | "Could not reach Expand to redeem the setup token. Nothing was sent, so the same token is still good — check the network and try again." | "Expand refused to redeem this setup token for a reason a fresh prompt cannot fix — most likely an OAuth client, resource, or scope misconfiguration on the server. Do not request another prompt; report this." | "The Expand config file on this machine could not be read, so setup cannot tell whether completing it would overwrite an existing API key. Nothing was redeemed and your setup prompt is still valid. Run `expandai whoami` to see which file it is, fix or delete it, then run this setup command again." | "The setup token is invalid, expired, or already used. Copy a fresh setup prompt from the Expand dashboard." | "The setup token was redeemed, but the credentials could not be saved on this machine. Fix credential storage — run `expandai whoami` to see the path it uses, and check its permissions — then copy a fresh setup prompt from the Expand dashboard." | "This setup authorization was denied. Copy a fresh setup prompt from the Expand dashboard.";
|
|
17
|
-
}
|
|
18
|
-
declare const SetupGrantAuthorization_base: Effect.Service.Class<SetupGrantAuthorization, "@expandai/cli/Auth/SetupGrantAuthorization", {
|
|
19
|
-
readonly dependencies: readonly [import("effect/Layer").Layer<ConfigManager, import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<ManualAuthorization, import("effect/ConfigError").ConfigError, never>];
|
|
20
|
-
readonly effect: Effect.Effect<{
|
|
21
|
-
readonly authorize: (input: SetupGrantAuthorizationInput) => Effect.Effect<undefined, SetupGrantAuthorizationError, never>;
|
|
22
|
-
}, never, ConfigManager | ManualAuthorization>;
|
|
23
|
-
}>;
|
|
24
|
-
/**
|
|
25
|
-
* Dashboard-minted setup: the "token" in the prompt is a pre-approved RFC 8628
|
|
26
|
-
* device code, already bound to the minting user and pinned to their
|
|
27
|
-
* organization server-side. Redeeming is a single poll of the OAuth token
|
|
28
|
-
* endpoint — better-auth owns generation, expiry and the single-use burn, so
|
|
29
|
-
* there is no redemption protocol of ours left to get wrong.
|
|
30
|
-
*/
|
|
31
|
-
export declare class SetupGrantAuthorization extends SetupGrantAuthorization_base {
|
|
32
|
-
}
|
|
33
|
-
export {};
|
|
34
|
-
//# sourceMappingURL=SetupGrantAuthorization.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetupGrantAuthorization.d.ts","sourceRoot":"","sources":["../../../src/Auth/SetupGrantAuthorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EACN,mBAAmB,EAInB,MAAM,0BAA0B,CAAA;AAEjC,UAAU,4BAA4B;IACrC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IAC9C,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAA;IACnC,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAA;CACpC;;;;;;;AAED,qBAAa,4BAA6B,SAAQ,iCAcjD;IACA,IAAI,OAAO,61CAyBV;CACD;;;;;;;AASD;;;;;;GAMG;AACH,qBAAa,uBAAwB,SAAQ,4BA2C5C;CAAG"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Command } from '@effect/cli';
|
|
2
|
-
import { Effect } from 'effect';
|
|
3
|
-
import { BrowserOAuthService } from './BrowserOAuth.js';
|
|
4
|
-
import { type AuthMethod, ConfigManager } from './Config.js';
|
|
5
|
-
export { type AuthMethodState, authMethodState, isAuthMethodLocallyUsable } from './Config.js';
|
|
6
|
-
import { Uninstall } from './Install/Uninstall.js';
|
|
7
|
-
/** Render a user-facing description of the current auth state. Pure given DateTime.now. */
|
|
8
|
-
export declare const formatAuthStatus: (authMethod: AuthMethod) => Effect.Effect<string, never, never>;
|
|
9
|
-
declare const Authentication_base: Effect.Service.Class<Authentication, "@expandai/cli/Authentication", {
|
|
10
|
-
readonly dependencies: readonly [import("effect/Layer").Layer<ConfigManager, import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<BrowserOAuthService, import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<Uninstall, import("@effect/platform/Error").BadArgument | import("effect/ConfigError").ConfigError, never>];
|
|
11
|
-
readonly effect: Effect.Effect<{
|
|
12
|
-
readonly hasLocallyUsableCredentials: () => Effect.Effect<boolean, import("./Config.js").ConfigParseError | import("./Config.js").CredentialStoreInsecure | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, never>;
|
|
13
|
-
readonly loginWithBrowser: () => Effect.Effect<void, unknown, never>;
|
|
14
|
-
readonly login: () => Effect.Effect<void, unknown, import("@effect/platform/Terminal").Terminal>;
|
|
15
|
-
readonly whoami: () => Effect.Effect<void, import("./Config.js").ConfigParseError | import("./Config.js").CredentialStoreInsecure | import("./Config.js").NotAuthenticated | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, never>;
|
|
16
|
-
readonly logout: () => Effect.Effect<void, import("./Config.js").ConfigCleanupError | import("./Config.js").ConfigNotWritable | import("./Config.js").CredentialStoreInsecure | import("./Install/Domain.js").McpParseError | import("./Install/Domain.js").McpWriteError | import("effect/ParseResult").ParseError | import("@effect/platform/Terminal").QuitException | import("@effect/platform/Error").PlatformError, import("@effect/platform/Terminal").Terminal>;
|
|
17
|
-
}, never, BrowserOAuthService | ConfigManager | Uninstall>;
|
|
18
|
-
}>;
|
|
19
|
-
export declare class Authentication extends Authentication_base {
|
|
20
|
-
}
|
|
21
|
-
export declare const LoginCommand: Command.Command<"login", Authentication | import("@effect/platform/Terminal").Terminal, unknown, {}>;
|
|
22
|
-
export declare const WhoamiCommand: Command.Command<"whoami", Authentication, import("./Config.js").ConfigParseError | import("./Config.js").CredentialStoreInsecure | import("./Config.js").NotAuthenticated | import("effect/ConfigError").ConfigError | import("@effect/platform/Error").PlatformError, {}>;
|
|
23
|
-
export declare const LogoutCommand: Command.Command<"logout", Authentication | import("@effect/platform/Terminal").Terminal, import("./Config.js").ConfigCleanupError | import("./Config.js").ConfigNotWritable | import("./Config.js").CredentialStoreInsecure | import("./Install/Domain.js").McpParseError | import("./Install/Domain.js").McpWriteError | import("effect/ParseResult").ParseError | import("@effect/platform/Terminal").QuitException | import("@effect/platform/Error").PlatformError, {}>;
|
|
24
|
-
//# sourceMappingURL=Authentication.d.ts.map
|