@desplega.ai/agent-swarm 1.115.0 → 1.117.0
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/README.md +2 -2
- package/dist/{actions-17ya5wde.js → actions-7bnvhcgs.js} +10 -8
- package/dist/{app-4f718yk0.js → app-976fykvr.js} +3 -3
- package/dist/{assistant-ah7csnjz.js → assistant-5drs03t0.js} +13 -11
- package/dist/{boot-reembed-4jpxhb25.js → boot-reembed-0zhftca3.js} +4 -4
- package/dist/{boot-reembed-qata34xa.js → boot-reembed-wce58xfv.js} +3 -3
- package/dist/{boot-scrub-logs-tv48nn3z.js → boot-scrub-logs-vkd2vvxp.js} +2 -2
- package/dist/{cli-zsrdty74.js → cli-09j7m5v3.js} +4 -4
- package/dist/{cli-beea4a3y.js → cli-1987vgjc.js} +3 -3
- package/dist/{cli-k3y4z3h5.js → cli-5ekf4gcj.js} +2 -76
- package/dist/{cli-cnwssmsr.js → cli-6058t3w0.js} +1 -1
- package/dist/{cli-tffvrh6j.js → cli-9kk0xa5w.js} +1 -1
- package/dist/{cli-q1rx7g0d.js → cli-e0xv4nd4.js} +11 -9
- package/dist/{cli-12vb0xg6.js → cli-f5cx2j92.js} +2 -2
- package/dist/{cli-3samkyap.js → cli-fep22bhf.js} +2 -2
- package/dist/{cli-t0vqevnm.js → cli-hmw1vk30.js} +1 -1
- package/dist/{cli-pet3aev6.js → cli-jkp1gndy.js} +5 -5
- package/dist/{cli-52fg7s7x.js → cli-kfjs4fjw.js} +1 -1
- package/dist/{cli-65ekje01.js → cli-m4p6c600.js} +10 -8
- package/dist/{cli-cchksf5q.js → cli-ndsyqqqk.js} +2 -2
- package/dist/{cli-tece6zgm.js → cli-q0yn57de.js} +1 -1
- package/dist/{cli-hrhye2rm.js → cli-r06ed00c.js} +70 -24
- package/dist/{cli-7xje5amz.js → cli-rymspw51.js} +1 -1
- package/dist/{cli-15y7qhzp.js → cli-s5q026mr.js} +295 -4
- package/dist/{cli-shvaxw27.js → cli-t6n84nqv.js} +8 -6
- package/dist/{cli-r9f6ngrf.js → cli-vwhg6sbn.js} +2 -2
- package/dist/{cli-6aq8xhvm.js → cli-w5axeg22.js} +1 -1
- package/dist/{cli-b23axgz4.js → cli-xcp5dmts.js} +2 -2
- package/dist/{cli-dcca6j8m.js → cli-yarjrgd5.js} +1 -1
- package/dist/{cli-cmw9rzy5.js → cli-z824vphk.js} +2 -2
- package/dist/cli.js +10 -10
- package/dist/{commands-hch4e2k1.js → commands-b3p0fjzd.js} +2 -2
- package/dist/{db-p3h2j06x.js → db-6xw82vz3.js} +2 -2
- package/dist/{handlers-9er4zx9q.js → handlers-kwrk085v.js} +13 -11
- package/dist/{hook-4axs756z.js → hook-e4wdztg5.js} +1 -1
- package/dist/{http-809fvtz2.js → http-x7svk8q5.js} +41 -37
- package/dist/{index-rm85cfdx.js → index-35tw5g2v.js} +6 -6
- package/dist/{index-47em3d2n.js → index-aadhkkde.js} +10 -10
- package/dist/{index-9fqaktjr.js → index-qb6nfqmy.js} +8 -8
- package/dist/{index-9ht8gr56.js → index-zj38e3q2.js} +9 -9
- package/dist/{keepalive-3cps6e3e.js → keepalive-enehyqc8.js} +4 -4
- package/dist/{lead-fkk95wgq.js → lead-nmzd0ykq.js} +18 -18
- package/dist/{maintenance-fweqh0yj.js → maintenance-staxb3xt.js} +4 -4
- package/dist/{oauth-refresh-sweep-sycqtbph.js → oauth-refresh-sweep-fqczcwxn.js} +3 -3
- package/dist/{onboard-cy0rkgvx.js → onboard-shmqj6ep.js} +2 -2
- package/dist/{otel-impl-wbns8hf7.js → otel-impl-726bmdyc.js} +1 -1
- package/dist/{pricing-refresh-0hvazmkf.js → pricing-refresh-rzwka8rf.js} +4 -4
- package/dist/{rbac-roles-kfesjy9y.js → rbac-roles-chkhakmf.js} +3 -3
- package/dist/{rbac-roles-mwcwhbxc.js → rbac-roles-j2k0h8sx.js} +2 -2
- package/dist/{seed-pricing-h2kdq4cq.js → seed-pricing-vta6a1q3.js} +3 -3
- package/dist/{setup-8506q97w.js → setup-yv9ctywz.js} +2 -2
- package/dist/{worker-4r5c6zyb.js → worker-7w6571j0.js} +18 -18
- package/openapi.json +1 -1
- package/package.json +2 -2
- package/src/be/db.ts +89 -3
- package/src/server-user.ts +1 -0
- package/src/tasks/slack-routing.ts +147 -0
- package/src/tests/approval-requests.test.ts +36 -0
- package/src/tests/http-api-integration.test.ts +38 -0
- package/src/tests/pages-complete-fetch.test.ts +54 -0
- package/src/tests/send-task-slack-routing-guard.test.ts +355 -0
- package/src/tests/slack-metadata-inheritance.test.ts +279 -1
- package/src/tests/slack-routing-guard.test.ts +164 -0
- package/src/tools/send-task.ts +145 -82
package/README.md
CHANGED
|
@@ -131,7 +131,7 @@ Check [our templates](https://templates.agent-swarm.dev) for a quick start.
|
|
|
131
131
|
- **Scripts as external APIs** — expose a saved script as a public `POST /api/x/script/<id>` endpoint with optional bearer auth, typed input validation, and per-endpoint usage tracking. [Guide →](https://docs.agent-swarm.dev/docs/guides/scripts-external-apis)
|
|
132
132
|
- **Typed script API connections** — lead-managed OpenAPI, GraphQL, and MCP connections generate `ctx.api.*` / `ctx.mcp.*` clients for scripts, with credential bindings and OAuth-backed auth kept server-side. [Guide →](https://docs.agent-swarm.dev/docs/guides/script-connections)
|
|
133
133
|
- **E2B-backed eval harness** — run a scenario × harness-config matrix against real swarm stacks, capture transcripts/artifacts, and grade outcomes with deterministic checks plus LLM or agentic judges. [Guide →](https://docs.agent-swarm.dev/docs/guides/evals-harness)
|
|
134
|
-
- **Harness & LLM agnostic** — run with Claude Code, Claude Bridge, OpenAI Codex, pi-mono (Anthropic, OpenRouter, or Amazon Bedrock), Devin, Claude Managed Agents, raw LLMs, or opencode. Tasks, schedules, and workflow agent-task nodes can use portable `modelTier` intent (`smol`, `regular`, `smart`, `ultra`), and operators can set per-agent reasoning effort (`off` → `
|
|
134
|
+
- **Harness & LLM agnostic** — run with Claude Code, Claude Bridge, OpenAI Codex, pi-mono (Anthropic, OpenRouter, or Amazon Bedrock), Devin, Claude Managed Agents, raw LLMs, or opencode. Tasks, schedules, and workflow agent-task nodes can use portable `modelTier` intent (`smol`, `regular`, `smart`, `ultra`), and operators can set per-agent reasoning effort (`off` → `max`, where supported) without changing task payloads. [Harness config →](https://docs.agent-swarm.dev/docs/guides/harness-configuration) · [Add a new provider →](https://docs.agent-swarm.dev/docs/guides/harness-providers)
|
|
135
135
|
- **OpenTelemetry traces plus OTLP cost/token metrics** — export API + worker traces and finalized session cost/token counters through the same OTLP pipeline for dashboarding in SigNoz, Datadog, Tempo, or another compatible backend. [Observability →](https://docs.agent-swarm.dev/docs/guides/observability-opentelemetry)
|
|
136
136
|
- **Follow-up continuity across all harnesses** — child tasks inherit a bounded prior-task context preamble built from the task chain, so continuity survives restarts and works the same across every provider. [Task lifecycle →](https://docs.agent-swarm.dev/docs/concepts/task-lifecycle)
|
|
137
137
|
- **Skills & MCP servers** — reusable procedural knowledge, bundled skill reference files, and per-agent MCP servers with scope cascade. [MCP tools →](https://docs.agent-swarm.dev/docs/reference/mcp-tools)
|
|
@@ -139,7 +139,7 @@ Check [our templates](https://templates.agent-swarm.dev) for a quick start.
|
|
|
139
139
|
- **Config-driven metrics dashboards** — define read-only SQL widgets, version them, and render them in the dashboard without shipping custom frontend code. [Metrics API →](https://docs.agent-swarm.dev/docs/api-reference/stats)
|
|
140
140
|
- **DB-backed pages** — agents publish HTML or JSON pages (reports, dashboards, action specs) via `create_page`, remove stale pages with `delete-page`, and share them with public / authed / password modes, version history, view counters, diff helpers, and PDF export. [MCP tools → Pages](https://docs.agent-swarm.dev/docs/reference/mcp-tools#pages-tools)
|
|
141
141
|
- **KV store** — Redis-like namespaced key/value store with auto-scoped context (Slack thread / PR / Linear issue / page). [MCP tools → KV](https://docs.agent-swarm.dev/docs/reference/mcp-tools#kv-tools)
|
|
142
|
-
- **Real-time dashboard + task attachments** — monitor agents, tasks, and inter-agent chat, create tasks with uploaded files from the sessions composer, and preview task attachments inline above session prompts. [app.agent-swarm.dev →](https://app.agent-swarm.dev)
|
|
142
|
+
- **Real-time dashboard + task attachments** — monitor agents, tasks, and inter-agent chat, filter Pages, Approval Requests, and workflow definitions with URL-backed search/facets, create tasks with uploaded files from the sessions composer, and preview task attachments inline above session prompts. [app.agent-swarm.dev →](https://app.agent-swarm.dev)
|
|
143
143
|
|
|
144
144
|
## Quick Start
|
|
145
145
|
|
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSlackUserId
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-ndsyqqqk.js";
|
|
4
|
+
import"./cli-w5axeg22.js";
|
|
5
5
|
import {
|
|
6
6
|
buildCancelledBlocks,
|
|
7
7
|
getTaskLink
|
|
8
8
|
} from "./cli-ma04faw5.js";
|
|
9
9
|
import"./cli-wspgs9bt.js";
|
|
10
10
|
import {
|
|
11
|
-
createTaskWithSiblingAwareness
|
|
12
|
-
|
|
13
|
-
} from "./cli-k3y4z3h5.js";
|
|
11
|
+
createTaskWithSiblingAwareness
|
|
12
|
+
} from "./cli-5ekf4gcj.js";
|
|
14
13
|
import"./cli-dh55d5fg.js";
|
|
15
14
|
import {
|
|
16
15
|
cancelTask,
|
|
17
16
|
getAgentById,
|
|
18
17
|
getLeadAgent,
|
|
19
18
|
getTaskById,
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
init_context_key,
|
|
20
|
+
init_db,
|
|
21
|
+
slackContextKey
|
|
22
|
+
} from "./cli-s5q026mr.js";
|
|
22
23
|
import"./cli-z2zcxes1.js";
|
|
23
24
|
import"./cli-bw80ck94.js";
|
|
24
25
|
import"./cli-xz9aq0rf.js";
|
|
25
|
-
import"./cli-
|
|
26
|
+
import"./cli-xcp5dmts.js";
|
|
26
27
|
import"./cli-4j2mrzag.js";
|
|
27
28
|
import"./cli-p9swy5t3.js";
|
|
28
29
|
|
|
29
30
|
// src/slack/actions.ts
|
|
30
31
|
init_db();
|
|
32
|
+
init_context_key();
|
|
31
33
|
function registerActionHandlers(app) {
|
|
32
34
|
app.action("view_task_logs", async ({ ack }) => {
|
|
33
35
|
await ack();
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
initSlackApp,
|
|
4
4
|
startSlackApp,
|
|
5
5
|
stopSlackApp
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-jkp1gndy.js";
|
|
7
7
|
import"./cli-rkndnn90.js";
|
|
8
8
|
import"./cli-b0p7rfnd.js";
|
|
9
9
|
import"./cli-ma04faw5.js";
|
|
10
10
|
import"./cli-wspgs9bt.js";
|
|
11
11
|
import"./cli-dh55d5fg.js";
|
|
12
|
-
import"./cli-
|
|
12
|
+
import"./cli-s5q026mr.js";
|
|
13
13
|
import"./cli-z2zcxes1.js";
|
|
14
14
|
import"./cli-bw80ck94.js";
|
|
15
15
|
import"./cli-xz9aq0rf.js";
|
|
16
|
-
import"./cli-
|
|
16
|
+
import"./cli-xcp5dmts.js";
|
|
17
17
|
import"./cli-4j2mrzag.js";
|
|
18
18
|
import"./cli-e15jhafb.js";
|
|
19
19
|
import"./cli-7wmybrt5.js";
|
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bufferThreadMessage,
|
|
3
3
|
wasEventSeen
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-m4p6c600.js";
|
|
5
5
|
import {
|
|
6
6
|
hasOtherUserMention
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-9kk0xa5w.js";
|
|
8
8
|
import {
|
|
9
9
|
require_dist
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-jkp1gndy.js";
|
|
11
11
|
import"./cli-rkndnn90.js";
|
|
12
12
|
import"./cli-b0p7rfnd.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveSlackUserId,
|
|
15
15
|
rewriteSlackMentions
|
|
16
|
-
} from "./cli-
|
|
17
|
-
import"./cli-
|
|
16
|
+
} from "./cli-ndsyqqqk.js";
|
|
17
|
+
import"./cli-w5axeg22.js";
|
|
18
18
|
import"./cli-ma04faw5.js";
|
|
19
19
|
import"./cli-wspgs9bt.js";
|
|
20
20
|
import {
|
|
21
|
-
createTaskWithSiblingAwareness
|
|
22
|
-
|
|
23
|
-
} from "./cli-k3y4z3h5.js";
|
|
21
|
+
createTaskWithSiblingAwareness
|
|
22
|
+
} from "./cli-5ekf4gcj.js";
|
|
24
23
|
import"./cli-dh55d5fg.js";
|
|
25
24
|
import {
|
|
26
25
|
getAgentWorkingOnThread,
|
|
27
26
|
getLeadAgent,
|
|
28
27
|
getMostRecentTaskInThread,
|
|
28
|
+
init_context_key,
|
|
29
29
|
init_db,
|
|
30
30
|
init_resolver,
|
|
31
|
-
resolveTemplate
|
|
32
|
-
|
|
31
|
+
resolveTemplate,
|
|
32
|
+
slackContextKey
|
|
33
|
+
} from "./cli-s5q026mr.js";
|
|
33
34
|
import"./cli-z2zcxes1.js";
|
|
34
35
|
import"./cli-bw80ck94.js";
|
|
35
36
|
import"./cli-xz9aq0rf.js";
|
|
36
|
-
import"./cli-
|
|
37
|
+
import"./cli-xcp5dmts.js";
|
|
37
38
|
import"./cli-4j2mrzag.js";
|
|
38
39
|
import"./cli-e15jhafb.js";
|
|
39
40
|
import"./cli-7wmybrt5.js";
|
|
@@ -44,6 +45,7 @@ import {
|
|
|
44
45
|
// src/slack/assistant.ts
|
|
45
46
|
init_db();
|
|
46
47
|
init_resolver();
|
|
48
|
+
init_context_key();
|
|
47
49
|
var import_bolt = __toESM(require_dist(), 1);
|
|
48
50
|
var additiveSlack = process.env.ADDITIVE_SLACK === "true";
|
|
49
51
|
var cachedBotUserId = null;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
embedScript,
|
|
3
3
|
embeddingProvider
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-z824vphk.js";
|
|
5
|
+
import"./cli-rymspw51.js";
|
|
6
6
|
import"./cli-q25ejbyn.js";
|
|
7
7
|
import {
|
|
8
8
|
getDb,
|
|
9
9
|
init_db
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-s5q026mr.js";
|
|
11
11
|
import"./cli-z2zcxes1.js";
|
|
12
12
|
import"./cli-bw80ck94.js";
|
|
13
13
|
import"./cli-xz9aq0rf.js";
|
|
14
|
-
import"./cli-
|
|
14
|
+
import"./cli-xcp5dmts.js";
|
|
15
15
|
import"./cli-4j2mrzag.js";
|
|
16
16
|
import"./cli-p9swy5t3.js";
|
|
17
17
|
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
getEmbeddingProvider,
|
|
4
4
|
getMemoryStore,
|
|
5
5
|
init_constants
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-rymspw51.js";
|
|
7
7
|
import"./cli-q25ejbyn.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-s5q026mr.js";
|
|
12
12
|
import"./cli-z2zcxes1.js";
|
|
13
13
|
import"./cli-bw80ck94.js";
|
|
14
14
|
import"./cli-xz9aq0rf.js";
|
|
15
|
-
import"./cli-
|
|
15
|
+
import"./cli-xcp5dmts.js";
|
|
16
16
|
import"./cli-4j2mrzag.js";
|
|
17
17
|
import"./cli-p9swy5t3.js";
|
|
18
18
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDb,
|
|
3
3
|
init_db
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-s5q026mr.js";
|
|
5
5
|
import"./cli-z2zcxes1.js";
|
|
6
6
|
import"./cli-bw80ck94.js";
|
|
7
7
|
import"./cli-xz9aq0rf.js";
|
|
8
|
-
import"./cli-
|
|
8
|
+
import"./cli-xcp5dmts.js";
|
|
9
9
|
import {
|
|
10
10
|
init_secret_scrubber,
|
|
11
11
|
scrubSecrets
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
withSpan,
|
|
19
19
|
withSpanContext,
|
|
20
20
|
writeSkillsToFilesystem
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-r06ed00c.js";
|
|
22
22
|
import {
|
|
23
23
|
authJsonToCredentialSelection,
|
|
24
24
|
credentialsToAuthJson,
|
|
@@ -40,10 +40,10 @@ import {
|
|
|
40
40
|
import {
|
|
41
41
|
ensure,
|
|
42
42
|
initialize
|
|
43
|
-
} from "./cli-
|
|
43
|
+
} from "./cli-t6n84nqv.js";
|
|
44
44
|
import {
|
|
45
45
|
validateJsonSchema
|
|
46
|
-
} from "./cli-
|
|
46
|
+
} from "./cli-e0xv4nd4.js";
|
|
47
47
|
import {
|
|
48
48
|
getApiKey
|
|
49
49
|
} from "./cli-f14fvzag.js";
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
resolveTaskModelSelection,
|
|
80
80
|
resolveTemplateAsync,
|
|
81
81
|
telemetry
|
|
82
|
-
} from "./cli-
|
|
82
|
+
} from "./cli-s5q026mr.js";
|
|
83
83
|
import {
|
|
84
84
|
init_credentials,
|
|
85
85
|
resolveCredentialPools
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
getPinCandidateAgent,
|
|
8
8
|
getResumeGeneration,
|
|
9
9
|
repointTrackerSyncBySwarmId
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-yarjrgd5.js";
|
|
11
11
|
import {
|
|
12
12
|
getExecutorRegistry,
|
|
13
13
|
recoverIncompleteRuns
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-e0xv4nd4.js";
|
|
15
15
|
import {
|
|
16
16
|
MAX_EMPTY_POLLS,
|
|
17
17
|
assignUnassignedTaskPending,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
resolveTemplate,
|
|
52
52
|
supersedeTask,
|
|
53
53
|
updateAgentStatus
|
|
54
|
-
} from "./cli-
|
|
54
|
+
} from "./cli-s5q026mr.js";
|
|
55
55
|
|
|
56
56
|
// src/heartbeat/heartbeat.ts
|
|
57
57
|
init_db();
|
|
@@ -3,81 +3,7 @@ import {
|
|
|
3
3
|
getAgentById,
|
|
4
4
|
getInProgressTasksByContextKey,
|
|
5
5
|
init_db
|
|
6
|
-
} from "./cli-
|
|
7
|
-
|
|
8
|
-
// src/tasks/context-key.ts
|
|
9
|
-
var SEPARATOR = ":";
|
|
10
|
-
function assertSafePart(value, label) {
|
|
11
|
-
if (value === null || value === undefined) {
|
|
12
|
-
throw new Error(`context-key: "${label}" is required`);
|
|
13
|
-
}
|
|
14
|
-
const str = typeof value === "string" ? value : String(value);
|
|
15
|
-
if (str.length === 0) {
|
|
16
|
-
throw new Error(`context-key: "${label}" must be non-empty`);
|
|
17
|
-
}
|
|
18
|
-
if (str.includes(SEPARATOR)) {
|
|
19
|
-
throw new Error(`context-key: "${label}" must not contain "${SEPARATOR}"; caller must sanitize (got ${JSON.stringify(str)})`);
|
|
20
|
-
}
|
|
21
|
-
return str;
|
|
22
|
-
}
|
|
23
|
-
function slackContextKey(input) {
|
|
24
|
-
const channelId = assertSafePart(input.channelId, "channelId");
|
|
25
|
-
const threadTs = assertSafePart(input.threadTs, "threadTs");
|
|
26
|
-
return ["task", "slack", channelId, threadTs].join(SEPARATOR);
|
|
27
|
-
}
|
|
28
|
-
function agentmailContextKey(input) {
|
|
29
|
-
const threadId = assertSafePart(input.threadId, "threadId");
|
|
30
|
-
return ["task", "agentmail", threadId].join(SEPARATOR);
|
|
31
|
-
}
|
|
32
|
-
function githubContextKey(input) {
|
|
33
|
-
const owner = assertSafePart(input.owner, "owner");
|
|
34
|
-
const repo = assertSafePart(input.repo, "repo");
|
|
35
|
-
const kind = assertSafePart(input.kind, "kind").toLowerCase();
|
|
36
|
-
if (kind !== "issue" && kind !== "pr") {
|
|
37
|
-
throw new Error(`context-key: github "kind" must be "issue" or "pr" (got ${JSON.stringify(kind)})`);
|
|
38
|
-
}
|
|
39
|
-
const number = assertSafePart(input.number, "number");
|
|
40
|
-
if (!/^\d+$/.test(number)) {
|
|
41
|
-
throw new Error(`context-key: github "number" must be a positive integer (got ${JSON.stringify(number)})`);
|
|
42
|
-
}
|
|
43
|
-
return ["task", "trackers", "github", owner, repo, kind, number].join(SEPARATOR);
|
|
44
|
-
}
|
|
45
|
-
function gitlabContextKey(input) {
|
|
46
|
-
const projectId = assertSafePart(input.projectId, "projectId");
|
|
47
|
-
const kind = assertSafePart(input.kind, "kind").toLowerCase();
|
|
48
|
-
if (kind !== "mr" && kind !== "issue") {
|
|
49
|
-
throw new Error(`context-key: gitlab "kind" must be "mr" or "issue" (got ${JSON.stringify(kind)})`);
|
|
50
|
-
}
|
|
51
|
-
const iid = assertSafePart(input.iid, "iid");
|
|
52
|
-
if (!/^\d+$/.test(iid)) {
|
|
53
|
-
throw new Error(`context-key: gitlab "iid" must be a positive integer (got ${JSON.stringify(iid)})`);
|
|
54
|
-
}
|
|
55
|
-
return ["task", "trackers", "gitlab", projectId, kind, iid].join(SEPARATOR);
|
|
56
|
-
}
|
|
57
|
-
function linearContextKey(input) {
|
|
58
|
-
const issueIdentifier = assertSafePart(input.issueIdentifier, "issueIdentifier");
|
|
59
|
-
return ["task", "trackers", "linear", issueIdentifier].join(SEPARATOR);
|
|
60
|
-
}
|
|
61
|
-
function buildJiraContextKey(issueIdentifier) {
|
|
62
|
-
const id = assertSafePart(issueIdentifier, "issueIdentifier");
|
|
63
|
-
return ["task", "trackers", "jira", id].join(SEPARATOR);
|
|
64
|
-
}
|
|
65
|
-
function scheduleContextKey(input) {
|
|
66
|
-
const scheduleId = assertSafePart(input.scheduleId, "scheduleId");
|
|
67
|
-
return ["task", "schedule", scheduleId].join(SEPARATOR);
|
|
68
|
-
}
|
|
69
|
-
function workflowContextKey(input) {
|
|
70
|
-
const workflowRunId = assertSafePart(input.workflowRunId, "workflowRunId");
|
|
71
|
-
return ["task", "workflow", workflowRunId].join(SEPARATOR);
|
|
72
|
-
}
|
|
73
|
-
function agentContextKey(input) {
|
|
74
|
-
const agentId = assertSafePart(input.agentId, "agentId");
|
|
75
|
-
return ["task", "agent", agentId].join(SEPARATOR);
|
|
76
|
-
}
|
|
77
|
-
function pageContextKey(input) {
|
|
78
|
-
const pageId = assertSafePart(input.pageId, "pageId");
|
|
79
|
-
return ["task", "page", pageId].join(SEPARATOR);
|
|
80
|
-
}
|
|
6
|
+
} from "./cli-s5q026mr.js";
|
|
81
7
|
|
|
82
8
|
// src/tasks/sibling-awareness.ts
|
|
83
9
|
init_db();
|
|
@@ -233,4 +159,4 @@ function createTaskWithSiblingAwareness(description, options) {
|
|
|
233
159
|
return createTaskExtended(d, o);
|
|
234
160
|
}
|
|
235
161
|
|
|
236
|
-
export {
|
|
162
|
+
export { withSiblingAwareness, createTaskWithSiblingAwareness };
|
|
@@ -11,18 +11,17 @@ import {
|
|
|
11
11
|
getScriptVersion,
|
|
12
12
|
listRelationalCredentialBindings,
|
|
13
13
|
validateScriptImports
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-vwhg6sbn.js";
|
|
15
15
|
import {
|
|
16
16
|
ensureTokenOrThrow,
|
|
17
17
|
getOAuthApp,
|
|
18
18
|
getOAuthTokens,
|
|
19
19
|
isTokenExpiringSoon,
|
|
20
20
|
oauthAppRowToProviderConfig
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-hmw1vk30.js";
|
|
22
22
|
import {
|
|
23
|
-
withSiblingAwareness
|
|
24
|
-
|
|
25
|
-
} from "./cli-k3y4z3h5.js";
|
|
23
|
+
withSiblingAwareness
|
|
24
|
+
} from "./cli-5ekf4gcj.js";
|
|
26
25
|
import {
|
|
27
26
|
getAppUrl
|
|
28
27
|
} from "./cli-dh55d5fg.js";
|
|
@@ -60,6 +59,7 @@ import {
|
|
|
60
59
|
getWorkflowRunStepsByRunId,
|
|
61
60
|
getWorkflowVersions,
|
|
62
61
|
getWorkflowsByScheduleId,
|
|
62
|
+
init_context_key,
|
|
63
63
|
init_db,
|
|
64
64
|
init_telemetry,
|
|
65
65
|
init_template,
|
|
@@ -70,8 +70,9 @@ import {
|
|
|
70
70
|
splitLegacyModelAlias,
|
|
71
71
|
telemetry,
|
|
72
72
|
updateWorkflowRun,
|
|
73
|
-
updateWorkflowRunStep
|
|
74
|
-
|
|
73
|
+
updateWorkflowRunStep,
|
|
74
|
+
workflowContextKey
|
|
75
|
+
} from "./cli-s5q026mr.js";
|
|
75
76
|
import {
|
|
76
77
|
init_zod
|
|
77
78
|
} from "./cli-bw80ck94.js";
|
|
@@ -2323,6 +2324,7 @@ init_zod();
|
|
|
2323
2324
|
|
|
2324
2325
|
// src/workflows/executors/agent-task.ts
|
|
2325
2326
|
init_zod();
|
|
2327
|
+
init_context_key();
|
|
2326
2328
|
init_types();
|
|
2327
2329
|
var AgentTaskConfigSchema = exports_external.object({
|
|
2328
2330
|
template: exports_external.string(),
|
|
@@ -2612,7 +2614,7 @@ class HumanInTheLoopExecutor extends BaseExecutor {
|
|
|
2612
2614
|
}
|
|
2613
2615
|
if (notification.channel === "slack") {
|
|
2614
2616
|
try {
|
|
2615
|
-
const { getSlackApp } = await import("./app-
|
|
2617
|
+
const { getSlackApp } = await import("./app-976fykvr.js");
|
|
2616
2618
|
const slackApp = getSlackApp();
|
|
2617
2619
|
if (!slackApp) {
|
|
2618
2620
|
console.warn("[HITL] Slack not initialized — cannot send notification");
|
|
@@ -2726,7 +2728,7 @@ class NotifyExecutor extends BaseExecutor {
|
|
|
2726
2728
|
}
|
|
2727
2729
|
}
|
|
2728
2730
|
case "slack": {
|
|
2729
|
-
const { getSlackApp } = await import("./app-
|
|
2731
|
+
const { getSlackApp } = await import("./app-976fykvr.js");
|
|
2730
2732
|
const app = getSlackApp();
|
|
2731
2733
|
if (!app) {
|
|
2732
2734
|
return {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getScriptApiTypes,
|
|
3
3
|
getScriptMcpTypes,
|
|
4
4
|
require_typescript
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-vwhg6sbn.js";
|
|
6
6
|
import {
|
|
7
7
|
deleteSwarmConfigByKey,
|
|
8
8
|
getAgentById,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getSwarmConfigs,
|
|
12
12
|
init_db,
|
|
13
13
|
upsertSwarmConfig
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-s5q026mr.js";
|
|
15
15
|
import {
|
|
16
16
|
init_secret_scrubber,
|
|
17
17
|
scrubSecrets
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildModelsDevSeedRows
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-q0yn57de.js";
|
|
4
4
|
import {
|
|
5
5
|
createLogEntry,
|
|
6
6
|
getActivePricingRow,
|
|
7
7
|
getDb,
|
|
8
8
|
init_db,
|
|
9
9
|
insertPricingRow
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-s5q026mr.js";
|
|
11
11
|
import {
|
|
12
12
|
init_secret_scrubber,
|
|
13
13
|
scrubSecrets
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
getTaskById,
|
|
28
28
|
init_db,
|
|
29
29
|
setSlackMessageTracking
|
|
30
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-s5q026mr.js";
|
|
31
31
|
import {
|
|
32
32
|
require_receiver,
|
|
33
33
|
require_sender,
|
|
@@ -55073,13 +55073,13 @@ async function initSlackApp() {
|
|
|
55073
55073
|
socketMode: true,
|
|
55074
55074
|
logLevel: import_bolt.LogLevel.DEBUG
|
|
55075
55075
|
});
|
|
55076
|
-
const { registerMessageHandler } = await import("./handlers-
|
|
55077
|
-
const { registerCommandHandler } = await import("./commands-
|
|
55078
|
-
const { registerActionHandlers } = await import("./actions-
|
|
55076
|
+
const { registerMessageHandler } = await import("./handlers-kwrk085v.js");
|
|
55077
|
+
const { registerCommandHandler } = await import("./commands-b3p0fjzd.js");
|
|
55078
|
+
const { registerActionHandlers } = await import("./actions-7bnvhcgs.js");
|
|
55079
55079
|
registerMessageHandler(app);
|
|
55080
55080
|
registerCommandHandler(app);
|
|
55081
55081
|
registerActionHandlers(app);
|
|
55082
|
-
const { createAssistant } = await import("./assistant-
|
|
55082
|
+
const { createAssistant } = await import("./assistant-5drs03t0.js");
|
|
55083
55083
|
app.assistant(createAssistant());
|
|
55084
55084
|
return app;
|
|
55085
55085
|
}
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAdditiveBuffer,
|
|
3
3
|
extractSlackMessageText
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-9kk0xa5w.js";
|
|
5
5
|
import {
|
|
6
6
|
getSlackApp,
|
|
7
7
|
registerTreeMessage
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-jkp1gndy.js";
|
|
9
9
|
import {
|
|
10
10
|
rewriteSlackMentions
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-ndsyqqqk.js";
|
|
12
12
|
import {
|
|
13
13
|
buildBufferFlushBlocks
|
|
14
14
|
} from "./cli-ma04faw5.js";
|
|
15
15
|
import {
|
|
16
|
-
createTaskWithSiblingAwareness
|
|
17
|
-
|
|
18
|
-
} from "./cli-k3y4z3h5.js";
|
|
16
|
+
createTaskWithSiblingAwareness
|
|
17
|
+
} from "./cli-5ekf4gcj.js";
|
|
19
18
|
import {
|
|
20
19
|
getLatestActiveTaskInThread,
|
|
21
20
|
getLeadAgent,
|
|
22
21
|
getMostRecentTaskInThread,
|
|
22
|
+
init_context_key,
|
|
23
23
|
init_db,
|
|
24
24
|
init_registry,
|
|
25
|
-
registerTemplate
|
|
26
|
-
|
|
25
|
+
registerTemplate,
|
|
26
|
+
slackContextKey
|
|
27
|
+
} from "./cli-s5q026mr.js";
|
|
27
28
|
|
|
28
29
|
// src/slack/event-dedup.ts
|
|
29
30
|
var DEFAULT_TTL_MS = 300000;
|
|
@@ -111,6 +112,7 @@ registerTemplate({
|
|
|
111
112
|
|
|
112
113
|
// src/slack/thread-buffer.ts
|
|
113
114
|
init_db();
|
|
115
|
+
init_context_key();
|
|
114
116
|
var BUFFER_TIMEOUT_MS = Number(process.env.ADDITIVE_SLACK_BUFFER_MS) || 1e4;
|
|
115
117
|
function makeKey(channelId, threadTs) {
|
|
116
118
|
return `${channelId}:${threadTs}`;
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
linkIdentity,
|
|
5
5
|
recordUnmappedIdentity,
|
|
6
6
|
resolveIdentity
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-w5axeg22.js";
|
|
8
8
|
import {
|
|
9
9
|
getKv,
|
|
10
10
|
init_db,
|
|
11
11
|
upsertKv
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-s5q026mr.js";
|
|
13
13
|
|
|
14
14
|
// src/slack/enrich.ts
|
|
15
15
|
init_db();
|