@desplega.ai/agent-swarm 1.91.0 → 1.92.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 -1
- package/openapi.json +585 -5
- package/package.json +1 -1
- package/src/be/db.ts +337 -1
- package/src/be/migrations/083_script_workflows.sql +51 -0
- package/src/be/modelsdev-cache.json +42352 -38595
- package/src/be/scripts/typecheck.ts +49 -0
- package/src/be/seed-scripts/catalog/compound-insights.ts +216 -6
- package/src/be/seed-scripts/catalog/ops-catalog-audit.ts +911 -0
- package/src/be/seed-scripts/catalog/task-context-gathering.ts +92 -0
- package/src/be/seed-scripts/catalog/tool-usage.ts +6 -3
- package/src/be/seed-scripts/index.ts +20 -2
- package/src/be/seed-skills/index.ts +7 -0
- package/src/be/swarm-config-guard.ts +17 -0
- package/src/commands/runner.ts +43 -2
- package/src/http/db-query.ts +20 -5
- package/src/http/index.ts +10 -0
- package/src/http/script-runs.ts +555 -0
- package/src/prompts/session-templates.ts +24 -4
- package/src/providers/claude-adapter.ts +60 -13
- package/src/script-workflows/executor.ts +110 -0
- package/src/script-workflows/harness.ts +73 -0
- package/src/script-workflows/label-lint.ts +51 -0
- package/src/script-workflows/limits.ts +22 -0
- package/src/script-workflows/supervisor.ts +139 -0
- package/src/script-workflows/workflow-ctx.ts +205 -0
- package/src/scripts-runtime/sdk-allowlist.ts +3 -0
- package/src/scripts-runtime/types/stdlib.d.ts +60 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +60 -0
- package/src/server.ts +2 -0
- package/src/slack/handlers.ts +11 -4
- package/src/slack/message-text.ts +98 -0
- package/src/slack/thread-buffer.ts +5 -3
- package/src/tests/claude-adapter-binary.test.ts +147 -4
- package/src/tests/db-query.test.ts +28 -0
- package/src/tests/error-tracker.test.ts +121 -0
- package/src/tests/harness-provider-resolution.test.ts +33 -0
- package/src/tests/mcp-tools.test.ts +6 -0
- package/src/tests/prompt-template-session.test.ts +34 -5
- package/src/tests/script-runs-http.test.ts +278 -0
- package/src/tests/script-workflows-label-lint.test.ts +43 -0
- package/src/tests/script-workflows-runtime-e2e.test.ts +170 -0
- package/src/tests/scripts-mcp-e2e.test.ts +49 -2
- package/src/tests/seed-scripts.test.ts +347 -2
- package/src/tests/slack-message-text.test.ts +250 -0
- package/src/tests/system-default-skills.test.ts +40 -0
- package/src/tools/db-query.ts +16 -6
- package/src/tools/script-runs.ts +123 -0
- package/src/tools/slack-read.ts +12 -3
- package/src/tools/tool-config.ts +4 -1
- package/src/types.ts +52 -0
- package/src/utils/error-tracker.ts +40 -1
- package/src/utils/internal-ai/complete-structured.ts +10 -4
- package/src/workflows/executors/raw-llm.ts +76 -59
- package/templates/skills/pages/content.md +205 -55
- package/templates/skills/script-workflows/config.json +14 -0
- package/templates/skills/script-workflows/content.md +68 -0
- package/templates/skills/swarm-scripts/content.md +2 -3
package/README.md
CHANGED
|
@@ -126,7 +126,8 @@ Check [our templates](https://templates.agent-swarm.dev) for a quick start.
|
|
|
126
126
|
- **Multi-channel inputs** — Slack, GitHub, GitLab, email, WhatsApp, Linear, Jira, and the HTTP API all create tasks. [Integrations](#integrations)
|
|
127
127
|
- **Workflow engine with Human-in-the-Loop** — DAG-based automation with approval gates, retries, and structured I/O. [Workflows →](https://docs.agent-swarm.dev/docs/concepts/workflows)
|
|
128
128
|
- **Scheduled & recurring tasks** — cron-based automation for standing work. [Scheduling →](https://docs.agent-swarm.dev/docs/concepts/scheduling)
|
|
129
|
-
- **
|
|
129
|
+
- **Durable script workflows** — launch background script runs, inspect their journals, and track them from the dashboard when a one-shot `script-run` is too small. [Guide →](https://docs.agent-swarm.dev/docs/guides/script-workflow-runs)
|
|
130
|
+
- **Harness & LLM agnostic** — run with Claude Code, Claude Bridge, OpenAI Codex, pi-mono, Devin, Claude Managed Agents, raw LLMs, or opencode. [Harness config →](https://docs.agent-swarm.dev/docs/guides/harness-configuration) · [Add a new provider →](https://docs.agent-swarm.dev/docs/guides/harness-providers)
|
|
130
131
|
- **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)
|
|
131
132
|
- **Skills & MCP servers** — reusable procedural knowledge and per-agent MCP servers with scope cascade. [MCP tools →](https://docs.agent-swarm.dev/docs/reference/mcp-tools)
|
|
132
133
|
- **External tool-router access** — the `x` command and `swarm_x` MCP tool let humans and agents execute approved third-party routes such as Composio without baking bespoke MCP servers first. [CLI →](https://docs.agent-swarm.dev/docs/reference/cli) · [Composio →](https://docs.agent-swarm.dev/docs/integrations/composio)
|
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Agent Swarm API",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.92.0",
|
|
6
6
|
"description": "Multi-agent orchestration API for Claude Code, Codex, and Gemini CLI. Enables task distribution, agent communication, and service discovery.\n\nMCP tools are documented separately in [MCP.md](./MCP.md)."
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
@@ -2332,15 +2332,18 @@
|
|
|
2332
2332
|
"minLength": 1,
|
|
2333
2333
|
"maxLength": 10000
|
|
2334
2334
|
},
|
|
2335
|
+
"query": {
|
|
2336
|
+
"type": "string",
|
|
2337
|
+
"minLength": 1,
|
|
2338
|
+
"maxLength": 10000,
|
|
2339
|
+
"description": "Deprecated runtime alias for sql."
|
|
2340
|
+
},
|
|
2335
2341
|
"params": {
|
|
2336
2342
|
"type": "array",
|
|
2337
2343
|
"items": {},
|
|
2338
2344
|
"default": []
|
|
2339
2345
|
}
|
|
2340
|
-
}
|
|
2341
|
-
"required": [
|
|
2342
|
-
"sql"
|
|
2343
|
-
]
|
|
2346
|
+
}
|
|
2344
2347
|
}
|
|
2345
2348
|
}
|
|
2346
2349
|
}
|
|
@@ -7123,6 +7126,583 @@
|
|
|
7123
7126
|
}
|
|
7124
7127
|
}
|
|
7125
7128
|
},
|
|
7129
|
+
"/api/script-runs": {
|
|
7130
|
+
"post": {
|
|
7131
|
+
"operationId": "script_runs_create",
|
|
7132
|
+
"summary": "Launch a durable script workflow run",
|
|
7133
|
+
"description": "Foundation endpoint for Script Workflows v1. In PR 1 it persists the run and returns its dashboard URL; spawning is added by the supervisor PR.",
|
|
7134
|
+
"tags": [
|
|
7135
|
+
"Script Runs"
|
|
7136
|
+
],
|
|
7137
|
+
"security": [
|
|
7138
|
+
{
|
|
7139
|
+
"bearerAuth": []
|
|
7140
|
+
}
|
|
7141
|
+
],
|
|
7142
|
+
"requestBody": {
|
|
7143
|
+
"content": {
|
|
7144
|
+
"application/json": {
|
|
7145
|
+
"schema": {
|
|
7146
|
+
"type": "object",
|
|
7147
|
+
"properties": {
|
|
7148
|
+
"source": {
|
|
7149
|
+
"type": "string",
|
|
7150
|
+
"minLength": 1
|
|
7151
|
+
},
|
|
7152
|
+
"args": {},
|
|
7153
|
+
"background": {
|
|
7154
|
+
"type": "boolean",
|
|
7155
|
+
"default": true
|
|
7156
|
+
},
|
|
7157
|
+
"idempotencyKey": {
|
|
7158
|
+
"type": "string",
|
|
7159
|
+
"minLength": 1,
|
|
7160
|
+
"maxLength": 200
|
|
7161
|
+
},
|
|
7162
|
+
"scriptName": {
|
|
7163
|
+
"type": "string",
|
|
7164
|
+
"minLength": 1,
|
|
7165
|
+
"maxLength": 200
|
|
7166
|
+
},
|
|
7167
|
+
"requestedByUserId": {
|
|
7168
|
+
"type": "string"
|
|
7169
|
+
}
|
|
7170
|
+
},
|
|
7171
|
+
"required": [
|
|
7172
|
+
"source"
|
|
7173
|
+
]
|
|
7174
|
+
}
|
|
7175
|
+
}
|
|
7176
|
+
}
|
|
7177
|
+
},
|
|
7178
|
+
"responses": {
|
|
7179
|
+
"201": {
|
|
7180
|
+
"description": "Script run created"
|
|
7181
|
+
},
|
|
7182
|
+
"400": {
|
|
7183
|
+
"description": "Validation or label-lint failure"
|
|
7184
|
+
},
|
|
7185
|
+
"409": {
|
|
7186
|
+
"description": "Existing idempotent run returned"
|
|
7187
|
+
},
|
|
7188
|
+
"429": {
|
|
7189
|
+
"description": "Script run concurrency cap reached"
|
|
7190
|
+
}
|
|
7191
|
+
}
|
|
7192
|
+
},
|
|
7193
|
+
"get": {
|
|
7194
|
+
"operationId": "script_runs_list",
|
|
7195
|
+
"summary": "List script workflow runs",
|
|
7196
|
+
"tags": [
|
|
7197
|
+
"Script Runs"
|
|
7198
|
+
],
|
|
7199
|
+
"security": [
|
|
7200
|
+
{
|
|
7201
|
+
"bearerAuth": []
|
|
7202
|
+
}
|
|
7203
|
+
],
|
|
7204
|
+
"parameters": [
|
|
7205
|
+
{
|
|
7206
|
+
"schema": {
|
|
7207
|
+
"type": "string",
|
|
7208
|
+
"enum": [
|
|
7209
|
+
"running",
|
|
7210
|
+
"paused",
|
|
7211
|
+
"completed",
|
|
7212
|
+
"failed",
|
|
7213
|
+
"cancelled",
|
|
7214
|
+
"aborted_limit"
|
|
7215
|
+
]
|
|
7216
|
+
},
|
|
7217
|
+
"required": false,
|
|
7218
|
+
"name": "status",
|
|
7219
|
+
"in": "query"
|
|
7220
|
+
},
|
|
7221
|
+
{
|
|
7222
|
+
"schema": {
|
|
7223
|
+
"type": "string"
|
|
7224
|
+
},
|
|
7225
|
+
"required": false,
|
|
7226
|
+
"name": "agentId",
|
|
7227
|
+
"in": "query"
|
|
7228
|
+
},
|
|
7229
|
+
{
|
|
7230
|
+
"schema": {
|
|
7231
|
+
"type": "integer",
|
|
7232
|
+
"minimum": 1,
|
|
7233
|
+
"maximum": 500
|
|
7234
|
+
},
|
|
7235
|
+
"required": false,
|
|
7236
|
+
"name": "limit",
|
|
7237
|
+
"in": "query"
|
|
7238
|
+
},
|
|
7239
|
+
{
|
|
7240
|
+
"schema": {
|
|
7241
|
+
"type": [
|
|
7242
|
+
"integer",
|
|
7243
|
+
"null"
|
|
7244
|
+
],
|
|
7245
|
+
"minimum": 0
|
|
7246
|
+
},
|
|
7247
|
+
"required": false,
|
|
7248
|
+
"name": "offset",
|
|
7249
|
+
"in": "query"
|
|
7250
|
+
}
|
|
7251
|
+
],
|
|
7252
|
+
"responses": {
|
|
7253
|
+
"200": {
|
|
7254
|
+
"description": "Paginated script run list"
|
|
7255
|
+
}
|
|
7256
|
+
}
|
|
7257
|
+
}
|
|
7258
|
+
},
|
|
7259
|
+
"/api/script-runs/{id}": {
|
|
7260
|
+
"get": {
|
|
7261
|
+
"operationId": "script_runs_get",
|
|
7262
|
+
"summary": "Get a script workflow run with journal",
|
|
7263
|
+
"tags": [
|
|
7264
|
+
"Script Runs"
|
|
7265
|
+
],
|
|
7266
|
+
"security": [
|
|
7267
|
+
{
|
|
7268
|
+
"bearerAuth": []
|
|
7269
|
+
}
|
|
7270
|
+
],
|
|
7271
|
+
"parameters": [
|
|
7272
|
+
{
|
|
7273
|
+
"schema": {
|
|
7274
|
+
"type": "string",
|
|
7275
|
+
"format": "uuid"
|
|
7276
|
+
},
|
|
7277
|
+
"required": true,
|
|
7278
|
+
"name": "id",
|
|
7279
|
+
"in": "path"
|
|
7280
|
+
}
|
|
7281
|
+
],
|
|
7282
|
+
"responses": {
|
|
7283
|
+
"200": {
|
|
7284
|
+
"description": "Script run detail"
|
|
7285
|
+
},
|
|
7286
|
+
"404": {
|
|
7287
|
+
"description": "Script run not found"
|
|
7288
|
+
}
|
|
7289
|
+
}
|
|
7290
|
+
},
|
|
7291
|
+
"delete": {
|
|
7292
|
+
"operationId": "script_runs_cancel",
|
|
7293
|
+
"summary": "Cancel a script workflow run",
|
|
7294
|
+
"tags": [
|
|
7295
|
+
"Script Runs"
|
|
7296
|
+
],
|
|
7297
|
+
"security": [
|
|
7298
|
+
{
|
|
7299
|
+
"bearerAuth": []
|
|
7300
|
+
}
|
|
7301
|
+
],
|
|
7302
|
+
"parameters": [
|
|
7303
|
+
{
|
|
7304
|
+
"schema": {
|
|
7305
|
+
"type": "string",
|
|
7306
|
+
"format": "uuid"
|
|
7307
|
+
},
|
|
7308
|
+
"required": true,
|
|
7309
|
+
"name": "id",
|
|
7310
|
+
"in": "path"
|
|
7311
|
+
}
|
|
7312
|
+
],
|
|
7313
|
+
"responses": {
|
|
7314
|
+
"204": {
|
|
7315
|
+
"description": "Script run cancelled, or already terminal"
|
|
7316
|
+
},
|
|
7317
|
+
"404": {
|
|
7318
|
+
"description": "Script run not found"
|
|
7319
|
+
}
|
|
7320
|
+
}
|
|
7321
|
+
}
|
|
7322
|
+
},
|
|
7323
|
+
"/api/internal/script-runs/{runId}/steps/{stepKey}": {
|
|
7324
|
+
"get": {
|
|
7325
|
+
"operationId": "script_runs_internal_step_get",
|
|
7326
|
+
"summary": "Get a script run journal step",
|
|
7327
|
+
"tags": [
|
|
7328
|
+
"Script Runs"
|
|
7329
|
+
],
|
|
7330
|
+
"security": [
|
|
7331
|
+
{
|
|
7332
|
+
"bearerAuth": []
|
|
7333
|
+
}
|
|
7334
|
+
],
|
|
7335
|
+
"parameters": [
|
|
7336
|
+
{
|
|
7337
|
+
"schema": {
|
|
7338
|
+
"type": "string",
|
|
7339
|
+
"format": "uuid"
|
|
7340
|
+
},
|
|
7341
|
+
"required": true,
|
|
7342
|
+
"name": "runId",
|
|
7343
|
+
"in": "path"
|
|
7344
|
+
},
|
|
7345
|
+
{
|
|
7346
|
+
"schema": {
|
|
7347
|
+
"type": "string",
|
|
7348
|
+
"minLength": 1
|
|
7349
|
+
},
|
|
7350
|
+
"required": true,
|
|
7351
|
+
"name": "stepKey",
|
|
7352
|
+
"in": "path"
|
|
7353
|
+
}
|
|
7354
|
+
],
|
|
7355
|
+
"responses": {
|
|
7356
|
+
"200": {
|
|
7357
|
+
"description": "Journal step found"
|
|
7358
|
+
},
|
|
7359
|
+
"404": {
|
|
7360
|
+
"description": "Journal step not found"
|
|
7361
|
+
}
|
|
7362
|
+
}
|
|
7363
|
+
}
|
|
7364
|
+
},
|
|
7365
|
+
"/api/internal/script-runs/{runId}/steps": {
|
|
7366
|
+
"post": {
|
|
7367
|
+
"operationId": "script_runs_internal_step_create",
|
|
7368
|
+
"summary": "Write a script run journal step",
|
|
7369
|
+
"tags": [
|
|
7370
|
+
"Script Runs"
|
|
7371
|
+
],
|
|
7372
|
+
"security": [
|
|
7373
|
+
{
|
|
7374
|
+
"bearerAuth": []
|
|
7375
|
+
}
|
|
7376
|
+
],
|
|
7377
|
+
"parameters": [
|
|
7378
|
+
{
|
|
7379
|
+
"schema": {
|
|
7380
|
+
"type": "string",
|
|
7381
|
+
"format": "uuid"
|
|
7382
|
+
},
|
|
7383
|
+
"required": true,
|
|
7384
|
+
"name": "runId",
|
|
7385
|
+
"in": "path"
|
|
7386
|
+
}
|
|
7387
|
+
],
|
|
7388
|
+
"requestBody": {
|
|
7389
|
+
"content": {
|
|
7390
|
+
"application/json": {
|
|
7391
|
+
"schema": {
|
|
7392
|
+
"type": "object",
|
|
7393
|
+
"properties": {
|
|
7394
|
+
"stepKey": {
|
|
7395
|
+
"type": "string",
|
|
7396
|
+
"minLength": 1
|
|
7397
|
+
},
|
|
7398
|
+
"stepType": {
|
|
7399
|
+
"type": "string",
|
|
7400
|
+
"minLength": 1
|
|
7401
|
+
},
|
|
7402
|
+
"config": {},
|
|
7403
|
+
"status": {
|
|
7404
|
+
"type": "string",
|
|
7405
|
+
"enum": [
|
|
7406
|
+
"completed",
|
|
7407
|
+
"failed"
|
|
7408
|
+
]
|
|
7409
|
+
},
|
|
7410
|
+
"result": {},
|
|
7411
|
+
"error": {
|
|
7412
|
+
"type": "string"
|
|
7413
|
+
}
|
|
7414
|
+
},
|
|
7415
|
+
"required": [
|
|
7416
|
+
"stepKey",
|
|
7417
|
+
"stepType",
|
|
7418
|
+
"status"
|
|
7419
|
+
]
|
|
7420
|
+
}
|
|
7421
|
+
}
|
|
7422
|
+
}
|
|
7423
|
+
},
|
|
7424
|
+
"responses": {
|
|
7425
|
+
"201": {
|
|
7426
|
+
"description": "Journal step written"
|
|
7427
|
+
},
|
|
7428
|
+
"404": {
|
|
7429
|
+
"description": "Script run not found"
|
|
7430
|
+
}
|
|
7431
|
+
}
|
|
7432
|
+
}
|
|
7433
|
+
},
|
|
7434
|
+
"/api/internal/script-runs/{runId}/heartbeat": {
|
|
7435
|
+
"post": {
|
|
7436
|
+
"operationId": "script_runs_internal_heartbeat",
|
|
7437
|
+
"summary": "Record a script run heartbeat",
|
|
7438
|
+
"tags": [
|
|
7439
|
+
"Script Runs"
|
|
7440
|
+
],
|
|
7441
|
+
"security": [
|
|
7442
|
+
{
|
|
7443
|
+
"bearerAuth": []
|
|
7444
|
+
}
|
|
7445
|
+
],
|
|
7446
|
+
"parameters": [
|
|
7447
|
+
{
|
|
7448
|
+
"schema": {
|
|
7449
|
+
"type": "string",
|
|
7450
|
+
"format": "uuid"
|
|
7451
|
+
},
|
|
7452
|
+
"required": true,
|
|
7453
|
+
"name": "runId",
|
|
7454
|
+
"in": "path"
|
|
7455
|
+
}
|
|
7456
|
+
],
|
|
7457
|
+
"responses": {
|
|
7458
|
+
"204": {
|
|
7459
|
+
"description": "Heartbeat recorded"
|
|
7460
|
+
},
|
|
7461
|
+
"404": {
|
|
7462
|
+
"description": "Script run not found"
|
|
7463
|
+
}
|
|
7464
|
+
}
|
|
7465
|
+
}
|
|
7466
|
+
},
|
|
7467
|
+
"/api/internal/script-runs/{runId}/status": {
|
|
7468
|
+
"post": {
|
|
7469
|
+
"operationId": "script_runs_internal_status",
|
|
7470
|
+
"summary": "Update script run status from subprocess",
|
|
7471
|
+
"tags": [
|
|
7472
|
+
"Script Runs"
|
|
7473
|
+
],
|
|
7474
|
+
"security": [
|
|
7475
|
+
{
|
|
7476
|
+
"bearerAuth": []
|
|
7477
|
+
}
|
|
7478
|
+
],
|
|
7479
|
+
"parameters": [
|
|
7480
|
+
{
|
|
7481
|
+
"schema": {
|
|
7482
|
+
"type": "string",
|
|
7483
|
+
"format": "uuid"
|
|
7484
|
+
},
|
|
7485
|
+
"required": true,
|
|
7486
|
+
"name": "runId",
|
|
7487
|
+
"in": "path"
|
|
7488
|
+
}
|
|
7489
|
+
],
|
|
7490
|
+
"requestBody": {
|
|
7491
|
+
"content": {
|
|
7492
|
+
"application/json": {
|
|
7493
|
+
"schema": {
|
|
7494
|
+
"oneOf": [
|
|
7495
|
+
{
|
|
7496
|
+
"type": "object",
|
|
7497
|
+
"properties": {
|
|
7498
|
+
"status": {
|
|
7499
|
+
"type": "string",
|
|
7500
|
+
"enum": [
|
|
7501
|
+
"completed"
|
|
7502
|
+
]
|
|
7503
|
+
},
|
|
7504
|
+
"output": {}
|
|
7505
|
+
},
|
|
7506
|
+
"required": [
|
|
7507
|
+
"status"
|
|
7508
|
+
]
|
|
7509
|
+
},
|
|
7510
|
+
{
|
|
7511
|
+
"type": "object",
|
|
7512
|
+
"properties": {
|
|
7513
|
+
"status": {
|
|
7514
|
+
"type": "string",
|
|
7515
|
+
"enum": [
|
|
7516
|
+
"failed"
|
|
7517
|
+
]
|
|
7518
|
+
},
|
|
7519
|
+
"error": {
|
|
7520
|
+
"type": "string"
|
|
7521
|
+
}
|
|
7522
|
+
},
|
|
7523
|
+
"required": [
|
|
7524
|
+
"status"
|
|
7525
|
+
]
|
|
7526
|
+
},
|
|
7527
|
+
{
|
|
7528
|
+
"type": "object",
|
|
7529
|
+
"properties": {
|
|
7530
|
+
"status": {
|
|
7531
|
+
"type": "string",
|
|
7532
|
+
"enum": [
|
|
7533
|
+
"paused"
|
|
7534
|
+
]
|
|
7535
|
+
}
|
|
7536
|
+
},
|
|
7537
|
+
"required": [
|
|
7538
|
+
"status"
|
|
7539
|
+
]
|
|
7540
|
+
}
|
|
7541
|
+
]
|
|
7542
|
+
}
|
|
7543
|
+
}
|
|
7544
|
+
}
|
|
7545
|
+
},
|
|
7546
|
+
"responses": {
|
|
7547
|
+
"204": {
|
|
7548
|
+
"description": "Status updated"
|
|
7549
|
+
},
|
|
7550
|
+
"404": {
|
|
7551
|
+
"description": "Script run not found"
|
|
7552
|
+
}
|
|
7553
|
+
}
|
|
7554
|
+
}
|
|
7555
|
+
},
|
|
7556
|
+
"/api/internal/raw-llm": {
|
|
7557
|
+
"post": {
|
|
7558
|
+
"operationId": "script_runs_internal_raw_llm",
|
|
7559
|
+
"summary": "Execute a raw LLM call for a script workflow",
|
|
7560
|
+
"tags": [
|
|
7561
|
+
"Script Runs"
|
|
7562
|
+
],
|
|
7563
|
+
"security": [
|
|
7564
|
+
{
|
|
7565
|
+
"bearerAuth": []
|
|
7566
|
+
}
|
|
7567
|
+
],
|
|
7568
|
+
"requestBody": {
|
|
7569
|
+
"content": {
|
|
7570
|
+
"application/json": {
|
|
7571
|
+
"schema": {
|
|
7572
|
+
"type": "object",
|
|
7573
|
+
"properties": {
|
|
7574
|
+
"prompt": {
|
|
7575
|
+
"type": "string"
|
|
7576
|
+
},
|
|
7577
|
+
"model": {
|
|
7578
|
+
"type": "string"
|
|
7579
|
+
},
|
|
7580
|
+
"schema": {
|
|
7581
|
+
"type": "object",
|
|
7582
|
+
"additionalProperties": {}
|
|
7583
|
+
},
|
|
7584
|
+
"fallbackPort": {
|
|
7585
|
+
"type": "string"
|
|
7586
|
+
}
|
|
7587
|
+
},
|
|
7588
|
+
"required": [
|
|
7589
|
+
"prompt"
|
|
7590
|
+
]
|
|
7591
|
+
}
|
|
7592
|
+
}
|
|
7593
|
+
}
|
|
7594
|
+
},
|
|
7595
|
+
"responses": {
|
|
7596
|
+
"200": {
|
|
7597
|
+
"description": "LLM call completed"
|
|
7598
|
+
},
|
|
7599
|
+
"500": {
|
|
7600
|
+
"description": "LLM call failed"
|
|
7601
|
+
}
|
|
7602
|
+
}
|
|
7603
|
+
}
|
|
7604
|
+
},
|
|
7605
|
+
"/api/internal/script-runs/{runId}/agent-task": {
|
|
7606
|
+
"post": {
|
|
7607
|
+
"operationId": "script_runs_internal_agent_task",
|
|
7608
|
+
"summary": "Create or wait for a script workflow agent task step",
|
|
7609
|
+
"tags": [
|
|
7610
|
+
"Script Runs"
|
|
7611
|
+
],
|
|
7612
|
+
"security": [
|
|
7613
|
+
{
|
|
7614
|
+
"bearerAuth": []
|
|
7615
|
+
}
|
|
7616
|
+
],
|
|
7617
|
+
"parameters": [
|
|
7618
|
+
{
|
|
7619
|
+
"schema": {
|
|
7620
|
+
"type": "string",
|
|
7621
|
+
"format": "uuid"
|
|
7622
|
+
},
|
|
7623
|
+
"required": true,
|
|
7624
|
+
"name": "runId",
|
|
7625
|
+
"in": "path"
|
|
7626
|
+
}
|
|
7627
|
+
],
|
|
7628
|
+
"requestBody": {
|
|
7629
|
+
"content": {
|
|
7630
|
+
"application/json": {
|
|
7631
|
+
"schema": {
|
|
7632
|
+
"type": "object",
|
|
7633
|
+
"properties": {
|
|
7634
|
+
"stepKey": {
|
|
7635
|
+
"type": "string",
|
|
7636
|
+
"minLength": 1
|
|
7637
|
+
},
|
|
7638
|
+
"template": {
|
|
7639
|
+
"type": "string"
|
|
7640
|
+
},
|
|
7641
|
+
"task": {
|
|
7642
|
+
"type": "string"
|
|
7643
|
+
},
|
|
7644
|
+
"agentId": {
|
|
7645
|
+
"type": "string",
|
|
7646
|
+
"format": "uuid"
|
|
7647
|
+
},
|
|
7648
|
+
"tags": {
|
|
7649
|
+
"type": "array",
|
|
7650
|
+
"items": {
|
|
7651
|
+
"type": "string"
|
|
7652
|
+
}
|
|
7653
|
+
},
|
|
7654
|
+
"priority": {
|
|
7655
|
+
"type": "integer",
|
|
7656
|
+
"minimum": 0,
|
|
7657
|
+
"maximum": 100
|
|
7658
|
+
},
|
|
7659
|
+
"offerMode": {
|
|
7660
|
+
"type": "boolean"
|
|
7661
|
+
},
|
|
7662
|
+
"dir": {
|
|
7663
|
+
"type": "string",
|
|
7664
|
+
"minLength": 1
|
|
7665
|
+
},
|
|
7666
|
+
"vcsRepo": {
|
|
7667
|
+
"type": "string",
|
|
7668
|
+
"minLength": 1
|
|
7669
|
+
},
|
|
7670
|
+
"model": {
|
|
7671
|
+
"type": "string",
|
|
7672
|
+
"minLength": 1
|
|
7673
|
+
},
|
|
7674
|
+
"parentTaskId": {
|
|
7675
|
+
"type": "string",
|
|
7676
|
+
"format": "uuid"
|
|
7677
|
+
},
|
|
7678
|
+
"requestedByUserId": {
|
|
7679
|
+
"type": "string"
|
|
7680
|
+
},
|
|
7681
|
+
"outputSchema": {
|
|
7682
|
+
"type": "object",
|
|
7683
|
+
"additionalProperties": {}
|
|
7684
|
+
}
|
|
7685
|
+
},
|
|
7686
|
+
"required": [
|
|
7687
|
+
"stepKey"
|
|
7688
|
+
]
|
|
7689
|
+
}
|
|
7690
|
+
}
|
|
7691
|
+
}
|
|
7692
|
+
},
|
|
7693
|
+
"responses": {
|
|
7694
|
+
"200": {
|
|
7695
|
+
"description": "Agent task completed"
|
|
7696
|
+
},
|
|
7697
|
+
"202": {
|
|
7698
|
+
"description": "Agent task created or still running"
|
|
7699
|
+
},
|
|
7700
|
+
"404": {
|
|
7701
|
+
"description": "Script run not found"
|
|
7702
|
+
}
|
|
7703
|
+
}
|
|
7704
|
+
}
|
|
7705
|
+
},
|
|
7126
7706
|
"/api/session-logs": {
|
|
7127
7707
|
"post": {
|
|
7128
7708
|
"summary": "Store session logs",
|
package/package.json
CHANGED