@agent-native/core 0.122.2 → 0.122.4
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/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +12 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/run-loop-with-resume.ts +12 -0
- package/corpus/core/src/cli/index.ts +2 -1
- package/corpus/core/src/cli/mcp.ts +13 -3
- package/corpus/core/src/cli/skills-content/rewind-skill.ts +36 -4
- package/corpus/core/src/cli/skills.ts +250 -37
- package/corpus/core/src/cli/telemetry-routing.ts +57 -0
- package/corpus/core/src/cli/telemetry.ts +3 -3
- package/corpus/core/src/integrations/a2a-continuation-processor.ts +182 -0
- package/corpus/core/src/integrations/a2a-continuations-store.ts +122 -12
- package/corpus/core/src/integrations/integration-campaign-recovery.ts +127 -0
- package/corpus/core/src/integrations/integration-campaigns-store.ts +1039 -0
- package/corpus/core/src/integrations/integration-durable-dispatch.ts +28 -3
- package/corpus/core/src/integrations/pending-tasks-retry-job.ts +8 -0
- package/corpus/core/src/integrations/plugin.ts +453 -35
- package/corpus/core/src/integrations/webhook-handler.ts +469 -11
- package/corpus/core/src/mcp/screen-memory-stdio.ts +21 -2
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +7 -3
- package/corpus/templates/content/app/components/editor/body-hydration.ts +10 -0
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +1 -0
- package/corpus/templates/content/app/root.tsx +12 -1
- package/corpus/templates/content/changelog/2026-07-23-new-pages-open-immediately-while-slow-network-work-continues.md +6 -0
- package/corpus/templates/content/changelog/2026-07-25-database-preview-actions-open-reliably.md +6 -0
- package/corpus/templates/content/e2e/playwright.config.ts +1 -1
- package/dist/agent/run-loop-with-resume.d.ts +7 -1
- package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
- package/dist/agent/run-loop-with-resume.js +7 -0
- package/dist/agent/run-loop-with-resume.js.map +1 -1
- package/dist/cli/index.js +3 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/mcp.d.ts.map +1 -1
- package/dist/cli/mcp.js +12 -3
- package/dist/cli/mcp.js.map +1 -1
- package/dist/cli/skills-content/rewind-skill.d.ts +1 -1
- package/dist/cli/skills-content/rewind-skill.d.ts.map +1 -1
- package/dist/cli/skills-content/rewind-skill.js +36 -4
- package/dist/cli/skills-content/rewind-skill.js.map +1 -1
- package/dist/cli/skills.d.ts +2 -0
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +191 -40
- package/dist/cli/skills.js.map +1 -1
- package/dist/cli/telemetry-routing.d.ts +2 -0
- package/dist/cli/telemetry-routing.d.ts.map +1 -0
- package/dist/cli/telemetry-routing.js +54 -0
- package/dist/cli/telemetry-routing.js.map +1 -0
- package/dist/cli/telemetry.js +3 -3
- package/dist/cli/telemetry.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +3 -3
- package/dist/integrations/a2a-continuation-processor.d.ts +14 -0
- package/dist/integrations/a2a-continuation-processor.d.ts.map +1 -1
- package/dist/integrations/a2a-continuation-processor.js +134 -1
- package/dist/integrations/a2a-continuation-processor.js.map +1 -1
- package/dist/integrations/a2a-continuations-store.d.ts +23 -0
- package/dist/integrations/a2a-continuations-store.d.ts.map +1 -1
- package/dist/integrations/a2a-continuations-store.js +99 -13
- package/dist/integrations/a2a-continuations-store.js.map +1 -1
- package/dist/integrations/integration-campaign-recovery.d.ts +16 -0
- package/dist/integrations/integration-campaign-recovery.d.ts.map +1 -0
- package/dist/integrations/integration-campaign-recovery.js +94 -0
- package/dist/integrations/integration-campaign-recovery.js.map +1 -0
- package/dist/integrations/integration-campaigns-store.d.ts +121 -0
- package/dist/integrations/integration-campaigns-store.d.ts.map +1 -0
- package/dist/integrations/integration-campaigns-store.js +784 -0
- package/dist/integrations/integration-campaigns-store.js.map +1 -0
- package/dist/integrations/integration-durable-dispatch.d.ts +3 -0
- package/dist/integrations/integration-durable-dispatch.d.ts.map +1 -1
- package/dist/integrations/integration-durable-dispatch.js +22 -3
- package/dist/integrations/integration-durable-dispatch.js.map +1 -1
- package/dist/integrations/pending-tasks-retry-job.d.ts.map +1 -1
- package/dist/integrations/pending-tasks-retry-job.js +6 -0
- package/dist/integrations/pending-tasks-retry-job.js.map +1 -1
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +325 -18
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/integrations/webhook-handler.d.ts +16 -1
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +368 -13
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/mcp/screen-memory-stdio.d.ts +2 -0
- package/dist/mcp/screen-memory-stdio.d.ts.map +1 -1
- package/dist/mcp/screen-memory-stdio.js +12 -2
- package/dist/mcp/screen-memory-stdio.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +14 -14
- package/dist/provider-api/actions/provider-api.d.ts +8 -8
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/package.json +1 -1
- package/src/agent/run-loop-with-resume.ts +12 -0
- package/src/cli/index.ts +2 -1
- package/src/cli/mcp.ts +13 -3
- package/src/cli/skills-content/rewind-skill.ts +36 -4
- package/src/cli/skills.ts +250 -37
- package/src/cli/telemetry-routing.ts +57 -0
- package/src/cli/telemetry.ts +3 -3
- package/src/integrations/a2a-continuation-processor.ts +182 -0
- package/src/integrations/a2a-continuations-store.ts +122 -12
- package/src/integrations/integration-campaign-recovery.ts +127 -0
- package/src/integrations/integration-campaigns-store.ts +1039 -0
- package/src/integrations/integration-durable-dispatch.ts +28 -3
- package/src/integrations/pending-tasks-retry-job.ts +8 -0
- package/src/integrations/plugin.ts +453 -35
- package/src/integrations/webhook-handler.ts +469 -11
- package/src/mcp/screen-memory-stdio.ts +21 -2
|
@@ -75,10 +75,8 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
75
75
|
user: "user";
|
|
76
76
|
}>>;
|
|
77
77
|
}, z.core.$strip>>, {
|
|
78
|
-
message?: undefined;
|
|
79
|
-
id?: undefined;
|
|
80
|
-
provider?: undefined;
|
|
81
78
|
deleted?: undefined;
|
|
79
|
+
id?: undefined;
|
|
82
80
|
found?: undefined;
|
|
83
81
|
providers: {
|
|
84
82
|
id: string;
|
|
@@ -90,44 +88,46 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
90
88
|
updatedAt: number;
|
|
91
89
|
}[];
|
|
92
90
|
count: number;
|
|
91
|
+
provider?: undefined;
|
|
93
92
|
registered?: undefined;
|
|
94
93
|
label?: undefined;
|
|
95
|
-
} | {
|
|
96
94
|
message?: undefined;
|
|
97
|
-
|
|
98
|
-
id?: undefined;
|
|
95
|
+
} | {
|
|
99
96
|
deleted?: undefined;
|
|
97
|
+
id?: undefined;
|
|
100
98
|
providers?: undefined;
|
|
99
|
+
count?: undefined;
|
|
101
100
|
found: boolean;
|
|
102
101
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
103
102
|
registered?: undefined;
|
|
104
103
|
label?: undefined;
|
|
105
|
-
} | {
|
|
106
104
|
message?: undefined;
|
|
107
|
-
|
|
108
|
-
provider?: undefined;
|
|
105
|
+
} | {
|
|
109
106
|
deleted?: undefined;
|
|
110
107
|
providers?: undefined;
|
|
108
|
+
count?: undefined;
|
|
109
|
+
provider?: undefined;
|
|
111
110
|
found: boolean;
|
|
112
111
|
id: string;
|
|
113
112
|
registered?: undefined;
|
|
114
113
|
label?: undefined;
|
|
115
|
-
} | {
|
|
116
114
|
message?: undefined;
|
|
117
|
-
|
|
118
|
-
provider?: undefined;
|
|
115
|
+
} | {
|
|
119
116
|
found?: undefined;
|
|
120
117
|
providers?: undefined;
|
|
118
|
+
count?: undefined;
|
|
119
|
+
provider?: undefined;
|
|
121
120
|
deleted: boolean;
|
|
122
121
|
id: string;
|
|
123
122
|
registered?: undefined;
|
|
124
123
|
label?: undefined;
|
|
124
|
+
message?: undefined;
|
|
125
125
|
} | {
|
|
126
|
-
count?: undefined;
|
|
127
|
-
provider?: undefined;
|
|
128
126
|
deleted?: undefined;
|
|
129
127
|
found?: undefined;
|
|
130
128
|
providers?: undefined;
|
|
129
|
+
count?: undefined;
|
|
130
|
+
provider?: undefined;
|
|
131
131
|
registered: boolean;
|
|
132
132
|
id: string;
|
|
133
133
|
label: string;
|
|
@@ -311,9 +311,10 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
311
311
|
notes?: string | undefined;
|
|
312
312
|
scope?: "org" | "user" | undefined;
|
|
313
313
|
}, {
|
|
314
|
+
message?: undefined;
|
|
314
315
|
id?: undefined;
|
|
316
|
+
deleted?: undefined;
|
|
315
317
|
found?: undefined;
|
|
316
|
-
message?: undefined;
|
|
317
318
|
providers: {
|
|
318
319
|
id: string;
|
|
319
320
|
label: string;
|
|
@@ -325,33 +326,32 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
325
326
|
}[];
|
|
326
327
|
count: number;
|
|
327
328
|
provider?: undefined;
|
|
328
|
-
deleted?: undefined;
|
|
329
329
|
registered?: undefined;
|
|
330
330
|
label?: undefined;
|
|
331
331
|
} | {
|
|
332
|
-
id?: undefined;
|
|
333
332
|
message?: undefined;
|
|
334
333
|
count?: undefined;
|
|
334
|
+
id?: undefined;
|
|
335
|
+
deleted?: undefined;
|
|
335
336
|
providers?: undefined;
|
|
336
337
|
found: boolean;
|
|
337
338
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
338
|
-
deleted?: undefined;
|
|
339
339
|
registered?: undefined;
|
|
340
340
|
label?: undefined;
|
|
341
341
|
} | {
|
|
342
342
|
message?: undefined;
|
|
343
343
|
count?: undefined;
|
|
344
|
+
deleted?: undefined;
|
|
344
345
|
providers?: undefined;
|
|
345
346
|
provider?: undefined;
|
|
346
347
|
found: boolean;
|
|
347
348
|
id: string;
|
|
348
|
-
deleted?: undefined;
|
|
349
349
|
registered?: undefined;
|
|
350
350
|
label?: undefined;
|
|
351
351
|
} | {
|
|
352
|
-
found?: undefined;
|
|
353
352
|
message?: undefined;
|
|
354
353
|
count?: undefined;
|
|
354
|
+
found?: undefined;
|
|
355
355
|
providers?: undefined;
|
|
356
356
|
provider?: undefined;
|
|
357
357
|
deleted: boolean;
|
|
@@ -359,11 +359,11 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
359
359
|
registered?: undefined;
|
|
360
360
|
label?: undefined;
|
|
361
361
|
} | {
|
|
362
|
-
found?: undefined;
|
|
363
362
|
count?: undefined;
|
|
363
|
+
deleted?: undefined;
|
|
364
|
+
found?: undefined;
|
|
364
365
|
providers?: undefined;
|
|
365
366
|
provider?: undefined;
|
|
366
|
-
deleted?: undefined;
|
|
367
367
|
registered: boolean;
|
|
368
368
|
id: string;
|
|
369
369
|
label: string;
|
|
@@ -49,8 +49,8 @@ export declare function handleUpdateResource(event: any): Promise<import("./stor
|
|
|
49
49
|
}>;
|
|
50
50
|
/** DELETE /_agent-native/resources/:id — delete a resource */
|
|
51
51
|
export declare function handleDeleteResource(event: any): Promise<{
|
|
52
|
-
ok?: undefined;
|
|
53
52
|
error: string;
|
|
53
|
+
ok?: undefined;
|
|
54
54
|
} | {
|
|
55
55
|
error?: undefined;
|
|
56
56
|
ok: boolean;
|
|
@@ -27,11 +27,11 @@ export declare function resolveAgentEngineApiKeyWriteTarget(event: H3Event, scop
|
|
|
27
27
|
export declare function createAgentEngineApiKeyHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
28
28
|
error: any;
|
|
29
29
|
} | {
|
|
30
|
-
error?: undefined;
|
|
31
30
|
ok: boolean;
|
|
32
31
|
key: string;
|
|
33
32
|
baseUrlKey?: string;
|
|
34
33
|
scope: AgentEngineApiKeyScope;
|
|
34
|
+
error?: undefined;
|
|
35
35
|
}>>;
|
|
36
36
|
export {};
|
|
37
37
|
//# sourceMappingURL=agent-engine-api-key-route.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.122.
|
|
3
|
+
"version": "0.122.4",
|
|
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": {
|
|
@@ -124,6 +124,18 @@ async function appendContinuationAndJournal(
|
|
|
124
124
|
appendToolCallJournalNote(messages, events);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
/**
|
|
128
|
+
* Rebuild the same safe continuation context for a logical turn that resumes
|
|
129
|
+
* in a fresh hosted invocation.
|
|
130
|
+
*/
|
|
131
|
+
export async function appendDurableContinuationContext(
|
|
132
|
+
messages: EngineMessage[],
|
|
133
|
+
reason: AgentLoopContinuationReason,
|
|
134
|
+
threadId: string,
|
|
135
|
+
): Promise<void> {
|
|
136
|
+
await appendContinuationAndJournal(messages, reason, threadId);
|
|
137
|
+
}
|
|
138
|
+
|
|
127
139
|
async function hasCompletedSideEffectToolCallInCurrentTurn(
|
|
128
140
|
threadId: string | undefined,
|
|
129
141
|
localEvents: readonly AgentChatEvent[] = [],
|
package/src/cli/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { fileURLToPath } from "url";
|
|
|
9
9
|
import * as Sentry from "@sentry/node";
|
|
10
10
|
|
|
11
11
|
import { resolveDeployPostBuildInvocation } from "./deploy-build.js";
|
|
12
|
+
import { shouldTrackCliRun } from "./telemetry-routing.js";
|
|
12
13
|
import { createCliTelemetry } from "./telemetry.js";
|
|
13
14
|
|
|
14
15
|
// Resolve version once at module scope — used by both --version and --help
|
|
@@ -604,7 +605,7 @@ function runBuildStep(
|
|
|
604
605
|
});
|
|
605
606
|
}
|
|
606
607
|
|
|
607
|
-
trackCli("cli.run");
|
|
608
|
+
if (shouldTrackCliRun(command, args)) trackCli("cli.run");
|
|
608
609
|
|
|
609
610
|
switch (command) {
|
|
610
611
|
case "dev": {
|
package/src/cli/mcp.ts
CHANGED
|
@@ -92,6 +92,15 @@ export interface ScreenMemoryStoreResolutionOptions {
|
|
|
92
92
|
homeDir?: string;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
function existingScreenMemoryStore(candidate: string): string | undefined {
|
|
96
|
+
const resolved = path.resolve(candidate);
|
|
97
|
+
try {
|
|
98
|
+
return fs.statSync(resolved).isDirectory() ? resolved : undefined;
|
|
99
|
+
} catch {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
95
104
|
/**
|
|
96
105
|
* Resolve the active Clips store without asking people to find an app-data
|
|
97
106
|
* path. Environment overrides remain the unambiguous escape hatch; otherwise
|
|
@@ -100,11 +109,12 @@ export interface ScreenMemoryStoreResolutionOptions {
|
|
|
100
109
|
export function resolveScreenMemoryStoreDir(
|
|
101
110
|
options: ScreenMemoryStoreResolutionOptions = {},
|
|
102
111
|
): string | undefined {
|
|
103
|
-
if (options.explicitDir)
|
|
112
|
+
if (options.explicitDir)
|
|
113
|
+
return existingScreenMemoryStore(options.explicitDir);
|
|
104
114
|
const env = options.env ?? process.env;
|
|
105
115
|
const override =
|
|
106
116
|
env.CLIPS_SCREEN_MEMORY_DIR || env.AGENT_NATIVE_SCREEN_MEMORY_DIR;
|
|
107
|
-
if (override) return
|
|
117
|
+
if (override) return existingScreenMemoryStore(override);
|
|
108
118
|
|
|
109
119
|
const platform = options.platform ?? process.platform;
|
|
110
120
|
const home = options.homeDir ?? os.homedir();
|
|
@@ -116,7 +126,7 @@ export function resolveScreenMemoryStoreDir(
|
|
|
116
126
|
: env.XDG_DATA_HOME || path.join(home, ".local", "share");
|
|
117
127
|
return ["com.clips.tray", "com.clips.tray.alpha"]
|
|
118
128
|
.map((bundleId) => path.join(appDataRoot, bundleId, "screen-memory"))
|
|
119
|
-
.filter((candidate) =>
|
|
129
|
+
.filter((candidate) => existingScreenMemoryStore(candidate))
|
|
120
130
|
.map((candidate) => ({
|
|
121
131
|
candidate,
|
|
122
132
|
modifiedAt: Math.max(
|
|
@@ -13,6 +13,38 @@ metadata:
|
|
|
13
13
|
Use Clips Rewind as local screen memory. Start broad enough to find the right
|
|
14
14
|
moment, then read only the smallest relevant range.
|
|
15
15
|
|
|
16
|
+
## First-Run Setup
|
|
17
|
+
|
|
18
|
+
Call \`screen_memory_status\` before assuming Rewind is ready. If the tool is
|
|
19
|
+
unavailable, do not stop at a missing-tool error and do not silently install
|
|
20
|
+
anything:
|
|
21
|
+
|
|
22
|
+
1. Explain that Rewind requires the signed Clips Desktop app on macOS plus a
|
|
23
|
+
local agent connection.
|
|
24
|
+
2. Ask whether Clips is installed, or use a non-mutating native application
|
|
25
|
+
lookup when the host supports one. Do not inspect Clips' app-data folders.
|
|
26
|
+
If Clips is absent or its presence cannot be confirmed, ask permission
|
|
27
|
+
before opening or downloading anything: “Clips Desktop is required for
|
|
28
|
+
Rewind. Would you like me to open the official installer and guide you
|
|
29
|
+
through setup?”
|
|
30
|
+
3. Only after affirmative permission, open
|
|
31
|
+
\`https://clips.agent-native.com/download\` in the user's browser. Complete
|
|
32
|
+
native installation steps only when the current host can safely do so and
|
|
33
|
+
the user explicitly permitted them. Never bypass Gatekeeper, accept macOS
|
|
34
|
+
permission prompts, or enable screen/audio capture on the user's behalf.
|
|
35
|
+
4. If native UI control is unavailable, return the download link and wait for
|
|
36
|
+
the user to confirm that Clips is installed and running.
|
|
37
|
+
5. Ask the user to enable Rewind in the Clips tray and choose the intended
|
|
38
|
+
capture mode. Then configure the local connection with:
|
|
39
|
+
|
|
40
|
+
\`npx -y @agent-native/core@latest skills add rewind --client <client> --scope user --yes\`
|
|
41
|
+
|
|
42
|
+
Replace \`<client>\` with the current compatible host: \`codex\`,
|
|
43
|
+
\`claude-code\`, \`cursor\`, \`opencode\`, \`github-copilot\`, or \`cowork\`.
|
|
44
|
+
6. Restart the host only if it cannot reload MCP servers in place, then retry
|
|
45
|
+
\`screen_memory_status\`. Do not claim setup succeeded until it reports
|
|
46
|
+
Rewind enabled and unpaused.
|
|
47
|
+
|
|
16
48
|
## Retrieval Flow
|
|
17
49
|
|
|
18
50
|
1. Call \`screen_memory_status\` first. If the newest segment is still open,
|
|
@@ -41,12 +73,12 @@ moment, then read only the smallest relevant range.
|
|
|
41
73
|
bypass the Screen Memory MCP broker.
|
|
42
74
|
- Do not upload frames returned by local Screen Memory tools.
|
|
43
75
|
- Treat foreground apps and chapter labels as evidence, not proof of intent.
|
|
44
|
-
- If
|
|
45
|
-
|
|
76
|
+
- If Clips is installed and Rewind is enabled but the Screen Memory MCP is
|
|
77
|
+
missing, explain that only the agent connection needs repair with:
|
|
46
78
|
|
|
47
79
|
\`npx -y @agent-native/core@latest skills add rewind --client <client> --scope user --yes\`
|
|
48
80
|
|
|
49
|
-
Replace \`<client>\` with the current compatible host: \`codex\`,
|
|
50
|
-
\`claude-code\`, \`cursor\`, \`opencode\`, \`github-copilot\`, or \`cowork\`.
|
|
51
81
|
Ask the user to restart the host if it cannot reload MCP servers in place.
|
|
82
|
+
- Never conflate installing Clips Desktop with installing the skill/MCP
|
|
83
|
+
connection, and never claim either succeeded without direct evidence.
|
|
52
84
|
`;
|