@agent-native/core 0.178.0 → 0.178.1-nightly-20260909221943

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 (88) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/clips/.agents/skills/dictate/SKILL.md +1 -0
  3. package/corpus/templates/clips/DESIGN.md +10 -7
  4. package/corpus/templates/clips/actions/list-organization-state.ts +56 -3
  5. package/corpus/templates/clips/actions/list-recordings.ts +2 -0
  6. package/corpus/templates/clips/actions/search-dictations.ts +81 -0
  7. package/corpus/templates/clips/app/components/agent-destination-logos.tsx +50 -0
  8. package/corpus/templates/clips/app/components/bug-report/bug-report-dialog.tsx +60 -0
  9. package/corpus/templates/clips/app/components/bug-report/bug-report-form.tsx +206 -0
  10. package/corpus/templates/clips/app/components/clips-command-menu.tsx +653 -0
  11. package/corpus/templates/clips/app/components/library/empty-state.tsx +52 -17
  12. package/corpus/templates/clips/app/components/library/folder-card.tsx +34 -0
  13. package/corpus/templates/clips/app/components/library/folder-tree.tsx +109 -64
  14. package/corpus/templates/clips/app/components/library/library-action-hrefs.ts +27 -0
  15. package/corpus/templates/clips/app/components/library/library-grid.tsx +295 -103
  16. package/corpus/templates/clips/app/components/library/library-layout.tsx +381 -203
  17. package/corpus/templates/clips/app/components/library/library-primary-actions.tsx +48 -0
  18. package/corpus/templates/clips/app/components/library/page-header.tsx +48 -8
  19. package/corpus/templates/clips/app/components/library/recording-card.tsx +58 -55
  20. package/corpus/templates/clips/app/components/library/search-bar.tsx +5 -19
  21. package/corpus/templates/clips/app/components/library/sidebar-feedback-button.tsx +48 -0
  22. package/corpus/templates/clips/app/components/player/comments-panel.tsx +2 -2
  23. package/corpus/templates/clips/app/components/player/share-dialog.tsx +344 -260
  24. package/corpus/templates/clips/app/components/player/viewer-controls.tsx +2 -2
  25. package/corpus/templates/clips/app/components/recorder/camera-visualizer.tsx +0 -33
  26. package/corpus/templates/clips/app/components/sharing/share-ui.tsx +5 -1
  27. package/corpus/templates/clips/app/components/ui/tabs.tsx +1 -1
  28. package/corpus/templates/clips/app/hooks/use-command-search.ts +53 -0
  29. package/corpus/templates/clips/app/hooks/use-navigation-state.ts +32 -13
  30. package/corpus/templates/clips/app/hooks/use-upload-video-picker.tsx +1 -0
  31. package/corpus/templates/clips/app/i18n/en-US.ts +7 -0
  32. package/corpus/templates/clips/app/lib/agent-share.ts +16 -0
  33. package/corpus/templates/clips/app/lib/command-events.ts +7 -0
  34. package/corpus/templates/clips/app/root.tsx +6 -82
  35. package/corpus/templates/clips/app/routes/_app.dictate.tsx +25 -5
  36. package/corpus/templates/clips/app/routes/_app.library._index.tsx +2 -30
  37. package/corpus/templates/clips/app/routes/_app.library.folder.$folderId.tsx +13 -2
  38. package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +4 -17
  39. package/corpus/templates/clips/app/routes/_app.r.$recordingId.tsx +111 -114
  40. package/corpus/templates/clips/app/routes/_app.spaces.$spaceId.folder.$folderId.tsx +25 -2
  41. package/corpus/templates/clips/app/routes/_app.spaces.$spaceId.tsx +14 -61
  42. package/corpus/templates/clips/app/routes/_app.spaces._index.tsx +34 -24
  43. package/corpus/templates/clips/app/routes/_app.trash.tsx +1 -1
  44. package/corpus/templates/clips/app/routes/_app.tsx +2 -4
  45. package/corpus/templates/clips/app/routes/bug-report.tsx +11 -189
  46. package/corpus/templates/clips/app/routes/share.$shareId.tsx +148 -123
  47. package/corpus/templates/clips/changelog/2026-09-08-comments-and-desktop-window-controls.md +6 -0
  48. package/corpus/templates/clips/changelog/2026-09-08-global-command-search.md +6 -0
  49. package/corpus/templates/clips/changelog/2026-09-09-agent-sidebar-fits-below-toolbar.md +6 -0
  50. package/corpus/templates/clips/changelog/2026-09-09-desktop-switches-stay-clear-in-dark-mode.md +6 -0
  51. package/corpus/templates/clips/changelog/2026-09-09-recording-agent-uses-global-panel.md +6 -0
  52. package/corpus/templates/clips/desktop/src/app.tsx +2 -2
  53. package/corpus/templates/clips/desktop/src/components/MediaDeviceRow.tsx +5 -3
  54. package/corpus/templates/clips/desktop/src/components/SourceRow.tsx +1 -0
  55. package/corpus/templates/clips/desktop/src/components/Switch.tsx +2 -5
  56. package/corpus/templates/clips/desktop/src/components/ui/switch.tsx +21 -3
  57. package/corpus/templates/clips/desktop/src/hooks/useMediaDevices.ts +72 -52
  58. package/corpus/templates/clips/desktop/src/styles.css +18 -19
  59. package/corpus/templates/clips/desktop/src/tailwind.css +3 -0
  60. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +18 -10
  61. package/corpus/templates/clips/desktop/src-tauri/src/util.rs +3 -5
  62. package/corpus/templates/design/.agents/skills/export-handoff/SKILL.md +14 -3
  63. package/corpus/templates/design/AGENTS.md +2 -1
  64. package/corpus/templates/design/actions/export-png.ts +119 -0
  65. package/corpus/templates/design/actions/take-design-screenshot.ts +47 -13
  66. package/corpus/templates/design/server/plugins/agent-chat.ts +3 -1
  67. package/corpus/templates/factory/actions/dispatch-factory-item.ts +51 -22
  68. package/corpus/templates/factory/actions/list-triage-items.ts +21 -11
  69. package/corpus/templates/factory/actions/poll-slack-channel.ts +7 -2
  70. package/corpus/templates/factory/changelog/2026-09-09-slack-feedback-keeps-claimed-markers-after-poll.md +6 -0
  71. package/corpus/templates/factory/changelog/2026-09-09-slack-feedback-preserves-started-claimed-threads.md +6 -0
  72. package/corpus/templates/factory/changelog/2026-09-09-slack-feedback-skips-claimed-parents.md +6 -0
  73. package/corpus/templates/factory/server/lib/factory-automation-config.ts +1 -1
  74. package/corpus/templates/factory/server/lib/slack-feedback-prompt.ts +47 -0
  75. package/corpus/templates/factory/server/plugins/agent-chat.ts +5 -2
  76. package/corpus/templates/factory/server/plugins/factory-scheduler-job.ts +5 -4
  77. package/corpus/templates/factory/server/triage/review-skill-alignment.ts +12 -7
  78. package/corpus/templates/factory/server/triage/slack-review-window.ts +39 -0
  79. package/dist/client/CommandMenu.js +13 -1
  80. package/dist/client/analytics.js +10 -0
  81. package/dist/collab/routes.d.ts +1 -1
  82. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  83. package/dist/notifications/routes.d.ts +2 -2
  84. package/dist/observability/routes.d.ts +5 -5
  85. package/dist/vite/client.js +25 -7
  86. package/dist/vite/sentry-source-maps.d.ts +12 -0
  87. package/dist/vite/sentry-source-maps.js +105 -0
  88. package/package.json +2 -1
@@ -13,13 +13,13 @@
13
13
  export declare function createNotificationsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<"" | import("./types.js").Notification[] | {
14
14
  count: number;
15
15
  updated?: undefined;
16
- error?: undefined;
17
16
  ok?: undefined;
17
+ error?: undefined;
18
18
  } | {
19
19
  count?: undefined;
20
20
  updated: number;
21
- error?: undefined;
22
21
  ok?: undefined;
22
+ error?: undefined;
23
23
  } | {
24
24
  count?: undefined;
25
25
  updated?: undefined;
@@ -43,25 +43,25 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
43
43
  } | {
44
44
  summary: import("./types.js").TraceSummary;
45
45
  spans: import("./types.js").TraceSpan[];
46
- id?: undefined;
47
- error?: undefined;
48
46
  ok?: undefined;
47
+ error?: undefined;
48
+ id?: undefined;
49
49
  } | {
50
50
  summary?: undefined;
51
51
  spans?: undefined;
52
52
  id: string;
53
- error?: undefined;
54
53
  ok?: undefined;
54
+ error?: undefined;
55
55
  } | {
56
56
  summary?: undefined;
57
57
  spans?: undefined;
58
58
  error: any;
59
- id?: undefined;
60
59
  ok?: undefined;
60
+ id?: undefined;
61
61
  } | {
62
62
  summary?: undefined;
63
63
  spans?: undefined;
64
64
  ok: boolean;
65
- id?: undefined;
66
65
  error?: undefined;
66
+ id?: undefined;
67
67
  }>>;
@@ -22,6 +22,7 @@ import { actionTypesPlugin } from "./action-types-plugin.js";
22
22
  import { createAgentNativeConfigContext, loadAgentNativeConfigFile, loadWorkspaceAgentNativeConfigFile, readAgentNativeJsonConfig, } from "./agent-native-config-loader.js";
23
23
  import { agentsBundlePlugin } from "./agents-bundle-plugin.js";
24
24
  import { resolveAgentNativePackageVersions } from "./package-versions.js";
25
+ import { createSentrySourceMapUploadPlugin, isSentrySourceMapUploadEnabled, } from "./sentry-source-maps.js";
25
26
  const require = createRequire(import.meta.url);
26
27
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
27
28
  let nitroFsWatchGuardInstalled = false;
@@ -2867,11 +2868,28 @@ function authClientAssetPlugin() {
2867
2868
  },
2868
2869
  };
2869
2870
  }
2871
+ // `.env`/`.env.production` values aren't in `process.env` unless the shell
2872
+ // exported them — Vite loads them separately via `loadEnv`. Env-gated
2873
+ // checks that only read `process.env` silently miss file-only config, so
2874
+ // this is the one merge both the plugin list and the build config use.
2875
+ function resolveAgentNativeRuntimeEnv(cwd, mode) {
2876
+ const workspaceRoot = findWorkspaceRoot(cwd);
2877
+ return {
2878
+ ...(workspaceRoot && workspaceRoot !== cwd
2879
+ ? loadEnv(mode, workspaceRoot, "")
2880
+ : {}),
2881
+ ...loadEnv(mode, cwd, ""),
2882
+ ...process.env,
2883
+ };
2884
+ }
2870
2885
  function createAgentNativePlugins(options, { command, includeReactTransform, useServeOnlyNitroPlugin = false, userPlugins = [], }) {
2871
2886
  const { appBasePath } = getConfiguredAppBasePath();
2872
2887
  const nitroPlugin = createNitroDevPlugin(options, appBasePath);
2873
2888
  const includeNitro = !isBuildCommand(command);
2874
2889
  const presetMarkerPlugin = nitroPresetMarkerPlugin(options);
2890
+ // Vite's real `mode` isn't resolved yet at this eager, pre-config-hook
2891
+ // point — same fallback createAgentNativeConfig uses as its own default.
2892
+ const runtimeEnv = resolveAgentNativeRuntimeEnv(process.cwd(), process.env.NODE_ENV === "production" ? "production" : "development");
2875
2893
  return [
2876
2894
  presetMarkerPlugin,
2877
2895
  // Stub packages from `options.ssrStubs` in the SSR bundle so they
@@ -2907,6 +2925,8 @@ function createAgentNativePlugins(options, { command, includeReactTransform, use
2907
2925
  includeReactTransform ? createReactTransformPlugin() : null,
2908
2926
  createDesignSystemThemePlugin(options.designSystemTheme),
2909
2927
  createTailwindPlugin(options),
2928
+ // No-ops unless a Sentry auth token/org/project is configured.
2929
+ ...createSentrySourceMapUploadPlugin(runtimeEnv),
2910
2930
  ].filter(Boolean);
2911
2931
  }
2912
2932
  function resolveAgentNativeTemplate(cwd) {
@@ -2967,13 +2987,7 @@ function createAgentNativeConfig(options = {}, command, userConfig = {}, mode =
2967
2987
  // (Vite's loadEnv merges in precedence order — app dir is loaded after).
2968
2988
  const workspaceRoot = findWorkspaceRoot(cwd);
2969
2989
  const envDir = workspaceRoot && workspaceRoot !== cwd ? workspaceRoot : cwd;
2970
- const runtimeEnv = {
2971
- ...(workspaceRoot && workspaceRoot !== cwd
2972
- ? loadEnv(mode, workspaceRoot, "")
2973
- : {}),
2974
- ...loadEnv(mode, cwd, ""),
2975
- ...process.env,
2976
- };
2990
+ const runtimeEnv = resolveAgentNativeRuntimeEnv(cwd, mode);
2977
2991
  const appConfig = resolveAgentNativeConfig(mergeAgentNativeConfigs(mergeAgentNativeConfigs(mergeAgentNativeConfigs(workspaceConfig
2978
2992
  ? resolveAgentNativeConfig(workspaceConfig, configContext)
2979
2993
  : {}, readAgentNativeJsonConfig(cwd)), projectConfigInput
@@ -3161,6 +3175,10 @@ function createAgentNativeConfig(options = {}, command, userConfig = {}, mode =
3161
3175
  // the standard property survives the production pipeline.
3162
3176
  cssMinify: userConfig.build?.cssMinify ?? "esbuild",
3163
3177
  cssTarget: userConfig.build?.cssTarget ?? ["es2020", "safari18"],
3178
+ // "hidden" writes .map files for upload without a public
3179
+ // sourceMappingURL comment, so production never serves them directly.
3180
+ sourcemap: userConfig.build?.sourcemap ??
3181
+ (isSentrySourceMapUploadEnabled(runtimeEnv) ? "hidden" : false),
3164
3182
  },
3165
3183
  // Bundle all non-Node.js deps into the production SSR server build.
3166
3184
  // Edge runtimes (CF Workers, Deno) don't have node_modules at runtime.
@@ -0,0 +1,12 @@
1
+ import type { Plugin } from "vite";
2
+ export declare function resolveSentryClientRelease(env: Record<string, string | undefined>): string;
3
+ export interface SentrySourceMapUploadConfig {
4
+ authToken: string;
5
+ org: string;
6
+ project: string;
7
+ url?: string;
8
+ release: string;
9
+ }
10
+ export declare function resolveSentrySourceMapUploadConfig(env?: Record<string, string | undefined>): SentrySourceMapUploadConfig | null;
11
+ export declare function isSentrySourceMapUploadEnabled(env?: Record<string, string | undefined>): boolean;
12
+ export declare function createSentrySourceMapUploadPlugin(env?: Record<string, string | undefined>): Plugin[];
@@ -0,0 +1,105 @@
1
+ /**
2
+ * The release name here MUST match what `client/analytics.ts` sends as
3
+ * `event.release` at runtime, or uploaded source maps never resolve against
4
+ * captured events. Both derive it from the same `resolveAgentNativeBuildId()`
5
+ * identifier so they can't drift apart independently.
6
+ */
7
+ import { readdir, rm } from "node:fs/promises";
8
+ import path from "node:path";
9
+ import { sentryVitePlugin } from "@sentry/vite-plugin";
10
+ import { resolveAgentNativeBuildId } from "../shared/build-id.js";
11
+ function firstNonEmpty(...values) {
12
+ for (const value of values) {
13
+ const trimmed = value?.trim();
14
+ if (trimmed)
15
+ return trimmed;
16
+ }
17
+ return undefined;
18
+ }
19
+ export function resolveSentryClientRelease(env) {
20
+ return `agent-native-client@${resolveAgentNativeBuildId(env, "development")}`;
21
+ }
22
+ // A token alone can't safely guess org/project, and a half-configured plugin
23
+ // would fail every build rather than cleanly no-op.
24
+ export function resolveSentrySourceMapUploadConfig(env = process.env) {
25
+ const authToken = firstNonEmpty(env.SENTRY_AUTH_TOKEN);
26
+ if (!authToken)
27
+ return null;
28
+ const org = firstNonEmpty(env.SENTRY_ORG, env.SENTRY_ORG_SLUG);
29
+ // SENTRY_PROJECT_ID is the numeric DSN project id used elsewhere in this
30
+ // repo (sentry-config.ts) — not a valid value for the plugin's `project`
31
+ // option, which wants the project slug. Passing the numeric id would
32
+ // silently target the wrong project instead of cleanly no-oping.
33
+ const project = firstNonEmpty(env.SENTRY_PROJECT, env.SENTRY_CLIENT_PROJECT);
34
+ if (!org || !project)
35
+ return null;
36
+ return {
37
+ authToken,
38
+ org,
39
+ project,
40
+ url: firstNonEmpty(env.SENTRY_URL),
41
+ release: resolveSentryClientRelease(env),
42
+ };
43
+ }
44
+ export function isSentrySourceMapUploadEnabled(env = process.env) {
45
+ return resolveSentrySourceMapUploadConfig(env) !== null;
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
+ function createUploadedSourceMapCleanupPlugin() {
60
+ return {
61
+ name: "agent-native:delete-uploaded-sentry-source-maps",
62
+ enforce: "post",
63
+ writeBundle: {
64
+ order: "post",
65
+ sequential: true,
66
+ async handler(outputOptions) {
67
+ if (outputOptions.dir) {
68
+ await removeSourceMaps(outputOptions.dir);
69
+ }
70
+ else if (outputOptions.file) {
71
+ await rm(`${outputOptions.file}.map`, { force: true });
72
+ }
73
+ },
74
+ },
75
+ };
76
+ }
77
+ // Safe to always include in the plugins array regardless of `vite build` vs
78
+ // `vite dev` — `@sentry/vite-plugin`'s hooks only act during a real Rollup
79
+ // build.
80
+ export function createSentrySourceMapUploadPlugin(env = process.env) {
81
+ const config = resolveSentrySourceMapUploadConfig(env);
82
+ if (!config)
83
+ return [];
84
+ const uploadPlugins = sentryVitePlugin({
85
+ org: config.org,
86
+ project: config.project,
87
+ authToken: config.authToken,
88
+ url: config.url,
89
+ telemetry: false,
90
+ release: {
91
+ // inject: false — client/analytics.ts already sets `release` itself;
92
+ // letting the plugin also inject its own git-SHA-based release would
93
+ // create a second, divergent source of truth for the same field.
94
+ name: config.release,
95
+ inject: false,
96
+ },
97
+ // Sentry's built-in filesToDeleteAfterUpload runs in a finally block, even
98
+ // after a failed upload. Throw here so the build cannot publish an artifact
99
+ // whose maps were neither uploaded nor intentionally retained.
100
+ errorHandler: (error) => {
101
+ throw error;
102
+ },
103
+ });
104
+ return [...uploadPlugins, createUploadedSourceMapCleanupPlugin()];
105
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.178.0",
3
+ "version": "0.178.1-nightly-20260909221943",
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": {
@@ -399,6 +399,7 @@
399
399
  "@rrweb/record": "2.1.0",
400
400
  "@sentry/browser": "10.60.0",
401
401
  "@sentry/node": "10.60.0",
402
+ "@sentry/vite-plugin": "5.4.0",
402
403
  "@shadcn/react": "^0.2.0",
403
404
  "@standard-schema/spec": "^1.1.0",
404
405
  "@tanstack/react-table": "^8.21.3",