@agent-native/core 0.198.4 → 0.198.6
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/app-config/dispatch.d.ts +6 -0
- package/dist/app-config/dispatch.js +15 -0
- package/dist/app-config/schema.d.ts +5 -0
- package/dist/app-config/schema.js +2 -0
- package/dist/automation/index.d.ts +1 -1
- package/dist/cli/doctor.js +20 -1
- package/dist/cli/upgrade.d.ts +1 -0
- package/dist/cli/upgrade.js +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/file-upload/actions/upload-image.d.ts +2 -2
- package/dist/org/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +6 -6
- package/dist/server/realtime-token.d.ts +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const dispatchConfig = z.object({
|
|
3
|
+
adminEmails: z.array(z.string().email()).default([]).meta({
|
|
4
|
+
env: "DISPATCH_ADMIN_EMAILS",
|
|
5
|
+
doc: "Comma-separated deployment administrators for Dispatch.",
|
|
6
|
+
}),
|
|
7
|
+
workspaceOwnerEmails: z.array(z.string().email()).default([]).meta({
|
|
8
|
+
env: "WORKSPACE_OWNER_EMAIL",
|
|
9
|
+
doc: "Comma-separated workspace owner emails trusted by Dispatch.",
|
|
10
|
+
}),
|
|
11
|
+
defaultOwnerEmail: z.string().email().optional().meta({
|
|
12
|
+
env: "DISPATCH_DEFAULT_OWNER_EMAIL",
|
|
13
|
+
doc: "Default Dispatch owner email.",
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
@@ -64,6 +64,11 @@ export declare const appConfigSchema: z.ZodObject<{
|
|
|
64
64
|
disableDesktopSsoFallbackInDevelopment: z.ZodDefault<z.ZodBoolean>;
|
|
65
65
|
requireEmailVerification: z.ZodOptional<z.ZodBoolean>;
|
|
66
66
|
}, z.core.$strip>>;
|
|
67
|
+
dispatch: z.ZodPrefault<z.ZodObject<{
|
|
68
|
+
adminEmails: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
69
|
+
workspaceOwnerEmails: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
70
|
+
defaultOwnerEmail: z.ZodOptional<z.ZodString>;
|
|
71
|
+
}, z.core.$strip>>;
|
|
67
72
|
integrations: z.ZodPrefault<z.ZodObject<{
|
|
68
73
|
durableDispatch: z.ZodOptional<z.ZodBoolean>;
|
|
69
74
|
allowUnverifiedWebhooks: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -5,6 +5,7 @@ import { agentConfig } from "./agent.js";
|
|
|
5
5
|
import { analyticsConfig } from "./analytics.js";
|
|
6
6
|
import { appConfig } from "./app.js";
|
|
7
7
|
import { authConfig } from "./auth.js";
|
|
8
|
+
import { dispatchConfig } from "./dispatch.js";
|
|
8
9
|
import { integrationsConfig } from "./integrations.js";
|
|
9
10
|
import { launchDarklyConfig } from "./launchdarkly.js";
|
|
10
11
|
import { migrationConfig } from "./migration.js";
|
|
@@ -21,6 +22,7 @@ export const appConfigSchema = z.object({
|
|
|
21
22
|
analytics: analyticsConfig.prefault({}),
|
|
22
23
|
app: appConfig.prefault({}),
|
|
23
24
|
auth: authConfig.prefault({}),
|
|
25
|
+
dispatch: dispatchConfig.prefault({}),
|
|
24
26
|
integrations: integrationsConfig.prefault({}),
|
|
25
27
|
launchDarkly: launchDarklyConfig.prefault({}),
|
|
26
28
|
migration: migrationConfig.prefault({}),
|
|
@@ -139,8 +139,8 @@ export declare function createAutomationCallbackHandler(runtime: AutomationRunti
|
|
|
139
139
|
duplicate?: undefined;
|
|
140
140
|
eventId?: undefined;
|
|
141
141
|
} | {
|
|
142
|
+
error?: undefined;
|
|
142
143
|
accepted: boolean;
|
|
143
144
|
duplicate: boolean;
|
|
144
145
|
eventId: string;
|
|
145
|
-
error?: undefined;
|
|
146
146
|
}>;
|
package/dist/cli/doctor.js
CHANGED
|
@@ -3,7 +3,7 @@ import path from "node:path";
|
|
|
3
3
|
import { scanDbToolScoping, scanDrizzlePush, scanEmptyMigrations, scanEnvCredentials, scanEnvMutation, scanExplicitCollabAccess, scanIdentityColumnsRegistered, scanLocalhostFallback, scanResourceActionAccess, scanUnscopedCredentials, scanUnscopedQueries, } from "../guards/index.js";
|
|
4
4
|
import { AGENT_NATIVE_MIGRATION_GUIDE_URL, AGENT_NATIVE_UPGRADE_CODEMOD_COMMAND, loadMigrationManifestsForProject, resolveMigrationSymbolMove, scanDeprecatedImports, } from "../package-lifecycle/index.js";
|
|
5
5
|
import { formatBytes, scanCleanTargets } from "./clean.js";
|
|
6
|
-
import { loadActiveMigrationDependencies, readCliCoreVersion, readUpgradeEnvironment, resolveInstalledPackageVersion, selectMigrationDependencies, } from "./upgrade.js";
|
|
6
|
+
import { loadActiveMigrationDependencies, isDirectCoreDependency, readCliCoreVersion, readUpgradeEnvironment, resolveInstalledPackageVersion, selectMigrationDependencies, } from "./upgrade.js";
|
|
7
7
|
const AGENTKIT_CHAT_MIGRATION_GUIDE_URL = new URL("../../docs/migrations/agentkit-chat.md", import.meta.url).href;
|
|
8
8
|
const AGENTKIT_CHAT_MIGRATION_GUIDE_SOURCE_URL = "https://github.com/BuilderIO/agent-native/blob/main/packages/core/docs/migrations/agentkit-chat.md";
|
|
9
9
|
function resolveRemovedExportMigrationGuide(guide) {
|
|
@@ -84,6 +84,25 @@ function runGuard(name, root, config, migrationManifests, shellEnvironment = pro
|
|
|
84
84
|
case "resource-action-access":
|
|
85
85
|
return scanResourceActionAccess({ root });
|
|
86
86
|
case "feature-dependencies": {
|
|
87
|
+
let packageJson;
|
|
88
|
+
const packageJsonPath = path.join(root, "package.json");
|
|
89
|
+
try {
|
|
90
|
+
packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
if (error.code === "ENOENT") {
|
|
94
|
+
return { name, findings: [] };
|
|
95
|
+
}
|
|
96
|
+
throw new Error(`Could not read ${packageJsonPath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
97
|
+
}
|
|
98
|
+
if (packageJson === null ||
|
|
99
|
+
typeof packageJson !== "object" ||
|
|
100
|
+
Array.isArray(packageJson)) {
|
|
101
|
+
throw new Error(`Invalid ${packageJsonPath}: expected a JSON object`);
|
|
102
|
+
}
|
|
103
|
+
if (!isDirectCoreDependency(packageJson)) {
|
|
104
|
+
return { name, findings: [] };
|
|
105
|
+
}
|
|
87
106
|
const dependencies = selectMigrationDependencies(loadActiveMigrationDependencies(root, readCliCoreVersion(), migrationManifests), readUpgradeEnvironment(root, root, shellEnvironment));
|
|
88
107
|
return {
|
|
89
108
|
name,
|
package/dist/cli/upgrade.d.ts
CHANGED
|
@@ -113,6 +113,7 @@ export declare function isAgentNativePackageName(name: string): boolean;
|
|
|
113
113
|
export declare function isPinnedOrLocalVersion(version: string): boolean;
|
|
114
114
|
export declare function shouldBumpAgentNativeVersion(version: string): boolean;
|
|
115
115
|
export declare function selectMigrationDependencies(dependencies: MigrationDependency[], environment: NodeJS.ProcessEnv): MigrationDependency[];
|
|
116
|
+
export declare function isDirectCoreDependency(pkg: PackageJsonLike): boolean;
|
|
116
117
|
export declare function readUpgradeEnvironment(projectRoot: string, packageDir: string, shellEnvironment: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
117
118
|
export declare function loadActiveMigrationDependencies(projectRoot: string, packageVersion: string | null, manifests?: import("../package-lifecycle/migration-manifest.js").MigrationManifest[]): MigrationDependency[];
|
|
118
119
|
export declare function planMigrationDependencyAdditions(project: UpgradeProject, shellEnvironment?: NodeJS.ProcessEnv): UpgradeDependencyAddition[];
|
package/dist/cli/upgrade.js
CHANGED
|
@@ -248,7 +248,7 @@ export function selectMigrationDependencies(dependencies, environment) {
|
|
|
248
248
|
}
|
|
249
249
|
return [...selected.values()];
|
|
250
250
|
}
|
|
251
|
-
function isDirectCoreDependency(pkg) {
|
|
251
|
+
export function isDirectCoreDependency(pkg) {
|
|
252
252
|
return [pkg.dependencies, pkg.devDependencies, pkg.optionalDependencies].some((dependencies) => Boolean(dependencies?.["@agent-native/core"]));
|
|
253
253
|
}
|
|
254
254
|
function findWorkspaceEnvironmentRoot(packageDir, fallbackRoot) {
|
|
@@ -38,19 +38,19 @@ export declare const postAwareness: import("h3").EventHandlerWithFetch<import("h
|
|
|
38
38
|
error: string;
|
|
39
39
|
states?: undefined;
|
|
40
40
|
} | {
|
|
41
|
-
error?: undefined;
|
|
42
41
|
states: {
|
|
43
42
|
clientId: number;
|
|
44
43
|
state: string;
|
|
45
44
|
}[];
|
|
45
|
+
error?: undefined;
|
|
46
46
|
}>>;
|
|
47
47
|
export declare const getActiveUsers: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
48
48
|
error: string;
|
|
49
49
|
users?: undefined;
|
|
50
50
|
} | {
|
|
51
|
-
error?: undefined;
|
|
52
51
|
users: {
|
|
53
52
|
clientId: number;
|
|
54
53
|
lastSeen: number;
|
|
55
54
|
}[];
|
|
55
|
+
error?: undefined;
|
|
56
56
|
}>>;
|
|
@@ -33,9 +33,9 @@ declare const _default: import("../../action.js").ActionDefinition<{
|
|
|
33
33
|
idempotencyKey: string;
|
|
34
34
|
deleted: boolean;
|
|
35
35
|
} | {
|
|
36
|
+
id?: undefined;
|
|
36
37
|
error: string;
|
|
37
38
|
url?: undefined;
|
|
38
|
-
id?: undefined;
|
|
39
39
|
provider?: undefined;
|
|
40
40
|
configured?: undefined;
|
|
41
41
|
} | {
|
|
@@ -45,8 +45,8 @@ declare const _default: import("../../action.js").ActionDefinition<{
|
|
|
45
45
|
configured?: undefined;
|
|
46
46
|
error?: undefined;
|
|
47
47
|
} | {
|
|
48
|
-
url?: undefined;
|
|
49
48
|
id?: undefined;
|
|
49
|
+
url?: undefined;
|
|
50
50
|
provider?: undefined;
|
|
51
51
|
error: string;
|
|
52
52
|
configured: boolean;
|
package/dist/org/handlers.d.ts
CHANGED
|
@@ -72,9 +72,9 @@ export declare const setWorkspaceAppDefaultVisibilityHandler: import("h3").Event
|
|
|
72
72
|
}>>;
|
|
73
73
|
export declare const createOrgHandler: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
74
74
|
success: boolean;
|
|
75
|
+
id?: undefined;
|
|
75
76
|
name?: undefined;
|
|
76
77
|
role?: undefined;
|
|
77
|
-
id?: undefined;
|
|
78
78
|
} | {
|
|
79
79
|
success?: undefined;
|
|
80
80
|
id: string;
|
package/dist/secrets/routes.d.ts
CHANGED
|
@@ -63,31 +63,31 @@ export declare function createWriteSecretHandler(): import("h3").EventHandlerWit
|
|
|
63
63
|
ok?: undefined;
|
|
64
64
|
status?: undefined;
|
|
65
65
|
} | {
|
|
66
|
+
error?: undefined;
|
|
66
67
|
errorCode?: undefined;
|
|
67
68
|
ok: boolean;
|
|
68
69
|
status: string;
|
|
69
|
-
error?: undefined;
|
|
70
70
|
} | {
|
|
71
71
|
ok?: undefined;
|
|
72
72
|
error: string;
|
|
73
73
|
removed?: undefined;
|
|
74
74
|
} | {
|
|
75
|
+
error?: undefined;
|
|
75
76
|
ok: boolean;
|
|
76
77
|
removed: boolean;
|
|
77
|
-
error?: undefined;
|
|
78
78
|
}>>;
|
|
79
79
|
export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
80
80
|
ok?: undefined;
|
|
81
81
|
error: string;
|
|
82
82
|
note?: undefined;
|
|
83
83
|
} | {
|
|
84
|
+
error?: undefined;
|
|
84
85
|
ok: boolean;
|
|
85
86
|
note?: undefined;
|
|
86
|
-
error?: undefined;
|
|
87
87
|
} | {
|
|
88
|
+
error?: undefined;
|
|
88
89
|
ok: boolean;
|
|
89
90
|
note: string;
|
|
90
|
-
error?: undefined;
|
|
91
91
|
} | {
|
|
92
92
|
note?: undefined;
|
|
93
93
|
ok: boolean;
|
|
@@ -115,11 +115,11 @@ export declare function createAdHocSecretHandler(): import("h3").EventHandlerWit
|
|
|
115
115
|
} | {
|
|
116
116
|
error: string;
|
|
117
117
|
} | {
|
|
118
|
+
error?: undefined;
|
|
118
119
|
ok: boolean;
|
|
119
120
|
key: string;
|
|
120
|
-
error?: undefined;
|
|
121
121
|
} | {
|
|
122
|
+
error?: undefined;
|
|
122
123
|
ok: boolean;
|
|
123
124
|
removed: boolean;
|
|
124
|
-
error?: undefined;
|
|
125
125
|
}>>;
|
|
@@ -54,8 +54,8 @@ export declare function createRealtimeTokenHandler(): import("h3").EventHandlerW
|
|
|
54
54
|
expiresAt?: undefined;
|
|
55
55
|
ttlSeconds?: undefined;
|
|
56
56
|
} | {
|
|
57
|
+
error?: undefined;
|
|
57
58
|
token: string;
|
|
58
59
|
expiresAt: string;
|
|
59
60
|
ttlSeconds: number;
|
|
60
|
-
error?: undefined;
|
|
61
61
|
}>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.198.
|
|
3
|
+
"version": "0.198.6",
|
|
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": {
|
|
@@ -662,8 +662,8 @@
|
|
|
662
662
|
"yaml": "^2.9.0",
|
|
663
663
|
"yjs": "^13.6.33",
|
|
664
664
|
"zod": "^4.3.6",
|
|
665
|
-
"@agent-native/agentkit": "^0.198.
|
|
666
|
-
"@agent-native/recap-cli": "^0.5.
|
|
665
|
+
"@agent-native/agentkit": "^0.198.6",
|
|
666
|
+
"@agent-native/recap-cli": "^0.5.56"
|
|
667
667
|
},
|
|
668
668
|
"devDependencies": {
|
|
669
669
|
"@ai-sdk/anthropic": "^3.0.71",
|