@desplega.ai/agent-swarm 2.8.1 → 2.8.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-pdy3qsvg.js → acp-adapter-fqzkxyra.js} +3 -3
- package/dist/{actions-pwjpn0j6.js → actions-kxek041g.js} +17 -17
- package/dist/{amp-adapter-cq9jgj6x.js → amp-adapter-ce7jjke4.js} +1 -1
- package/dist/{app-cnfffgwg.js → app-v6zz8yh0.js} +3 -3
- package/dist/{assistant-kpn317y1.js → assistant-m0sw9xx2.js} +18 -18
- package/dist/{boot-args-schema-pbbnhmc3.js → boot-args-schema-66bk37wv.js} +1 -1
- package/dist/{boot-reembed-9m0ysxma.js → boot-reembed-edjpwsc1.js} +1 -1
- package/dist/{boot-reembed-majbn53m.js → boot-reembed-y27n09tz.js} +1 -1
- package/dist/{boot-scrub-sweep-app8g8ym.js → boot-scrub-sweep-1xc35965.js} +3 -3
- package/dist/{boot-seeds-pbtmvcjm.js → boot-seeds-7hjj91qj.js} +4 -4
- package/dist/{boxd-qbkxy6ap.js → boxd-ent8ch04.js} +1 -1
- package/dist/{claude-adapter-wn1g3qp5.js → claude-adapter-stw7jdcf.js} +3 -3
- package/dist/{claude-managed-setup-pd47nzch.js → claude-managed-setup-y6z2perp.js} +1 -1
- package/dist/{claude-sdk-session-3a2a6589.js → claude-sdk-session-vvya8wqk.js} +3 -3
- package/dist/{cli-wk18cm92.js → cli-0cq8y6m7.js} +1 -1
- package/dist/{cli-p1w18yhx.js → cli-1pz0330a.js} +1 -1
- package/dist/{cli-d3p5vwbk.js → cli-1qkz151v.js} +3 -3
- package/dist/{cli-89cqnasv.js → cli-26ctbcdp.js} +18 -6
- package/dist/{cli-syybb0p1.js → cli-2kvhc7x8.js} +7 -7
- package/dist/{cli-93k32c37.js → cli-3e875j5p.js} +128 -41
- package/dist/{cli-k0615eh8.js → cli-3sy2xags.js} +10 -10
- package/dist/{cli-dy32zecz.js → cli-3vmb0n58.js} +1 -1
- package/dist/{cli-4r05hnqa.js → cli-4vzgeta4.js} +13 -13
- package/dist/{cli-b5rs97a6.js → cli-5y340nzn.js} +4 -4
- package/dist/{cli-7p1kvkck.js → cli-6rc5frdm.js} +1 -1
- package/dist/{cli-jcpr5smb.js → cli-837vfs2x.js} +2 -2
- package/dist/{cli-b085njxz.js → cli-959kp5h2.js} +12 -11
- package/dist/{cli-k93bq1wq.js → cli-97ae65rz.js} +4 -4
- package/dist/{cli-m4dqmnbp.js → cli-9mb2q6pb.js} +1 -1
- package/dist/{cli-bb431xey.js → cli-a0z912j7.js} +121 -33
- package/dist/{cli-k26bkr9t.js → cli-b98a65ed.js} +3 -3
- package/dist/{cli-k0wwfqbg.js → cli-dns0y538.js} +4 -0
- package/dist/{cli-tk7cjj8h.js → cli-dzpc6en0.js} +1 -1
- package/dist/{cli-6mma83xa.js → cli-e1p3n5gq.js} +4 -4
- package/dist/{cli-re4raaj0.js → cli-f4e8r23x.js} +1 -1
- package/dist/{cli-qmqk2yc2.js → cli-f4r3g076.js} +1 -1
- package/dist/{cli-pcad4cb1.js → cli-f6bahpn5.js} +1 -1
- package/dist/{cli-b8e9nb04.js → cli-fpjmegdb.js} +1 -1
- package/dist/{cli-0ntbxyaa.js → cli-fwy8kfd6.js} +271 -37
- package/dist/{cli-tacge1w0.js → cli-g5mtmf6t.js} +6 -6
- package/dist/{cli-sn7rtnj4.js → cli-gyt3zydq.js} +3 -3
- package/dist/{cli-vbh10fqa.js → cli-j24zbska.js} +3 -3
- package/dist/{cli-vqptjbr7.js → cli-jdknh18m.js} +10 -10
- package/dist/{cli-7b8sbmag.js → cli-kjtwrhea.js} +1 -1
- package/dist/{cli-9vhebtjz.js → cli-mxn1qvbn.js} +3 -2
- package/dist/{cli-zcsw143p.js → cli-n6vtrcht.js} +1 -1
- package/dist/{cli-2zp0et3v.js → cli-pchypa1s.js} +55 -19
- package/dist/{cli-gax7fk3t.js → cli-pfs8adn4.js} +1 -1
- package/dist/{cli-1xh9a7hn.js → cli-q24n86d2.js} +2 -2
- package/dist/{cli-7w69ne2f.js → cli-rcecc3yq.js} +167 -43
- package/dist/{cli-xae4g51r.js → cli-rh15cakt.js} +1 -1
- package/dist/{cli-yn2bbre9.js → cli-rmzsadkf.js} +1 -1
- package/dist/{cli-a3b239vq.js → cli-t2tma8gb.js} +1 -1
- package/dist/{cli-9wngrawf.js → cli-tekytdq9.js} +2 -2
- package/dist/{cli-tqegb8eq.js → cli-vdektqgf.js} +1 -1
- package/dist/{cli-cyhbbd1z.js → cli-w401b9tq.js} +1 -1
- package/dist/{cli-jywyhqws.js → cli-xf3qw745.js} +3 -3
- package/dist/{cli-hxpyc9sn.js → cli-z1w943va.js} +2 -2
- package/dist/{cli-yncmerje.js → cli-zh9rsbqf.js} +2 -2
- package/dist/cli.js +16 -16
- package/dist/{codex-adapter-nha71q3n.js → codex-adapter-zerf5qsp.js} +1 -1
- package/dist/{codex-hook-h3vk6xzr.js → codex-hook-30gyhzxe.js} +1 -1
- package/dist/{codex-session-runner-ak9x1k1h.js → codex-session-runner-89s304py.js} +1 -1
- package/dist/{commands-f587qpq8.js → commands-jeh1b51j.js} +3 -3
- package/dist/{controller-hxx8wwy1.js → controller-mctfbrse.js} +3 -3
- package/dist/{controllers-connect-k5sg9m9h.js → controllers-connect-nxa1ddwn.js} +18 -18
- package/dist/{cursor-adapter-n5nc3mfe.js → cursor-adapter-qj8vehv6.js} +1 -1
- package/dist/{db-nzf8zb5z.js → db-2dvay0es.js} +3 -3
- package/dist/{db-amm8w15a.js → db-b36qn6k3.js} +2 -2
- package/dist/{dispatcher-89zrts8f.js → dispatcher-gndbta01.js} +16 -16
- package/dist/{dsh-adapter-nrhbrjz8.js → dsh-adapter-f75sz821.js} +1 -1
- package/dist/{e2b-jkwfhbcv.js → e2b-3gpc2n3w.js} +1 -1
- package/dist/{e2b-s16txnpx.js → e2b-jbm7mj93.js} +1 -1
- package/dist/{embedding-space-ezwenjmj.js → embedding-space-4p05vb2x.js} +6 -6
- package/dist/{embeddings-np74ht6g.js → embeddings-m6768mgh.js} +1 -1
- package/dist/{external-channel-z46yx9d7.js → external-channel-gjv3jne3.js} +2 -2
- package/dist/{fx-adapter-3q12snn6.js → fx-adapter-rpsgb1tw.js} +4 -4
- package/dist/{grok-adapter-ahb1w033.js → grok-adapter-n2m3zjg1.js} +4 -4
- package/dist/handlers-nv8edn19.js +32 -0
- package/dist/{heartbeat-dt9qw9c8.js → heartbeat-a1tv60gt.js} +19 -19
- package/dist/{hook-8k6fbz9b.js → hook-8h5dzcgq.js} +2 -2
- package/dist/{hook-jgcgygex.js → hook-cyaps9ba.js} +4 -4
- package/dist/{http-haw4r8ne.js → http-t15mhbd9.js} +1731 -77
- package/dist/{index-s4ewdma4.js → index-ksmyd6kc.js} +16 -16
- package/dist/{index-tez78qj3.js → index-qav6455f.js} +13 -11
- package/dist/index-rjnrje98.js +32 -0
- package/dist/index-tv3413wy.js +33 -0
- package/dist/{index-5gk12my8.js → index-w1zqf680.js} +1 -1
- package/dist/{keepalive-xn6s7rmg.js → keepalive-91s7hzrb.js} +3 -3
- package/dist/{lead-6ygbfhbh.js → lead-3hmddvrm.js} +30 -30
- package/dist/{maintenance-vdts800b.js → maintenance-7pjmy5xy.js} +1 -1
- package/dist/{oauth-refresh-sweep-094c8wfk.js → oauth-refresh-sweep-rzqfm94j.js} +2 -2
- package/dist/{onboard-v99eh56m.js → onboard-74st7pag.js} +3 -3
- package/dist/{opencode-adapter-dsagkhtw.js → opencode-adapter-arn7gm8q.js} +2 -2
- package/dist/{otel-impl-q7yr9yp0.js → otel-impl-rnzey8cb.js} +1 -1
- package/dist/{pi-mono-adapter-546cd1cc.js → pi-mono-adapter-6mkwq64n.js} +3 -2
- package/dist/{pricing-refresh-7dh2yase.js → pricing-refresh-ha21jhk7.js} +2 -2
- package/dist/{rbac-roles-npbmdh77.js → rbac-roles-59dxachk.js} +2 -2
- package/dist/{rbac-roles-mdmc96p4.js → rbac-roles-wqhma4dr.js} +3 -3
- package/dist/{render-v2-twhhwmms.js → render-v2-14kpzx12.js} +3 -3
- package/dist/{resume-5gsrjd5e.js → resume-gsa5fb5f.js} +6 -6
- package/dist/{session-access-m191x30x.js → session-access-skm7bnp6.js} +4 -4
- package/dist/{session-source-backfill-nt923ask.js → session-source-backfill-pbqzbncv.js} +2 -2
- package/dist/{setup-wv467afy.js → setup-5yermsem.js} +1 -1
- package/dist/{work-objects-8zkrpy13.js → work-objects-xj0ck0w4.js} +19 -19
- package/dist/{worker-follow-up-cecqszem.js → worker-follow-up-911xc0b8.js} +18 -16
- package/dist/{worker-mz5z7kj0.js → worker-qgg0m2gw.js} +30 -30
- package/openapi.json +1741 -290
- package/package.json +2 -2
- package/src/apps/catalog.generated.json +120 -1
- package/src/apps/definition.ts +38 -11
- package/src/apps/page-validator.ts +88 -0
- package/src/be/db/model-profiles.ts +110 -11
- package/src/be/db/tasks/read.ts +20 -0
- package/src/be/db/workflow-run-definitions.ts +19 -8
- package/src/be/db-client.ts +43 -5
- package/src/be/db.ts +9 -3
- package/src/be/migrations/284_model_profile_fallbacks.sql +9 -0
- package/src/be/model-profile-check.ts +43 -18
- package/src/be/runtime-pools/routing.ts +1 -0
- package/src/be/savings/calibrate.ts +468 -0
- package/src/be/savings/compute.ts +182 -0
- package/src/be/savings/model.ts +406 -0
- package/src/be/scripts/typecheck.ts +5 -0
- package/src/be/seed/agent-fs-provision.ts +48 -11
- package/src/be/seed/workflows-seeder.ts +67 -23
- package/src/be/skill-parser.ts +19 -7
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/provider-error-class.ts +97 -0
- package/src/commands/runner.ts +99 -17
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/http/all-routes.ts +2 -0
- package/src/http/fs.ts +8 -2
- package/src/http/index.ts +4 -0
- package/src/http/model-profiles.ts +43 -10
- package/src/http/poll.ts +1 -0
- package/src/http/savings-calibration.ts +277 -0
- package/src/http/savings.ts +363 -0
- package/src/http/tasks.ts +46 -4
- package/src/http/trackers/authorize-gate.ts +41 -0
- package/src/http/trackers/jira.ts +26 -4
- package/src/http/trackers/linear.ts +26 -4
- package/src/integrations/chat-sdk/limits.ts +6 -1
- package/src/jira/oauth.ts +7 -1
- package/src/linear/README.md +2 -1
- package/src/linear/oauth.ts +7 -1
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/codex-adapter.ts +3 -0
- package/src/providers/pi-mono-adapter.ts +6 -5
- package/src/providers/types.ts +7 -0
- package/src/scripts-runtime/sdk-allowlist.ts +11 -1
- package/src/scripts-runtime/swarm-sdk.ts +6 -0
- package/src/scripts-runtime/types/stdlib.d.ts +9 -0
- package/src/scripts-runtime/types/swarm-extension.d.ts +34 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +9 -0
- package/src/tasks/worker-follow-up.ts +142 -3
- package/src/tests/agent-fs-provision-seeder.test.ts +81 -0
- package/src/tests/apps-chart-shell.test.ts +170 -0
- package/src/tests/apps-icon.test.ts +156 -2
- package/src/tests/chat-sdk-relay.test.ts +12 -0
- package/src/tests/codex-adapter.test.ts +11 -0
- package/src/tests/comb-default.test.ts +6 -0
- package/src/tests/core-auth.test.ts +7 -6
- package/src/tests/db-client-busy-retry.test.ts +58 -6
- package/src/tests/deploy-guard.test.ts +154 -0
- package/src/tests/docs-index-footprint.test.js +3 -3
- package/src/tests/fixtures/app-shell-charts-definition.json.txt +180 -0
- package/src/tests/model-profile-fallbacks.test.ts +482 -0
- package/src/tests/model-profiles-api.test.ts +1 -0
- package/src/tests/pi-mono-session-cost-on-abort.test.ts +115 -0
- package/src/tests/provider-error-class.test.ts +174 -0
- package/src/tests/runner-provider-fallback.test.ts +197 -0
- package/src/tests/savings-calibration-api.test.ts +264 -0
- package/src/tests/savings-calibration.test.ts +201 -0
- package/src/tests/savings-compute.test.ts +406 -0
- package/src/tests/savings-model.test.ts +287 -0
- package/src/tests/script-connections.test.ts +2 -0
- package/src/tests/sdk-allowlist.test.ts +40 -0
- package/src/tests/seed-workflows.test.ts +167 -11
- package/src/tests/skill-parser.test.ts +45 -0
- package/src/tests/tracker-oauth-authorize-auth.test.ts +262 -0
- package/src/tests/workflow-definition-pinning.test.ts +128 -3
- package/src/tests/workflow-script-principal.test.ts +94 -4
- package/src/tools/app-upsert.ts +1 -1
- package/src/tools/model-profiles/list-model-profiles.ts +4 -2
- package/src/tools/update-profile.ts +1 -1
- package/src/types.ts +115 -33
- package/src/utils/constants.ts +2 -0
- package/templates/skills/apps/SKILL.md +62 -3
- package/templates/skills/apps/content.md +62 -3
- package/templates/skills/swarm-docs/content.md +2 -0
- package/dist/handlers-vbww69re.js +0 -32
- package/dist/index-4xwaf5th.js +0 -32
- package/dist/index-f0hcrs8e.js +0 -33
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
materializeClaudeMd,
|
|
3
3
|
stopClaudeMd
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-f4r3g076.js";
|
|
5
5
|
import {
|
|
6
6
|
summarizeSession
|
|
7
7
|
} from "./cli-g70vxtjh.js";
|
|
@@ -33,16 +33,16 @@ import {
|
|
|
33
33
|
warnProfileFileTooLarge,
|
|
34
34
|
buildIndependentIdentityPayloads,
|
|
35
35
|
init_profile_sync
|
|
36
|
-
} from "./cli-
|
|
36
|
+
} from "./cli-dzpc6en0.js";
|
|
37
37
|
import {
|
|
38
38
|
init_package,
|
|
39
39
|
package_default
|
|
40
|
-
} from "./cli-
|
|
40
|
+
} from "./cli-zh9rsbqf.js";
|
|
41
41
|
import {
|
|
42
42
|
MAX_PROFILE_FILE_LENGTH,
|
|
43
43
|
getMcpBaseUrl,
|
|
44
44
|
init_constants3
|
|
45
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-dns0y538.js";
|
|
46
46
|
import {
|
|
47
47
|
isSessionSummarySkipped,
|
|
48
48
|
init_env_flag
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
getWorkflowVersions2,
|
|
47
47
|
getMcpServerById2,
|
|
48
48
|
init_db4
|
|
49
|
-
} from "./cli-
|
|
49
|
+
} from "./cli-rcecc3yq.js";
|
|
50
50
|
import {
|
|
51
51
|
McpHttpClient,
|
|
52
52
|
init_http_client
|
|
@@ -61,11 +61,11 @@ import {
|
|
|
61
61
|
oauthAppRowToProviderConfig,
|
|
62
62
|
ensureAuthorizationTokenOrThrow,
|
|
63
63
|
init_ensure_token
|
|
64
|
-
} from "./cli-
|
|
64
|
+
} from "./cli-rmzsadkf.js";
|
|
65
65
|
import {
|
|
66
66
|
validateDefinition,
|
|
67
67
|
init_definition2
|
|
68
|
-
} from "./cli-
|
|
68
|
+
} from "./cli-jdknh18m.js";
|
|
69
69
|
import {
|
|
70
70
|
isInvalidClientError,
|
|
71
71
|
publicEndpointSsrfOptions,
|
|
@@ -73,18 +73,18 @@ import {
|
|
|
73
73
|
refreshMcpToken,
|
|
74
74
|
computeExpiresAt,
|
|
75
75
|
init_mcp_wrapper
|
|
76
|
-
} from "./cli-
|
|
76
|
+
} from "./cli-n6vtrcht.js";
|
|
77
77
|
import {
|
|
78
78
|
mintScriptRunToken,
|
|
79
79
|
revokeSessionToken,
|
|
80
80
|
init_users
|
|
81
|
-
} from "./cli-
|
|
81
|
+
} from "./cli-f4e8r23x.js";
|
|
82
82
|
import {
|
|
83
83
|
defaultAssetKey,
|
|
84
84
|
init_key,
|
|
85
85
|
AppIconSchema,
|
|
86
86
|
init_types4
|
|
87
|
-
} from "./cli-
|
|
87
|
+
} from "./cli-pchypa1s.js";
|
|
88
88
|
import {
|
|
89
89
|
init_zod
|
|
90
90
|
} from "./cli-zcfpsfzf.js";
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
import {
|
|
106
106
|
getMcpBaseUrl,
|
|
107
107
|
init_constants3
|
|
108
|
-
} from "./cli-
|
|
108
|
+
} from "./cli-dns0y538.js";
|
|
109
109
|
import {
|
|
110
110
|
isEnvFlagEnabled,
|
|
111
111
|
init_env_flag
|
|
@@ -178858,9 +178858,6 @@ function parseWorkflowSource(source) {
|
|
|
178858
178858
|
function loadSeedWorkflows(sources = BUILT_IN_WORKFLOW_SOURCES) {
|
|
178859
178859
|
return sources.map(parseWorkflowSource).filter((workflow) => workflow !== null).sort((left, right) => left.name.localeCompare(right.name));
|
|
178860
178860
|
}
|
|
178861
|
-
function workflowSeedHash(workflow) {
|
|
178862
|
-
return computeContentHash2(canonicalJson(workflow));
|
|
178863
|
-
}
|
|
178864
178861
|
async function findWorkflowByName(name) {
|
|
178865
178862
|
return (await listWorkflows2()).find((workflow) => workflow.name === name) ?? null;
|
|
178866
178863
|
}
|
|
@@ -178905,20 +178902,31 @@ function executableSurface(workflow) {
|
|
|
178905
178902
|
} = workflow;
|
|
178906
178903
|
return canonicalJson(surface);
|
|
178907
178904
|
}
|
|
178908
|
-
|
|
178909
|
-
|
|
178910
|
-
|
|
178911
|
-
|
|
178905
|
+
function workflowSeedHash(workflow) {
|
|
178906
|
+
return computeContentHash2(executableSurface(workflow));
|
|
178907
|
+
}
|
|
178908
|
+
function legacyWorkflowSeedHash(workflow) {
|
|
178909
|
+
return computeContentHash2(canonicalJson(workflow));
|
|
178910
|
+
}
|
|
178911
|
+
async function executesSeededSurface(workflow, seededHash) {
|
|
178912
178912
|
const live = workflowFromRow(workflow);
|
|
178913
|
-
if (workflowSeedHash(live) ===
|
|
178914
|
-
return
|
|
178913
|
+
if (workflowSeedHash(live) === seededHash)
|
|
178914
|
+
return true;
|
|
178915
|
+
if (legacyWorkflowSeedHash(live) === seededHash)
|
|
178916
|
+
return true;
|
|
178915
178917
|
for (const version of await getWorkflowVersions2(workflow.id)) {
|
|
178916
178918
|
const seeded = workflowFromSnapshot(version.snapshot);
|
|
178917
|
-
if (
|
|
178919
|
+
if (legacyWorkflowSeedHash(seeded) !== seededHash)
|
|
178918
178920
|
continue;
|
|
178919
|
-
return executableSurface(seeded) === executableSurface(live)
|
|
178921
|
+
return executableSurface(seeded) === executableSurface(live);
|
|
178920
178922
|
}
|
|
178921
|
-
return
|
|
178923
|
+
return false;
|
|
178924
|
+
}
|
|
178925
|
+
async function seededWorkflowState(workflow) {
|
|
178926
|
+
const state = await getSeedState("workflow", workflow.name);
|
|
178927
|
+
if (!state)
|
|
178928
|
+
return "unseeded";
|
|
178929
|
+
return await executesSeededSurface(workflow, state.seededHash) ? "pristine" : "edited";
|
|
178922
178930
|
}
|
|
178923
178931
|
function createWorkflowsSeeder(sources = BUILT_IN_WORKFLOW_SOURCES) {
|
|
178924
178932
|
const workflows = loadSeedWorkflows(sources);
|
|
@@ -178933,7 +178941,16 @@ function createWorkflowsSeeder(sources = BUILT_IN_WORKFLOW_SOURCES) {
|
|
|
178933
178941
|
},
|
|
178934
178942
|
async upstreamHash(item) {
|
|
178935
178943
|
const existing = await findWorkflowByName(item.key);
|
|
178936
|
-
|
|
178944
|
+
if (!existing)
|
|
178945
|
+
return null;
|
|
178946
|
+
const liveHash = workflowSeedHash(workflowFromRow(existing));
|
|
178947
|
+
if (liveHash === item.contentHash)
|
|
178948
|
+
return liveHash;
|
|
178949
|
+
const state = await getSeedState("workflow", item.key);
|
|
178950
|
+
if (state && await executesSeededSurface(existing, state.seededHash)) {
|
|
178951
|
+
return state.seededHash;
|
|
178952
|
+
}
|
|
178953
|
+
return liveHash;
|
|
178937
178954
|
},
|
|
178938
178955
|
async apply(item) {
|
|
178939
178956
|
const { workflow } = item;
|
|
@@ -178941,12 +178958,8 @@ function createWorkflowsSeeder(sources = BUILT_IN_WORKFLOW_SOURCES) {
|
|
|
178941
178958
|
if (!validation.valid) {
|
|
178942
178959
|
throw new Error(`Invalid workflow definition: ${validation.errors.join("; ")}`);
|
|
178943
178960
|
}
|
|
178944
|
-
const
|
|
178945
|
-
description: workflow.description,
|
|
178961
|
+
const executable = {
|
|
178946
178962
|
definition: workflow.definition,
|
|
178947
|
-
triggers: workflow.triggers,
|
|
178948
|
-
cooldown: workflow.cooldown,
|
|
178949
|
-
input: workflow.input,
|
|
178950
178963
|
triggerSchema: workflow.triggerSchema,
|
|
178951
178964
|
params: workflow.params,
|
|
178952
178965
|
requiredParams: workflow.requiredParams,
|
|
@@ -178954,12 +178967,20 @@ function createWorkflowsSeeder(sources = BUILT_IN_WORKFLOW_SOURCES) {
|
|
|
178954
178967
|
};
|
|
178955
178968
|
const existing = await findWorkflowByName(workflow.name);
|
|
178956
178969
|
if (!existing) {
|
|
178957
|
-
const created = await createWorkflow2({
|
|
178970
|
+
const created = await createWorkflow2({
|
|
178971
|
+
name: workflow.name,
|
|
178972
|
+
...executable,
|
|
178973
|
+
description: workflow.description,
|
|
178974
|
+
triggers: workflow.triggers,
|
|
178975
|
+
cooldown: workflow.cooldown,
|
|
178976
|
+
input: workflow.input
|
|
178977
|
+
});
|
|
178958
178978
|
if (!workflow.enabled)
|
|
178959
178979
|
await updateWorkflow2(created.id, { enabled: false });
|
|
178960
178980
|
return;
|
|
178961
178981
|
}
|
|
178962
|
-
|
|
178982
|
+
const input = workflow.input || existing.input ? { ...workflow.input, ...existing.input } : undefined;
|
|
178983
|
+
await updateWorkflow2(existing.id, { ...executable, input });
|
|
178963
178984
|
}
|
|
178964
178985
|
};
|
|
178965
178986
|
}
|
|
@@ -179487,6 +179508,7 @@ var init_catalog_generated = __esm(() => {
|
|
|
179487
179508
|
"NumberInput",
|
|
179488
179509
|
"Button",
|
|
179489
179510
|
"Metric",
|
|
179511
|
+
"Chart",
|
|
179490
179512
|
"Alert",
|
|
179491
179513
|
"Badge",
|
|
179492
179514
|
"Icon",
|
|
@@ -180094,7 +180116,7 @@ var init_catalog_generated = __esm(() => {
|
|
|
180094
180116
|
}
|
|
180095
180117
|
},
|
|
180096
180118
|
Metric: {
|
|
180097
|
-
description: 'Stat tile (the dashboard `StatPanel`): label, value, optional `detail` line and `trend: { direction: "up"|"down"|"flat", label }` (arrow plus success/error/muted text). `icon` adds a tile tinted by `tone` (neutral|success|active|error|info|pending|warning|paused); `info` is a one-sentence explanation in a tooltip next to the label. Bind `loading` to the backing query (`{ "$state": "/queries/<name>/loading" }`) to show a skeleton instead of a blank value while it loads; an empty value renders an em dash.',
|
|
180119
|
+
description: 'Stat tile (the dashboard `StatPanel`): label, value, optional `detail` line and `trend: { direction: "up"|"down"|"flat", label }` (arrow plus success/error/muted text). `icon` adds a tile tinted by `tone` (neutral|success|active|error|info|pending|warning|paused); `info` is a one-sentence explanation in a tooltip next to the label. Bind `loading` to the backing query (`{ "$state": "/queries/<name>/loading" }`) to show a skeleton instead of a blank value while it loads; an empty value renders an em dash. `sparkline` draws a small trend line under the value, in the `tone` color: an array of numbers (`null` is a gap), or rows (bind `{ "$state": "/queries/<name>/data" }`) read through `sparklineKey`. Fewer than two points draws nothing.',
|
|
180098
180120
|
props: {
|
|
180099
180121
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
180100
180122
|
type: "object",
|
|
@@ -180185,12 +180207,130 @@ var init_catalog_generated = __esm(() => {
|
|
|
180185
180207
|
},
|
|
180186
180208
|
required: ["direction", "label"],
|
|
180187
180209
|
additionalProperties: false
|
|
180210
|
+
},
|
|
180211
|
+
sparkline: {
|
|
180212
|
+
maxItems: 500,
|
|
180213
|
+
type: "array",
|
|
180214
|
+
items: {
|
|
180215
|
+
anyOf: [
|
|
180216
|
+
{
|
|
180217
|
+
type: "number"
|
|
180218
|
+
},
|
|
180219
|
+
{
|
|
180220
|
+
type: "null"
|
|
180221
|
+
},
|
|
180222
|
+
{
|
|
180223
|
+
type: "object",
|
|
180224
|
+
propertyNames: {
|
|
180225
|
+
type: "string"
|
|
180226
|
+
},
|
|
180227
|
+
additionalProperties: {}
|
|
180228
|
+
}
|
|
180229
|
+
]
|
|
180230
|
+
}
|
|
180231
|
+
},
|
|
180232
|
+
sparklineKey: {
|
|
180233
|
+
type: "string"
|
|
180188
180234
|
}
|
|
180189
180235
|
},
|
|
180190
180236
|
required: ["label", "value"],
|
|
180191
180237
|
additionalProperties: false
|
|
180192
180238
|
}
|
|
180193
180239
|
},
|
|
180240
|
+
Chart: {
|
|
180241
|
+
description: 'Line, area or bar chart over rows. Bind `data`/`loading`/`error` to a named query like Table. `x` is the row field on the x axis: `xType: "category"` (default) keeps row order, `"time"` parses ISO dates or epoch ms, sorts the rows and labels ticks as dates (rows whose `x` does not parse are dropped). `series: [{ key, label?, color? }]` (1-8) plots numeric row fields; `color` is chart-1..chart-5, primary, success, warning, error, info or muted (default palette, in order: primary, chart-2..chart-5). `stacked` stacks area and bar series (lines never stack). `format` number (default) | currency (`currency`, ISO code, default USD) | percent (values are ratios, 0.42 = 42%) shapes axis ticks and the tooltip. Hover shows a tooltip with every series; the legend shows with two or more series (`legend` forces it on or off). `height` px (120-640, default 240). No rows renders `emptyMessage` (default "No data yet"). Wrap it in a `Card` for a title.',
|
|
180242
|
+
props: {
|
|
180243
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
180244
|
+
type: "object",
|
|
180245
|
+
properties: {
|
|
180246
|
+
kind: {
|
|
180247
|
+
type: "string",
|
|
180248
|
+
enum: ["line", "area", "bar"]
|
|
180249
|
+
},
|
|
180250
|
+
data: {
|
|
180251
|
+
type: "array",
|
|
180252
|
+
items: {
|
|
180253
|
+
type: "object",
|
|
180254
|
+
propertyNames: {
|
|
180255
|
+
type: "string"
|
|
180256
|
+
},
|
|
180257
|
+
additionalProperties: {}
|
|
180258
|
+
}
|
|
180259
|
+
},
|
|
180260
|
+
loading: {
|
|
180261
|
+
type: "boolean"
|
|
180262
|
+
},
|
|
180263
|
+
error: {
|
|
180264
|
+
type: ["string", "null"]
|
|
180265
|
+
},
|
|
180266
|
+
x: {
|
|
180267
|
+
type: "string"
|
|
180268
|
+
},
|
|
180269
|
+
xType: {
|
|
180270
|
+
type: "string",
|
|
180271
|
+
enum: ["category", "time"]
|
|
180272
|
+
},
|
|
180273
|
+
series: {
|
|
180274
|
+
minItems: 1,
|
|
180275
|
+
maxItems: 8,
|
|
180276
|
+
type: "array",
|
|
180277
|
+
items: {
|
|
180278
|
+
type: "object",
|
|
180279
|
+
properties: {
|
|
180280
|
+
key: {
|
|
180281
|
+
type: "string"
|
|
180282
|
+
},
|
|
180283
|
+
label: {
|
|
180284
|
+
type: "string"
|
|
180285
|
+
},
|
|
180286
|
+
color: {
|
|
180287
|
+
type: "string",
|
|
180288
|
+
enum: [
|
|
180289
|
+
"chart-1",
|
|
180290
|
+
"chart-2",
|
|
180291
|
+
"chart-3",
|
|
180292
|
+
"chart-4",
|
|
180293
|
+
"chart-5",
|
|
180294
|
+
"primary",
|
|
180295
|
+
"success",
|
|
180296
|
+
"warning",
|
|
180297
|
+
"error",
|
|
180298
|
+
"info",
|
|
180299
|
+
"muted"
|
|
180300
|
+
]
|
|
180301
|
+
}
|
|
180302
|
+
},
|
|
180303
|
+
required: ["key"],
|
|
180304
|
+
additionalProperties: false
|
|
180305
|
+
}
|
|
180306
|
+
},
|
|
180307
|
+
stacked: {
|
|
180308
|
+
type: "boolean"
|
|
180309
|
+
},
|
|
180310
|
+
format: {
|
|
180311
|
+
type: "string",
|
|
180312
|
+
enum: ["number", "currency", "percent"]
|
|
180313
|
+
},
|
|
180314
|
+
currency: {
|
|
180315
|
+
type: "string",
|
|
180316
|
+
pattern: "^[A-Z]{3}$"
|
|
180317
|
+
},
|
|
180318
|
+
height: {
|
|
180319
|
+
type: "integer",
|
|
180320
|
+
minimum: 120,
|
|
180321
|
+
maximum: 640
|
|
180322
|
+
},
|
|
180323
|
+
legend: {
|
|
180324
|
+
type: "boolean"
|
|
180325
|
+
},
|
|
180326
|
+
emptyMessage: {
|
|
180327
|
+
type: "string"
|
|
180328
|
+
}
|
|
180329
|
+
},
|
|
180330
|
+
required: ["kind", "x", "series"],
|
|
180331
|
+
additionalProperties: false
|
|
180332
|
+
}
|
|
180333
|
+
},
|
|
180194
180334
|
Alert: {
|
|
180195
180335
|
description: "Status-toned inline alert. `icon` overrides the tone's default icon. `actionLabel` adds a button inside the callout that emits the element's `press` event (wire it with `on.press`).",
|
|
180196
180336
|
props: {
|
|
@@ -183305,6 +183445,50 @@ async function elementDefinitionIssues(definition, catalog, context = {}) {
|
|
|
183305
183445
|
}
|
|
183306
183446
|
return dedupeIssues(issues);
|
|
183307
183447
|
}
|
|
183448
|
+
function chartPropIssues(props, elementPath) {
|
|
183449
|
+
const issues = [];
|
|
183450
|
+
const propsPath = `${elementPath}.props`;
|
|
183451
|
+
if (Array.isArray(props.series)) {
|
|
183452
|
+
if (props.series.length === 0 || props.series.length > CHART_MAX_SERIES) {
|
|
183453
|
+
issues.push(issue(`${propsPath}.series`, `must list 1-${CHART_MAX_SERIES} series`));
|
|
183454
|
+
}
|
|
183455
|
+
const seen = new Set;
|
|
183456
|
+
for (const [index, entry] of props.series.entries()) {
|
|
183457
|
+
if (!isPlainObject(entry) || typeof entry.key !== "string")
|
|
183458
|
+
continue;
|
|
183459
|
+
if (seen.has(entry.key)) {
|
|
183460
|
+
issues.push(issue(`${propsPath}.series.${index}.key`, `duplicate series "${entry.key}"`));
|
|
183461
|
+
}
|
|
183462
|
+
seen.add(entry.key);
|
|
183463
|
+
}
|
|
183464
|
+
}
|
|
183465
|
+
if (typeof props.currency === "string" && !/^[A-Z]{3}$/.test(props.currency)) {
|
|
183466
|
+
issues.push(issue(`${propsPath}.currency`, "must be an ISO 4217 code like USD"));
|
|
183467
|
+
}
|
|
183468
|
+
if (typeof props.height === "number" && (!Number.isInteger(props.height) || props.height < 120 || props.height > 640)) {
|
|
183469
|
+
issues.push(issue(`${propsPath}.height`, "must be an integer from 120 to 640"));
|
|
183470
|
+
}
|
|
183471
|
+
return issues;
|
|
183472
|
+
}
|
|
183473
|
+
function shellDefinitionIssues(definition, catalog) {
|
|
183474
|
+
const issues = [];
|
|
183475
|
+
const iconNames = catalog.components.Icon?.props.properties?.name?.enum ?? [];
|
|
183476
|
+
const sidebar = definition.layout === "sidebar";
|
|
183477
|
+
for (const [pageName, page] of Object.entries(definition.pages)) {
|
|
183478
|
+
const pagePath = appendPath("pages", pageName);
|
|
183479
|
+
if (page.icon !== undefined && !iconNames.includes(page.icon)) {
|
|
183480
|
+
issues.push(issue(appendPath(pagePath, "icon"), `unknown icon "${page.icon}"`));
|
|
183481
|
+
}
|
|
183482
|
+
if (!sidebar) {
|
|
183483
|
+
for (const key of ["headerActions", "nav"]) {
|
|
183484
|
+
if (page[key] !== undefined) {
|
|
183485
|
+
issues.push(issue(appendPath(pagePath, key), 'only rendered with layout: "sidebar"; set it or drop this'));
|
|
183486
|
+
}
|
|
183487
|
+
}
|
|
183488
|
+
}
|
|
183489
|
+
}
|
|
183490
|
+
return issues;
|
|
183491
|
+
}
|
|
183308
183492
|
function validatePage(definition, catalog, target) {
|
|
183309
183493
|
const issues = [];
|
|
183310
183494
|
const stateRefs = [];
|
|
@@ -183381,6 +183565,8 @@ function validatePage(definition, catalog, target) {
|
|
|
183381
183565
|
issues.push(issue(`${elementPath}.props.busyWith`, `unknown app action "${rawElement.props.busyWith}"`));
|
|
183382
183566
|
}
|
|
183383
183567
|
collectLinkFieldIssues(definition, type, rawElement.props, elementPath, issues);
|
|
183568
|
+
if (type === "Chart")
|
|
183569
|
+
issues.push(...chartPropIssues(rawElement.props, elementPath));
|
|
183384
183570
|
if (type === "Table") {
|
|
183385
183571
|
const tableProps = rawElement.props;
|
|
183386
183572
|
const selectionProps = ["selectable", "bulkActions"].filter((prop) => {
|
|
@@ -183460,6 +183646,13 @@ function validatePage(definition, catalog, target) {
|
|
|
183460
183646
|
}
|
|
183461
183647
|
}
|
|
183462
183648
|
}
|
|
183649
|
+
if (type === "Chart" && Array.isArray(props.series)) {
|
|
183650
|
+
for (const [index, entry] of props.series.entries()) {
|
|
183651
|
+
if (isPlainObject(entry)) {
|
|
183652
|
+
fieldNames.push([`${elementPath}.props.series.${index}.key`, entry.key]);
|
|
183653
|
+
}
|
|
183654
|
+
}
|
|
183655
|
+
}
|
|
183463
183656
|
for (const [fieldPath, fieldName] of fieldNames) {
|
|
183464
183657
|
if (typeof fieldName !== "string")
|
|
183465
183658
|
continue;
|
|
@@ -183626,6 +183819,17 @@ function validatePage(definition, catalog, target) {
|
|
|
183626
183819
|
};
|
|
183627
183820
|
if (typeof root === "string")
|
|
183628
183821
|
markReachable(root);
|
|
183822
|
+
const headerActions = pageName ? definition.pages[pageName]?.headerActions : undefined;
|
|
183823
|
+
if (headerActions !== undefined) {
|
|
183824
|
+
const headerPath = appendPath(pagePath, "headerActions");
|
|
183825
|
+
if (!Object.hasOwn(elements, headerActions)) {
|
|
183826
|
+
issues.push(issue(headerPath, `element "${headerActions}" not found`));
|
|
183827
|
+
} else if (reachable.has(headerActions)) {
|
|
183828
|
+
issues.push(issue(headerPath, `element "${headerActions}" is already rendered from root`));
|
|
183829
|
+
} else {
|
|
183830
|
+
markReachable(headerActions);
|
|
183831
|
+
}
|
|
183832
|
+
}
|
|
183629
183833
|
for (const elementId of Object.keys(elements)) {
|
|
183630
183834
|
if (!reachable.has(elementId)) {
|
|
183631
183835
|
issues.push(issue(`${elementsPath}.${elementId}`, "element is not reachable from root"));
|
|
@@ -183649,7 +183853,7 @@ function validatePage(definition, catalog, target) {
|
|
|
183649
183853
|
}
|
|
183650
183854
|
return dedupeIssues(issues);
|
|
183651
183855
|
}
|
|
183652
|
-
var ELEMENT_KEYS, UI_STATE_COMPONENTS, SCHEMA_FORM_ID, RESERVED_UI_IDS, PROP_ACTION_CHAINS, ITEM_ACTION_CHAINS, DATA_FIELD_PROPS, CONDITION_KEYS, COMPARISON_KEYS, POPOVER_MAX_FIELDS = 12, LINK_FIELD_PROPS, MAX_ELEMENT_REF_DEPTH = 5, MAX_ELEMENT_REF_EXPANSION_WORK = 100, MAX_ELEMENT_REF_EXPANSION_ISSUES = 100;
|
|
183856
|
+
var ELEMENT_KEYS, UI_STATE_COMPONENTS, SCHEMA_FORM_ID, RESERVED_UI_IDS, PROP_ACTION_CHAINS, ITEM_ACTION_CHAINS, DATA_FIELD_PROPS, CONDITION_KEYS, COMPARISON_KEYS, POPOVER_MAX_FIELDS = 12, LINK_FIELD_PROPS, MAX_ELEMENT_REF_DEPTH = 5, MAX_ELEMENT_REF_EXPANSION_WORK = 100, MAX_ELEMENT_REF_EXPANSION_ISSUES = 100, CHART_MAX_SERIES = 8;
|
|
183653
183857
|
var init_page_validator = __esm(() => {
|
|
183654
183858
|
init_definition();
|
|
183655
183859
|
ELEMENT_KEYS = new Set([
|
|
@@ -183692,7 +183896,8 @@ var init_page_validator = __esm(() => {
|
|
|
183692
183896
|
DATA_FIELD_PROPS = {
|
|
183693
183897
|
Kanban: ["columnField", "titleField", "idField"],
|
|
183694
183898
|
Calendar: ["startField", "endField", "titleField", "idField"],
|
|
183695
|
-
ContributionGraph: ["dateField", "countField"]
|
|
183899
|
+
ContributionGraph: ["dateField", "countField"],
|
|
183900
|
+
Chart: ["x"]
|
|
183696
183901
|
};
|
|
183697
183902
|
CONDITION_KEYS = new Set(["eq", "neq", "gt", "gte", "lt", "lte", "not"]);
|
|
183698
183903
|
COMPARISON_KEYS = ["eq", "neq", "gt", "gte", "lt", "lte"];
|
|
@@ -184033,6 +184238,7 @@ async function parseAppDefinition(input, elementContext = {}) {
|
|
|
184033
184238
|
...jsonColumnDefaultSizeIssues(parsed.data),
|
|
184034
184239
|
...Object.keys(parsed.data.pages).flatMap((pageName) => validatePage(parsed.data, catalog_generated_default, pageName)),
|
|
184035
184240
|
...crossPageDefinitionIssues(parsed.data, catalog_generated_default),
|
|
184241
|
+
...shellDefinitionIssues(parsed.data, catalog_generated_default),
|
|
184036
184242
|
...await elementDefinitionIssues(parsed.data, catalog_generated_default, elementContext)
|
|
184037
184243
|
];
|
|
184038
184244
|
const grandfatheredScriptRefs = collectScriptReferencePathMap(elementContext.existingDefinition);
|
|
@@ -184148,7 +184354,8 @@ function applyMergePatch(target, patch, path) {
|
|
|
184148
184354
|
delete result[key];
|
|
184149
184355
|
continue;
|
|
184150
184356
|
}
|
|
184151
|
-
|
|
184357
|
+
const replaceWhole = path.length === 0 && key === "icon" || entriesAreAtomic && !(path.length === 1 && path[0] === "elements" && isMergePatchObject(value) && Object.keys(value).length === 1 && isMergePatchObject(value.elements));
|
|
184358
|
+
defineMergePatchValue(result, key, replaceWhole ? value : applyMergePatch(result[key], value, [...path, key]));
|
|
184152
184359
|
}
|
|
184153
184360
|
return result;
|
|
184154
184361
|
}
|
|
@@ -184371,7 +184578,11 @@ var init_definition = __esm(() => {
|
|
|
184371
184578
|
root: string2(),
|
|
184372
184579
|
elements: record2(string2(), unknown()),
|
|
184373
184580
|
title: string2().optional(),
|
|
184374
|
-
params: record2(AppNameSchema, AppPageParamSchema).optional()
|
|
184581
|
+
params: record2(AppNameSchema, AppPageParamSchema).optional(),
|
|
184582
|
+
icon: string2().optional(),
|
|
184583
|
+
description: string2().max(280).optional(),
|
|
184584
|
+
headerActions: string2().optional(),
|
|
184585
|
+
nav: boolean().optional()
|
|
184375
184586
|
}).strict();
|
|
184376
184587
|
ElementPropDefSchema = object2({
|
|
184377
184588
|
kind: ScalarColumnKindSchema,
|
|
@@ -184429,6 +184640,7 @@ var init_definition = __esm(() => {
|
|
|
184429
184640
|
pages: record2(AppNameSchema, AppPageSchema),
|
|
184430
184641
|
defaultPage: AppNameSchema,
|
|
184431
184642
|
theme: AppThemeIdSchema.optional(),
|
|
184643
|
+
layout: _enum2(["sidebar"]).optional(),
|
|
184432
184644
|
icon: AppIconSchema.optional()
|
|
184433
184645
|
}).superRefine((definition, ctx) => {
|
|
184434
184646
|
if (!Object.hasOwn(definition.pages, definition.defaultPage)) {
|
|
@@ -184542,7 +184754,8 @@ var init_definition = __esm(() => {
|
|
|
184542
184754
|
"defaultPage",
|
|
184543
184755
|
"schemaVersion",
|
|
184544
184756
|
"theme",
|
|
184545
|
-
"icon"
|
|
184757
|
+
"icon",
|
|
184758
|
+
"layout"
|
|
184546
184759
|
]);
|
|
184547
184760
|
TOP_LEVEL_KEY_SUGGESTIONS = {
|
|
184548
184761
|
element: "elements",
|
|
@@ -185424,6 +185637,11 @@ export interface SwarmSdk {
|
|
|
185424
185637
|
// --- scripts ---
|
|
185425
185638
|
script_search(args: { query?: string; scope?: ScriptScope; limit?: number }): Promise<unknown>;
|
|
185426
185639
|
script_run(args: { name?: string; source?: string; args?: unknown; intent?: string; scope?: ScriptScope; fsMode?: ScriptFsMode; executor?: ScriptExecutorName | null; idempotencyKey?: string }): Promise<unknown>;
|
|
185640
|
+
// --- savings calibration (REST only) ---
|
|
185641
|
+
/** The savings curve in use (shipped or derived from this deployment) and the stored row's metadata. */
|
|
185642
|
+
savings_calibrationGet(): Promise<unknown>;
|
|
185643
|
+
/** Derive the curve from the last \`days\` of sessions. Read-only unless \`apply\` is true (needs config write access). One run at a time; takes up to 120 s, so call it from a script with a long enough timeout. */
|
|
185644
|
+
savings_calibrationRun(args?: { days?: number; end?: string; apply?: boolean }): Promise<unknown>;
|
|
185427
185645
|
// --- swarm / agent ---
|
|
185428
185646
|
swarm_get(args?: { includeFull?: boolean }): Promise<unknown>;
|
|
185429
185647
|
agent_info(args?: Record<string, unknown>): Promise<unknown>;
|
|
@@ -186156,17 +186374,33 @@ function parseSkillContent(content) {
|
|
|
186156
186374
|
if (secondDelimiter === -1) {
|
|
186157
186375
|
throw new Error("Skill content has unterminated frontmatter. Missing closing ---.");
|
|
186158
186376
|
}
|
|
186159
|
-
const frontmatterRaw = trimmed.slice(3, secondDelimiter)
|
|
186377
|
+
const frontmatterRaw = trimmed.slice(3, secondDelimiter);
|
|
186160
186378
|
const body = trimmed.slice(secondDelimiter + 3).trim();
|
|
186161
186379
|
const metadata = {};
|
|
186162
|
-
|
|
186163
|
-
`)
|
|
186380
|
+
const lines = frontmatterRaw.split(`
|
|
186381
|
+
`);
|
|
186382
|
+
for (let i = 0;i < lines.length; i++) {
|
|
186383
|
+
const line = lines[i];
|
|
186164
186384
|
const colonIdx = line.indexOf(":");
|
|
186165
186385
|
if (colonIdx === -1)
|
|
186166
186386
|
continue;
|
|
186167
186387
|
const key = line.slice(0, colonIdx).trim();
|
|
186168
186388
|
let value = line.slice(colonIdx + 1).trim();
|
|
186169
|
-
if (
|
|
186389
|
+
if (/^[>|][-+]?$/.test(value)) {
|
|
186390
|
+
const start = i;
|
|
186391
|
+
const indentation = line.length - line.trimStart().length;
|
|
186392
|
+
while (i + 1 < lines.length) {
|
|
186393
|
+
const next = lines[i + 1];
|
|
186394
|
+
if (next.trim() && next.length - next.trimStart().length <= indentation)
|
|
186395
|
+
break;
|
|
186396
|
+
i++;
|
|
186397
|
+
}
|
|
186398
|
+
const scalar = lines.slice(start, i + 1).join(`
|
|
186399
|
+
`) + (i < lines.length - 1 ? `
|
|
186400
|
+
` : "");
|
|
186401
|
+
const block = Bun.YAML.parse(scalar);
|
|
186402
|
+
value = block[key] ?? "";
|
|
186403
|
+
} else if (value.length >= 2 && value.startsWith('"') && value.endsWith('"')) {
|
|
186170
186404
|
try {
|
|
186171
186405
|
value = JSON.parse(value);
|
|
186172
186406
|
} catch {}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
init_steering2,
|
|
12
12
|
createLogEntry2,
|
|
13
13
|
init_db4
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-rcecc3yq.js";
|
|
15
15
|
import {
|
|
16
16
|
ackSlackMessage,
|
|
17
17
|
skipSlackMessageReaction,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
init_watcher,
|
|
29
29
|
getSlackApp2,
|
|
30
30
|
init_app3
|
|
31
|
-
} from "./cli-
|
|
31
|
+
} from "./cli-4vzgeta4.js";
|
|
32
32
|
import {
|
|
33
33
|
TaskCreationBlockedError,
|
|
34
34
|
init_errors2,
|
|
@@ -42,20 +42,20 @@ import {
|
|
|
42
42
|
init_message_text,
|
|
43
43
|
createAdditiveBuffer,
|
|
44
44
|
init_additive_buffer
|
|
45
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-3e875j5p.js";
|
|
46
46
|
import {
|
|
47
47
|
resolveSlackUserId,
|
|
48
48
|
rewriteSlackMentions,
|
|
49
49
|
init_enrich
|
|
50
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-xf3qw745.js";
|
|
51
51
|
import {
|
|
52
52
|
isSlackThreadLeft,
|
|
53
53
|
init_left_threads
|
|
54
|
-
} from "./cli-
|
|
54
|
+
} from "./cli-3vmb0n58.js";
|
|
55
55
|
import {
|
|
56
56
|
findUserByExternalId,
|
|
57
57
|
init_users
|
|
58
|
-
} from "./cli-
|
|
58
|
+
} from "./cli-f4e8r23x.js";
|
|
59
59
|
import {
|
|
60
60
|
isSteeringEnabled2,
|
|
61
61
|
init_steering_enabled
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
applyOpenRouterBaseUrlOverride2,
|
|
11
11
|
buildOpenAICompatibleProviderBlock2
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-6rc5frdm.js";
|
|
13
13
|
import {
|
|
14
14
|
fetchInstalledMcpServers
|
|
15
15
|
} from "./cli-bst1vp7e.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
DEFAULT_MODEL_TIER_MAP,
|
|
32
32
|
init_types4
|
|
33
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-pchypa1s.js";
|
|
34
34
|
import {
|
|
35
35
|
resolveTemplateFromCode,
|
|
36
36
|
resolveTemplateAsync,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
import {
|
|
59
59
|
init_package,
|
|
60
60
|
package_default
|
|
61
|
-
} from "./cli-
|
|
61
|
+
} from "./cli-zh9rsbqf.js";
|
|
62
62
|
import {
|
|
63
63
|
fxModelRoute,
|
|
64
64
|
normalizeGrokModel,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
getPendingWaitsByEvent2,
|
|
35
35
|
resolveWaitState2,
|
|
36
36
|
init_db4
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-rcecc3yq.js";
|
|
38
38
|
import {
|
|
39
39
|
workflowEventBus2,
|
|
40
40
|
init_event_bus
|
|
@@ -79,12 +79,12 @@ import {
|
|
|
79
79
|
getNextTargets,
|
|
80
80
|
getSuccessors,
|
|
81
81
|
init_definition2
|
|
82
|
-
} from "./cli-
|
|
82
|
+
} from "./cli-jdknh18m.js";
|
|
83
83
|
import {
|
|
84
84
|
RetryPolicySchema,
|
|
85
85
|
SUPERSEDED_WORKFLOW_TASK_REASON,
|
|
86
86
|
init_types4
|
|
87
|
-
} from "./cli-
|
|
87
|
+
} from "./cli-pchypa1s.js";
|
|
88
88
|
import {
|
|
89
89
|
init_zod
|
|
90
90
|
} from "./cli-zcfpsfzf.js";
|