copilotkit 4.13.0 → 4.13.1

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 (79) hide show
  1. package/cli-build-info.json +8 -8
  2. package/index.js +607 -257
  3. package/onboarding/index.json +1 -1
  4. package/onboarding/prompts/authenticate/start.md +7 -7
  5. package/onboarding/prompts/conversion/plan.md +3 -3
  6. package/onboarding/prompts/credentials/finalize-plan.md +9 -8
  7. package/onboarding/prompts/credentials/plan.md +21 -21
  8. package/onboarding/prompts/credentials/settle-credentials.md +8 -8
  9. package/onboarding/prompts/credentials/write-plan.md +5 -5
  10. package/onboarding/prompts/fallback/best-effort.md +6 -6
  11. package/onboarding/prompts/feature/a2ui/implement.md +6 -6
  12. package/onboarding/prompts/feature/a2ui/proof.md +6 -6
  13. package/onboarding/prompts/feature/a2ui/start.md +7 -7
  14. package/onboarding/prompts/feature/channels/implement.md +15 -7
  15. package/onboarding/prompts/feature/channels/proof.md +6 -6
  16. package/onboarding/prompts/feature/channels/start.md +7 -7
  17. package/onboarding/prompts/feature/chat-suggestions/implement.md +6 -6
  18. package/onboarding/prompts/feature/chat-suggestions/proof.md +6 -6
  19. package/onboarding/prompts/feature/chat-suggestions/start.md +7 -7
  20. package/onboarding/prompts/feature/complete.md +1 -1
  21. package/onboarding/prompts/feature/learning/implement.md +15 -15
  22. package/onboarding/prompts/feature/learning/proof.md +7 -7
  23. package/onboarding/prompts/feature/learning/start.md +8 -8
  24. package/onboarding/prompts/feature/open-generative-ui/implement.md +6 -6
  25. package/onboarding/prompts/feature/open-generative-ui/proof.md +6 -6
  26. package/onboarding/prompts/feature/open-generative-ui/start.md +7 -7
  27. package/onboarding/prompts/feature/realtime-sync/implement.md +7 -7
  28. package/onboarding/prompts/feature/realtime-sync/proof.md +6 -6
  29. package/onboarding/prompts/feature/realtime-sync/start.md +6 -6
  30. package/onboarding/prompts/feature/rich-threads/implement.md +8 -8
  31. package/onboarding/prompts/feature/rich-threads/proof.md +6 -6
  32. package/onboarding/prompts/feature/rich-threads/start.md +6 -6
  33. package/onboarding/prompts/feature/stop.md +2 -2
  34. package/onboarding/prompts/feature/voice/implement.md +6 -6
  35. package/onboarding/prompts/feature/voice/proof.md +6 -6
  36. package/onboarding/prompts/feature/voice/start.md +7 -7
  37. package/onboarding/prompts/framework/ag2.md +2 -2
  38. package/onboarding/prompts/framework/agno.md +2 -2
  39. package/onboarding/prompts/framework/built-in.md +2 -2
  40. package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
  41. package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
  42. package/onboarding/prompts/framework/crewai-flows.md +2 -2
  43. package/onboarding/prompts/framework/deep-agents.md +2 -2
  44. package/onboarding/prompts/framework/google-adk.md +2 -2
  45. package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
  46. package/onboarding/prompts/framework/langgraph-python.md +2 -2
  47. package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
  48. package/onboarding/prompts/framework/llamaindex.md +2 -2
  49. package/onboarding/prompts/framework/mastra.md +2 -2
  50. package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
  51. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
  52. package/onboarding/prompts/framework/ms-agent-python.md +2 -2
  53. package/onboarding/prompts/framework/pydantic-ai.md +2 -2
  54. package/onboarding/prompts/framework/strands-python.md +2 -2
  55. package/onboarding/prompts/framework/strands-typescript.md +2 -2
  56. package/onboarding/prompts/frontend/angular.md +3 -3
  57. package/onboarding/prompts/frontend/nextjs.md +3 -3
  58. package/onboarding/prompts/frontend/plan.md +7 -7
  59. package/onboarding/prompts/frontend/react-native.md +2 -2
  60. package/onboarding/prompts/frontend/react-spa.md +2 -2
  61. package/onboarding/prompts/frontend/vue.md +2 -2
  62. package/onboarding/prompts/implementation/build-and-validate.md +15 -15
  63. package/onboarding/prompts/proof/complete.md +8 -8
  64. package/onboarding/prompts/proof/oss-baseline.md +5 -5
  65. package/onboarding/prompts/proof/round-trip.md +10 -10
  66. package/onboarding/prompts/research/gather.md +5 -5
  67. package/onboarding/prompts/research/merge.md +3 -3
  68. package/onboarding/prompts/research/preflight.md +4 -4
  69. package/onboarding/prompts/research/route.md +7 -7
  70. package/onboarding/prompts/starter/clone.md +5 -5
  71. package/onboarding/prompts/stopped/run-failed.md +2 -2
  72. package/onboarding/prompts/subagent/create-plan.md +1 -1
  73. package/onboarding/prompts/subagent/implement-and-validate.md +7 -0
  74. package/onboarding/prompts/subagent/inspect-repository.md +1 -1
  75. package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
  76. package/onboarding/prompts/subagent/prove-round-trip.md +7 -7
  77. package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
  78. package/package.json +1 -1
  79. package/release/release-tool.js +101 -1
package/index.js CHANGED
@@ -41,12 +41,205 @@ var __toESM = (mod3, isNodeMode, target) => (target = mod3 != null ? __create(__
41
41
  ));
42
42
  var __toCommonJS = (mod3) => __copyProps(__defProp({}, "__esModule", { value: true }), mod3);
43
43
 
44
+ // libs/feature-flags/src/registry.ts
45
+ function defineFlags(defs) {
46
+ return Object.fromEntries(
47
+ Object.entries(defs).map(([key, body]) => [key, { ...body, key }])
48
+ );
49
+ }
50
+ var FLAG_DEFINITIONS;
51
+ var init_registry = __esm({
52
+ "libs/feature-flags/src/registry.ts"() {
53
+ "use strict";
54
+ FLAG_DEFINITIONS = defineFlags({
55
+ // Ops can auto-deploy before App API, including in staging. Keep issuance
56
+ // off in every environment until all verifiers accept this signed claim.
57
+ "cli.organization-slug": {
58
+ purpose: "Include the Clerk organization slug in CLI product credentials after App API rollout.",
59
+ owner: "platform",
60
+ createdAt: "2026-09-17",
61
+ status: "rollout",
62
+ surfaces: ["ops-api"],
63
+ defaultByEnv: { dev: false, ci: false, prod: false },
64
+ envVar: "OPS_CLI_ORGANIZATION_SLUG_ENABLED"
65
+ },
66
+ // Self-hosted is a seam, not an offered choice yet (PE-94): the target moves
67
+ // only the app API URL, and no onboarding path offers it. Keep released
68
+ // binaries on managed until a self-hosted deployment can serve the product.
69
+ "cli.self-hosted-deployment": {
70
+ purpose: "Lets the CLI target a self-hosted Intelligence deployment through --deployment or COPILOTKIT_DEPLOYMENT.",
71
+ owner: "platform",
72
+ createdAt: "2026-09-22",
73
+ status: "rollout",
74
+ surfaces: ["cli"],
75
+ defaultByEnv: { dev: true, ci: true, prod: false }
76
+ },
77
+ "threads.bounded-replay": {
78
+ purpose: "Stage connect history on disk and require SDK acknowledgements for bounded delivery.",
79
+ owner: "realtime",
80
+ createdAt: "2026-09-16",
81
+ status: "rollout",
82
+ surfaces: ["realtime-gateway", "copilotkit-core"],
83
+ defaultByEnv: { dev: true, ci: true, prod: false },
84
+ envVar: "REALTIME_GATEWAY_BOUNDED_REPLAY_ENABLED"
85
+ },
86
+ // `active` (not `rollout`): a long-lived operational kill-switch, default-on
87
+ // in every env; `envVar` adopts the pre-existing INSPECT_ROUTES_ENABLED name.
88
+ "inspect.routes": {
89
+ purpose: "Gates the /api/_inspect/* introspection routes used by the web inspector; operational kill-switch.",
90
+ owner: "platform",
91
+ createdAt: "2026-06-23",
92
+ status: "active",
93
+ surfaces: ["app-api"],
94
+ defaultByEnv: { dev: true, ci: true, prod: true },
95
+ envVar: "INSPECT_ROUTES_ENABLED"
96
+ },
97
+ // Rollout flag for the in-progress Channels feature (OSS-373). Lets the
98
+ // SDK, UI, and infra land incrementally and deploy dark; production stays off
99
+ // until the rollout completes and the prod default is flipped in a later
100
+ // build. Server boundaries enforce it via the shared `resolveChannelsRollout`
101
+ // helper; `envVar` pins the pre-existing FF_MANAGED_BOTS toggle name so the
102
+ // operational override is byte-identical across the rename.
103
+ channels: {
104
+ purpose: "Gates the Channels feature (activation, listener, delivery, egress) so unfinished customer behavior stays dark until rollout completes.",
105
+ owner: "channels",
106
+ createdAt: "2026-06-25",
107
+ status: "rollout",
108
+ surfaces: ["app-api", "realtime-gateway", "app-frontend"],
109
+ defaultByEnv: { dev: true, ci: true, prod: false },
110
+ envVar: "FF_MANAGED_BOTS"
111
+ },
112
+ "managed-channels": {
113
+ purpose: "Canonical Managed Channels rollout gate, evaluated alongside the legacy FF_MANAGED_BOTS override while deployments migrate.",
114
+ owner: "channels",
115
+ createdAt: "2026-07-09",
116
+ status: "rollout",
117
+ surfaces: ["app-api", "realtime-gateway", "app-frontend"],
118
+ defaultByEnv: { dev: true, ci: true, prod: true }
119
+ },
120
+ "learning.platform-v1": {
121
+ purpose: "Gates the Learning V1 control API, runtime workers, product UI, and CLI download while the platform rolls out.",
122
+ owner: "learning",
123
+ createdAt: "2026-08-06",
124
+ status: "rollout",
125
+ surfaces: ["app-api", "app-frontend", "cli"],
126
+ defaultByEnv: { dev: false, ci: false, prod: false },
127
+ envVar: "LEARNING_ENABLED"
128
+ },
129
+ "analytics.pipeline": {
130
+ purpose: "Gates project-scoped analytics reads and realtime projection while the durable pipeline rolls out.",
131
+ owner: "analytics",
132
+ createdAt: "2026-08-16",
133
+ status: "rollout",
134
+ surfaces: ["app-api", "realtime-gateway"],
135
+ defaultByEnv: { dev: false, ci: false, prod: false },
136
+ envVar: "ANALYTICS_ENABLED"
137
+ },
138
+ "ops.stripe-billing-v1": {
139
+ purpose: "Gates the direct Stripe Checkout, Portal, projection, and provider-aware billing API during rollout.",
140
+ owner: "ops",
141
+ createdAt: "2026-09-08",
142
+ status: "rollout",
143
+ surfaces: ["ops-api"],
144
+ defaultByEnv: { dev: true, ci: true, prod: false }
145
+ }
146
+ });
147
+ }
148
+ });
149
+
150
+ // libs/feature-flags/src/resolve.ts
151
+ function resolveEnvironment(env5) {
152
+ const explicit = env5.FF_ENV;
153
+ if (explicit === "dev" || explicit === "ci" || explicit === "prod") {
154
+ return explicit;
155
+ }
156
+ if (env5.CI === "true") {
157
+ return "ci";
158
+ }
159
+ if (env5.NODE_ENV === "production") {
160
+ return "prod";
161
+ }
162
+ return "dev";
163
+ }
164
+ function flagEnvVarName(def) {
165
+ return def.envVar ?? `FF_${def.key.toUpperCase().replace(/[.-]/g, "_")}`;
166
+ }
167
+ function resolveFlag(def, env5, environment = resolveEnvironment(env5)) {
168
+ const raw2 = env5[flagEnvVarName(def)];
169
+ if (raw2 === "true") {
170
+ return true;
171
+ }
172
+ if (raw2 === "false") {
173
+ return false;
174
+ }
175
+ return def.defaultByEnv[environment];
176
+ }
177
+ function isFlagEnabled(key, env5, environment = resolveEnvironment(env5)) {
178
+ return resolveFlag(FLAG_DEFINITIONS[key], env5, environment);
179
+ }
180
+ var init_resolve = __esm({
181
+ "libs/feature-flags/src/resolve.ts"() {
182
+ "use strict";
183
+ init_registry();
184
+ }
185
+ });
186
+
187
+ // libs/feature-flags/src/manifest.ts
188
+ var init_manifest = __esm({
189
+ "libs/feature-flags/src/manifest.ts"() {
190
+ "use strict";
191
+ init_registry();
192
+ }
193
+ });
194
+
195
+ // libs/feature-flags/src/ci.ts
196
+ var init_ci = __esm({
197
+ "libs/feature-flags/src/ci.ts"() {
198
+ "use strict";
199
+ init_registry();
200
+ init_resolve();
201
+ }
202
+ });
203
+
204
+ // libs/feature-flags/src/index.ts
205
+ var init_src = __esm({
206
+ "libs/feature-flags/src/index.ts"() {
207
+ "use strict";
208
+ init_registry();
209
+ init_resolve();
210
+ init_manifest();
211
+ init_ci();
212
+ }
213
+ });
214
+
215
+ // apps/cli/src/feature-flags.ts
216
+ function cliReleaseChannel() {
217
+ return true ? "release" : "local";
218
+ }
219
+ function resolveCliEnvironment(env5 = process.env, channel2 = cliReleaseChannel()) {
220
+ const explicit = env5.FF_ENV;
221
+ if (explicit === "dev" || explicit === "ci" || explicit === "prod") {
222
+ return explicit;
223
+ }
224
+ return channel2 === "release" ? "prod" : "dev";
225
+ }
226
+ function isCliFlagEnabled(key, env5 = process.env) {
227
+ return isFlagEnabled(key, env5, resolveCliEnvironment(env5));
228
+ }
229
+ var init_feature_flags = __esm({
230
+ "apps/cli/src/feature-flags.ts"() {
231
+ "use strict";
232
+ init_src();
233
+ }
234
+ });
235
+
44
236
  // apps/cli/src/config.ts
45
237
  var config_exports = {};
46
238
  __export(config_exports, {
47
239
  getAppApiUrl: () => getAppApiUrl,
48
240
  getBuildInfo: () => getBuildInfo,
49
241
  getC15tBackendUrl: () => getC15tBackendUrl,
242
+ getDeploymentTarget: () => getDeploymentTarget,
50
243
  getHostedGatewayUrl: () => getHostedGatewayUrl,
51
244
  getHostedRuntimeUrl: () => getHostedRuntimeUrl,
52
245
  getHostedSlEnabled: () => getHostedSlEnabled,
@@ -59,12 +252,52 @@ __export(config_exports, {
59
252
  getTeamsIngressBaseUrl: () => getTeamsIngressBaseUrl,
60
253
  getTelemetryEndpointUrl: () => getTelemetryEndpointUrl,
61
254
  getTemplateRef: () => getTemplateRef,
255
+ resetDeploymentTarget: () => resetDeploymentTarget,
62
256
  setAppApiUrl: () => setAppApiUrl,
257
+ setDeploymentTarget: () => setDeploymentTarget,
63
258
  setOpsApiUrl: () => setOpsApiUrl,
64
259
  setOpsFrontendUrl: () => setOpsFrontendUrl,
65
260
  setSlackIngressBaseUrl: () => setSlackIngressBaseUrl,
66
261
  setTeamsIngressBaseUrl: () => setTeamsIngressBaseUrl
67
262
  });
263
+ function setDeploymentTarget(target) {
264
+ if (target.name === "self-hosted" && !isCliFlagEnabled("cli.self-hosted-deployment")) {
265
+ throw new Error(
266
+ 'Self-hosted deployments are not available in this CLI release. Use "managed".'
267
+ );
268
+ }
269
+ if (target.name === "self-hosted" && !target.appApiUrl?.trim()) {
270
+ throw new Error(
271
+ "A self-hosted deployment needs an app API URL. Pass --app-api-url, or set COPILOTKIT_APP_API_URL."
272
+ );
273
+ }
274
+ deploymentTarget = target;
275
+ }
276
+ function resetDeploymentTarget() {
277
+ deploymentTarget = null;
278
+ }
279
+ function getDeploymentTarget() {
280
+ if (deploymentTarget !== null) {
281
+ return deploymentTarget;
282
+ }
283
+ const named = process.env["COPILOTKIT_DEPLOYMENT"]?.trim();
284
+ if (named === void 0 || named === "") {
285
+ deploymentTarget = { name: "managed" };
286
+ return deploymentTarget;
287
+ }
288
+ if (named !== "managed" && named !== "self-hosted") {
289
+ throw new Error(
290
+ `Unknown deployment "${named}". Use "managed" or "self-hosted".`
291
+ );
292
+ }
293
+ const appApiUrl = process.env["COPILOTKIT_APP_API_URL"]?.trim();
294
+ const resolved = {
295
+ name: named,
296
+ ...appApiUrl ? { appApiUrl } : {}
297
+ };
298
+ setDeploymentTarget(resolved);
299
+ return resolved;
300
+ }
68
301
  function getOpsApiUrl() {
69
302
  return opsApiUrlOverride ?? "https://api.operations.copilotkit.ai";
70
303
  }
@@ -72,7 +305,7 @@ function setOpsApiUrl(url4) {
72
305
  opsApiUrlOverride = url4;
73
306
  }
74
307
  function getAppApiUrl() {
75
- return appApiUrlOverride ?? (true ? "https://api.intelligence.copilotkit.ai" : getHostedRuntimeUrl());
308
+ return appApiUrlOverride ?? getDeploymentTarget().appApiUrl ?? (true ? "https://api.intelligence.copilotkit.ai" : getHostedRuntimeUrl());
76
309
  }
77
310
  function setAppApiUrl(url4) {
78
311
  appApiUrlOverride = url4;
@@ -109,14 +342,14 @@ function getTelemetryEndpointUrl() {
109
342
  }
110
343
  function getBuildInfo() {
111
344
  return {
112
- version: true ? "4.13.0" : "dev",
113
- buildNumber: true ? "35742767211" : "dev",
114
- commitSha: true ? "addb7285609bab57a4a8ef12d73351fdf5dfaf3f" : "dev",
345
+ version: true ? "4.13.1" : "dev",
346
+ buildNumber: true ? "35769780196" : "dev",
347
+ commitSha: true ? "a629bd48ce4223ba2ea4fc1fb488973f8915807e" : "dev",
115
348
  copilotKitCommit: getTemplateRef()
116
349
  };
117
350
  }
118
351
  function getTemplateRef() {
119
- return true ? "1e13b4945b44c6afa2e398a0c9935415d4aa7577" : "main";
352
+ return true ? "f8047217b909a3e18404034f31f47157c4312241" : "main";
120
353
  }
121
354
  function getC15tBackendUrl() {
122
355
  return true ? "https://calm-hazelnut-joy-copilotkit.inth.app" : "";
@@ -136,15 +369,17 @@ function getPrivacyPolicyUrl() {
136
369
  function getPrivacyPolicyVersion() {
137
370
  return PRIVACY_POLICY_VERSION;
138
371
  }
139
- var opsApiUrlOverride, opsFrontendUrlOverride, appApiUrlOverride, teamsIngressBaseUrlOverride, slackIngressBaseUrlOverride, PRIVACY_POLICY_URL, PRIVACY_POLICY_VERSION;
372
+ var opsApiUrlOverride, opsFrontendUrlOverride, appApiUrlOverride, teamsIngressBaseUrlOverride, slackIngressBaseUrlOverride, deploymentTarget, PRIVACY_POLICY_URL, PRIVACY_POLICY_VERSION;
140
373
  var init_config = __esm({
141
374
  "apps/cli/src/config.ts"() {
142
375
  "use strict";
376
+ init_feature_flags();
143
377
  opsApiUrlOverride = null;
144
378
  opsFrontendUrlOverride = null;
145
379
  appApiUrlOverride = null;
146
380
  teamsIngressBaseUrlOverride = null;
147
381
  slackIngressBaseUrlOverride = null;
382
+ deploymentTarget = null;
148
383
  PRIVACY_POLICY_URL = "https://www.copilotkit.ai/privacy-policy";
149
384
  PRIVACY_POLICY_VERSION = "2026-06-04";
150
385
  }
@@ -5656,24 +5891,24 @@ var require_fast_uri = __commonJS({
5656
5891
  function normalize2(uri2, options) {
5657
5892
  if (typeof uri2 === "string") {
5658
5893
  uri2 = /** @type {T} */
5659
- serialize3(parse13(uri2, options), options);
5894
+ serialize3(parse14(uri2, options), options);
5660
5895
  } else if (typeof uri2 === "object") {
5661
5896
  uri2 = /** @type {T} */
5662
- parse13(serialize3(uri2, options), options);
5897
+ parse14(serialize3(uri2, options), options);
5663
5898
  }
5664
5899
  return uri2;
5665
5900
  }
5666
5901
  function resolve9(baseURI, relativeURI, options) {
5667
5902
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
5668
- const resolved = resolveComponent(parse13(baseURI, schemelessOptions), parse13(relativeURI, schemelessOptions), schemelessOptions, true);
5903
+ const resolved = resolveComponent(parse14(baseURI, schemelessOptions), parse14(relativeURI, schemelessOptions), schemelessOptions, true);
5669
5904
  schemelessOptions.skipEscape = true;
5670
5905
  return serialize3(resolved, schemelessOptions);
5671
5906
  }
5672
5907
  function resolveComponent(base, relative7, options, skipNormalization) {
5673
5908
  const target = {};
5674
5909
  if (!skipNormalization) {
5675
- base = parse13(serialize3(base, options), options);
5676
- relative7 = parse13(serialize3(relative7, options), options);
5910
+ base = parse14(serialize3(base, options), options);
5911
+ relative7 = parse14(serialize3(relative7, options), options);
5677
5912
  }
5678
5913
  options = options || {};
5679
5914
  if (!options.tolerant && relative7.scheme) {
@@ -5725,13 +5960,13 @@ var require_fast_uri = __commonJS({
5725
5960
  function equal(uriA, uriB, options) {
5726
5961
  if (typeof uriA === "string") {
5727
5962
  uriA = unescape(uriA);
5728
- uriA = serialize3(normalizeComponentEncoding(parse13(uriA, options), true), { ...options, skipEscape: true });
5963
+ uriA = serialize3(normalizeComponentEncoding(parse14(uriA, options), true), { ...options, skipEscape: true });
5729
5964
  } else if (typeof uriA === "object") {
5730
5965
  uriA = serialize3(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
5731
5966
  }
5732
5967
  if (typeof uriB === "string") {
5733
5968
  uriB = unescape(uriB);
5734
- uriB = serialize3(normalizeComponentEncoding(parse13(uriB, options), true), { ...options, skipEscape: true });
5969
+ uriB = serialize3(normalizeComponentEncoding(parse14(uriB, options), true), { ...options, skipEscape: true });
5735
5970
  } else if (typeof uriB === "object") {
5736
5971
  uriB = serialize3(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
5737
5972
  }
@@ -5801,7 +6036,7 @@ var require_fast_uri = __commonJS({
5801
6036
  return uriTokens.join("");
5802
6037
  }
5803
6038
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
5804
- function parse13(uri2, opts) {
6039
+ function parse14(uri2, opts) {
5805
6040
  const options = Object.assign({}, opts);
5806
6041
  const parsed = {
5807
6042
  scheme: void 0,
@@ -5895,7 +6130,7 @@ var require_fast_uri = __commonJS({
5895
6130
  resolveComponent,
5896
6131
  equal,
5897
6132
  serialize: serialize3,
5898
- parse: parse13
6133
+ parse: parse14
5899
6134
  };
5900
6135
  module2.exports = fastUri;
5901
6136
  module2.exports.default = fastUri;
@@ -10285,7 +10520,7 @@ var require_parse = __commonJS({
10285
10520
  "node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.js"(exports2, module2) {
10286
10521
  "use strict";
10287
10522
  var SemVer = require_semver();
10288
- var parse13 = (version6, options, throwErrors = false) => {
10523
+ var parse14 = (version6, options, throwErrors = false) => {
10289
10524
  if (version6 instanceof SemVer) {
10290
10525
  return version6;
10291
10526
  }
@@ -10298,7 +10533,7 @@ var require_parse = __commonJS({
10298
10533
  throw er;
10299
10534
  }
10300
10535
  };
10301
- module2.exports = parse13;
10536
+ module2.exports = parse14;
10302
10537
  }
10303
10538
  });
10304
10539
 
@@ -10306,9 +10541,9 @@ var require_parse = __commonJS({
10306
10541
  var require_valid = __commonJS({
10307
10542
  "node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.js"(exports2, module2) {
10308
10543
  "use strict";
10309
- var parse13 = require_parse();
10544
+ var parse14 = require_parse();
10310
10545
  var valid = (version6, options) => {
10311
- const v = parse13(version6, options);
10546
+ const v = parse14(version6, options);
10312
10547
  return v ? v.version : null;
10313
10548
  };
10314
10549
  module2.exports = valid;
@@ -10319,9 +10554,9 @@ var require_valid = __commonJS({
10319
10554
  var require_clean = __commonJS({
10320
10555
  "node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.js"(exports2, module2) {
10321
10556
  "use strict";
10322
- var parse13 = require_parse();
10557
+ var parse14 = require_parse();
10323
10558
  var clean = (version6, options) => {
10324
- const s2 = parse13(version6.trim().replace(/^[=v]+/, ""), options);
10559
+ const s2 = parse14(version6.trim().replace(/^[=v]+/, ""), options);
10325
10560
  return s2 ? s2.version : null;
10326
10561
  };
10327
10562
  module2.exports = clean;
@@ -10356,10 +10591,10 @@ var require_inc = __commonJS({
10356
10591
  var require_diff = __commonJS({
10357
10592
  "node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.js"(exports2, module2) {
10358
10593
  "use strict";
10359
- var parse13 = require_parse();
10594
+ var parse14 = require_parse();
10360
10595
  var diff2 = (version1, version22) => {
10361
- const v13 = parse13(version1, null, true);
10362
- const v2 = parse13(version22, null, true);
10596
+ const v13 = parse14(version1, null, true);
10597
+ const v2 = parse14(version22, null, true);
10363
10598
  const comparison = v13.compare(v2);
10364
10599
  if (comparison === 0) {
10365
10600
  return null;
@@ -10430,9 +10665,9 @@ var require_patch = __commonJS({
10430
10665
  var require_prerelease = __commonJS({
10431
10666
  "node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.js"(exports2, module2) {
10432
10667
  "use strict";
10433
- var parse13 = require_parse();
10668
+ var parse14 = require_parse();
10434
10669
  var prerelease = (version6, options) => {
10435
- const parsed = parse13(version6, options);
10670
+ const parsed = parse14(version6, options);
10436
10671
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
10437
10672
  };
10438
10673
  module2.exports = prerelease;
@@ -10618,7 +10853,7 @@ var require_coerce = __commonJS({
10618
10853
  "node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.js"(exports2, module2) {
10619
10854
  "use strict";
10620
10855
  var SemVer = require_semver();
10621
- var parse13 = require_parse();
10856
+ var parse14 = require_parse();
10622
10857
  var { safeRe: re3, t: t3 } = require_re();
10623
10858
  var coerce = (version6, options) => {
10624
10859
  if (version6 instanceof SemVer) {
@@ -10653,7 +10888,7 @@ var require_coerce = __commonJS({
10653
10888
  const patch = match2[4] || "0";
10654
10889
  const prerelease = options.includePrerelease && match2[5] ? `-${match2[5]}` : "";
10655
10890
  const build = options.includePrerelease && match2[6] ? `+${match2[6]}` : "";
10656
- return parse13(`${major3}.${minor}.${patch}${prerelease}${build}`, options);
10891
+ return parse14(`${major3}.${minor}.${patch}${prerelease}${build}`, options);
10657
10892
  };
10658
10893
  module2.exports = coerce;
10659
10894
  }
@@ -11669,7 +11904,7 @@ var require_semver2 = __commonJS({
11669
11904
  var constants3 = require_constants();
11670
11905
  var SemVer = require_semver();
11671
11906
  var identifiers = require_identifiers();
11672
- var parse13 = require_parse();
11907
+ var parse14 = require_parse();
11673
11908
  var valid = require_valid();
11674
11909
  var clean = require_clean();
11675
11910
  var inc = require_inc();
@@ -11707,7 +11942,7 @@ var require_semver2 = __commonJS({
11707
11942
  var simplifyRange = require_simplify();
11708
11943
  var subset = require_subset();
11709
11944
  module2.exports = {
11710
- parse: parse13,
11945
+ parse: parse14,
11711
11946
  valid,
11712
11947
  clean,
11713
11948
  inc,
@@ -26926,7 +27161,7 @@ function getFeatureDefinition(feature) {
26926
27161
  return isFeatureId(feature) ? LICENSED_FEATURES[feature] : null;
26927
27162
  }
26928
27163
  var PLAN_CODES, FEATURE_IDS, LICENSED_FEATURES, BASE_FEATURES, LICENSE_CATALOG;
26929
- var init_src = __esm({
27164
+ var init_src2 = __esm({
26930
27165
  "libs/license-catalog/src/index.ts"() {
26931
27166
  "use strict";
26932
27167
  PLAN_CODES = [
@@ -27584,12 +27819,12 @@ function parseManagedFeatureAvailability(input) {
27584
27819
  return managedFeatureAvailabilitySchema.parse(input);
27585
27820
  }
27586
27821
  var ENTITLEMENT_SOURCES, ENTITLEMENT_STATES, ENTERPRISE_SUBSCRIPTION_STATUSES, WAITLIST_OFFER_CODES, featureValueSchema, catalogFeatureMapSchema, enterpriseFeaturesSchema, adminClerkOrganizationSchema, enterpriseSubscriptionStatusSchema, planCodeSchema, organizationPlanSelectionGateCompletionReasonSchema, organizationPlanSelectionGateSchema, organizationPlanSelectionGateResponseSchema, organizationPlanSelectionGateRequestSchema, organizationPlanSelectionRequestSchema, organizationPlanSelectionResponseSchema, entitlementSourceSchema, entitlementStateSchema, waitlistOfferCodeSchema, joinWaitlistRequestSchema, waitlistEntrySchema, currentWaitlistResponseSchema, joinWaitlistResponseSchema, adminEnterpriseSubscriptionSchema, customerEffectiveEntitlementSchema, adminEffectiveEntitlementSchema, currentEntitlementResponseSchema, inspectorEntitlementProjectionVariants, inspectorEntitlementProjectionSchema, inspectorEntitlementProjectionTransportSchema, organizationEntitlementResponseSchema, customerEffectiveEntitlementTransportSchema, organizationEntitlementResponseTransportSchema, CLI_PRODUCT_CREDENTIAL_CAPABILITIES, APP_PROJECT_ID_MAX, CLI_TELEMETRY_BINDING_ID_MAX_LENGTH, cliTelemetryProjectIdSchema, cliTelemetryIdentityRequestSchema, cliTelemetryIdentityResponseSchema, cliProductCredentialCapabilitySchema, cliProductCredentialActorSchema, cliProductCredentialSchema, cliProductCredentialPayloadSchema, cliProductCredentialTokenPayloadSchema, cliProductCredentialExchangeResponseSchema, ACCOUNT_PROFILE_EMAIL_MAX_LENGTH, ACCOUNT_PROFILE_DISPLAY_NAME_MAX_LENGTH, ACCOUNT_PROFILE_AVATAR_URL_MAX_LENGTH, managedIntelligenceDestinationAppSchema, absoluteUrlSchema, managedHandoffTimestampSchema, emailValidationSchema, optionalAccountProfileEmailSchema, optionalAccountProfileDisplayNameSchema, optionalAccountProfileAvatarUrlSchema, nullableAccountProfileEmailSchema, nullableAccountProfileDisplayNameSchema, nullableAccountProfileAvatarUrlSchema, accountProfileSchema, managedClerkOrganizationSchema, managedHandoffActorSchema, managedIntelligenceSessionSchema, managedIntelligenceHandoffIssueRequestSchema, managedIntelligenceHandoffIssueResponseSchema, managedIntelligenceHandoffExchangeRequestSchema, managedIntelligenceHandoffExchangeResponseSchema, managedIntelligenceHandoffExchangeResponseTransportSchema, intelligenceAuthSessionResponseSchema, adminEnterpriseSubscriptionListResponseSchema, adminEnterpriseSubscriptionResponseSchema, adminEnterpriseSubscriptionDetailResponseSchema, createAdminEnterpriseSubscriptionRequestSchema, updateAdminEnterpriseSubscriptionRequestSchema, entitlementGrantedEventSchema, MANAGED_FEATURE_DISABLED_REASONS, managedFeatureDisabledReasonSchema, managedFeatureAvailabilitySchema, MANAGED_FEATURE_AVAILABLE, MANAGED_FEATURE_DISABLED_BY_FEATURE_FLAG, MANAGED_FEATURE_DISABLED_BY_ENTITLEMENT;
27587
- var init_src2 = __esm({
27822
+ var init_src3 = __esm({
27588
27823
  "libs/ops-contracts/src/index.ts"() {
27589
27824
  "use strict";
27590
27825
  init_zod();
27591
27826
  init_billing();
27592
- init_src();
27827
+ init_src2();
27593
27828
  init_hosted_project();
27594
27829
  init_managed_navigation();
27595
27830
  ENTITLEMENT_SOURCES = [
@@ -28027,7 +28262,7 @@ var init_config_service = __esm({
28027
28262
  "apps/cli/src/services/config.service.ts"() {
28028
28263
  "use strict";
28029
28264
  init_source();
28030
- init_src2();
28265
+ init_src3();
28031
28266
  opsContractsRuntime = src_exports;
28032
28267
  opsContracts = opsContractsRuntime.default ?? opsContractsRuntime;
28033
28268
  ({ cliProductCredentialSchema: cliProductCredentialSchema2 } = opsContracts);
@@ -28257,7 +28492,20 @@ var init_project_config = __esm({
28257
28492
  projectConfigSchema = external_exports.object({
28258
28493
  projectId: external_exports.string().min(1),
28259
28494
  projectSlug: external_exports.string().min(1),
28260
- clerkOrgId: external_exports.string().min(1),
28495
+ /**
28496
+ * Clerk organization the selection was made under.
28497
+ *
28498
+ * Absent on a self-hosted deployment, which has no Clerk organization at
28499
+ * all. Demanding it made `.copilotkit/project.json` unparseable there, and
28500
+ * the symptom surfaced a long way from the cause: `verify` reported the
28501
+ * file "exists but could not be read" and failed `project_selected` on a
28502
+ * correctly wired project, because resolution never reached the contents
28503
+ * (PE-95).
28504
+ *
28505
+ * Optional, not loose. An empty string is still rejected: absent means
28506
+ * self-hosted, blank means something wrote a bug.
28507
+ */
28508
+ clerkOrgId: external_exports.string().min(1).optional(),
28261
28509
  telemetryBindingId: external_exports.string().trim().min(1).optional(),
28262
28510
  /**
28263
28511
  * Absolute URL of this project's CopilotKit runtime, when the project pins
@@ -34613,7 +34861,7 @@ function synthesiseLegacyState(input) {
34613
34861
  };
34614
34862
  }
34615
34863
  var consentCategories, consentCategorySchema, consentStatusSchema, consentSourceSchema, decisionsSchema, consentStateSchema;
34616
- var init_src3 = __esm({
34864
+ var init_src4 = __esm({
34617
34865
  "libs/consent-contracts/src/index.ts"() {
34618
34866
  "use strict";
34619
34867
  init_zod();
@@ -34792,7 +35040,7 @@ var CATEGORY_MAP;
34792
35040
  var init_c15t_consent_provider = __esm({
34793
35041
  "apps/cli/src/services/consent/c15t-consent-provider.ts"() {
34794
35042
  "use strict";
34795
- init_src3();
35043
+ init_src4();
34796
35044
  init_dist5();
34797
35045
  init_cli_logs();
34798
35046
  init_c15t_subject_id();
@@ -38672,7 +38920,7 @@ var init_wrapAssembly = __esm({
38672
38920
 
38673
38921
  // node_modules/.pnpm/yoga-layout@3.2.1/node_modules/yoga-layout/dist/src/index.js
38674
38922
  var Yoga, src_default;
38675
- var init_src4 = __esm({
38923
+ var init_src5 = __esm({
38676
38924
  async "node_modules/.pnpm/yoga-layout@3.2.1/node_modules/yoga-layout/dist/src/index.js"() {
38677
38925
  "use strict";
38678
38926
  init_yoga_wasm_base64_esm();
@@ -63762,7 +64010,7 @@ var createNode, appendChildNode, insertBeforeNode, removeChildNode, setAttribute
63762
64010
  var init_dom = __esm({
63763
64011
  async "node_modules/.pnpm/ink@6.8.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4/node_modules/ink/build/dom.js"() {
63764
64012
  "use strict";
63765
- await init_src4();
64013
+ await init_src5();
63766
64014
  init_measure_text();
63767
64015
  init_wrap_text();
63768
64016
  init_squash_text_nodes();
@@ -63888,7 +64136,7 @@ var applyPositionStyles, applyMarginStyles, applyPaddingStyles, applyFlexStyles,
63888
64136
  var init_styles = __esm({
63889
64137
  async "node_modules/.pnpm/ink@6.8.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4/node_modules/ink/build/styles.js"() {
63890
64138
  "use strict";
63891
- await init_src4();
64139
+ await init_src5();
63892
64140
  applyPositionStyles = (node, style) => {
63893
64141
  if ("position" in style) {
63894
64142
  node.setPositionType(style.position === "absolute" ? src_default.POSITION_TYPE_ABSOLUTE : src_default.POSITION_TYPE_RELATIVE);
@@ -66190,7 +66438,7 @@ var require_extension = __commonJS({
66190
66438
  else
66191
66439
  dest[name].push(elem);
66192
66440
  }
66193
- function parse13(header) {
66441
+ function parse14(header) {
66194
66442
  const offers = /* @__PURE__ */ Object.create(null);
66195
66443
  let params = /* @__PURE__ */ Object.create(null);
66196
66444
  let mustUnescape = false;
@@ -66345,7 +66593,7 @@ var require_extension = __commonJS({
66345
66593
  }).join(", ");
66346
66594
  }).join(", ");
66347
66595
  }
66348
- module2.exports = { format: format3, parse: parse13 };
66596
+ module2.exports = { format: format3, parse: parse14 };
66349
66597
  }
66350
66598
  });
66351
66599
 
@@ -66379,7 +66627,7 @@ var require_websocket = __commonJS({
66379
66627
  var {
66380
66628
  EventTarget: { addEventListener, removeEventListener }
66381
66629
  } = require_event_target();
66382
- var { format: format3, parse: parse13 } = require_extension();
66630
+ var { format: format3, parse: parse14 } = require_extension();
66383
66631
  var { toBuffer } = require_buffer_util();
66384
66632
  var kAborted = Symbol("kAborted");
66385
66633
  var protocolVersions = [8, 13];
@@ -67069,7 +67317,7 @@ var require_websocket = __commonJS({
67069
67317
  }
67070
67318
  let extensions;
67071
67319
  try {
67072
- extensions = parse13(secWebSocketExtensions);
67320
+ extensions = parse14(secWebSocketExtensions);
67073
67321
  } catch (err2) {
67074
67322
  const message = "Invalid Sec-WebSocket-Extensions header";
67075
67323
  abortHandshake(websocket, socket, message);
@@ -67375,7 +67623,7 @@ var require_subprotocol = __commonJS({
67375
67623
  "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/subprotocol.js"(exports2, module2) {
67376
67624
  "use strict";
67377
67625
  var { tokenChars } = require_validation3();
67378
- function parse13(header) {
67626
+ function parse14(header) {
67379
67627
  const protocols = /* @__PURE__ */ new Set();
67380
67628
  let start = -1;
67381
67629
  let end = -1;
@@ -67414,7 +67662,7 @@ var require_subprotocol = __commonJS({
67414
67662
  protocols.add(protocol);
67415
67663
  return protocols;
67416
67664
  }
67417
- module2.exports = { parse: parse13 };
67665
+ module2.exports = { parse: parse14 };
67418
67666
  }
67419
67667
  });
67420
67668
 
@@ -84949,7 +85197,7 @@ var init_reconciler = __esm({
84949
85197
  import_react_reconciler = __toESM(require_react_reconciler(), 1);
84950
85198
  import_constants8 = __toESM(require_constants3(), 1);
84951
85199
  Scheduler = __toESM(require_scheduler(), 1);
84952
- await init_src4();
85200
+ await init_src5();
84953
85201
  import_react = __toESM(require_react(), 1);
84954
85202
  await init_dom();
84955
85203
  await init_styles();
@@ -85253,7 +85501,7 @@ var getMaxWidth, get_max_width_default;
85253
85501
  var init_get_max_width = __esm({
85254
85502
  async "node_modules/.pnpm/ink@6.8.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4/node_modules/ink/build/get-max-width.js"() {
85255
85503
  "use strict";
85256
- await init_src4();
85504
+ await init_src5();
85257
85505
  getMaxWidth = (yogaNode) => {
85258
85506
  return yogaNode.getComputedWidth() - yogaNode.getComputedPadding(src_default.EDGE_LEFT) - yogaNode.getComputedPadding(src_default.EDGE_RIGHT) - yogaNode.getComputedBorder(src_default.EDGE_LEFT) - yogaNode.getComputedBorder(src_default.EDGE_RIGHT);
85259
85507
  };
@@ -86035,7 +86283,7 @@ var init_render_node_to_output = __esm({
86035
86283
  "use strict";
86036
86284
  init_widest_line();
86037
86285
  init_indent_string();
86038
- await init_src4();
86286
+ await init_src5();
86039
86287
  init_wrap_text();
86040
86288
  await init_get_max_width();
86041
86289
  init_squash_text_nodes();
@@ -88307,7 +88555,7 @@ var init_App = __esm({
88307
88555
  });
88308
88556
 
88309
88557
  // node_modules/.pnpm/ink@6.8.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4/node_modules/ink/build/kitty-keyboard.js
88310
- function resolveFlags(flags) {
88558
+ function resolveFlags2(flags) {
88311
88559
  let result = 0;
88312
88560
  for (const flag of flags) {
88313
88561
  result |= kittyFlags[flag];
@@ -88352,7 +88600,7 @@ var init_ink = __esm({
88352
88600
  import_signal_exit2 = __toESM(require_signal_exit(), 1);
88353
88601
  init_dist6();
88354
88602
  import_constants9 = __toESM(require_constants3(), 1);
88355
- await init_src4();
88603
+ await init_src5();
88356
88604
  init_wrap_ansi();
88357
88605
  init_terminal_size();
88358
88606
  init_utils();
@@ -88900,7 +89148,7 @@ var init_ink = __esm({
88900
89148
  stdout.write("\x1B[?u");
88901
89149
  }
88902
89150
  enableKittyProtocol(flags) {
88903
- this.options.stdout.write(`\x1B[>${resolveFlags(flags)}u`);
89151
+ this.options.stdout.write(`\x1B[>${resolveFlags2(flags)}u`);
88904
89152
  this.kittyProtocolEnabled = true;
88905
89153
  }
88906
89154
  };
@@ -88969,7 +89217,7 @@ var import_constants10;
88969
89217
  var init_render_to_string = __esm({
88970
89218
  async "node_modules/.pnpm/ink@6.8.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4/node_modules/ink/build/render-to-string.js"() {
88971
89219
  "use strict";
88972
- await init_src4();
89220
+ await init_src5();
88973
89221
  import_constants10 = __toESM(require_constants3(), 1);
88974
89222
  await init_reconciler();
88975
89223
  await init_renderer();
@@ -90543,7 +90791,7 @@ var CONSENT_STATE_KEY, LEGACY_OPT_OUT_KEY;
90543
90791
  var init_persistence = __esm({
90544
90792
  "apps/cli/src/services/consent/persistence.ts"() {
90545
90793
  "use strict";
90546
- init_src3();
90794
+ init_src4();
90547
90795
  init_cli_logs();
90548
90796
  CONSENT_STATE_KEY = "consent.state";
90549
90797
  LEGACY_OPT_OUT_KEY = "telemetry.optOut";
@@ -90608,7 +90856,7 @@ function createCliPromptConsentProvider(deps) {
90608
90856
  var init_cli_prompt_consent_provider = __esm({
90609
90857
  async "apps/cli/src/services/consent/cli-prompt-consent-provider.ts"() {
90610
90858
  "use strict";
90611
- init_src3();
90859
+ init_src4();
90612
90860
  await init_consent_runner();
90613
90861
  init_persistence();
90614
90862
  }
@@ -90647,7 +90895,7 @@ var TRUTHY;
90647
90895
  var init_gate = __esm({
90648
90896
  "apps/cli/src/services/consent/gate.ts"() {
90649
90897
  "use strict";
90650
- init_src3();
90898
+ init_src4();
90651
90899
  TRUTHY = /* @__PURE__ */ new Set(["1", "true", "yes", "on"]);
90652
90900
  }
90653
90901
  });
@@ -92264,7 +92512,7 @@ var init_api_client = __esm({
92264
92512
  "apps/cli/src/services/api-client.ts"() {
92265
92513
  "use strict";
92266
92514
  init_zod();
92267
- init_src2();
92515
+ init_src3();
92268
92516
  opsContractsRuntime2 = src_exports;
92269
92517
  opsContracts2 = opsContractsRuntime2.default ?? opsContractsRuntime2;
92270
92518
  ({
@@ -97294,7 +97542,7 @@ async function runSkillsDownload(options) {
97294
97542
  { code: TELEMETRY_ERROR_CODES.PREREQUISITE_MISSING }
97295
97543
  );
97296
97544
  }
97297
- if (project.clerkOrgId !== auth2.clerkOrgId) {
97545
+ if (project.clerkOrgId !== void 0 && project.clerkOrgId !== auth2.clerkOrgId) {
97298
97546
  throw Object.assign(
97299
97547
  new Error(
97300
97548
  "This directory has a hosted Intelligence project selected for a different organization. Run `copilotkit project select` in this directory, then re-run `copilotkit skills download`."
@@ -99621,7 +99869,7 @@ var init_usage = __esm({
99621
99869
  });
99622
99870
 
99623
99871
  // libs/app-api-contracts/src/index.ts
99624
- var init_src5 = __esm({
99872
+ var init_src6 = __esm({
99625
99873
  "libs/app-api-contracts/src/index.ts"() {
99626
99874
  "use strict";
99627
99875
  init_channels();
@@ -99676,7 +99924,7 @@ var projectIdSchema, candidateIdSchema;
99676
99924
  var init_learning_api_validation = __esm({
99677
99925
  "apps/cli/src/services/learning-api-validation.ts"() {
99678
99926
  "use strict";
99679
- init_src5();
99927
+ init_src6();
99680
99928
  init_zod();
99681
99929
  init_event_properties();
99682
99930
  projectIdSchema = external_exports.string().regex(/^[1-9]\d*$/u);
@@ -99746,7 +99994,7 @@ var insightsResponseSchema, candidatesResponseSchema, candidateResponseSchema, r
99746
99994
  var init_learning_insights_api = __esm({
99747
99995
  "apps/cli/src/services/learning-insights-api.ts"() {
99748
99996
  "use strict";
99749
- init_src5();
99997
+ init_src6();
99750
99998
  init_zod();
99751
99999
  init_learning_api_validation();
99752
100000
  init_event_properties();
@@ -99778,7 +100026,7 @@ async function loadLearningCommandContext() {
99778
100026
  TELEMETRY_ERROR_CODES.PREREQUISITE_MISSING
99779
100027
  );
99780
100028
  }
99781
- if (project.clerkOrgId !== auth2.clerkOrgId) {
100029
+ if (project.clerkOrgId !== void 0 && project.clerkOrgId !== auth2.clerkOrgId) {
99782
100030
  throw tagError(
99783
100031
  new Error(
99784
100032
  "This directory has a hosted Intelligence project selected for a different organization. Run `copilotkit project select` here, then re-run the Learning command."
@@ -100286,7 +100534,7 @@ var containerResponseSchema;
100286
100534
  var init_learning_containers_api = __esm({
100287
100535
  "apps/cli/src/services/learning-containers-api.ts"() {
100288
100536
  "use strict";
100289
- init_src5();
100537
+ init_src6();
100290
100538
  init_zod();
100291
100539
  init_learning_api_validation();
100292
100540
  init_event_properties();
@@ -100550,7 +100798,7 @@ var import_react41, import_jsx_runtime11;
100550
100798
  var init_learning_container_prompts = __esm({
100551
100799
  async "apps/cli/src/ui/learning-container-prompts.tsx"() {
100552
100800
  "use strict";
100553
- init_src5();
100801
+ init_src6();
100554
100802
  await init_build2();
100555
100803
  await init_build4();
100556
100804
  import_react41 = __toESM(require_react(), 1);
@@ -101096,7 +101344,7 @@ var import_react42;
101096
101344
  var init_learning_containers = __esm({
101097
101345
  async "apps/cli/src/commands/learning-containers.ts"() {
101098
101346
  "use strict";
101099
- init_src5();
101347
+ init_src6();
101100
101348
  init_learning_containers_api();
101101
101349
  init_learning_command_context();
101102
101350
  init_learning_default_container();
@@ -101264,7 +101512,7 @@ var init_schemas3 = __esm({
101264
101512
  });
101265
101513
 
101266
101514
  // libs/import-contracts/src/index.ts
101267
- var init_src6 = __esm({
101515
+ var init_src7 = __esm({
101268
101516
  "libs/import-contracts/src/index.ts"() {
101269
101517
  "use strict";
101270
101518
  init_schemas3();
@@ -101483,8 +101731,9 @@ function projectSelectedCheck(resolution) {
101483
101731
  title: "A hosted project is selected"
101484
101732
  };
101485
101733
  }
101734
+ const organization = resolution.config.clerkOrgId === void 0 ? "" : ` in organization ${resolution.config.clerkOrgId}`;
101486
101735
  return {
101487
- detail: `Project ${resolution.config.projectSlug} (id ${resolution.config.projectId}) in organization ${resolution.config.clerkOrgId}, recorded in ${resolution.dir}.`,
101736
+ detail: `Project ${resolution.config.projectSlug} (id ${resolution.config.projectId})${organization}, recorded in ${resolution.dir}.`,
101488
101737
  id: "project_selected",
101489
101738
  status: "pass",
101490
101739
  title: "A hosted project is selected"
@@ -102258,7 +102507,7 @@ var IMPORT_PARSE_OPTIONS, DEFAULT_MAX_BYTES, UNRECOVERABLE_VALUES;
102258
102507
  var init_import_config = __esm({
102259
102508
  "apps/cli/src/services/import-config.ts"() {
102260
102509
  "use strict";
102261
- init_src6();
102510
+ init_src7();
102262
102511
  init_event_properties();
102263
102512
  init_verify_checks();
102264
102513
  IMPORT_PARSE_OPTIONS = {
@@ -102757,7 +103006,7 @@ var MAX_CONVERSATIONS_PER_CHUNK, realSleep, DEFAULT_BACKOFF_SECONDS, MAX_CHUNK_R
102757
103006
  var init_import_runner = __esm({
102758
103007
  "apps/cli/src/services/import-runner.ts"() {
102759
103008
  "use strict";
102760
- init_src6();
103009
+ init_src7();
102761
103010
  init_import_client();
102762
103011
  MAX_CONVERSATIONS_PER_CHUNK = 500;
102763
103012
  realSleep = (ms) => new Promise((resolve9) => {
@@ -109546,7 +109795,7 @@ var require_ms = __commonJS({
109546
109795
  options = options || {};
109547
109796
  var type2 = typeof val;
109548
109797
  if (type2 === "string" && val.length > 0) {
109549
- return parse13(val);
109798
+ return parse14(val);
109550
109799
  } else if (type2 === "number" && isFinite(val)) {
109551
109800
  return options.long ? fmtLong(val) : fmtShort(val);
109552
109801
  }
@@ -109554,7 +109803,7 @@ var require_ms = __commonJS({
109554
109803
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
109555
109804
  );
109556
109805
  };
109557
- function parse13(str2) {
109806
+ function parse14(str2) {
109558
109807
  str2 = String(str2);
109559
109808
  if (str2.length > 100) {
109560
109809
  return;
@@ -110103,7 +110352,7 @@ var require_fecha_umd = __commonJS({
110103
110352
  return literals.shift();
110104
110353
  });
110105
110354
  };
110106
- function parse13(dateStr, format4, i18n) {
110355
+ function parse14(dateStr, format4, i18n) {
110107
110356
  if (i18n === void 0) {
110108
110357
  i18n = {};
110109
110358
  }
@@ -110198,7 +110447,7 @@ var require_fecha_umd = __commonJS({
110198
110447
  }
110199
110448
  var fecha = {
110200
110449
  format: format3,
110201
- parse: parse13,
110450
+ parse: parse14,
110202
110451
  defaultI18n,
110203
110452
  setGlobalDateI18n,
110204
110453
  setGlobalDateMasks
@@ -110206,7 +110455,7 @@ var require_fecha_umd = __commonJS({
110206
110455
  exports3.assign = assign2;
110207
110456
  exports3.default = fecha;
110208
110457
  exports3.format = format3;
110209
- exports3.parse = parse13;
110458
+ exports3.parse = parse14;
110210
110459
  exports3.defaultI18n = defaultI18n;
110211
110460
  exports3.setGlobalDateI18n = setGlobalDateI18n;
110212
110461
  exports3.setGlobalDateMasks = setGlobalDateMasks;
@@ -128411,7 +128660,7 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
128411
128660
  });
128412
128661
  }
128413
128662
  var supportedSchemas;
128414
- var init_src7 = __esm({
128663
+ var init_src8 = __esm({
128415
128664
  "node_modules/.pnpm/node-fetch@3.3.2/node_modules/node-fetch/src/index.js"() {
128416
128665
  "use strict";
128417
128666
  init_dist10();
@@ -128869,7 +129118,7 @@ Content-Type: ${partContentType}\r
128869
129118
  }
128870
129119
  static async #getFetch() {
128871
129120
  const hasWindow = typeof window !== "undefined" && !!window;
128872
- this.#fetch ||= hasWindow ? window.fetch : (await Promise.resolve().then(() => (init_src7(), src_exports2))).default;
129121
+ this.#fetch ||= hasWindow ? window.fetch : (await Promise.resolve().then(() => (init_src8(), src_exports2))).default;
128873
129122
  return this.#fetch;
128874
129123
  }
128875
129124
  /**
@@ -140861,7 +141110,7 @@ var require_extension2 = __commonJS({
140861
141110
  else
140862
141111
  dest[name].push(elem);
140863
141112
  }
140864
- function parse13(header) {
141113
+ function parse14(header) {
140865
141114
  const offers = /* @__PURE__ */ Object.create(null);
140866
141115
  let params = /* @__PURE__ */ Object.create(null);
140867
141116
  let mustUnescape = false;
@@ -141016,7 +141265,7 @@ var require_extension2 = __commonJS({
141016
141265
  }).join(", ");
141017
141266
  }).join(", ");
141018
141267
  }
141019
- module2.exports = { format: format3, parse: parse13 };
141268
+ module2.exports = { format: format3, parse: parse14 };
141020
141269
  }
141021
141270
  });
141022
141271
 
@@ -141050,7 +141299,7 @@ var require_websocket2 = __commonJS({
141050
141299
  var {
141051
141300
  EventTarget: { addEventListener, removeEventListener }
141052
141301
  } = require_event_target2();
141053
- var { format: format3, parse: parse13 } = require_extension2();
141302
+ var { format: format3, parse: parse14 } = require_extension2();
141054
141303
  var { toBuffer } = require_buffer_util2();
141055
141304
  var kAborted = Symbol("kAborted");
141056
141305
  var protocolVersions = [8, 13];
@@ -141748,7 +141997,7 @@ var require_websocket2 = __commonJS({
141748
141997
  }
141749
141998
  let extensions;
141750
141999
  try {
141751
- extensions = parse13(secWebSocketExtensions);
142000
+ extensions = parse14(secWebSocketExtensions);
141752
142001
  } catch (err2) {
141753
142002
  const message = "Invalid Sec-WebSocket-Extensions header";
141754
142003
  abortHandshake(websocket, socket, message);
@@ -142056,7 +142305,7 @@ var require_subprotocol2 = __commonJS({
142056
142305
  "node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js"(exports2, module2) {
142057
142306
  "use strict";
142058
142307
  var { tokenChars } = require_validation4();
142059
- function parse13(header) {
142308
+ function parse14(header) {
142060
142309
  const protocols = /* @__PURE__ */ new Set();
142061
142310
  let start = -1;
142062
142311
  let end = -1;
@@ -142095,7 +142344,7 @@ var require_subprotocol2 = __commonJS({
142095
142344
  protocols.add(protocol);
142096
142345
  return protocols;
142097
142346
  }
142098
- module2.exports = { parse: parse13 };
142347
+ module2.exports = { parse: parse14 };
142099
142348
  }
142100
142349
  });
142101
142350
 
@@ -187333,7 +187582,7 @@ var init_apigee_llm = __esm({
187333
187582
  // node_modules/.pnpm/@google+adk@1.3.0_@bufbuild+protobuf@2.12.1_@cfworker+json-schema@4.1.1_@grpc+grpc-js@1.14.4__5mkmwgy3xddtjib6vsxkdydt4e/node_modules/@google/adk/dist/esm/models/registry.js
187334
187583
  import { createRequire as topLevelCreateRequire40 } from "module";
187335
187584
  var require41, LRUCache, _LLMRegistry, LLMRegistry;
187336
- var init_registry = __esm({
187585
+ var init_registry2 = __esm({
187337
187586
  "node_modules/.pnpm/@google+adk@1.3.0_@bufbuild+protobuf@2.12.1_@cfworker+json-schema@4.1.1_@grpc+grpc-js@1.14.4__5mkmwgy3xddtjib6vsxkdydt4e/node_modules/@google/adk/dist/esm/models/registry.js"() {
187338
187587
  "use strict";
187339
187588
  init_logger();
@@ -189758,7 +190007,7 @@ var init_llm_agent = __esm({
189758
190007
  init_function_tool();
189759
190008
  init_event();
189760
190009
  init_base_llm();
189761
- init_registry();
190010
+ init_registry2();
189762
190011
  init_base_tool();
189763
190012
  init_logger();
189764
190013
  init_context3();
@@ -191795,7 +192044,7 @@ var require_bytes = __commonJS({
191795
192044
  "use strict";
191796
192045
  module2.exports = bytes;
191797
192046
  module2.exports.format = format3;
191798
- module2.exports.parse = parse13;
192047
+ module2.exports.parse = parse14;
191799
192048
  var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
191800
192049
  var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
191801
192050
  var map4 = {
@@ -191809,7 +192058,7 @@ var require_bytes = __commonJS({
191809
192058
  var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;
191810
192059
  function bytes(value, options) {
191811
192060
  if (typeof value === "string") {
191812
- return parse13(value);
192061
+ return parse14(value);
191813
192062
  }
191814
192063
  if (typeof value === "number") {
191815
192064
  return format3(value, options);
@@ -191853,7 +192102,7 @@ var require_bytes = __commonJS({
191853
192102
  }
191854
192103
  return str2 + unitSeparator + unit;
191855
192104
  }
191856
- function parse13(val) {
192105
+ function parse14(val) {
191857
192106
  if (typeof val === "number" && !isNaN(val)) {
191858
192107
  return val;
191859
192108
  }
@@ -191889,7 +192138,7 @@ var require_content_type = __commonJS({
191889
192138
  var QUOTE_REGEXP = /([\\"])/g;
191890
192139
  var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
191891
192140
  exports2.format = format3;
191892
- exports2.parse = parse13;
192141
+ exports2.parse = parse14;
191893
192142
  function format3(obj) {
191894
192143
  if (!obj || typeof obj !== "object") {
191895
192144
  throw new TypeError("argument obj is required");
@@ -191913,7 +192162,7 @@ var require_content_type = __commonJS({
191913
192162
  }
191914
192163
  return string7;
191915
192164
  }
191916
- function parse13(string7) {
192165
+ function parse14(string7) {
191917
192166
  if (!string7) {
191918
192167
  throw new TypeError("argument string is required");
191919
192168
  }
@@ -192334,7 +192583,7 @@ var require_ms3 = __commonJS({
192334
192583
  options = options || {};
192335
192584
  var type2 = typeof val;
192336
192585
  if (type2 === "string" && val.length > 0) {
192337
- return parse13(val);
192586
+ return parse14(val);
192338
192587
  } else if (type2 === "number" && isNaN(val) === false) {
192339
192588
  return options.long ? fmtLong(val) : fmtShort(val);
192340
192589
  }
@@ -192342,7 +192591,7 @@ var require_ms3 = __commonJS({
192342
192591
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
192343
192592
  );
192344
192593
  };
192345
- function parse13(str2) {
192594
+ function parse14(str2) {
192346
192595
  str2 = String(str2);
192347
192596
  if (str2.length > 100) {
192348
192597
  return;
@@ -196707,7 +196956,7 @@ var require_read = __commonJS({
196707
196956
  var unpipe = require_unpipe();
196708
196957
  var zlib3 = __require("zlib");
196709
196958
  module2.exports = read;
196710
- function read(req, res, next, parse13, debug, options) {
196959
+ function read(req, res, next, parse14, debug, options) {
196711
196960
  var length;
196712
196961
  var opts = options;
196713
196962
  var stream;
@@ -196766,7 +197015,7 @@ var require_read = __commonJS({
196766
197015
  try {
196767
197016
  debug("parse body");
196768
197017
  str2 = typeof body !== "string" && encoding !== null ? iconv.decode(body, encoding) : body;
196769
- req.body = parse13(str2);
197018
+ req.body = parse14(str2);
196770
197019
  } catch (err2) {
196771
197020
  next(createError(400, err2, {
196772
197021
  body: str2,
@@ -196835,7 +197084,7 @@ var require_media_typer = __commonJS({
196835
197084
  var typeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/;
196836
197085
  var typeRegExp = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;
196837
197086
  exports2.format = format3;
196838
- exports2.parse = parse13;
197087
+ exports2.parse = parse14;
196839
197088
  function format3(obj) {
196840
197089
  if (!obj || typeof obj !== "object") {
196841
197090
  throw new TypeError("argument obj is required");
@@ -196870,7 +197119,7 @@ var require_media_typer = __commonJS({
196870
197119
  }
196871
197120
  return string7;
196872
197121
  }
196873
- function parse13(string7) {
197122
+ function parse14(string7) {
196874
197123
  if (!string7) {
196875
197124
  throw new TypeError("argument string is required");
196876
197125
  }
@@ -205702,7 +205951,7 @@ var require_json2 = __commonJS({
205702
205951
  throw new TypeError("option verify must be function");
205703
205952
  }
205704
205953
  var shouldParse = typeof type2 !== "function" ? typeChecker(type2) : type2;
205705
- function parse13(body) {
205954
+ function parse14(body) {
205706
205955
  if (body.length === 0) {
205707
205956
  return {};
205708
205957
  }
@@ -205750,7 +205999,7 @@ var require_json2 = __commonJS({
205750
205999
  }));
205751
206000
  return;
205752
206001
  }
205753
- read(req, res, next, parse13, debug, {
206002
+ read(req, res, next, parse14, debug, {
205754
206003
  encoding: charset,
205755
206004
  inflate,
205756
206005
  limit,
@@ -205829,7 +206078,7 @@ var require_raw = __commonJS({
205829
206078
  throw new TypeError("option verify must be function");
205830
206079
  }
205831
206080
  var shouldParse = typeof type2 !== "function" ? typeChecker(type2) : type2;
205832
- function parse13(buf) {
206081
+ function parse14(buf) {
205833
206082
  return buf;
205834
206083
  }
205835
206084
  return function rawParser(req, res, next) {
@@ -205850,7 +206099,7 @@ var require_raw = __commonJS({
205850
206099
  next();
205851
206100
  return;
205852
206101
  }
205853
- read(req, res, next, parse13, debug, {
206102
+ read(req, res, next, parse14, debug, {
205854
206103
  encoding: null,
205855
206104
  inflate,
205856
206105
  limit,
@@ -205887,7 +206136,7 @@ var require_text = __commonJS({
205887
206136
  throw new TypeError("option verify must be function");
205888
206137
  }
205889
206138
  var shouldParse = typeof type2 !== "function" ? typeChecker(type2) : type2;
205890
- function parse13(buf) {
206139
+ function parse14(buf) {
205891
206140
  return buf;
205892
206141
  }
205893
206142
  return function textParser(req, res, next) {
@@ -205909,7 +206158,7 @@ var require_text = __commonJS({
205909
206158
  return;
205910
206159
  }
205911
206160
  var charset = getCharset(req) || defaultCharset;
205912
- read(req, res, next, parse13, debug, {
206161
+ read(req, res, next, parse14, debug, {
205913
206162
  encoding: charset,
205914
206163
  inflate,
205915
206164
  limit,
@@ -208433,11 +208682,11 @@ var require_lib2 = __commonJS({
208433
208682
  "node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/index.js"(exports2, module2) {
208434
208683
  "use strict";
208435
208684
  var stringify4 = require_stringify2();
208436
- var parse13 = require_parse3();
208685
+ var parse14 = require_parse3();
208437
208686
  var formats = require_formats2();
208438
208687
  module2.exports = {
208439
208688
  formats,
208440
- parse: parse13,
208689
+ parse: parse14,
208441
208690
  stringify: stringify4
208442
208691
  };
208443
208692
  }
@@ -208471,7 +208720,7 @@ var require_urlencoded = __commonJS({
208471
208720
  }
208472
208721
  var queryparse = extended ? extendedparser(opts) : simpleparser(opts);
208473
208722
  var shouldParse = typeof type2 !== "function" ? typeChecker(type2) : type2;
208474
- function parse13(body) {
208723
+ function parse14(body) {
208475
208724
  return body.length ? queryparse(body) : {};
208476
208725
  }
208477
208726
  return function urlencodedParser(req, res, next) {
@@ -208501,7 +208750,7 @@ var require_urlencoded = __commonJS({
208501
208750
  }));
208502
208751
  return;
208503
208752
  }
208504
- read(req, res, next, parse13, debug, {
208753
+ read(req, res, next, parse14, debug, {
208505
208754
  debug,
208506
208755
  encoding: charset,
208507
208756
  inflate,
@@ -208513,7 +208762,7 @@ var require_urlencoded = __commonJS({
208513
208762
  function extendedparser(options) {
208514
208763
  var parameterLimit = options.parameterLimit !== void 0 ? options.parameterLimit : 1e3;
208515
208764
  var depth = options.depth !== void 0 ? options.depth : 32;
208516
- var parse13 = parser("qs");
208765
+ var parse14 = parser("qs");
208517
208766
  if (isNaN(parameterLimit) || parameterLimit < 1) {
208518
208767
  throw new TypeError("option parameterLimit must be a positive number");
208519
208768
  }
@@ -208534,7 +208783,7 @@ var require_urlencoded = __commonJS({
208534
208783
  var arrayLimit = Math.max(100, paramCount);
208535
208784
  debug("parse extended urlencoding");
208536
208785
  try {
208537
- return parse13(body, {
208786
+ return parse14(body, {
208538
208787
  allowPrototypes: true,
208539
208788
  arrayLimit,
208540
208789
  depth,
@@ -208589,7 +208838,7 @@ var require_urlencoded = __commonJS({
208589
208838
  }
208590
208839
  function simpleparser(options) {
208591
208840
  var parameterLimit = options.parameterLimit !== void 0 ? options.parameterLimit : 1e3;
208592
- var parse13 = parser("querystring");
208841
+ var parse14 = parser("querystring");
208593
208842
  if (isNaN(parameterLimit) || parameterLimit < 1) {
208594
208843
  throw new TypeError("option parameterLimit must be a positive number");
208595
208844
  }
@@ -208605,7 +208854,7 @@ var require_urlencoded = __commonJS({
208605
208854
  });
208606
208855
  }
208607
208856
  debug("parse urlencoding");
208608
- return parse13(body, void 0, void 0, { maxKeys: parameterLimit });
208857
+ return parse14(body, void 0, void 0, { maxKeys: parameterLimit });
208609
208858
  };
208610
208859
  }
208611
208860
  function typeChecker(type2) {
@@ -208788,7 +209037,7 @@ var require_parseurl = __commonJS({
208788
209037
  "node_modules/.pnpm/parseurl@1.3.3/node_modules/parseurl/index.js"(exports2, module2) {
208789
209038
  "use strict";
208790
209039
  var url4 = __require("url");
208791
- var parse13 = url4.parse;
209040
+ var parse14 = url4.parse;
208792
209041
  var Url = url4.Url;
208793
209042
  module2.exports = parseurl;
208794
209043
  module2.exports.original = originalurl;
@@ -208820,7 +209069,7 @@ var require_parseurl = __commonJS({
208820
209069
  }
208821
209070
  function fastparse(str2) {
208822
209071
  if (typeof str2 !== "string" || str2.charCodeAt(0) !== 47) {
208823
- return parse13(str2);
209072
+ return parse14(str2);
208824
209073
  }
208825
209074
  var pathname = str2;
208826
209075
  var query = null;
@@ -208842,7 +209091,7 @@ var require_parseurl = __commonJS({
208842
209091
  case 35:
208843
209092
  case 160:
208844
209093
  case 65279:
208845
- return parse13(str2);
209094
+ return parse14(str2);
208846
209095
  }
208847
209096
  }
208848
209097
  var url5 = Url !== void 0 ? new Url() : {};
@@ -209865,7 +210114,7 @@ var require_view = __commonJS({
209865
210114
  var debug = require_src6()("express:view");
209866
210115
  var path47 = __require("path");
209867
210116
  var fs39 = __require("fs");
209868
- var dirname16 = path47.dirname;
210117
+ var dirname17 = path47.dirname;
209869
210118
  var basename7 = path47.basename;
209870
210119
  var extname4 = path47.extname;
209871
210120
  var join37 = path47.join;
@@ -209904,7 +210153,7 @@ var require_view = __commonJS({
209904
210153
  for (var i2 = 0; i2 < roots.length && !path48; i2++) {
209905
210154
  var root2 = roots[i2];
209906
210155
  var loc = resolve9(root2, name);
209907
- var dir = dirname16(loc);
210156
+ var dir = dirname17(loc);
209908
210157
  var file3 = basename7(loc);
209909
210158
  path48 = this.resolve(dir, file3);
209910
210159
  }
@@ -209943,7 +210192,7 @@ var require_content_disposition = __commonJS({
209943
210192
  "node_modules/.pnpm/content-disposition@0.5.4/node_modules/content-disposition/index.js"(exports2, module2) {
209944
210193
  "use strict";
209945
210194
  module2.exports = contentDisposition;
209946
- module2.exports.parse = parse13;
210195
+ module2.exports.parse = parse14;
209947
210196
  var basename7 = __require("path").basename;
209948
210197
  var Buffer8 = require_safe_buffer().Buffer;
209949
210198
  var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g;
@@ -210034,7 +210283,7 @@ var require_content_disposition = __commonJS({
210034
210283
  function getlatin1(val) {
210035
210284
  return String(val).replace(NON_LATIN1_REGEXP, "?");
210036
210285
  }
210037
- function parse13(string7) {
210286
+ function parse14(string7) {
210038
210287
  if (!string7 || typeof string7 !== "string") {
210039
210288
  throw new TypeError("argument string is required");
210040
210289
  }
@@ -210922,7 +211171,7 @@ var require_forwarded = __commonJS({
210922
211171
  if (!req) {
210923
211172
  throw new TypeError("argument req is required");
210924
211173
  }
210925
- var proxyAddrs = parse13(req.headers["x-forwarded-for"] || "");
211174
+ var proxyAddrs = parse14(req.headers["x-forwarded-for"] || "");
210926
211175
  var socketAddr = getSocketAddr(req);
210927
211176
  var addrs = [socketAddr].concat(proxyAddrs);
210928
211177
  return addrs;
@@ -210930,7 +211179,7 @@ var require_forwarded = __commonJS({
210930
211179
  function getSocketAddr(req) {
210931
211180
  return req.socket ? req.socket.remoteAddress : req.connection.remoteAddress;
210932
211181
  }
210933
- function parse13(header) {
211182
+ function parse14(header) {
210934
211183
  var end = header.length;
210935
211184
  var list = [];
210936
211185
  var start = header.length;
@@ -212759,7 +213008,7 @@ var require_request = __commonJS({
212759
213008
  var http4 = __require("http");
212760
213009
  var fresh = require_fresh();
212761
213010
  var parseRange = require_range_parser();
212762
- var parse13 = require_parseurl();
213011
+ var parse14 = require_parseurl();
212763
213012
  var proxyaddr = require_proxy_addr();
212764
213013
  var req = Object.create(http4.IncomingMessage.prototype);
212765
213014
  module2.exports = req;
@@ -212869,7 +213118,7 @@ var require_request = __commonJS({
212869
213118
  return subdomains2.slice(offset);
212870
213119
  });
212871
213120
  defineGetter(req, "path", function path47() {
212872
- return parse13(this).pathname;
213121
+ return parse14(this).pathname;
212873
213122
  });
212874
213123
  defineGetter(req, "hostname", function hostname5() {
212875
213124
  var trust = this.app.get("trust proxy fn");
@@ -212949,7 +213198,7 @@ var require_cookie_signature = __commonJS({
212949
213198
  var require_cookie = __commonJS({
212950
213199
  "node_modules/.pnpm/cookie@0.7.2/node_modules/cookie/index.js"(exports2) {
212951
213200
  "use strict";
212952
- exports2.parse = parse13;
213201
+ exports2.parse = parse14;
212953
213202
  exports2.serialize = serialize3;
212954
213203
  var __toString = Object.prototype.toString;
212955
213204
  var __hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -212957,7 +213206,7 @@ var require_cookie = __commonJS({
212957
213206
  var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/;
212958
213207
  var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
212959
213208
  var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
212960
- function parse13(str2, opt) {
213209
+ function parse14(str2, opt) {
212961
213210
  if (typeof str2 !== "string") {
212962
213211
  throw new TypeError("argument str must be a string");
212963
213212
  }
@@ -213130,7 +213379,7 @@ var require_vary = __commonJS({
213130
213379
  if (!field) {
213131
213380
  throw new TypeError("field argument is required");
213132
213381
  }
213133
- var fields = !Array.isArray(field) ? parse13(String(field)) : field;
213382
+ var fields = !Array.isArray(field) ? parse14(String(field)) : field;
213134
213383
  for (var j = 0; j < fields.length; j++) {
213135
213384
  if (!FIELD_NAME_REGEXP.test(fields[j])) {
213136
213385
  throw new TypeError("field argument contains an invalid header name");
@@ -213140,7 +213389,7 @@ var require_vary = __commonJS({
213140
213389
  return header;
213141
213390
  }
213142
213391
  var val = header;
213143
- var vals = parse13(header.toLowerCase());
213392
+ var vals = parse14(header.toLowerCase());
213144
213393
  if (fields.indexOf("*") !== -1 || vals.indexOf("*") !== -1) {
213145
213394
  return "*";
213146
213395
  }
@@ -213153,7 +213402,7 @@ var require_vary = __commonJS({
213153
213402
  }
213154
213403
  return val;
213155
213404
  }
213156
- function parse13(header) {
213405
+ function parse14(header) {
213157
213406
  var end = 0;
213158
213407
  var list = [];
213159
213408
  var start = 0;
@@ -243137,7 +243386,7 @@ var init_transfer_manager = __esm({
243137
243386
  });
243138
243387
 
243139
243388
  // node_modules/.pnpm/@google-cloud+storage@7.21.0_encoding@0.1.13/node_modules/@google-cloud/storage/build/esm/src/index.js
243140
- var init_src8 = __esm({
243389
+ var init_src9 = __esm({
243141
243390
  "node_modules/.pnpm/@google-cloud+storage@7.21.0_encoding@0.1.13/node_modules/@google-cloud/storage/build/esm/src/index.js"() {
243142
243391
  "use strict";
243143
243392
  init_nodejs_common();
@@ -243160,7 +243409,7 @@ var require83;
243160
243409
  var init_gcs_artifact_service = __esm({
243161
243410
  "node_modules/.pnpm/@google+adk@1.3.0_@bufbuild+protobuf@2.12.1_@cfworker+json-schema@4.1.1_@grpc+grpc-js@1.14.4__5mkmwgy3xddtjib6vsxkdydt4e/node_modules/@google/adk/dist/esm/artifacts/gcs_artifact_service.js"() {
243162
243411
  "use strict";
243163
- init_src8();
243412
+ init_src9();
243164
243413
  init_node3();
243165
243414
  init_logger();
243166
243415
  require83 = topLevelCreateRequire82(import.meta.url);
@@ -243180,7 +243429,7 @@ var init_in_memory_artifact_service = __esm({
243180
243429
  // node_modules/.pnpm/@google+adk@1.3.0_@bufbuild+protobuf@2.12.1_@cfworker+json-schema@4.1.1_@grpc+grpc-js@1.14.4__5mkmwgy3xddtjib6vsxkdydt4e/node_modules/@google/adk/dist/esm/artifacts/registry.js
243181
243430
  import { createRequire as topLevelCreateRequire84 } from "module";
243182
243431
  var require85;
243183
- var init_registry2 = __esm({
243432
+ var init_registry3 = __esm({
243184
243433
  "node_modules/.pnpm/@google+adk@1.3.0_@bufbuild+protobuf@2.12.1_@cfworker+json-schema@4.1.1_@grpc+grpc-js@1.14.4__5mkmwgy3xddtjib6vsxkdydt4e/node_modules/@google/adk/dist/esm/artifacts/registry.js"() {
243185
243434
  "use strict";
243186
243435
  init_file_artifact_service();
@@ -265580,7 +265829,7 @@ var init_common = __esm({
265580
265829
  init_apigee_llm();
265581
265830
  init_base_llm();
265582
265831
  init_google_llm();
265583
- init_registry();
265832
+ init_registry2();
265584
265833
  init_routed_llm();
265585
265834
  init_base_plugin();
265586
265835
  init_logging_plugin();
@@ -267350,7 +267599,7 @@ var require_parse4 = __commonJS({
267350
267599
  CHAR_NO_BREAK_SPACE,
267351
267600
  CHAR_ZERO_WIDTH_NOBREAK_SPACE
267352
267601
  } = require_constants8();
267353
- var parse13 = (input, options = {}) => {
267602
+ var parse14 = (input, options = {}) => {
267354
267603
  if (typeof input !== "string") {
267355
267604
  throw new TypeError("Expected a string");
267356
267605
  }
@@ -267554,7 +267803,7 @@ var require_parse4 = __commonJS({
267554
267803
  push2({ type: "eos" });
267555
267804
  return ast;
267556
267805
  };
267557
- module2.exports = parse13;
267806
+ module2.exports = parse14;
267558
267807
  }
267559
267808
  });
267560
267809
 
@@ -267565,7 +267814,7 @@ var require_braces = __commonJS({
267565
267814
  var stringify4 = require_stringify3();
267566
267815
  var compile = require_compile2();
267567
267816
  var expand = require_expand();
267568
- var parse13 = require_parse4();
267817
+ var parse14 = require_parse4();
267569
267818
  var braces = (input, options = {}) => {
267570
267819
  let output = [];
267571
267820
  if (Array.isArray(input)) {
@@ -267585,7 +267834,7 @@ var require_braces = __commonJS({
267585
267834
  }
267586
267835
  return output;
267587
267836
  };
267588
- braces.parse = (input, options = {}) => parse13(input, options);
267837
+ braces.parse = (input, options = {}) => parse14(input, options);
267589
267838
  braces.stringify = (input, options = {}) => {
267590
267839
  if (typeof input === "string") {
267591
267840
  return stringify4(braces.parse(input, options), options);
@@ -268243,7 +268492,7 @@ var require_parse5 = __commonJS({
268243
268492
  var syntaxError = (type2, char) => {
268244
268493
  return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`;
268245
268494
  };
268246
- var parse13 = (input, options) => {
268495
+ var parse14 = (input, options) => {
268247
268496
  if (typeof input !== "string") {
268248
268497
  throw new TypeError("Expected a string");
268249
268498
  }
@@ -268393,7 +268642,7 @@ var require_parse5 = __commonJS({
268393
268642
  output = token.close = `)$))${extglobStar}`;
268394
268643
  }
268395
268644
  if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
268396
- const expression = parse13(rest, { ...options, fastpaths: false }).output;
268645
+ const expression = parse14(rest, { ...options, fastpaths: false }).output;
268397
268646
  output = token.close = `)${expression})${extglobStar})`;
268398
268647
  }
268399
268648
  if (token.prev.type === "bos") {
@@ -268922,7 +269171,7 @@ var require_parse5 = __commonJS({
268922
269171
  }
268923
269172
  return state;
268924
269173
  };
268925
- parse13.fastpaths = (input, options) => {
269174
+ parse14.fastpaths = (input, options) => {
268926
269175
  const opts = { ...options };
268927
269176
  const max2 = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
268928
269177
  const len = input.length;
@@ -268991,7 +269240,7 @@ var require_parse5 = __commonJS({
268991
269240
  }
268992
269241
  return source;
268993
269242
  };
268994
- module2.exports = parse13;
269243
+ module2.exports = parse14;
268995
269244
  }
268996
269245
  });
268997
269246
 
@@ -269001,7 +269250,7 @@ var require_picomatch = __commonJS({
269001
269250
  "use strict";
269002
269251
  var path47 = __require("path");
269003
269252
  var scan = require_scan();
269004
- var parse13 = require_parse5();
269253
+ var parse14 = require_parse5();
269005
269254
  var utils = require_utils7();
269006
269255
  var constants3 = require_constants9();
269007
269256
  var isObject7 = (val) => val && typeof val === "object" && !Array.isArray(val);
@@ -269091,7 +269340,7 @@ var require_picomatch = __commonJS({
269091
269340
  picomatch.parse = (pattern, options) => {
269092
269341
  if (Array.isArray(pattern))
269093
269342
  return pattern.map((p2) => picomatch.parse(p2, options));
269094
- return parse13(pattern, { ...options, fastpaths: false });
269343
+ return parse14(pattern, { ...options, fastpaths: false });
269095
269344
  };
269096
269345
  picomatch.scan = (input, options) => scan(input, options);
269097
269346
  picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
@@ -269117,10 +269366,10 @@ var require_picomatch = __commonJS({
269117
269366
  }
269118
269367
  let parsed = { negated: false, fastpaths: true };
269119
269368
  if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
269120
- parsed.output = parse13.fastpaths(input, options);
269369
+ parsed.output = parse14.fastpaths(input, options);
269121
269370
  }
269122
269371
  if (!parsed.output) {
269123
- parsed = parse13(input, options);
269372
+ parsed = parse14(input, options);
269124
269373
  }
269125
269374
  return picomatch.compileRe(parsed, options, returnOutput, returnState);
269126
269375
  };
@@ -274748,7 +274997,7 @@ var require_esprima = __commonJS({
274748
274997
  var jsx_parser_1 = __webpack_require__(3);
274749
274998
  var parser_1 = __webpack_require__(8);
274750
274999
  var tokenizer_1 = __webpack_require__(15);
274751
- function parse13(code, options, delegate) {
275000
+ function parse14(code, options, delegate) {
274752
275001
  var commentHandler = null;
274753
275002
  var proxyDelegate = function(node, metadata) {
274754
275003
  if (delegate) {
@@ -274793,17 +275042,17 @@ var require_esprima = __commonJS({
274793
275042
  }
274794
275043
  return ast;
274795
275044
  }
274796
- exports3.parse = parse13;
275045
+ exports3.parse = parse14;
274797
275046
  function parseModule(code, options, delegate) {
274798
275047
  var parsingOptions = options || {};
274799
275048
  parsingOptions.sourceType = "module";
274800
- return parse13(code, parsingOptions, delegate);
275049
+ return parse14(code, parsingOptions, delegate);
274801
275050
  }
274802
275051
  exports3.parseModule = parseModule;
274803
275052
  function parseScript(code, options, delegate) {
274804
275053
  var parsingOptions = options || {};
274805
275054
  parsingOptions.sourceType = "script";
274806
- return parse13(code, parsingOptions, delegate);
275055
+ return parse14(code, parsingOptions, delegate);
274807
275056
  }
274808
275057
  exports3.parseScript = parseScript;
274809
275058
  function tokenize2(code, options, delegate) {
@@ -286644,7 +286893,7 @@ var require_main = __commonJS({
286644
286893
  return supportsAnsi() ? `\x1B[2m${text2}\x1B[0m` : text2;
286645
286894
  }
286646
286895
  var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
286647
- function parse13(src) {
286896
+ function parse14(src) {
286648
286897
  const obj = {};
286649
286898
  let lines = src.toString();
286650
286899
  lines = lines.replace(/\r\n?/mg, "\n");
@@ -286916,7 +287165,7 @@ var require_main = __commonJS({
286916
287165
  _parseVault,
286917
287166
  config: config3,
286918
287167
  decrypt,
286919
- parse: parse13,
287168
+ parse: parse14,
286920
287169
  populate
286921
287170
  };
286922
287171
  module2.exports.configDotenv = DotenvModule.configDotenv;
@@ -302791,7 +303040,7 @@ var init_vertex_ai_session_service = __esm({
302791
303040
  // node_modules/.pnpm/@google+adk@1.3.0_@bufbuild+protobuf@2.12.1_@cfworker+json-schema@4.1.1_@grpc+grpc-js@1.14.4__5mkmwgy3xddtjib6vsxkdydt4e/node_modules/@google/adk/dist/esm/sessions/registry.js
302792
303041
  import { createRequire as topLevelCreateRequire150 } from "module";
302793
303042
  var require151;
302794
- var init_registry3 = __esm({
303043
+ var init_registry4 = __esm({
302795
303044
  "node_modules/.pnpm/@google+adk@1.3.0_@bufbuild+protobuf@2.12.1_@cfworker+json-schema@4.1.1_@grpc+grpc-js@1.14.4__5mkmwgy3xddtjib6vsxkdydt4e/node_modules/@google/adk/dist/esm/sessions/registry.js"() {
302796
303045
  "use strict";
302797
303046
  init_database_session_service();
@@ -304761,7 +305010,7 @@ var require_parse6 = __commonJS({
304761
305010
  }
304762
305011
  return parsed;
304763
305012
  }
304764
- function parse13(command2, args, options) {
305013
+ function parse14(command2, args, options) {
304765
305014
  if (args && !Array.isArray(args)) {
304766
305015
  options = args;
304767
305016
  args = null;
@@ -304780,7 +305029,7 @@ var require_parse6 = __commonJS({
304780
305029
  };
304781
305030
  return options.shell ? parsed : parseNonShell(parsed);
304782
305031
  }
304783
- module2.exports = parse13;
305032
+ module2.exports = parse14;
304784
305033
  }
304785
305034
  });
304786
305035
 
@@ -304839,16 +305088,16 @@ var require_cross_spawn = __commonJS({
304839
305088
  "node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports2, module2) {
304840
305089
  "use strict";
304841
305090
  var cp = __require("child_process");
304842
- var parse13 = require_parse6();
305091
+ var parse14 = require_parse6();
304843
305092
  var enoent = require_enoent();
304844
305093
  function spawn6(command2, args, options) {
304845
- const parsed = parse13(command2, args, options);
305094
+ const parsed = parse14(command2, args, options);
304846
305095
  const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
304847
305096
  enoent.hookChildProcess(spawned, parsed);
304848
305097
  return spawned;
304849
305098
  }
304850
305099
  function spawnSync2(command2, args, options) {
304851
- const parsed = parse13(command2, args, options);
305100
+ const parsed = parse14(command2, args, options);
304852
305101
  const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
304853
305102
  result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
304854
305103
  return result;
@@ -304856,7 +305105,7 @@ var require_cross_spawn = __commonJS({
304856
305105
  module2.exports = spawn6;
304857
305106
  module2.exports.spawn = spawn6;
304858
305107
  module2.exports.sync = spawnSync2;
304859
- module2.exports._parse = parse13;
305108
+ module2.exports._parse = parse14;
304860
305109
  module2.exports._enoent = enoent;
304861
305110
  }
304862
305111
  });
@@ -311693,11 +311942,11 @@ var require_lib8 = __commonJS({
311693
311942
  "node_modules/.pnpm/qs@6.15.3/node_modules/qs/lib/index.js"(exports2, module2) {
311694
311943
  "use strict";
311695
311944
  var stringify4 = require_stringify4();
311696
- var parse13 = require_parse7();
311945
+ var parse14 = require_parse7();
311697
311946
  var formats = require_formats3();
311698
311947
  module2.exports = {
311699
311948
  formats,
311700
- parse: parse13,
311949
+ parse: parse14,
311701
311950
  stringify: stringify4
311702
311951
  };
311703
311952
  }
@@ -326722,7 +326971,7 @@ var require_root = __commonJS({
326722
326971
  var OneOf = require_oneof();
326723
326972
  var util3 = require_util11();
326724
326973
  var Type4;
326725
- var parse13;
326974
+ var parse14;
326726
326975
  var common3;
326727
326976
  function Root(options) {
326728
326977
  Namespace.call(this, "", options);
@@ -326782,8 +327031,8 @@ var require_root = __commonJS({
326782
327031
  if (!util3.isString(source))
326783
327032
  self2.setOptions(source.options).addJSON(source.nested);
326784
327033
  else {
326785
- parse13.filename = filename2;
326786
- var parsed = parse13(source, self2, options), resolved2, i3 = 0;
327034
+ parse14.filename = filename2;
327035
+ var parsed = parse14(source, self2, options), resolved2, i3 = 0;
326787
327036
  if (parsed.imports) {
326788
327037
  for (; i3 < parsed.imports.length; ++i3)
326789
327038
  if (resolved2 = getBundledFileName(parsed.imports[i3]) || self2.resolvePath(filename2, parsed.imports[i3]))
@@ -326955,7 +327204,7 @@ var require_root = __commonJS({
326955
327204
  };
326956
327205
  Root._configure = function(Type_, parse_, common_) {
326957
327206
  Type4 = Type_;
326958
- parse13 = parse_;
327207
+ parse14 = parse_;
326959
327208
  common3 = common_;
326960
327209
  };
326961
327210
  }
@@ -328220,9 +328469,9 @@ var require_tokenize = __commonJS({
328220
328469
  var require_parse8 = __commonJS({
328221
328470
  "node_modules/.pnpm/protobufjs@7.5.4/node_modules/protobufjs/src/parse.js"(exports2, module2) {
328222
328471
  "use strict";
328223
- module2.exports = parse13;
328224
- parse13.filename = null;
328225
- parse13.defaults = { keepCase: false };
328472
+ module2.exports = parse14;
328473
+ parse14.filename = null;
328474
+ parse14.defaults = { keepCase: false };
328226
328475
  var tokenize2 = require_tokenize();
328227
328476
  var Root = require_root();
328228
328477
  var Type4 = require_type2();
@@ -328244,13 +328493,13 @@ var require_parse8 = __commonJS({
328244
328493
  var numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/;
328245
328494
  var nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/;
328246
328495
  var typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;
328247
- function parse13(source, root2, options) {
328496
+ function parse14(source, root2, options) {
328248
328497
  if (!(root2 instanceof Root)) {
328249
328498
  options = root2;
328250
328499
  root2 = new Root();
328251
328500
  }
328252
328501
  if (!options)
328253
- options = parse13.defaults;
328502
+ options = parse14.defaults;
328254
328503
  var preferTrailingComment = options.preferTrailingComment || false;
328255
328504
  var tn = tokenize2(source, options.alternateCommentMode || false), next = tn.next, push2 = tn.push, peek = tn.peek, skip = tn.skip, cmnt = tn.cmnt;
328256
328505
  var head = true, pkg, imports, weakImports, edition = "proto2";
@@ -328271,9 +328520,9 @@ var require_parse8 = __commonJS({
328271
328520
  });
328272
328521
  }
328273
328522
  function illegal(token2, name, insideTryCatch) {
328274
- var filename = parse13.filename;
328523
+ var filename = parse14.filename;
328275
328524
  if (!insideTryCatch)
328276
- parse13.filename = null;
328525
+ parse14.filename = null;
328277
328526
  return Error("illegal " + (name || "token") + " '" + token2 + "' (" + (filename ? filename + ", " : "") + "line " + tn.line + ")");
328278
328527
  }
328279
328528
  function readString() {
@@ -328471,7 +328720,7 @@ var require_parse8 = __commonJS({
328471
328720
  if (typeof obj.comment !== "string") {
328472
328721
  obj.comment = cmnt();
328473
328722
  }
328474
- obj.filename = parse13.filename;
328723
+ obj.filename = parse14.filename;
328475
328724
  }
328476
328725
  if (skip("{", true)) {
328477
328726
  var token2;
@@ -328588,7 +328837,7 @@ var require_parse8 = __commonJS({
328588
328837
  var type2 = new Type4(name);
328589
328838
  type2.group = true;
328590
328839
  var field = new Field(fieldName, id, name, rule);
328591
- field.filename = parse13.filename;
328840
+ field.filename = parse14.filename;
328592
328841
  ifBlock(type2, function parseGroup_block(token2) {
328593
328842
  switch (token2) {
328594
328843
  case "option":
@@ -328924,7 +329173,7 @@ var require_parse8 = __commonJS({
328924
329173
  }
328925
329174
  }
328926
329175
  resolveFileFeatures();
328927
- parse13.filename = null;
329176
+ parse14.filename = null;
328928
329177
  return {
328929
329178
  "package": pkg,
328930
329179
  "imports": imports,
@@ -350631,13 +350880,13 @@ var init_esm6 = __esm({
350631
350880
  init_invocation_context();
350632
350881
  init_file_artifact_service();
350633
350882
  init_gcs_artifact_service();
350634
- init_registry2();
350883
+ init_registry3();
350635
350884
  init_agent_engine_sandbox_code_executor();
350636
350885
  init_code_execution_utils();
350637
350886
  init_unsafe_local_code_executor();
350638
350887
  init_common();
350639
350888
  init_database_session_service();
350640
- init_registry3();
350889
+ init_registry4();
350641
350890
  init_vertex_ai_session_service();
350642
350891
  init_loader();
350643
350892
  init_run_skill_inline_script_tool();
@@ -351363,7 +351612,7 @@ __export(src_exports3, {
351363
351612
  normalizeAdkSession: () => normalizeAdkSession,
351364
351613
  resolveAdkConfigFromEnv: () => resolveAdkConfigFromEnv
351365
351614
  });
351366
- var init_src9 = __esm({
351615
+ var init_src10 = __esm({
351367
351616
  "libs/import-adk/src/index.ts"() {
351368
351617
  "use strict";
351369
351618
  init_extract();
@@ -360029,7 +360278,7 @@ var require_parse9 = __commonJS({
360029
360278
  "node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js"(exports2, module2) {
360030
360279
  "use strict";
360031
360280
  var SemVer = require_semver3();
360032
- var parse13 = (version6, options, throwErrors = false) => {
360281
+ var parse14 = (version6, options, throwErrors = false) => {
360033
360282
  if (version6 instanceof SemVer) {
360034
360283
  return version6;
360035
360284
  }
@@ -360042,7 +360291,7 @@ var require_parse9 = __commonJS({
360042
360291
  throw er;
360043
360292
  }
360044
360293
  };
360045
- module2.exports = parse13;
360294
+ module2.exports = parse14;
360046
360295
  }
360047
360296
  });
360048
360297
 
@@ -360050,9 +360299,9 @@ var require_parse9 = __commonJS({
360050
360299
  var require_valid3 = __commonJS({
360051
360300
  "node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js"(exports2, module2) {
360052
360301
  "use strict";
360053
- var parse13 = require_parse9();
360302
+ var parse14 = require_parse9();
360054
360303
  var valid = (version6, options) => {
360055
- const v = parse13(version6, options);
360304
+ const v = parse14(version6, options);
360056
360305
  return v ? v.version : null;
360057
360306
  };
360058
360307
  module2.exports = valid;
@@ -360063,9 +360312,9 @@ var require_valid3 = __commonJS({
360063
360312
  var require_clean2 = __commonJS({
360064
360313
  "node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js"(exports2, module2) {
360065
360314
  "use strict";
360066
- var parse13 = require_parse9();
360315
+ var parse14 = require_parse9();
360067
360316
  var clean = (version6, options) => {
360068
- const s2 = parse13(version6.trim().replace(/^[=v]+/, ""), options);
360317
+ const s2 = parse14(version6.trim().replace(/^[=v]+/, ""), options);
360069
360318
  return s2 ? s2.version : null;
360070
360319
  };
360071
360320
  module2.exports = clean;
@@ -360100,10 +360349,10 @@ var require_inc2 = __commonJS({
360100
360349
  var require_diff2 = __commonJS({
360101
360350
  "node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js"(exports2, module2) {
360102
360351
  "use strict";
360103
- var parse13 = require_parse9();
360352
+ var parse14 = require_parse9();
360104
360353
  var diff2 = (version1, version22) => {
360105
- const v13 = parse13(version1, null, true);
360106
- const v2 = parse13(version22, null, true);
360354
+ const v13 = parse14(version1, null, true);
360355
+ const v2 = parse14(version22, null, true);
360107
360356
  const comparison = v13.compare(v2);
360108
360357
  if (comparison === 0) {
360109
360358
  return null;
@@ -360174,9 +360423,9 @@ var require_patch2 = __commonJS({
360174
360423
  var require_prerelease2 = __commonJS({
360175
360424
  "node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js"(exports2, module2) {
360176
360425
  "use strict";
360177
- var parse13 = require_parse9();
360426
+ var parse14 = require_parse9();
360178
360427
  var prerelease = (version6, options) => {
360179
- const parsed = parse13(version6, options);
360428
+ const parsed = parse14(version6, options);
360180
360429
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
360181
360430
  };
360182
360431
  module2.exports = prerelease;
@@ -360362,7 +360611,7 @@ var require_coerce2 = __commonJS({
360362
360611
  "node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js"(exports2, module2) {
360363
360612
  "use strict";
360364
360613
  var SemVer = require_semver3();
360365
- var parse13 = require_parse9();
360614
+ var parse14 = require_parse9();
360366
360615
  var { safeRe: re3, t: t3 } = require_re2();
360367
360616
  var coerce = (version6, options) => {
360368
360617
  if (version6 instanceof SemVer) {
@@ -360397,7 +360646,7 @@ var require_coerce2 = __commonJS({
360397
360646
  const patch = match2[4] || "0";
360398
360647
  const prerelease = options.includePrerelease && match2[5] ? `-${match2[5]}` : "";
360399
360648
  const build = options.includePrerelease && match2[6] ? `+${match2[6]}` : "";
360400
- return parse13(`${major3}.${minor}.${patch}${prerelease}${build}`, options);
360649
+ return parse14(`${major3}.${minor}.${patch}${prerelease}${build}`, options);
360401
360650
  };
360402
360651
  module2.exports = coerce;
360403
360652
  }
@@ -360407,7 +360656,7 @@ var require_coerce2 = __commonJS({
360407
360656
  var require_truncate = __commonJS({
360408
360657
  "node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js"(exports2, module2) {
360409
360658
  "use strict";
360410
- var parse13 = require_parse9();
360659
+ var parse14 = require_parse9();
360411
360660
  var constants3 = require_constants14();
360412
360661
  var SemVer = require_semver3();
360413
360662
  var truncate2 = (version6, truncation, options) => {
@@ -360419,7 +360668,7 @@ var require_truncate = __commonJS({
360419
360668
  };
360420
360669
  var cloneInputVersion = (version6, options) => {
360421
360670
  const versionStringToParse = version6 instanceof SemVer ? version6.version : version6;
360422
- return parse13(versionStringToParse, options);
360671
+ return parse14(versionStringToParse, options);
360423
360672
  };
360424
360673
  var doTruncation = (version6, truncation) => {
360425
360674
  if (isPrerelease(truncation)) {
@@ -361462,7 +361711,7 @@ var require_semver4 = __commonJS({
361462
361711
  var constants3 = require_constants14();
361463
361712
  var SemVer = require_semver3();
361464
361713
  var identifiers = require_identifiers2();
361465
- var parse13 = require_parse9();
361714
+ var parse14 = require_parse9();
361466
361715
  var valid = require_valid3();
361467
361716
  var clean = require_clean2();
361468
361717
  var inc = require_inc2();
@@ -361501,7 +361750,7 @@ var require_semver4 = __commonJS({
361501
361750
  var simplifyRange = require_simplify2();
361502
361751
  var subset = require_subset2();
361503
361752
  module2.exports = {
361504
- parse: parse13,
361753
+ parse: parse14,
361505
361754
  valid,
361506
361755
  clean,
361507
361756
  inc,
@@ -377004,7 +377253,7 @@ var headInterruptsSchema, readHeadInterrupts, readPendingInterrupts;
377004
377253
  var init_interrupts2 = __esm({
377005
377254
  "libs/import-langgraph/src/interrupts.ts"() {
377006
377255
  "use strict";
377007
- init_src6();
377256
+ init_src7();
377008
377257
  init_zod();
377009
377258
  headInterruptsSchema = external_exports.object({ interrupts: external_exports.array(external_exports.unknown()).optional() }).loose();
377010
377259
  readHeadInterrupts = (head) => {
@@ -377180,7 +377429,7 @@ var DEFAULT_THREAD_PAGE_SIZE, FULL_HISTORY_LIMIT, synthesizeSingleRun, errorMess
377180
377429
  var init_extract2 = __esm({
377181
377430
  "libs/import-langgraph/src/extract.ts"() {
377182
377431
  "use strict";
377183
- init_src6();
377432
+ init_src7();
377184
377433
  init_client7();
377185
377434
  init_graph_id();
377186
377435
  init_runs2();
@@ -377333,7 +377582,7 @@ __export(src_exports4, {
377333
377582
  sumUsage: () => sumUsage,
377334
377583
  usageFromMessage: () => usageFromMessage
377335
377584
  });
377336
- var init_src10 = __esm({
377585
+ var init_src11 = __esm({
377337
377586
  "libs/import-langgraph/src/index.ts"() {
377338
377587
  "use strict";
377339
377588
  init_extract2();
@@ -377438,7 +377687,7 @@ async function enumerateSource(config3) {
377438
377687
  return fixture;
377439
377688
  }
377440
377689
  if (config3.source === "adk") {
377441
- const { extractAdk: extractAdk2 } = await Promise.resolve().then(() => (init_src9(), src_exports3));
377690
+ const { extractAdk: extractAdk2 } = await Promise.resolve().then(() => (init_src10(), src_exports3));
377442
377691
  const adkEnv = {
377443
377692
  ...process.env,
377444
377693
  ...config3.adkSourceBackend !== void 0 ? { ADK_SOURCE_BACKEND: config3.adkSourceBackend } : {},
@@ -377470,7 +377719,7 @@ async function enumerateSource(config3) {
377470
377719
  TELEMETRY_ERROR_CODES.PREREQUISITE_MISSING
377471
377720
  );
377472
377721
  }
377473
- const { streamLangGraph: streamLangGraph2 } = await Promise.resolve().then(() => (init_src10(), src_exports4));
377722
+ const { streamLangGraph: streamLangGraph2 } = await Promise.resolve().then(() => (init_src11(), src_exports4));
377474
377723
  const conversations = [];
377475
377724
  const skipped = [];
377476
377725
  const failures = [];
@@ -377927,7 +378176,7 @@ ${formatStaleBuildNote()}`);
377927
378176
  var init_telemetry2 = __esm({
377928
378177
  "apps/cli/src/commands/telemetry.ts"() {
377929
378178
  "use strict";
377930
- init_src3();
378179
+ init_src4();
377931
378180
  init_config();
377932
378181
  init_unknown_input();
377933
378182
  }
@@ -379456,6 +379705,14 @@ function declareChannel(config3, channel2) {
379456
379705
  )
379457
379706
  };
379458
379707
  }
379708
+ function renameChannelDisplayName(config3, channel2) {
379709
+ return {
379710
+ ...config3,
379711
+ channels: config3.channels.map(
379712
+ (declared) => declared.name === channel2.name ? { ...declared, displayName: channel2.displayName } : declared
379713
+ )
379714
+ };
379715
+ }
379459
379716
  function requiredCredentialEnvNames(config3, channelName, adapter2) {
379460
379717
  const declared = config3.channels.find(
379461
379718
  (channel2) => channel2.name === channelName
@@ -379600,7 +379857,7 @@ function createSlackIngressUrl(input) {
379600
379857
  return new URL(input.path, ingressBaseUrl).toString();
379601
379858
  }
379602
379859
  function createSlackAppDisplayName(channelDisplayName) {
379603
- return [...channelDisplayName].slice(0, SLACK_APP_NAME_MAX_LENGTH).join("");
379860
+ return [...channelDisplayName.trim()].slice(0, SLACK_APP_NAME_MAX_LENGTH).join("");
379604
379861
  }
379605
379862
  function normalizeSlackIdentity(value) {
379606
379863
  return value.normalize("NFKD").toLowerCase().replace(/[^a-z0-9]+/gu, "-").replace(/^-+|-+$/gu, "").slice(0, 80).replace(/-+$/gu, "");
@@ -379613,14 +379870,8 @@ function createSlackBotDisplayName(channelDisplayName, fallbackName = DEFAULT_SL
379613
379870
  const safeFallback = normalizeSlackIdentity(fallbackName);
379614
379871
  return safeFallback && !RESERVED_SLACK_IDENTITIES.has(safeFallback) ? safeFallback : DEFAULT_SLACK_IDENTITY;
379615
379872
  }
379616
- function reservedWordIn(candidate) {
379617
- const folded = candidate.normalize("NFKD").toLowerCase();
379618
- return SLACK_RESERVED_NAME_WORDS.find(
379619
- (word) => folded.includes(word.toLowerCase())
379620
- );
379621
- }
379622
379873
  function suggestSlackDisplayName(channelName) {
379623
- const words = channelName.normalize("NFKD").toLowerCase().split(/[^a-z0-9]+/u).filter((word) => word.length > 0 && reservedWordIn(word) === void 0).map((word) => `${word.slice(0, 1).toUpperCase()}${word.slice(1)}`);
379874
+ const words = channelName.normalize("NFKD").toLowerCase().split(/[^a-z0-9]+/u).filter((word) => word.length > 0).map((word) => `${word.slice(0, 1).toUpperCase()}${word.slice(1)}`);
379624
379875
  const suggestion = [...words.join(" ")].slice(0, SLACK_APP_NAME_MAX_LENGTH).join("").trim();
379625
379876
  return suggestion.length > 0 ? suggestion : DEFAULT_SLACK_APP_NAME;
379626
379877
  }
@@ -379644,15 +379895,6 @@ function validateSlackDisplayName(input) {
379644
379895
  violation: "too_long"
379645
379896
  };
379646
379897
  }
379647
- const reserved = reservedWordIn(appName) ?? reservedWordIn(createSlackBotDisplayName(appName, input.channelName));
379648
- if (reserved !== void 0) {
379649
- return {
379650
- message: `A Slack app name and bot display name may not contain "${reserved}"; Slack refuses to create the app. Pass a different --display-name, for example "${suggestion}".`,
379651
- status: "invalid",
379652
- suggestion,
379653
- violation: "reserved_word"
379654
- };
379655
- }
379656
379898
  return { status: "ok" };
379657
379899
  }
379658
379900
  function createSlackInviteCommand(channelDisplayName, fallbackName) {
@@ -379713,7 +379955,7 @@ function createSlackManifestInstallUrl(manifest) {
379713
379955
  url4.searchParams.set("manifest_yaml", manifest);
379714
379956
  return url4.toString();
379715
379957
  }
379716
- var SLACK_EVENTS_INGRESS_PATH, SLACK_INTERACTIVITY_INGRESS_PATH, SLACK_APP_NAME_MAX_LENGTH, DEFAULT_SLACK_IDENTITY, RESERVED_SLACK_IDENTITIES, SLACK_RESERVED_NAME_WORDS, DEFAULT_SLACK_APP_NAME, REQUIRED_SLACK_BOT_SCOPES, REQUIRED_SLACK_BOT_SCOPE_COUNT, SLACK_PREINSTALL_GRANTED_SCOPES, SLACK_PREINSTALL_SCOPE_COUNT;
379958
+ var SLACK_EVENTS_INGRESS_PATH, SLACK_INTERACTIVITY_INGRESS_PATH, SLACK_APP_NAME_MAX_LENGTH, DEFAULT_SLACK_IDENTITY, RESERVED_SLACK_IDENTITIES, DEFAULT_SLACK_APP_NAME, REQUIRED_SLACK_BOT_SCOPES, REQUIRED_SLACK_BOT_SCOPE_COUNT, SLACK_PREINSTALL_GRANTED_SCOPES, SLACK_PREINSTALL_SCOPE_COUNT;
379717
379959
  var init_slack = __esm({
379718
379960
  "libs/channels-setup/src/slack.ts"() {
379719
379961
  "use strict";
@@ -379727,7 +379969,6 @@ var init_slack = __esm({
379727
379969
  "here",
379728
379970
  "slackbot"
379729
379971
  ]);
379730
- SLACK_RESERVED_NAME_WORDS = Object.freeze(["Slack"]);
379731
379972
  DEFAULT_SLACK_APP_NAME = "Intelligence Agent";
379732
379973
  REQUIRED_SLACK_BOT_SCOPES = Object.freeze([
379733
379974
  "app_mentions:read",
@@ -381249,7 +381490,7 @@ var init_teams_setup_gates = __esm({
381249
381490
  });
381250
381491
 
381251
381492
  // libs/channels-setup/src/index.ts
381252
- var init_src11 = __esm({
381493
+ var init_src12 = __esm({
381253
381494
  "libs/channels-setup/src/index.ts"() {
381254
381495
  "use strict";
381255
381496
  init_channels_config();
@@ -381429,7 +381670,7 @@ var SOURCE_EXTENSIONS, SKIPPED_DIRECTORIES2, MAX_FILES, MAX_FILE_BYTES, RUNTIME_
381429
381670
  var init_channel_code_half = __esm({
381430
381671
  "apps/cli/src/services/channel-code-half.ts"() {
381431
381672
  "use strict";
381432
- init_src11();
381673
+ init_src12();
381433
381674
  SOURCE_EXTENSIONS = /* @__PURE__ */ new Set([
381434
381675
  ".cjs",
381435
381676
  ".cts",
@@ -382738,7 +382979,7 @@ function writeChannelsConfigFile(dir, config3) {
382738
382979
  var init_channels_config_file = __esm({
382739
382980
  "apps/cli/src/services/channels-config-file.ts"() {
382740
382981
  "use strict";
382741
- init_src11();
382982
+ init_src12();
382742
382983
  init_fs_env_util();
382743
382984
  }
382744
382985
  });
@@ -382952,6 +383193,13 @@ async function runChannelsAdd(input, deps) {
382952
383193
  });
382953
383194
  deps.writeConfig(config3);
382954
383195
  }
383196
+ if (input.displayName !== void 0 && alreadyDeclared !== void 0 && alreadyDeclared.displayName !== input.displayName) {
383197
+ config3 = renameChannelDisplayName(config3, {
383198
+ displayName: input.displayName,
383199
+ name
383200
+ });
383201
+ deps.writeConfig(config3);
383202
+ }
382955
383203
  const declaredEnv = adapter2 === "slack" ? defaultCredentialEnvNames(name, "slack") : defaultCredentialEnvNames(name, "teams");
382956
383204
  const declared = config3.channels.find((channel2) => channel2.name === name);
382957
383205
  const providerEnv = declared?.providers[adapter2]?.env ?? declaredEnv;
@@ -383220,7 +383468,7 @@ var CHANNELS_FLOW_CODES, MAX_RECONCILE_STEPS;
383220
383468
  var init_channels_flow = __esm({
383221
383469
  "apps/cli/src/services/channels-flow.ts"() {
383222
383470
  "use strict";
383223
- init_src11();
383471
+ init_src12();
383224
383472
  init_api_client();
383225
383473
  init_channel_credentials();
383226
383474
  init_channels_state();
@@ -383421,7 +383669,7 @@ function removeEmptyPlaceholders(input) {
383421
383669
  var init_init_channel_setup = __esm({
383422
383670
  "apps/cli/src/services/init-channel-setup.ts"() {
383423
383671
  "use strict";
383424
- init_src11();
383672
+ init_src12();
383425
383673
  init_config();
383426
383674
  init_api_client();
383427
383675
  init_channel_artifacts();
@@ -385149,7 +385397,7 @@ var init_init = __esm({
385149
385397
  await init_channel_offer();
385150
385398
  await init_hosted_project_select();
385151
385399
  init_project_config();
385152
- init_src11();
385400
+ init_src12();
385153
385401
  init_intelligence_readme();
385154
385402
  import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
385155
385403
  PROJECT_CREATION_AUTH_HANDOFF = {
@@ -386049,7 +386297,15 @@ var init_onboarding_resume = __esm({
386049
386297
  import { execFileSync as execFileSync5 } from "node:child_process";
386050
386298
  import { createHash as createHash8 } from "node:crypto";
386051
386299
  import { existsSync as existsSync21, readFileSync as readFileSync22, readdirSync as readdirSync5, statSync as statSync4 } from "node:fs";
386052
- import { isAbsolute, join as join28, relative as relative3, resolve as resolve7, sep as sep3 } from "node:path";
386300
+ import {
386301
+ dirname as dirname13,
386302
+ isAbsolute,
386303
+ join as join28,
386304
+ parse as parse13,
386305
+ relative as relative3,
386306
+ resolve as resolve7,
386307
+ sep as sep3
386308
+ } from "node:path";
386053
386309
  function deriveProjectFiles(root2) {
386054
386310
  const found = [];
386055
386311
  const pending = [root2];
@@ -386159,6 +386415,9 @@ function readManifest(dependencies) {
386159
386415
  return "malformed";
386160
386416
  if (typeof stored.capturedAt !== "string")
386161
386417
  return "malformed";
386418
+ if (stored.capturedTree !== void 0 && typeof stored.capturedTree !== "string") {
386419
+ return "malformed";
386420
+ }
386162
386421
  if (stored.implementationStartedAt !== void 0 && typeof stored.implementationStartedAt !== "string") {
386163
386422
  return "malformed";
386164
386423
  }
@@ -386169,6 +386428,9 @@ function readManifest(dependencies) {
386169
386428
  );
386170
386429
  return wellFormed ? stored : "malformed";
386171
386430
  }
386431
+ function capturedTreeMark(stored) {
386432
+ return stored?.capturedTree === void 0 ? {} : { capturedTree: stored.capturedTree };
386433
+ }
386172
386434
  function startedMark(stored) {
386173
386435
  return stored?.implementationStartedAt === void 0 ? {} : { implementationStartedAt: stored.implementationStartedAt };
386174
386436
  }
@@ -386259,12 +386521,32 @@ function captureEntry(root2, relativePath, derived) {
386259
386521
  ...envKeys === void 0 ? {} : { envKeys }
386260
386522
  };
386261
386523
  }
386524
+ function isProjectBoundary(directory) {
386525
+ return PROJECT_BOUNDARY_MARKERS.some(
386526
+ (marker) => existsSync21(join28(directory, marker))
386527
+ );
386528
+ }
386529
+ function crossesProjectBoundary(start, root2) {
386530
+ let candidate = start;
386531
+ const filesystemRoot = parse13(candidate).root;
386532
+ while (candidate !== root2) {
386533
+ if (isProjectBoundary(candidate))
386534
+ return true;
386535
+ if (candidate === filesystemRoot)
386536
+ break;
386537
+ const parent = dirname13(candidate);
386538
+ if (parent === candidate)
386539
+ break;
386540
+ candidate = parent;
386541
+ }
386542
+ return false;
386543
+ }
386262
386544
  function captureProtectedPaths(dependencies, input) {
386263
386545
  const root2 = resolveAnchoredRoot(dependencies);
386264
- const enclosingRepository = findRepositoryRoot(
386265
- resolveOnboardingRepositoryRoot(dependencies.cwd)
386266
- );
386267
- if (enclosingRepository !== void 0 && enclosingRepository !== root2) {
386546
+ if (crossesProjectBoundary(
386547
+ resolveOnboardingRepositoryRoot(dependencies.cwd),
386548
+ root2
386549
+ )) {
386268
386550
  return { status: "blocked", reason: "root-outside-project", detail: root2 };
386269
386551
  }
386270
386552
  const stored = readManifest(dependencies);
@@ -386324,6 +386606,10 @@ function captureProtectedPaths(dependencies, input) {
386324
386606
  dependencies.store.set(protectedBaselineKey(dependencies), {
386325
386607
  runId: input.runId,
386326
386608
  capturedAt: ownBaseline?.capturedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
386609
+ // Read once, with the timestamp, and kept for the life of the baseline: a
386610
+ // capture that extends its own baseline must keep describing the tree the
386611
+ // run started from, not the one it has since built.
386612
+ ...ownBaseline === void 0 ? treeMarkOf(root2) : capturedTreeMark(ownBaseline),
386327
386613
  ...startedMark(ownBaseline),
386328
386614
  entries
386329
386615
  });
@@ -386459,6 +386745,7 @@ function rebaselineProtectedPaths(dependencies, input) {
386459
386745
  dependencies.store.set(protectedBaselineKey(dependencies), {
386460
386746
  runId: stored.runId,
386461
386747
  capturedAt: stored.capturedAt,
386748
+ ...capturedTreeMark(stored),
386462
386749
  ...startedMark(stored),
386463
386750
  entries: byPath(entries)
386464
386751
  });
@@ -386580,6 +386867,7 @@ function acceptProtectedPathDrift(dependencies, input) {
386580
386867
  dependencies.store.set(protectedBaselineKey(dependencies), {
386581
386868
  runId: stored.runId,
386582
386869
  capturedAt: stored.capturedAt,
386870
+ ...capturedTreeMark(stored),
386583
386871
  ...startedMark(stored),
386584
386872
  entries: byPath(entries)
386585
386873
  });
@@ -386693,6 +386981,7 @@ function acceptCredentialPlacement(dependencies, input) {
386693
386981
  dependencies.store.set(protectedBaselineKey(dependencies), {
386694
386982
  runId: stored.runId,
386695
386983
  capturedAt: stored.capturedAt,
386984
+ ...capturedTreeMark(stored),
386696
386985
  ...startedMark(stored),
386697
386986
  entries: byPath(entries)
386698
386987
  });
@@ -386724,6 +387013,7 @@ function markImplementationStarted(dependencies, input) {
386724
387013
  dependencies.store.set(protectedBaselineKey(dependencies), {
386725
387014
  runId: stored.runId,
386726
387015
  capturedAt: stored.capturedAt,
387016
+ ...capturedTreeMark(stored),
386727
387017
  implementationStartedAt: startedAt,
386728
387018
  entries: stored.entries
386729
387019
  });
@@ -386844,6 +387134,7 @@ function authorizeProtectedPathChange(dependencies, input) {
386844
387134
  dependencies.store.set(protectedBaselineKey(dependencies), {
386845
387135
  runId: stored.runId,
386846
387136
  capturedAt: stored.capturedAt,
387137
+ ...capturedTreeMark(stored),
386847
387138
  ...startedMark(stored),
386848
387139
  entries: byPath(entries)
386849
387140
  });
@@ -386853,7 +387144,27 @@ function authorizeProtectedPathChange(dependencies, input) {
386853
387144
  authorized: byPath(authorized)
386854
387145
  };
386855
387146
  }
386856
- function commitsAfterCapture(root2, capturedAt) {
387147
+ function currentRepositoryTree(root2) {
387148
+ try {
387149
+ return execFileSync5("git", ["rev-parse", "HEAD^{tree}"], {
387150
+ cwd: root2,
387151
+ encoding: "utf8",
387152
+ stdio: ["ignore", "pipe", "pipe"]
387153
+ }).trim();
387154
+ } catch {
387155
+ return void 0;
387156
+ }
387157
+ }
387158
+ function treeMarkOf(root2) {
387159
+ const tree = currentRepositoryTree(root2);
387160
+ return tree === void 0 ? {} : { capturedTree: tree };
387161
+ }
387162
+ function commitsAfterCapture(root2, capturedAt, capturedTree) {
387163
+ if (capturedTree !== void 0) {
387164
+ const now = currentRepositoryTree(root2);
387165
+ if (now !== void 0 && now === capturedTree)
387166
+ return "none";
387167
+ }
386857
387168
  const since = capturedAt.replace(/\.\d+Z$/, "Z");
386858
387169
  let output;
386859
387170
  try {
@@ -386914,7 +387225,11 @@ function readProjectChanges(dependencies, input) {
386914
387225
  if (ordered.length > 0 || derived === "no-repository") {
386915
387226
  return { status: "passed", runId: input.runId, changed: ordered };
386916
387227
  }
386917
- const committed = commitsAfterCapture(root2, stored.capturedAt);
387228
+ const committed = commitsAfterCapture(
387229
+ root2,
387230
+ stored.capturedAt,
387231
+ stored.capturedTree
387232
+ );
386918
387233
  if (committed === "failed" || committed === "none") {
386919
387234
  return { status: "passed", runId: input.runId, changed: ordered };
386920
387235
  }
@@ -386927,7 +387242,7 @@ function readProjectChanges(dependencies, input) {
386927
387242
  committedAfterCapture: true
386928
387243
  };
386929
387244
  }
386930
- var SKIPPED_DIRECTORIES3, GRAPH_OWNED_SUFFIXES;
387245
+ var SKIPPED_DIRECTORIES3, GRAPH_OWNED_SUFFIXES, PROJECT_BOUNDARY_MARKERS;
386931
387246
  var init_onboarding_protected_paths = __esm({
386932
387247
  "apps/cli/src/services/onboarding-protected-paths.ts"() {
386933
387248
  "use strict";
@@ -386945,6 +387260,12 @@ var init_onboarding_protected_paths = __esm({
386945
387260
  "__pycache__"
386946
387261
  ]);
386947
387262
  GRAPH_OWNED_SUFFIXES = [".env", ".copilotkit/project.json"];
387263
+ PROJECT_BOUNDARY_MARKERS = [
387264
+ ".git",
387265
+ "package.json",
387266
+ "pyproject.toml",
387267
+ ".copilotkit"
387268
+ ];
386948
387269
  }
386949
387270
  });
386950
387271
 
@@ -387376,6 +387697,9 @@ var init_resolved_dependencies = __esm({
387376
387697
 
387377
387698
  // apps/cli/src/services/onboarding-inspection.ts
387378
387699
  import * as path39 from "node:path";
387700
+ function requiredProjectFields(deployment) {
387701
+ return deployment === "managed" ? ["projectId", "projectSlug", "clerkOrgId"] : ["projectId", "projectSlug"];
387702
+ }
387379
387703
  function relativize(root2, target) {
387380
387704
  const relative7 = path39.relative(root2, target);
387381
387705
  return relative7 === "" ? "." : relative7;
@@ -387401,12 +387725,13 @@ function packageManagerFor(appDir, root2) {
387401
387725
  candidate = parent;
387402
387726
  }
387403
387727
  }
387404
- function inspectProject(cwd2, root2) {
387728
+ function inspectProject(cwd2, root2, deployment) {
387729
+ const required3 = requiredProjectFields(deployment);
387405
387730
  const resolution = resolveProjectConfig(cwd2);
387406
387731
  if (resolution.kind === "absent") {
387407
387732
  return {
387408
387733
  configPath: null,
387409
- missingFields: [...REQUIRED_PROJECT_FIELDS],
387734
+ missingFields: [...required3],
387410
387735
  presentFields: [],
387411
387736
  status: "absent"
387412
387737
  };
@@ -387418,18 +387743,18 @@ function inspectProject(cwd2, root2) {
387418
387743
  if (resolution.kind === "unreadable") {
387419
387744
  return {
387420
387745
  configPath,
387421
- missingFields: [...REQUIRED_PROJECT_FIELDS],
387746
+ missingFields: [...required3],
387422
387747
  presentFields: [],
387423
387748
  status: "unreadable"
387424
387749
  };
387425
387750
  }
387426
387751
  const held = resolution.config;
387427
- const present2 = REQUIRED_PROJECT_FIELDS.filter(
387752
+ const present2 = required3.filter(
387428
387753
  (field) => typeof held[field] === "string" && held[field] !== ""
387429
387754
  );
387430
387755
  return {
387431
387756
  configPath,
387432
- missingFields: REQUIRED_PROJECT_FIELDS.filter(
387757
+ missingFields: required3.filter(
387433
387758
  (field) => !present2.includes(field)
387434
387759
  ),
387435
387760
  presentFields: present2,
@@ -387491,12 +387816,11 @@ function buildInspectionPacket(inputs) {
387491
387816
  command: "onboard inspect",
387492
387817
  dependencies: readResolvedDependencies(apps2),
387493
387818
  detection: detectStack(root2),
387494
- project: inspectProject(cwd2, root2),
387819
+ project: inspectProject(cwd2, root2, inputs.deployment),
387495
387820
  projectRoot: root2,
387496
387821
  schemaVersion: 1
387497
387822
  };
387498
387823
  }
387499
- var REQUIRED_PROJECT_FIELDS;
387500
387824
  var init_onboarding_inspection = __esm({
387501
387825
  "apps/cli/src/services/onboarding-inspection.ts"() {
387502
387826
  "use strict";
@@ -387510,11 +387834,6 @@ var init_onboarding_inspection = __esm({
387510
387834
  init_resolved_dependencies();
387511
387835
  init_runtime_url();
387512
387836
  init_verify_probes();
387513
- REQUIRED_PROJECT_FIELDS = [
387514
- "projectId",
387515
- "projectSlug",
387516
- "clerkOrgId"
387517
- ];
387518
387837
  }
387519
387838
  });
387520
387839
 
@@ -387794,7 +388113,11 @@ async function runOnboard(argv, dependencies) {
387794
388113
  resolveAppDirectories(cwd2, findRepositoryRoot(cwd2) ?? cwd2).apps
387795
388114
  );
387796
388115
  },
387797
- readInspection: () => buildInspectionPacket({ cwd: process.cwd(), env: process.env }),
388116
+ readInspection: () => buildInspectionPacket({
388117
+ cwd: process.cwd(),
388118
+ deployment: getDeploymentTarget().name,
388119
+ env: process.env
388120
+ }),
387798
388121
  readEnvStaleness: () => buildEnvStalenessPacket({
387799
388122
  cwd: process.cwd(),
387800
388123
  now: Date.now(),
@@ -387938,6 +388261,16 @@ async function runOnboard(argv, dependencies) {
387938
388261
  throw new Error(SURFACE_CHECK_USAGE);
387939
388262
  const unchanged = unchangedProjectRefusal(deps, runId);
387940
388263
  if (unchanged !== void 0) {
388264
+ recordBestEffort(deps, {
388265
+ event: "cli.onboarding.complete_refused",
388266
+ properties: {
388267
+ command: "onboard",
388268
+ ...onboardingIntentProperties(deps),
388269
+ onboarding_run_id: runId,
388270
+ cli_version: deps.cliVersion,
388271
+ refusal_code: "no-changes-in-project"
388272
+ }
388273
+ });
387941
388274
  deps.stdout.write(unchanged);
387942
388275
  return;
387943
388276
  }
@@ -388275,9 +388608,9 @@ Onboarding protects the developer\u2019s own tree and captures nothing beyond it
388275
388608
  derived. Nothing was captured: an empty baseline would read as "nothing here
388276
388609
  needs protecting", which is the opposite of what just happened.
388277
388610
  `,
388278
- "root-outside-project": `This run is anchored at ${result.detail}, above the repository this command
388611
+ "root-outside-project": `This run is anchored at ${result.detail}, above the project this command
388279
388612
  ran in. Nothing was captured: a baseline derived up there reads every file
388280
- below it, including repositories this run has no business in.
388613
+ below it, including projects this run has no business in.
388281
388614
  Run \`copilotkit onboard start --run <id>\` here to give this project a run of
388282
388615
  its own, or run this step from the directory the run started in.
388283
388616
  `
@@ -389976,7 +390309,7 @@ var init_channels_report = __esm({
389976
390309
  "apps/cli/src/services/channels-report.ts"() {
389977
390310
  "use strict";
389978
390311
  init_channels();
389979
- init_src11();
390312
+ init_src12();
389980
390313
  init_api_client();
389981
390314
  init_channel_credentials();
389982
390315
  init_channels_state();
@@ -390644,7 +390977,7 @@ var MAX_CAPTURED_OUTPUT_BYTES, MicrosoftTeamsCliError, statusSchema, createdAppS
390644
390977
  var init_microsoft_teams_cli = __esm({
390645
390978
  "apps/cli/src/services/microsoft-teams-cli.ts"() {
390646
390979
  "use strict";
390647
- init_src11();
390980
+ init_src12();
390648
390981
  init_zod();
390649
390982
  init_channel_credentials();
390650
390983
  MAX_CAPTURED_OUTPUT_BYTES = 1024 * 1024;
@@ -391269,7 +391602,7 @@ var command, microsoftMutationWarning, INGRESS_PROBE_TIMEOUT_MS, CONSENT_PROPAGA
391269
391602
  var init_teams_provision = __esm({
391270
391603
  "apps/cli/src/services/teams-provision.ts"() {
391271
391604
  "use strict";
391272
- init_src11();
391605
+ init_src12();
391273
391606
  init_api_client();
391274
391607
  init_channel_credentials();
391275
391608
  init_microsoft_teams_cli();
@@ -391364,7 +391697,7 @@ async function runChannelProviders(options) {
391364
391697
  var init_channel_providers = __esm({
391365
391698
  "apps/cli/src/commands/channel-providers.ts"() {
391366
391699
  "use strict";
391367
- init_src11();
391700
+ init_src12();
391368
391701
  init_channel_provider_catalog();
391369
391702
  }
391370
391703
  });
@@ -392211,7 +392544,7 @@ var init_channels2 = __esm({
392211
392544
  async "apps/cli/src/commands/channels.ts"() {
392212
392545
  "use strict";
392213
392546
  init_channels();
392214
- init_src11();
392547
+ init_src12();
392215
392548
  init_config();
392216
392549
  init_unknown_input();
392217
392550
  init_agent_prompt();
@@ -393929,18 +394262,19 @@ function parseGlobalArgs(argv) {
393929
394262
  const parsed = {
393930
394263
  verbose: false
393931
394264
  };
393932
- for (const [flag, key] of [
393933
- ["--app-api-url", "appApiUrl"],
393934
- ["--ops-api-url", "opsApiUrl"],
393935
- ["--ops-frontend-url", "opsFrontendUrl"],
393936
- ["--teams-ingress-url", "teamsIngressUrl"],
393937
- ["--slack-ingress-url", "slackIngressUrl"]
394265
+ for (const [flag, key, expects] of [
394266
+ ["--app-api-url", "appApiUrl", "a URL argument"],
394267
+ ["--ops-api-url", "opsApiUrl", "a URL argument"],
394268
+ ["--ops-frontend-url", "opsFrontendUrl", "a URL argument"],
394269
+ ["--teams-ingress-url", "teamsIngressUrl", "a URL argument"],
394270
+ ["--slack-ingress-url", "slackIngressUrl", "a URL argument"],
394271
+ ["--deployment", "deployment", '"managed" or "self-hosted"']
393938
394272
  ]) {
393939
394273
  const idx = remaining.indexOf(flag);
393940
394274
  if (idx !== -1) {
393941
394275
  const url4 = remaining[idx + 1];
393942
394276
  if (!url4 || url4.startsWith("-")) {
393943
- process.stderr.write(`Error: ${flag} requires a URL argument.
394277
+ process.stderr.write(`Error: ${flag} requires ${expects}.
393944
394278
  `);
393945
394279
  process.exit(1);
393946
394280
  }
@@ -393960,10 +394294,26 @@ function parseGlobalArgs(argv) {
393960
394294
  ...parsed.opsApiUrl ? { opsApiUrl: parsed.opsApiUrl } : {},
393961
394295
  ...parsed.opsFrontendUrl ? { opsFrontendUrl: parsed.opsFrontendUrl } : {},
393962
394296
  ...parsed.teamsIngressUrl ? { teamsIngressUrl: parsed.teamsIngressUrl } : {},
393963
- ...parsed.slackIngressUrl ? { slackIngressUrl: parsed.slackIngressUrl } : {}
394297
+ ...parsed.slackIngressUrl ? { slackIngressUrl: parsed.slackIngressUrl } : {},
394298
+ ...parsed.deployment ? { deployment: parsed.deployment } : {}
393964
394299
  };
393965
394300
  }
393966
394301
  async function applyGlobalArgs(parsed) {
394302
+ if (parsed.deployment) {
394303
+ const { setDeploymentTarget: setDeploymentTarget2 } = await Promise.resolve().then(() => (init_config(), config_exports));
394304
+ if (parsed.deployment !== "managed" && parsed.deployment !== "self-hosted") {
394305
+ process.stderr.write(
394306
+ `Error: unknown deployment "${parsed.deployment}". Use "managed" or "self-hosted".
394307
+ `
394308
+ );
394309
+ process.exit(1);
394310
+ }
394311
+ const appApiUrl = parsed.appApiUrl ?? process.env["COPILOTKIT_APP_API_URL"]?.trim();
394312
+ setDeploymentTarget2({
394313
+ name: parsed.deployment,
394314
+ ...appApiUrl ? { appApiUrl } : {}
394315
+ });
394316
+ }
393967
394317
  if (parsed.appApiUrl || parsed.opsApiUrl || parsed.opsFrontendUrl || parsed.teamsIngressUrl || parsed.slackIngressUrl) {
393968
394318
  const {
393969
394319
  setAppApiUrl: setAppApiUrl2,