@desplega.ai/agent-swarm 1.135.1 → 1.135.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/{actions-cdtyz12q.js → actions-3az2vwwn.js} +6 -6
- package/dist/{anthropic-messages-706yad38.js → anthropic-messages-pm7pp23c.js} +36 -23
- package/dist/{app-bsbct708.js → app-vygnfvrh.js} +3 -3
- package/dist/{assistant-139yzd1t.js → assistant-2jr2frrm.js} +8 -8
- package/dist/{azure-openai-responses-40z2astx.js → azure-openai-responses-cwesc845.js} +13 -4
- package/dist/{boot-reembed-gdzp4g2k.js → boot-reembed-ncbg16rb.js} +4 -4
- package/dist/{boot-reembed-q7f385st.js → boot-reembed-y7r9cxt0.js} +3 -3
- package/dist/{boot-scrub-logs-ammdkvre.js → boot-scrub-logs-t82rwa0y.js} +2 -2
- package/dist/{claude-adapter-h67y60dz.js → claude-adapter-vvx2aw3v.js} +5 -5
- package/dist/{claude-managed-adapter-m2v2e90a.js → claude-managed-adapter-5zr3n86v.js} +2 -2
- package/dist/{cli-77vf7z36.js → cli-0crn5kaz.js} +7 -16
- package/dist/{cli-9nrnc45k.js → cli-0jhyxtdj.js} +2 -2
- package/dist/cli-0v7jxbvz.js +6724 -0
- package/dist/{cli-ysehve35.js → cli-1857msnd.js} +1 -1
- package/dist/{cli-x0mnesvr.js → cli-1dfatkzm.js} +1 -1
- package/dist/{cli-mgnrknyg.js → cli-1z01xdqh.js} +5 -5
- package/dist/{cli-vew6xw8p.js → cli-3f0tnh34.js} +41 -32
- package/dist/{cli-j6fpcrdk.js → cli-4dakdn30.js} +6 -6
- package/dist/{cli-zg86g3q8.js → cli-4rdjdddh.js} +1 -1
- package/dist/{cli-pbatxkne.js → cli-5a5nrq3g.js} +5 -5
- package/dist/{cli-t46mkxd2.js → cli-6290n4yz.js} +1 -1
- package/dist/{cli-47d0y52n.js → cli-6bz2hzvw.js} +2 -2
- package/dist/{cli-96sytm77.js → cli-6mmwmy45.js} +10 -6
- package/dist/{cli-gkfzvf7n.js → cli-7ccy0h4r.js} +2 -2
- package/dist/{cli-17e3ydca.js → cli-83razmqg.js} +37 -11
- package/dist/{cli-pnqdak88.js → cli-8f4h27gm.js} +1 -1
- package/dist/{cli-vtz6yj3v.js → cli-9phjbffs.js} +1 -1
- package/dist/{cli-y37pxs1m.js → cli-a1zrc2g6.js} +146 -96
- package/dist/{cli-mqwe8xz0.js → cli-cf6vq6qa.js} +1 -1
- package/dist/{cli-3ad3q6j0.js → cli-cm4z7w7w.js} +2 -2
- package/dist/{cli-5vmvkwey.js → cli-cv2vjg2y.js} +1 -1
- package/dist/{cli-h8htvhk5.js → cli-ey09krp2.js} +1 -1
- package/dist/{cli-0rgbgtft.js → cli-fmha74ga.js} +6 -6
- package/dist/{cli-6ewfzrgz.js → cli-j3xnd5b4.js} +6 -6
- package/dist/{cli-xmyqv00z.js → cli-j8dggbcr.js} +17 -11
- package/dist/{cli-j8bhw4a7.js → cli-jfrh963q.js} +14 -14
- package/dist/{cli-dntm4d6r.js → cli-mfa2eaef.js} +5 -5
- package/dist/{cli-6t91v11y.js → cli-nhvym0d2.js} +3 -3
- package/dist/{cli-q46hkq2p.js → cli-qxn3g3yx.js} +38 -19
- package/dist/{cli-7vk1ztap.js → cli-r5vwg1ma.js} +4 -4
- package/dist/{cli-tv9f1kyb.js → cli-s73zwwqn.js} +97 -7
- package/dist/{cli-3zmdzfjf.js → cli-s9gpxh9q.js} +17 -2
- package/dist/{cli-z3h9zvty.js → cli-w0ygcv43.js} +1 -1
- package/dist/{cli-41wfr4tp.js → cli-yw2z5kj9.js} +1 -1
- package/dist/cli.js +19 -19
- package/dist/{codex-adapter-8vhjvnp9.js → codex-adapter-6p290yq3.js} +4 -4
- package/dist/{codex-session-runner-xeq8w3ea.js → codex-session-runner-7b3dhpmx.js} +4 -4
- package/dist/{commands-zhm1v98e.js → commands-wxg1g4nq.js} +2 -2
- package/dist/{db-q436srrz.js → db-8fqeheve.js} +2 -2
- package/dist/{google-generative-ai-b0wzss55.js → google-generative-ai-6xxdj4t3.js} +20 -13
- package/dist/{google-vertex-e8q4dpya.js → google-vertex-zma18wb0.js} +19 -12
- package/dist/{handlers-cpratgdt.js → handlers-gwtqp17c.js} +8 -8
- package/dist/{hook-wfe2rdyd.js → hook-gd9fwfp0.js} +5 -5
- package/dist/{hook-j1sd08ay.js → hook-mrqygs7p.js} +3 -3
- package/dist/{http-g13pqz5z.js → http-x4mc1mqg.js} +44 -44
- package/dist/{index-dde8asrx.js → index-2mdqrd0n.js} +10 -10
- package/dist/{index-zqjz0kf8.js → index-4djjkp9z.js} +9 -9
- package/dist/index-g9tttwkm.js +26012 -0
- package/dist/{index-g99vy4xs.js → index-pzgasj16.js} +11 -11
- package/dist/{index-jbgemxkn.js → index-yd654kac.js} +9 -9
- package/dist/{keepalive-ep0a9f7r.js → keepalive-3tycspcy.js} +4 -4
- package/dist/{lead-gsw42hv0.js → lead-js1h3z7d.js} +29 -29
- package/dist/{maintenance-et8rr4t5.js → maintenance-y91ry8q4.js} +4 -4
- package/dist/{mistral-conversations-2njwdwhj.js → mistral-conversations-hdmnkf6h.js} +9 -2
- package/dist/{oauth-refresh-sweep-tk3qn7zr.js → oauth-refresh-sweep-s33gtxrw.js} +3 -3
- package/dist/{onboard-354g4580.js → onboard-vndj64mb.js} +2 -2
- package/dist/{openai-codex-responses-kt84eq86.js → openai-codex-responses-xxca1qr1.js} +9 -6
- package/dist/{openai-completions-kasahkpq.js → openai-completions-cwy2kkzg.js} +105 -70
- package/dist/{openai-responses-175qgngv.js → openai-responses-e4dcwm9g.js} +10 -4
- package/dist/{opencode-adapter-rar9676j.js → opencode-adapter-sx38y7f7.js} +3 -3
- package/dist/{otel-impl-7y3szdz5.js → otel-impl-d2p84k6e.js} +4 -4
- package/dist/{pi-messages-txp9f97r.js → pi-messages-2d3e7egd.js} +1 -1
- package/dist/{pi-mono-adapter-6vmrr3g8.js → pi-mono-adapter-1phspz2y.js} +96035 -130798
- package/dist/{pricing-refresh-zra6kqmc.js → pricing-refresh-c2bwsyk5.js} +4 -4
- package/dist/{rbac-roles-vsfaw815.js → rbac-roles-2pedz5e9.js} +2 -2
- package/dist/{rbac-roles-2g89azp9.js → rbac-roles-reef5y2d.js} +3 -3
- package/dist/{render-v2-41schhkc.js → render-v2-zd5r5wgf.js} +3 -3
- package/dist/{seed-pricing-hh2j4y52.js → seed-pricing-2kyk1vhg.js} +3 -3
- package/dist/{setup-vk6apbbf.js → setup-5ys9pwyr.js} +2 -2
- package/dist/{worker-zj8qahay.js → worker-nb1f7k04.js} +29 -29
- package/openapi.json +16 -5
- package/package.json +6 -6
- package/src/be/db.ts +18 -0
- package/src/be/migrations/runner.ts +78 -17
- package/src/be/seed/agent-fs-provision.ts +37 -8
- package/src/http/db-query.ts +20 -5
- package/src/http/task-templates.ts +1 -1
- package/src/http/workflow-events.ts +2 -2
- package/src/providers/claude-managed-models.ts +2 -12
- package/src/providers/pricing-sources.md +5 -5
- package/src/tests/agent-fs-provision-seeder.test.ts +82 -1
- package/src/tests/claude-managed-adapter.test.ts +8 -16
- package/src/tests/db-query.test.ts +95 -0
- package/src/tests/docs-index-footprint.test.js +147 -0
- package/src/tests/fixtures/compiled-migrations-boot.ts +47 -0
- package/src/tests/migration-bunfs-compat.test.ts +167 -0
- package/src/tools/db-query.ts +5 -4
- package/dist/{cli-snz3p4yf.js → cli-06ghj6pe.js} +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
summarizeSession
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-a1zrc2g6.js";
|
|
4
4
|
import {
|
|
5
5
|
checkToolLoop,
|
|
6
6
|
clearToolHistory
|
|
@@ -27,14 +27,14 @@ import {
|
|
|
27
27
|
getMcpBaseUrl,
|
|
28
28
|
init_constants
|
|
29
29
|
} from "./cli-a1rrkrb4.js";
|
|
30
|
-
import {
|
|
31
|
-
init_package,
|
|
32
|
-
package_default
|
|
33
|
-
} from "./cli-j6fpcrdk.js";
|
|
34
30
|
import {
|
|
35
31
|
init_secret_scrubber,
|
|
36
32
|
scrubSecrets
|
|
37
33
|
} from "./cli-mkq1rk7b.js";
|
|
34
|
+
import {
|
|
35
|
+
init_package,
|
|
36
|
+
package_default
|
|
37
|
+
} from "./cli-4dakdn30.js";
|
|
38
38
|
|
|
39
39
|
// src/hooks/hook.ts
|
|
40
40
|
init_package();
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
updateTrackerSync,
|
|
29
29
|
updateTrackerSyncSwarmId,
|
|
30
30
|
upsertSwarmConfigWithPolicyMirror
|
|
31
|
-
} from "./cli-
|
|
31
|
+
} from "./cli-6290n4yz.js";
|
|
32
32
|
import {
|
|
33
33
|
isMultiRuntimeEnabled
|
|
34
34
|
} from "./cli-qh4sqfws.js";
|
|
@@ -37,17 +37,17 @@ import {
|
|
|
37
37
|
ensure,
|
|
38
38
|
require_dist,
|
|
39
39
|
runScheduleNow
|
|
40
|
-
} from "./cli-
|
|
40
|
+
} from "./cli-r5vwg1ma.js";
|
|
41
41
|
import {
|
|
42
42
|
startPricingRefreshLoop
|
|
43
|
-
} from "./cli-
|
|
43
|
+
} from "./cli-cm4z7w7w.js";
|
|
44
44
|
import {
|
|
45
45
|
seedPricingFromModelsDev
|
|
46
|
-
} from "./cli-
|
|
46
|
+
} from "./cli-1857msnd.js";
|
|
47
47
|
import {
|
|
48
48
|
ensureRbacSeedsSynced,
|
|
49
49
|
getUserGrant
|
|
50
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-cv2vjg2y.js";
|
|
51
51
|
import {
|
|
52
52
|
can,
|
|
53
53
|
decideAdmission,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
runSavedScriptAsAgent,
|
|
75
75
|
updateApp,
|
|
76
76
|
upgradeAppDefinition
|
|
77
|
-
} from "./cli-
|
|
77
|
+
} from "./cli-6bz2hzvw.js";
|
|
78
78
|
import {
|
|
79
79
|
TriggerSchemaError,
|
|
80
80
|
applyDefinitionPatch,
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
startWorkflowExecution,
|
|
89
89
|
validateDefinition,
|
|
90
90
|
validateJsonSchema
|
|
91
|
-
} from "./cli-
|
|
91
|
+
} from "./cli-5a5nrq3g.js";
|
|
92
92
|
import {
|
|
93
93
|
ConnectionAuthInputSchema,
|
|
94
94
|
SCRIPT_LONG_TIMEOUT_HINT_MS,
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
setScriptConnectionEnabled,
|
|
108
108
|
upsertCredentialBinding,
|
|
109
109
|
upsertScriptConnection
|
|
110
|
-
} from "./cli-
|
|
110
|
+
} from "./cli-fmha74ga.js";
|
|
111
111
|
import {
|
|
112
112
|
getApiKey
|
|
113
113
|
} from "./cli-f14fvzag.js";
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
isGraphExpansionEnabled,
|
|
123
123
|
rerank,
|
|
124
124
|
rowToCandidate
|
|
125
|
-
} from "./cli-
|
|
125
|
+
} from "./cli-4rdjdddh.js";
|
|
126
126
|
import {
|
|
127
127
|
buildAuthorizationUrl,
|
|
128
128
|
createOAuthApp,
|
|
@@ -137,7 +137,7 @@ import {
|
|
|
137
137
|
listAuthorizationsForApp,
|
|
138
138
|
onAuthorizationRefreshed,
|
|
139
139
|
upsertOAuthApp
|
|
140
|
-
} from "./cli-
|
|
140
|
+
} from "./cli-ey09krp2.js";
|
|
141
141
|
import {
|
|
142
142
|
ZodFirstPartyTypeKind,
|
|
143
143
|
objectType
|
|
@@ -149,7 +149,7 @@ import {
|
|
|
149
149
|
createAdditiveBuffer,
|
|
150
150
|
extractSlackMessageText,
|
|
151
151
|
parseSlackTs
|
|
152
|
-
} from "./cli-
|
|
152
|
+
} from "./cli-1dfatkzm.js";
|
|
153
153
|
import {
|
|
154
154
|
findOrCreateUserByEmail,
|
|
155
155
|
findUserByExternalId,
|
|
@@ -165,10 +165,10 @@ import {
|
|
|
165
165
|
resolveIdentityByEmail,
|
|
166
166
|
resolveUserByToken,
|
|
167
167
|
unlinkIdentity
|
|
168
|
-
} from "./cli-
|
|
168
|
+
} from "./cli-yw2z5kj9.js";
|
|
169
169
|
import {
|
|
170
170
|
createTaskWithSiblingAwareness
|
|
171
|
-
} from "./cli-
|
|
171
|
+
} from "./cli-w0ygcv43.js";
|
|
172
172
|
import {
|
|
173
173
|
getAgentDisplayName,
|
|
174
174
|
getAgentEmoji,
|
|
@@ -177,7 +177,7 @@ import {
|
|
|
177
177
|
markdownToSlack,
|
|
178
178
|
startSlackApp,
|
|
179
179
|
stopSlackApp
|
|
180
|
-
} from "./cli-
|
|
180
|
+
} from "./cli-j3xnd5b4.js";
|
|
181
181
|
import {
|
|
182
182
|
$OpenAPIRegistry,
|
|
183
183
|
$OpenApiGeneratorV31,
|
|
@@ -422,7 +422,7 @@ import {
|
|
|
422
422
|
upsertPromptTemplate,
|
|
423
423
|
upsertService,
|
|
424
424
|
validateConfigValue
|
|
425
|
-
} from "./cli-
|
|
425
|
+
} from "./cli-qxn3g3yx.js";
|
|
426
426
|
import {
|
|
427
427
|
generateDefaultClaudeMd,
|
|
428
428
|
generateDefaultIdentityMd,
|
|
@@ -454,10 +454,6 @@ import {
|
|
|
454
454
|
exports_zod,
|
|
455
455
|
init_zod
|
|
456
456
|
} from "./cli-s35981d0.js";
|
|
457
|
-
import {
|
|
458
|
-
init_package,
|
|
459
|
-
package_default
|
|
460
|
-
} from "./cli-j6fpcrdk.js";
|
|
461
457
|
import {
|
|
462
458
|
init_secret_scrubber,
|
|
463
459
|
refreshSecretScrubberCache,
|
|
@@ -465,6 +461,10 @@ import {
|
|
|
465
461
|
scrubObject,
|
|
466
462
|
scrubSecrets
|
|
467
463
|
} from "./cli-mkq1rk7b.js";
|
|
464
|
+
import {
|
|
465
|
+
init_package,
|
|
466
|
+
package_default
|
|
467
|
+
} from "./cli-4dakdn30.js";
|
|
468
468
|
import {
|
|
469
469
|
$ZodObject,
|
|
470
470
|
$ZodType,
|
|
@@ -22956,7 +22956,7 @@ async function notifySlack(text) {
|
|
|
22956
22956
|
return;
|
|
22957
22957
|
}
|
|
22958
22958
|
try {
|
|
22959
|
-
const { getSlackApp: getSlackApp2 } = await import("./app-
|
|
22959
|
+
const { getSlackApp: getSlackApp2 } = await import("./app-vygnfvrh.js");
|
|
22960
22960
|
const app = getSlackApp2();
|
|
22961
22961
|
if (!app) {
|
|
22962
22962
|
console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
|
|
@@ -23027,7 +23027,7 @@ async function deleteJiraWebhook(webhookId) {
|
|
|
23027
23027
|
console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
|
|
23028
23028
|
}
|
|
23029
23029
|
async function overwriteWebhookIds(next) {
|
|
23030
|
-
const { getDbClient: getDbClient2 } = await import("./db-
|
|
23030
|
+
const { getDbClient: getDbClient2 } = await import("./db-8fqeheve.js");
|
|
23031
23031
|
await getDbClient2().transaction(async (tx) => {
|
|
23032
23032
|
const row = await tx.get("SELECT metadata FROM oauth_apps WHERE provider = 'jira'");
|
|
23033
23033
|
if (!row) {
|
|
@@ -96654,7 +96654,7 @@ async function initOtel(serviceRole = process.env.AGENT_ROLE || "api") {
|
|
|
96654
96654
|
return;
|
|
96655
96655
|
initialized6 = true;
|
|
96656
96656
|
try {
|
|
96657
|
-
const impl = await import("./otel-impl-
|
|
96657
|
+
const impl = await import("./otel-impl-d2p84k6e.js");
|
|
96658
96658
|
await impl.boot(serviceRole);
|
|
96659
96659
|
realWithSpan = impl.withSpan;
|
|
96660
96660
|
realStartSpan = impl.startSpan;
|
|
@@ -102084,11 +102084,18 @@ function assertSelectOnlyQuery(sql) {
|
|
|
102084
102084
|
}
|
|
102085
102085
|
}
|
|
102086
102086
|
async function executeReadOnlyQueryGated(sql, params = [], budgetMs, maxRows) {
|
|
102087
|
+
let result;
|
|
102087
102088
|
if (isDbQueryBoundedEnabled()) {
|
|
102088
|
-
|
|
102089
|
+
result = await executeReadOnlyQueryBounded(sql, params, budgetMs, maxRows);
|
|
102090
|
+
} else {
|
|
102091
|
+
warnDbQueryBoundedDisabledOnce();
|
|
102092
|
+
result = executeReadOnlyQuery(sql, params, maxRows);
|
|
102089
102093
|
}
|
|
102090
|
-
|
|
102091
|
-
|
|
102094
|
+
return {
|
|
102095
|
+
...result,
|
|
102096
|
+
truncated: maxRows !== undefined && result.total > maxRows,
|
|
102097
|
+
rowLimit: maxRows ?? null
|
|
102098
|
+
};
|
|
102092
102099
|
}
|
|
102093
102100
|
var dbQueryRoute = route({
|
|
102094
102101
|
method: "post",
|
|
@@ -102104,7 +102111,9 @@ var dbQueryRoute = route({
|
|
|
102104
102111
|
columns: exports_external.array(exports_external.string()),
|
|
102105
102112
|
rows: exports_external.array(exports_external.array(exports_external.any())),
|
|
102106
102113
|
elapsed: exports_external.number(),
|
|
102107
|
-
total: exports_external.number()
|
|
102114
|
+
total: exports_external.number(),
|
|
102115
|
+
truncated: exports_external.boolean(),
|
|
102116
|
+
rowLimit: exports_external.number().nullable()
|
|
102108
102117
|
})
|
|
102109
102118
|
},
|
|
102110
102119
|
400: { description: "Invalid or disallowed SQL" },
|
|
@@ -102122,7 +102131,7 @@ async function handleDbQuery(req, res, pathSegments, queryParams) {
|
|
|
102122
102131
|
return true;
|
|
102123
102132
|
try {
|
|
102124
102133
|
const result = await executeReadOnlyQueryGated(resolveDbQuerySql(parsed.body), parsed.body.params, getDbQueryHttpBudgetMs(), getDbQueryHttpMaxRows());
|
|
102125
|
-
|
|
102134
|
+
dbQueryRoute.respond(res, 200, result);
|
|
102126
102135
|
} catch (err) {
|
|
102127
102136
|
if (err instanceof DbQueryConcurrencyCapError) {
|
|
102128
102137
|
res.setHeader("Retry-After", "1");
|
|
@@ -102986,7 +102995,8 @@ var registerDbQueryTool = (server) => {
|
|
|
102986
102995
|
rows: array(array(any())).optional(),
|
|
102987
102996
|
elapsed: number().optional(),
|
|
102988
102997
|
total: number().optional(),
|
|
102989
|
-
truncated: boolean().optional()
|
|
102998
|
+
truncated: boolean().optional(),
|
|
102999
|
+
rowLimit: number().optional()
|
|
102990
103000
|
})
|
|
102991
103001
|
}, async (input, _requestInfo, _meta) => {
|
|
102992
103002
|
try {
|
|
@@ -102994,20 +103004,19 @@ var registerDbQueryTool = (server) => {
|
|
|
102994
103004
|
const params = input.params ?? [];
|
|
102995
103005
|
const maxRows = getDbQueryMcpMaxRows();
|
|
102996
103006
|
const result = await executeReadOnlyQueryGated(sql, params, getDbQueryMcpBudgetMs(), maxRows);
|
|
102997
|
-
const truncated = result.total > maxRows;
|
|
102998
103007
|
const header = result.columns.join(" | ");
|
|
102999
103008
|
const separator = result.columns.map(() => "---").join(" | ");
|
|
103000
103009
|
const dataRows = result.rows.map((row) => row.map((v) => String(v ?? "NULL")).join(" | "));
|
|
103001
103010
|
const table = [header, separator, ...dataRows].join(`
|
|
103002
103011
|
`);
|
|
103003
|
-
const suffix = truncated ? `
|
|
103004
|
-
(Showing ${
|
|
103012
|
+
const suffix = result.truncated ? `
|
|
103013
|
+
(Showing ${result.rowLimit} of ${result.total} rows)` : "";
|
|
103005
103014
|
const details = `${table}${suffix}
|
|
103006
103015
|
|
|
103007
103016
|
${result.total} rows in ${result.elapsed}ms`;
|
|
103008
103017
|
return toolOk(`${result.total} row(s) in ${result.elapsed}ms`, {
|
|
103009
103018
|
details,
|
|
103010
|
-
data: { ...result
|
|
103019
|
+
data: { ...result }
|
|
103011
103020
|
});
|
|
103012
103021
|
} catch (err) {
|
|
103013
103022
|
const message = err instanceof Error ? err.message : String(err);
|
|
@@ -7,7 +7,7 @@ var package_default;
|
|
|
7
7
|
var init_package = __esm(() => {
|
|
8
8
|
package_default = {
|
|
9
9
|
name: "@desplega.ai/agent-swarm",
|
|
10
|
-
version: "1.135.
|
|
10
|
+
version: "1.135.2",
|
|
11
11
|
description: "agent-swarm.dev — an open-source operating system for AI work: a lead agent breaks goals into tasks, routes them to specialized workers such as Claude Code or Codex, runs each worker in an isolated container, and preserves shared memory, tools, schedules, and review gates so delegated work compounds across sessions.",
|
|
12
12
|
keywords: [
|
|
13
13
|
"agent-swarm.dev",
|
|
@@ -178,14 +178,14 @@ var init_package = __esm(() => {
|
|
|
178
178
|
"@aws-sdk/client-bedrock": "3.1048.0",
|
|
179
179
|
"@desplega.ai/business-use": "^0.4.2",
|
|
180
180
|
"@desplega.ai/localtunnel": "^2.2.0",
|
|
181
|
-
"@earendil-works/pi-agent-core": "^0.84.
|
|
182
|
-
"@earendil-works/pi-ai": "^0.84.
|
|
183
|
-
"@earendil-works/pi-coding-agent": "^0.84.
|
|
181
|
+
"@earendil-works/pi-agent-core": "^0.84.3",
|
|
182
|
+
"@earendil-works/pi-ai": "^0.84.3",
|
|
183
|
+
"@earendil-works/pi-coding-agent": "^0.84.3",
|
|
184
184
|
"@inkjs/ui": "^2.0.0",
|
|
185
185
|
"@linear/sdk": "^77.0.0",
|
|
186
186
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
187
|
-
"@openai/codex-sdk": "^0.149.
|
|
188
|
-
"@opencode-ai/sdk": "^1.18.
|
|
187
|
+
"@openai/codex-sdk": "^0.149.1",
|
|
188
|
+
"@opencode-ai/sdk": "^1.18.23",
|
|
189
189
|
"@openfort/openfort-node": "^0.9.1",
|
|
190
190
|
"@opentelemetry/api": "^1.9.1",
|
|
191
191
|
"@opentelemetry/exporter-metrics-otlp-http": "^0.218.0",
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
sandboxSpawnEnv,
|
|
19
19
|
snapshotCapped,
|
|
20
20
|
touchScratchScriptLastUsed
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-fmha74ga.js";
|
|
22
22
|
import {
|
|
23
23
|
withSiblingAwareness
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-w0ygcv43.js";
|
|
25
25
|
import {
|
|
26
26
|
FollowUpConfigSchema,
|
|
27
27
|
ModelTierSchema,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
updateWorkflowRun,
|
|
68
68
|
updateWorkflowRunStep,
|
|
69
69
|
workflowContextKey
|
|
70
|
-
} from "./cli-
|
|
70
|
+
} from "./cli-qxn3g3yx.js";
|
|
71
71
|
import {
|
|
72
72
|
deepInterpolate,
|
|
73
73
|
findInterpolationTokens,
|
|
@@ -3194,7 +3194,7 @@ class HumanInTheLoopExecutor extends BaseExecutor {
|
|
|
3194
3194
|
}
|
|
3195
3195
|
if (notification.channel === "slack") {
|
|
3196
3196
|
try {
|
|
3197
|
-
const { getSlackApp } = await import("./app-
|
|
3197
|
+
const { getSlackApp } = await import("./app-vygnfvrh.js");
|
|
3198
3198
|
const slackApp = getSlackApp();
|
|
3199
3199
|
if (!slackApp) {
|
|
3200
3200
|
console.warn("[HITL] Slack not initialized — cannot send notification");
|
|
@@ -3310,7 +3310,7 @@ class NotifyExecutor extends BaseExecutor {
|
|
|
3310
3310
|
}
|
|
3311
3311
|
}
|
|
3312
3312
|
case "slack": {
|
|
3313
|
-
const { getSlackApp } = await import("./app-
|
|
3313
|
+
const { getSlackApp } = await import("./app-vygnfvrh.js");
|
|
3314
3314
|
const app = getSlackApp();
|
|
3315
3315
|
if (!app) {
|
|
3316
3316
|
return {
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
restoreScratchScriptLastUsedIfUnchanged,
|
|
8
8
|
runScript,
|
|
9
9
|
touchScratchScriptLastUsed
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-fmha74ga.js";
|
|
11
11
|
import {
|
|
12
12
|
defaultAssetKey,
|
|
13
13
|
getDbClient,
|
|
14
14
|
getLeadAgent,
|
|
15
15
|
init_db,
|
|
16
16
|
init_key
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-qxn3g3yx.js";
|
|
18
18
|
import {
|
|
19
19
|
init_zod
|
|
20
20
|
} from "./cli-s35981d0.js";
|
|
@@ -4,10 +4,16 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
resolveCodexPrompt
|
|
6
6
|
} from "./cli-r94z9p1z.js";
|
|
7
|
+
import {
|
|
8
|
+
readPkgVersion
|
|
9
|
+
} from "./cli-f64gdfxc.js";
|
|
7
10
|
import {
|
|
8
11
|
SessionErrorTracker,
|
|
9
12
|
buildOtelTraceparentEnv
|
|
10
13
|
} from "./cli-a3pkfpqs.js";
|
|
14
|
+
import {
|
|
15
|
+
summarizeSession
|
|
16
|
+
} from "./cli-a1zrc2g6.js";
|
|
11
17
|
import {
|
|
12
18
|
CTX_MODE_NUDGE_EVERY
|
|
13
19
|
} from "./cli-zm7njwzd.js";
|
|
@@ -16,12 +22,6 @@ import {
|
|
|
16
22
|
clampContextPercent,
|
|
17
23
|
computeContextUsedUnified
|
|
18
24
|
} from "./cli-cw70hymf.js";
|
|
19
|
-
import {
|
|
20
|
-
readPkgVersion
|
|
21
|
-
} from "./cli-f64gdfxc.js";
|
|
22
|
-
import {
|
|
23
|
-
summarizeSession
|
|
24
|
-
} from "./cli-y37pxs1m.js";
|
|
25
25
|
import {
|
|
26
26
|
buildRatingsFromLlm,
|
|
27
27
|
fetchRetrievalsForTask,
|
|
@@ -116,6 +116,7 @@ var Thread = class {
|
|
|
116
116
|
threadId: this._id,
|
|
117
117
|
images,
|
|
118
118
|
model: options?.model,
|
|
119
|
+
threadSource: options?.threadSource,
|
|
119
120
|
sandboxMode: options?.sandboxMode,
|
|
120
121
|
workingDirectory: options?.workingDirectory,
|
|
121
122
|
skipGitRepoCheck: options?.skipGitRepoCheck,
|
|
@@ -238,6 +239,9 @@ var CodexExec = class {
|
|
|
238
239
|
if (args.model) {
|
|
239
240
|
commandArgs.push("--model", args.model);
|
|
240
241
|
}
|
|
242
|
+
if (args.threadSource !== undefined && !args.threadId) {
|
|
243
|
+
commandArgs.push("--thread-source", args.threadSource);
|
|
244
|
+
}
|
|
241
245
|
if (args.sandboxMode) {
|
|
242
246
|
commandArgs.push("--sandbox", args.sandboxMode);
|
|
243
247
|
}
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
linkIdentity,
|
|
5
5
|
recordUnmappedIdentity,
|
|
6
6
|
resolveIdentity
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-yw2z5kj9.js";
|
|
8
8
|
import {
|
|
9
9
|
getKv,
|
|
10
10
|
init_db,
|
|
11
11
|
upsertKv
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-qxn3g3yx.js";
|
|
13
13
|
|
|
14
14
|
// src/slack/enrich.ts
|
|
15
15
|
init_db();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SYSTEM_COLUMN_KINDS,
|
|
3
3
|
listAppRecords
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-6bz2hzvw.js";
|
|
5
5
|
import {
|
|
6
6
|
getScriptApiTypes,
|
|
7
7
|
getScriptMcpTypes,
|
|
8
8
|
require_typescript
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-fmha74ga.js";
|
|
10
10
|
import {
|
|
11
11
|
deleteSwarmConfigByKey,
|
|
12
12
|
getAgentById,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
getSwarmConfigs,
|
|
16
16
|
init_db,
|
|
17
17
|
upsertSwarmConfig
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-qxn3g3yx.js";
|
|
19
19
|
import {
|
|
20
20
|
init_secret_scrubber,
|
|
21
21
|
scrubSecrets
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
// src/be/seed/agent-fs-provision.ts
|
|
29
29
|
init_secret_scrubber();
|
|
30
30
|
init_db();
|
|
31
|
-
import { createHash } from "node:crypto";
|
|
31
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
32
32
|
var KIND = "agent-fs-provision";
|
|
33
33
|
var ITEM_KEY = "shared-org-drive";
|
|
34
34
|
var PROVISION_VERSION = 1;
|
|
@@ -37,6 +37,14 @@ var DRIVE_NAME = "shared";
|
|
|
37
37
|
var PROVISION_HASH_KEY = "AGENT_FS_PROVISION_HASH";
|
|
38
38
|
var API_KEY_CONFIG = "API_AGENT_FS_API_KEY";
|
|
39
39
|
var LEGACY_SHARED_KEY_CONFIG = "AGENT_FS_API_KEY";
|
|
40
|
+
|
|
41
|
+
class AgentFsRequestError extends Error {
|
|
42
|
+
status;
|
|
43
|
+
constructor(message, status) {
|
|
44
|
+
super(message);
|
|
45
|
+
this.status = status;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
40
48
|
var AGENT_FS_REQUEST_TIMEOUT_MS = 1e4;
|
|
41
49
|
var fetchImpl = globalThis.fetch;
|
|
42
50
|
var agentFsProvisionSeeder = {
|
|
@@ -169,12 +177,24 @@ async function ensureAgentFsCredentialsForAgent(agentId) {
|
|
|
169
177
|
};
|
|
170
178
|
}
|
|
171
179
|
const shared = await ensureAgentFsSharedProvisioning({ apiUrl });
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
180
|
+
let email = await resolveAgentEmail(agentId);
|
|
181
|
+
let registered;
|
|
182
|
+
try {
|
|
183
|
+
registered = await agentFsRequest(apiUrl, "/auth/register", {
|
|
184
|
+
method: "POST",
|
|
185
|
+
body: { email },
|
|
186
|
+
allowConflict: false
|
|
187
|
+
});
|
|
188
|
+
} catch (error) {
|
|
189
|
+
if (!(error instanceof AgentFsRequestError) || error.status !== 409)
|
|
190
|
+
throw error;
|
|
191
|
+
email = recoveryAgentEmail(email);
|
|
192
|
+
registered = await agentFsRequest(apiUrl, "/auth/register", {
|
|
193
|
+
method: "POST",
|
|
194
|
+
body: { email },
|
|
195
|
+
allowConflict: false
|
|
196
|
+
});
|
|
197
|
+
}
|
|
178
198
|
const apiKey = registered.apiKey ?? "";
|
|
179
199
|
if (!apiKey)
|
|
180
200
|
throw new Error(`agent-fs registration did not return an apiKey for ${agentId}`);
|
|
@@ -279,7 +299,7 @@ async function agentFsRequest(apiUrl, path, options = {}) {
|
|
|
279
299
|
});
|
|
280
300
|
if (!response.ok && !(options.allowConflict && response.status === 409)) {
|
|
281
301
|
const text = await response.text().catch(() => "");
|
|
282
|
-
throw new
|
|
302
|
+
throw new AgentFsRequestError(`agent-fs ${options.method ?? "GET"} ${path} failed: HTTP ${response.status}${text ? ` ${text}` : ""}`, response.status);
|
|
283
303
|
}
|
|
284
304
|
return await response.json().catch(() => ({}));
|
|
285
305
|
}
|
|
@@ -333,6 +353,12 @@ async function resolveAgentEmail(agentId) {
|
|
|
333
353
|
const domain = process.env.AGENT_FS_EMAIL_DOMAIN || "swarm.local";
|
|
334
354
|
return `${agentId}@${domain}`;
|
|
335
355
|
}
|
|
356
|
+
function recoveryAgentEmail(email) {
|
|
357
|
+
const separator = email.lastIndexOf("@");
|
|
358
|
+
const localPart = separator === -1 ? email : email.slice(0, separator);
|
|
359
|
+
const domain = separator === -1 ? "swarm.local" : email.slice(separator + 1);
|
|
360
|
+
return `${localPart}+recovery-${randomUUID()}@${domain}`;
|
|
361
|
+
}
|
|
336
362
|
function slugEmailPart(value) {
|
|
337
363
|
return value.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 48) || "swarm";
|
|
338
364
|
}
|