@desplega.ai/agent-swarm 1.78.1 → 1.79.1
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 +1 -0
- package/openapi.json +1335 -236
- package/package.json +4 -4
- package/plugin/skills/artifacts/SKILL.md +151 -0
- package/plugin/skills/artifacts/examples/static-report.sh +1 -1
- package/plugin/skills/kv-storage/SKILL.md +168 -0
- package/plugin/skills/pages/SKILL.md +423 -0
- package/src/artifact-sdk/browser-sdk.ts +396 -19
- package/src/be/db.ts +548 -0
- package/src/be/migrations/059_pages.sql +34 -0
- package/src/be/migrations/060_page_versions.sql +19 -0
- package/src/be/migrations/061_kv_store.sql +34 -0
- package/src/be/migrations/062_pages_view_count.sql +9 -0
- package/src/commands/artifact.ts +17 -11
- package/src/commands/provider-credentials.ts +1 -1
- package/src/http/index.ts +9 -1
- package/src/http/kv.ts +658 -0
- package/src/http/page-proxy.ts +213 -0
- package/src/http/pages-public.ts +507 -0
- package/src/http/pages.ts +608 -0
- package/src/http/status.ts +1 -1
- package/src/http/utils.ts +68 -5
- package/src/pages/version.ts +44 -0
- package/src/prompts/session-templates.ts +51 -0
- package/src/providers/pi-mono-adapter.ts +3 -3
- package/src/providers/pi-mono-extension.ts +1 -1
- package/src/server.ts +29 -1
- package/src/tasks/context-key.ts +28 -0
- package/src/telemetry.ts +65 -1
- package/src/tests/artifact-commands.test.ts +92 -0
- package/src/tests/artifact-sdk.test.ts +80 -74
- package/src/tests/context-key.test.ts +17 -0
- package/src/tests/create-page-tool.test.ts +197 -0
- package/src/tests/fixtures/sample-json-page.json +52 -0
- package/src/tests/kv-http.test.ts +331 -0
- package/src/tests/kv-namespace-resolution.test.ts +172 -0
- package/src/tests/kv-page-proxy.test.ts +212 -0
- package/src/tests/kv-storage.test.ts +227 -0
- package/src/tests/kv-tool.test.ts +217 -0
- package/src/tests/launch-password-rejection.test.ts +139 -0
- package/src/tests/page-proxy-authed.test.ts +146 -0
- package/src/tests/page-proxy.test.ts +270 -0
- package/src/tests/page-session.test.ts +169 -0
- package/src/tests/pages-actions-endpoint.test.ts +102 -0
- package/src/tests/pages-authed-mode.test.ts +211 -0
- package/src/tests/pages-http.test.ts +193 -0
- package/src/tests/pages-list-endpoint.test.ts +149 -0
- package/src/tests/pages-password-hash.test.ts +57 -0
- package/src/tests/pages-password-mode.test.ts +265 -0
- package/src/tests/pages-public-authed-401.test.ts +102 -0
- package/src/tests/pages-public-html.test.ts +151 -0
- package/src/tests/pages-public-json-redirect.test.ts +86 -0
- package/src/tests/pages-storage.test.ts +196 -0
- package/src/tests/pages-versioning.test.ts +231 -0
- package/src/tests/pages-view-count.test.ts +220 -0
- package/src/tests/prompt-template-session.test.ts +3 -2
- package/src/tests/skill-update-scope.test.ts +165 -0
- package/src/tests/swarm-diff.test.ts +303 -0
- package/src/tests/telemetry-init.test.ts +149 -0
- package/src/tests/workflow-wait-event.test.ts +4 -7
- package/src/tools/create-page.ts +263 -0
- package/src/tools/kv/index.ts +5 -0
- package/src/tools/kv/kv-delete.ts +89 -0
- package/src/tools/kv/kv-get.ts +64 -0
- package/src/tools/kv/kv-incr.ts +116 -0
- package/src/tools/kv/kv-list.ts +81 -0
- package/src/tools/kv/kv-set.ts +194 -0
- package/src/tools/kv/resolve-namespace.ts +58 -0
- package/src/tools/skills/skill-update.ts +26 -0
- package/src/tools/tool-config.ts +10 -0
- package/src/types.ts +107 -0
- package/src/utils/internal-ai/complete-structured.ts +2 -2
- package/src/utils/internal-ai/credentials.ts +3 -3
- package/src/utils/page-session.ts +254 -0
- package/plugin/skills/artifacts/skill.md +0 -70
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.79.1",
|
|
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": [
|
|
@@ -3332,9 +3332,967 @@
|
|
|
3332
3332
|
}
|
|
3333
3333
|
}
|
|
3334
3334
|
},
|
|
3335
|
+
"/api/kv/{key}": {
|
|
3336
|
+
"get": {
|
|
3337
|
+
"summary": "Get a KV entry by key (namespace resolved from request headers)",
|
|
3338
|
+
"tags": [
|
|
3339
|
+
"KV"
|
|
3340
|
+
],
|
|
3341
|
+
"security": [
|
|
3342
|
+
{
|
|
3343
|
+
"bearerAuth": []
|
|
3344
|
+
}
|
|
3345
|
+
],
|
|
3346
|
+
"parameters": [
|
|
3347
|
+
{
|
|
3348
|
+
"schema": {
|
|
3349
|
+
"type": "string",
|
|
3350
|
+
"minLength": 1,
|
|
3351
|
+
"maxLength": 512,
|
|
3352
|
+
"pattern": "^[a-zA-Z0-9._:/%-]{1,512}$"
|
|
3353
|
+
},
|
|
3354
|
+
"required": true,
|
|
3355
|
+
"name": "key",
|
|
3356
|
+
"in": "path"
|
|
3357
|
+
}
|
|
3358
|
+
],
|
|
3359
|
+
"responses": {
|
|
3360
|
+
"200": {
|
|
3361
|
+
"description": "KV entry"
|
|
3362
|
+
},
|
|
3363
|
+
"400": {
|
|
3364
|
+
"description": "Validation error or unresolvable namespace"
|
|
3365
|
+
},
|
|
3366
|
+
"404": {
|
|
3367
|
+
"description": "KV entry not found or expired"
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
3370
|
+
},
|
|
3371
|
+
"put": {
|
|
3372
|
+
"summary": "Upsert a KV entry by key (namespace resolved from request headers)",
|
|
3373
|
+
"tags": [
|
|
3374
|
+
"KV"
|
|
3375
|
+
],
|
|
3376
|
+
"security": [
|
|
3377
|
+
{
|
|
3378
|
+
"bearerAuth": []
|
|
3379
|
+
}
|
|
3380
|
+
],
|
|
3381
|
+
"parameters": [
|
|
3382
|
+
{
|
|
3383
|
+
"schema": {
|
|
3384
|
+
"type": "string",
|
|
3385
|
+
"minLength": 1,
|
|
3386
|
+
"maxLength": 512,
|
|
3387
|
+
"pattern": "^[a-zA-Z0-9._:/%-]{1,512}$"
|
|
3388
|
+
},
|
|
3389
|
+
"required": true,
|
|
3390
|
+
"name": "key",
|
|
3391
|
+
"in": "path"
|
|
3392
|
+
}
|
|
3393
|
+
],
|
|
3394
|
+
"requestBody": {
|
|
3395
|
+
"content": {
|
|
3396
|
+
"application/json": {
|
|
3397
|
+
"schema": {
|
|
3398
|
+
"type": "object",
|
|
3399
|
+
"properties": {
|
|
3400
|
+
"value": {},
|
|
3401
|
+
"valueType": {
|
|
3402
|
+
"type": "string",
|
|
3403
|
+
"enum": [
|
|
3404
|
+
"json",
|
|
3405
|
+
"string",
|
|
3406
|
+
"integer"
|
|
3407
|
+
]
|
|
3408
|
+
},
|
|
3409
|
+
"expiresInSec": {
|
|
3410
|
+
"type": "integer",
|
|
3411
|
+
"exclusiveMinimum": 0
|
|
3412
|
+
}
|
|
3413
|
+
}
|
|
3414
|
+
}
|
|
3415
|
+
}
|
|
3416
|
+
}
|
|
3417
|
+
},
|
|
3418
|
+
"responses": {
|
|
3419
|
+
"200": {
|
|
3420
|
+
"description": "KV entry stored"
|
|
3421
|
+
},
|
|
3422
|
+
"400": {
|
|
3423
|
+
"description": "Validation error"
|
|
3424
|
+
},
|
|
3425
|
+
"403": {
|
|
3426
|
+
"description": "Caller may not write this namespace"
|
|
3427
|
+
},
|
|
3428
|
+
"409": {
|
|
3429
|
+
"description": "INCR collision: existing value_type is not 'integer'"
|
|
3430
|
+
},
|
|
3431
|
+
"413": {
|
|
3432
|
+
"description": "Body exceeds 2 MiB"
|
|
3433
|
+
}
|
|
3434
|
+
}
|
|
3435
|
+
},
|
|
3436
|
+
"delete": {
|
|
3437
|
+
"summary": "Delete a KV entry by key (namespace resolved from request headers)",
|
|
3438
|
+
"tags": [
|
|
3439
|
+
"KV"
|
|
3440
|
+
],
|
|
3441
|
+
"security": [
|
|
3442
|
+
{
|
|
3443
|
+
"bearerAuth": []
|
|
3444
|
+
}
|
|
3445
|
+
],
|
|
3446
|
+
"parameters": [
|
|
3447
|
+
{
|
|
3448
|
+
"schema": {
|
|
3449
|
+
"type": "string",
|
|
3450
|
+
"minLength": 1,
|
|
3451
|
+
"maxLength": 512,
|
|
3452
|
+
"pattern": "^[a-zA-Z0-9._:/%-]{1,512}$"
|
|
3453
|
+
},
|
|
3454
|
+
"required": true,
|
|
3455
|
+
"name": "key",
|
|
3456
|
+
"in": "path"
|
|
3457
|
+
}
|
|
3458
|
+
],
|
|
3459
|
+
"responses": {
|
|
3460
|
+
"204": {
|
|
3461
|
+
"description": "KV entry deleted"
|
|
3462
|
+
},
|
|
3463
|
+
"400": {
|
|
3464
|
+
"description": "Validation error or unresolvable namespace"
|
|
3465
|
+
},
|
|
3466
|
+
"403": {
|
|
3467
|
+
"description": "Caller may not write this namespace"
|
|
3468
|
+
},
|
|
3469
|
+
"404": {
|
|
3470
|
+
"description": "KV entry not found"
|
|
3471
|
+
}
|
|
3472
|
+
}
|
|
3473
|
+
}
|
|
3474
|
+
},
|
|
3475
|
+
"/api/kv/{key}/incr": {
|
|
3476
|
+
"post": {
|
|
3477
|
+
"summary": "Atomically increment an integer KV entry (header-resolved namespace)",
|
|
3478
|
+
"tags": [
|
|
3479
|
+
"KV"
|
|
3480
|
+
],
|
|
3481
|
+
"security": [
|
|
3482
|
+
{
|
|
3483
|
+
"bearerAuth": []
|
|
3484
|
+
}
|
|
3485
|
+
],
|
|
3486
|
+
"parameters": [
|
|
3487
|
+
{
|
|
3488
|
+
"schema": {
|
|
3489
|
+
"type": "string",
|
|
3490
|
+
"minLength": 1,
|
|
3491
|
+
"maxLength": 512,
|
|
3492
|
+
"pattern": "^[a-zA-Z0-9._:/%-]{1,512}$"
|
|
3493
|
+
},
|
|
3494
|
+
"required": true,
|
|
3495
|
+
"name": "key",
|
|
3496
|
+
"in": "path"
|
|
3497
|
+
}
|
|
3498
|
+
],
|
|
3499
|
+
"requestBody": {
|
|
3500
|
+
"content": {
|
|
3501
|
+
"application/json": {
|
|
3502
|
+
"schema": {
|
|
3503
|
+
"type": [
|
|
3504
|
+
"object",
|
|
3505
|
+
"null"
|
|
3506
|
+
],
|
|
3507
|
+
"properties": {
|
|
3508
|
+
"by": {
|
|
3509
|
+
"type": "integer"
|
|
3510
|
+
}
|
|
3511
|
+
}
|
|
3512
|
+
}
|
|
3513
|
+
}
|
|
3514
|
+
}
|
|
3515
|
+
},
|
|
3516
|
+
"responses": {
|
|
3517
|
+
"200": {
|
|
3518
|
+
"description": "KV entry stored"
|
|
3519
|
+
},
|
|
3520
|
+
"400": {
|
|
3521
|
+
"description": "Validation error"
|
|
3522
|
+
},
|
|
3523
|
+
"403": {
|
|
3524
|
+
"description": "Caller may not write this namespace"
|
|
3525
|
+
},
|
|
3526
|
+
"409": {
|
|
3527
|
+
"description": "INCR collision: existing value_type is not 'integer'"
|
|
3528
|
+
},
|
|
3529
|
+
"413": {
|
|
3530
|
+
"description": "Body exceeds 2 MiB"
|
|
3531
|
+
}
|
|
3532
|
+
}
|
|
3533
|
+
}
|
|
3534
|
+
},
|
|
3535
|
+
"/api/kv": {
|
|
3536
|
+
"get": {
|
|
3537
|
+
"summary": "List KV entries in the header-resolved namespace",
|
|
3538
|
+
"tags": [
|
|
3539
|
+
"KV"
|
|
3540
|
+
],
|
|
3541
|
+
"security": [
|
|
3542
|
+
{
|
|
3543
|
+
"bearerAuth": []
|
|
3544
|
+
}
|
|
3545
|
+
],
|
|
3546
|
+
"parameters": [
|
|
3547
|
+
{
|
|
3548
|
+
"schema": {
|
|
3549
|
+
"type": "string"
|
|
3550
|
+
},
|
|
3551
|
+
"required": false,
|
|
3552
|
+
"name": "prefix",
|
|
3553
|
+
"in": "query"
|
|
3554
|
+
},
|
|
3555
|
+
{
|
|
3556
|
+
"schema": {
|
|
3557
|
+
"type": "integer",
|
|
3558
|
+
"exclusiveMinimum": 0,
|
|
3559
|
+
"maximum": 1000
|
|
3560
|
+
},
|
|
3561
|
+
"required": false,
|
|
3562
|
+
"name": "limit",
|
|
3563
|
+
"in": "query"
|
|
3564
|
+
},
|
|
3565
|
+
{
|
|
3566
|
+
"schema": {
|
|
3567
|
+
"type": [
|
|
3568
|
+
"integer",
|
|
3569
|
+
"null"
|
|
3570
|
+
],
|
|
3571
|
+
"minimum": 0
|
|
3572
|
+
},
|
|
3573
|
+
"required": false,
|
|
3574
|
+
"name": "offset",
|
|
3575
|
+
"in": "query"
|
|
3576
|
+
}
|
|
3577
|
+
],
|
|
3578
|
+
"responses": {
|
|
3579
|
+
"200": {
|
|
3580
|
+
"description": "KV entries in the resolved namespace"
|
|
3581
|
+
},
|
|
3582
|
+
"400": {
|
|
3583
|
+
"description": "Validation error or unresolvable namespace"
|
|
3584
|
+
}
|
|
3585
|
+
}
|
|
3586
|
+
}
|
|
3587
|
+
},
|
|
3588
|
+
"/api/kv/_/{namespace}/{key}": {
|
|
3589
|
+
"get": {
|
|
3590
|
+
"summary": "Get a KV entry by explicit namespace + key",
|
|
3591
|
+
"tags": [
|
|
3592
|
+
"KV"
|
|
3593
|
+
],
|
|
3594
|
+
"security": [
|
|
3595
|
+
{
|
|
3596
|
+
"bearerAuth": []
|
|
3597
|
+
}
|
|
3598
|
+
],
|
|
3599
|
+
"parameters": [
|
|
3600
|
+
{
|
|
3601
|
+
"schema": {
|
|
3602
|
+
"type": "string",
|
|
3603
|
+
"minLength": 1,
|
|
3604
|
+
"maxLength": 512,
|
|
3605
|
+
"pattern": "^[a-zA-Z0-9._:/%-]{1,512}$"
|
|
3606
|
+
},
|
|
3607
|
+
"required": true,
|
|
3608
|
+
"name": "namespace",
|
|
3609
|
+
"in": "path"
|
|
3610
|
+
},
|
|
3611
|
+
{
|
|
3612
|
+
"schema": {
|
|
3613
|
+
"type": "string",
|
|
3614
|
+
"minLength": 1,
|
|
3615
|
+
"maxLength": 512,
|
|
3616
|
+
"pattern": "^[a-zA-Z0-9._:/%-]{1,512}$"
|
|
3617
|
+
},
|
|
3618
|
+
"required": true,
|
|
3619
|
+
"name": "key",
|
|
3620
|
+
"in": "path"
|
|
3621
|
+
}
|
|
3622
|
+
],
|
|
3623
|
+
"responses": {
|
|
3624
|
+
"200": {
|
|
3625
|
+
"description": "KV entry"
|
|
3626
|
+
},
|
|
3627
|
+
"400": {
|
|
3628
|
+
"description": "Validation error or unresolvable namespace"
|
|
3629
|
+
},
|
|
3630
|
+
"404": {
|
|
3631
|
+
"description": "KV entry not found or expired"
|
|
3632
|
+
}
|
|
3633
|
+
}
|
|
3634
|
+
},
|
|
3635
|
+
"put": {
|
|
3636
|
+
"summary": "Upsert a KV entry by explicit namespace + key",
|
|
3637
|
+
"tags": [
|
|
3638
|
+
"KV"
|
|
3639
|
+
],
|
|
3640
|
+
"security": [
|
|
3641
|
+
{
|
|
3642
|
+
"bearerAuth": []
|
|
3643
|
+
}
|
|
3644
|
+
],
|
|
3645
|
+
"parameters": [
|
|
3646
|
+
{
|
|
3647
|
+
"schema": {
|
|
3648
|
+
"type": "string",
|
|
3649
|
+
"minLength": 1,
|
|
3650
|
+
"maxLength": 512,
|
|
3651
|
+
"pattern": "^[a-zA-Z0-9._:/%-]{1,512}$"
|
|
3652
|
+
},
|
|
3653
|
+
"required": true,
|
|
3654
|
+
"name": "namespace",
|
|
3655
|
+
"in": "path"
|
|
3656
|
+
},
|
|
3657
|
+
{
|
|
3658
|
+
"schema": {
|
|
3659
|
+
"type": "string",
|
|
3660
|
+
"minLength": 1,
|
|
3661
|
+
"maxLength": 512,
|
|
3662
|
+
"pattern": "^[a-zA-Z0-9._:/%-]{1,512}$"
|
|
3663
|
+
},
|
|
3664
|
+
"required": true,
|
|
3665
|
+
"name": "key",
|
|
3666
|
+
"in": "path"
|
|
3667
|
+
}
|
|
3668
|
+
],
|
|
3669
|
+
"requestBody": {
|
|
3670
|
+
"content": {
|
|
3671
|
+
"application/json": {
|
|
3672
|
+
"schema": {
|
|
3673
|
+
"type": "object",
|
|
3674
|
+
"properties": {
|
|
3675
|
+
"value": {},
|
|
3676
|
+
"valueType": {
|
|
3677
|
+
"type": "string",
|
|
3678
|
+
"enum": [
|
|
3679
|
+
"json",
|
|
3680
|
+
"string",
|
|
3681
|
+
"integer"
|
|
3682
|
+
]
|
|
3683
|
+
},
|
|
3684
|
+
"expiresInSec": {
|
|
3685
|
+
"type": "integer",
|
|
3686
|
+
"exclusiveMinimum": 0
|
|
3687
|
+
}
|
|
3688
|
+
}
|
|
3689
|
+
}
|
|
3690
|
+
}
|
|
3691
|
+
}
|
|
3692
|
+
},
|
|
3693
|
+
"responses": {
|
|
3694
|
+
"200": {
|
|
3695
|
+
"description": "KV entry stored"
|
|
3696
|
+
},
|
|
3697
|
+
"400": {
|
|
3698
|
+
"description": "Validation error"
|
|
3699
|
+
},
|
|
3700
|
+
"403": {
|
|
3701
|
+
"description": "Caller may not write this namespace"
|
|
3702
|
+
},
|
|
3703
|
+
"409": {
|
|
3704
|
+
"description": "INCR collision: existing value_type is not 'integer'"
|
|
3705
|
+
},
|
|
3706
|
+
"413": {
|
|
3707
|
+
"description": "Body exceeds 2 MiB"
|
|
3708
|
+
}
|
|
3709
|
+
}
|
|
3710
|
+
},
|
|
3711
|
+
"delete": {
|
|
3712
|
+
"summary": "Delete a KV entry by explicit namespace + key",
|
|
3713
|
+
"tags": [
|
|
3714
|
+
"KV"
|
|
3715
|
+
],
|
|
3716
|
+
"security": [
|
|
3717
|
+
{
|
|
3718
|
+
"bearerAuth": []
|
|
3719
|
+
}
|
|
3720
|
+
],
|
|
3721
|
+
"parameters": [
|
|
3722
|
+
{
|
|
3723
|
+
"schema": {
|
|
3724
|
+
"type": "string",
|
|
3725
|
+
"minLength": 1,
|
|
3726
|
+
"maxLength": 512,
|
|
3727
|
+
"pattern": "^[a-zA-Z0-9._:/%-]{1,512}$"
|
|
3728
|
+
},
|
|
3729
|
+
"required": true,
|
|
3730
|
+
"name": "namespace",
|
|
3731
|
+
"in": "path"
|
|
3732
|
+
},
|
|
3733
|
+
{
|
|
3734
|
+
"schema": {
|
|
3735
|
+
"type": "string",
|
|
3736
|
+
"minLength": 1,
|
|
3737
|
+
"maxLength": 512,
|
|
3738
|
+
"pattern": "^[a-zA-Z0-9._:/%-]{1,512}$"
|
|
3739
|
+
},
|
|
3740
|
+
"required": true,
|
|
3741
|
+
"name": "key",
|
|
3742
|
+
"in": "path"
|
|
3743
|
+
}
|
|
3744
|
+
],
|
|
3745
|
+
"responses": {
|
|
3746
|
+
"204": {
|
|
3747
|
+
"description": "KV entry deleted"
|
|
3748
|
+
},
|
|
3749
|
+
"403": {
|
|
3750
|
+
"description": "Caller may not write this namespace"
|
|
3751
|
+
},
|
|
3752
|
+
"404": {
|
|
3753
|
+
"description": "KV entry not found"
|
|
3754
|
+
}
|
|
3755
|
+
}
|
|
3756
|
+
}
|
|
3757
|
+
},
|
|
3758
|
+
"/api/kv/_/{namespace}/{key}/incr": {
|
|
3759
|
+
"post": {
|
|
3760
|
+
"summary": "Atomically increment an integer KV entry (explicit namespace)",
|
|
3761
|
+
"tags": [
|
|
3762
|
+
"KV"
|
|
3763
|
+
],
|
|
3764
|
+
"security": [
|
|
3765
|
+
{
|
|
3766
|
+
"bearerAuth": []
|
|
3767
|
+
}
|
|
3768
|
+
],
|
|
3769
|
+
"parameters": [
|
|
3770
|
+
{
|
|
3771
|
+
"schema": {
|
|
3772
|
+
"type": "string",
|
|
3773
|
+
"minLength": 1,
|
|
3774
|
+
"maxLength": 512,
|
|
3775
|
+
"pattern": "^[a-zA-Z0-9._:/%-]{1,512}$"
|
|
3776
|
+
},
|
|
3777
|
+
"required": true,
|
|
3778
|
+
"name": "namespace",
|
|
3779
|
+
"in": "path"
|
|
3780
|
+
},
|
|
3781
|
+
{
|
|
3782
|
+
"schema": {
|
|
3783
|
+
"type": "string",
|
|
3784
|
+
"minLength": 1,
|
|
3785
|
+
"maxLength": 512,
|
|
3786
|
+
"pattern": "^[a-zA-Z0-9._:/%-]{1,512}$"
|
|
3787
|
+
},
|
|
3788
|
+
"required": true,
|
|
3789
|
+
"name": "key",
|
|
3790
|
+
"in": "path"
|
|
3791
|
+
}
|
|
3792
|
+
],
|
|
3793
|
+
"requestBody": {
|
|
3794
|
+
"content": {
|
|
3795
|
+
"application/json": {
|
|
3796
|
+
"schema": {
|
|
3797
|
+
"type": [
|
|
3798
|
+
"object",
|
|
3799
|
+
"null"
|
|
3800
|
+
],
|
|
3801
|
+
"properties": {
|
|
3802
|
+
"by": {
|
|
3803
|
+
"type": "integer"
|
|
3804
|
+
}
|
|
3805
|
+
}
|
|
3806
|
+
}
|
|
3807
|
+
}
|
|
3808
|
+
}
|
|
3809
|
+
},
|
|
3810
|
+
"responses": {
|
|
3811
|
+
"200": {
|
|
3812
|
+
"description": "KV entry stored"
|
|
3813
|
+
},
|
|
3814
|
+
"400": {
|
|
3815
|
+
"description": "Validation error"
|
|
3816
|
+
},
|
|
3817
|
+
"403": {
|
|
3818
|
+
"description": "Caller may not write this namespace"
|
|
3819
|
+
},
|
|
3820
|
+
"409": {
|
|
3821
|
+
"description": "INCR collision: existing value_type is not 'integer'"
|
|
3822
|
+
},
|
|
3823
|
+
"413": {
|
|
3824
|
+
"description": "Body exceeds 2 MiB"
|
|
3825
|
+
}
|
|
3826
|
+
}
|
|
3827
|
+
}
|
|
3828
|
+
},
|
|
3829
|
+
"/api/kv/_/{namespace}": {
|
|
3830
|
+
"get": {
|
|
3831
|
+
"summary": "List KV entries in an explicit namespace",
|
|
3832
|
+
"tags": [
|
|
3833
|
+
"KV"
|
|
3834
|
+
],
|
|
3835
|
+
"security": [
|
|
3836
|
+
{
|
|
3837
|
+
"bearerAuth": []
|
|
3838
|
+
}
|
|
3839
|
+
],
|
|
3840
|
+
"parameters": [
|
|
3841
|
+
{
|
|
3842
|
+
"schema": {
|
|
3843
|
+
"type": "string",
|
|
3844
|
+
"minLength": 1,
|
|
3845
|
+
"maxLength": 512,
|
|
3846
|
+
"pattern": "^[a-zA-Z0-9._:/%-]{1,512}$"
|
|
3847
|
+
},
|
|
3848
|
+
"required": true,
|
|
3849
|
+
"name": "namespace",
|
|
3850
|
+
"in": "path"
|
|
3851
|
+
},
|
|
3852
|
+
{
|
|
3853
|
+
"schema": {
|
|
3854
|
+
"type": "string"
|
|
3855
|
+
},
|
|
3856
|
+
"required": false,
|
|
3857
|
+
"name": "prefix",
|
|
3858
|
+
"in": "query"
|
|
3859
|
+
},
|
|
3860
|
+
{
|
|
3861
|
+
"schema": {
|
|
3862
|
+
"type": "integer",
|
|
3863
|
+
"exclusiveMinimum": 0,
|
|
3864
|
+
"maximum": 1000
|
|
3865
|
+
},
|
|
3866
|
+
"required": false,
|
|
3867
|
+
"name": "limit",
|
|
3868
|
+
"in": "query"
|
|
3869
|
+
},
|
|
3870
|
+
{
|
|
3871
|
+
"schema": {
|
|
3872
|
+
"type": [
|
|
3873
|
+
"integer",
|
|
3874
|
+
"null"
|
|
3875
|
+
],
|
|
3876
|
+
"minimum": 0
|
|
3877
|
+
},
|
|
3878
|
+
"required": false,
|
|
3879
|
+
"name": "offset",
|
|
3880
|
+
"in": "query"
|
|
3881
|
+
}
|
|
3882
|
+
],
|
|
3883
|
+
"responses": {
|
|
3884
|
+
"200": {
|
|
3885
|
+
"description": "KV entries in the resolved namespace"
|
|
3886
|
+
},
|
|
3887
|
+
"400": {
|
|
3888
|
+
"description": "Validation error or unresolvable namespace"
|
|
3889
|
+
}
|
|
3890
|
+
}
|
|
3891
|
+
}
|
|
3892
|
+
},
|
|
3335
3893
|
"/api/memory/index": {
|
|
3336
3894
|
"post": {
|
|
3337
|
-
"summary": "Ingest content into memory system (async embedding)",
|
|
3895
|
+
"summary": "Ingest content into memory system (async embedding)",
|
|
3896
|
+
"tags": [
|
|
3897
|
+
"Memory"
|
|
3898
|
+
],
|
|
3899
|
+
"security": [
|
|
3900
|
+
{
|
|
3901
|
+
"bearerAuth": []
|
|
3902
|
+
}
|
|
3903
|
+
],
|
|
3904
|
+
"requestBody": {
|
|
3905
|
+
"content": {
|
|
3906
|
+
"application/json": {
|
|
3907
|
+
"schema": {
|
|
3908
|
+
"type": "object",
|
|
3909
|
+
"properties": {
|
|
3910
|
+
"agentId": {
|
|
3911
|
+
"type": "string",
|
|
3912
|
+
"format": "uuid"
|
|
3913
|
+
},
|
|
3914
|
+
"content": {
|
|
3915
|
+
"type": "string",
|
|
3916
|
+
"minLength": 1
|
|
3917
|
+
},
|
|
3918
|
+
"name": {
|
|
3919
|
+
"type": "string",
|
|
3920
|
+
"minLength": 1
|
|
3921
|
+
},
|
|
3922
|
+
"scope": {
|
|
3923
|
+
"type": "string",
|
|
3924
|
+
"enum": [
|
|
3925
|
+
"agent",
|
|
3926
|
+
"swarm"
|
|
3927
|
+
]
|
|
3928
|
+
},
|
|
3929
|
+
"source": {
|
|
3930
|
+
"type": "string",
|
|
3931
|
+
"enum": [
|
|
3932
|
+
"manual",
|
|
3933
|
+
"file_index",
|
|
3934
|
+
"session_summary",
|
|
3935
|
+
"task_completion"
|
|
3936
|
+
]
|
|
3937
|
+
},
|
|
3938
|
+
"sourceTaskId": {
|
|
3939
|
+
"type": "string",
|
|
3940
|
+
"format": "uuid"
|
|
3941
|
+
},
|
|
3942
|
+
"sourcePath": {
|
|
3943
|
+
"type": "string"
|
|
3944
|
+
},
|
|
3945
|
+
"tags": {
|
|
3946
|
+
"type": "array",
|
|
3947
|
+
"items": {
|
|
3948
|
+
"type": "string"
|
|
3949
|
+
}
|
|
3950
|
+
}
|
|
3951
|
+
},
|
|
3952
|
+
"required": [
|
|
3953
|
+
"content",
|
|
3954
|
+
"name",
|
|
3955
|
+
"scope",
|
|
3956
|
+
"source"
|
|
3957
|
+
]
|
|
3958
|
+
}
|
|
3959
|
+
}
|
|
3960
|
+
}
|
|
3961
|
+
},
|
|
3962
|
+
"responses": {
|
|
3963
|
+
"202": {
|
|
3964
|
+
"description": "Content queued for embedding"
|
|
3965
|
+
},
|
|
3966
|
+
"400": {
|
|
3967
|
+
"description": "Validation error"
|
|
3968
|
+
}
|
|
3969
|
+
}
|
|
3970
|
+
}
|
|
3971
|
+
},
|
|
3972
|
+
"/api/memory/search": {
|
|
3973
|
+
"post": {
|
|
3974
|
+
"summary": "Search memories by natural language query",
|
|
3975
|
+
"tags": [
|
|
3976
|
+
"Memory"
|
|
3977
|
+
],
|
|
3978
|
+
"security": [
|
|
3979
|
+
{
|
|
3980
|
+
"bearerAuth": []
|
|
3981
|
+
}
|
|
3982
|
+
],
|
|
3983
|
+
"requestBody": {
|
|
3984
|
+
"content": {
|
|
3985
|
+
"application/json": {
|
|
3986
|
+
"schema": {
|
|
3987
|
+
"type": "object",
|
|
3988
|
+
"properties": {
|
|
3989
|
+
"query": {
|
|
3990
|
+
"type": "string",
|
|
3991
|
+
"minLength": 1
|
|
3992
|
+
},
|
|
3993
|
+
"limit": {
|
|
3994
|
+
"type": "integer",
|
|
3995
|
+
"minimum": 1,
|
|
3996
|
+
"maximum": 20,
|
|
3997
|
+
"default": 5
|
|
3998
|
+
}
|
|
3999
|
+
},
|
|
4000
|
+
"required": [
|
|
4001
|
+
"query"
|
|
4002
|
+
]
|
|
4003
|
+
}
|
|
4004
|
+
}
|
|
4005
|
+
}
|
|
4006
|
+
},
|
|
4007
|
+
"responses": {
|
|
4008
|
+
"200": {
|
|
4009
|
+
"description": "Search results"
|
|
4010
|
+
},
|
|
4011
|
+
"400": {
|
|
4012
|
+
"description": "Missing query or agent ID"
|
|
4013
|
+
}
|
|
4014
|
+
}
|
|
4015
|
+
}
|
|
4016
|
+
},
|
|
4017
|
+
"/api/memory/re-embed": {
|
|
4018
|
+
"post": {
|
|
4019
|
+
"summary": "Re-embed all memories using the current embedding provider",
|
|
4020
|
+
"tags": [
|
|
4021
|
+
"Memory"
|
|
4022
|
+
],
|
|
4023
|
+
"security": [
|
|
4024
|
+
{
|
|
4025
|
+
"bearerAuth": []
|
|
4026
|
+
}
|
|
4027
|
+
],
|
|
4028
|
+
"requestBody": {
|
|
4029
|
+
"content": {
|
|
4030
|
+
"application/json": {
|
|
4031
|
+
"schema": {
|
|
4032
|
+
"type": "object",
|
|
4033
|
+
"properties": {
|
|
4034
|
+
"agentId": {
|
|
4035
|
+
"type": "string",
|
|
4036
|
+
"format": "uuid",
|
|
4037
|
+
"description": "Re-embed only this agent's memories. Omit for all."
|
|
4038
|
+
},
|
|
4039
|
+
"batchSize": {
|
|
4040
|
+
"type": "integer",
|
|
4041
|
+
"minimum": 1,
|
|
4042
|
+
"maximum": 100,
|
|
4043
|
+
"default": 20,
|
|
4044
|
+
"description": "Memories per batch"
|
|
4045
|
+
}
|
|
4046
|
+
}
|
|
4047
|
+
}
|
|
4048
|
+
}
|
|
4049
|
+
}
|
|
4050
|
+
},
|
|
4051
|
+
"responses": {
|
|
4052
|
+
"202": {
|
|
4053
|
+
"description": "Re-embedding started"
|
|
4054
|
+
}
|
|
4055
|
+
}
|
|
4056
|
+
}
|
|
4057
|
+
},
|
|
4058
|
+
"/api/memory/list": {
|
|
4059
|
+
"post": {
|
|
4060
|
+
"summary": "List or semantically search memories across all agents (debug/admin)",
|
|
4061
|
+
"tags": [
|
|
4062
|
+
"Memory"
|
|
4063
|
+
],
|
|
4064
|
+
"security": [
|
|
4065
|
+
{
|
|
4066
|
+
"bearerAuth": []
|
|
4067
|
+
}
|
|
4068
|
+
],
|
|
4069
|
+
"requestBody": {
|
|
4070
|
+
"content": {
|
|
4071
|
+
"application/json": {
|
|
4072
|
+
"schema": {
|
|
4073
|
+
"type": "object",
|
|
4074
|
+
"properties": {
|
|
4075
|
+
"query": {
|
|
4076
|
+
"type": "string",
|
|
4077
|
+
"description": "Natural-language query. If present, runs semantic search; otherwise lists by recency."
|
|
4078
|
+
},
|
|
4079
|
+
"agentId": {
|
|
4080
|
+
"type": "string",
|
|
4081
|
+
"format": "uuid",
|
|
4082
|
+
"description": "Filter to a single agent. Omit for all."
|
|
4083
|
+
},
|
|
4084
|
+
"scope": {
|
|
4085
|
+
"type": "string",
|
|
4086
|
+
"enum": [
|
|
4087
|
+
"agent",
|
|
4088
|
+
"swarm",
|
|
4089
|
+
"all"
|
|
4090
|
+
],
|
|
4091
|
+
"default": "all"
|
|
4092
|
+
},
|
|
4093
|
+
"source": {
|
|
4094
|
+
"type": "string",
|
|
4095
|
+
"enum": [
|
|
4096
|
+
"manual",
|
|
4097
|
+
"file_index",
|
|
4098
|
+
"session_summary",
|
|
4099
|
+
"task_completion"
|
|
4100
|
+
]
|
|
4101
|
+
},
|
|
4102
|
+
"sourcePath": {
|
|
4103
|
+
"type": "string",
|
|
4104
|
+
"description": "Substring match against sourcePath (case-insensitive). Useful for file_index memories."
|
|
4105
|
+
},
|
|
4106
|
+
"limit": {
|
|
4107
|
+
"type": "integer",
|
|
4108
|
+
"minimum": 1,
|
|
4109
|
+
"maximum": 100,
|
|
4110
|
+
"default": 20
|
|
4111
|
+
},
|
|
4112
|
+
"offset": {
|
|
4113
|
+
"type": "integer",
|
|
4114
|
+
"minimum": 0,
|
|
4115
|
+
"default": 0
|
|
4116
|
+
}
|
|
4117
|
+
}
|
|
4118
|
+
}
|
|
4119
|
+
}
|
|
4120
|
+
}
|
|
4121
|
+
},
|
|
4122
|
+
"responses": {
|
|
4123
|
+
"200": {
|
|
4124
|
+
"description": "Memory list / search results"
|
|
4125
|
+
},
|
|
4126
|
+
"400": {
|
|
4127
|
+
"description": "Validation error"
|
|
4128
|
+
}
|
|
4129
|
+
}
|
|
4130
|
+
}
|
|
4131
|
+
},
|
|
4132
|
+
"/api/memory/{id}": {
|
|
4133
|
+
"delete": {
|
|
4134
|
+
"summary": "Delete a single memory by ID (debug/admin)",
|
|
4135
|
+
"tags": [
|
|
4136
|
+
"Memory"
|
|
4137
|
+
],
|
|
4138
|
+
"security": [
|
|
4139
|
+
{
|
|
4140
|
+
"bearerAuth": []
|
|
4141
|
+
}
|
|
4142
|
+
],
|
|
4143
|
+
"parameters": [
|
|
4144
|
+
{
|
|
4145
|
+
"schema": {
|
|
4146
|
+
"type": "string",
|
|
4147
|
+
"format": "uuid"
|
|
4148
|
+
},
|
|
4149
|
+
"required": true,
|
|
4150
|
+
"name": "id",
|
|
4151
|
+
"in": "path"
|
|
4152
|
+
}
|
|
4153
|
+
],
|
|
4154
|
+
"responses": {
|
|
4155
|
+
"200": {
|
|
4156
|
+
"description": "Memory deleted"
|
|
4157
|
+
},
|
|
4158
|
+
"404": {
|
|
4159
|
+
"description": "Memory not found"
|
|
4160
|
+
}
|
|
4161
|
+
}
|
|
4162
|
+
}
|
|
4163
|
+
},
|
|
4164
|
+
"/api/memory/rate": {
|
|
4165
|
+
"post": {
|
|
4166
|
+
"summary": "Submit RatingEvents to update memory usefulness posteriors",
|
|
4167
|
+
"tags": [
|
|
4168
|
+
"Memory"
|
|
4169
|
+
],
|
|
4170
|
+
"security": [
|
|
4171
|
+
{
|
|
4172
|
+
"bearerAuth": []
|
|
4173
|
+
}
|
|
4174
|
+
],
|
|
4175
|
+
"requestBody": {
|
|
4176
|
+
"content": {
|
|
4177
|
+
"application/json": {
|
|
4178
|
+
"schema": {
|
|
4179
|
+
"type": "object",
|
|
4180
|
+
"properties": {
|
|
4181
|
+
"events": {
|
|
4182
|
+
"type": "array",
|
|
4183
|
+
"items": {
|
|
4184
|
+
"type": "object",
|
|
4185
|
+
"properties": {
|
|
4186
|
+
"memoryId": {
|
|
4187
|
+
"type": "string",
|
|
4188
|
+
"minLength": 1
|
|
4189
|
+
},
|
|
4190
|
+
"signal": {
|
|
4191
|
+
"type": "number",
|
|
4192
|
+
"minimum": -1,
|
|
4193
|
+
"maximum": 1
|
|
4194
|
+
},
|
|
4195
|
+
"weight": {
|
|
4196
|
+
"type": "number",
|
|
4197
|
+
"minimum": 0,
|
|
4198
|
+
"maximum": 1
|
|
4199
|
+
},
|
|
4200
|
+
"source": {
|
|
4201
|
+
"type": "string",
|
|
4202
|
+
"enum": [
|
|
4203
|
+
"llm",
|
|
4204
|
+
"explicit-self"
|
|
4205
|
+
]
|
|
4206
|
+
},
|
|
4207
|
+
"reasoning": {
|
|
4208
|
+
"type": "string",
|
|
4209
|
+
"maxLength": 500
|
|
4210
|
+
},
|
|
4211
|
+
"taskId": {
|
|
4212
|
+
"type": "string",
|
|
4213
|
+
"format": "uuid"
|
|
4214
|
+
},
|
|
4215
|
+
"referencesSource": {
|
|
4216
|
+
"type": "string",
|
|
4217
|
+
"minLength": 1,
|
|
4218
|
+
"maxLength": 512,
|
|
4219
|
+
"description": "Optional external source ID this memory references. Free-form string, convention \"<source>:<identifier>\" (e.g. \"github:owner/repo#N\", \"linear:KEY-N\", \"customer:<slug>\", \"slack:<channel>:<ts>\", \"agentmail:<thread-id>\"). Pick any prefix that fits — no closed enum. When present, an edge from this memory to the external source is created/updated."
|
|
4220
|
+
}
|
|
4221
|
+
},
|
|
4222
|
+
"required": [
|
|
4223
|
+
"memoryId",
|
|
4224
|
+
"signal",
|
|
4225
|
+
"weight",
|
|
4226
|
+
"source"
|
|
4227
|
+
]
|
|
4228
|
+
},
|
|
4229
|
+
"minItems": 1,
|
|
4230
|
+
"maxItems": 50
|
|
4231
|
+
}
|
|
4232
|
+
},
|
|
4233
|
+
"required": [
|
|
4234
|
+
"events"
|
|
4235
|
+
]
|
|
4236
|
+
}
|
|
4237
|
+
}
|
|
4238
|
+
}
|
|
4239
|
+
},
|
|
4240
|
+
"responses": {
|
|
4241
|
+
"200": {
|
|
4242
|
+
"description": "Ratings applied; per-event rejections returned in body"
|
|
4243
|
+
},
|
|
4244
|
+
"400": {
|
|
4245
|
+
"description": "Validation error or explicit-self R6 spam-guard rejection"
|
|
4246
|
+
},
|
|
4247
|
+
"409": {
|
|
4248
|
+
"description": "Duplicate explicit-self rating for (taskId, memoryId)"
|
|
4249
|
+
}
|
|
4250
|
+
}
|
|
4251
|
+
}
|
|
4252
|
+
},
|
|
4253
|
+
"/api/memory/retrievals": {
|
|
4254
|
+
"get": {
|
|
4255
|
+
"summary": "List memories retrieved for a task or session (rater input)",
|
|
4256
|
+
"tags": [
|
|
4257
|
+
"Memory"
|
|
4258
|
+
],
|
|
4259
|
+
"security": [
|
|
4260
|
+
{
|
|
4261
|
+
"bearerAuth": []
|
|
4262
|
+
}
|
|
4263
|
+
],
|
|
4264
|
+
"parameters": [
|
|
4265
|
+
{
|
|
4266
|
+
"schema": {
|
|
4267
|
+
"type": "string",
|
|
4268
|
+
"format": "uuid"
|
|
4269
|
+
},
|
|
4270
|
+
"required": false,
|
|
4271
|
+
"name": "taskId",
|
|
4272
|
+
"in": "query"
|
|
4273
|
+
},
|
|
4274
|
+
{
|
|
4275
|
+
"schema": {
|
|
4276
|
+
"type": "string"
|
|
4277
|
+
},
|
|
4278
|
+
"required": false,
|
|
4279
|
+
"name": "sessionId",
|
|
4280
|
+
"in": "query"
|
|
4281
|
+
}
|
|
4282
|
+
],
|
|
4283
|
+
"responses": {
|
|
4284
|
+
"200": {
|
|
4285
|
+
"description": "Retrieval rows joined with agent_memory"
|
|
4286
|
+
},
|
|
4287
|
+
"400": {
|
|
4288
|
+
"description": "Missing taskId/sessionId or X-Agent-ID"
|
|
4289
|
+
}
|
|
4290
|
+
}
|
|
4291
|
+
}
|
|
4292
|
+
},
|
|
4293
|
+
"/api/memory/edges": {
|
|
4294
|
+
"get": {
|
|
4295
|
+
"summary": "List references-source edges for a memory",
|
|
3338
4296
|
"tags": [
|
|
3339
4297
|
"Memory"
|
|
3340
4298
|
],
|
|
@@ -3343,48 +4301,153 @@
|
|
|
3343
4301
|
"bearerAuth": []
|
|
3344
4302
|
}
|
|
3345
4303
|
],
|
|
4304
|
+
"parameters": [
|
|
4305
|
+
{
|
|
4306
|
+
"schema": {
|
|
4307
|
+
"type": "string",
|
|
4308
|
+
"minLength": 1
|
|
4309
|
+
},
|
|
4310
|
+
"required": true,
|
|
4311
|
+
"name": "memoryId",
|
|
4312
|
+
"in": "query"
|
|
4313
|
+
}
|
|
4314
|
+
],
|
|
4315
|
+
"responses": {
|
|
4316
|
+
"200": {
|
|
4317
|
+
"description": "Edges with computed usefulness scores"
|
|
4318
|
+
},
|
|
4319
|
+
"400": {
|
|
4320
|
+
"description": "Missing memoryId or X-Agent-ID"
|
|
4321
|
+
}
|
|
4322
|
+
}
|
|
4323
|
+
}
|
|
4324
|
+
},
|
|
4325
|
+
"/@swarm/api/{path}": {
|
|
4326
|
+
"get": {
|
|
4327
|
+
"summary": "Cookie-gated proxy to the swarm API (used by db-backed page iframes)",
|
|
4328
|
+
"tags": [
|
|
4329
|
+
"Pages"
|
|
4330
|
+
],
|
|
4331
|
+
"responses": {
|
|
4332
|
+
"200": {
|
|
4333
|
+
"description": "Proxied response from the underlying /api/* endpoint"
|
|
4334
|
+
},
|
|
4335
|
+
"401": {
|
|
4336
|
+
"description": "No or invalid page-session cookie"
|
|
4337
|
+
},
|
|
4338
|
+
"404": {
|
|
4339
|
+
"description": "Page referenced by the cookie no longer exists"
|
|
4340
|
+
}
|
|
4341
|
+
}
|
|
4342
|
+
},
|
|
4343
|
+
"post": {
|
|
4344
|
+
"summary": "Cookie-gated proxy to the swarm API (POST)",
|
|
4345
|
+
"tags": [
|
|
4346
|
+
"Pages"
|
|
4347
|
+
],
|
|
4348
|
+
"responses": {
|
|
4349
|
+
"200": {
|
|
4350
|
+
"description": "Proxied response"
|
|
4351
|
+
},
|
|
4352
|
+
"401": {
|
|
4353
|
+
"description": "No or invalid page-session cookie"
|
|
4354
|
+
}
|
|
4355
|
+
}
|
|
4356
|
+
},
|
|
4357
|
+
"put": {
|
|
4358
|
+
"summary": "Cookie-gated proxy to the swarm API (PUT)",
|
|
4359
|
+
"tags": [
|
|
4360
|
+
"Pages"
|
|
4361
|
+
],
|
|
4362
|
+
"responses": {
|
|
4363
|
+
"200": {
|
|
4364
|
+
"description": "Proxied response"
|
|
4365
|
+
},
|
|
4366
|
+
"401": {
|
|
4367
|
+
"description": "No or invalid page-session cookie"
|
|
4368
|
+
}
|
|
4369
|
+
}
|
|
4370
|
+
},
|
|
4371
|
+
"delete": {
|
|
4372
|
+
"summary": "Cookie-gated proxy to the swarm API (DELETE)",
|
|
4373
|
+
"tags": [
|
|
4374
|
+
"Pages"
|
|
4375
|
+
],
|
|
4376
|
+
"responses": {
|
|
4377
|
+
"200": {
|
|
4378
|
+
"description": "Proxied response"
|
|
4379
|
+
},
|
|
4380
|
+
"401": {
|
|
4381
|
+
"description": "No or invalid page-session cookie"
|
|
4382
|
+
}
|
|
4383
|
+
}
|
|
4384
|
+
},
|
|
4385
|
+
"patch": {
|
|
4386
|
+
"summary": "Cookie-gated proxy to the swarm API (PATCH)",
|
|
4387
|
+
"tags": [
|
|
4388
|
+
"Pages"
|
|
4389
|
+
],
|
|
4390
|
+
"responses": {
|
|
4391
|
+
"200": {
|
|
4392
|
+
"description": "Proxied response"
|
|
4393
|
+
},
|
|
4394
|
+
"401": {
|
|
4395
|
+
"description": "No or invalid page-session cookie"
|
|
4396
|
+
}
|
|
4397
|
+
}
|
|
4398
|
+
}
|
|
4399
|
+
},
|
|
4400
|
+
"/api/pages": {
|
|
4401
|
+
"post": {
|
|
4402
|
+
"summary": "Create a new page",
|
|
4403
|
+
"tags": [
|
|
4404
|
+
"Pages"
|
|
4405
|
+
],
|
|
4406
|
+
"security": [
|
|
4407
|
+
{
|
|
4408
|
+
"bearerAuth": []
|
|
4409
|
+
}
|
|
4410
|
+
],
|
|
3346
4411
|
"requestBody": {
|
|
3347
4412
|
"content": {
|
|
3348
4413
|
"application/json": {
|
|
3349
4414
|
"schema": {
|
|
3350
4415
|
"type": "object",
|
|
3351
4416
|
"properties": {
|
|
3352
|
-
"
|
|
3353
|
-
"type": "string",
|
|
3354
|
-
"format": "uuid"
|
|
3355
|
-
},
|
|
3356
|
-
"content": {
|
|
4417
|
+
"slug": {
|
|
3357
4418
|
"type": "string",
|
|
3358
4419
|
"minLength": 1
|
|
3359
4420
|
},
|
|
3360
|
-
"
|
|
4421
|
+
"title": {
|
|
3361
4422
|
"type": "string",
|
|
3362
4423
|
"minLength": 1
|
|
3363
4424
|
},
|
|
3364
|
-
"
|
|
4425
|
+
"description": {
|
|
4426
|
+
"type": "string"
|
|
4427
|
+
},
|
|
4428
|
+
"contentType": {
|
|
3365
4429
|
"type": "string",
|
|
3366
4430
|
"enum": [
|
|
3367
|
-
"
|
|
3368
|
-
"
|
|
4431
|
+
"text/html",
|
|
4432
|
+
"application/json"
|
|
3369
4433
|
]
|
|
3370
4434
|
},
|
|
3371
|
-
"
|
|
4435
|
+
"authMode": {
|
|
3372
4436
|
"type": "string",
|
|
3373
4437
|
"enum": [
|
|
3374
|
-
"
|
|
3375
|
-
"
|
|
3376
|
-
"
|
|
3377
|
-
"task_completion"
|
|
4438
|
+
"public",
|
|
4439
|
+
"authed",
|
|
4440
|
+
"password"
|
|
3378
4441
|
]
|
|
3379
4442
|
},
|
|
3380
|
-
"
|
|
4443
|
+
"password": {
|
|
3381
4444
|
"type": "string",
|
|
3382
|
-
"
|
|
4445
|
+
"minLength": 1
|
|
3383
4446
|
},
|
|
3384
|
-
"
|
|
4447
|
+
"body": {
|
|
3385
4448
|
"type": "string"
|
|
3386
4449
|
},
|
|
3387
|
-
"
|
|
4450
|
+
"needsCredentials": {
|
|
3388
4451
|
"type": "array",
|
|
3389
4452
|
"items": {
|
|
3390
4453
|
"type": "string"
|
|
@@ -3392,169 +4455,176 @@
|
|
|
3392
4455
|
}
|
|
3393
4456
|
},
|
|
3394
4457
|
"required": [
|
|
3395
|
-
"
|
|
3396
|
-
"
|
|
3397
|
-
"
|
|
3398
|
-
"
|
|
4458
|
+
"title",
|
|
4459
|
+
"contentType",
|
|
4460
|
+
"authMode",
|
|
4461
|
+
"body"
|
|
3399
4462
|
]
|
|
3400
4463
|
}
|
|
3401
4464
|
}
|
|
3402
4465
|
}
|
|
3403
4466
|
},
|
|
3404
4467
|
"responses": {
|
|
3405
|
-
"
|
|
3406
|
-
"description": "
|
|
4468
|
+
"201": {
|
|
4469
|
+
"description": "Page created"
|
|
3407
4470
|
},
|
|
3408
4471
|
"400": {
|
|
3409
|
-
"description": "
|
|
4472
|
+
"description": "Invalid body"
|
|
4473
|
+
},
|
|
4474
|
+
"409": {
|
|
4475
|
+
"description": "Slug already exists for this agent"
|
|
3410
4476
|
}
|
|
3411
4477
|
}
|
|
3412
|
-
}
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
"post": {
|
|
3416
|
-
"summary": "Search memories by natural language query",
|
|
4478
|
+
},
|
|
4479
|
+
"get": {
|
|
4480
|
+
"summary": "List pages",
|
|
3417
4481
|
"tags": [
|
|
3418
|
-
"
|
|
4482
|
+
"Pages"
|
|
3419
4483
|
],
|
|
3420
4484
|
"security": [
|
|
3421
4485
|
{
|
|
3422
4486
|
"bearerAuth": []
|
|
3423
4487
|
}
|
|
3424
4488
|
],
|
|
3425
|
-
"
|
|
3426
|
-
|
|
3427
|
-
"
|
|
3428
|
-
"
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
4489
|
+
"parameters": [
|
|
4490
|
+
{
|
|
4491
|
+
"schema": {
|
|
4492
|
+
"type": "string",
|
|
4493
|
+
"minLength": 1
|
|
4494
|
+
},
|
|
4495
|
+
"required": false,
|
|
4496
|
+
"name": "agentId",
|
|
4497
|
+
"in": "query"
|
|
4498
|
+
},
|
|
4499
|
+
{
|
|
4500
|
+
"schema": {
|
|
4501
|
+
"type": "integer",
|
|
4502
|
+
"minimum": 1,
|
|
4503
|
+
"maximum": 500
|
|
4504
|
+
},
|
|
4505
|
+
"required": false,
|
|
4506
|
+
"name": "limit",
|
|
4507
|
+
"in": "query"
|
|
4508
|
+
},
|
|
4509
|
+
{
|
|
4510
|
+
"schema": {
|
|
4511
|
+
"type": [
|
|
4512
|
+
"integer",
|
|
4513
|
+
"null"
|
|
4514
|
+
],
|
|
4515
|
+
"minimum": 0
|
|
4516
|
+
},
|
|
4517
|
+
"required": false,
|
|
4518
|
+
"name": "offset",
|
|
4519
|
+
"in": "query"
|
|
3447
4520
|
}
|
|
3448
|
-
|
|
4521
|
+
],
|
|
3449
4522
|
"responses": {
|
|
3450
4523
|
"200": {
|
|
3451
|
-
"description": "
|
|
3452
|
-
},
|
|
3453
|
-
"400": {
|
|
3454
|
-
"description": "Missing query or agent ID"
|
|
4524
|
+
"description": "Page list with totals + share-URL pointers"
|
|
3455
4525
|
}
|
|
3456
4526
|
}
|
|
3457
4527
|
}
|
|
3458
4528
|
},
|
|
3459
|
-
"/api/
|
|
3460
|
-
"
|
|
3461
|
-
"summary": "
|
|
4529
|
+
"/api/pages/{id}": {
|
|
4530
|
+
"get": {
|
|
4531
|
+
"summary": "Get a page by ID",
|
|
3462
4532
|
"tags": [
|
|
3463
|
-
"
|
|
4533
|
+
"Pages"
|
|
3464
4534
|
],
|
|
3465
4535
|
"security": [
|
|
3466
4536
|
{
|
|
3467
4537
|
"bearerAuth": []
|
|
3468
4538
|
}
|
|
3469
4539
|
],
|
|
3470
|
-
"
|
|
3471
|
-
|
|
3472
|
-
"
|
|
3473
|
-
"
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
"format": "uuid",
|
|
3479
|
-
"description": "Re-embed only this agent's memories. Omit for all."
|
|
3480
|
-
},
|
|
3481
|
-
"batchSize": {
|
|
3482
|
-
"type": "integer",
|
|
3483
|
-
"minimum": 1,
|
|
3484
|
-
"maximum": 100,
|
|
3485
|
-
"default": 20,
|
|
3486
|
-
"description": "Memories per batch"
|
|
3487
|
-
}
|
|
3488
|
-
}
|
|
3489
|
-
}
|
|
3490
|
-
}
|
|
4540
|
+
"parameters": [
|
|
4541
|
+
{
|
|
4542
|
+
"schema": {
|
|
4543
|
+
"type": "string"
|
|
4544
|
+
},
|
|
4545
|
+
"required": true,
|
|
4546
|
+
"name": "id",
|
|
4547
|
+
"in": "path"
|
|
3491
4548
|
}
|
|
3492
|
-
|
|
4549
|
+
],
|
|
3493
4550
|
"responses": {
|
|
3494
|
-
"
|
|
3495
|
-
"description": "
|
|
4551
|
+
"200": {
|
|
4552
|
+
"description": "Page row"
|
|
4553
|
+
},
|
|
4554
|
+
"404": {
|
|
4555
|
+
"description": "Page not found"
|
|
3496
4556
|
}
|
|
3497
4557
|
}
|
|
3498
|
-
}
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
"post": {
|
|
3502
|
-
"summary": "List or semantically search memories across all agents (debug/admin)",
|
|
4558
|
+
},
|
|
4559
|
+
"put": {
|
|
4560
|
+
"summary": "Update an existing page",
|
|
3503
4561
|
"tags": [
|
|
3504
|
-
"
|
|
4562
|
+
"Pages"
|
|
3505
4563
|
],
|
|
3506
4564
|
"security": [
|
|
3507
4565
|
{
|
|
3508
4566
|
"bearerAuth": []
|
|
3509
4567
|
}
|
|
3510
4568
|
],
|
|
4569
|
+
"parameters": [
|
|
4570
|
+
{
|
|
4571
|
+
"schema": {
|
|
4572
|
+
"type": "string"
|
|
4573
|
+
},
|
|
4574
|
+
"required": true,
|
|
4575
|
+
"name": "id",
|
|
4576
|
+
"in": "path"
|
|
4577
|
+
}
|
|
4578
|
+
],
|
|
3511
4579
|
"requestBody": {
|
|
3512
4580
|
"content": {
|
|
3513
4581
|
"application/json": {
|
|
3514
4582
|
"schema": {
|
|
3515
4583
|
"type": "object",
|
|
3516
4584
|
"properties": {
|
|
3517
|
-
"
|
|
3518
|
-
"type": "string",
|
|
3519
|
-
"
|
|
3520
|
-
},
|
|
3521
|
-
"agentId": {
|
|
3522
|
-
"type": "string",
|
|
3523
|
-
"format": "uuid",
|
|
3524
|
-
"description": "Filter to a single agent. Omit for all."
|
|
4585
|
+
"title": {
|
|
4586
|
+
"type": "string",
|
|
4587
|
+
"minLength": 1
|
|
3525
4588
|
},
|
|
3526
|
-
"
|
|
4589
|
+
"description": {
|
|
4590
|
+
"type": [
|
|
4591
|
+
"string",
|
|
4592
|
+
"null"
|
|
4593
|
+
]
|
|
4594
|
+
},
|
|
4595
|
+
"contentType": {
|
|
3527
4596
|
"type": "string",
|
|
3528
4597
|
"enum": [
|
|
3529
|
-
"
|
|
3530
|
-
"
|
|
3531
|
-
|
|
3532
|
-
],
|
|
3533
|
-
"default": "all"
|
|
4598
|
+
"text/html",
|
|
4599
|
+
"application/json"
|
|
4600
|
+
]
|
|
3534
4601
|
},
|
|
3535
|
-
"
|
|
4602
|
+
"authMode": {
|
|
3536
4603
|
"type": "string",
|
|
3537
4604
|
"enum": [
|
|
3538
|
-
"
|
|
3539
|
-
"
|
|
3540
|
-
"
|
|
3541
|
-
"task_completion"
|
|
4605
|
+
"public",
|
|
4606
|
+
"authed",
|
|
4607
|
+
"password"
|
|
3542
4608
|
]
|
|
3543
4609
|
},
|
|
3544
|
-
"
|
|
3545
|
-
"type":
|
|
3546
|
-
|
|
4610
|
+
"password": {
|
|
4611
|
+
"type": [
|
|
4612
|
+
"string",
|
|
4613
|
+
"null"
|
|
4614
|
+
],
|
|
4615
|
+
"minLength": 1
|
|
3547
4616
|
},
|
|
3548
|
-
"
|
|
3549
|
-
"type": "
|
|
3550
|
-
"minimum": 1,
|
|
3551
|
-
"maximum": 100,
|
|
3552
|
-
"default": 20
|
|
4617
|
+
"body": {
|
|
4618
|
+
"type": "string"
|
|
3553
4619
|
},
|
|
3554
|
-
"
|
|
3555
|
-
"type":
|
|
3556
|
-
|
|
3557
|
-
|
|
4620
|
+
"needsCredentials": {
|
|
4621
|
+
"type": [
|
|
4622
|
+
"array",
|
|
4623
|
+
"null"
|
|
4624
|
+
],
|
|
4625
|
+
"items": {
|
|
4626
|
+
"type": "string"
|
|
4627
|
+
}
|
|
3558
4628
|
}
|
|
3559
4629
|
}
|
|
3560
4630
|
}
|
|
@@ -3563,19 +4633,20 @@
|
|
|
3563
4633
|
},
|
|
3564
4634
|
"responses": {
|
|
3565
4635
|
"200": {
|
|
3566
|
-
"description": "
|
|
4636
|
+
"description": "Page updated"
|
|
3567
4637
|
},
|
|
3568
|
-
"
|
|
3569
|
-
"description": "
|
|
4638
|
+
"404": {
|
|
4639
|
+
"description": "Page not found"
|
|
4640
|
+
},
|
|
4641
|
+
"413": {
|
|
4642
|
+
"description": "Payload too large"
|
|
3570
4643
|
}
|
|
3571
4644
|
}
|
|
3572
|
-
}
|
|
3573
|
-
},
|
|
3574
|
-
"/api/memory/{id}": {
|
|
4645
|
+
},
|
|
3575
4646
|
"delete": {
|
|
3576
|
-
"summary": "Delete a
|
|
4647
|
+
"summary": "Delete a page (and all version history)",
|
|
3577
4648
|
"tags": [
|
|
3578
|
-
"
|
|
4649
|
+
"Pages"
|
|
3579
4650
|
],
|
|
3580
4651
|
"security": [
|
|
3581
4652
|
{
|
|
@@ -3585,8 +4656,7 @@
|
|
|
3585
4656
|
"parameters": [
|
|
3586
4657
|
{
|
|
3587
4658
|
"schema": {
|
|
3588
|
-
"type": "string"
|
|
3589
|
-
"format": "uuid"
|
|
4659
|
+
"type": "string"
|
|
3590
4660
|
},
|
|
3591
4661
|
"required": true,
|
|
3592
4662
|
"name": "id",
|
|
@@ -3594,109 +4664,72 @@
|
|
|
3594
4664
|
}
|
|
3595
4665
|
],
|
|
3596
4666
|
"responses": {
|
|
3597
|
-
"
|
|
3598
|
-
"description": "
|
|
4667
|
+
"204": {
|
|
4668
|
+
"description": "Page deleted"
|
|
3599
4669
|
},
|
|
3600
4670
|
"404": {
|
|
3601
|
-
"description": "
|
|
4671
|
+
"description": "Page not found"
|
|
3602
4672
|
}
|
|
3603
4673
|
}
|
|
3604
4674
|
}
|
|
3605
4675
|
},
|
|
3606
|
-
"/api/
|
|
4676
|
+
"/api/pages/{id}/launch": {
|
|
3607
4677
|
"post": {
|
|
3608
|
-
"summary": "
|
|
4678
|
+
"summary": "Launch a page session (issues HttpOnly cookie)",
|
|
3609
4679
|
"tags": [
|
|
3610
|
-
"
|
|
4680
|
+
"Pages"
|
|
3611
4681
|
],
|
|
3612
4682
|
"security": [
|
|
3613
4683
|
{
|
|
3614
4684
|
"bearerAuth": []
|
|
3615
4685
|
}
|
|
3616
4686
|
],
|
|
3617
|
-
"
|
|
3618
|
-
|
|
3619
|
-
"
|
|
3620
|
-
"
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
"items": {
|
|
3626
|
-
"type": "object",
|
|
3627
|
-
"properties": {
|
|
3628
|
-
"memoryId": {
|
|
3629
|
-
"type": "string",
|
|
3630
|
-
"minLength": 1
|
|
3631
|
-
},
|
|
3632
|
-
"signal": {
|
|
3633
|
-
"type": "number",
|
|
3634
|
-
"minimum": -1,
|
|
3635
|
-
"maximum": 1
|
|
3636
|
-
},
|
|
3637
|
-
"weight": {
|
|
3638
|
-
"type": "number",
|
|
3639
|
-
"minimum": 0,
|
|
3640
|
-
"maximum": 1
|
|
3641
|
-
},
|
|
3642
|
-
"source": {
|
|
3643
|
-
"type": "string",
|
|
3644
|
-
"enum": [
|
|
3645
|
-
"llm",
|
|
3646
|
-
"explicit-self"
|
|
3647
|
-
]
|
|
3648
|
-
},
|
|
3649
|
-
"reasoning": {
|
|
3650
|
-
"type": "string",
|
|
3651
|
-
"maxLength": 500
|
|
3652
|
-
},
|
|
3653
|
-
"taskId": {
|
|
3654
|
-
"type": "string",
|
|
3655
|
-
"format": "uuid"
|
|
3656
|
-
},
|
|
3657
|
-
"referencesSource": {
|
|
3658
|
-
"type": "string",
|
|
3659
|
-
"minLength": 1,
|
|
3660
|
-
"maxLength": 512,
|
|
3661
|
-
"description": "Optional external source ID this memory references. Free-form string, convention \"<source>:<identifier>\" (e.g. \"github:owner/repo#N\", \"linear:KEY-N\", \"customer:<slug>\", \"slack:<channel>:<ts>\", \"agentmail:<thread-id>\"). Pick any prefix that fits — no closed enum. When present, an edge from this memory to the external source is created/updated."
|
|
3662
|
-
}
|
|
3663
|
-
},
|
|
3664
|
-
"required": [
|
|
3665
|
-
"memoryId",
|
|
3666
|
-
"signal",
|
|
3667
|
-
"weight",
|
|
3668
|
-
"source"
|
|
3669
|
-
]
|
|
3670
|
-
},
|
|
3671
|
-
"minItems": 1,
|
|
3672
|
-
"maxItems": 50
|
|
3673
|
-
}
|
|
3674
|
-
},
|
|
3675
|
-
"required": [
|
|
3676
|
-
"events"
|
|
3677
|
-
]
|
|
3678
|
-
}
|
|
3679
|
-
}
|
|
4687
|
+
"parameters": [
|
|
4688
|
+
{
|
|
4689
|
+
"schema": {
|
|
4690
|
+
"type": "string"
|
|
4691
|
+
},
|
|
4692
|
+
"required": true,
|
|
4693
|
+
"name": "id",
|
|
4694
|
+
"in": "path"
|
|
3680
4695
|
}
|
|
3681
|
-
|
|
4696
|
+
],
|
|
3682
4697
|
"responses": {
|
|
3683
|
-
"
|
|
3684
|
-
"description": "
|
|
4698
|
+
"204": {
|
|
4699
|
+
"description": "Cookie issued"
|
|
3685
4700
|
},
|
|
3686
4701
|
"400": {
|
|
3687
|
-
"description": "
|
|
4702
|
+
"description": "Launch not supported for this page (e.g. password mode)"
|
|
3688
4703
|
},
|
|
3689
|
-
"
|
|
3690
|
-
"description": "
|
|
4704
|
+
"404": {
|
|
4705
|
+
"description": "Page not found"
|
|
3691
4706
|
}
|
|
3692
4707
|
}
|
|
3693
4708
|
}
|
|
3694
4709
|
},
|
|
3695
|
-
"/api/
|
|
4710
|
+
"/api/pages/actions": {
|
|
3696
4711
|
"get": {
|
|
3697
|
-
"summary": "List
|
|
4712
|
+
"summary": "List JSON-page action allowlist (with param JSON Schemas)",
|
|
3698
4713
|
"tags": [
|
|
3699
|
-
"
|
|
4714
|
+
"Pages"
|
|
4715
|
+
],
|
|
4716
|
+
"security": [
|
|
4717
|
+
{
|
|
4718
|
+
"bearerAuth": []
|
|
4719
|
+
}
|
|
4720
|
+
],
|
|
4721
|
+
"responses": {
|
|
4722
|
+
"200": {
|
|
4723
|
+
"description": "Action allowlist"
|
|
4724
|
+
}
|
|
4725
|
+
}
|
|
4726
|
+
}
|
|
4727
|
+
},
|
|
4728
|
+
"/api/pages/{id}/versions": {
|
|
4729
|
+
"get": {
|
|
4730
|
+
"summary": "List version snapshots for a page",
|
|
4731
|
+
"tags": [
|
|
4732
|
+
"Pages"
|
|
3700
4733
|
],
|
|
3701
4734
|
"security": [
|
|
3702
4735
|
{
|
|
@@ -3706,60 +4739,126 @@
|
|
|
3706
4739
|
"parameters": [
|
|
3707
4740
|
{
|
|
3708
4741
|
"schema": {
|
|
3709
|
-
"type": "string"
|
|
3710
|
-
"format": "uuid"
|
|
4742
|
+
"type": "string"
|
|
3711
4743
|
},
|
|
3712
|
-
"required":
|
|
3713
|
-
"name": "
|
|
3714
|
-
"in": "
|
|
4744
|
+
"required": true,
|
|
4745
|
+
"name": "id",
|
|
4746
|
+
"in": "path"
|
|
4747
|
+
}
|
|
4748
|
+
],
|
|
4749
|
+
"responses": {
|
|
4750
|
+
"200": {
|
|
4751
|
+
"description": "Version list (newest first)"
|
|
3715
4752
|
},
|
|
4753
|
+
"404": {
|
|
4754
|
+
"description": "Page not found"
|
|
4755
|
+
}
|
|
4756
|
+
}
|
|
4757
|
+
}
|
|
4758
|
+
},
|
|
4759
|
+
"/api/pages/{id}/versions/{version}": {
|
|
4760
|
+
"get": {
|
|
4761
|
+
"summary": "Get a single page-version snapshot",
|
|
4762
|
+
"tags": [
|
|
4763
|
+
"Pages"
|
|
4764
|
+
],
|
|
4765
|
+
"security": [
|
|
4766
|
+
{
|
|
4767
|
+
"bearerAuth": []
|
|
4768
|
+
}
|
|
4769
|
+
],
|
|
4770
|
+
"parameters": [
|
|
3716
4771
|
{
|
|
3717
4772
|
"schema": {
|
|
3718
4773
|
"type": "string"
|
|
3719
4774
|
},
|
|
3720
|
-
"required":
|
|
3721
|
-
"name": "
|
|
3722
|
-
"in": "
|
|
4775
|
+
"required": true,
|
|
4776
|
+
"name": "id",
|
|
4777
|
+
"in": "path"
|
|
4778
|
+
},
|
|
4779
|
+
{
|
|
4780
|
+
"schema": {
|
|
4781
|
+
"type": "integer",
|
|
4782
|
+
"minimum": 1
|
|
4783
|
+
},
|
|
4784
|
+
"required": true,
|
|
4785
|
+
"name": "version",
|
|
4786
|
+
"in": "path"
|
|
3723
4787
|
}
|
|
3724
4788
|
],
|
|
3725
4789
|
"responses": {
|
|
3726
4790
|
"200": {
|
|
3727
|
-
"description": "
|
|
4791
|
+
"description": "Version snapshot"
|
|
3728
4792
|
},
|
|
3729
|
-
"
|
|
3730
|
-
"description": "
|
|
4793
|
+
"404": {
|
|
4794
|
+
"description": "Page or version not found"
|
|
3731
4795
|
}
|
|
3732
4796
|
}
|
|
3733
4797
|
}
|
|
3734
4798
|
},
|
|
3735
|
-
"/
|
|
4799
|
+
"/p/{id}": {
|
|
3736
4800
|
"get": {
|
|
3737
|
-
"summary": "
|
|
4801
|
+
"summary": "Render a page (HTML inline; JSON redirects to SPA)",
|
|
3738
4802
|
"tags": [
|
|
3739
|
-
"
|
|
4803
|
+
"Pages"
|
|
3740
4804
|
],
|
|
3741
|
-
"
|
|
4805
|
+
"parameters": [
|
|
3742
4806
|
{
|
|
3743
|
-
"
|
|
4807
|
+
"schema": {
|
|
4808
|
+
"type": "string"
|
|
4809
|
+
},
|
|
4810
|
+
"required": true,
|
|
4811
|
+
"name": "id",
|
|
4812
|
+
"in": "path"
|
|
3744
4813
|
}
|
|
3745
4814
|
],
|
|
4815
|
+
"responses": {
|
|
4816
|
+
"200": {
|
|
4817
|
+
"description": "Rendered HTML page"
|
|
4818
|
+
},
|
|
4819
|
+
"302": {
|
|
4820
|
+
"description": "Redirect to SPA for JSON content"
|
|
4821
|
+
},
|
|
4822
|
+
"401": {
|
|
4823
|
+
"description": "Page requires an authenticated session"
|
|
4824
|
+
},
|
|
4825
|
+
"403": {
|
|
4826
|
+
"description": "Cookie does not match this page id"
|
|
4827
|
+
},
|
|
4828
|
+
"404": {
|
|
4829
|
+
"description": "Page not found"
|
|
4830
|
+
}
|
|
4831
|
+
}
|
|
4832
|
+
}
|
|
4833
|
+
},
|
|
4834
|
+
"/p/{id}.json": {
|
|
4835
|
+
"get": {
|
|
4836
|
+
"summary": "Page metadata + body as JSON (used by SPA renderer)",
|
|
4837
|
+
"tags": [
|
|
4838
|
+
"Pages"
|
|
4839
|
+
],
|
|
3746
4840
|
"parameters": [
|
|
3747
4841
|
{
|
|
3748
4842
|
"schema": {
|
|
3749
|
-
"type": "string"
|
|
3750
|
-
"minLength": 1
|
|
4843
|
+
"type": "string"
|
|
3751
4844
|
},
|
|
3752
4845
|
"required": true,
|
|
3753
|
-
"name": "
|
|
3754
|
-
"in": "
|
|
4846
|
+
"name": "id",
|
|
4847
|
+
"in": "path"
|
|
3755
4848
|
}
|
|
3756
4849
|
],
|
|
3757
4850
|
"responses": {
|
|
3758
4851
|
"200": {
|
|
3759
|
-
"description": "
|
|
4852
|
+
"description": "Page JSON"
|
|
3760
4853
|
},
|
|
3761
|
-
"
|
|
3762
|
-
"description": "
|
|
4854
|
+
"401": {
|
|
4855
|
+
"description": "Page requires an authenticated session"
|
|
4856
|
+
},
|
|
4857
|
+
"403": {
|
|
4858
|
+
"description": "Cookie does not match this page id"
|
|
4859
|
+
},
|
|
4860
|
+
"404": {
|
|
4861
|
+
"description": "Page not found"
|
|
3763
4862
|
}
|
|
3764
4863
|
}
|
|
3765
4864
|
}
|