@agent-native/core 0.198.6 → 0.198.7-nightly-20260930213124

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.
@@ -139,8 +139,8 @@ export declare function createAutomationCallbackHandler(runtime: AutomationRunti
139
139
  duplicate?: undefined;
140
140
  eventId?: undefined;
141
141
  } | {
142
- error?: undefined;
143
142
  accepted: boolean;
144
143
  duplicate: boolean;
145
144
  eventId: string;
145
+ error?: undefined;
146
146
  }>;
package/dist/cli/index.js CHANGED
@@ -1059,6 +1059,7 @@ Options:
1059
1059
  --eager With workspace dev, start every app immediately
1060
1060
  --prewarm With workspace dev, warm non-default apps in the background
1061
1061
  --no-prewarm With workspace dev, keep non-default apps lazy
1062
+ --no-open With workspace dev, do not open a browser
1062
1063
  --url <url> URL to audit with audit-agent-web
1063
1064
 
1064
1065
  Feedback: ${FEEDBACK_URL}
@@ -54,6 +54,7 @@ export declare function workspaceGatewayUrl(host: string, port: number): string;
54
54
  export declare function isWorkspaceWatcherLimitError(err: Pick<NodeJS.ErrnoException, "code">): boolean;
55
55
  export declare function shouldEagerStartWorkspaceApps(args?: string[], env?: NodeJS.ProcessEnv): boolean;
56
56
  export declare function shouldPrewarmWorkspaceApps(args?: string[], env?: NodeJS.ProcessEnv): boolean;
57
+ export declare function shouldOpenWorkspaceBrowser(args?: string[], env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): boolean;
57
58
  export declare function workspacePrewarmConcurrency(args?: string[], env?: NodeJS.ProcessEnv): number;
58
59
  export declare function workspacePrewarmDelayMs(env?: NodeJS.ProcessEnv): number;
59
60
  export type PollingFileWatcherMode = "enable" | "disable-explicit" | "disable-default";
@@ -67,6 +67,30 @@ export function shouldPrewarmWorkspaceApps(args = [], env = process.env) {
67
67
  env.WORKSPACE_PREWARM === "1" ||
68
68
  env.WORKSPACE_PREWARM === "true");
69
69
  }
70
+ export function shouldOpenWorkspaceBrowser(args = [], env = process.env, platform = process.platform) {
71
+ if (args.includes("--no-open"))
72
+ return false;
73
+ if (env.WORKSPACE_NO_OPEN === "1" || env.AGENT_NATIVE_NO_OPEN === "1") {
74
+ return false;
75
+ }
76
+ if (env.CI === "1" || env.CI === "true")
77
+ return false;
78
+ if (env.BUILDER_IO_DEV_SERVER ||
79
+ env.BUILDER_PROJECT_ID ||
80
+ env.CODESPACES ||
81
+ env.GITPOD_WORKSPACE_ID ||
82
+ env.REMOTE_CONTAINERS ||
83
+ env.DEVCONTAINER) {
84
+ return false;
85
+ }
86
+ if (platform !== "darwin" &&
87
+ platform !== "win32" &&
88
+ !env.DISPLAY &&
89
+ !env.WAYLAND_DISPLAY) {
90
+ return false;
91
+ }
92
+ return true;
93
+ }
70
94
  export function workspacePrewarmConcurrency(args = [], env = process.env) {
71
95
  const flag = args.find((arg) => arg.startsWith("--prewarm-concurrency="));
72
96
  const raw = flag
@@ -1044,7 +1068,9 @@ export async function runWorkspaceDev(options = {}) {
1044
1068
  await Promise.all(Array.from({ length: workerCount }, () => worker()));
1045
1069
  }
1046
1070
  function openBrowser(url) {
1047
- if (options.openBrowser === false || env.WORKSPACE_NO_OPEN === "1")
1071
+ if (options.openBrowser === false)
1072
+ return;
1073
+ if (!shouldOpenWorkspaceBrowser(args, env))
1048
1074
  return;
1049
1075
  const command = process.platform === "darwin"
1050
1076
  ? "open"
@@ -1052,11 +1078,19 @@ export async function runWorkspaceDev(options = {}) {
1052
1078
  ? "cmd"
1053
1079
  : "xdg-open";
1054
1080
  const openArgs = process.platform === "win32" ? ["/c", "start", "", url] : [url];
1055
- const child = spawnProcess(command, openArgs, {
1056
- stdio: "ignore",
1057
- detached: true,
1058
- });
1059
- child.unref();
1081
+ const warn = (reason) => stderr.write(`[workspace] Could not auto-open browser (${reason}). Open ${url} manually.\n`);
1082
+ try {
1083
+ const child = spawnProcess(command, openArgs, {
1084
+ stdio: "ignore",
1085
+ detached: true,
1086
+ });
1087
+ // Without a listener, a missing opener (ENOENT) crashes the gateway.
1088
+ child.on("error", (err) => warn(err.code === "ENOENT" ? `${command} not installed` : err.message));
1089
+ child.unref();
1090
+ }
1091
+ catch (err) {
1092
+ warn(err instanceof Error ? err.message : String(err));
1093
+ }
1060
1094
  }
1061
1095
  const server = http.createServer(async (req, res) => {
1062
1096
  const parsedUrl = new URL(req.url || "/", "http://workspace.local");
@@ -33,11 +33,11 @@ declare const _default: import("../../action.js").ActionDefinition<{
33
33
  idempotencyKey: string;
34
34
  deleted: boolean;
35
35
  } | {
36
- id?: undefined;
37
36
  error: string;
38
37
  url?: undefined;
39
38
  provider?: undefined;
40
39
  configured?: undefined;
40
+ id?: undefined;
41
41
  } | {
42
42
  url: string;
43
43
  id: string;
@@ -45,10 +45,10 @@ declare const _default: import("../../action.js").ActionDefinition<{
45
45
  configured?: undefined;
46
46
  error?: undefined;
47
47
  } | {
48
- id?: undefined;
49
48
  url?: undefined;
50
49
  provider?: undefined;
51
50
  error: string;
52
51
  configured: boolean;
52
+ id?: undefined;
53
53
  }>;
54
54
  export default _default;
@@ -27,38 +27,38 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
27
27
  thumbsUpRate: number;
28
28
  avgEvalScore: number;
29
29
  } | {
30
- id?: undefined;
31
- ok?: undefined;
32
30
  error: string;
33
31
  message: string;
34
32
  summary?: undefined;
35
33
  spans?: undefined;
36
- } | {
37
34
  id?: undefined;
38
- error?: undefined;
39
35
  ok?: undefined;
36
+ } | {
37
+ error?: undefined;
40
38
  message?: undefined;
41
39
  summary: import("./types.js").TraceSummary;
42
40
  spans: import("./types.js").TraceSpan[];
41
+ id?: undefined;
42
+ ok?: undefined;
43
43
  } | {
44
44
  error?: undefined;
45
- ok?: undefined;
46
45
  message?: undefined;
47
46
  summary?: undefined;
48
47
  spans?: undefined;
49
48
  id: string;
50
- } | {
51
- id?: undefined;
52
49
  ok?: undefined;
50
+ } | {
53
51
  message?: undefined;
54
52
  summary?: undefined;
55
53
  spans?: undefined;
54
+ id?: undefined;
56
55
  error: any;
56
+ ok?: undefined;
57
57
  } | {
58
- id?: undefined;
59
58
  error?: undefined;
60
59
  message?: undefined;
61
60
  summary?: undefined;
62
61
  spans?: undefined;
62
+ id?: undefined;
63
63
  ok: boolean;
64
64
  }>>;
@@ -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;
76
75
  name?: undefined;
77
76
  role?: undefined;
77
+ id?: undefined;
78
78
  } | {
79
79
  success?: undefined;
80
80
  id: string;
@@ -2,6 +2,6 @@ export declare function createProgressHandler(): import("h3").EventHandlerWithFe
2
2
  error: string;
3
3
  ok?: undefined;
4
4
  } | {
5
- error?: undefined;
6
5
  ok: boolean;
6
+ error?: undefined;
7
7
  }>>;
@@ -39,8 +39,8 @@ export declare function handleUpdateResource(event: any): Promise<import("./stor
39
39
  error: string;
40
40
  }>;
41
41
  export declare function handleDeleteResource(event: any): Promise<{
42
- ok?: undefined;
43
42
  error: string;
43
+ ok?: undefined;
44
44
  } | {
45
45
  error?: undefined;
46
46
  ok: boolean;
@@ -63,31 +63,31 @@ export declare function createWriteSecretHandler(): import("h3").EventHandlerWit
63
63
  ok?: undefined;
64
64
  status?: undefined;
65
65
  } | {
66
- error?: undefined;
67
66
  errorCode?: undefined;
68
67
  ok: boolean;
69
68
  status: string;
69
+ error?: undefined;
70
70
  } | {
71
71
  ok?: undefined;
72
72
  error: string;
73
73
  removed?: undefined;
74
74
  } | {
75
- error?: undefined;
76
75
  ok: boolean;
77
76
  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;
85
84
  ok: boolean;
86
85
  note?: undefined;
87
- } | {
88
86
  error?: undefined;
87
+ } | {
89
88
  ok: boolean;
90
89
  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;
119
118
  ok: boolean;
120
119
  key: string;
121
- } | {
122
120
  error?: undefined;
121
+ } | {
123
122
  ok: boolean;
124
123
  removed: boolean;
124
+ error?: undefined;
125
125
  }>>;
@@ -65,8 +65,8 @@ export declare function createAgentEngineApiKeyHandler(): import("h3").EventHand
65
65
  error: any;
66
66
  code: any;
67
67
  } | {
68
- error?: undefined;
69
68
  errorCode?: undefined;
69
+ error?: undefined;
70
70
  code?: undefined;
71
71
  ok: boolean;
72
72
  key: string;
@@ -1,9 +1,9 @@
1
1
  export declare function createAgentEngineOllamaModelsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
2
2
  error: string;
3
- ok?: undefined;
4
3
  models?: undefined;
4
+ ok?: undefined;
5
5
  } | {
6
- error?: undefined;
7
6
  ok: boolean;
8
7
  models: string[];
8
+ error?: undefined;
9
9
  }>>;
@@ -54,8 +54,8 @@ export declare function createRealtimeTokenHandler(): import("h3").EventHandlerW
54
54
  expiresAt?: undefined;
55
55
  ttlSeconds?: undefined;
56
56
  } | {
57
- error?: undefined;
58
57
  token: string;
59
58
  expiresAt: string;
60
59
  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.6",
3
+ "version": "0.198.7-nightly-20260930213124",
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,7 +662,7 @@
662
662
  "yaml": "^2.9.0",
663
663
  "yjs": "^13.6.33",
664
664
  "zod": "^4.3.6",
665
- "@agent-native/agentkit": "^0.198.6",
665
+ "@agent-native/agentkit": "^0.198.7-nightly-20260930213124",
666
666
  "@agent-native/recap-cli": "^0.5.56"
667
667
  },
668
668
  "devDependencies": {
@@ -734,7 +734,7 @@
734
734
  "xlsx": "^0.18.5"
735
735
  },
736
736
  "peerDependencies": {
737
- "@agent-native/core-corpus": ">=0.196.0",
737
+ "@agent-native/core-corpus": "0.198.7-nightly-20260930213124",
738
738
  "@ai-sdk/anthropic": ">=3",
739
739
  "@ai-sdk/cohere": ">=3",
740
740
  "@ai-sdk/google": ">=3",