chat-recall 0.0.1 → 0.4.8

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 (94) hide show
  1. package/LICENSE +93 -0
  2. package/dist/auto-update.d.ts +52 -0
  3. package/dist/auto-update.d.ts.map +1 -0
  4. package/dist/auto-update.js +157 -0
  5. package/dist/auto-update.js.map +1 -0
  6. package/dist/cli.d.ts +6 -0
  7. package/dist/cli.d.ts.map +1 -0
  8. package/dist/cli.js +26102 -0
  9. package/dist/cli.js.map +1 -0
  10. package/dist/client-events.d.ts +11 -0
  11. package/dist/client-events.d.ts.map +1 -0
  12. package/dist/client-events.js +77 -0
  13. package/dist/client-events.js.map +1 -0
  14. package/dist/collector-migrate.d.ts +27 -0
  15. package/dist/collector-migrate.d.ts.map +1 -0
  16. package/dist/collector-migrate.js +60 -0
  17. package/dist/collector-migrate.js.map +1 -0
  18. package/dist/device-auth.d.ts +37 -0
  19. package/dist/device-auth.d.ts.map +1 -0
  20. package/dist/device-auth.js +161 -0
  21. package/dist/device-auth.js.map +1 -0
  22. package/dist/escalate.d.ts +99 -0
  23. package/dist/escalate.d.ts.map +1 -0
  24. package/dist/escalate.js +219 -0
  25. package/dist/escalate.js.map +1 -0
  26. package/dist/http.d.ts +14 -0
  27. package/dist/http.d.ts.map +1 -0
  28. package/dist/http.js +49 -0
  29. package/dist/http.js.map +1 -0
  30. package/dist/install-skills.d.ts +51 -0
  31. package/dist/install-skills.d.ts.map +1 -0
  32. package/dist/install-skills.js +223 -0
  33. package/dist/install-skills.js.map +1 -0
  34. package/dist/intent-drain.d.ts +25 -0
  35. package/dist/intent-drain.d.ts.map +1 -0
  36. package/dist/intent-drain.js +189 -0
  37. package/dist/intent-drain.js.map +1 -0
  38. package/dist/keyring.d.ts +28 -0
  39. package/dist/keyring.d.ts.map +1 -0
  40. package/dist/keyring.js +163 -0
  41. package/dist/keyring.js.map +1 -0
  42. package/dist/mcp.d.ts +8 -0
  43. package/dist/mcp.d.ts.map +1 -0
  44. package/dist/mcp.js +23665 -0
  45. package/dist/mcp.js.map +1 -0
  46. package/dist/project-tasks.d.ts +54 -0
  47. package/dist/project-tasks.d.ts.map +1 -0
  48. package/dist/project-tasks.js +204 -0
  49. package/dist/project-tasks.js.map +1 -0
  50. package/dist/repair.d.ts +73 -0
  51. package/dist/repair.d.ts.map +1 -0
  52. package/dist/repair.js +267 -0
  53. package/dist/repair.js.map +1 -0
  54. package/dist/self-restart.d.ts +91 -0
  55. package/dist/self-restart.d.ts.map +1 -0
  56. package/dist/self-restart.js +137 -0
  57. package/dist/self-restart.js.map +1 -0
  58. package/dist/service-installer.d.ts +32 -0
  59. package/dist/service-installer.d.ts.map +1 -0
  60. package/dist/service-installer.js +231 -0
  61. package/dist/service-installer.js.map +1 -0
  62. package/dist/sync-client.d.ts +234 -0
  63. package/dist/sync-client.d.ts.map +1 -0
  64. package/dist/sync-client.js +1985 -0
  65. package/dist/sync-client.js.map +1 -0
  66. package/dist/sync-ledger.d.ts +131 -0
  67. package/dist/sync-ledger.d.ts.map +1 -0
  68. package/dist/sync-ledger.js +366 -0
  69. package/dist/sync-ledger.js.map +1 -0
  70. package/dist/update-notice.d.ts +16 -0
  71. package/dist/update-notice.d.ts.map +1 -0
  72. package/dist/update-notice.js +107 -0
  73. package/dist/update-notice.js.map +1 -0
  74. package/dist/verify-deep.d.ts +79 -0
  75. package/dist/verify-deep.d.ts.map +1 -0
  76. package/dist/verify-deep.js +97 -0
  77. package/dist/verify-deep.js.map +1 -0
  78. package/dist/verify-repair.d.ts +21 -0
  79. package/dist/verify-repair.d.ts.map +1 -0
  80. package/dist/verify-repair.js +58 -0
  81. package/dist/verify-repair.js.map +1 -0
  82. package/dist/watch.js +21550 -0
  83. package/hooks/chat_recall_escalate_hook.sh +51 -0
  84. package/hooks/chat_recall_resume_hook.sh +69 -0
  85. package/hooks/chat_recall_save_hook.sh +254 -0
  86. package/hooks/chat_recall_wakeup_hook.sh +39 -0
  87. package/package.json +38 -4
  88. package/skills/chat-recall/SKILL.md +76 -0
  89. package/skills/chat-recall-changes/SKILL.md +50 -0
  90. package/skills/chat-recall-find/SKILL.md +64 -0
  91. package/skills/chat-recall-memory/SKILL.md +55 -0
  92. package/skills/chat-recall-project/SKILL.md +75 -0
  93. package/skills/chat-recall-resume/SKILL.md +62 -0
  94. package/README.md +0 -7
package/LICENSE ADDED
@@ -0,0 +1,93 @@
1
+ Elastic License 2.0
2
+
3
+ URL: https://www.elastic.co/licensing/elastic-license
4
+
5
+ ## Acceptance
6
+
7
+ By using the software, you agree to all of the terms and conditions below.
8
+
9
+ ## Copyright License
10
+
11
+ The licensor grants you a non-exclusive, royalty-free, worldwide,
12
+ non-sublicensable, non-transferable license to use, copy, distribute, make
13
+ available, and prepare derivative works of the software, in each case subject to
14
+ the limitations and conditions below.
15
+
16
+ ## Limitations
17
+
18
+ You may not provide the software to third parties as a hosted or managed
19
+ service, where the service provides users with access to any substantial set of
20
+ the features or functionality of the software.
21
+
22
+ You may not move, change, disable, or circumvent the license key functionality
23
+ in the software, and you may not remove or obscure any functionality in the
24
+ software that is protected by the license key.
25
+
26
+ You may not alter, remove, or obscure any licensing, copyright, or other notices
27
+ of the licensor in the software. Any use of the licensor’s trademarks is subject
28
+ to applicable law.
29
+
30
+ ## Patents
31
+
32
+ The licensor grants you a license, under any patent claims the licensor can
33
+ license, or becomes able to license, to make, have made, use, sell, offer for
34
+ sale, import and have imported the software, in each case subject to the
35
+ limitations and conditions in this license. This license does not cover any
36
+ patent claims that you cause to be infringed by modifications or additions to
37
+ the software. If you or your company make any written claim that the software
38
+ infringes or contributes to infringement of any patent, your patent license for
39
+ the software granted under these terms ends immediately. If your company makes
40
+ such a claim, your patent license ends immediately for work on behalf of your
41
+ company.
42
+
43
+ ## Notices
44
+
45
+ You must ensure that anyone who gets a copy of any part of the software from you
46
+ also gets a copy of these terms.
47
+
48
+ If you modify the software, you must include in any modified copies of the
49
+ software prominent notices stating that you have modified the software.
50
+
51
+ ## No Other Rights
52
+
53
+ These terms do not imply any licenses other than those expressly granted in
54
+ these terms.
55
+
56
+ ## Termination
57
+
58
+ If you use the software in violation of these terms, such use is not licensed,
59
+ and your licenses will automatically terminate. If the licensor provides you
60
+ with a notice of your violation, and you cease all violation of this license no
61
+ later than 30 days after you receive that notice, your licenses will be
62
+ reinstated retroactively. However, if you violate these terms after such
63
+ reinstatement, any additional violation of these terms will cause your licenses
64
+ to terminate automatically and permanently.
65
+
66
+ ## No Liability
67
+
68
+ *As far as the law allows, the software comes as is, without any warranty or
69
+ condition, and the licensor will not be liable to you for any damages arising
70
+ out of these terms or the use or nature of the software, under any kind of
71
+ legal claim.*
72
+
73
+ ## Definitions
74
+
75
+ The **licensor** is the entity offering these terms, and the **software** is the
76
+ software the licensor makes available under these terms, including any portion
77
+ of it.
78
+
79
+ **you** refers to the individual or entity agreeing to these terms.
80
+
81
+ **your company** is any legal entity, sole proprietorship, or other kind of
82
+ organization that you work for, plus all organizations that have control over,
83
+ are under the control of, or are under common control with that
84
+ organization. **control** means ownership of substantially all the assets of an
85
+ entity, or the power to direct its management and policies by vote, contract, or
86
+ otherwise. Control can be direct or indirect.
87
+
88
+ **your licenses** are all the licenses granted to you for the software under
89
+ these terms.
90
+
91
+ **use** means anything you do with the software requiring one of your licenses.
92
+
93
+ **trademark** means trademarks, service marks, and similar rights.
@@ -0,0 +1,52 @@
1
+ export interface CliRelease {
2
+ version: string;
3
+ sha256: string;
4
+ }
5
+ export interface Caps {
6
+ edition?: string;
7
+ cli?: CliRelease | null;
8
+ }
9
+ /** semver-ish compare: -1 (a<b), 0 (a==b), 1 (a>b). Ignores prerelease tags. */
10
+ export declare function compareVersions(a: string, b: string): number;
11
+ /**
12
+ * Enabled = explicit flag wins; else default ON for EVERY edition.
13
+ *
14
+ * Cloud used to default OFF, which — with nothing at install/init ever turning
15
+ * it on — meant SaaS customers silently ran a stale, buggy collector forever
16
+ * and never received fixes. That's a dead end, not a security posture. The
17
+ * update is same-origin only and sha256-pinned to what the server advertises,
18
+ * so default-on just means "trust the server you're already syncing to." Set
19
+ * CHAT_RECALL_AUTO_UPDATE=0 to opt out.
20
+ */
21
+ export declare function isAutoUpdateEnabled(_edition: string | undefined, flag: string | undefined): boolean;
22
+ export declare const tarballUrl: (base: string) => string;
23
+ export interface UpdatePlan {
24
+ update: boolean;
25
+ reason: string;
26
+ url?: string;
27
+ sha256?: string;
28
+ from?: string;
29
+ to?: string;
30
+ }
31
+ /** Pure: decide whether to update, and to what — no I/O. */
32
+ export declare function planAutoUpdate(base: string, caps: Caps, ownVersion: string, flag: string | undefined): UpdatePlan;
33
+ export interface UpdateDeps {
34
+ download: (url: string) => Promise<Buffer>;
35
+ install: (tgzPath: string) => void;
36
+ restart: (platform: NodeJS.Platform) => void;
37
+ platform?: NodeJS.Platform;
38
+ }
39
+ export interface UpdateResult {
40
+ updated: boolean;
41
+ reason: string;
42
+ from?: string;
43
+ to?: string;
44
+ }
45
+ /** Execute a plan: download → checksum-verify → install → restart. */
46
+ export declare function executeAutoUpdate(plan: UpdatePlan, deps: UpdateDeps): Promise<UpdateResult>;
47
+ /**
48
+ * Full flow for one logged-in server. Best-effort — any failure returns a
49
+ * reason and never throws into the daemon loop.
50
+ */
51
+ export declare function runAutoUpdate(base: string, authHeaders: Record<string, string>, ownVersion: string, deps?: Partial<UpdateDeps>): Promise<UpdateResult>;
52
+ //# sourceMappingURL=auto-update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-update.d.ts","sourceRoot":"","sources":["../src/auto-update.ts"],"names":[],"mappings":"AAuBA,MAAM,WAAW,UAAU;IAAG,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;CAAE;AAChE,MAAM,WAAW,IAAI;IAAG,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;CAAE;AAEpE,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,CAAC,EAAE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,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GACzB,OAAO,CAAC,YAAY,CAAC,CA+BvB"}
@@ -0,0 +1,157 @@
1
+ /**
2
+ * CLI self-update from the logged-in server.
3
+ *
4
+ * The watch daemon calls runAutoUpdate() on a cadence: it asks /api/capabilities
5
+ * for the server's packed CLI version + tarball sha256, and if the server is
6
+ * newer AND auto-update is enabled, downloads the tarball FROM THE SAME ORIGIN,
7
+ * verifies the checksum, `npm i -g`s it, and restarts the watch service.
8
+ *
9
+ * Safety:
10
+ * - same-origin only (URL derived from the credential base, never caps input)
11
+ * - checksum-pinned (install only if sha256 matches the advertised value)
12
+ * - default ON for every edition; opt OUT with CHAT_RECALL_AUTO_UPDATE=0
13
+ *
14
+ * The decision + checksum logic is pure; the side effects (download/install/
15
+ * restart) are injected so they can be validated without a real global install.
16
+ */
17
+ import { execSync } from 'node:child_process';
18
+ import { fetchWithTimeout } from './http.js';
19
+ import { writeFileSync, mkdtempSync } from 'node:fs';
20
+ import { join } from 'node:path';
21
+ import { tmpdir } from 'node:os';
22
+ import { createHash } from 'node:crypto';
23
+ /** semver-ish compare: -1 (a<b), 0 (a==b), 1 (a>b). Ignores prerelease tags. */
24
+ export function compareVersions(a, b) {
25
+ const pa = String(a).split('-')[0].split('.').map((n) => parseInt(n, 10) || 0);
26
+ const pb = String(b).split('-')[0].split('.').map((n) => parseInt(n, 10) || 0);
27
+ for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
28
+ const d = (pa[i] ?? 0) - (pb[i] ?? 0);
29
+ if (d)
30
+ return d < 0 ? -1 : 1;
31
+ }
32
+ return 0;
33
+ }
34
+ /**
35
+ * Enabled = explicit flag wins; else default ON for EVERY edition.
36
+ *
37
+ * Cloud used to default OFF, which — with nothing at install/init ever turning
38
+ * it on — meant SaaS customers silently ran a stale, buggy collector forever
39
+ * and never received fixes. That's a dead end, not a security posture. The
40
+ * update is same-origin only and sha256-pinned to what the server advertises,
41
+ * so default-on just means "trust the server you're already syncing to." Set
42
+ * CHAT_RECALL_AUTO_UPDATE=0 to opt out.
43
+ */
44
+ export function isAutoUpdateEnabled(_edition, flag) {
45
+ if (flag === '0' || flag === 'false' || flag === 'off')
46
+ return false;
47
+ if (flag === '1' || flag === 'true' || flag === 'on')
48
+ return true;
49
+ return true;
50
+ }
51
+ export const tarballUrl = (base) => `${base.replace(/\/+$/, '')}/install/chat-recall.tgz`;
52
+ /** Pure: decide whether to update, and to what — no I/O. */
53
+ export function planAutoUpdate(base, caps, ownVersion, flag) {
54
+ const rel = caps.cli;
55
+ if (!rel || !rel.version || !rel.sha256)
56
+ return { update: false, reason: 'server advertises no CLI release' };
57
+ if (!isAutoUpdateEnabled(caps.edition, flag))
58
+ return { update: false, reason: `auto-update disabled (edition ${caps.edition ?? '?'})` };
59
+ if (compareVersions(rel.version, ownVersion) <= 0)
60
+ return { update: false, reason: `already current (own ${ownVersion} >= server ${rel.version})` };
61
+ return { update: true, reason: `server ${rel.version} > own ${ownVersion}`, url: tarballUrl(base), sha256: rel.sha256, from: ownVersion, to: rel.version };
62
+ }
63
+ /** Execute a plan: download → checksum-verify → install → restart. */
64
+ export async function executeAutoUpdate(plan, deps) {
65
+ if (!plan.update || !plan.url || !plan.sha256)
66
+ return { updated: false, reason: plan.reason };
67
+ let buf;
68
+ try {
69
+ buf = await deps.download(plan.url);
70
+ }
71
+ catch (e) {
72
+ return { updated: false, reason: `download failed: ${e instanceof Error ? e.message : e}` };
73
+ }
74
+ const got = createHash('sha256').update(buf).digest('hex');
75
+ if (got !== plan.sha256)
76
+ return { updated: false, reason: `checksum mismatch (expected ${plan.sha256.slice(0, 12)}…, got ${got.slice(0, 12)}…) — NOT installing` };
77
+ const dir = mkdtempSync(join(tmpdir(), 'cr-update-'));
78
+ const tgz = join(dir, 'chat-recall.tgz');
79
+ writeFileSync(tgz, buf);
80
+ try {
81
+ deps.install(tgz);
82
+ }
83
+ catch (e) {
84
+ return { updated: false, reason: `install failed: ${e instanceof Error ? e.message : e}` };
85
+ }
86
+ try {
87
+ deps.restart(deps.platform ?? process.platform);
88
+ }
89
+ catch { /* daemon will pick up new bin on its next natural restart */ }
90
+ return { updated: true, reason: `updated ${plan.from} → ${plan.to}`, from: plan.from, to: plan.to };
91
+ }
92
+ /* ── real side effects (defaults) ─────────────────────────────────── */
93
+ async function realDownload(url) {
94
+ const res = await fetchWithTimeout(url, {}, 120_000);
95
+ if (!res.ok)
96
+ throw new Error(`HTTP ${res.status}`);
97
+ return Buffer.from(await res.arrayBuffer());
98
+ }
99
+ function realInstall(tgz) {
100
+ // Prefer a global install; fall back to a user prefix when global isn't
101
+ // writable (same policy as install.sh).
102
+ try {
103
+ execSync(`npm install -g "${tgz}"`, { stdio: 'ignore' });
104
+ }
105
+ catch {
106
+ execSync(`npm install -g --prefix "${process.env.HOME}/.local" "${tgz}"`, { stdio: 'ignore' });
107
+ }
108
+ }
109
+ function realRestart(platform) {
110
+ if (platform === 'linux')
111
+ execSync('systemctl --user restart chat-recall-watch.service', { stdio: 'ignore' });
112
+ else if (platform === 'darwin')
113
+ execSync('launchctl kickstart -k gui/$(id -u)/com.chat-recall.watch', { stdio: 'ignore', shell: '/bin/bash' });
114
+ else if (platform === 'win32')
115
+ execSync('schtasks /End /TN chat-recall-watch & schtasks /Run /TN chat-recall-watch', { stdio: 'ignore' });
116
+ }
117
+ /**
118
+ * Full flow for one logged-in server. Best-effort — any failure returns a
119
+ * reason and never throws into the daemon loop.
120
+ */
121
+ export async function runAutoUpdate(base, authHeaders, ownVersion, deps) {
122
+ let caps;
123
+ try {
124
+ const res = await fetchWithTimeout(`${base.replace(/\/+$/, '')}/api/capabilities`, { headers: authHeaders });
125
+ if (!res.ok)
126
+ return { updated: false, reason: `capabilities HTTP ${res.status}` };
127
+ caps = (await res.json());
128
+ }
129
+ catch (e) {
130
+ return { updated: false, reason: `capabilities unreachable: ${e instanceof Error ? e.message : e}` };
131
+ }
132
+ const plan = planAutoUpdate(base, caps, ownVersion, process.env.CHAT_RECALL_AUTO_UPDATE);
133
+ if (!plan.update)
134
+ return { updated: false, reason: plan.reason };
135
+ const result = await executeAutoUpdate(plan, {
136
+ download: deps?.download ?? realDownload,
137
+ install: deps?.install ?? realInstall,
138
+ restart: deps?.restart ?? realRestart,
139
+ platform: deps?.platform,
140
+ });
141
+ // A self-update that KEEPS failing is the worst failure mode this system has:
142
+ // the machine silently runs an old collector forever, and the only trace was a
143
+ // reason string that two of the three call sites threw away
144
+ // (`void runAutoUpdate(…).catch(() => {})`). Report it so the failure is
145
+ // visible server-side instead of being discovered months later by hand.
146
+ // Dynamic import: client-events → sync-client → auto-update is a cycle at
147
+ // module scope, and telemetry must never be load-order-sensitive.
148
+ if (!result.updated) {
149
+ try {
150
+ const { reportClientEvent } = await import('./client-events.js');
151
+ reportClientEvent('auto_update_failed', { message: `${plan.from} → ${plan.to}: ${result.reason}` });
152
+ }
153
+ catch { /* telemetry is best-effort */ }
154
+ }
155
+ return result;
156
+ }
157
+ //# sourceMappingURL=auto-update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-update.js","sourceRoot":"","sources":["../src/auto-update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAKzC,gFAAgF;AAChF,MAAM,UAAU,eAAe,CAAC,CAAS,EAAE,CAAS;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AAC,IAAI,EAAE;QAC3C,QAAQ,EAAE,IAAI,EAAE,QAAQ,IAAI,YAAY;QACxC,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,WAAW;QACrC,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,WAAW;QACrC,QAAQ,EAAE,IAAI,EAAE,QAAQ;KACzB,CAAC,CAAC;IAEH,8EAA8E;IAC9E,+EAA+E;IAC/E,4DAA4D;IAC5D,yEAAyE;IACzE,wEAAwE;IACxE,0EAA0E;IAC1E,kEAAkE;IAClE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,IAAI,CAAC;YACH,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAC;YACjE,iBAAiB,CAAC,oBAAoB,EAAE,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,EAAE,KAAK,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACtG,CAAC;QAAC,MAAM,CAAC,CAAC,8BAA8B,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/dist/cli.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * CLI for chat-recall.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;GAEG"}