@kamilio/wire 0.1.72 → 0.1.74

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.
Files changed (40) hide show
  1. package/README.md +1 -1
  2. package/dist/adapters/claude.d.ts +3 -2
  3. package/dist/adapters/claude.d.ts.map +1 -1
  4. package/dist/adapters/claude.js +92 -77
  5. package/dist/adapters/claude.js.map +1 -1
  6. package/dist/adapters/root.d.ts +4 -0
  7. package/dist/adapters/root.d.ts.map +1 -1
  8. package/dist/adapters/root.js +16 -8
  9. package/dist/adapters/root.js.map +1 -1
  10. package/dist/auth.d.ts +2 -1
  11. package/dist/auth.d.ts.map +1 -1
  12. package/dist/auth.js +8 -2
  13. package/dist/auth.js.map +1 -1
  14. package/dist/cli.js +2 -2
  15. package/dist/cli.js.map +1 -1
  16. package/dist/executable.js +3 -3
  17. package/dist/executable.js.map +1 -1
  18. package/node_modules/provider-asana/dist/asana-task.d.ts +4 -0
  19. package/node_modules/provider-asana/dist/asana-task.d.ts.map +1 -1
  20. package/node_modules/provider-asana/dist/asana-task.js +11 -1
  21. package/node_modules/provider-asana/dist/asana-task.js.map +1 -1
  22. package/node_modules/provider-asana/dist/index.d.ts +1 -1
  23. package/node_modules/provider-asana/dist/index.d.ts.map +1 -1
  24. package/node_modules/provider-asana/dist/index.js +1 -1
  25. package/node_modules/provider-asana/dist/index.js.map +1 -1
  26. package/node_modules/provider-asana/src/asana-task.ts +9 -1
  27. package/node_modules/provider-asana/src/index.ts +1 -1
  28. package/node_modules/wire-core/dist/runtime/chrome.d.ts.map +1 -1
  29. package/node_modules/wire-core/dist/runtime/chrome.js +13 -6
  30. package/node_modules/wire-core/dist/runtime/chrome.js.map +1 -1
  31. package/node_modules/wire-core/dist/runtime/cookies.js +1 -1
  32. package/node_modules/wire-core/dist/runtime/cookies.js.map +1 -1
  33. package/node_modules/wire-core/src/runtime/chrome.ts +13 -5
  34. package/node_modules/wire-core/src/runtime/cookies.ts +1 -1
  35. package/package.json +1 -1
  36. package/src/adapters/claude.ts +76 -61
  37. package/src/adapters/root.ts +16 -8
  38. package/src/auth.ts +10 -3
  39. package/src/cli.ts +2 -2
  40. package/src/executable.ts +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"cookies.js","sourceRoot":"","sources":["../../src/runtime/cookies.ts"],"names":[],"mappings":"AAIA,SAAS,YAAY,CAAC,MAAc;IAClC,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,YAAY,CAAC,KAA8B,EAAE,MAAc;IAClE,OAAO,QAAQ,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;AAClE,CAAC;AAED,SAAS,UAAU,CAAC,KAA8B;IAChD,OAAO,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;AAC3D,CAAC;AAED,SAAS,aAAa,CAAC,KAA8B;IACnD,IAAI,SAAS,IAAI,KAAK;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAE,CAAC,CAAC;IACzD,IAAI,gBAAgB,IAAI,KAAK;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAE,CAAC,CAAC;IACvE,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,cAAc,CAAC,KAA8B;IACpD,OAAO,UAAU,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AAClE,CAAC;AAED,SAAS,YAAY,CAAC,KAA8B;IAClD,OAAO,QAAQ,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7D,CAAC;AAED,SAA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C,CAAC,CAAC,cAAc,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAC,aAAa;gBAAE,MAAM,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;QAC1I,CAAC;QACD,MAAM,EAAE,KAAK,EAAE,OAAe,EAAE,EAAE;YAChC,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC;gBAAE,IAAI,MAAM,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC;oBAAE,MAAM,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtG,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -151,14 +151,14 @@ async function closeChrome(chrome: ReturnType<typeof spawn>, connection: ChromeC
151
151
  await closed;
152
152
  }
153
153
 
154
- async function pageDevtoolsUrl(browserUrl: string, domains: readonly string[]): Promise<string> {
154
+ async function pageDevtoolsUrl(browserUrl: string, domains: readonly string[]): Promise<string | undefined> {
155
155
  const endpoint = new URL(browserUrl);
156
156
  endpoint.protocol = "http:";
157
157
  endpoint.pathname = "/json/list";
158
158
  endpoint.search = "";
159
159
  endpoint.hash = "";
160
160
  const targets = await (await fetch(endpoint)).json() as readonly { readonly type: string; readonly url: string; readonly webSocketDebuggerUrl: string }[];
161
- return targets.find((target) => target.type === "page" && domains.some((domain) => new URL(target.url).hostname === domain || new URL(target.url).hostname.endsWith(`.${domain}`)))!.webSocketDebuggerUrl;
161
+ return targets.find((target) => target.type === "page" && URL.canParse(target.url) && domains.some((domain) => new URL(target.url).hostname === domain || new URL(target.url).hostname.endsWith(`.${domain}`)))?.webSocketDebuggerUrl;
162
162
  }
163
163
 
164
164
  function chromeCookies(values: readonly ChromeCookie[], domains: readonly string[]): readonly Cookie[] {
@@ -283,13 +283,21 @@ export async function extractChromeCookies(environment: NodeEnvironment, extract
283
283
  const browserUrl = await devtoolsUrl(chrome.stderr!);
284
284
  const connection = new ChromeConnection(browserUrl);
285
285
  await connection.opened();
286
- const pageConnection = extraction.metadataExpression === undefined ? undefined : new ChromeConnection(await pageDevtoolsUrl(browserUrl, extraction.domains));
287
- if (pageConnection !== undefined) await pageConnection.opened();
288
- if (pageConnection !== undefined) await Promise.race([sleep(2000), interruptPromise]);
286
+ let pageConnection: ChromeConnection | undefined;
287
+ let pageUrl: string | undefined;
289
288
  const currentResult = async (): Promise<ChromeCookieResult> => {
290
289
  const result = await connection.request("Storage.getCookies") as { cookies: readonly ChromeCookie[] };
291
290
  const cookies = chromeCookies(result.cookies, extraction.domains);
292
291
  let metadata: Readonly<Record<string, string>> = Object.freeze({});
292
+ if (extraction.metadataExpression !== undefined) {
293
+ const currentPageUrl = await pageDevtoolsUrl(browserUrl, extraction.domains);
294
+ if (currentPageUrl !== pageUrl || pageConnection?.closed) {
295
+ pageConnection?.close();
296
+ pageUrl = currentPageUrl;
297
+ pageConnection = pageUrl === undefined ? undefined : new ChromeConnection(pageUrl);
298
+ if (pageConnection !== undefined) await pageConnection.opened();
299
+ }
300
+ }
293
301
  if (extraction.metadataExpression !== undefined && pageConnection !== undefined) {
294
302
  const evaluation = await pageConnection.request("Runtime.evaluate", { expression: extraction.metadataExpression, returnByValue: true }) as { result: { value?: Record<string, string> } };
295
303
  if (evaluation.result.value !== undefined) metadata = Object.freeze(evaluation.result.value);
@@ -166,7 +166,7 @@ export function serializeNetscapeCookies(cookies: readonly Cookie[], metadata: R
166
166
 
167
167
  export function createCookiesCapability(filesystem: FilesystemCapability, home: () => string, repositoryRoot?: () => string | undefined, overrideFile?: (service: string) => string | undefined): CookiesCapability {
168
168
  const paths = (service: string) => {
169
- if (service === "ashby" || service === "codesignal") return [cookiesFile(home(), service)];
169
+ if (service === "ashby" || service === "codesignal" || service === "claude") return [cookiesFile(home(), service)];
170
170
  const overridePath = overrideFile?.(service);
171
171
  const repositoryRootPath = repositoryRoot?.();
172
172
  return [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kamilio/wire",
3
- "version": "0.1.72",
3
+ "version": "0.1.74",
4
4
  "description": "Attach Notion, Google Docs, Slack, Gmail, Asana, ChatGPT, and Zoom resources as local Markdown you can sync.",
5
5
  "keywords": [
6
6
  "markdown",
@@ -2,7 +2,7 @@ import { randomUUID } from "node:crypto";
2
2
  import { existsSync } from "node:fs";
3
3
  import { mkdir, mkdtemp, readFile, rename, rm, writeFile } from "node:fs/promises";
4
4
  import { join } from "node:path";
5
- import type { ProcessCapability } from "wire-core";
5
+ import type { Cookie, ProcessCapability, RuntimeCapabilities } from "wire-core";
6
6
 
7
7
  type Summary = { uuid: string; name: string; created_at: string; updated_at: string };
8
8
  type Message = { sender: string; text: string; content: { type: string; text?: string }[]; attachments: { file_name: string }[]; files: { file_name: string }[] };
@@ -26,86 +26,101 @@ export function claudeMarkdown(chat: Chat) {
26
26
  return lines.join("\n").trimEnd() + "\n";
27
27
  }
28
28
 
29
- export async function scrapeClaude(process: ProcessCapability, directory: string) {
30
- const root = join(directory, "claude"), originals = join(root, ".originals");
31
- await mkdir(originals, { recursive: true, mode: 0o700 });
32
- const scratch = await mkdtemp(join(originals, ".download-"));
29
+ export async function claudeSession<T>(process: ProcessCapability, cookies: readonly Cookie[], directory: string, action: (get: <R>(paths: string[]) => Promise<R[]>) => Promise<T>): Promise<T> {
30
+ await mkdir(directory, { recursive: true, mode: 0o700 });
31
+ const scratch = await mkdtemp(join(directory, ".claude-session-"));
33
32
  const args = ["-s=wire-claude-" + randomUUID(), "--raw"];
34
33
  const run = (...cmd: string[]) => process.execute("playwright-cli", [...args, ...cmd]);
35
- let saved = 0, unchanged = 0, edited = 0;
36
- // Use a file for responses: a single conversation can exceed the subprocess stdout limit.
37
34
  async function get<T>(paths: string[]): Promise<T[]> {
38
35
  const path = join(scratch, "response.json");
39
36
  await rm(path, { force: true });
40
- const result = await run("eval", `async () => {
41
- if(location.origin !== "https://claude.ai") throw Error("Sign in to claude.ai in Chrome.");
37
+ await run("eval", `async () => {
38
+ if(location.origin !== "https://claude.ai") throw Error("Run wire claude login to sign in.");
42
39
  return Promise.all(${JSON.stringify(paths)}.map(async path => {
43
40
  const r = await fetch(path);
44
- if (!r.ok) throw Error("Claude HTTP " + r.status());
41
+ if (!r.ok) throw Error("Claude HTTP " + r.status + ". Run wire claude login if the session expired.");
45
42
  return r.json();
46
43
  }));
47
44
  }`, "--filename=" + path);
48
- if (!existsSync(path)) throw new Error("Claude download failed: " + result.stdout.slice(0, 220));
45
+ if (!existsSync(path)) throw new Error("Claude request failed. Run `wire claude login` to refresh the saved session.");
49
46
  return JSON.parse(await readFile(path, "utf8"));
50
47
  }
51
48
  try {
52
- await process.execute("hey-browser", ["run", "--", "playwright-cli", ...args, "attach", "--extension=chrome"]);
49
+ const state = join(scratch, "state.json");
50
+ await writeFile(state, JSON.stringify({ cookies: cookies.map(cookie => ({
51
+ name: cookie.name, value: cookie.value, domain: cookie.domain, path: cookie.path,
52
+ expires: cookie.expires === 0 ? -1 : cookie.expires, httpOnly: cookie.httpOnly, secure: cookie.secure, sameSite: "Lax",
53
+ })), origins: [] }), { mode: 0o600 });
54
+ await run("open", "about:blank", "--browser=chrome", "--profile=" + join(scratch, "chrome"));
53
55
  try {
54
- await run("tab-new", "https://claude.ai/");
55
- try {
56
- const [orgs] = await get<{ uuid: string; capabilities: string[] }[]>(["/api/organizations"]);
57
- const chats = orgs!.filter(org => org.capabilities.includes("chat"));
58
- if (!chats.length) throw new Error("No Claude chat workspace found. Sign in to claude.ai in Chrome.");
59
- for (const org of chats) {
60
- if (!uuid.test(org.uuid)) throw new Error("Invalid Claude workspace ID.");
61
- const base = "/api/organizations/" + org.uuid;
62
- const seen = new Set<string>();
63
- for (const archived of [false, true]) {
64
- for (let offset = 0; ;) {
65
- const [page] = await get<{ data: Summary[]; has_more: boolean }>([base + "/chat_conversations_v2?limit=100&archived=" + archived + "&offset=" + offset]);
66
- const pending: Summary[] = [];
67
- const before = seen.size;
68
- for (const summary of page!.data) {
69
- if (!uuid.test(summary.uuid)) throw new Error("Invalid Claude conversation ID.");
70
- if (seen.has(summary.uuid)) continue;
71
- seen.add(summary.uuid);
72
- const raw = join(originals, summary.uuid + ".json");
73
- if (existsSync(raw)) {
74
- const old: Chat = JSON.parse(await readFile(raw, "utf8"));
75
- if (old.updated_at === summary.updated_at && existsSync(join(root, noteName(old)))) { unchanged++; continue; }
76
- }
77
- pending.push(summary);
56
+ await run("state-load", state);
57
+ await run("goto", "https://claude.ai/");
58
+ return await action(get);
59
+ } finally { await run("close"); }
60
+ } finally { await rm(scratch, { recursive: true, force: true }); }
61
+ }
62
+
63
+ export async function scrapeClaude(runtime: RuntimeCapabilities, directory: string) {
64
+ const cookies = await runtime.cookies.loadSaved("claude");
65
+ if (cookies === null) throw new Error("claude cookie authentication is missing or expired. Run `wire claude login` once; other commands reuse saved cookies.");
66
+ const root = join(directory, "claude"), originals = join(root, ".originals");
67
+ await mkdir(originals, { recursive: true, mode: 0o700 });
68
+ const scratch = await mkdtemp(join(originals, ".download-"));
69
+ let saved = 0, unchanged = 0, edited = 0;
70
+ try {
71
+ await claudeSession(runtime.process, cookies, originals, async get => {
72
+ const [orgs] = await get<{ uuid: string; capabilities: string[] }[]>(["/api/organizations"]);
73
+ const chats = orgs!.filter(org => org.capabilities.includes("chat"));
74
+ if (!chats.length) throw new Error("No Claude chat workspace found. Run `wire claude login` to sign in.");
75
+ for (const org of chats) {
76
+ if (!uuid.test(org.uuid)) throw new Error("Invalid Claude workspace ID.");
77
+ const base = "/api/organizations/" + org.uuid;
78
+ const seen = new Set<string>();
79
+ for (const archived of [false, true]) {
80
+ for (let offset = 0; ;) {
81
+ const [page] = await get<{ data: Summary[]; has_more: boolean }>([base + "/chat_conversations_v2?limit=100&archived=" + archived + "&offset=" + offset]);
82
+ const pending: Summary[] = [];
83
+ const before = seen.size;
84
+ for (const summary of page!.data) {
85
+ if (!uuid.test(summary.uuid)) throw new Error("Invalid Claude conversation ID.");
86
+ if (seen.has(summary.uuid)) continue;
87
+ seen.add(summary.uuid);
88
+ const raw = join(originals, summary.uuid + ".json");
89
+ if (existsSync(raw)) {
90
+ const old: Chat = JSON.parse(await readFile(raw, "utf8"));
91
+ if (old.updated_at === summary.updated_at && existsSync(join(root, noteName(old)))) { unchanged++; continue; }
78
92
  }
79
- for (let i = 0; i < pending.length; i += 4) {
80
- const batch = pending.slice(i, i + 4);
81
- const details = await get<Chat>(batch.map(s => base + "/chat_conversations/" + s.uuid + "?tree=True&rendering_mode=messages&render_all_tools=true"));
82
- for (const [j, chat] of details.entries()) {
83
- if (chat.uuid !== batch[j]!.uuid) throw new Error("Claude conversation ID mismatch.");
84
- const raw = join(originals, chat.uuid + ".json"), path = join(root, noteName(chat));
85
- const old: Chat | undefined = existsSync(raw) ? JSON.parse(await readFile(raw, "utf8")) : undefined;
86
- const oldPath = old && join(root, noteName(old));
87
- const markdown = claudeMarkdown(chat);
88
- if (existsSync(path) && path !== oldPath && await readFile(path, "utf8") !== markdown) { edited++; continue; }
89
- if (old && oldPath && existsSync(oldPath)) {
90
- const local = await readFile(oldPath, "utf8");
91
- if (local !== claudeMarkdown(old) && !(oldPath === path && local === markdown)) { edited++; continue; }
92
- }
93
- await writeFile(join(scratch, "note"), markdown, { mode: 0o600 });
94
- await writeFile(join(scratch, "original"), JSON.stringify(chat, null, 2), { mode: 0o600 });
95
- await rename(join(scratch, "note"), path);
96
- await rename(join(scratch, "original"), raw);
97
- if (oldPath && oldPath !== path) await rm(oldPath, { force: true });
98
- saved++;
93
+ pending.push(summary);
94
+ }
95
+ for (let i = 0; i < pending.length; i += 4) {
96
+ const batch = pending.slice(i, i + 4);
97
+ const details = await get<Chat>(batch.map(s => base + "/chat_conversations/" + s.uuid + "?tree=True&rendering_mode=messages&render_all_tools=true"));
98
+ for (const [j, chat] of details.entries()) {
99
+ if (chat.uuid !== batch[j]!.uuid) throw new Error("Claude conversation ID mismatch.");
100
+ const raw = join(originals, chat.uuid + ".json"), path = join(root, noteName(chat));
101
+ const old: Chat | undefined = existsSync(raw) ? JSON.parse(await readFile(raw, "utf8")) : undefined;
102
+ const oldPath = old && join(root, noteName(old));
103
+ const markdown = claudeMarkdown(chat);
104
+ if (existsSync(path) && path !== oldPath && await readFile(path, "utf8") !== markdown) { edited++; continue; }
105
+ if (old && oldPath && existsSync(oldPath)) {
106
+ const local = await readFile(oldPath, "utf8");
107
+ if (local !== claudeMarkdown(old) && !(oldPath === path && local === markdown)) { edited++; continue; }
99
108
  }
109
+ await writeFile(join(scratch, "note"), markdown, { mode: 0o600 });
110
+ await writeFile(join(scratch, "original"), JSON.stringify(chat, null, 2), { mode: 0o600 });
111
+ await rename(join(scratch, "note"), path);
112
+ await rename(join(scratch, "original"), raw);
113
+ if (oldPath && oldPath !== path) await rm(oldPath, { force: true });
114
+ saved++;
100
115
  }
101
- if (!page!.has_more) break;
102
- if (before === seen.size) throw new Error("Claude history pagination stopped advancing.");
103
- offset += page!.data.length;
104
116
  }
117
+ if (!page!.has_more) break;
118
+ if (before === seen.size) throw new Error("Claude history pagination stopped advancing.");
119
+ offset += page!.data.length;
105
120
  }
106
121
  }
107
- } finally { await run("tab-close"); }
108
- } finally { await run("detach"); }
122
+ }
123
+ });
109
124
  } finally { await rm(scratch, { recursive: true, force: true }); }
110
125
  return `Claude: ${saved} saved, ${unchanged} unchanged, ${edited} locally edited and skipped.\n${root}`;
111
126
  }
@@ -17,7 +17,7 @@ export type WireRoot = Group;
17
17
  export type TextInputReader = () => Promise<string>;
18
18
  export type WireRootOptions = Readonly<{ allowPaste: boolean; searchNotion?: (query: string, options: Parameters<typeof searchNotion>[2]) => ReturnType<typeof searchNotion>; codeSignalEdit?: (url: string, path: string, file: string) => ReturnType<typeof editCodeSignal>; codeSignalRun?: (url: string) => ReturnType<typeof runCodeSignal>; shareNotionWithOrg?: (id: string) => Promise<string>; scrapeClaude?: () => Promise<string>; listDocComments?: (url: string) => ReturnType<typeof listDocComments>; changeDocComment?: (action: Parameters<typeof changeDocComment>[1], url: string, value?: string) => ReturnType<typeof changeDocComment>; ashby?: (action: string, arg?: string) => Promise<string>; previewDrive?: (url: string) => Promise<string>; scrapeDrive?: (url?: string, deleteVerifiedPdfs?: boolean, deleteVerifiedDocx?: boolean) => Promise<string>; calendarAgenda?: (date?: string, calendarId?: string) => ReturnType<typeof readAgenda>; latticeSync?: (url: string | undefined, file?: string) => Promise<string>; latticeRequests?: (url: string) => Promise<string>; latticeTemplate?: (url: string) => Promise<string>; latticeFill?: (url: string, file: string) => Promise<string>; scrapeZoom?: () => ReturnType<typeof zoomProvider.scrape> }>;
19
19
 
20
- const authServices = ["ashby", "asana", "chatgpt", "codesignal", "gmail", "google-docs", "notion", "slack", "zoom"] as const;
20
+ const authServices = ["ashby", "asana", "chatgpt", "claude", "codesignal", "gmail", "google-docs", "notion", "slack", "zoom"] as const;
21
21
  const removedCliCommandNames = Object.freeze({
22
22
  create: "Use `wire attach <url>` or `wire <url>`.",
23
23
  fetch: "Use `wire download <url>`.",
@@ -360,6 +360,7 @@ function serviceTitle(service: AuthService): string {
360
360
  ashby: "Ashby",
361
361
  asana: "Asana",
362
362
  chatgpt: "ChatGPT",
363
+ claude: "Claude",
363
364
  codesignal: "CodeSignal",
364
365
  gmail: "Gmail",
365
366
  "google-docs": "Google Docs/Sheets/Slides",
@@ -424,7 +425,7 @@ export const wirePresentation: WirePresentation = Object.freeze({
424
425
  function authGroup(service: AuthService, description: string, loginDescription: string, auth: Auth, readInput: TextInputReader | undefined, options: WireRootOptions): Group {
425
426
  const login = async (paste: boolean | undefined) => {
426
427
  if (paste === true && !options.allowPaste) throw new UserError("Cookie paste is CLI-only.");
427
- return paste === true ? auth.pasteCookies(service, await readInput!()) : service === "ashby" ? auth.extractAshby() : service === "asana" ? auth.extractAsana() : service === "chatgpt" ? auth.extractChatgpt() : service === "codesignal" ? auth.extractCodeSignal() : service === "gmail" ? auth.extractGmail() : service === "google-docs" ? auth.extractGoogleDocs() : service === "notion" ? auth.extractNotion() : service === "slack" ? auth.extractSlack() : auth.extractZoom();
428
+ return paste === true ? auth.pasteCookies(service, await readInput!()) : service === "ashby" ? auth.extractAshby() : service === "asana" ? auth.extractAsana() : service === "chatgpt" ? auth.extractChatgpt() : service === "claude" ? auth.extractClaude() : service === "codesignal" ? auth.extractCodeSignal() : service === "gmail" ? auth.extractGmail() : service === "google-docs" ? auth.extractGoogleDocs() : service === "notion" ? auth.extractNotion() : service === "slack" ? auth.extractSlack() : auth.extractZoom();
428
429
  };
429
430
  const title = serviceTitle(service);
430
431
  return defineGroup({ name: service, description, children: [
@@ -441,6 +442,7 @@ type AsanaExplorer = {
441
442
  tasks(project: string): ReturnType<typeof listAsanaTasks>;
442
443
  show(task: string): Promise<FetchedDocument>;
443
444
  writes?: {
445
+ depend?(task: string, dependency: string): Promise<{ task: string; dependency: string }>;
444
446
  create?(project: string, title: string, section: string, body?: string, assignee?: string): Promise<JsonObject>;
445
447
  move(task: string, project: string, section: string): ReturnType<typeof moveAsanaTask>;
446
448
  edit(task: string, fields: JsonObject): Promise<JsonObject>;
@@ -517,6 +519,11 @@ export function createRoot(wire: Wire, currentDirectory: string, auth?: Auth, re
517
519
  const authCommand = (service: (typeof authServices)[number]) => {
518
520
  const title = serviceTitle(service);
519
521
  const group = authGroup(service, `Manage ${title} login.`, "Capture cookies once; normal commands reuse saved cookies.", auth!, readInput, options);
522
+ if (service === "claude" && options.scrapeClaude) return defineGroup({ ...group, description: "Archive Claude.ai conversations and manage a separate login.", children: [...group.children,
523
+ defineCommand({ name: "scrape", description: "Save active and archived conversations from all your Claude chat workspaces into ./claude using your saved Wire login.", scope: ["cli"], params: S.Object({}),
524
+ handler: () => userFacing(options.scrapeClaude!), render: render<string>(v => v),
525
+ }),
526
+ ] });
520
527
  if (service === "codesignal" && options.codeSignalEdit && options.codeSignalRun) return defineGroup({ ...group,
521
528
  description: "Read, edit, and run live interview code, and manage login.", children: [...group.children,
522
529
  defineCommand({ name: "edit", description: "Replace a file in the current filesystem coding question from a local UTF-8 file.", positional: ["url", "path"],
@@ -600,6 +607,7 @@ export function createRoot(wire: Wire, currentDirectory: string, auth?: Auth, re
600
607
  })] });
601
608
  const writes = asana?.writes;
602
609
  const createTask = writes?.create;
610
+ const depend = writes?.depend;
603
611
  if (service === "asana" && asana !== undefined) return defineGroup({ ...group, description: "Browse Asana projects, edit tasks and comments, and manage login.", children: [...group.children, ...users,
604
612
  defineGroup({ name: "projects", description: "Browse projects.", children: [defineCommand({
605
613
  name: "list", description: "List active projects by workspace and team.", params: S.Object({}),
@@ -627,7 +635,12 @@ export function createRoot(wire: Wire, currentDirectory: string, auth?: Auth, re
627
635
  name: "show", description: "Show a task's properties, custom field IDs, Markdown description, comments, and activity.", positional: ["task"],
628
636
  params: S.Object({ task: S.String({ description: "Asana task ID." }) }),
629
637
  handler: ({ params }) => userFacing(() => asana.show(params.task)), render: wirePresentation.view,
630
- }), ...(createTask ? [defineCommand({
638
+ }), ...(depend ? [defineCommand({
639
+ name: "depend", description: "Make a task depend on another task without changing existing dependencies.", positional: ["task"],
640
+ params: S.Object({ task: S.String({ description: "Task that must wait." }), on: S.String({ description: "Task that must finish first." }) }),
641
+ handler: ({ params }) => userFacing(() => depend(params.task, params.on)),
642
+ render: render<{ task: string; dependency: string }>((result) => `Task ${result.task} depends on ${result.dependency}.`),
643
+ })] : []), ...(createTask ? [defineCommand({
631
644
  name: "create", description: "Create a task in a project section. List sections with wire asana projects show <project>.", positional: ["project"],
632
645
  params: S.Object({
633
646
  project: S.String({ description: "Asana project ID." }),
@@ -717,11 +730,6 @@ export function createRoot(wire: Wire, currentDirectory: string, auth?: Auth, re
717
730
  scope: ["cli", "mcp", "sdk"],
718
731
  children: [
719
732
  defaultAttach,
720
- ...(options.scrapeClaude ? [defineGroup({ name: "claude", description: "Archive Claude.ai conversations.", scope: ["cli"], children: [
721
- defineCommand({ name: "scrape", description: "Save active and archived conversations from all your Claude chat workspaces into ./claude using signed-in Chrome.", scope: ["cli"], params: S.Object({}),
722
- handler: () => userFacing(options.scrapeClaude!), render: render<string>(v => v),
723
- }),
724
- ] })] : []),
725
733
  ...(options.scrapeDrive ? [defineGroup({ name: "gdrive", description: "Download Google Drive folders and spreadsheets.", scope: ["cli"], children: [
726
734
  ...(options.previewDrive ? [defineCommand({ name: "preview", description: "List a Drive folder or read a file without saving it.", scope: ["cli"], positional: ["url"],
727
735
  params: S.Object({ url: S.String({description: "Google Drive folder or file URL."}) }),
package/src/auth.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import { parsePastedCookieMetadata, parsePastedCookies, type ChromeCookieExtraction, type ChromeCookieResult, type Cookie, type NodeEnvironment, type RuntimeCapabilities } from "wire-core";
2
2
 
3
+ import { claudeSession } from "./adapters/claude.js";
3
4
  import { verifyCodeSignal } from "./adapters/codesignal.js";
4
5
  import { ashbySession } from "./adapters/ashby.js";
5
6
 
6
- export type AuthService = "ashby" | "asana" | "chatgpt" | "codesignal" | "gmail" | "google-docs" | "notion" | "slack" | "zoom";
7
+ export type AuthService = "ashby" | "asana" | "chatgpt" | "claude" | "codesignal" | "gmail" | "google-docs" | "notion" | "slack" | "zoom";
7
8
  export type CookieAuthService = AuthService;
8
9
 
9
10
  export interface AuthResult {
@@ -232,6 +233,7 @@ export interface Auth {
232
233
  readonly logout: (service: AuthService) => Promise<{ readonly service: AuthService; readonly deleted: true }>;
233
234
  readonly extractAshby: () => Promise<AuthResult>;
234
235
  readonly extractAsana: () => Promise<AuthResult>;
236
+ readonly extractClaude: () => Promise<AuthResult>;
235
237
  readonly extractChatgpt: () => Promise<AuthResult>;
236
238
  readonly extractCodeSignal: () => Promise<AuthResult>;
237
239
  readonly extractGmail: () => Promise<AuthResult>;
@@ -244,8 +246,12 @@ export interface Auth {
244
246
  export type CookieExtractor = (environment: NodeEnvironment, extraction: ChromeCookieExtraction) => Promise<ChromeCookieResult>;
245
247
 
246
248
  export function composeAuth(runtime: RuntimeCapabilities, environment: NodeEnvironment, extractCookies: CookieExtractor): Auth {
247
- const cookieDomains: Readonly<Record<AuthService, string>> = Object.freeze({ ashby: ".ashbyhq.com", asana: ".asana.com", chatgpt: ".chatgpt.com", codesignal: ".codesignal.com", gmail: ".google.com", "google-docs": ".google.com", notion: ".notion.so", slack: ".slack.com", zoom: ".zoom.us" });
248
- const verifyCookies = (service: AuthService, cookies: readonly Cookie[], metadata: Readonly<Record<string, string>>) => service === "codesignal" ? (metadata.token ? verifyCodeSignal(metadata.token) : null) : service === "ashby" ? ashbySession(runtime,cookies).then(q=>q("query { sessionUser { id } }")).then(d=>d.sessionUser ? {service,identity:{user_id:d.sessionUser.id}} : null).catch(()=>null) : service === "asana" ? verifyAsana(runtime, cookies) : service === "chatgpt" ? verifyChatgpt(runtime, cookies) : service === "gmail" ? verifyGmailCookies(runtime, cookies) : service === "google-docs" ? verifyGoogleDocsCookies(runtime, cookies) : service === "notion" ? verifyNotion(runtime, cookies) : service === "slack" ? verifySlack(runtime, cookies, metadata) : verifyZoom(runtime, cookies);
249
+ const cookieDomains: Readonly<Record<AuthService, string>> = Object.freeze({ ashby: ".ashbyhq.com", asana: ".asana.com", chatgpt: ".chatgpt.com", claude: ".claude.ai", codesignal: ".codesignal.com", gmail: ".google.com", "google-docs": ".google.com", notion: ".notion.so", slack: ".slack.com", zoom: ".zoom.us" });
250
+ const verifyCookies = (service: AuthService, cookies: readonly Cookie[], metadata: Readonly<Record<string, string>>) => service === "claude" ? claudeSession(runtime.process, cookies, `${environment["HOME"]}/.wire/auth`, async get => {
251
+ const [organizations] = await get<{uuid: string; name: string; capabilities: string[]}[]>(["/api/organizations"]);
252
+ const workspaces = organizations!.filter(org => org.capabilities.includes("chat")).map(org => ({id: org.uuid, name: org.name}));
253
+ return workspaces.length ? { service, identity: { workspaces } } : null;
254
+ }) : service === "codesignal" ? (metadata.token ? verifyCodeSignal(metadata.token) : null) : service === "ashby" ? ashbySession(runtime,cookies).then(q=>q("query { sessionUser { id } }")).then(d=>d.sessionUser ? {service,identity:{user_id:d.sessionUser.id}} : null).catch(()=>null) : service === "asana" ? verifyAsana(runtime, cookies) : service === "chatgpt" ? verifyChatgpt(runtime, cookies) : service === "gmail" ? verifyGmailCookies(runtime, cookies) : service === "google-docs" ? verifyGoogleDocsCookies(runtime, cookies) : service === "notion" ? verifyNotion(runtime, cookies) : service === "slack" ? verifySlack(runtime, cookies, metadata) : verifyZoom(runtime, cookies);
249
255
  const verifyCookieState = async (service: AuthService, cookies: readonly Cookie[], metadata: Readonly<Record<string, string>>) => {
250
256
  if (service === "zoom") return verifyZoomCookieState(runtime, cookies, metadata);
251
257
  return Object.freeze({ result: await verifyCookies(service, cookies, metadata), cookies, metadata, changed: false });
@@ -293,6 +299,7 @@ export function composeAuth(runtime: RuntimeCapabilities, environment: NodeEnvir
293
299
  },
294
300
  extractAshby: () => extract("ashby", "https://app.ashbyhq.com/", ["ashbyhq.com"], values => values.length > 0),
295
301
  extractAsana: () => extract("asana", "https://app.asana.com/", ["asana.com"], (values) => values.some((cookie) => cookie.domain === ".asana.com" || cookie.domain.endsWith(".asana.com"))),
302
+ extractClaude: () => extract("claude", "https://claude.ai/login", ["claude.ai"], requiredReady(["sessionKey"]), `(() => location.origin === "https://claude.ai" && location.pathname === "/new" ? { url: location.href } : {})()`),
296
303
  extractChatgpt: () => extract("chatgpt", "https://chatgpt.com/", ["chatgpt.com", "openai.com"], (values) => values.some((cookie) => cookie.name === "oai-did") && values.some((cookie) => cookie.name === "__Secure-next-auth.session-token" || cookie.name === "__Secure-next-auth.session-token.0"), undefined, true),
297
304
  extractCodeSignal: () => extract("codesignal", "https://app.codesignal.com/", ["codesignal.com"], () => true, `(() => { const token = location.origin === "https://app.codesignal.com" && localStorage.getItem("Meteor.loginToken"); return token ? {token} : {}; })()`),
298
305
  extractGmail: () => extract("gmail", "https://mail.google.com/mail/u/0/", ["google.com"], googleReady),
package/src/cli.ts CHANGED
@@ -126,7 +126,7 @@ const fixedCommandPositionals = Object.freeze({
126
126
  "sync-all": Object.freeze({ expected: 0, name: "" }),
127
127
  watch: Object.freeze({ expected: 1, name: "file" }),
128
128
  });
129
- const authServices = new Set(["ashby", "asana", "chatgpt", "codesignal", "gmail", "google-docs", "notion", "slack", "zoom"]);
129
+ const authServices = new Set(["ashby", "asana", "chatgpt", "claude", "codesignal", "gmail", "google-docs", "notion", "slack", "zoom"]);
130
130
  const slackResourceCommands = new Set(["preview", "attach", "sync"]);
131
131
  const authCommands = new Set(["login", "logout", "status"]);
132
132
  const removedCommandNames = Object.freeze({
@@ -310,7 +310,7 @@ function renderRemovedCommand(argv: readonly string[]): boolean {
310
310
  function renderUnknownAuthCommand(argv: readonly string[]): boolean {
311
311
  if (hasRootSeparator(argv)) return false;
312
312
  const words = positionalWords(argv);
313
- if (words === null || words.length < 2 || !authServices.has(words[0]!) || authCommands.has(words[1]!) || (words[0] === "ashby" && ["interviews","pending","latest","prep","template","sync"].includes(words[1]!)) || (words[0] === "codesignal" && ["edit", "run"].includes(words[1]!)) || (words[0] === "notion" && words[1] === "search") || (words[0] === "google-docs" && words[1] === "comments") || (words[0] === "zoom" && words[1] === "scrape") || words[0] === "asana" && (words[1] === "projects" || words[1] === "tasks" || words[1] === "comments") || (words[0] === "slack" || words[0] === "notion" || words[0] === "asana") && words[1] === "users" || words[0] === "slack" && (words[1] === "send" || words[1] === "edit" || slackResourceCommands.has(words[1]!))) return false;
313
+ if (words === null || words.length < 2 || !authServices.has(words[0]!) || authCommands.has(words[1]!) || (words[0] === "ashby" && ["interviews","pending","latest","prep","template","sync"].includes(words[1]!)) || (words[0] === "codesignal" && ["edit", "run"].includes(words[1]!)) || (words[0] === "notion" && words[1] === "search") || (words[0] === "google-docs" && words[1] === "comments") || ((words[0] === "zoom" || words[0] === "claude") && words[1] === "scrape") || words[0] === "asana" && (words[1] === "projects" || words[1] === "tasks" || words[1] === "comments") || (words[0] === "slack" || words[0] === "notion" || words[0] === "asana") && words[1] === "users" || words[0] === "slack" && (words[1] === "send" || words[1] === "edit" || slackResourceCommands.has(words[1]!))) return false;
314
314
  renderCliError(argv, `Unknown command: ${words[1]}`, `wire ${words[0]} --help`, `Unknown command: ${cliValue(words[1]!)}`);
315
315
  return true;
316
316
  }
package/src/executable.ts CHANGED
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, statSync } from "node:fs";
2
2
  import { mkdir, writeFile } from "node:fs/promises";
3
3
  import { dirname, isAbsolute, join, resolve } from "node:path";
4
4
 
5
- import { addAsanaComment, createAsanaTask, editAsanaComment, editAsanaTask, listAsanaProjects, listAsanaTasks, lookupAsanaUsers, moveAsanaTask, showAsanaProject, showAsanaTask } from "provider-asana";
5
+ import { addAsanaComment, addAsanaDependency, createAsanaTask, editAsanaComment, editAsanaTask, listAsanaProjects, listAsanaTasks, lookupAsanaUsers, moveAsanaTask, showAsanaProject, showAsanaTask } from "provider-asana";
6
6
  import { sendSlackMessage, editSlackMessage, lookupSlackUsers } from "provider-slack";
7
7
 
8
8
  import { listLatticeReviewRequests, latticeReviewDraft, syncLatticeDrafts } from "provider-lattice";
@@ -150,9 +150,9 @@ export function createExecutableRoot(environment: NodeEnvironment, currentDirect
150
150
  switchBackend: baseWire.switchBackend,
151
151
  });
152
152
  const wire = withWireHooks(configuredWire, { currentDirectory, home, environment: configuredEnvironment() });
153
- return createRoot(wire, currentDirectory, auth, readStandardInput, { ...options, searchNotion: (query, searchOptions) => searchNotion(runtime, query, searchOptions), codeSignalEdit: async (url,path,file) => editCodeSignal(runtime,url,path,await filesystem.readText(resolve(currentDirectory,file))), codeSignalRun: url => runCodeSignal(runtime,url), shareNotionWithOrg: id => shareNotionWithOrg(runtime, id), scrapeClaude: () => scrapeClaude(processCapability, currentDirectory), listDocComments: url => listDocComments(runtime,url), changeDocComment: (action,url,value) => changeDocComment(runtime,action,url,value), ashby: (action,arg) => ashby(runtime,action,action === "sync" ? resolve(currentDirectory,arg!) : arg), previewDrive: url => previewDrive(runtime,url), scrapeDrive: (url, deleteVerifiedPdfs, deleteVerifiedDocx) => scrapeDrive(runtime, currentDirectory, url, deleteVerifiedPdfs, deleteVerifiedDocx), calendarAgenda: (date, id) => readAgenda(processCapability, configuration.get("WIRE_REPOSITORY_ROOT"), date, id), latticeSync: (url,file) => syncLatticeDrafts(runtime,url,currentDirectory,file), latticeRequests: url => listLatticeReviewRequests(runtime,url), latticeTemplate: url => latticeReviewDraft(runtime,url), latticeFill: async (url,file) => latticeReviewDraft(runtime,url,await runtime.filesystem.readText(resolve(currentDirectory,file))), scrapeZoom: () => zoomProvider.scrape(runtime, currentDirectory) }, (destination, markdown) => sendSlackMessage(runtime, destination, markdown), (query) => lookupSlackUsers(runtime, query), (url, markdown) => editSlackMessage(runtime, url, markdown), (query) => lookupNotionUsers(runtime, query), {
153
+ return createRoot(wire, currentDirectory, auth, readStandardInput, { ...options, searchNotion: (query, searchOptions) => searchNotion(runtime, query, searchOptions), codeSignalEdit: async (url,path,file) => editCodeSignal(runtime,url,path,await filesystem.readText(resolve(currentDirectory,file))), codeSignalRun: url => runCodeSignal(runtime,url), shareNotionWithOrg: id => shareNotionWithOrg(runtime, id), scrapeClaude: () => scrapeClaude(runtime, currentDirectory), listDocComments: url => listDocComments(runtime,url), changeDocComment: (action,url,value) => changeDocComment(runtime,action,url,value), ashby: (action,arg) => ashby(runtime,action,action === "sync" ? resolve(currentDirectory,arg!) : arg), previewDrive: url => previewDrive(runtime,url), scrapeDrive: (url, deleteVerifiedPdfs, deleteVerifiedDocx) => scrapeDrive(runtime, currentDirectory, url, deleteVerifiedPdfs, deleteVerifiedDocx), calendarAgenda: (date, id) => readAgenda(processCapability, configuration.get("WIRE_REPOSITORY_ROOT"), date, id), latticeSync: (url,file) => syncLatticeDrafts(runtime,url,currentDirectory,file), latticeRequests: url => listLatticeReviewRequests(runtime,url), latticeTemplate: url => latticeReviewDraft(runtime,url), latticeFill: async (url,file) => latticeReviewDraft(runtime,url,await runtime.filesystem.readText(resolve(currentDirectory,file))), scrapeZoom: () => zoomProvider.scrape(runtime, currentDirectory) }, (destination, markdown) => sendSlackMessage(runtime, destination, markdown), (query) => lookupSlackUsers(runtime, query), (url, markdown) => editSlackMessage(runtime, url, markdown), (query) => lookupNotionUsers(runtime, query), {
154
154
  lookup: (query) => lookupAsanaUsers(runtime, query), projects: () => listAsanaProjects(runtime), project: (project) => showAsanaProject(runtime, project), tasks: (project) => listAsanaTasks(runtime, project), show: (task) => showAsanaTask(runtime, task),
155
- writes: { move: (task, project, section) => moveAsanaTask(runtime, task, project, section), create: (project, title, section, body, assignee) => createAsanaTask(runtime, project, title, section, body, assignee), edit: (task, fields) => editAsanaTask(runtime, task, fields), comment: (task, body) => addAsanaComment(runtime, task, body), editComment: (comment, body) => editAsanaComment(runtime, comment, body) },
155
+ writes: { depend: (task, dependency) => addAsanaDependency(runtime, task, dependency), move: (task, project, section) => moveAsanaTask(runtime, task, project, section), create: (project, title, section, body, assignee) => createAsanaTask(runtime, project, title, section, body, assignee), edit: (task, fields) => editAsanaTask(runtime, task, fields), comment: (task, body) => addAsanaComment(runtime, task, body), editComment: (comment, body) => editAsanaComment(runtime, comment, body) },
156
156
  }, async () => {
157
157
  const domains = new Set((await runtime.cookies.load("latticehq")).map(c => c.domain.replace(/^\./,"")).filter(d => /^[a-z0-9-]+\.latticehq\.com$/.test(d)));
158
158
  if (domains.size !== 1) throw new Error("Use wire download with your Lattice workspace URL.");