@agent-native/core 0.114.6 → 0.114.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 (155) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +15 -0
  3. package/corpus/core/package.json +1 -1
  4. package/corpus/core/src/cli/mcp-config-writers.ts +6 -4
  5. package/corpus/core/src/cli/mcp.ts +124 -0
  6. package/corpus/core/src/cli/skills-content/help.ts +4 -3
  7. package/corpus/core/src/cli/skills-content/index.ts +1 -0
  8. package/corpus/core/src/cli/skills-content/rewind-skill.ts +52 -0
  9. package/corpus/core/src/cli/skills.ts +115 -13
  10. package/corpus/core/src/mcp/screen-memory-stdio.ts +1360 -104
  11. package/corpus/core/src/mcp-client/index.ts +9 -0
  12. package/corpus/core/src/mcp-client/screen-memory-local.ts +847 -13
  13. package/corpus/core/src/server/agent-chat-plugin.ts +16 -9
  14. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +19 -7
  15. package/corpus/templates/analytics/app/hooks/use-chart-tooltip-portal.ts +60 -0
  16. package/corpus/templates/analytics/app/routes/chart.tsx +1 -1
  17. package/corpus/templates/analytics/changelog/2026-07-20-dashboard-requests-no-longer-stall-without-progress.md +6 -0
  18. package/corpus/templates/analytics/server/plugins/agent-chat.ts +6 -0
  19. package/corpus/templates/clips/actions/apply-rewind-extension.ts +195 -0
  20. package/corpus/templates/clips/actions/delete-agent-recording-if-unpromoted.ts +64 -0
  21. package/corpus/templates/clips/actions/get-rewind-extension-request.ts +22 -0
  22. package/corpus/templates/clips/actions/get-screen-memory-status.ts +18 -2
  23. package/corpus/templates/clips/actions/list-rewind-extension-requests.ts +52 -0
  24. package/corpus/templates/clips/actions/make-recording-private-for-rewind.ts +55 -0
  25. package/corpus/templates/clips/actions/query-screen-memory-context.ts +4 -4
  26. package/corpus/templates/clips/actions/request-rewind-extension.ts +81 -0
  27. package/corpus/templates/clips/actions/update-rewind-extension-request.ts +47 -0
  28. package/corpus/templates/clips/app/components/editor/editor-layout.tsx +25 -0
  29. package/corpus/templates/clips/app/components/editor/editor-toolbar.tsx +36 -0
  30. package/corpus/templates/clips/app/components/editor/rewind-extension-dialog.tsx +338 -0
  31. package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +1 -16
  32. package/corpus/templates/clips/app/components/editor/timeline.tsx +26 -0
  33. package/corpus/templates/clips/app/i18n/en-US.ts +18 -0
  34. package/corpus/templates/clips/app/lib/ffmpeg-export.ts +19 -12
  35. package/corpus/templates/clips/app/lib/rewind-visibility.ts +31 -0
  36. package/corpus/templates/clips/app/lib/timestamp-mapping.ts +7 -0
  37. package/corpus/templates/clips/app/lib/upload-file-client.ts +17 -0
  38. package/corpus/templates/clips/changelog/2026-07-14-rewind-keeps-recent-screen-context-local-and-turns-it-into-clips.md +6 -0
  39. package/corpus/templates/clips/changelog/2026-07-17-active-clips-keep-rewind-stable-and-settings-clear.md +12 -0
  40. package/corpus/templates/clips/changelog/2026-07-17-clicking-the-clips-icon-during-a-recording-now-opens-the-app.md +6 -0
  41. package/corpus/templates/clips/changelog/2026-07-17-default-mic-now-uses-the-mac-default-and-transcription-shares-one-capture.md +6 -0
  42. package/corpus/templates/clips/changelog/2026-07-17-full-screen-clips-finalize-even-when-screencapturekit-stop-hangs.md +6 -0
  43. package/corpus/templates/clips/changelog/2026-07-17-normal-full-screen-clips-no-longer-stop-immediately-after-th.md +6 -0
  44. package/corpus/templates/clips/changelog/2026-07-17-rewind-can-hand-one-bounded-private-clip-to-your-agent.md +12 -0
  45. package/corpus/templates/clips/changelog/2026-07-17-rewind-home-can-copy-a-local-agent-prompt.md +6 -0
  46. package/corpus/templates/clips/changelog/2026-07-17-rewind-now-has-a-calm-home-status-focused-first-run-consent-.md +6 -0
  47. package/corpus/templates/clips/changelog/2026-07-17-rewind-settings-are-smaller-clearer-and-agent-first.md +6 -0
  48. package/corpus/templates/clips/changelog/2026-07-17-the-full-clips-interface-stays-available-while-recording.md +6 -0
  49. package/corpus/templates/clips/changelog/2026-07-18-rewind-organizes-recent-work-into-local-searchable-chapters.md +8 -0
  50. package/corpus/templates/clips/changelog/2026-07-18-searchable-rewind-chapters.md +6 -0
  51. package/corpus/templates/clips/changelog/2026-07-19-rewind-backed-recordings-now-start-immediately-after-the-cou.md +6 -0
  52. package/corpus/templates/clips/changelog/2026-07-20-rewind-can-set-up-your-local-agent-once-so-future-requests-w.md +6 -0
  53. package/corpus/templates/clips/desktop/package.json +1 -0
  54. package/corpus/templates/clips/desktop/scripts/sign-macos-local.ts +12 -1
  55. package/corpus/templates/clips/desktop/src/app.tsx +2498 -239
  56. package/corpus/templates/clips/desktop/src/components/ReadinessPanel.tsx +21 -1
  57. package/corpus/templates/clips/desktop/src/components/Switch.tsx +3 -0
  58. package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +156 -24
  59. package/corpus/templates/clips/desktop/src/lib/native-recording-warm.ts +6 -7
  60. package/corpus/templates/clips/desktop/src/lib/recorder.ts +1763 -1160
  61. package/corpus/templates/clips/desktop/src/lib/rewind-agent-prompt.ts +9 -0
  62. package/corpus/templates/clips/desktop/src/lib/rewind-recording-start.ts +20 -0
  63. package/corpus/templates/clips/desktop/src/main.tsx +3 -0
  64. package/corpus/templates/clips/desktop/src/overlays/countdown.tsx +14 -14
  65. package/corpus/templates/clips/desktop/src/overlays/onboarding.tsx +4 -4
  66. package/corpus/templates/clips/desktop/src/overlays/preparing.tsx +13 -0
  67. package/corpus/templates/clips/desktop/src/overlays/toolbar.tsx +27 -2
  68. package/corpus/templates/clips/desktop/src/shared/config.ts +16 -0
  69. package/corpus/templates/clips/desktop/src/styles.css +956 -134
  70. package/corpus/templates/clips/desktop/src-tauri/Cargo.toml +5 -0
  71. package/corpus/templates/clips/desktop/src-tauri/build.rs +69 -1
  72. package/corpus/templates/clips/desktop/src-tauri/src/accessibility.rs +386 -12
  73. package/corpus/templates/clips/desktop/src-tauri/src/capture_audio_bus.rs +382 -0
  74. package/corpus/templates/clips/desktop/src-tauri/src/capture_graph.rs +777 -0
  75. package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +249 -22
  76. package/corpus/templates/clips/desktop/src-tauri/src/config.rs +148 -1
  77. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +58 -4
  78. package/corpus/templates/clips/desktop/src-tauri/src/logfile.rs +13 -1
  79. package/corpus/templates/clips/desktop/src-tauri/src/native_screen/custom_capture.rs +1505 -51
  80. package/corpus/templates/clips/desktop/src-tauri/src/native_screen/live_upload.rs +124 -0
  81. package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +1006 -95
  82. package/corpus/templates/clips/desktop/src-tauri/src/rewind_capture_suspension.rs +165 -0
  83. package/corpus/templates/clips/desktop/src-tauri/src/rewind_chapters.rs +2434 -0
  84. package/corpus/templates/clips/desktop/src-tauri/src/rewind_clip.rs +1650 -0
  85. package/corpus/templates/clips/desktop/src-tauri/src/rewind_egress.rs +643 -0
  86. package/corpus/templates/clips/desktop/src-tauri/src/rewind_local_ask.rs +803 -0
  87. package/corpus/templates/clips/desktop/src-tauri/src/rewind_meeting_history.rs +595 -0
  88. package/corpus/templates/clips/desktop/src-tauri/src/screen_memory.rs +2900 -91
  89. package/corpus/templates/clips/desktop/src-tauri/src/screen_memory_ocr.rs +360 -0
  90. package/corpus/templates/clips/desktop/src-tauri/src/screen_memory_transcript.rs +408 -0
  91. package/corpus/templates/clips/desktop/src-tauri/src/shortcuts.rs +114 -33
  92. package/corpus/templates/clips/desktop/src-tauri/src/state.rs +2 -2
  93. package/corpus/templates/clips/desktop/src-tauri/src/system_audio.rs +13 -3
  94. package/corpus/templates/clips/desktop/src-tauri/src/tray.rs +4 -1
  95. package/corpus/templates/clips/desktop/src-tauri/src/util.rs +7 -13
  96. package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +198 -11
  97. package/corpus/templates/clips/desktop/src-tauri/tauri.alpha.conf.json +17 -0
  98. package/corpus/toolkit/CHANGELOG.md +6 -0
  99. package/corpus/toolkit/package.json +1 -1
  100. package/dist/cli/mcp-config-writers.d.ts +2 -2
  101. package/dist/cli/mcp-config-writers.d.ts.map +1 -1
  102. package/dist/cli/mcp-config-writers.js +6 -6
  103. package/dist/cli/mcp-config-writers.js.map +1 -1
  104. package/dist/cli/mcp.d.ts +14 -0
  105. package/dist/cli/mcp.d.ts.map +1 -1
  106. package/dist/cli/mcp.js +79 -0
  107. package/dist/cli/mcp.js.map +1 -1
  108. package/dist/cli/skills-content/help.d.ts +1 -1
  109. package/dist/cli/skills-content/help.d.ts.map +1 -1
  110. package/dist/cli/skills-content/help.js +4 -3
  111. package/dist/cli/skills-content/help.js.map +1 -1
  112. package/dist/cli/skills-content/index.d.ts +1 -0
  113. package/dist/cli/skills-content/index.d.ts.map +1 -1
  114. package/dist/cli/skills-content/index.js +1 -0
  115. package/dist/cli/skills-content/index.js.map +1 -1
  116. package/dist/cli/skills-content/rewind-skill.d.ts +2 -0
  117. package/dist/cli/skills-content/rewind-skill.d.ts.map +1 -0
  118. package/dist/cli/skills-content/rewind-skill.js +53 -0
  119. package/dist/cli/skills-content/rewind-skill.js.map +1 -0
  120. package/dist/cli/skills.d.ts +6 -0
  121. package/dist/cli/skills.d.ts.map +1 -1
  122. package/dist/cli/skills.js +90 -14
  123. package/dist/cli/skills.js.map +1 -1
  124. package/dist/collab/struct-routes.d.ts +1 -1
  125. package/dist/mcp/screen-memory-stdio.d.ts +365 -0
  126. package/dist/mcp/screen-memory-stdio.d.ts.map +1 -1
  127. package/dist/mcp/screen-memory-stdio.js +1014 -91
  128. package/dist/mcp/screen-memory-stdio.js.map +1 -1
  129. package/dist/mcp-client/index.d.ts +1 -1
  130. package/dist/mcp-client/index.d.ts.map +1 -1
  131. package/dist/mcp-client/index.js +1 -1
  132. package/dist/mcp-client/index.js.map +1 -1
  133. package/dist/mcp-client/screen-memory-local.d.ts +90 -0
  134. package/dist/mcp-client/screen-memory-local.d.ts.map +1 -1
  135. package/dist/mcp-client/screen-memory-local.js +590 -12
  136. package/dist/mcp-client/screen-memory-local.js.map +1 -1
  137. package/dist/observability/routes.d.ts +1 -1
  138. package/dist/progress/routes.d.ts +1 -1
  139. package/dist/provider-api/actions/provider-api.d.ts +4 -4
  140. package/dist/resources/handlers.d.ts +1 -1
  141. package/dist/server/agent-chat-plugin.d.ts +5 -0
  142. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  143. package/dist/server/agent-chat-plugin.js +10 -9
  144. package/dist/server/agent-chat-plugin.js.map +1 -1
  145. package/package.json +2 -2
  146. package/src/cli/mcp-config-writers.ts +6 -4
  147. package/src/cli/mcp.ts +124 -0
  148. package/src/cli/skills-content/help.ts +4 -3
  149. package/src/cli/skills-content/index.ts +1 -0
  150. package/src/cli/skills-content/rewind-skill.ts +52 -0
  151. package/src/cli/skills.ts +115 -13
  152. package/src/mcp/screen-memory-stdio.ts +1360 -104
  153. package/src/mcp-client/index.ts +9 -0
  154. package/src/mcp-client/screen-memory-local.ts +847 -13
  155. package/src/server/agent-chat-plugin.ts +16 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.114.6",
3
+ "version": "0.114.8",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -381,7 +381,7 @@
381
381
  "yjs": "^13.6.31",
382
382
  "zod": "^4.3.6",
383
383
  "@agent-native/recap-cli": "0.4.5",
384
- "@agent-native/toolkit": "^0.8.1"
384
+ "@agent-native/toolkit": "^0.8.2"
385
385
  },
386
386
  "devDependencies": {
387
387
  "@ai-sdk/anthropic": "^3.0.71",
@@ -123,12 +123,13 @@ export function buildLocalMcpEntryForClient(
123
123
  client: ClientId,
124
124
  args: string[],
125
125
  env?: Record<string, string>,
126
+ command = "agent-native",
126
127
  ): Record<string, unknown> {
127
128
  const cleanEnv = env ? Object.fromEntries(Object.entries(env)) : {};
128
129
  if (client === "opencode") {
129
130
  return {
130
131
  type: "local",
131
- command: ["agent-native", ...args],
132
+ command: [command, ...args],
132
133
  enabled: true,
133
134
  ...(Object.keys(cleanEnv).length ? { environment: cleanEnv } : {}),
134
135
  };
@@ -136,13 +137,13 @@ export function buildLocalMcpEntryForClient(
136
137
  if (client === "github-copilot") {
137
138
  return {
138
139
  type: "stdio",
139
- command: "agent-native",
140
+ command,
140
141
  args,
141
142
  ...(Object.keys(cleanEnv).length ? { env: cleanEnv } : {}),
142
143
  };
143
144
  }
144
145
  return {
145
- command: "agent-native",
146
+ command,
146
147
  args,
147
148
  ...(Object.keys(cleanEnv).length ? { env: cleanEnv } : {}),
148
149
  };
@@ -543,9 +544,10 @@ export function buildCodexLocalBlock(
543
544
  name: string,
544
545
  args: string[],
545
546
  env?: Record<string, string>,
547
+ command = "agent-native",
546
548
  ): string {
547
549
  const lines: string[] = [codexMcpHeader(name)];
548
- lines.push(`command = "agent-native"`);
550
+ lines.push(`command = ${tomlQuote(command)}`);
549
551
  lines.push(`args = [${args.map(tomlQuote).join(", ")}]`);
550
552
  const cleanEnv = env ? Object.fromEntries(Object.entries(env)) : {};
551
553
  if (Object.keys(cleanEnv).length) {
package/src/cli/mcp.ts CHANGED
@@ -15,6 +15,7 @@
15
15
 
16
16
  import crypto from "node:crypto";
17
17
  import fs from "node:fs";
18
+ import os from "node:os";
18
19
  import path from "node:path";
19
20
 
20
21
  import { MCP_PUBLIC_ROUTE_PREFIX } from "../mcp/route-paths.js";
@@ -42,6 +43,7 @@ import {
42
43
  } from "./mcp-config-writers.js";
43
44
 
44
45
  const SERVER_NAME_PREFIX = "agent-native";
46
+ const SCREEN_MEMORY_SERVER_NAME = "clips-screen-memory";
45
47
 
46
48
  interface ParsedArgs {
47
49
  _: string[];
@@ -83,6 +85,58 @@ function logOut(msg: string): void {
83
85
  process.stdout.write(`${msg}\n`);
84
86
  }
85
87
 
88
+ export interface ScreenMemoryStoreResolutionOptions {
89
+ explicitDir?: string;
90
+ env?: NodeJS.ProcessEnv;
91
+ platform?: NodeJS.Platform;
92
+ homeDir?: string;
93
+ }
94
+
95
+ /**
96
+ * Resolve the active Clips store without asking people to find an app-data
97
+ * path. Environment overrides remain the unambiguous escape hatch; otherwise
98
+ * the most recently touched installed Clips/Clips Alpha store wins.
99
+ */
100
+ export function resolveScreenMemoryStoreDir(
101
+ options: ScreenMemoryStoreResolutionOptions = {},
102
+ ): string | undefined {
103
+ if (options.explicitDir) return path.resolve(options.explicitDir);
104
+ const env = options.env ?? process.env;
105
+ const override =
106
+ env.CLIPS_SCREEN_MEMORY_DIR || env.AGENT_NATIVE_SCREEN_MEMORY_DIR;
107
+ if (override) return path.resolve(override);
108
+
109
+ const platform = options.platform ?? process.platform;
110
+ const home = options.homeDir ?? os.homedir();
111
+ const appDataRoot =
112
+ platform === "darwin"
113
+ ? path.join(home, "Library", "Application Support")
114
+ : platform === "win32"
115
+ ? env.APPDATA || path.join(home, "AppData", "Roaming")
116
+ : env.XDG_DATA_HOME || path.join(home, ".local", "share");
117
+ return ["com.clips.tray", "com.clips.tray.alpha"]
118
+ .map((bundleId) => path.join(appDataRoot, bundleId, "screen-memory"))
119
+ .filter((candidate) => fs.existsSync(candidate))
120
+ .map((candidate) => ({
121
+ candidate,
122
+ modifiedAt: Math.max(
123
+ fs.statSync(candidate).mtimeMs,
124
+ ...["feature-config.json", "chapters.json"]
125
+ .map((name) =>
126
+ name === "feature-config.json"
127
+ ? path.join(path.dirname(candidate), name)
128
+ : path.join(candidate, name),
129
+ )
130
+ .filter((file) => fs.existsSync(file))
131
+ .map((file) => fs.statSync(file).mtimeMs),
132
+ ),
133
+ }))
134
+ .sort(
135
+ (a, b) =>
136
+ b.modifiedAt - a.modifiedAt || a.candidate.localeCompare(b.candidate),
137
+ )[0]?.candidate;
138
+ }
139
+
86
140
  // ---------------------------------------------------------------------------
87
141
  // .env token provisioning (local dev) — hand-rolled idempotent upsert
88
142
  // ---------------------------------------------------------------------------
@@ -343,6 +397,38 @@ function installForClient(
343
397
  return file;
344
398
  }
345
399
 
400
+ export function installScreenMemoryForClient(
401
+ client: ClientId,
402
+ storeDir: string,
403
+ cwd: string,
404
+ scope: string | undefined,
405
+ ): string {
406
+ const file = configPathFor(client, cwd, scope);
407
+ const args = [
408
+ "-y",
409
+ "@agent-native/core@latest",
410
+ "mcp",
411
+ "screen-memory",
412
+ "--dir",
413
+ path.resolve(storeDir),
414
+ ];
415
+ if (client === "codex") {
416
+ writeCodexBlock(
417
+ file,
418
+ SCREEN_MEMORY_SERVER_NAME,
419
+ buildCodexLocalBlock(SCREEN_MEMORY_SERVER_NAME, args, {}, "npx"),
420
+ );
421
+ } else {
422
+ writeJsonMcpEntryForClient(
423
+ client,
424
+ file,
425
+ SCREEN_MEMORY_SERVER_NAME,
426
+ buildLocalMcpEntryForClient(client, args, {}, "npx"),
427
+ );
428
+ }
429
+ return file;
430
+ }
431
+
346
432
  function uninstallForClient(
347
433
  client: ClientId,
348
434
  appId: string,
@@ -454,6 +540,36 @@ async function cmdInstall(p: ParsedArgs): Promise<void> {
454
540
  logOut(` Restart ${client} to pick up the new MCP server.`);
455
541
  }
456
542
 
543
+ function cmdInstallScreenMemory(p: ParsedArgs): void {
544
+ const client = normalizeClientId(p.client);
545
+ if (!client) {
546
+ logErr(
547
+ `Usage: npx @agent-native/core@latest mcp install-screen-memory --client ${SELECTABLE_CLIENTS.join("|")} [--dir <path>] [--scope user|project]`,
548
+ );
549
+ process.exit(1);
550
+ }
551
+ const screenMemoryDir = resolveScreenMemoryStoreDir({
552
+ explicitDir: p.screenMemoryDir,
553
+ });
554
+ if (!screenMemoryDir) {
555
+ logErr(
556
+ "No local Clips Screen Memory store was found. Turn Rewind on in Clips, or pass --dir <path>.",
557
+ );
558
+ process.exit(1);
559
+ }
560
+ const file = installScreenMemoryForClient(
561
+ client,
562
+ screenMemoryDir,
563
+ process.cwd(),
564
+ p.scope,
565
+ );
566
+ logOut(`Installed \"${SCREEN_MEMORY_SERVER_NAME}\" for ${client} → ${file}`);
567
+ logOut(" Store: current local Clips Rewind memory");
568
+ logOut(
569
+ ` Restart ${client} to pick up the repaired Screen Memory MCP server.`,
570
+ );
571
+ }
572
+
457
573
  function cmdUninstall(p: ParsedArgs): void {
458
574
  const client = normalizeClientId(p.client);
459
575
  if (!client) {
@@ -544,6 +660,11 @@ Usage:
544
660
  Run the local Clips Screen Memory stdio server.
545
661
  Defaults to the Clips app-data screen-memory folder.
546
662
 
663
+ npx @agent-native/core@latest mcp install-screen-memory --client <c> [--dir <path>] [--scope user|project]
664
+ Install or repair the dedicated local Screen Memory MCP. The active Clips
665
+ or Clips Alpha store is discovered automatically; --dir is an override.
666
+ Clients: claude-code, codex, cowork, cursor, opencode, github-copilot
667
+
547
668
  npx @agent-native/core@latest mcp install --client <c> [--app <id>] [--scope user|project]
548
669
  Provision a token and write the client's MCP config (idempotent).
549
670
  Clients: claude-code, codex, cowork, cursor, opencode, github-copilot
@@ -571,6 +692,9 @@ export async function runMcp(args: string[]): Promise<void> {
571
692
  case "install":
572
693
  await cmdInstall(p);
573
694
  return;
695
+ case "install-screen-memory":
696
+ cmdInstallScreenMemory(p);
697
+ return;
574
698
  case "uninstall":
575
699
  cmdUninstall(p);
576
700
  return;
@@ -2,13 +2,14 @@ export const HELP = `npx @agent-native/core@latest skills
2
2
 
3
3
  Usage:
4
4
  npx @agent-native/core@latest skills list
5
- npx @agent-native/core@latest skills status [assets|content|design-exploration|visual-edit|visual-plan|visual-recap|visualize-repo|context-xray|scaffold] [--client codex|claude-code|pi|all] [--scope user|project] [--json]
6
- npx @agent-native/core@latest skills update [assets|content|design-exploration|visual-edit|visual-plan|visual-recap|visualize-repo|context-xray|scaffold] [--client codex|claude-code|pi|all] [--scope user|project] [--dry-run] [--json]
7
- npx @agent-native/core@latest skills add assets|content|design-exploration|visual-edit|visual-plan|visual-recap|visualize-repo|context-xray [--client codex|claude-code|cowork|cursor|opencode|github-copilot|all] [--scope user|project] [--mode hosted|local-files|self-hosted] [--mcp-url <url>] [--no-connect] [--with-github-action] [--yes] [--dry-run] [--json]
5
+ npx @agent-native/core@latest skills status [assets|content|rewind|design-exploration|visual-edit|visual-plan|visual-recap|visualize-repo|context-xray|scaffold] [--client codex|claude-code|pi|all] [--scope user|project] [--json]
6
+ npx @agent-native/core@latest skills update [assets|content|rewind|design-exploration|visual-edit|visual-plan|visual-recap|visualize-repo|context-xray|scaffold] [--client codex|claude-code|pi|all] [--scope user|project] [--dry-run] [--json]
7
+ npx @agent-native/core@latest skills add assets|content|rewind|design-exploration|visual-edit|visual-plan|visual-recap|visualize-repo|context-xray [--client codex|claude-code|cowork|cursor|opencode|github-copilot|all] [--scope user|project] [--mode hosted|local-files|self-hosted] [--mcp-url <url>] [--no-connect] [--with-github-action] [--yes] [--dry-run] [--json]
8
8
  npx @agent-native/core@latest skills add <manifest-or-app-dir|skill-repo> [--skill <name>] [--client ...] [--yes]
9
9
 
10
10
  Examples:
11
11
  npx @agent-native/core@latest skills add assets
12
+ npx @agent-native/core@latest skills add rewind --client codex --scope user --yes
12
13
  npx @agent-native/core@latest skills add content --mode local-files
13
14
  npx @agent-native/core@latest skills add design-exploration
14
15
  npx @agent-native/core@latest skills add visual-edit
@@ -8,6 +8,7 @@
8
8
  export * from "./help.js";
9
9
  export * from "./assets-skill.js";
10
10
  export * from "./content-skill.js";
11
+ export * from "./rewind-skill.js";
11
12
  export * from "./design-exploration-skill.js";
12
13
  export * from "./design-visual-edit-skill.js";
13
14
  export * from "./plan-setup-auth.js";
@@ -0,0 +1,52 @@
1
+ export const REWIND_SKILL_MD = `---
2
+ name: rewind
3
+ description: >-
4
+ Retrieve recent local Clips Rewind context when the user says "Look at
5
+ Rewind," asks what just happened, or refers to something they recently said
6
+ or saw.
7
+ metadata:
8
+ visibility: exported
9
+ ---
10
+
11
+ # Rewind
12
+
13
+ Use Clips Rewind as local screen memory. Start broad enough to find the right
14
+ moment, then read only the smallest relevant range.
15
+
16
+ ## Retrieval Flow
17
+
18
+ 1. Call \`screen_memory_status\` first. If the newest segment is still open,
19
+ wait for it to finalize rather than substituting an older segment.
20
+ 2. Search \`screen_memory_search_chapters\` before requesting raw recent
21
+ context. Use the user's words, the visible app or project, and the likely
22
+ time range as clues.
23
+ 3. If several chapters plausibly match, show the candidates and ask which one
24
+ the user means. Do not blend separate workstreams together.
25
+ 4. Read the smallest useful range with \`screen_memory_recent_context\`.
26
+ Restate what you recovered before acting, and flag transcription or coverage
27
+ uncertainty.
28
+ 5. Use \`screen_memory_frame_at\` for one exact visual moment or
29
+ \`screen_memory_contact_sheet\` to scan a bounded range. Prefer local frames
30
+ before escalating to cloud processing.
31
+ 6. Request the smallest relevant timestamp range through Clips' bounded private
32
+ Clip handoff only when local text and frames are insufficient, such as
33
+ garbled speech, important motion, dense analysis, or a Clip the user wants
34
+ to keep and query later.
35
+
36
+ ## Boundaries
37
+
38
+ - Rewind recordings, screenshots, audio, transcripts, OCR, and indexes remain
39
+ local unless the user explicitly asks for a bounded Clip handoff.
40
+ - Do not reveal archive filesystem paths, crawl Clips' app-data folders, or
41
+ bypass the Screen Memory MCP broker.
42
+ - Do not upload frames returned by local Screen Memory tools.
43
+ - Treat foreground apps and chapter labels as evidence, not proof of intent.
44
+ - If the Screen Memory MCP is missing, explain that the one-time setup needs to
45
+ be repaired with:
46
+
47
+ \`npx -y @agent-native/core@latest skills add rewind --client <client> --scope user --yes\`
48
+
49
+ Replace \`<client>\` with the current compatible host: \`codex\`,
50
+ \`claude-code\`, \`cursor\`, \`opencode\`, \`github-copilot\`, or \`cowork\`.
51
+ Ask the user to restart the host if it cannot reload MCP servers in place.
52
+ `;
package/src/cli/skills.ts CHANGED
@@ -33,6 +33,10 @@ import {
33
33
  installLocalContextXray,
34
34
  } from "./context-xray-local.js";
35
35
  import { CLIENTS, type ClientId } from "./mcp-config-writers.js";
36
+ import {
37
+ installScreenMemoryForClient,
38
+ resolveScreenMemoryStoreDir,
39
+ } from "./mcp.js";
36
40
  import { PR_VISUAL_RECAP_SETUP, writePrVisualRecapWorkflow } from "./recap.js";
37
41
  import { setupAgentSymlinks } from "./setup-agents.js";
38
42
  import {
@@ -46,6 +50,7 @@ import {
46
50
  EXEMPLAR_REFERENCE_MD,
47
51
  HELP,
48
52
  LOCAL_FILES_REFERENCE_MD,
53
+ REWIND_SKILL_MD,
49
54
  VISUAL_PLANS_SKILL_MD,
50
55
  VISUAL_RECAP_SKILL_MD,
51
56
  VISUALIZE_REPO_SKILL_MD,
@@ -161,6 +166,40 @@ export const BUILT_IN_APP_SKILLS = {
161
166
  }),
162
167
  skillMarkdown: CONTENT_SKILL_MD,
163
168
  },
169
+ rewind: {
170
+ skillName: "rewind",
171
+ screenMemoryMcp: true,
172
+ manifest: normalizeAppSkillManifest({
173
+ schemaVersion: 1,
174
+ id: "rewind",
175
+ displayName: "Rewind",
176
+ description:
177
+ "Retrieve recent local Clips screen memory, chapters, transcripts, and exact frames through a privacy-preserving agent workflow.",
178
+ hosted: {
179
+ url: "https://clips.agent-native.com",
180
+ mcpUrl: "https://clips.agent-native.com/mcp",
181
+ },
182
+ mcp: { serverName: "clips-screen-memory" },
183
+ auth: { mode: "none" },
184
+ surfaces: [
185
+ {
186
+ id: "rewind-memory",
187
+ path: "/",
188
+ description:
189
+ "Search and inspect the user's local Clips Rewind memory through a bounded local MCP broker.",
190
+ },
191
+ ],
192
+ skills: [
193
+ {
194
+ path: "skills/rewind",
195
+ visibility: "exported",
196
+ exportAs: "rewind",
197
+ },
198
+ ],
199
+ hostAdapters: ["plain-skill", "claude-skill", "generic-mcp"],
200
+ }),
201
+ skillMarkdown: REWIND_SKILL_MD,
202
+ },
164
203
  design: {
165
204
  skillName: "design-exploration",
166
205
  extraSkills: {
@@ -356,6 +395,7 @@ export const BUILT_IN_APP_SKILLS = {
356
395
  */
357
396
  extraFiles?: Record<string, Record<string, string>>;
358
397
  localOnly?: boolean;
398
+ screenMemoryMcp?: boolean;
359
399
  }
360
400
  >;
361
401
 
@@ -379,6 +419,10 @@ const BUILT_IN_APP_SKILL_ALIASES = {
379
419
  "local-content": "content",
380
420
  "content-local-files": "content",
381
421
  "agent-native-content": "content",
422
+ rewind: "rewind",
423
+ "screen-memory": "rewind",
424
+ "clips-rewind": "rewind",
425
+ "agent-native-rewind": "rewind",
382
426
  design: "design",
383
427
  "ui-design": "design",
384
428
  "ux-design": "design",
@@ -421,6 +465,7 @@ const BUILT_IN_APP_SKILL_DISPLAY_ALIASES = {
421
465
  "content-local-files",
422
466
  "agent-native-content",
423
467
  ],
468
+ rewind: ["screen-memory", "clips-rewind", "agent-native-rewind"],
424
469
  design: [
425
470
  "design-exploration",
426
471
  "visual-edit",
@@ -811,6 +856,12 @@ function isLocalOnlyBuiltInSkill(
811
856
  return Boolean(entry && "localOnly" in entry && entry.localOnly);
812
857
  }
813
858
 
859
+ function isScreenMemoryMcpBuiltInSkill(
860
+ entry: (typeof BUILT_IN_APP_SKILLS)[BuiltInAppSkillId] | null | undefined,
861
+ ): boolean {
862
+ return Boolean(entry && "screenMemoryMcp" in entry && entry.screenMemoryMcp);
863
+ }
864
+
814
865
  function targetSupportsInstallMode(
815
866
  targetId: string | undefined,
816
867
  ): targetId is ModeAwareAppSkillId {
@@ -1019,6 +1070,7 @@ function skillFilesForBuiltIn(
1019
1070
  skillName,
1020
1071
  mcpUrl:
1021
1072
  isLocalOnlyBuiltInSkill(entry) ||
1073
+ isScreenMemoryMcpBuiltInSkill(entry) ||
1022
1074
  localFilesModeSkipsMcp(appSkillId, options.planMode)
1023
1075
  ? ""
1024
1076
  : (options.mcpUrl ?? entry.manifest.hosted.mcpUrl),
@@ -1238,9 +1290,10 @@ function builtInSkillsRootForAgent(
1238
1290
  ): string {
1239
1291
  const home = homeDir() ?? baseDir;
1240
1292
  if (scope === "project") {
1241
- if (agent === "codex") return path.join(baseDir, ".agents", "skills");
1242
- if (agent === "pi") return path.join(baseDir, ".agents", "skills");
1243
- return path.join(baseDir, ".claude", "skills");
1293
+ if (agent === "claude-code" || agent === "claude-code-cli") {
1294
+ return path.join(baseDir, ".claude", "skills");
1295
+ }
1296
+ return path.join(baseDir, ".agents", "skills");
1244
1297
  }
1245
1298
  if (agent === "codex") {
1246
1299
  return process.env.CODEX_HOME
@@ -1250,6 +1303,13 @@ function builtInSkillsRootForAgent(
1250
1303
  if (agent === "pi") {
1251
1304
  return path.join(home, ".agents", "skills");
1252
1305
  }
1306
+ if (
1307
+ agent === "cursor" ||
1308
+ agent === "opencode" ||
1309
+ agent === "github-copilot"
1310
+ ) {
1311
+ return path.join(home, ".agents", "skills");
1312
+ }
1253
1313
  return path.join(home, ".claude", "skills");
1254
1314
  }
1255
1315
 
@@ -2128,6 +2188,11 @@ const BUILT_IN_SKILL_PROMPT_OPTIONS: SkillsTargetPromptContext["options"] = [
2128
2188
  label: "content",
2129
2189
  hint: BUILT_IN_APP_SKILLS.content.manifest.description,
2130
2190
  },
2191
+ {
2192
+ value: "rewind",
2193
+ label: "rewind",
2194
+ hint: BUILT_IN_APP_SKILLS.rewind.manifest.description,
2195
+ },
2131
2196
  {
2132
2197
  value: "design-exploration",
2133
2198
  label: "design-exploration",
@@ -3309,7 +3374,13 @@ export async function addAgentNativeSkill(
3309
3374
  );
3310
3375
  }
3311
3376
  const knownBuiltIn = knownTarget ? BUILT_IN_APP_SKILLS[knownTarget] : null;
3377
+ const installsScreenMemoryMcp = isScreenMemoryMcpBuiltInSkill(knownBuiltIn);
3312
3378
  const baseDir = options.baseDir ?? process.cwd();
3379
+ if (installsScreenMemoryMcp && parsed.mcpUrl) {
3380
+ throw new Error(
3381
+ "Rewind uses the local Clips Screen Memory MCP and does not accept --mcp-url.",
3382
+ );
3383
+ }
3313
3384
  if (isLocalOnlyBuiltInSkill(knownBuiltIn)) {
3314
3385
  if (parsed.planMode) {
3315
3386
  throw new Error(
@@ -3415,7 +3486,9 @@ export async function addAgentNativeSkill(
3415
3486
  );
3416
3487
  }
3417
3488
  installTarget = preserveMcpUrlAppPathOverride(installTarget, parsed.mcpUrl);
3418
- const skillsAgents = skillsAgentsForClients(clients);
3489
+ const skillsAgents = installsScreenMemoryMcp
3490
+ ? clients
3491
+ : skillsAgentsForClients(clients);
3419
3492
  if (parsed.dryRun) {
3420
3493
  try {
3421
3494
  const localManifestPath = shouldWriteContentLocalFilesManifest(
@@ -3443,9 +3516,11 @@ export async function addAgentNativeSkill(
3443
3516
  displayName: installTarget.displayName,
3444
3517
  skillNames: installTarget.skillNames,
3445
3518
  skillsAgents,
3446
- mcpUrl: localFilesModeSkipsMcp(modeAwareTargetId, planMode)
3519
+ mcpUrl: installsScreenMemoryMcp
3447
3520
  ? ""
3448
- : installTarget.loaded.manifest.hosted.mcpUrl,
3521
+ : localFilesModeSkipsMcp(modeAwareTargetId, planMode)
3522
+ ? ""
3523
+ : installTarget.loaded.manifest.hosted.mcpUrl,
3449
3524
  mcpClients: shouldRegisterMcp ? mcpClients : [],
3450
3525
  dryRun: true,
3451
3526
  commands: [
@@ -3545,7 +3620,29 @@ export async function addAgentNativeSkill(
3545
3620
  dryRun: Boolean(parsed.dryRun),
3546
3621
  });
3547
3622
 
3548
- if (shouldRegisterMcp) {
3623
+ if (shouldRegisterMcp && installsScreenMemoryMcp) {
3624
+ const screenMemoryDir = resolveScreenMemoryStoreDir();
3625
+ if (!screenMemoryDir) {
3626
+ throw new Error(
3627
+ "No local Clips Screen Memory store was found. Turn Rewind on in Clips, then run the setup again.",
3628
+ );
3629
+ }
3630
+ registeredMcpClients = mcpClients.map((client) => {
3631
+ commands.push(
3632
+ `npx @agent-native/core@latest mcp install-screen-memory --client ${client} --scope ${parsed.scope}`,
3633
+ );
3634
+ installScreenMemoryForClient(
3635
+ client,
3636
+ screenMemoryDir,
3637
+ baseDir,
3638
+ parsed.scope,
3639
+ );
3640
+ return client;
3641
+ });
3642
+ options.telemetry?.track("skills_cli mcp registered", {
3643
+ skills: installTarget.skillNames.join(","),
3644
+ });
3645
+ } else if (shouldRegisterMcp) {
3549
3646
  commands.push(
3550
3647
  `npx @agent-native/core@latest app-skill ensure --manifest ${installTarget.loaded.file} --client ${parsed.client} --scope ${parsed.scope} --yes`,
3551
3648
  );
@@ -3655,9 +3752,11 @@ export async function addAgentNativeSkill(
3655
3752
  instructionSource,
3656
3753
  skillNames: installTarget.skillNames,
3657
3754
  skillsAgents,
3658
- mcpUrl: localFilesModeSkipsMcp(modeAwareTargetId, planMode)
3755
+ mcpUrl: installsScreenMemoryMcp
3659
3756
  ? ""
3660
- : installTarget.loaded.manifest.hosted.mcpUrl,
3757
+ : localFilesModeSkipsMcp(modeAwareTargetId, planMode)
3758
+ ? ""
3759
+ : installTarget.loaded.manifest.hosted.mcpUrl,
3661
3760
  mcpClients: registeredMcpClients,
3662
3761
  dryRun: parsed.dryRun,
3663
3762
  commands,
@@ -3689,10 +3788,13 @@ function listSkills(options: RunSkillsOptions = {}) {
3689
3788
  ] ?? [],
3690
3789
  name: entry.manifest.displayName,
3691
3790
  description: entry.manifest.description,
3692
- mcpUrl: isLocalOnlyBuiltInSkill(entry)
3693
- ? ""
3694
- : entry.manifest.hosted.mcpUrl,
3695
- local: isLocalOnlyBuiltInSkill(entry),
3791
+ mcpUrl:
3792
+ isLocalOnlyBuiltInSkill(entry) || isScreenMemoryMcpBuiltInSkill(entry)
3793
+ ? ""
3794
+ : entry.manifest.hosted.mcpUrl,
3795
+ local:
3796
+ isLocalOnlyBuiltInSkill(entry) ||
3797
+ isScreenMemoryMcpBuiltInSkill(entry),
3696
3798
  source: "agent-native",
3697
3799
  })),
3698
3800
  ...publicSkillEntries(options).map((entry) => ({