@desplega.ai/agent-swarm 1.80.0 → 1.80.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/openapi.json +399 -14
- package/package.json +3 -1
- package/src/artifact-sdk/server.ts +2 -1
- package/src/be/db.ts +1 -1
- package/src/be/migrations/064_scripts.sql +39 -0
- package/src/be/migrations/065_script_embeddings.sql +7 -0
- package/src/be/migrations/066_scripts_args_json_schema.sql +1 -0
- package/src/be/scripts/db.ts +417 -0
- package/src/be/scripts/embeddings.ts +233 -0
- package/src/be/scripts/extract-schema.ts +55 -0
- package/src/be/scripts/maintenance.ts +9 -0
- package/src/be/scripts/typecheck.ts +199 -0
- package/src/cli.tsx +22 -5
- package/src/commands/artifact.ts +3 -2
- package/src/commands/claude-managed-setup.ts +2 -1
- package/src/commands/codex-login.ts +5 -3
- package/src/commands/onboard.tsx +2 -1
- package/src/commands/runner.ts +153 -20
- package/src/commands/setup.tsx +5 -3
- package/src/hooks/hook.ts +4 -3
- package/src/http/index.ts +40 -29
- package/src/http/memory.ts +28 -0
- package/src/http/openapi.ts +1 -0
- package/src/http/page-proxy.ts +2 -1
- package/src/http/route-def.ts +1 -0
- package/src/http/schedules.ts +37 -0
- package/src/http/scripts.ts +388 -0
- package/src/linear/outbound.ts +9 -2
- package/src/otel.ts +5 -0
- package/src/providers/claude-adapter.ts +23 -1
- package/src/providers/types.ts +8 -0
- package/src/scripts-runtime/ctx.ts +23 -0
- package/src/scripts-runtime/eval-harness.ts +63 -0
- package/src/scripts-runtime/executors/native.ts +232 -0
- package/src/scripts-runtime/executors/registry.ts +16 -0
- package/src/scripts-runtime/executors/types.ts +63 -0
- package/src/scripts-runtime/extract-args-schema.ts +69 -0
- package/src/scripts-runtime/extract-signature.ts +81 -0
- package/src/scripts-runtime/import-allowlist.ts +109 -0
- package/src/scripts-runtime/loader.ts +96 -0
- package/src/scripts-runtime/redacted.ts +48 -0
- package/src/scripts-runtime/sdk-allowlist.ts +29 -0
- package/src/scripts-runtime/stdlib/fetch.ts +46 -0
- package/src/scripts-runtime/stdlib/glob.ts +8 -0
- package/src/scripts-runtime/stdlib/grep.ts +34 -0
- package/src/scripts-runtime/stdlib/index.ts +16 -0
- package/src/scripts-runtime/stdlib/table.ts +17 -0
- package/src/scripts-runtime/swarm-config.ts +35 -0
- package/src/scripts-runtime/swarm-sdk.ts +197 -0
- package/src/scripts-runtime/types/stdlib.d.ts +104 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +86 -0
- package/src/server.ts +12 -0
- package/src/tests/api-key.test.ts +33 -0
- package/src/tests/codex-login.test.ts +1 -1
- package/src/tests/error-tracker.test.ts +44 -0
- package/src/tests/linear-outbound-sync.test.ts +109 -0
- package/src/tests/mcp-tools.test.ts +69 -0
- package/src/tests/rate-limit-event.test.ts +292 -0
- package/src/tests/redacted.test.ts +29 -0
- package/src/tests/runner-tool-spans.test.ts +268 -0
- package/src/tests/script-executor-conformance.test.ts +142 -0
- package/src/tests/script-executor-registry.test.ts +17 -0
- package/src/tests/scripts-db.test.ts +329 -0
- package/src/tests/scripts-embeddings.test.ts +291 -0
- package/src/tests/scripts-extract-signature.test.ts +47 -0
- package/src/tests/scripts-http.test.ts +403 -0
- package/src/tests/scripts-import-allowlist.test.ts +55 -0
- package/src/tests/scripts-mcp-e2e.test.ts +269 -0
- package/src/tests/scripts-runtime-secret-egress.test.ts +44 -0
- package/src/tests/scripts-runtime.test.ts +344 -0
- package/src/tests/sdk-allowlist.test.ts +59 -0
- package/src/tests/secret-scrubber.test.ts +35 -1
- package/src/tests/swarm-config.test.ts +38 -0
- package/src/tests/tool-annotations.test.ts +2 -2
- package/src/tests/tool-call-progress.test.ts +30 -0
- package/src/tests/workflow-e2e.test.ts +218 -0
- package/src/tests/workflow-executors.test.ts +32 -2
- package/src/tests/workflow-input-redaction.test.ts +232 -0
- package/src/tests/workflow-swarm-script.test.ts +273 -0
- package/src/tools/memory-rate.ts +2 -1
- package/src/tools/script-common.ts +88 -0
- package/src/tools/script-delete.ts +35 -0
- package/src/tools/script-query-types.ts +37 -0
- package/src/tools/script-run.ts +43 -0
- package/src/tools/script-search.ts +32 -0
- package/src/tools/script-upsert.ts +43 -0
- package/src/tools/tool-config.ts +7 -0
- package/src/types.ts +61 -1
- package/src/utils/api-key.ts +28 -0
- package/src/utils/error-tracker.ts +58 -0
- package/src/utils/page-session.ts +8 -6
- package/src/utils/secret-scrubber.ts +22 -1
- package/src/workflows/engine.ts +12 -4
- package/src/workflows/executors/index.ts +1 -0
- package/src/workflows/executors/registry.ts +2 -0
- package/src/workflows/executors/script.ts +12 -1
- package/src/workflows/executors/swarm-script.ts +170 -0
- package/src/workflows/input.ts +65 -0
- package/src/workflows/recovery.ts +31 -3
- package/src/workflows/resume.ts +43 -5
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.80.
|
|
5
|
+
"version": "1.80.2",
|
|
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": [
|
|
@@ -2715,7 +2715,8 @@
|
|
|
2715
2715
|
"workflow.run.end",
|
|
2716
2716
|
"system.boot",
|
|
2717
2717
|
"system.migration",
|
|
2718
|
-
"system.error"
|
|
2718
|
+
"system.error",
|
|
2719
|
+
"script.global_upsert"
|
|
2719
2720
|
]
|
|
2720
2721
|
},
|
|
2721
2722
|
"status": {
|
|
@@ -2829,7 +2830,8 @@
|
|
|
2829
2830
|
"workflow.run.end",
|
|
2830
2831
|
"system.boot",
|
|
2831
2832
|
"system.migration",
|
|
2832
|
-
"system.error"
|
|
2833
|
+
"system.error",
|
|
2834
|
+
"script.global_upsert"
|
|
2833
2835
|
]
|
|
2834
2836
|
},
|
|
2835
2837
|
"required": false,
|
|
@@ -2979,7 +2981,8 @@
|
|
|
2979
2981
|
"workflow.run.end",
|
|
2980
2982
|
"system.boot",
|
|
2981
2983
|
"system.migration",
|
|
2982
|
-
"system.error"
|
|
2984
|
+
"system.error",
|
|
2985
|
+
"script.global_upsert"
|
|
2983
2986
|
]
|
|
2984
2987
|
},
|
|
2985
2988
|
"status": {
|
|
@@ -4172,6 +4175,36 @@
|
|
|
4172
4175
|
"description": "Memory not found"
|
|
4173
4176
|
}
|
|
4174
4177
|
}
|
|
4178
|
+
},
|
|
4179
|
+
"get": {
|
|
4180
|
+
"summary": "Get a single memory by ID",
|
|
4181
|
+
"tags": [
|
|
4182
|
+
"Memory"
|
|
4183
|
+
],
|
|
4184
|
+
"security": [
|
|
4185
|
+
{
|
|
4186
|
+
"bearerAuth": []
|
|
4187
|
+
}
|
|
4188
|
+
],
|
|
4189
|
+
"parameters": [
|
|
4190
|
+
{
|
|
4191
|
+
"schema": {
|
|
4192
|
+
"type": "string",
|
|
4193
|
+
"format": "uuid"
|
|
4194
|
+
},
|
|
4195
|
+
"required": true,
|
|
4196
|
+
"name": "id",
|
|
4197
|
+
"in": "path"
|
|
4198
|
+
}
|
|
4199
|
+
],
|
|
4200
|
+
"responses": {
|
|
4201
|
+
"200": {
|
|
4202
|
+
"description": "Memory details"
|
|
4203
|
+
},
|
|
4204
|
+
"404": {
|
|
4205
|
+
"description": "Memory not found"
|
|
4206
|
+
}
|
|
4207
|
+
}
|
|
4175
4208
|
}
|
|
4176
4209
|
},
|
|
4177
4210
|
"/api/memory/rate": {
|
|
@@ -6695,6 +6728,68 @@
|
|
|
6695
6728
|
"description": "Duplicate name"
|
|
6696
6729
|
}
|
|
6697
6730
|
}
|
|
6731
|
+
},
|
|
6732
|
+
"get": {
|
|
6733
|
+
"summary": "List schedules",
|
|
6734
|
+
"tags": [
|
|
6735
|
+
"Schedules"
|
|
6736
|
+
],
|
|
6737
|
+
"security": [
|
|
6738
|
+
{
|
|
6739
|
+
"bearerAuth": []
|
|
6740
|
+
}
|
|
6741
|
+
],
|
|
6742
|
+
"parameters": [
|
|
6743
|
+
{
|
|
6744
|
+
"schema": {
|
|
6745
|
+
"type": "string",
|
|
6746
|
+
"enum": [
|
|
6747
|
+
"true",
|
|
6748
|
+
"false"
|
|
6749
|
+
]
|
|
6750
|
+
},
|
|
6751
|
+
"required": false,
|
|
6752
|
+
"name": "enabled",
|
|
6753
|
+
"in": "query"
|
|
6754
|
+
},
|
|
6755
|
+
{
|
|
6756
|
+
"schema": {
|
|
6757
|
+
"type": "string"
|
|
6758
|
+
},
|
|
6759
|
+
"required": false,
|
|
6760
|
+
"name": "name",
|
|
6761
|
+
"in": "query"
|
|
6762
|
+
},
|
|
6763
|
+
{
|
|
6764
|
+
"schema": {
|
|
6765
|
+
"type": "string",
|
|
6766
|
+
"enum": [
|
|
6767
|
+
"recurring",
|
|
6768
|
+
"one_time"
|
|
6769
|
+
]
|
|
6770
|
+
},
|
|
6771
|
+
"required": false,
|
|
6772
|
+
"name": "scheduleType",
|
|
6773
|
+
"in": "query"
|
|
6774
|
+
},
|
|
6775
|
+
{
|
|
6776
|
+
"schema": {
|
|
6777
|
+
"type": "string",
|
|
6778
|
+
"enum": [
|
|
6779
|
+
"true",
|
|
6780
|
+
"false"
|
|
6781
|
+
]
|
|
6782
|
+
},
|
|
6783
|
+
"required": false,
|
|
6784
|
+
"name": "hideCompleted",
|
|
6785
|
+
"in": "query"
|
|
6786
|
+
}
|
|
6787
|
+
],
|
|
6788
|
+
"responses": {
|
|
6789
|
+
"200": {
|
|
6790
|
+
"description": "List of schedules"
|
|
6791
|
+
}
|
|
6792
|
+
}
|
|
6698
6793
|
}
|
|
6699
6794
|
},
|
|
6700
6795
|
"/api/schedules/{id}/run": {
|
|
@@ -7726,6 +7821,296 @@
|
|
|
7726
7821
|
}
|
|
7727
7822
|
}
|
|
7728
7823
|
},
|
|
7824
|
+
"/api/scripts/upsert": {
|
|
7825
|
+
"post": {
|
|
7826
|
+
"operationId": "scripts_upsert",
|
|
7827
|
+
"summary": "Create or update a reusable script",
|
|
7828
|
+
"description": "Explicit script upserts run a TypeScript typecheck before writing.",
|
|
7829
|
+
"tags": [
|
|
7830
|
+
"Scripts"
|
|
7831
|
+
],
|
|
7832
|
+
"security": [
|
|
7833
|
+
{
|
|
7834
|
+
"bearerAuth": []
|
|
7835
|
+
}
|
|
7836
|
+
],
|
|
7837
|
+
"requestBody": {
|
|
7838
|
+
"content": {
|
|
7839
|
+
"application/json": {
|
|
7840
|
+
"schema": {
|
|
7841
|
+
"type": "object",
|
|
7842
|
+
"properties": {
|
|
7843
|
+
"name": {
|
|
7844
|
+
"type": "string",
|
|
7845
|
+
"minLength": 1,
|
|
7846
|
+
"maxLength": 200
|
|
7847
|
+
},
|
|
7848
|
+
"source": {
|
|
7849
|
+
"type": "string",
|
|
7850
|
+
"minLength": 1
|
|
7851
|
+
},
|
|
7852
|
+
"description": {
|
|
7853
|
+
"type": "string",
|
|
7854
|
+
"default": ""
|
|
7855
|
+
},
|
|
7856
|
+
"intent": {
|
|
7857
|
+
"type": "string",
|
|
7858
|
+
"default": ""
|
|
7859
|
+
},
|
|
7860
|
+
"scope": {
|
|
7861
|
+
"type": "string",
|
|
7862
|
+
"enum": [
|
|
7863
|
+
"global",
|
|
7864
|
+
"agent"
|
|
7865
|
+
],
|
|
7866
|
+
"default": "agent"
|
|
7867
|
+
},
|
|
7868
|
+
"fsMode": {
|
|
7869
|
+
"type": "string",
|
|
7870
|
+
"enum": [
|
|
7871
|
+
"none",
|
|
7872
|
+
"workspace-rw"
|
|
7873
|
+
],
|
|
7874
|
+
"default": "none"
|
|
7875
|
+
}
|
|
7876
|
+
},
|
|
7877
|
+
"required": [
|
|
7878
|
+
"name",
|
|
7879
|
+
"source"
|
|
7880
|
+
]
|
|
7881
|
+
}
|
|
7882
|
+
}
|
|
7883
|
+
}
|
|
7884
|
+
},
|
|
7885
|
+
"responses": {
|
|
7886
|
+
"200": {
|
|
7887
|
+
"description": "Script upserted"
|
|
7888
|
+
},
|
|
7889
|
+
"400": {
|
|
7890
|
+
"description": "Validation or typecheck failure"
|
|
7891
|
+
},
|
|
7892
|
+
"403": {
|
|
7893
|
+
"description": "Global write requires lead agent"
|
|
7894
|
+
}
|
|
7895
|
+
}
|
|
7896
|
+
}
|
|
7897
|
+
},
|
|
7898
|
+
"/api/scripts/run": {
|
|
7899
|
+
"post": {
|
|
7900
|
+
"operationId": "scripts_run",
|
|
7901
|
+
"summary": "Run a reusable or inline script",
|
|
7902
|
+
"description": "Inline source skips typecheck and is auto-saved as a scratch script only on success.",
|
|
7903
|
+
"tags": [
|
|
7904
|
+
"Scripts"
|
|
7905
|
+
],
|
|
7906
|
+
"security": [
|
|
7907
|
+
{
|
|
7908
|
+
"bearerAuth": []
|
|
7909
|
+
}
|
|
7910
|
+
],
|
|
7911
|
+
"requestBody": {
|
|
7912
|
+
"content": {
|
|
7913
|
+
"application/json": {
|
|
7914
|
+
"schema": {
|
|
7915
|
+
"type": "object",
|
|
7916
|
+
"properties": {
|
|
7917
|
+
"name": {
|
|
7918
|
+
"type": "string",
|
|
7919
|
+
"minLength": 1,
|
|
7920
|
+
"maxLength": 200
|
|
7921
|
+
},
|
|
7922
|
+
"source": {
|
|
7923
|
+
"type": "string",
|
|
7924
|
+
"minLength": 1
|
|
7925
|
+
},
|
|
7926
|
+
"args": {},
|
|
7927
|
+
"intent": {
|
|
7928
|
+
"type": "string",
|
|
7929
|
+
"default": ""
|
|
7930
|
+
},
|
|
7931
|
+
"scope": {
|
|
7932
|
+
"type": "string",
|
|
7933
|
+
"enum": [
|
|
7934
|
+
"global",
|
|
7935
|
+
"agent"
|
|
7936
|
+
]
|
|
7937
|
+
},
|
|
7938
|
+
"fsMode": {
|
|
7939
|
+
"type": "string",
|
|
7940
|
+
"enum": [
|
|
7941
|
+
"none",
|
|
7942
|
+
"workspace-rw"
|
|
7943
|
+
],
|
|
7944
|
+
"default": "none"
|
|
7945
|
+
}
|
|
7946
|
+
}
|
|
7947
|
+
}
|
|
7948
|
+
}
|
|
7949
|
+
}
|
|
7950
|
+
},
|
|
7951
|
+
"responses": {
|
|
7952
|
+
"200": {
|
|
7953
|
+
"description": "Script run completed"
|
|
7954
|
+
},
|
|
7955
|
+
"400": {
|
|
7956
|
+
"description": "Validation error"
|
|
7957
|
+
},
|
|
7958
|
+
"404": {
|
|
7959
|
+
"description": "Script not found"
|
|
7960
|
+
},
|
|
7961
|
+
"501": {
|
|
7962
|
+
"description": "workspace-rw scripts are not supported in v1"
|
|
7963
|
+
}
|
|
7964
|
+
}
|
|
7965
|
+
}
|
|
7966
|
+
},
|
|
7967
|
+
"/api/scripts/search": {
|
|
7968
|
+
"post": {
|
|
7969
|
+
"operationId": "scripts_search",
|
|
7970
|
+
"summary": "Search reusable scripts",
|
|
7971
|
+
"description": "Phase 3 search is substring-only over script name and metadata.",
|
|
7972
|
+
"tags": [
|
|
7973
|
+
"Scripts"
|
|
7974
|
+
],
|
|
7975
|
+
"security": [
|
|
7976
|
+
{
|
|
7977
|
+
"bearerAuth": []
|
|
7978
|
+
}
|
|
7979
|
+
],
|
|
7980
|
+
"requestBody": {
|
|
7981
|
+
"content": {
|
|
7982
|
+
"application/json": {
|
|
7983
|
+
"schema": {
|
|
7984
|
+
"type": "object",
|
|
7985
|
+
"properties": {
|
|
7986
|
+
"query": {
|
|
7987
|
+
"type": "string",
|
|
7988
|
+
"default": ""
|
|
7989
|
+
},
|
|
7990
|
+
"scope": {
|
|
7991
|
+
"type": "string",
|
|
7992
|
+
"enum": [
|
|
7993
|
+
"global",
|
|
7994
|
+
"agent"
|
|
7995
|
+
]
|
|
7996
|
+
},
|
|
7997
|
+
"limit": {
|
|
7998
|
+
"type": "integer",
|
|
7999
|
+
"minimum": 1,
|
|
8000
|
+
"maximum": 100,
|
|
8001
|
+
"default": 10
|
|
8002
|
+
}
|
|
8003
|
+
}
|
|
8004
|
+
}
|
|
8005
|
+
}
|
|
8006
|
+
}
|
|
8007
|
+
},
|
|
8008
|
+
"responses": {
|
|
8009
|
+
"200": {
|
|
8010
|
+
"description": "Matching scripts"
|
|
8011
|
+
},
|
|
8012
|
+
"400": {
|
|
8013
|
+
"description": "Validation error"
|
|
8014
|
+
}
|
|
8015
|
+
}
|
|
8016
|
+
}
|
|
8017
|
+
},
|
|
8018
|
+
"/api/scripts/{name}": {
|
|
8019
|
+
"delete": {
|
|
8020
|
+
"operationId": "scripts_delete",
|
|
8021
|
+
"summary": "Delete a reusable script",
|
|
8022
|
+
"tags": [
|
|
8023
|
+
"Scripts"
|
|
8024
|
+
],
|
|
8025
|
+
"security": [
|
|
8026
|
+
{
|
|
8027
|
+
"bearerAuth": []
|
|
8028
|
+
}
|
|
8029
|
+
],
|
|
8030
|
+
"parameters": [
|
|
8031
|
+
{
|
|
8032
|
+
"schema": {
|
|
8033
|
+
"type": "string",
|
|
8034
|
+
"minLength": 1,
|
|
8035
|
+
"maxLength": 200
|
|
8036
|
+
},
|
|
8037
|
+
"required": true,
|
|
8038
|
+
"name": "name",
|
|
8039
|
+
"in": "path"
|
|
8040
|
+
},
|
|
8041
|
+
{
|
|
8042
|
+
"schema": {
|
|
8043
|
+
"type": "string",
|
|
8044
|
+
"enum": [
|
|
8045
|
+
"global",
|
|
8046
|
+
"agent"
|
|
8047
|
+
],
|
|
8048
|
+
"default": "agent"
|
|
8049
|
+
},
|
|
8050
|
+
"required": false,
|
|
8051
|
+
"name": "scope",
|
|
8052
|
+
"in": "query"
|
|
8053
|
+
}
|
|
8054
|
+
],
|
|
8055
|
+
"responses": {
|
|
8056
|
+
"200": {
|
|
8057
|
+
"description": "Delete result"
|
|
8058
|
+
},
|
|
8059
|
+
"400": {
|
|
8060
|
+
"description": "Validation error"
|
|
8061
|
+
},
|
|
8062
|
+
"403": {
|
|
8063
|
+
"description": "Global delete requires lead agent"
|
|
8064
|
+
}
|
|
8065
|
+
}
|
|
8066
|
+
}
|
|
8067
|
+
},
|
|
8068
|
+
"/api/scripts/{name}/types": {
|
|
8069
|
+
"get": {
|
|
8070
|
+
"operationId": "scripts_types",
|
|
8071
|
+
"summary": "Get script signature and authoring types",
|
|
8072
|
+
"tags": [
|
|
8073
|
+
"Scripts"
|
|
8074
|
+
],
|
|
8075
|
+
"security": [
|
|
8076
|
+
{
|
|
8077
|
+
"bearerAuth": []
|
|
8078
|
+
}
|
|
8079
|
+
],
|
|
8080
|
+
"parameters": [
|
|
8081
|
+
{
|
|
8082
|
+
"schema": {
|
|
8083
|
+
"type": "string",
|
|
8084
|
+
"minLength": 1,
|
|
8085
|
+
"maxLength": 200
|
|
8086
|
+
},
|
|
8087
|
+
"required": true,
|
|
8088
|
+
"name": "name",
|
|
8089
|
+
"in": "path"
|
|
8090
|
+
},
|
|
8091
|
+
{
|
|
8092
|
+
"schema": {
|
|
8093
|
+
"type": "string",
|
|
8094
|
+
"enum": [
|
|
8095
|
+
"global",
|
|
8096
|
+
"agent"
|
|
8097
|
+
]
|
|
8098
|
+
},
|
|
8099
|
+
"required": false,
|
|
8100
|
+
"name": "scope",
|
|
8101
|
+
"in": "query"
|
|
8102
|
+
}
|
|
8103
|
+
],
|
|
8104
|
+
"responses": {
|
|
8105
|
+
"200": {
|
|
8106
|
+
"description": "Script signature and type blobs"
|
|
8107
|
+
},
|
|
8108
|
+
"404": {
|
|
8109
|
+
"description": "Script not found"
|
|
8110
|
+
}
|
|
8111
|
+
}
|
|
8112
|
+
}
|
|
8113
|
+
},
|
|
7729
8114
|
"/api/mcp-oauth/{mcpServerId}/metadata": {
|
|
7730
8115
|
"get": {
|
|
7731
8116
|
"summary": "Probe OAuth metadata (PRMD + AS) for an MCP server",
|
|
@@ -10423,7 +10808,7 @@
|
|
|
10423
10808
|
},
|
|
10424
10809
|
"type": {
|
|
10425
10810
|
"type": "string",
|
|
10426
|
-
"description": "Executor type: 'agent-task', 'script', 'raw-llm', 'validate', 'property-match'"
|
|
10811
|
+
"description": "Executor type: 'agent-task', 'script', 'swarm-script', 'raw-llm', 'validate', 'property-match'"
|
|
10427
10812
|
},
|
|
10428
10813
|
"label": {
|
|
10429
10814
|
"type": "string",
|
|
@@ -10432,7 +10817,7 @@
|
|
|
10432
10817
|
"config": {
|
|
10433
10818
|
"type": "object",
|
|
10434
10819
|
"additionalProperties": {},
|
|
10435
|
-
"description": "Executor-specific config. For agent-task: { template, outputSchema?, agentId?, tags?, priority?, dir?, vcsRepo?, model? }. Values support {{interpolation}} from the node's inputs context. NOTE: config.outputSchema on agent-task nodes validates the AGENT's raw JSON output, while node-level outputSchema validates the EXECUTOR's return value ({taskId, taskOutput})."
|
|
10820
|
+
"description": "Executor-specific config. For agent-task: { template, outputSchema?, agentId?, tags?, priority?, dir?, vcsRepo?, model? }. For swarm-script: { scriptName, scope?, pinHash?, args?, fsMode? }. Values support {{interpolation}} from the node's inputs context. NOTE: config.outputSchema on agent-task nodes validates the AGENT's raw JSON output, while node-level outputSchema validates the EXECUTOR's return value ({taskId, taskOutput})."
|
|
10436
10821
|
},
|
|
10437
10822
|
"next": {
|
|
10438
10823
|
"anyOf": [
|
|
@@ -10761,7 +11146,7 @@
|
|
|
10761
11146
|
},
|
|
10762
11147
|
"type": {
|
|
10763
11148
|
"type": "string",
|
|
10764
|
-
"description": "Executor type: 'agent-task', 'script', 'raw-llm', 'validate', 'property-match'"
|
|
11149
|
+
"description": "Executor type: 'agent-task', 'script', 'swarm-script', 'raw-llm', 'validate', 'property-match'"
|
|
10765
11150
|
},
|
|
10766
11151
|
"label": {
|
|
10767
11152
|
"type": "string",
|
|
@@ -10770,7 +11155,7 @@
|
|
|
10770
11155
|
"config": {
|
|
10771
11156
|
"type": "object",
|
|
10772
11157
|
"additionalProperties": {},
|
|
10773
|
-
"description": "Executor-specific config. For agent-task: { template, outputSchema?, agentId?, tags?, priority?, dir?, vcsRepo?, model? }. Values support {{interpolation}} from the node's inputs context. NOTE: config.outputSchema on agent-task nodes validates the AGENT's raw JSON output, while node-level outputSchema validates the EXECUTOR's return value ({taskId, taskOutput})."
|
|
11158
|
+
"description": "Executor-specific config. For agent-task: { template, outputSchema?, agentId?, tags?, priority?, dir?, vcsRepo?, model? }. For swarm-script: { scriptName, scope?, pinHash?, args?, fsMode? }. Values support {{interpolation}} from the node's inputs context. NOTE: config.outputSchema on agent-task nodes validates the AGENT's raw JSON output, while node-level outputSchema validates the EXECUTOR's return value ({taskId, taskOutput})."
|
|
10774
11159
|
},
|
|
10775
11160
|
"next": {
|
|
10776
11161
|
"anyOf": [
|
|
@@ -11079,7 +11464,7 @@
|
|
|
11079
11464
|
"properties": {
|
|
11080
11465
|
"type": {
|
|
11081
11466
|
"type": "string",
|
|
11082
|
-
"description": "Executor type: 'agent-task', 'script', 'raw-llm', 'validate', 'property-match'"
|
|
11467
|
+
"description": "Executor type: 'agent-task', 'script', 'swarm-script', 'raw-llm', 'validate', 'property-match'"
|
|
11083
11468
|
},
|
|
11084
11469
|
"label": {
|
|
11085
11470
|
"type": "string",
|
|
@@ -11088,7 +11473,7 @@
|
|
|
11088
11473
|
"config": {
|
|
11089
11474
|
"type": "object",
|
|
11090
11475
|
"additionalProperties": {},
|
|
11091
|
-
"description": "Executor-specific config. For agent-task: { template, outputSchema?, agentId?, tags?, priority?, dir?, vcsRepo?, model? }. Values support {{interpolation}} from the node's inputs context. NOTE: config.outputSchema on agent-task nodes validates the AGENT's raw JSON output, while node-level outputSchema validates the EXECUTOR's return value ({taskId, taskOutput})."
|
|
11476
|
+
"description": "Executor-specific config. For agent-task: { template, outputSchema?, agentId?, tags?, priority?, dir?, vcsRepo?, model? }. For swarm-script: { scriptName, scope?, pinHash?, args?, fsMode? }. Values support {{interpolation}} from the node's inputs context. NOTE: config.outputSchema on agent-task nodes validates the AGENT's raw JSON output, while node-level outputSchema validates the EXECUTOR's return value ({taskId, taskOutput})."
|
|
11092
11477
|
},
|
|
11093
11478
|
"next": {
|
|
11094
11479
|
"anyOf": [
|
|
@@ -11234,7 +11619,7 @@
|
|
|
11234
11619
|
},
|
|
11235
11620
|
"type": {
|
|
11236
11621
|
"type": "string",
|
|
11237
|
-
"description": "Executor type: 'agent-task', 'script', 'raw-llm', 'validate', 'property-match'"
|
|
11622
|
+
"description": "Executor type: 'agent-task', 'script', 'swarm-script', 'raw-llm', 'validate', 'property-match'"
|
|
11238
11623
|
},
|
|
11239
11624
|
"label": {
|
|
11240
11625
|
"type": "string",
|
|
@@ -11243,7 +11628,7 @@
|
|
|
11243
11628
|
"config": {
|
|
11244
11629
|
"type": "object",
|
|
11245
11630
|
"additionalProperties": {},
|
|
11246
|
-
"description": "Executor-specific config. For agent-task: { template, outputSchema?, agentId?, tags?, priority?, dir?, vcsRepo?, model? }. Values support {{interpolation}} from the node's inputs context. NOTE: config.outputSchema on agent-task nodes validates the AGENT's raw JSON output, while node-level outputSchema validates the EXECUTOR's return value ({taskId, taskOutput})."
|
|
11631
|
+
"description": "Executor-specific config. For agent-task: { template, outputSchema?, agentId?, tags?, priority?, dir?, vcsRepo?, model? }. For swarm-script: { scriptName, scope?, pinHash?, args?, fsMode? }. Values support {{interpolation}} from the node's inputs context. NOTE: config.outputSchema on agent-task nodes validates the AGENT's raw JSON output, while node-level outputSchema validates the EXECUTOR's return value ({taskId, taskOutput})."
|
|
11247
11632
|
},
|
|
11248
11633
|
"next": {
|
|
11249
11634
|
"anyOf": [
|
|
@@ -11469,7 +11854,7 @@
|
|
|
11469
11854
|
"properties": {
|
|
11470
11855
|
"type": {
|
|
11471
11856
|
"type": "string",
|
|
11472
|
-
"description": "Executor type: 'agent-task', 'script', 'raw-llm', 'validate', 'property-match'"
|
|
11857
|
+
"description": "Executor type: 'agent-task', 'script', 'swarm-script', 'raw-llm', 'validate', 'property-match'"
|
|
11473
11858
|
},
|
|
11474
11859
|
"label": {
|
|
11475
11860
|
"type": "string",
|
|
@@ -11478,7 +11863,7 @@
|
|
|
11478
11863
|
"config": {
|
|
11479
11864
|
"type": "object",
|
|
11480
11865
|
"additionalProperties": {},
|
|
11481
|
-
"description": "Executor-specific config. For agent-task: { template, outputSchema?, agentId?, tags?, priority?, dir?, vcsRepo?, model? }. Values support {{interpolation}} from the node's inputs context. NOTE: config.outputSchema on agent-task nodes validates the AGENT's raw JSON output, while node-level outputSchema validates the EXECUTOR's return value ({taskId, taskOutput})."
|
|
11866
|
+
"description": "Executor-specific config. For agent-task: { template, outputSchema?, agentId?, tags?, priority?, dir?, vcsRepo?, model? }. For swarm-script: { scriptName, scope?, pinHash?, args?, fsMode? }. Values support {{interpolation}} from the node's inputs context. NOTE: config.outputSchema on agent-task nodes validates the AGENT's raw JSON output, while node-level outputSchema validates the EXECUTOR's return value ({taskId, taskOutput})."
|
|
11482
11867
|
},
|
|
11483
11868
|
"next": {
|
|
11484
11869
|
"anyOf": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desplega.ai/agent-swarm",
|
|
3
|
-
"version": "1.80.
|
|
3
|
+
"version": "1.80.2",
|
|
4
4
|
"description": "Multi-agent orchestration for Claude Code, Codex, Gemini CLI, and other AI coding assistants",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "desplega.sh <contact@desplega.sh>",
|
|
@@ -42,8 +42,10 @@
|
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build:pi-skills": "bun run plugin/build-pi-skills.ts",
|
|
45
|
+
"build:script-types": "bun run scripts/bundle-script-types.ts",
|
|
45
46
|
"tsc:check": "bun tsc --noEmit",
|
|
46
47
|
"check:db-boundary": "bash scripts/check-db-boundary.sh",
|
|
48
|
+
"check:api-key-boundary": "bash scripts/check-api-key-boundary.sh",
|
|
47
49
|
"cli": "bun src/cli.tsx",
|
|
48
50
|
"hook": "bun src/hooks/hook.ts",
|
|
49
51
|
"claude": "bun src/cli.tsx claude",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
2
|
import { serveStatic } from "hono/bun";
|
|
3
|
+
import { getApiKey } from "../utils/api-key";
|
|
3
4
|
import { BROWSER_SDK_JS } from "./browser-sdk";
|
|
4
5
|
import { getAvailablePort } from "./port";
|
|
5
6
|
import { createTunnel } from "./tunnel";
|
|
@@ -23,7 +24,7 @@ export interface ArtifactServer {
|
|
|
23
24
|
|
|
24
25
|
export function createArtifactServer(opts: ArtifactServerOptions): ArtifactServer {
|
|
25
26
|
const agentId = process.env.AGENT_ID || "unknown";
|
|
26
|
-
const apiKey =
|
|
27
|
+
const apiKey = getApiKey();
|
|
27
28
|
const mcpBaseUrl = process.env.MCP_BASE_URL || `http://localhost:${process.env.PORT || "3013"}`;
|
|
28
29
|
|
|
29
30
|
const app = new Hono();
|
package/src/be/db.ts
CHANGED
|
@@ -362,7 +362,7 @@ function ensureAgentProfileColumns(database: Database): void {
|
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
function computeContentHash(content: string): string {
|
|
365
|
+
export function computeContentHash(content: string): string {
|
|
366
366
|
const hasher = new Bun.CryptoHasher("sha256");
|
|
367
367
|
hasher.update(content);
|
|
368
368
|
return hasher.digest("hex");
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
CREATE TABLE scripts (
|
|
2
|
+
id TEXT PRIMARY KEY,
|
|
3
|
+
name TEXT NOT NULL,
|
|
4
|
+
scope TEXT NOT NULL CHECK(scope IN ('global', 'agent')),
|
|
5
|
+
scopeId TEXT,
|
|
6
|
+
source TEXT NOT NULL,
|
|
7
|
+
description TEXT NOT NULL,
|
|
8
|
+
intent TEXT NOT NULL,
|
|
9
|
+
signatureJson TEXT NOT NULL,
|
|
10
|
+
contentHash TEXT NOT NULL,
|
|
11
|
+
version INTEGER NOT NULL DEFAULT 1,
|
|
12
|
+
isScratch INTEGER NOT NULL DEFAULT 0,
|
|
13
|
+
typeChecked INTEGER NOT NULL DEFAULT 0,
|
|
14
|
+
fsMode TEXT NOT NULL DEFAULT 'none' CHECK(fsMode IN ('none', 'workspace-rw')),
|
|
15
|
+
createdByAgentId TEXT,
|
|
16
|
+
createdAt TEXT NOT NULL DEFAULT (datetime('now')),
|
|
17
|
+
updatedAt TEXT NOT NULL DEFAULT (datetime('now'))
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
CREATE UNIQUE INDEX idx_scripts_name_scope ON scripts(name, scope, COALESCE(scopeId, ''));
|
|
21
|
+
CREATE INDEX idx_scripts_scope ON scripts(scope, scopeId);
|
|
22
|
+
CREATE INDEX idx_scripts_scratch ON scripts(isScratch, createdAt);
|
|
23
|
+
|
|
24
|
+
CREATE TABLE script_versions (
|
|
25
|
+
id TEXT PRIMARY KEY,
|
|
26
|
+
scriptId TEXT NOT NULL REFERENCES scripts(id) ON DELETE CASCADE,
|
|
27
|
+
version INTEGER NOT NULL,
|
|
28
|
+
source TEXT NOT NULL,
|
|
29
|
+
description TEXT NOT NULL,
|
|
30
|
+
intent TEXT NOT NULL,
|
|
31
|
+
signatureJson TEXT NOT NULL,
|
|
32
|
+
contentHash TEXT NOT NULL,
|
|
33
|
+
changedByAgentId TEXT,
|
|
34
|
+
changedAt TEXT NOT NULL DEFAULT (datetime('now')),
|
|
35
|
+
changeReason TEXT,
|
|
36
|
+
UNIQUE(scriptId, version)
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
CREATE INDEX idx_script_versions_hash ON script_versions(contentHash);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE scripts ADD COLUMN argsJsonSchema TEXT;
|