@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.
- package/dist/{acp-adapter-zvzr538d.js → acp-adapter-dv7hmx4r.js} +1 -1
- package/dist/{actions-jhtqdw69.js → actions-51nc1gny.js} +16 -16
- package/dist/{amp-adapter-bd84rhs2.js → amp-adapter-abp5tdx8.js} +1 -1
- package/dist/{app-kreq1gwg.js → app-9h14qvr6.js} +3 -3
- package/dist/{assistant-3k22sbsq.js → assistant-wv1gz3mt.js} +17 -17
- package/dist/{boot-reembed-e53x6b9v.js → boot-reembed-6yn53ms9.js} +1 -1
- package/dist/{boot-reembed-f6z923ny.js → boot-reembed-7fcka4z5.js} +1 -1
- package/dist/{boot-scrub-sweep-0538vsb7.js → boot-scrub-sweep-pm1580ax.js} +2 -2
- package/dist/{boot-seeds-6wxqkfk2.js → boot-seeds-g5hfc1x8.js} +4 -4
- package/dist/{claude-adapter-gfts5044.js → claude-adapter-gf3kxhf0.js} +2 -2
- package/dist/{claude-sdk-session-56besmfz.js → claude-sdk-session-s2k1qd8y.js} +2 -2
- package/dist/{cli-tbhwrxpt.js → cli-02qm7src.js} +3 -3
- package/dist/{cli-3kh4kpqy.js → cli-0qvtffe9.js} +5 -5
- package/dist/{cli-p6argxh9.js → cli-10hhg0km.js} +6 -6
- package/dist/{cli-gf0kfg81.js → cli-239yjk27.js} +2 -2
- package/dist/{cli-kr2pmfqx.js → cli-5rk36sjf.js} +72 -59
- package/dist/{cli-nx462e4v.js → cli-7awf1fp8.js} +1 -1
- package/dist/{cli-jh0qcrga.js → cli-8sxqsbbq.js} +1 -1
- package/dist/{cli-axh29tyr.js → cli-8zwe9mpk.js} +5 -5
- package/dist/{cli-z1ew8vbq.js → cli-ahtpy9kf.js} +1 -1
- package/dist/{cli-3r448dqn.js → cli-bcj753sq.js} +3 -3
- package/dist/{cli-rqqsfz30.js → cli-d3qqdy4c.js} +82 -12
- package/dist/{cli-z071fb95.js → cli-efaqv1c7.js} +4 -4
- package/dist/{cli-s48yvzb8.js → cli-faypxz7q.js} +3 -3
- package/dist/{cli-m2qgh5sv.js → cli-ftyypbg5.js} +1 -1
- package/dist/{cli-6ncjvx55.js → cli-fyzjmseb.js} +1 -1
- package/dist/{cli-0bh477zn.js → cli-h38rjv87.js} +117 -9
- package/dist/{cli-3p8fqcnh.js → cli-h93c9vb3.js} +1 -1
- package/dist/{cli-rdq7tzwm.js → cli-hyfw2j1e.js} +8 -8
- package/dist/{cli-bn5kevnf.js → cli-n85dqg6d.js} +2 -2
- package/dist/{cli-fz9kewbh.js → cli-nmqdc2t3.js} +1 -1
- package/dist/{cli-vy0fay6k.js → cli-nn47d7e8.js} +10 -10
- package/dist/{cli-mfe7f7b5.js → cli-pkht5hap.js} +1 -1
- package/dist/{cli-xftrvxag.js → cli-r99kc9yq.js} +1 -1
- package/dist/{cli-p0rakbrk.js → cli-rdyw3mct.js} +1 -1
- package/dist/{cli-sjyetj21.js → cli-s6vr7r2d.js} +1 -1
- package/dist/{cli-k9z4zd4p.js → cli-saw9a6f6.js} +2 -2
- package/dist/{cli-ash6xxk7.js → cli-shvfedvm.js} +2 -2
- package/dist/{cli-syhq378v.js → cli-t30yj95q.js} +1 -1
- package/dist/{cli-kmqgmcnb.js → cli-y2x52gs2.js} +4 -4
- package/dist/{cli-471qk6s2.js → cli-y8n5k515.js} +14 -14
- package/dist/{cli-3tnpj2bh.js → cli-z4wd2ftv.js} +1 -1
- package/dist/cli.js +12 -12
- package/dist/{codex-adapter-p6rmm7vv.js → codex-adapter-ttygw382.js} +1 -1
- package/dist/{codex-session-runner-8vd5t9t0.js → codex-session-runner-60b58vv3.js} +1 -1
- package/dist/{commands-7ems2p13.js → commands-edmdwa4x.js} +2 -2
- package/dist/{controllers-connect-bg33ae53.js → controllers-connect-5fym8sw1.js} +16 -16
- package/dist/{db-ys2rbdft.js → db-2y0mgstc.js} +3 -3
- package/dist/{db-w505dwa8.js → db-nn0hcmx5.js} +5 -1
- package/dist/{dispatcher-0s0mckqr.js → dispatcher-0a9wwjcx.js} +15 -15
- package/dist/{external-channel-5b23fv8z.js → external-channel-zhvt95n3.js} +2 -2
- package/dist/{grok-adapter-q9fghe5q.js → grok-adapter-qnr1hp2y.js} +2 -2
- package/dist/{handlers-mqrym347.js → handlers-dkcarkd0.js} +18 -18
- package/dist/{heartbeat-tww6yx1w.js → heartbeat-gz97r7ac.js} +17 -17
- package/dist/{hook-dx0pkvar.js → hook-1mmdgjqs.js} +1 -1
- package/dist/{hook-pvmh9b6m.js → hook-x8rthca4.js} +1 -1
- package/dist/{http-k2ejbt05.js → http-r8f85xr9.js} +111 -65
- package/dist/{index-pqfwh9nn.js → index-5jecgp3n.js} +17 -17
- package/dist/{index-h2ek08d6.js → index-aex0eba9.js} +15 -15
- package/dist/{index-x5aktmp8.js → index-smxyk04s.js} +1 -1
- package/dist/{index-dgz61nff.js → index-vzvfqzfj.js} +15 -15
- package/dist/{index-2z710v4x.js → index-y7rbcrc1.js} +8 -8
- package/dist/{keepalive-nhvpw10z.js → keepalive-64c0f34c.js} +3 -3
- package/dist/{lead-jb6sf69z.js → lead-b1da0f97.js} +23 -23
- package/dist/{maintenance-agakc519.js → maintenance-mnxpar12.js} +1 -1
- package/dist/{oauth-refresh-sweep-4dcbhtn0.js → oauth-refresh-sweep-36hs2v4h.js} +2 -2
- package/dist/{onboard-4n2kwa4v.js → onboard-xes8de61.js} +2 -2
- package/dist/{otel-impl-tfa12080.js → otel-impl-fzc57kcq.js} +1 -1
- package/dist/{pricing-refresh-3cqx3f3x.js → pricing-refresh-1nek2w7b.js} +3 -3
- package/dist/{rbac-roles-y6zbfzve.js → rbac-roles-sqefb5hw.js} +2 -2
- package/dist/{rbac-roles-9fae5rnv.js → rbac-roles-ttyfaep2.js} +1 -1
- package/dist/{render-v2-emawjvc4.js → render-v2-vb527jwn.js} +3 -3
- package/dist/{resume-zhgts7h7.js → resume-jcdzg1bn.js} +5 -5
- package/dist/{session-access-cm823e06.js → session-access-zsp4wsp0.js} +4 -4
- package/dist/{setup-tkp99w1e.js → setup-1nb2zqd3.js} +1 -1
- package/dist/{work-objects-f722h263.js → work-objects-61w08fwr.js} +18 -18
- package/dist/{worker-p7f336rq.js → worker-c1e68hpa.js} +23 -23
- package/openapi.json +393 -1
- package/package.json +2 -2
- package/src/apps/catalog.generated.json +3 -2
- package/src/apps/definition.ts +152 -4
- package/src/apps/row-store.ts +19 -7
- package/src/apps/schema-migrate.ts +14 -6
- package/src/apps/script-types.ts +1 -0
- package/src/apps/sync.ts +20 -19
- package/src/be/db/tasks/read.ts +112 -0
- package/src/be/db.ts +2 -0
- package/src/be/swarm-config-guard.ts +15 -0
- package/src/http/apps.ts +15 -2
- package/src/http/status.ts +49 -43
- package/src/http/tasks.ts +47 -0
- package/src/providers/acp-targets.ts +1 -1
- package/src/providers/amp-adapter.ts +1 -1
- package/src/telemetry.ts +15 -3
- package/src/tests/app-row-tools.test.ts +25 -0
- package/src/tests/apps-json-column.test.ts +611 -0
- package/src/tests/apps-script-types.test.ts +2 -0
- package/src/tests/apps-sync-engine.test.ts +42 -0
- package/src/tests/db-task-read-contract.test.ts +4 -0
- package/src/tests/db-task-write-contract.test.ts +2 -0
- package/src/tests/docs-index-footprint.test.js +2 -2
- package/src/tests/runner-harness-telemetry-env.test.ts +6 -0
- package/src/tests/status.test.ts +158 -9
- package/src/tests/task-lineage.test.ts +180 -0
- package/src/tests/telemetry-init.test.ts +62 -5
- package/src/tests/user-token-rest-auth.test.ts +38 -0
- package/src/tools/app-rows.ts +5 -0
- package/templates/skills/apps/SKILL.md +3 -2
- 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-
|
|
335
|
+
} from "./cli-d3qqdy4c.js";
|
|
336
336
|
import {
|
|
337
337
|
getUserGrant2,
|
|
338
338
|
init_rbac_roles
|
|
339
|
-
} from "./cli-
|
|
339
|
+
} from "./cli-7awf1fp8.js";
|
|
340
340
|
import {
|
|
341
341
|
ensurePricingSeeded2,
|
|
342
342
|
ensureRbacSeeded2,
|
|
343
343
|
ensureModelProfilesSeeded2
|
|
344
|
-
} from "./cli-
|
|
344
|
+
} from "./cli-faypxz7q.js";
|
|
345
345
|
import {
|
|
346
346
|
loadModelsDevCache
|
|
347
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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 (
|
|
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 && !
|
|
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
|
-
|
|
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([
|
|
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
|
-
|
|
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:
|
|
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." }
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
upsertSwarmConfig2,
|
|
22
22
|
getResolvedConfig2,
|
|
23
23
|
init_db3
|
|
24
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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);
|
|
@@ -2,17 +2,17 @@ import {
|
|
|
2
2
|
getKv2,
|
|
3
3
|
upsertKv2,
|
|
4
4
|
init_db3
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-d3qqdy4c.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveIdentity,
|
|
8
8
|
recordUnmappedIdentity
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-5rk36sjf.js";
|
|
10
10
|
import {
|
|
11
11
|
findUserByExternalId,
|
|
12
12
|
findOrCreateUserByEmail,
|
|
13
13
|
linkIdentity,
|
|
14
14
|
init_users
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-nmqdc2t3.js";
|
|
16
16
|
|
|
17
17
|
// src/slack/enrich.ts
|
|
18
18
|
init_db3();
|