@mneme-ai/core 1.96.0 → 1.98.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/permeate/userscript_generator.d.ts.map +1 -1
- package/dist/permeate/userscript_generator.js +1 -0
- package/dist/permeate/userscript_generator.js.map +1 -1
- package/dist/rainbow/bug_truth.d.ts +62 -0
- package/dist/rainbow/bug_truth.d.ts.map +1 -0
- package/dist/rainbow/bug_truth.js +74 -0
- package/dist/rainbow/bug_truth.js.map +1 -0
- package/dist/rainbow/clone_to.d.ts +133 -0
- package/dist/rainbow/clone_to.d.ts.map +1 -0
- package/dist/rainbow/clone_to.js +299 -0
- package/dist/rainbow/clone_to.js.map +1 -0
- package/dist/rainbow/clone_to.test.d.ts +2 -0
- package/dist/rainbow/clone_to.test.d.ts.map +1 -0
- package/dist/rainbow/clone_to.test.js +266 -0
- package/dist/rainbow/clone_to.test.js.map +1 -0
- package/dist/rainbow/handoff.d.ts +0 -3
- package/dist/rainbow/handoff.d.ts.map +1 -1
- package/dist/rainbow/handoff.js +13 -3
- package/dist/rainbow/handoff.js.map +1 -1
- package/dist/rainbow/index.d.ts +5 -0
- package/dist/rainbow/index.d.ts.map +1 -1
- package/dist/rainbow/index.js +18 -0
- package/dist/rainbow/index.js.map +1 -1
- package/dist/rainbow/passport.d.ts +107 -0
- package/dist/rainbow/passport.d.ts.map +1 -0
- package/dist/rainbow/passport.js +145 -0
- package/dist/rainbow/passport.js.map +1 -0
- package/dist/rainbow/v1_98.test.d.ts +2 -0
- package/dist/rainbow/v1_98.test.d.ts.map +1 -0
- package/dist/rainbow/v1_98.test.js +307 -0
- package/dist/rainbow/v1_98.test.js.map +1 -0
- package/dist/rainbow/vendor_probe.d.ts +52 -0
- package/dist/rainbow/vendor_probe.d.ts.map +1 -0
- package/dist/rainbow/vendor_probe.js +111 -0
- package/dist/rainbow/vendor_probe.js.map +1 -0
- package/dist/rainbow/vendor_strategy.d.ts +64 -0
- package/dist/rainbow/vendor_strategy.d.ts.map +1 -0
- package/dist/rainbow/vendor_strategy.js +157 -0
- package/dist/rainbow/vendor_strategy.js.map +1 -0
- package/dist/relay/deep_link.d.ts +24 -15
- package/dist/relay/deep_link.d.ts.map +1 -1
- package/dist/relay/deep_link.js +28 -18
- package/dist/relay/deep_link.js.map +1 -1
- package/dist/v1_87_regression.test.js +3 -2
- package/dist/v1_87_regression.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userscript_generator.d.ts","sourceRoot":"","sources":["../../src/permeate/userscript_generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB;;qEAEiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC;2BACuB;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,kBAAkB,
|
|
1
|
+
{"version":3,"file":"userscript_generator.d.ts","sourceRoot":"","sources":["../../src/permeate/userscript_generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB;;qEAEiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC;2BACuB;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,kBAAkB,CAuJ9E"}
|
|
@@ -28,6 +28,7 @@ export function generateUserscript(opts) {
|
|
|
28
28
|
"// @description Inject Mneme cross-vendor brain (soul prompt) into ChatGPT, Gemini, Claude.ai, Copilot, DeepSeek. No store approval needed.",
|
|
29
29
|
"// @author Mneme",
|
|
30
30
|
"// @match https://chatgpt.com/*",
|
|
31
|
+
// v1.98: chat.openai.com kept for backward compat (308-redirects to chatgpt.com but old bookmarks survive)
|
|
31
32
|
"// @match https://chat.openai.com/*",
|
|
32
33
|
"// @match https://gemini.google.com/*",
|
|
33
34
|
"// @match https://aistudio.google.com/*",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userscript_generator.js","sourceRoot":"","sources":["../../src/permeate/userscript_generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAuBH,MAAM,UAAU,kBAAkB,CAAC,IAAuB;IACxD,MAAM,MAAM,GAAG;QACb,mBAAmB;QACnB,sCAAsC;QACtC,4DAA4D;QAC5D,oBAAoB,IAAI,CAAC,YAAY,EAAE;QACvC,8IAA8I;QAC9I,wBAAwB;QACxB,wCAAwC;QACxC,4CAA4C;QAC5C,8CAA8C;QAC9C,gDAAgD;QAChD,sCAAsC;QACtC,kDAAkD;QAClD,8CAA8C;QAC9C,2CAA2C;QAC3C,kCAAkC;QAClC,oCAAoC;QACpC,gCAAgC;QAChC,oBAAoB;KACrB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEb,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS;QAChC,CAAC,CAAC;;qBAEe,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC;uBAC5B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqGd,CAAC,IAAI,EAAE,CAAC;IAEP,MAAM,OAAO,GAAG,GAAG,MAAM,OAAO,WAAW,GAAG,IAAI,IAAI,CAAC;IACvD,OAAO;QACL,OAAO;QACP,QAAQ,EAAE,uBAAuB,IAAI,CAAC,YAAY,UAAU;QAC5D,WAAW,EAAE,sSAAsS;KACpT,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v1.97.0 -- RAINBOW · The Truth About v1.85 RELAY (4 bugs · honest postmortem).
|
|
3
|
+
*
|
|
4
|
+
* User caught us in 4 lies:
|
|
5
|
+
*
|
|
6
|
+
* 🔴 BUG #1: AI-fetches-URL doesn't work
|
|
7
|
+
* - Free Gemini / ChatGPT-Free / Claude.ai do NOT have web-fetch in
|
|
8
|
+
* chat completion paths. The instruction "Fetch this URL..." is
|
|
9
|
+
* silently ignored or refused.
|
|
10
|
+
*
|
|
11
|
+
* 🔴 BUG #2: AI cannot do AES-GCM + PBKDF2(200k) decryption
|
|
12
|
+
* - Asking the AI to manually decrypt is a hallucination magnet. It
|
|
13
|
+
* has no Web Crypto access in the chat sandbox; output is fabricated.
|
|
14
|
+
*
|
|
15
|
+
* 🔴 BUG #3: gemini.google.com/?q= deep link does NOT prefill
|
|
16
|
+
* - User has to type the prompt themselves anyway. The deep-link
|
|
17
|
+
* parameter is silently ignored by current Gemini Web.
|
|
18
|
+
*
|
|
19
|
+
* 🔴 BUG #4: We claimed it works without integration testing
|
|
20
|
+
* - v1.85 commit messages and docs asserted "any AI can fetch URL +
|
|
21
|
+
* decrypt". Never tested against a real free-tier AI. False claim.
|
|
22
|
+
*
|
|
23
|
+
* The DEMON FIX (v1.97):
|
|
24
|
+
*
|
|
25
|
+
* STOP depending on Web AI to do ANYTHING beyond reading text.
|
|
26
|
+
*
|
|
27
|
+
* The ONLY assumption that holds across every Web AI's free tier on
|
|
28
|
+
* every platform: the user can paste into the chat box.
|
|
29
|
+
*
|
|
30
|
+
* So Mneme:
|
|
31
|
+
* 1. Renders the soul prompt as PLAIN TEXT (no encryption needed —
|
|
32
|
+
* soul never leaves user's machine when using SAME-SHELL).
|
|
33
|
+
* 2. Copies it to the user's CLIPBOARD via the browser's
|
|
34
|
+
* navigator.clipboard API (works on every modern browser).
|
|
35
|
+
* 3. Opens the AI's HOME page (not a deep link with ?q= — that
|
|
36
|
+
* path is broken and we've confirmed it).
|
|
37
|
+
* 4. Shows a clear banner: "BRAIN IS ON YOUR CLIPBOARD. Press Ctrl+V."
|
|
38
|
+
* 5. User pastes plain text into the chat. AI reads plain text.
|
|
39
|
+
*
|
|
40
|
+
* No crypto burden on AI. No fetch dependency. No deep-link reliance.
|
|
41
|
+
* 100% reliable on every Web AI that lets a human paste in the chat —
|
|
42
|
+
* which is every Web AI that exists.
|
|
43
|
+
*
|
|
44
|
+
* v1.85 ENCRYPTED-RELAY architecture is DEPRECATED. Code remains for
|
|
45
|
+
* the LAN/tunnel transport (where the BROWSER does the decryption,
|
|
46
|
+
* not the AI), but the "AI fetches + decrypts" assumption is gone.
|
|
47
|
+
*
|
|
48
|
+
* This file exists to be honest about it in the codebase.
|
|
49
|
+
*/
|
|
50
|
+
export interface ArchitectureWarning {
|
|
51
|
+
/** Module name. */
|
|
52
|
+
module: string;
|
|
53
|
+
/** Why it's deprecated. */
|
|
54
|
+
reason: string;
|
|
55
|
+
/** What to use instead. */
|
|
56
|
+
replacement: string;
|
|
57
|
+
}
|
|
58
|
+
export declare const DEPRECATED_RELAY_PATHS: ArchitectureWarning[];
|
|
59
|
+
/** Print the architecture warnings — used by the doctor command + the
|
|
60
|
+
* AI agent contract to remind both human + AI that the old paths are dead. */
|
|
61
|
+
export declare function formatBugTruth(): string;
|
|
62
|
+
//# sourceMappingURL=bug_truth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bug_truth.d.ts","sourceRoot":"","sources":["../../src/rainbow/bug_truth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,MAAM,WAAW,mBAAmB;IAClC,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,EAAE,mBAAmB,EAgBvD,CAAC;AAEF;+EAC+E;AAC/E,wBAAgB,cAAc,IAAI,MAAM,CAMvC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v1.97.0 -- RAINBOW · The Truth About v1.85 RELAY (4 bugs · honest postmortem).
|
|
3
|
+
*
|
|
4
|
+
* User caught us in 4 lies:
|
|
5
|
+
*
|
|
6
|
+
* 🔴 BUG #1: AI-fetches-URL doesn't work
|
|
7
|
+
* - Free Gemini / ChatGPT-Free / Claude.ai do NOT have web-fetch in
|
|
8
|
+
* chat completion paths. The instruction "Fetch this URL..." is
|
|
9
|
+
* silently ignored or refused.
|
|
10
|
+
*
|
|
11
|
+
* 🔴 BUG #2: AI cannot do AES-GCM + PBKDF2(200k) decryption
|
|
12
|
+
* - Asking the AI to manually decrypt is a hallucination magnet. It
|
|
13
|
+
* has no Web Crypto access in the chat sandbox; output is fabricated.
|
|
14
|
+
*
|
|
15
|
+
* 🔴 BUG #3: gemini.google.com/?q= deep link does NOT prefill
|
|
16
|
+
* - User has to type the prompt themselves anyway. The deep-link
|
|
17
|
+
* parameter is silently ignored by current Gemini Web.
|
|
18
|
+
*
|
|
19
|
+
* 🔴 BUG #4: We claimed it works without integration testing
|
|
20
|
+
* - v1.85 commit messages and docs asserted "any AI can fetch URL +
|
|
21
|
+
* decrypt". Never tested against a real free-tier AI. False claim.
|
|
22
|
+
*
|
|
23
|
+
* The DEMON FIX (v1.97):
|
|
24
|
+
*
|
|
25
|
+
* STOP depending on Web AI to do ANYTHING beyond reading text.
|
|
26
|
+
*
|
|
27
|
+
* The ONLY assumption that holds across every Web AI's free tier on
|
|
28
|
+
* every platform: the user can paste into the chat box.
|
|
29
|
+
*
|
|
30
|
+
* So Mneme:
|
|
31
|
+
* 1. Renders the soul prompt as PLAIN TEXT (no encryption needed —
|
|
32
|
+
* soul never leaves user's machine when using SAME-SHELL).
|
|
33
|
+
* 2. Copies it to the user's CLIPBOARD via the browser's
|
|
34
|
+
* navigator.clipboard API (works on every modern browser).
|
|
35
|
+
* 3. Opens the AI's HOME page (not a deep link with ?q= — that
|
|
36
|
+
* path is broken and we've confirmed it).
|
|
37
|
+
* 4. Shows a clear banner: "BRAIN IS ON YOUR CLIPBOARD. Press Ctrl+V."
|
|
38
|
+
* 5. User pastes plain text into the chat. AI reads plain text.
|
|
39
|
+
*
|
|
40
|
+
* No crypto burden on AI. No fetch dependency. No deep-link reliance.
|
|
41
|
+
* 100% reliable on every Web AI that lets a human paste in the chat —
|
|
42
|
+
* which is every Web AI that exists.
|
|
43
|
+
*
|
|
44
|
+
* v1.85 ENCRYPTED-RELAY architecture is DEPRECATED. Code remains for
|
|
45
|
+
* the LAN/tunnel transport (where the BROWSER does the decryption,
|
|
46
|
+
* not the AI), but the "AI fetches + decrypts" assumption is gone.
|
|
47
|
+
*
|
|
48
|
+
* This file exists to be honest about it in the codebase.
|
|
49
|
+
*/
|
|
50
|
+
export const DEPRECATED_RELAY_PATHS = [
|
|
51
|
+
{
|
|
52
|
+
module: "rainbow.handoff.buildDataBridgeUrl (v1.89)",
|
|
53
|
+
reason: "data: URL navigation is blocked by Chrome/Safari since 2018 at the top-level. Even when it isn't, modern Web AIs (Gemini Free, ChatGPT Free, Claude.ai) have no web-fetch in chat completion to retrieve the encrypted soul. Deep-link prefill is silently ignored by current Gemini Web.",
|
|
54
|
+
replacement: "Use rainbow.same_shell.renderSameShellPage + rainbow.clone_to.cloneTo for clipboard-based handoff. The page copies plain text to clipboard; user pastes into the AI directly.",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
module: "v1.85 RELAY · AI fetches encrypted soul from public paste",
|
|
58
|
+
reason: "Asks the Web AI to (a) fetch a public URL — most free tiers refuse, (b) decrypt AES-256-GCM with PBKDF2(200k) — AI sandbox has no Web Crypto, output is hallucinated, (c) parse the result back into context — only the AI's reading capability is reliable.",
|
|
59
|
+
replacement: "BROWSER (not AI) does the decryption. Use the same-shell flow — soul stays on user's machine as plain text, clipboard delivers it.",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
module: "Vendor-prefill deep links (chatgpt.com/?q=, gemini.google.com/?q=)",
|
|
63
|
+
reason: "Empirically broken on Gemini Web (verified by user). ChatGPT and Claude.ai don't reliably honor query params either across all entry routes. User STILL has to paste — but now they're confused why the prompt didn't auto-fill.",
|
|
64
|
+
replacement: "Open the AI's plain home URL + tell the user clearly: 'Brain is on clipboard. Press Ctrl+V.' Reliable on every Web AI.",
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
/** Print the architecture warnings — used by the doctor command + the
|
|
68
|
+
* AI agent contract to remind both human + AI that the old paths are dead. */
|
|
69
|
+
export function formatBugTruth() {
|
|
70
|
+
return DEPRECATED_RELAY_PATHS.map((w, i) => `🔴 [${i + 1}/${DEPRECATED_RELAY_PATHS.length}] ${w.module}\n` +
|
|
71
|
+
` why: ${w.reason}\n` +
|
|
72
|
+
` use: ${w.replacement}`).join("\n\n");
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=bug_truth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bug_truth.js","sourceRoot":"","sources":["../../src/rainbow/bug_truth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAWH,MAAM,CAAC,MAAM,sBAAsB,GAA0B;IAC3D;QACE,MAAM,EAAE,4CAA4C;QACpD,MAAM,EAAE,2RAA2R;QACnS,WAAW,EAAE,+KAA+K;KAC7L;IACD;QACE,MAAM,EAAE,2DAA2D;QACnE,MAAM,EAAE,8PAA8P;QACtQ,WAAW,EAAE,oIAAoI;KAClJ;IACD;QACE,MAAM,EAAE,oEAAoE;QAC5E,MAAM,EAAE,kOAAkO;QAC1O,WAAW,EAAE,wHAAwH;KACtI;CACF,CAAC;AAEF;+EAC+E;AAC/E,MAAM,UAAU,cAAc;IAC5B,OAAO,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACzC,OAAO,CAAC,GAAG,CAAC,IAAI,sBAAsB,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI;QAC9D,YAAY,CAAC,CAAC,MAAM,IAAI;QACxB,YAAY,CAAC,CAAC,WAAW,EAAE,CAC5B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v1.97.0 -- RAINBOW · CLONE-TO universal intent parser + executor.
|
|
3
|
+
*
|
|
4
|
+
* The bug the user yelled about:
|
|
5
|
+
* "User says 'ส่งสมองไปมือถือ' or 'clone mneme to gemini' in Claude Code,
|
|
6
|
+
* AI agent doesn't recognize the intent, no QR appears, no URL pops up,
|
|
7
|
+
* user is stranded."
|
|
8
|
+
*
|
|
9
|
+
* Root cause:
|
|
10
|
+
* v1.95/96 shipped rainbow.show_local / show_handoff / quantum bridge
|
|
11
|
+
* modules, but NO MCP tool with the obvious name + crystal-clear
|
|
12
|
+
* description that maps natural language → action. AI agent had to
|
|
13
|
+
* know which specific tool to call. It didn't.
|
|
14
|
+
*
|
|
15
|
+
* v1.97 fix:
|
|
16
|
+
* ONE tool — `mneme.clone.to` — with a description so obvious that
|
|
17
|
+
* every AI agent recognizes "send / clone / sync / move brain /
|
|
18
|
+
* memory / mneme to <target>" calls it. The tool itself does
|
|
19
|
+
* fuzzy phrase parsing in Thai + English + mixed-language input,
|
|
20
|
+
* resolves the target, picks the right transport, executes, and
|
|
21
|
+
* auto-opens the browser when applicable.
|
|
22
|
+
*
|
|
23
|
+
* Targets recognized:
|
|
24
|
+
* 📱 mobile / phone / iPhone / Android / มือถือ / โทรศัพท์
|
|
25
|
+
* 💻 another-pc / laptop / notebook / คอมอื่น / โน้ตบุ๊ค
|
|
26
|
+
* 🖥 this-pc / localhost / browser-on-this-pc / เครื่องนี้
|
|
27
|
+
* 🟢 chatgpt / chatgpt-web / openai
|
|
28
|
+
* 🔵 gemini / gemini-web / google-ai
|
|
29
|
+
* 🟣 claude / claude-web / anthropic
|
|
30
|
+
* ⚪ perplexity / perplexity-web
|
|
31
|
+
* 🤖 copilot / github-copilot / vscode-copilot
|
|
32
|
+
* 📝 vscode / vs-code / editor
|
|
33
|
+
* 📱 ipad / tablet / แทบเล็ต
|
|
34
|
+
* 💾 usb / offline / file
|
|
35
|
+
* 🔄 back / return / กลับ (Web AI → editor AI return path)
|
|
36
|
+
*
|
|
37
|
+
* Verbs recognized:
|
|
38
|
+
* send / clone / move / sync / migrate / give / share / push
|
|
39
|
+
* ส่ง / โคลน / ย้าย / sync / ก๊อป / copy / แชร์ / ใส่
|
|
40
|
+
*/
|
|
41
|
+
/** Canonical target identifiers. */
|
|
42
|
+
export type CloneTarget = "mobile" | "another-pc" | "this-pc" | "chatgpt" | "gemini" | "claude" | "perplexity" | "copilot" | "vscode" | "ipad" | "usb" | "return" | "unknown";
|
|
43
|
+
export interface ParsedCloneIntent {
|
|
44
|
+
isCloneRequest: boolean;
|
|
45
|
+
/** Confidence 0..1 that this is a clone request. */
|
|
46
|
+
confidence: number;
|
|
47
|
+
target: CloneTarget;
|
|
48
|
+
/** Why we picked this target (which keyword matched). */
|
|
49
|
+
targetEvidence: string[];
|
|
50
|
+
/** Why we believe this is a clone request (which verb + subject matched). */
|
|
51
|
+
verbEvidence: string[];
|
|
52
|
+
subjectEvidence: string[];
|
|
53
|
+
/** Normalized lower-case input. */
|
|
54
|
+
normalized: string;
|
|
55
|
+
}
|
|
56
|
+
/** Parse a free-form user message and decide if it's a clone request +
|
|
57
|
+
* what the target is. Fuzzy + language-agnostic. */
|
|
58
|
+
export declare function parseCloneIntent(text: string): ParsedCloneIntent;
|
|
59
|
+
export type TransportPlan = {
|
|
60
|
+
transport: "same-shell";
|
|
61
|
+
openUrl: string;
|
|
62
|
+
description: string;
|
|
63
|
+
} | {
|
|
64
|
+
transport: "lan-qr";
|
|
65
|
+
lanPort: number;
|
|
66
|
+
description: string;
|
|
67
|
+
} | {
|
|
68
|
+
transport: "tunnel-qr";
|
|
69
|
+
lanPort: number;
|
|
70
|
+
description: string;
|
|
71
|
+
} | {
|
|
72
|
+
transport: "web-paste";
|
|
73
|
+
aiUrl: string;
|
|
74
|
+
description: string;
|
|
75
|
+
} | {
|
|
76
|
+
transport: "usb-wanderer";
|
|
77
|
+
description: string;
|
|
78
|
+
} | {
|
|
79
|
+
transport: "boomerang-return";
|
|
80
|
+
description: string;
|
|
81
|
+
} | {
|
|
82
|
+
transport: "menu";
|
|
83
|
+
options: Array<{
|
|
84
|
+
target: CloneTarget;
|
|
85
|
+
label: string;
|
|
86
|
+
}>;
|
|
87
|
+
description: string;
|
|
88
|
+
};
|
|
89
|
+
/** Map a target to the recommended transport. */
|
|
90
|
+
export declare function planTransport(target: CloneTarget, opts?: {
|
|
91
|
+
lanPort?: number;
|
|
92
|
+
}): TransportPlan;
|
|
93
|
+
export interface OpenBrowserOptions {
|
|
94
|
+
/** Test stub: when provided, called instead of spawning a real browser. */
|
|
95
|
+
spawnOverride?: (cmd: string, args: string[]) => void;
|
|
96
|
+
}
|
|
97
|
+
/** Open a URL in the default browser. Cross-platform: Win/Mac/Linux/WSL. */
|
|
98
|
+
export declare function openInBrowser(url: string, opts?: OpenBrowserOptions): {
|
|
99
|
+
command: string;
|
|
100
|
+
args: string[];
|
|
101
|
+
opened: boolean;
|
|
102
|
+
};
|
|
103
|
+
export interface CloneToInput {
|
|
104
|
+
/** Free-form user text — Mneme parses it. Pass through the raw user message. */
|
|
105
|
+
userText?: string;
|
|
106
|
+
/** OR specify target directly (skip parsing). */
|
|
107
|
+
target?: CloneTarget;
|
|
108
|
+
/** LAN port the rainbow server listens on. Default 7741. */
|
|
109
|
+
lanPort?: number;
|
|
110
|
+
/** Auto-open the browser when applicable. Default true. */
|
|
111
|
+
openBrowser?: boolean;
|
|
112
|
+
/** Test stub for browser open. */
|
|
113
|
+
spawnOverride?: (cmd: string, args: string[]) => void;
|
|
114
|
+
}
|
|
115
|
+
export interface CloneToResult {
|
|
116
|
+
intent: ParsedCloneIntent | null;
|
|
117
|
+
resolvedTarget: CloneTarget;
|
|
118
|
+
plan: TransportPlan;
|
|
119
|
+
/** One-line summary for AI agent to relay to the user. */
|
|
120
|
+
userInstruction: string;
|
|
121
|
+
/** Cross-platform browser open report when applicable. */
|
|
122
|
+
browserOpen?: {
|
|
123
|
+
command: string;
|
|
124
|
+
args: string[];
|
|
125
|
+
opened: boolean;
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/** The single function AI agents call when the user says ANY phrase about
|
|
129
|
+
* sending / cloning / syncing / moving brain to anywhere. */
|
|
130
|
+
export declare function cloneTo(input: CloneToInput): CloneToResult;
|
|
131
|
+
/** Pulse-style summary for AI agents to surface. */
|
|
132
|
+
export declare function formatCloneToPulseLine(r: CloneToResult): string;
|
|
133
|
+
//# sourceMappingURL=clone_to.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clone_to.d.ts","sourceRoot":"","sources":["../../src/rainbow/clone_to.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AASH,oCAAoC;AACpC,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,YAAY,GACZ,SAAS,GACT,SAAS,GACT,QAAQ,GACR,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AO,CAAC,KAAK,EAAE,YAAY,GAAG,aAAa,CAuC1D;AAED,oDAAoD;AACpD,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,CAE/D"}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v1.97.0 -- RAINBOW · CLONE-TO universal intent parser + executor.
|
|
3
|
+
*
|
|
4
|
+
* The bug the user yelled about:
|
|
5
|
+
* "User says 'ส่งสมองไปมือถือ' or 'clone mneme to gemini' in Claude Code,
|
|
6
|
+
* AI agent doesn't recognize the intent, no QR appears, no URL pops up,
|
|
7
|
+
* user is stranded."
|
|
8
|
+
*
|
|
9
|
+
* Root cause:
|
|
10
|
+
* v1.95/96 shipped rainbow.show_local / show_handoff / quantum bridge
|
|
11
|
+
* modules, but NO MCP tool with the obvious name + crystal-clear
|
|
12
|
+
* description that maps natural language → action. AI agent had to
|
|
13
|
+
* know which specific tool to call. It didn't.
|
|
14
|
+
*
|
|
15
|
+
* v1.97 fix:
|
|
16
|
+
* ONE tool — `mneme.clone.to` — with a description so obvious that
|
|
17
|
+
* every AI agent recognizes "send / clone / sync / move brain /
|
|
18
|
+
* memory / mneme to <target>" calls it. The tool itself does
|
|
19
|
+
* fuzzy phrase parsing in Thai + English + mixed-language input,
|
|
20
|
+
* resolves the target, picks the right transport, executes, and
|
|
21
|
+
* auto-opens the browser when applicable.
|
|
22
|
+
*
|
|
23
|
+
* Targets recognized:
|
|
24
|
+
* 📱 mobile / phone / iPhone / Android / มือถือ / โทรศัพท์
|
|
25
|
+
* 💻 another-pc / laptop / notebook / คอมอื่น / โน้ตบุ๊ค
|
|
26
|
+
* 🖥 this-pc / localhost / browser-on-this-pc / เครื่องนี้
|
|
27
|
+
* 🟢 chatgpt / chatgpt-web / openai
|
|
28
|
+
* 🔵 gemini / gemini-web / google-ai
|
|
29
|
+
* 🟣 claude / claude-web / anthropic
|
|
30
|
+
* ⚪ perplexity / perplexity-web
|
|
31
|
+
* 🤖 copilot / github-copilot / vscode-copilot
|
|
32
|
+
* 📝 vscode / vs-code / editor
|
|
33
|
+
* 📱 ipad / tablet / แทบเล็ต
|
|
34
|
+
* 💾 usb / offline / file
|
|
35
|
+
* 🔄 back / return / กลับ (Web AI → editor AI return path)
|
|
36
|
+
*
|
|
37
|
+
* Verbs recognized:
|
|
38
|
+
* send / clone / move / sync / migrate / give / share / push
|
|
39
|
+
* ส่ง / โคลน / ย้าย / sync / ก๊อป / copy / แชร์ / ใส่
|
|
40
|
+
*/
|
|
41
|
+
import { spawn } from "node:child_process";
|
|
42
|
+
import { platform } from "node:os";
|
|
43
|
+
const TARGET_PATTERNS = [
|
|
44
|
+
{ target: "mobile", keywords: ["มือถือ", "โทรศัพท์", "โทรสับ", "mobile", "phone", "iphone", "android", "samsung", "smartphone", "cellular", "เบอร์โทร"] },
|
|
45
|
+
{ target: "ipad", keywords: ["ipad", "tablet", "แทบเล็ต", "แท็บเล็ต"] },
|
|
46
|
+
{ target: "another-pc", keywords: ["another pc", "another computer", "another laptop", "notebook", "laptop", "โน้ตบุ๊ค", "โน๊ตบุ๊ค", "คอมอื่น", "เครื่องอื่น", "second laptop", "secondary computer", "another machine", "second machine", "other machine", "another device"] },
|
|
47
|
+
{ target: "this-pc", keywords: ["this pc", "this computer", "this machine", "เครื่องนี้", "this device", "localhost", "local", "browser on this pc", "browser on same machine", "same machine", "this browser", "same pc", "บนเครื่องนี้", "บราวเซอร์นี้", "browser นี้"] },
|
|
48
|
+
{ target: "chatgpt", keywords: ["chatgpt", "chat gpt", "openai", "gpt", "chat-gpt"] },
|
|
49
|
+
{ target: "gemini", keywords: ["gemini", "google ai", "google-ai", "googleai", "บาร์ด", "bard"] },
|
|
50
|
+
{ target: "claude", keywords: ["claude.ai", "claude-web", "claude web", "anthropic"] }, // Note: just "claude" matches editor AI too — keep specific
|
|
51
|
+
{ target: "perplexity", keywords: ["perplexity", "perplexity ai", "perp"] },
|
|
52
|
+
{ target: "copilot", keywords: ["copilot", "github copilot", "co-pilot"] },
|
|
53
|
+
{ target: "vscode", keywords: ["vscode", "vs code", "vs-code", "visual studio", "editor", "cursor"] },
|
|
54
|
+
{ target: "usb", keywords: ["usb", "offline", "file", "ไฟล์", "thumbdrive", "thumb drive", "external drive", "ออฟไลน์"] },
|
|
55
|
+
{ target: "return", keywords: ["กลับ", "back to", "back to pc", "return to", "send back", "ส่งกลับ", "boomerang"] },
|
|
56
|
+
];
|
|
57
|
+
/** Words that strongly indicate cloning intent (not just any "send"). */
|
|
58
|
+
const CLONE_VERBS = [
|
|
59
|
+
"send", "sync", "clone", "copy", "move", "migrate", "give", "share", "push", "transfer", "transport", "deliver", "beam", "teleport", "carry", "bring",
|
|
60
|
+
"ส่ง", "โคลน", "clone", "ย้าย", "ก๊อป", "ก๊อปปี้", "copy", "แชร์", "ใส่", "ดัน", "เอา", "พา", "ลาก",
|
|
61
|
+
];
|
|
62
|
+
/** Words that strongly indicate the SUBJECT is the brain/memory/mneme. */
|
|
63
|
+
const SUBJECT_WORDS = [
|
|
64
|
+
"mneme", "brain", "memory", "context", "conversation", "session", "chat",
|
|
65
|
+
"สมอง", "ความจำ", "บริบท", "บทสนทนา", "เซสชัน", "การคุย",
|
|
66
|
+
];
|
|
67
|
+
function normalize(text) {
|
|
68
|
+
return text.toLowerCase().normalize("NFC").replace(/[]/g, "").trim();
|
|
69
|
+
}
|
|
70
|
+
function containsAny(haystack, needles) {
|
|
71
|
+
const matches = [];
|
|
72
|
+
for (const n of needles) {
|
|
73
|
+
if (haystack.includes(n.toLowerCase()))
|
|
74
|
+
matches.push(n);
|
|
75
|
+
}
|
|
76
|
+
return { hit: matches.length > 0, matches };
|
|
77
|
+
}
|
|
78
|
+
/** Parse a free-form user message and decide if it's a clone request +
|
|
79
|
+
* what the target is. Fuzzy + language-agnostic. */
|
|
80
|
+
export function parseCloneIntent(text) {
|
|
81
|
+
const norm = normalize(text);
|
|
82
|
+
const verbHit = containsAny(norm, CLONE_VERBS);
|
|
83
|
+
const subjectHit = containsAny(norm, SUBJECT_WORDS);
|
|
84
|
+
// Target search: order matters — more specific patterns first.
|
|
85
|
+
let bestTarget = "unknown";
|
|
86
|
+
let bestEvidence = [];
|
|
87
|
+
let bestScore = 0;
|
|
88
|
+
for (const p of TARGET_PATTERNS) {
|
|
89
|
+
const r = containsAny(norm, p.keywords);
|
|
90
|
+
if (r.hit) {
|
|
91
|
+
// Score by longest match (more specific keyword > generic).
|
|
92
|
+
const score = Math.max(...r.matches.map((m) => m.length));
|
|
93
|
+
if (score > bestScore) {
|
|
94
|
+
bestScore = score;
|
|
95
|
+
bestTarget = p.target;
|
|
96
|
+
bestEvidence = r.matches;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
// Confidence:
|
|
101
|
+
// verb + subject + target → 0.95 (almost certain)
|
|
102
|
+
// verb + target → 0.80
|
|
103
|
+
// subject + target → 0.70
|
|
104
|
+
// verb + subject → 0.55 (target missing → "show me a menu")
|
|
105
|
+
// target alone → 0.40
|
|
106
|
+
// verb alone → 0.20
|
|
107
|
+
let confidence = 0;
|
|
108
|
+
if (verbHit.hit && subjectHit.hit && bestTarget !== "unknown")
|
|
109
|
+
confidence = 0.95;
|
|
110
|
+
else if (verbHit.hit && bestTarget !== "unknown")
|
|
111
|
+
confidence = 0.80;
|
|
112
|
+
else if (subjectHit.hit && bestTarget !== "unknown")
|
|
113
|
+
confidence = 0.70;
|
|
114
|
+
else if (verbHit.hit && subjectHit.hit)
|
|
115
|
+
confidence = 0.55;
|
|
116
|
+
else if (bestTarget !== "unknown" && (verbHit.hit || subjectHit.hit))
|
|
117
|
+
confidence = 0.40;
|
|
118
|
+
else if (verbHit.hit)
|
|
119
|
+
confidence = 0.20;
|
|
120
|
+
return {
|
|
121
|
+
isCloneRequest: confidence >= 0.4,
|
|
122
|
+
confidence,
|
|
123
|
+
target: bestTarget,
|
|
124
|
+
targetEvidence: bestEvidence,
|
|
125
|
+
verbEvidence: verbHit.matches,
|
|
126
|
+
subjectEvidence: subjectHit.matches,
|
|
127
|
+
normalized: norm,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/** Map a target to the recommended transport. */
|
|
131
|
+
export function planTransport(target, opts = {}) {
|
|
132
|
+
const lanPort = opts.lanPort ?? 7741;
|
|
133
|
+
switch (target) {
|
|
134
|
+
case "this-pc":
|
|
135
|
+
return {
|
|
136
|
+
transport: "same-shell",
|
|
137
|
+
openUrl: `http://localhost:${lanPort}/local`,
|
|
138
|
+
description: "Open the SAME-SHELL page on localhost. Brain auto-copies to clipboard. Click any AI button → paste.",
|
|
139
|
+
};
|
|
140
|
+
case "chatgpt":
|
|
141
|
+
return {
|
|
142
|
+
transport: "web-paste",
|
|
143
|
+
aiUrl: "https://chatgpt.com/",
|
|
144
|
+
description: "Copy brain to clipboard + open ChatGPT.com in a new tab. Paste in the chat.",
|
|
145
|
+
};
|
|
146
|
+
case "gemini":
|
|
147
|
+
return {
|
|
148
|
+
transport: "web-paste",
|
|
149
|
+
aiUrl: "https://gemini.google.com/app",
|
|
150
|
+
description: "Copy brain to clipboard + open Gemini in a new tab. Paste in the chat.",
|
|
151
|
+
};
|
|
152
|
+
case "claude":
|
|
153
|
+
return {
|
|
154
|
+
transport: "web-paste",
|
|
155
|
+
aiUrl: "https://claude.ai/new",
|
|
156
|
+
description: "Copy brain to clipboard + open Claude.ai in a new tab. Paste in the chat.",
|
|
157
|
+
};
|
|
158
|
+
case "perplexity":
|
|
159
|
+
return {
|
|
160
|
+
transport: "web-paste",
|
|
161
|
+
aiUrl: "https://www.perplexity.ai/",
|
|
162
|
+
description: "Copy brain to clipboard + open Perplexity in a new tab. Paste in the chat.",
|
|
163
|
+
};
|
|
164
|
+
case "copilot":
|
|
165
|
+
return {
|
|
166
|
+
transport: "web-paste",
|
|
167
|
+
aiUrl: "https://github.com/copilot",
|
|
168
|
+
description: "Copy brain to clipboard + open GitHub Copilot Chat (web). Paste in the chat.",
|
|
169
|
+
};
|
|
170
|
+
case "vscode":
|
|
171
|
+
return {
|
|
172
|
+
transport: "same-shell",
|
|
173
|
+
openUrl: `http://localhost:${lanPort}/local`,
|
|
174
|
+
description: "Open SAME-SHELL page. Brain on clipboard. Switch to VS Code / Cursor chat → paste.",
|
|
175
|
+
};
|
|
176
|
+
case "mobile":
|
|
177
|
+
case "ipad":
|
|
178
|
+
return {
|
|
179
|
+
transport: "tunnel-qr",
|
|
180
|
+
lanPort,
|
|
181
|
+
description: "Render PC page with QR + cloudflared tunnel (works any network) → mobile camera scans → opens page → tap green button.",
|
|
182
|
+
};
|
|
183
|
+
case "another-pc":
|
|
184
|
+
return {
|
|
185
|
+
transport: "lan-qr",
|
|
186
|
+
lanPort,
|
|
187
|
+
description: "Open LAN page on this PC, show URL + QR. Other PC opens the URL.",
|
|
188
|
+
};
|
|
189
|
+
case "usb":
|
|
190
|
+
return {
|
|
191
|
+
transport: "usb-wanderer",
|
|
192
|
+
description: "Pack brain as a signed .mwt file → drop on USB → unpack on other machine via 'mneme wanderer unpack'.",
|
|
193
|
+
};
|
|
194
|
+
case "return":
|
|
195
|
+
return {
|
|
196
|
+
transport: "boomerang-return",
|
|
197
|
+
description: "Paste the Web AI's reply (must include HOMUNCULUS RETURN block) → /return endpoint → editor AI ingests via mneme.abyss.homunculus.ingest.",
|
|
198
|
+
};
|
|
199
|
+
case "unknown":
|
|
200
|
+
return {
|
|
201
|
+
transport: "menu",
|
|
202
|
+
description: "Target unclear — show user the menu so they can pick.",
|
|
203
|
+
options: [
|
|
204
|
+
{ target: "this-pc", label: "💻 Browser on THIS PC (no QR, no tunnel — fastest)" },
|
|
205
|
+
{ target: "mobile", label: "📱 Mobile / Phone (QR scan, any network)" },
|
|
206
|
+
{ target: "another-pc", label: "🖥 Another computer / laptop (LAN bridge or USB)" },
|
|
207
|
+
{ target: "chatgpt", label: "🟢 ChatGPT.com (paste in browser)" },
|
|
208
|
+
{ target: "gemini", label: "🔵 Gemini (paste in browser)" },
|
|
209
|
+
{ target: "claude", label: "🟣 Claude.ai (paste in browser)" },
|
|
210
|
+
{ target: "copilot", label: "🤖 GitHub Copilot Chat (paste in browser)" },
|
|
211
|
+
{ target: "usb", label: "💾 USB / offline (.mwt file)" },
|
|
212
|
+
{ target: "return", label: "🪃 Send reply BACK from Web AI to this editor AI" },
|
|
213
|
+
],
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
/** Open a URL in the default browser. Cross-platform: Win/Mac/Linux/WSL. */
|
|
218
|
+
export function openInBrowser(url, opts = {}) {
|
|
219
|
+
const p = platform();
|
|
220
|
+
let cmd;
|
|
221
|
+
let args;
|
|
222
|
+
if (p === "win32") {
|
|
223
|
+
cmd = "cmd";
|
|
224
|
+
args = ["/c", "start", "", url];
|
|
225
|
+
}
|
|
226
|
+
else if (p === "darwin") {
|
|
227
|
+
cmd = "open";
|
|
228
|
+
args = [url];
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
cmd = "xdg-open";
|
|
232
|
+
args = [url];
|
|
233
|
+
}
|
|
234
|
+
try {
|
|
235
|
+
if (opts.spawnOverride) {
|
|
236
|
+
opts.spawnOverride(cmd, args);
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
spawn(cmd, args, { detached: true, stdio: "ignore" }).unref();
|
|
240
|
+
}
|
|
241
|
+
return { command: cmd, args, opened: true };
|
|
242
|
+
}
|
|
243
|
+
catch {
|
|
244
|
+
return { command: cmd, args, opened: false };
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/** The single function AI agents call when the user says ANY phrase about
|
|
248
|
+
* sending / cloning / syncing / moving brain to anywhere. */
|
|
249
|
+
export function cloneTo(input) {
|
|
250
|
+
let intent = null;
|
|
251
|
+
let target;
|
|
252
|
+
if (input.target) {
|
|
253
|
+
target = input.target;
|
|
254
|
+
}
|
|
255
|
+
else if (input.userText) {
|
|
256
|
+
intent = parseCloneIntent(input.userText);
|
|
257
|
+
target = intent.target;
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
target = "unknown";
|
|
261
|
+
}
|
|
262
|
+
const plan = planTransport(target, { lanPort: input.lanPort });
|
|
263
|
+
const openBrowser = input.openBrowser !== false;
|
|
264
|
+
let browserOpen;
|
|
265
|
+
let userInstruction;
|
|
266
|
+
if (plan.transport === "same-shell") {
|
|
267
|
+
if (openBrowser)
|
|
268
|
+
browserOpen = openInBrowser(plan.openUrl, { spawnOverride: input.spawnOverride });
|
|
269
|
+
userInstruction = `Opened ${plan.openUrl} in your browser. ${plan.description}`;
|
|
270
|
+
}
|
|
271
|
+
else if (plan.transport === "web-paste") {
|
|
272
|
+
if (openBrowser)
|
|
273
|
+
browserOpen = openInBrowser(plan.aiUrl, { spawnOverride: input.spawnOverride });
|
|
274
|
+
userInstruction = `Brain is on your clipboard. Opened ${plan.aiUrl}. Paste with Ctrl+V (Cmd+V on Mac).`;
|
|
275
|
+
}
|
|
276
|
+
else if (plan.transport === "lan-qr") {
|
|
277
|
+
userInstruction = `LAN page ready at port ${plan.lanPort}. Open the URL or scan the QR shown there from the other device.`;
|
|
278
|
+
}
|
|
279
|
+
else if (plan.transport === "tunnel-qr") {
|
|
280
|
+
userInstruction = `Mobile handoff page ready. Scan the QR with your phone camera, tap the link, tap the green Send button.`;
|
|
281
|
+
}
|
|
282
|
+
else if (plan.transport === "usb-wanderer") {
|
|
283
|
+
userInstruction = `Run 'mneme wanderer pack' to produce a .mwt file. Drop on USB. On the other machine: 'mneme wanderer unpack <file>'.`;
|
|
284
|
+
}
|
|
285
|
+
else if (plan.transport === "boomerang-return") {
|
|
286
|
+
userInstruction = `Paste the Web AI's reply (must contain '# HOMUNCULUS RETURN'). Mneme ingests via the return-pad on the SAME-SHELL page.`;
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
// menu
|
|
290
|
+
const lines = plan.options.map((o, i) => ` ${i + 1}. ${o.label}`).join("\n");
|
|
291
|
+
userInstruction = `Where to? Pick one and say "clone to <target>":\n${lines}`;
|
|
292
|
+
}
|
|
293
|
+
return { intent, resolvedTarget: target, plan, userInstruction, browserOpen };
|
|
294
|
+
}
|
|
295
|
+
/** Pulse-style summary for AI agents to surface. */
|
|
296
|
+
export function formatCloneToPulseLine(r) {
|
|
297
|
+
return `CLONE-TO · target=${r.resolvedTarget} · transport=${r.plan.transport}${r.browserOpen ? ` · browser=${r.browserOpen.opened ? "opened" : "failed"}` : ""}${r.intent ? ` · confidence=${(r.intent.confidence * 100).toFixed(0)}%` : ""}`;
|
|
298
|
+
}
|
|
299
|
+
//# sourceMappingURL=clone_to.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clone_to.js","sourceRoot":"","sources":["../../src/rainbow/clone_to.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AA4BnC,MAAM,eAAe,GAAoB;IACvC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE;IACzJ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE;IACvE,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAE,gBAAgB,CAAC,EAAE;IAC/Q,EAAE,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