@desplega.ai/agent-swarm 2.4.1 → 2.4.2

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 (109) hide show
  1. package/dist/{acp-adapter-zvzr538d.js → acp-adapter-dv7hmx4r.js} +1 -1
  2. package/dist/{actions-jhtqdw69.js → actions-51nc1gny.js} +16 -16
  3. package/dist/{amp-adapter-bd84rhs2.js → amp-adapter-abp5tdx8.js} +1 -1
  4. package/dist/{app-kreq1gwg.js → app-9h14qvr6.js} +3 -3
  5. package/dist/{assistant-3k22sbsq.js → assistant-wv1gz3mt.js} +17 -17
  6. package/dist/{boot-reembed-e53x6b9v.js → boot-reembed-6yn53ms9.js} +1 -1
  7. package/dist/{boot-reembed-f6z923ny.js → boot-reembed-7fcka4z5.js} +1 -1
  8. package/dist/{boot-scrub-sweep-0538vsb7.js → boot-scrub-sweep-pm1580ax.js} +2 -2
  9. package/dist/{boot-seeds-6wxqkfk2.js → boot-seeds-g5hfc1x8.js} +4 -4
  10. package/dist/{claude-adapter-gfts5044.js → claude-adapter-gf3kxhf0.js} +2 -2
  11. package/dist/{claude-sdk-session-56besmfz.js → claude-sdk-session-s2k1qd8y.js} +2 -2
  12. package/dist/{cli-tbhwrxpt.js → cli-02qm7src.js} +3 -3
  13. package/dist/{cli-3kh4kpqy.js → cli-0qvtffe9.js} +5 -5
  14. package/dist/{cli-p6argxh9.js → cli-10hhg0km.js} +6 -6
  15. package/dist/{cli-gf0kfg81.js → cli-239yjk27.js} +2 -2
  16. package/dist/{cli-kr2pmfqx.js → cli-5rk36sjf.js} +72 -59
  17. package/dist/{cli-nx462e4v.js → cli-7awf1fp8.js} +1 -1
  18. package/dist/{cli-jh0qcrga.js → cli-8sxqsbbq.js} +1 -1
  19. package/dist/{cli-axh29tyr.js → cli-8zwe9mpk.js} +5 -5
  20. package/dist/{cli-z1ew8vbq.js → cli-ahtpy9kf.js} +1 -1
  21. package/dist/{cli-3r448dqn.js → cli-bcj753sq.js} +3 -3
  22. package/dist/{cli-rqqsfz30.js → cli-d3qqdy4c.js} +82 -12
  23. package/dist/{cli-z071fb95.js → cli-efaqv1c7.js} +4 -4
  24. package/dist/{cli-s48yvzb8.js → cli-faypxz7q.js} +3 -3
  25. package/dist/{cli-m2qgh5sv.js → cli-ftyypbg5.js} +1 -1
  26. package/dist/{cli-6ncjvx55.js → cli-fyzjmseb.js} +1 -1
  27. package/dist/{cli-0bh477zn.js → cli-h38rjv87.js} +117 -9
  28. package/dist/{cli-3p8fqcnh.js → cli-h93c9vb3.js} +1 -1
  29. package/dist/{cli-rdq7tzwm.js → cli-hyfw2j1e.js} +8 -8
  30. package/dist/{cli-bn5kevnf.js → cli-n85dqg6d.js} +2 -2
  31. package/dist/{cli-fz9kewbh.js → cli-nmqdc2t3.js} +1 -1
  32. package/dist/{cli-vy0fay6k.js → cli-nn47d7e8.js} +10 -10
  33. package/dist/{cli-mfe7f7b5.js → cli-pkht5hap.js} +1 -1
  34. package/dist/{cli-xftrvxag.js → cli-r99kc9yq.js} +1 -1
  35. package/dist/{cli-p0rakbrk.js → cli-rdyw3mct.js} +1 -1
  36. package/dist/{cli-sjyetj21.js → cli-s6vr7r2d.js} +1 -1
  37. package/dist/{cli-k9z4zd4p.js → cli-saw9a6f6.js} +2 -2
  38. package/dist/{cli-ash6xxk7.js → cli-shvfedvm.js} +2 -2
  39. package/dist/{cli-syhq378v.js → cli-t30yj95q.js} +1 -1
  40. package/dist/{cli-kmqgmcnb.js → cli-y2x52gs2.js} +4 -4
  41. package/dist/{cli-471qk6s2.js → cli-y8n5k515.js} +14 -14
  42. package/dist/{cli-3tnpj2bh.js → cli-z4wd2ftv.js} +1 -1
  43. package/dist/cli.js +12 -12
  44. package/dist/{codex-adapter-p6rmm7vv.js → codex-adapter-ttygw382.js} +1 -1
  45. package/dist/{codex-session-runner-8vd5t9t0.js → codex-session-runner-60b58vv3.js} +1 -1
  46. package/dist/{commands-7ems2p13.js → commands-edmdwa4x.js} +2 -2
  47. package/dist/{controllers-connect-bg33ae53.js → controllers-connect-5fym8sw1.js} +16 -16
  48. package/dist/{db-ys2rbdft.js → db-2y0mgstc.js} +3 -3
  49. package/dist/{db-w505dwa8.js → db-nn0hcmx5.js} +5 -1
  50. package/dist/{dispatcher-0s0mckqr.js → dispatcher-0a9wwjcx.js} +15 -15
  51. package/dist/{external-channel-5b23fv8z.js → external-channel-zhvt95n3.js} +2 -2
  52. package/dist/{grok-adapter-q9fghe5q.js → grok-adapter-qnr1hp2y.js} +2 -2
  53. package/dist/{handlers-mqrym347.js → handlers-dkcarkd0.js} +18 -18
  54. package/dist/{heartbeat-tww6yx1w.js → heartbeat-gz97r7ac.js} +17 -17
  55. package/dist/{hook-dx0pkvar.js → hook-1mmdgjqs.js} +1 -1
  56. package/dist/{hook-pvmh9b6m.js → hook-x8rthca4.js} +1 -1
  57. package/dist/{http-k2ejbt05.js → http-r8f85xr9.js} +111 -65
  58. package/dist/{index-pqfwh9nn.js → index-5jecgp3n.js} +17 -17
  59. package/dist/{index-h2ek08d6.js → index-aex0eba9.js} +15 -15
  60. package/dist/{index-x5aktmp8.js → index-smxyk04s.js} +1 -1
  61. package/dist/{index-dgz61nff.js → index-vzvfqzfj.js} +15 -15
  62. package/dist/{index-2z710v4x.js → index-y7rbcrc1.js} +8 -8
  63. package/dist/{keepalive-nhvpw10z.js → keepalive-64c0f34c.js} +3 -3
  64. package/dist/{lead-jb6sf69z.js → lead-b1da0f97.js} +23 -23
  65. package/dist/{maintenance-agakc519.js → maintenance-mnxpar12.js} +1 -1
  66. package/dist/{oauth-refresh-sweep-4dcbhtn0.js → oauth-refresh-sweep-36hs2v4h.js} +2 -2
  67. package/dist/{onboard-4n2kwa4v.js → onboard-xes8de61.js} +2 -2
  68. package/dist/{otel-impl-tfa12080.js → otel-impl-fzc57kcq.js} +1 -1
  69. package/dist/{pricing-refresh-3cqx3f3x.js → pricing-refresh-1nek2w7b.js} +3 -3
  70. package/dist/{rbac-roles-y6zbfzve.js → rbac-roles-sqefb5hw.js} +2 -2
  71. package/dist/{rbac-roles-9fae5rnv.js → rbac-roles-ttyfaep2.js} +1 -1
  72. package/dist/{render-v2-emawjvc4.js → render-v2-vb527jwn.js} +3 -3
  73. package/dist/{resume-zhgts7h7.js → resume-jcdzg1bn.js} +5 -5
  74. package/dist/{session-access-cm823e06.js → session-access-zsp4wsp0.js} +4 -4
  75. package/dist/{setup-tkp99w1e.js → setup-1nb2zqd3.js} +1 -1
  76. package/dist/{work-objects-f722h263.js → work-objects-61w08fwr.js} +18 -18
  77. package/dist/{worker-p7f336rq.js → worker-c1e68hpa.js} +23 -23
  78. package/openapi.json +393 -1
  79. package/package.json +2 -2
  80. package/src/apps/catalog.generated.json +3 -2
  81. package/src/apps/definition.ts +152 -4
  82. package/src/apps/row-store.ts +19 -7
  83. package/src/apps/schema-migrate.ts +14 -6
  84. package/src/apps/script-types.ts +1 -0
  85. package/src/apps/sync.ts +20 -19
  86. package/src/be/db/tasks/read.ts +112 -0
  87. package/src/be/db.ts +2 -0
  88. package/src/be/swarm-config-guard.ts +15 -0
  89. package/src/http/apps.ts +15 -2
  90. package/src/http/status.ts +49 -43
  91. package/src/http/tasks.ts +47 -0
  92. package/src/providers/acp-targets.ts +1 -1
  93. package/src/providers/amp-adapter.ts +1 -1
  94. package/src/telemetry.ts +15 -3
  95. package/src/tests/app-row-tools.test.ts +25 -0
  96. package/src/tests/apps-json-column.test.ts +611 -0
  97. package/src/tests/apps-script-types.test.ts +2 -0
  98. package/src/tests/apps-sync-engine.test.ts +42 -0
  99. package/src/tests/db-task-read-contract.test.ts +4 -0
  100. package/src/tests/db-task-write-contract.test.ts +2 -0
  101. package/src/tests/docs-index-footprint.test.js +2 -2
  102. package/src/tests/runner-harness-telemetry-env.test.ts +6 -0
  103. package/src/tests/status.test.ts +158 -9
  104. package/src/tests/task-lineage.test.ts +180 -0
  105. package/src/tests/telemetry-init.test.ts +62 -5
  106. package/src/tests/user-token-rest-auth.test.ts +38 -0
  107. package/src/tools/app-rows.ts +5 -0
  108. package/templates/skills/apps/SKILL.md +3 -2
  109. package/templates/skills/apps/content.md +3 -2
@@ -332,19 +332,19 @@ import {
332
332
  recordInlineScriptRun2,
333
333
  exports_db,
334
334
  init_db3
335
- } from "./cli-rqqsfz30.js";
335
+ } from "./cli-d3qqdy4c.js";
336
336
  import {
337
337
  getUserGrant2,
338
338
  init_rbac_roles
339
- } from "./cli-nx462e4v.js";
339
+ } from "./cli-7awf1fp8.js";
340
340
  import {
341
341
  ensurePricingSeeded2,
342
342
  ensureRbacSeeded2,
343
343
  ensureModelProfilesSeeded2
344
- } from "./cli-s48yvzb8.js";
344
+ } from "./cli-faypxz7q.js";
345
345
  import {
346
346
  loadModelsDevCache
347
- } from "./cli-3p8fqcnh.js";
347
+ } from "./cli-h93c9vb3.js";
348
348
  import {
349
349
  buildCatalogEntries,
350
350
  listModelCatalog,
@@ -354,7 +354,7 @@ import {
354
354
  loadModelsCatalog,
355
355
  requestModelCatalogRefresh2,
356
356
  startPricingRefreshLoop2
357
- } from "./cli-k9z4zd4p.js";
357
+ } from "./cli-saw9a6f6.js";
358
358
  import {
359
359
  ampPinProviderError,
360
360
  ampPinCatalogError,
@@ -411,7 +411,7 @@ import {
411
411
  buildNodeInterpolationCtx,
412
412
  interpolateNodeConfig,
413
413
  scriptBodyInterpolationError
414
- } from "./cli-kmqgmcnb.js";
414
+ } from "./cli-y2x52gs2.js";
415
415
  import {
416
416
  require_dist2,
417
417
  publicEndpointSsrfOptions,
@@ -449,8 +449,11 @@ import {
449
449
  runSavedScriptAsAgent,
450
450
  resolveSyncRunAs,
451
451
  AppNameSchema,
452
- ColumnKindSchema,
452
+ ScalarColumnKindSchema,
453
453
  isIso8601Date,
454
+ jsonColumnSizeLabel,
455
+ jsonColumnValueIssue,
456
+ isValidColumnValue,
454
457
  SYSTEM_COLUMN_KINDS,
455
458
  SORTABLE_SYSTEM_DATE_COLUMNS,
456
459
  AppElementsSchema,
@@ -468,14 +471,14 @@ import {
468
471
  deleteApp,
469
472
  typecheckScript,
470
473
  parseSkillContent
471
- } from "./cli-0bh477zn.js";
474
+ } from "./cli-h38rjv87.js";
472
475
  import {
473
476
  buildAuthorizationUrl,
474
477
  onAuthorizationRefreshed,
475
478
  ensureAuthorizationTokenOrThrow,
476
479
  ensureToken,
477
480
  ensureTokenOrThrow
478
- } from "./cli-sjyetj21.js";
481
+ } from "./cli-s6vr7r2d.js";
479
482
  import {
480
483
  detachedProcessGroup,
481
484
  registerProcessGroup,
@@ -505,14 +508,14 @@ import {
505
508
  getSlackApp2,
506
509
  startSlackApp2,
507
510
  stopSlackApp2
508
- } from "./cli-vy0fay6k.js";
511
+ } from "./cli-nn47d7e8.js";
509
512
  import {
510
513
  slackCode,
511
514
  slackMissingScopeMessage,
512
515
  withAutoJoin,
513
516
  externalChannelToolError2,
514
517
  getChannelBlockReason2
515
- } from "./cli-mfe7f7b5.js";
518
+ } from "./cli-pkht5hap.js";
516
519
  import {
517
520
  BaseExecutor,
518
521
  postApprovalCancellationUpdates,
@@ -529,7 +532,7 @@ import {
529
532
  definitionNodeIds,
530
533
  validateDefinition,
531
534
  applyDefinitionPatch
532
- } from "./cli-tbhwrxpt.js";
535
+ } from "./cli-02qm7src.js";
533
536
  import {
534
537
  workflowEventBus2,
535
538
  init_event_bus
@@ -558,7 +561,7 @@ import {
558
561
  isPublicRoute,
559
562
  findRoute,
560
563
  route
561
- } from "./cli-z071fb95.js";
564
+ } from "./cli-efaqv1c7.js";
562
565
  import {
563
566
  isMultiRuntimeEnabled
564
567
  } from "./cli-7a91w22y.js";
@@ -570,7 +573,7 @@ import {
570
573
  import {
571
574
  getRuntimePool2,
572
575
  init_db
573
- } from "./cli-bn5kevnf.js";
576
+ } from "./cli-n85dqg6d.js";
574
577
  import {
575
578
  getMemoryRaterNames,
576
579
  REFERENCES_SOURCE_MAX_LENGTH,
@@ -611,7 +614,7 @@ import {
611
614
  resolveSessionToken,
612
615
  fingerprintApiKey,
613
616
  init_users
614
- } from "./cli-fz9kewbh.js";
617
+ } from "./cli-nmqdc2t3.js";
615
618
  import {
616
619
  isRbacEnabled,
617
620
  decideAdmission,
@@ -751,7 +754,7 @@ import {
751
754
  import {
752
755
  init_package,
753
756
  package_default
754
- } from "./cli-ash6xxk7.js";
757
+ } from "./cli-shvfedvm.js";
755
758
  import {
756
759
  realtimeBus,
757
760
  init_bus
@@ -21143,7 +21146,7 @@ class NotifyExecutor extends BaseExecutor {
21143
21146
  }
21144
21147
  }
21145
21148
  case "slack": {
21146
- const { getSlackApp } = await import("./app-kreq1gwg.js");
21149
+ const { getSlackApp } = await import("./app-9h14qvr6.js");
21147
21150
  const app = getSlackApp();
21148
21151
  if (!app) {
21149
21152
  return {
@@ -24505,7 +24508,7 @@ function setPreloadedTools(server, names) {
24505
24508
  async function applyPreToolCall(name, args, requestInfo, inputSchema) {
24506
24509
  if (requestInfo.callOrigin !== "mcp")
24507
24510
  return { args };
24508
- const dispatcher = await import("./dispatcher-0s0mckqr.js");
24511
+ const dispatcher = await import("./dispatcher-0a9wwjcx.js");
24509
24512
  const result = await dispatcher.dispatchPre("pre.tool.call", { tool: name, args, requestInfo }, inputSchema ? {
24510
24513
  validateModify: async (data) => {
24511
24514
  const schema = normalizeObjectSchema(inputSchema) ?? inputSchema;
@@ -33818,7 +33821,7 @@ async function notifySlack(text) {
33818
33821
  return;
33819
33822
  }
33820
33823
  try {
33821
- const { getSlackApp } = await import("./app-kreq1gwg.js");
33824
+ const { getSlackApp } = await import("./app-9h14qvr6.js");
33822
33825
  const app = getSlackApp();
33823
33826
  if (!app) {
33824
33827
  console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
@@ -33889,7 +33892,7 @@ async function deleteJiraWebhook(webhookId) {
33889
33892
  console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
33890
33893
  }
33891
33894
  async function overwriteWebhookIds(next) {
33892
- const { getDbClient } = await import("./db-w505dwa8.js");
33895
+ const { getDbClient } = await import("./db-nn0hcmx5.js");
33893
33896
  await getDbClient().transaction(async (tx) => {
33894
33897
  const row = await tx.get("SELECT metadata FROM oauth_apps WHERE provider = 'jira'");
33895
33898
  if (!row) {
@@ -107239,7 +107242,7 @@ async function reloadGlobalConfigsAndIntegrations() {
107239
107242
  return runWithoutRequestAuth(() => reloadGlobalConfigsAndIntegrationsInner());
107240
107243
  }
107241
107244
  async function reloadGlobalConfigsAndIntegrationsInner() {
107242
- const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-x5aktmp8.js");
107245
+ const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-smxyk04s.js");
107243
107246
  const wasEmbeddingsConfigured = getEmbeddingProvider().isConfigured();
107244
107247
  const updated = await loadGlobalConfigsIntoEnv(true);
107245
107248
  await syncTelemetryEnabled("settings").catch((err) => {
@@ -107255,10 +107258,10 @@ async function reloadGlobalConfigsAndIntegrationsInner() {
107255
107258
  integrations.push("embeddings");
107256
107259
  }
107257
107260
  if (!wasEmbeddingsConfigured && isEmbeddingsConfigured) {
107258
- import("./boot-reembed-e53x6b9v.js").then(({ runBootReembed }) => runBootReembed()).catch((err) => {
107261
+ import("./boot-reembed-6yn53ms9.js").then(({ runBootReembed }) => runBootReembed()).catch((err) => {
107259
107262
  console.error("[config-reload] memory backfill failed (non-fatal):", err);
107260
107263
  });
107261
- import("./boot-reembed-f6z923ny.js").then(({ runBootReembedScripts }) => runBootReembedScripts()).catch((err) => {
107264
+ import("./boot-reembed-7fcka4z5.js").then(({ runBootReembedScripts }) => runBootReembedScripts()).catch((err) => {
107262
107265
  console.error("[config-reload] script backfill failed (non-fatal):", err);
107263
107266
  });
107264
107267
  }
@@ -107852,6 +107855,8 @@ function appIndexKey(model, column, value, rowId) {
107852
107855
  function isIndexed(column) {
107853
107856
  if (column.hidden === true)
107854
107857
  return false;
107858
+ if (column.kind === "json")
107859
+ return false;
107855
107860
  if (column.kind === "enum")
107856
107861
  return true;
107857
107862
  return column.index === true && (column.kind === "string" || column.kind === "boolean");
@@ -107869,15 +107874,7 @@ function indexKeys(model, definition, row) {
107869
107874
  function validValue(column, value) {
107870
107875
  if (value === null)
107871
107876
  return column.required !== true;
107872
- if (column.kind === "string")
107873
- return typeof value === "string";
107874
- if (column.kind === "number")
107875
- return typeof value === "number" && Number.isFinite(value);
107876
- if (column.kind === "boolean")
107877
- return typeof value === "boolean";
107878
- if (column.kind === "date")
107879
- return typeof value === "string" && isIso8601Date(value);
107880
- return typeof value === "string" && Boolean(column.enum?.includes(value));
107877
+ return isValidColumnValue(column, value);
107881
107878
  }
107882
107879
  function joinKeyColumnNames(definition) {
107883
107880
  const names = new Set;
@@ -107933,7 +107930,19 @@ function prepareValues(definition, values, mode, options = {}) {
107933
107930
  if (!Object.hasOwn(definition.columns, name))
107934
107931
  continue;
107935
107932
  const column = definition.columns[name];
107936
- if (!validValue(column, value)) {
107933
+ if (column.kind === "json" && value !== null) {
107934
+ const issue = jsonColumnValueIssue(value);
107935
+ if (issue === "unserializable") {
107936
+ issues.push({ path: `values.${name}`, message: "must be a valid json value" });
107937
+ } else if (issue === "non-finite") {
107938
+ issues.push({ path: `values.${name}`, message: "json value contains a non-finite number" });
107939
+ } else if (issue === "oversized") {
107940
+ issues.push({
107941
+ path: `values.${name}`,
107942
+ message: `json value exceeds the ${jsonColumnSizeLabel()} size limit`
107943
+ });
107944
+ }
107945
+ } else if (!validValue(column, value)) {
107937
107946
  issues.push({ path: `values.${name}`, message: `must be a valid ${column.kind} value` });
107938
107947
  }
107939
107948
  }
@@ -108460,17 +108469,6 @@ function applyTransform(value, transform) {
108460
108469
  }
108461
108470
  }
108462
108471
  }
108463
- function validForKind(column, value) {
108464
- if (column.kind === "string")
108465
- return typeof value === "string";
108466
- if (column.kind === "number")
108467
- return typeof value === "number" && Number.isFinite(value);
108468
- if (column.kind === "boolean")
108469
- return typeof value === "boolean";
108470
- if (column.kind === "date")
108471
- return typeof value === "string" && isIso8601Date(value);
108472
- return typeof value === "string" && Boolean(column.enum?.includes(value));
108473
- }
108474
108472
  function projectRecord(args) {
108475
108473
  const values = { [args.joinKey]: args.record.key };
108476
108474
  for (const [name, column] of args.bindings) {
@@ -108485,7 +108483,7 @@ function projectRecord(args) {
108485
108483
  warn(args.warnings, `column "${name}": transform "${binding.transform}" failed — ${error instanceof Error ? error.message : String(error)}`);
108486
108484
  value = null;
108487
108485
  }
108488
- if (value !== null && !validForKind(column, value)) {
108486
+ if (value !== null && !isValidColumnValue(column, value)) {
108489
108487
  warn(args.warnings, `column "${name}": field "${binding.field}" produced a value that is not a valid ${column.kind}`);
108490
108488
  value = null;
108491
108489
  }
@@ -108493,8 +108491,12 @@ function projectRecord(args) {
108493
108491
  }
108494
108492
  return values;
108495
108493
  }
108496
- function sameValue(existing, projected) {
108497
- return Object.is(existing ?? null, projected ?? null);
108494
+ function sameValue(column, existing, projected) {
108495
+ const before = existing ?? null;
108496
+ const after = projected ?? null;
108497
+ if (column?.kind === "json")
108498
+ return Bun.deepEquals(before, after);
108499
+ return Object.is(before, after);
108498
108500
  }
108499
108501
  async function resolvePair(appId, model, source) {
108500
108502
  const app = await getApp(appId);
@@ -108584,7 +108586,7 @@ function reconcile(args) {
108584
108586
  tally.created += 1;
108585
108587
  return;
108586
108588
  }
108587
- const differs = Object.entries(values).some(([name, value]) => !sameValue(existing[name], value));
108589
+ const differs = Object.entries(values).some(([name, value]) => !sameValue(modelDef.columns[name], existing[name], value));
108588
108590
  const updated = await patchAppRowUnlocked(appId, model, modelDef, existing.id, values, {
108589
108591
  allowSourceManaged: true,
108590
108592
  envelope,
@@ -108944,7 +108946,13 @@ init_db3();
108944
108946
  init_zod();
108945
108947
  init_db3();
108946
108948
  init_secret_scrubber();
108947
- var MigrationValueSchema = union2([string2(), number2(), boolean()]);
108949
+ var MigrationValueSchema = union2([
108950
+ string2(),
108951
+ number2(),
108952
+ boolean(),
108953
+ record2(string2(), unknown()),
108954
+ array2(unknown())
108955
+ ]);
108948
108956
  var AppMigrationDirectiveSchema = union2([
108949
108957
  object2({ set: MigrationValueSchema }).strict(),
108950
108958
  object2({
@@ -109174,15 +109182,7 @@ function isPurgeDirective(directive) {
109174
109182
  function columnAccepts(column, value) {
109175
109183
  if (value === null)
109176
109184
  return column.hidden === true || column.required !== true;
109177
- if (column.kind === "string")
109178
- return typeof value === "string";
109179
- if (column.kind === "number")
109180
- return typeof value === "number" && Number.isFinite(value);
109181
- if (column.kind === "boolean")
109182
- return typeof value === "boolean";
109183
- if (column.kind === "date")
109184
- return typeof value === "string" && isIso8601Date(value);
109185
- return typeof value === "string" && Boolean(column.enum?.includes(value));
109185
+ return isValidColumnValue(column, value);
109186
109186
  }
109187
109187
  function coerceValue(value, oldColumn, nextColumn) {
109188
109188
  if (columnAccepts(nextColumn, value))
@@ -110132,7 +110132,7 @@ var AppSyncStatusSchema = object2({
110132
110132
  });
110133
110133
  var UserConfigValuesSchema = record2(string2(), union2([string2(), number2(), boolean(), _null()]));
110134
110134
  var AppUserConfigFieldSchema = object2({
110135
- kind: ColumnKindSchema,
110135
+ kind: ScalarColumnKindSchema,
110136
110136
  default: union2([string2(), number2(), boolean()]).optional(),
110137
110137
  enum: array2(string2()).optional(),
110138
110138
  label: string2().optional()
@@ -110609,6 +110609,8 @@ async function resolveModel(appId, modelName, res) {
110609
110609
  return { app, model: app.definition.models[modelName] };
110610
110610
  }
110611
110611
  function parseFilterValue(raw, column) {
110612
+ if (column.kind === "json")
110613
+ throw new Error("json columns cannot be filtered");
110612
110614
  if (column.kind === "number") {
110613
110615
  if (!DECIMAL_NUMBER_PATTERN.test(raw))
110614
110616
  throw new Error("must be a decimal number");
@@ -110768,6 +110770,9 @@ function applyQuery(rows, query, model, params = {}, queryName = "<unnamed>") {
110768
110770
  return selected.slice(0, query.limit ?? 200);
110769
110771
  }
110770
110772
  async function selectAppRows(appId, modelName, model, filters, sortRaw, limit = 200, systemColumns = false) {
110773
+ const jsonFilterIssues = filters.flatMap((filter) => Object.hasOwn(model.columns, filter.column) && model.columns[filter.column].kind === "json" ? [{ path: `filter.${filter.column}`, message: "json columns cannot be filtered" }] : []);
110774
+ if (jsonFilterIssues.length > 0)
110775
+ throw new AppRowValidationError(jsonFilterIssues);
110771
110776
  const rows = (await listAppRows(appId, modelName, filters.flatMap((filter) => typeof filter.value === "string" || typeof filter.value === "number" || typeof filter.value === "boolean" ? [{ column: filter.column, value: filter.value }] : []))).filter((row) => rowMatchesFilters(row, filters));
110772
110777
  if (sortRaw) {
110773
110778
  const [column, dir, extra] = sortRaw.split(":");
@@ -110776,6 +110781,9 @@ async function selectAppRows(appId, modelName, model, filters, sortRaw, limit =
110776
110781
  { path: "sort", message: "must be <column>:<asc|desc> for a known column" }
110777
110782
  ]);
110778
110783
  }
110784
+ if (model.columns[column]?.kind === "json") {
110785
+ throw new AppRowValidationError([{ path: "sort", message: "json columns cannot be sorted" }]);
110786
+ }
110779
110787
  rows.sort((a, b) => {
110780
110788
  const result = compareValues(rowValue(a, column), rowValue(b, column), dir, SORTABLE_SYSTEM_DATE_COLUMNS.has(column) || Object.hasOwn(model.columns, column) && model.columns[column].kind === "date");
110781
110789
  return result;
@@ -111842,6 +111850,11 @@ function rowFilters(model, equals = {}) {
111842
111850
  { path: `equals.${column}`, message: "Unknown or hidden column." }
111843
111851
  ]);
111844
111852
  }
111853
+ if (declared?.kind === "json") {
111854
+ throw new AppRowValidationError([
111855
+ { path: `equals.${column}`, message: "json columns cannot be filtered" }
111856
+ ]);
111857
+ }
111845
111858
  if (!validValue(declared ?? { kind: SYSTEM_COLUMN_KINDS[column] }, value)) {
111846
111859
  throw new AppRowValidationError([
111847
111860
  { path: `equals.${column}`, message: "Filter value must match the column kind." }
@@ -2,7 +2,7 @@ import {
2
2
  getDb2,
3
3
  getDbClient2,
4
4
  init_db3
5
- } from "./cli-rqqsfz30.js";
5
+ } from "./cli-d3qqdy4c.js";
6
6
  import {
7
7
  PermissionVerbSchema,
8
8
  init_rbac
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_package,
3
3
  package_default
4
- } from "./cli-ash6xxk7.js";
4
+ } from "./cli-shvfedvm.js";
5
5
 
6
6
  // src/commands/shared/client-config.ts
7
7
  init_package();
@@ -21,7 +21,7 @@ import {
21
21
  upsertSwarmConfig2,
22
22
  getResolvedConfig2,
23
23
  init_db3
24
- } from "./cli-rqqsfz30.js";
24
+ } from "./cli-d3qqdy4c.js";
25
25
  import {
26
26
  runtimeStaleThresholdMinutes,
27
27
  getRuntimeInstanceById,
@@ -31,7 +31,7 @@ import {
31
31
  listRuntimeInstancesForPool,
32
32
  createWorkerTaskFollowUp,
33
33
  canClaim
34
- } from "./cli-kr2pmfqx.js";
34
+ } from "./cli-5rk36sjf.js";
35
35
  import {
36
36
  getRuntimeController2,
37
37
  getRuntimeControllerTarget2,
@@ -42,7 +42,7 @@ import {
42
42
  getPoolForAgent2,
43
43
  resolvePoolDelivery2,
44
44
  init_db
45
- } from "./cli-bn5kevnf.js";
45
+ } from "./cli-n85dqg6d.js";
46
46
  import {
47
47
  workflowEventBus2,
48
48
  init_event_bus
@@ -61,7 +61,7 @@ import {
61
61
  import {
62
62
  mintRuntimeToken,
63
63
  init_users
64
- } from "./cli-fz9kewbh.js";
64
+ } from "./cli-nmqdc2t3.js";
65
65
  import {
66
66
  TERMINAL_TASK_STATUSES,
67
67
  isTerminalTaskStatus,
@@ -522,7 +522,7 @@ async function recoverSessions(runtimeId, reason) {
522
522
  }
523
523
  if (!sessions.length)
524
524
  return;
525
- const { remediateTaskForDeadRuntime } = await import("./heartbeat-tww6yx1w.js");
525
+ const { remediateTaskForDeadRuntime } = await import("./heartbeat-gz97r7ac.js");
526
526
  for (const session of sessions) {
527
527
  try {
528
528
  const task = await getTaskById2(session.taskId);
@@ -31,7 +31,7 @@ import {
31
31
  import {
32
32
  init_package,
33
33
  package_default
34
- } from "./cli-ash6xxk7.js";
34
+ } from "./cli-shvfedvm.js";
35
35
  import {
36
36
  MAX_PROFILE_FILE_LENGTH,
37
37
  getMcpBaseUrl,
@@ -2,17 +2,17 @@ import {
2
2
  getKv2,
3
3
  upsertKv2,
4
4
  init_db3
5
- } from "./cli-rqqsfz30.js";
5
+ } from "./cli-d3qqdy4c.js";
6
6
  import {
7
7
  resolveIdentity,
8
8
  recordUnmappedIdentity
9
- } from "./cli-kr2pmfqx.js";
9
+ } from "./cli-5rk36sjf.js";
10
10
  import {
11
11
  findUserByExternalId,
12
12
  findOrCreateUserByEmail,
13
13
  linkIdentity,
14
14
  init_users
15
- } from "./cli-fz9kewbh.js";
15
+ } from "./cli-nmqdc2t3.js";
16
16
 
17
17
  // src/slack/enrich.ts
18
18
  init_db3();