@agent-native/core 0.180.0 → 0.180.1-nightly-20260915201648
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/automation/index.d.ts +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- 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 +2 -2
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +3 -3
- package/dist/org/handlers.d.ts +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/vite/sentry-source-maps.js +12 -20
- package/docs/content/template-plan-automations.mdx +30 -30
- package/docs/content/template-plan-developers.mdx +10 -10
- package/docs/content/template-plan-review-workflow.mdx +2 -2
- package/package.json +3 -3
|
@@ -186,8 +186,8 @@ export declare function createAutomationCallbackHandler(runtime: AutomationRunti
|
|
|
186
186
|
duplicate?: undefined;
|
|
187
187
|
eventId?: undefined;
|
|
188
188
|
} | {
|
|
189
|
+
error?: undefined;
|
|
189
190
|
accepted: boolean;
|
|
190
191
|
duplicate: boolean;
|
|
191
192
|
eventId: string;
|
|
192
|
-
error?: undefined;
|
|
193
193
|
}>;
|
|
@@ -62,11 +62,11 @@ export declare const postAwareness: import("h3").EventHandlerWithFetch<import("h
|
|
|
62
62
|
error: string;
|
|
63
63
|
states?: undefined;
|
|
64
64
|
} | {
|
|
65
|
-
error?: undefined;
|
|
66
65
|
states: {
|
|
67
66
|
clientId: number;
|
|
68
67
|
state: string;
|
|
69
68
|
}[];
|
|
69
|
+
error?: undefined;
|
|
70
70
|
}>>;
|
|
71
71
|
/**
|
|
72
72
|
* GET /_agent-native/collab/:docId/users
|
|
@@ -77,9 +77,9 @@ export declare const getActiveUsers: import("h3").EventHandlerWithFetch<import("
|
|
|
77
77
|
error: string;
|
|
78
78
|
users?: undefined;
|
|
79
79
|
} | {
|
|
80
|
-
error?: undefined;
|
|
81
80
|
users: {
|
|
82
81
|
clientId: number;
|
|
83
82
|
lastSeen: number;
|
|
84
83
|
}[];
|
|
84
|
+
error?: undefined;
|
|
85
85
|
}>>;
|
package/dist/collab/routes.d.ts
CHANGED
|
@@ -26,8 +26,8 @@ export declare const getCollabState: import("h3").EventHandlerWithFetch<import("
|
|
|
26
26
|
* Body: { update: string (base64), requestSource?: string }
|
|
27
27
|
*/
|
|
28
28
|
export declare const postCollabUpdate: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
29
|
-
error: string;
|
|
30
29
|
ok?: undefined;
|
|
30
|
+
error: string;
|
|
31
31
|
} | {
|
|
32
32
|
error?: undefined;
|
|
33
33
|
ok: boolean;
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* Body: { json: any, fieldName?: string, type?: "map"|"array", requestSource?: string }
|
|
14
14
|
*/
|
|
15
15
|
export declare const postCollabJson: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
16
|
-
ok?: undefined;
|
|
17
16
|
error: string;
|
|
17
|
+
ok?: undefined;
|
|
18
18
|
} | {
|
|
19
19
|
error?: undefined;
|
|
20
20
|
ok: boolean;
|
|
@@ -3,18 +3,18 @@ declare const _default: import("../../action.js").ActionDefinition<{
|
|
|
3
3
|
url?: string;
|
|
4
4
|
filename?: string;
|
|
5
5
|
}, {
|
|
6
|
+
id?: undefined;
|
|
6
7
|
error: string;
|
|
7
8
|
configured?: undefined;
|
|
8
9
|
connectPath?: undefined;
|
|
9
10
|
url?: undefined;
|
|
10
|
-
id?: undefined;
|
|
11
11
|
provider?: undefined;
|
|
12
12
|
} | {
|
|
13
|
+
id?: undefined;
|
|
13
14
|
error: string;
|
|
14
15
|
configured: boolean;
|
|
15
16
|
connectPath: string;
|
|
16
17
|
url?: undefined;
|
|
17
|
-
id?: undefined;
|
|
18
18
|
provider?: undefined;
|
|
19
19
|
} | {
|
|
20
20
|
error?: undefined;
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
* DELETE /_agent-native/notifications/:id — delete
|
|
12
12
|
*/
|
|
13
13
|
export declare function createNotificationsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<"" | import("./types.js").Notification[] | {
|
|
14
|
-
error?: undefined;
|
|
15
14
|
count: number;
|
|
16
15
|
updated?: undefined;
|
|
16
|
+
error?: undefined;
|
|
17
17
|
ok?: undefined;
|
|
18
18
|
} | {
|
|
19
|
-
error?: undefined;
|
|
20
19
|
count?: undefined;
|
|
21
20
|
updated: number;
|
|
21
|
+
error?: undefined;
|
|
22
22
|
ok?: undefined;
|
|
23
23
|
} | {
|
|
24
24
|
count?: undefined;
|
|
@@ -26,8 +26,8 @@ export declare function createNotificationsHandler(): import("h3").EventHandlerW
|
|
|
26
26
|
error: string;
|
|
27
27
|
ok?: undefined;
|
|
28
28
|
} | {
|
|
29
|
-
error?: undefined;
|
|
30
29
|
count?: undefined;
|
|
31
30
|
updated?: undefined;
|
|
31
|
+
error?: undefined;
|
|
32
32
|
ok: boolean;
|
|
33
33
|
}>>;
|
|
@@ -42,22 +42,22 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
|
|
|
42
42
|
avgEvalScore: number;
|
|
43
43
|
} | {
|
|
44
44
|
error?: undefined;
|
|
45
|
+
ok?: undefined;
|
|
45
46
|
summary: import("./types.js").TraceSummary;
|
|
46
47
|
spans: import("./types.js").TraceSpan[];
|
|
47
48
|
id?: undefined;
|
|
48
|
-
ok?: undefined;
|
|
49
49
|
} | {
|
|
50
50
|
error?: undefined;
|
|
51
|
+
ok?: undefined;
|
|
51
52
|
summary?: undefined;
|
|
52
53
|
spans?: undefined;
|
|
53
54
|
id: string;
|
|
54
|
-
ok?: undefined;
|
|
55
55
|
} | {
|
|
56
|
+
ok?: undefined;
|
|
56
57
|
summary?: undefined;
|
|
57
58
|
spans?: undefined;
|
|
58
59
|
id?: undefined;
|
|
59
60
|
error: any;
|
|
60
|
-
ok?: undefined;
|
|
61
61
|
} | {
|
|
62
62
|
error?: undefined;
|
|
63
63
|
summary?: undefined;
|
package/dist/org/handlers.d.ts
CHANGED
|
@@ -52,9 +52,9 @@ export declare const setWorkspaceAppDefaultVisibilityHandler: import("h3").Event
|
|
|
52
52
|
/** POST /_agent-native/org — create a new organization */
|
|
53
53
|
export declare const createOrgHandler: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
54
54
|
success: boolean;
|
|
55
|
+
id?: undefined;
|
|
55
56
|
name?: undefined;
|
|
56
57
|
role?: undefined;
|
|
57
|
-
id?: undefined;
|
|
58
58
|
} | {
|
|
59
59
|
success?: undefined;
|
|
60
60
|
id: string;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* captured events. Both derive it from the same `resolveAgentNativeBuildId()`
|
|
5
5
|
* identifier so they can't drift apart independently.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import { rm } from "node:fs/promises";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import { sentryVitePlugin } from "@sentry/vite-plugin";
|
|
10
10
|
import { resolveAgentNativeBuildId } from "../shared/build-id.js";
|
|
@@ -44,18 +44,6 @@ export function resolveSentrySourceMapUploadConfig(env = process.env) {
|
|
|
44
44
|
export function isSentrySourceMapUploadEnabled(env = process.env) {
|
|
45
45
|
return resolveSentrySourceMapUploadConfig(env) !== null;
|
|
46
46
|
}
|
|
47
|
-
async function removeSourceMaps(directory) {
|
|
48
|
-
const entries = await readdir(directory, { withFileTypes: true });
|
|
49
|
-
await Promise.all(entries.map(async (entry) => {
|
|
50
|
-
const filePath = path.join(directory, entry.name);
|
|
51
|
-
if (entry.isDirectory()) {
|
|
52
|
-
await removeSourceMaps(filePath);
|
|
53
|
-
}
|
|
54
|
-
else if (entry.name.endsWith(".map")) {
|
|
55
|
-
await rm(filePath, { force: true });
|
|
56
|
-
}
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
59
47
|
function createUploadedSourceMapCleanupPlugin() {
|
|
60
48
|
return {
|
|
61
49
|
name: "agent-native:delete-uploaded-sentry-source-maps",
|
|
@@ -63,13 +51,17 @@ function createUploadedSourceMapCleanupPlugin() {
|
|
|
63
51
|
writeBundle: {
|
|
64
52
|
order: "post",
|
|
65
53
|
sequential: true,
|
|
66
|
-
async handler(outputOptions) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
54
|
+
async handler(outputOptions, bundle) {
|
|
55
|
+
const outputDirectory = outputOptions.dir
|
|
56
|
+
? outputOptions.dir
|
|
57
|
+
: path.dirname(outputOptions.file);
|
|
58
|
+
const sourceMapFileNames = Object.values(bundle).flatMap((output) => {
|
|
59
|
+
if (output.type === "asset") {
|
|
60
|
+
return output.fileName.endsWith(".map") ? [output.fileName] : [];
|
|
61
|
+
}
|
|
62
|
+
return output.map ? [`${output.fileName}.map`] : [];
|
|
63
|
+
});
|
|
64
|
+
await Promise.all(sourceMapFileNames.map((fileName) => rm(path.join(outputDirectory, fileName), { force: true })));
|
|
73
65
|
},
|
|
74
66
|
},
|
|
75
67
|
};
|
|
@@ -20,29 +20,29 @@ The Plan template emits four events. Any automation can subscribe to them.
|
|
|
20
20
|
Fires when a new visual plan or recap is created.
|
|
21
21
|
|
|
22
22
|
| Field | Type | Description |
|
|
23
|
-
| ----------- | --------------------- |
|
|
24
|
-
| `planId` | string | Unique plan identifier
|
|
25
|
-
| `title` | string | Plan title
|
|
26
|
-
| `kind` | `"plan"` \| `"recap"` | Whether this is a plan or a recap
|
|
27
|
-
| `status` | string | Initial status (e.g. `"review"`)
|
|
23
|
+
| ----------- | --------------------- | ---------------------------------------- |
|
|
24
|
+
| `planId` | string | Unique plan identifier |
|
|
25
|
+
| `title` | string | Plan title |
|
|
26
|
+
| `kind` | `"plan"` \| `"recap"` | Whether this is a plan or a recap |
|
|
27
|
+
| `status` | string | Initial status (e.g. `"review"`) |
|
|
28
28
|
| `path` | string | App-relative path (e.g. `/plans/plan-…`) |
|
|
29
|
-
| `createdBy` | string | Always `"agent"` for plan creation
|
|
29
|
+
| `createdBy` | string | Always `"agent"` for plan creation |
|
|
30
30
|
|
|
31
31
|
#### `plan.commented`
|
|
32
32
|
|
|
33
33
|
Fires when one or more comments are added to a plan.
|
|
34
34
|
|
|
35
35
|
| Field | Type | Description |
|
|
36
|
-
| ------------------ | -------------------------------- |
|
|
37
|
-
| `planId` | string | Plan identifier
|
|
38
|
-
| `title` | string | Plan title
|
|
39
|
-
| `kind` | `"plan"` \| `"recap"` | Plan or recap
|
|
40
|
-
| `commentIds` | string[] | IDs of the new comments
|
|
41
|
-
| `commentCount` | number | Number of new comments in this batch
|
|
36
|
+
| ------------------ | -------------------------------- | ----------------------------------------------------------- |
|
|
37
|
+
| `planId` | string | Plan identifier |
|
|
38
|
+
| `title` | string | Plan title |
|
|
39
|
+
| `kind` | `"plan"` \| `"recap"` | Plan or recap |
|
|
40
|
+
| `commentIds` | string[] | IDs of the new comments |
|
|
41
|
+
| `commentCount` | number | Number of new comments in this batch |
|
|
42
42
|
| `resolutionTarget` | `"agent"` \| `"human"` \| `null` | Dominant target — `"agent"` if any comment targets an agent |
|
|
43
|
-
| `excerpt` | string | First 200 characters of the first comment
|
|
44
|
-
| `author` | string \| null | Email of the commenter, if known
|
|
45
|
-
| `path` | string | App-relative path
|
|
43
|
+
| `excerpt` | string | First 200 characters of the first comment |
|
|
44
|
+
| `author` | string \| null | Email of the commenter, if known |
|
|
45
|
+
| `path` | string | App-relative path |
|
|
46
46
|
|
|
47
47
|
#### `plan.published`
|
|
48
48
|
|
|
@@ -50,27 +50,27 @@ Fires when a local plan is published (or re-published) to a hosted shareable
|
|
|
50
50
|
URL.
|
|
51
51
|
|
|
52
52
|
| Field | Type | Description |
|
|
53
|
-
| --------------------- | --------------------- |
|
|
54
|
-
| `planId` | string | Local plan identifier
|
|
55
|
-
| `title` | string | Plan title
|
|
56
|
-
| `kind` | `"plan"` \| `"recap"` | Plan or recap
|
|
57
|
-
| `hostedPlanId` | string | Hosted plan identifier
|
|
58
|
-
| `url` | string | Full public URL of the hosted plan
|
|
59
|
-
| `requestedVisibility` | string | `"public"`, `"private"`, etc.
|
|
53
|
+
| --------------------- | --------------------- | ---------------------------------- |
|
|
54
|
+
| `planId` | string | Local plan identifier |
|
|
55
|
+
| `title` | string | Plan title |
|
|
56
|
+
| `kind` | `"plan"` \| `"recap"` | Plan or recap |
|
|
57
|
+
| `hostedPlanId` | string | Hosted plan identifier |
|
|
58
|
+
| `url` | string | Full public URL of the hosted plan |
|
|
59
|
+
| `requestedVisibility` | string | `"public"`, `"private"`, etc. |
|
|
60
60
|
|
|
61
61
|
#### `plan.status.changed`
|
|
62
62
|
|
|
63
63
|
Fires when a plan's status changes (e.g. `review` → `approved`).
|
|
64
64
|
|
|
65
65
|
| Field | Type | Description |
|
|
66
|
-
| ----------- | --------------------- |
|
|
67
|
-
| `planId` | string | Plan identifier
|
|
68
|
-
| `title` | string | Plan title
|
|
69
|
-
| `kind` | `"plan"` \| `"recap"` | Plan or recap
|
|
70
|
-
| `oldStatus` | string \| null | Previous status
|
|
71
|
-
| `newStatus` | string | New status
|
|
72
|
-
| `changedBy` | string \| null | Email of the person who changed it
|
|
73
|
-
| `path` | string | App-relative path
|
|
66
|
+
| ----------- | --------------------- | ---------------------------------- |
|
|
67
|
+
| `planId` | string | Plan identifier |
|
|
68
|
+
| `title` | string | Plan title |
|
|
69
|
+
| `kind` | `"plan"` \| `"recap"` | Plan or recap |
|
|
70
|
+
| `oldStatus` | string \| null | Previous status |
|
|
71
|
+
| `newStatus` | string | New status |
|
|
72
|
+
| `changedBy` | string \| null | Email of the person who changed it |
|
|
73
|
+
| `path` | string | App-relative path |
|
|
74
74
|
|
|
75
75
|
<Diagram id="doc-block-plan5" title="Event to notification" summary="Plan events fire on the shared event bus; an automation subscribes with a trigger and an optional condition, then acts.">
|
|
76
76
|
|
|
@@ -77,17 +77,17 @@ local persistence, or running a fully self-hosted review surface.
|
|
|
77
77
|
|
|
78
78
|
Schema lives in `templates/plan/server/db/schema.ts`. Core tables:
|
|
79
79
|
|
|
80
|
-
| Table | What it holds
|
|
81
|
-
| ------------------ |
|
|
80
|
+
| Table | What it holds |
|
|
81
|
+
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
82
82
|
| `plans` | Each plan or recap — `title`, `brief`, `kind` (plan/recap), `status`, `source`, `html`/`markdown`/`content`, `hosted_plan_id`/`url`, usage stats, `source_url`, `deleted_at`/`deleted_by` |
|
|
83
|
-
| `plan_sections` | Ordered sections within a plan — `type`, `title`, `body`, `html`, `sort_order`, `created_by`
|
|
84
|
-
| `plan_comments` | Threaded comments — `parent_comment_id`, `kind`, `status`, `anchor`, `message`, `author_email`, `resolution_target`, `mentions_json`, `resolved_by`
|
|
85
|
-
| `plan_events` | Audit log of agent/human events on a plan — `type`, `message`, JSON `payload`, `created_by`
|
|
86
|
-
| `plan_reports` | Abuse reports on a public plan — `reason`, `status`, `reporter_email`, `occurrence_count`
|
|
87
|
-
| `plan_versions` | Point-in-time snapshots for version history — `snapshot_json`, `change_label`, plus denormalized `block_count`/`section_count`/`preview_text` for fast listing
|
|
88
|
-
| `plan_shares` | Per-principal share grants (viewer / editor / admin)
|
|
89
|
-
| `plan_guest_mints` | Rate-limit records for guest session issuance
|
|
90
|
-
| `plan_assets` | Inline image assets stored as base64 (fallback when no upload provider)
|
|
83
|
+
| `plan_sections` | Ordered sections within a plan — `type`, `title`, `body`, `html`, `sort_order`, `created_by` |
|
|
84
|
+
| `plan_comments` | Threaded comments — `parent_comment_id`, `kind`, `status`, `anchor`, `message`, `author_email`, `resolution_target`, `mentions_json`, `resolved_by` |
|
|
85
|
+
| `plan_events` | Audit log of agent/human events on a plan — `type`, `message`, JSON `payload`, `created_by` |
|
|
86
|
+
| `plan_reports` | Abuse reports on a public plan — `reason`, `status`, `reporter_email`, `occurrence_count` |
|
|
87
|
+
| `plan_versions` | Point-in-time snapshots for version history — `snapshot_json`, `change_label`, plus denormalized `block_count`/`section_count`/`preview_text` for fast listing |
|
|
88
|
+
| `plan_shares` | Per-principal share grants (viewer / editor / admin) |
|
|
89
|
+
| `plan_guest_mints` | Rate-limit records for guest session issuance |
|
|
90
|
+
| `plan_assets` | Inline image assets stored as base64 (fallback when no upload provider) |
|
|
91
91
|
|
|
92
92
|
<DataModel
|
|
93
93
|
id="doc-block-1dtds8f"
|
|
@@ -119,8 +119,8 @@ activity history.
|
|
|
119
119
|
|
|
120
120
|
Each share grant has a role:
|
|
121
121
|
|
|
122
|
-
| Role | Can do
|
|
123
|
-
| ---------- |
|
|
122
|
+
| Role | Can do |
|
|
123
|
+
| ---------- | -------------------------------------------------------------------- |
|
|
124
124
|
| **Viewer** | View the plan and comment on it |
|
|
125
125
|
| **Editor** | Everything a viewer can, plus edit plan content |
|
|
126
126
|
| **Admin** | Everything an editor can, plus grant or remove other people's access |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.180.
|
|
3
|
+
"version": "0.180.1-nightly-20260915201648",
|
|
4
4
|
"description": "The agentic application framework for building autonomous agents with intuitive UIs",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -477,9 +477,9 @@
|
|
|
477
477
|
"yaml": "^2.9.0",
|
|
478
478
|
"yjs": "^13.6.32",
|
|
479
479
|
"zod": "^4.3.6",
|
|
480
|
-
"@agent-native/
|
|
480
|
+
"@agent-native/recap-cli": "0.5.31",
|
|
481
481
|
"@agent-native/toolkit": "^0.20.1",
|
|
482
|
-
"@agent-native/
|
|
482
|
+
"@agent-native/agentkit": "^0.2.1"
|
|
483
483
|
},
|
|
484
484
|
"devDependencies": {
|
|
485
485
|
"@ai-sdk/anthropic": "^3.0.71",
|