@1claw/openapi-spec 0.42.0 → 0.43.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.
Files changed (3) hide show
  1. package/openapi.json +1027 -147
  2. package/openapi.yaml +586 -1
  3. package/package.json +1 -1
package/openapi.yaml CHANGED
@@ -2,7 +2,7 @@ openapi: 3.1.0
2
2
 
3
3
  info:
4
4
  title: 1Claw API
5
- version: 2.28.0
5
+ version: 2.29.0
6
6
  description: |
7
7
  Secure secret management for AI agents. Provides vaults, secrets,
8
8
  policy-based access control, agent identity, Intents API,
@@ -89,6 +89,10 @@ tags:
89
89
  description: Agent memory storage (scratch, durable, semantic)
90
90
  - name: Discovery
91
91
  description: Agent directory and platform marketplace
92
+ - name: Agent Chat
93
+ description: Chat with agents via Shroud LLM proxy
94
+ - name: Agent Channels
95
+ description: External messaging channels (Telegram, WhatsApp, Discord)
92
96
 
93
97
  # =============================================================================
94
98
  # PATHS
@@ -7283,6 +7287,373 @@ paths:
7283
7287
  schema:
7284
7288
  $ref: "#/components/schemas/DirectoryResponse"
7285
7289
 
7290
+ # ---------------------------------------------------------------------------
7291
+ # Agent Chat
7292
+ # ---------------------------------------------------------------------------
7293
+
7294
+ /v1/agents/{agent_id}/chat:
7295
+ post:
7296
+ tags: [Agent Chat]
7297
+ summary: Send chat message
7298
+ description: |
7299
+ Send a message to an agent and receive a response via Shroud LLM.
7300
+ Supports SSE streaming when Accept: text/event-stream is set.
7301
+ operationId: sendChatMessage
7302
+ parameters:
7303
+ - $ref: "#/components/parameters/AgentId"
7304
+ requestBody:
7305
+ required: true
7306
+ content:
7307
+ application/json:
7308
+ schema:
7309
+ $ref: "#/components/schemas/SendChatMessageRequest"
7310
+ responses:
7311
+ "200":
7312
+ description: Chat response
7313
+ content:
7314
+ application/json:
7315
+ schema:
7316
+ $ref: "#/components/schemas/SendChatMessageResponse"
7317
+ text/event-stream:
7318
+ schema:
7319
+ type: string
7320
+ description: SSE stream of response chunks
7321
+ "401":
7322
+ $ref: "#/components/responses/Unauthorized"
7323
+ "403":
7324
+ $ref: "#/components/responses/Forbidden"
7325
+
7326
+ /v1/agents/{agent_id}/chat/conversations:
7327
+ get:
7328
+ tags: [Agent Chat]
7329
+ summary: List conversations
7330
+ description: List all chat conversations for an agent.
7331
+ operationId: listChatConversations
7332
+ parameters:
7333
+ - $ref: "#/components/parameters/AgentId"
7334
+ responses:
7335
+ "200":
7336
+ description: Conversation list
7337
+ content:
7338
+ application/json:
7339
+ schema:
7340
+ $ref: "#/components/schemas/ChatConversationListResponse"
7341
+ "401":
7342
+ $ref: "#/components/responses/Unauthorized"
7343
+
7344
+ /v1/agents/{agent_id}/chat/conversations/{conversation_id}:
7345
+ get:
7346
+ tags: [Agent Chat]
7347
+ summary: Get conversation
7348
+ description: Get a conversation with its full message history.
7349
+ operationId: getChatConversation
7350
+ parameters:
7351
+ - $ref: "#/components/parameters/AgentId"
7352
+ - name: conversation_id
7353
+ in: path
7354
+ required: true
7355
+ schema:
7356
+ type: string
7357
+ format: uuid
7358
+ responses:
7359
+ "200":
7360
+ description: Conversation detail
7361
+ content:
7362
+ application/json:
7363
+ schema:
7364
+ $ref: "#/components/schemas/ConversationDetailResponse"
7365
+ "401":
7366
+ $ref: "#/components/responses/Unauthorized"
7367
+ "404":
7368
+ $ref: "#/components/responses/NotFound"
7369
+ delete:
7370
+ tags: [Agent Chat]
7371
+ summary: Archive conversation
7372
+ description: Archive (soft-delete) a chat conversation.
7373
+ operationId: deleteChatConversation
7374
+ parameters:
7375
+ - $ref: "#/components/parameters/AgentId"
7376
+ - name: conversation_id
7377
+ in: path
7378
+ required: true
7379
+ schema:
7380
+ type: string
7381
+ format: uuid
7382
+ responses:
7383
+ "204":
7384
+ description: Conversation archived
7385
+ "401":
7386
+ $ref: "#/components/responses/Unauthorized"
7387
+ "404":
7388
+ $ref: "#/components/responses/NotFound"
7389
+
7390
+ # ---------------------------------------------------------------------------
7391
+ # Agent Channels
7392
+ # ---------------------------------------------------------------------------
7393
+
7394
+ /v1/agents/{agent_id}/channels:
7395
+ post:
7396
+ tags: [Agent Channels]
7397
+ summary: Register channel
7398
+ description: |
7399
+ Register a new external messaging channel (Telegram, WhatsApp, Discord)
7400
+ for an agent. Human-only. Returns the channel with its webhook URL.
7401
+ operationId: createChannel
7402
+ parameters:
7403
+ - $ref: "#/components/parameters/AgentId"
7404
+ requestBody:
7405
+ required: true
7406
+ content:
7407
+ application/json:
7408
+ schema:
7409
+ $ref: "#/components/schemas/CreateChannelRequest"
7410
+ responses:
7411
+ "201":
7412
+ description: Channel created
7413
+ content:
7414
+ application/json:
7415
+ schema:
7416
+ $ref: "#/components/schemas/ChannelResponse"
7417
+ "400":
7418
+ $ref: "#/components/responses/BadRequest"
7419
+ "401":
7420
+ $ref: "#/components/responses/Unauthorized"
7421
+ "403":
7422
+ $ref: "#/components/responses/Forbidden"
7423
+ get:
7424
+ tags: [Agent Channels]
7425
+ summary: List channels
7426
+ description: List all messaging channels for an agent.
7427
+ operationId: listChannels
7428
+ parameters:
7429
+ - $ref: "#/components/parameters/AgentId"
7430
+ responses:
7431
+ "200":
7432
+ description: Channel list
7433
+ content:
7434
+ application/json:
7435
+ schema:
7436
+ $ref: "#/components/schemas/ChannelListResponse"
7437
+ "401":
7438
+ $ref: "#/components/responses/Unauthorized"
7439
+
7440
+ /v1/agents/{agent_id}/channels/{channel_id}:
7441
+ patch:
7442
+ tags: [Agent Channels]
7443
+ summary: Update channel
7444
+ description: Update a channel's name, active status, or config. Human-only.
7445
+ operationId: updateChannel
7446
+ parameters:
7447
+ - $ref: "#/components/parameters/AgentId"
7448
+ - name: channel_id
7449
+ in: path
7450
+ required: true
7451
+ schema:
7452
+ type: string
7453
+ format: uuid
7454
+ requestBody:
7455
+ required: true
7456
+ content:
7457
+ application/json:
7458
+ schema:
7459
+ $ref: "#/components/schemas/UpdateChannelRequest"
7460
+ responses:
7461
+ "200":
7462
+ description: Channel updated
7463
+ content:
7464
+ application/json:
7465
+ schema:
7466
+ $ref: "#/components/schemas/ChannelResponse"
7467
+ "401":
7468
+ $ref: "#/components/responses/Unauthorized"
7469
+ "403":
7470
+ $ref: "#/components/responses/Forbidden"
7471
+ "404":
7472
+ $ref: "#/components/responses/NotFound"
7473
+ delete:
7474
+ tags: [Agent Channels]
7475
+ summary: Delete channel
7476
+ description: Delete a messaging channel. Human-only.
7477
+ operationId: deleteChannel
7478
+ parameters:
7479
+ - $ref: "#/components/parameters/AgentId"
7480
+ - name: channel_id
7481
+ in: path
7482
+ required: true
7483
+ schema:
7484
+ type: string
7485
+ format: uuid
7486
+ responses:
7487
+ "204":
7488
+ description: Channel deleted
7489
+ "401":
7490
+ $ref: "#/components/responses/Unauthorized"
7491
+ "403":
7492
+ $ref: "#/components/responses/Forbidden"
7493
+ "404":
7494
+ $ref: "#/components/responses/NotFound"
7495
+
7496
+ /v1/agents/{agent_id}/channels/{channel_id}/send:
7497
+ post:
7498
+ tags: [Agent Channels]
7499
+ summary: Send outbound message
7500
+ description: Send an outbound message via a registered channel.
7501
+ operationId: sendChannelMessage
7502
+ parameters:
7503
+ - $ref: "#/components/parameters/AgentId"
7504
+ - name: channel_id
7505
+ in: path
7506
+ required: true
7507
+ schema:
7508
+ type: string
7509
+ format: uuid
7510
+ requestBody:
7511
+ required: true
7512
+ content:
7513
+ application/json:
7514
+ schema:
7515
+ $ref: "#/components/schemas/SendChannelMessageRequest"
7516
+ responses:
7517
+ "200":
7518
+ description: Message sent
7519
+ content:
7520
+ application/json:
7521
+ schema:
7522
+ $ref: "#/components/schemas/ChannelMessageResponse"
7523
+ "401":
7524
+ $ref: "#/components/responses/Unauthorized"
7525
+ "404":
7526
+ $ref: "#/components/responses/NotFound"
7527
+
7528
+ /v1/agents/{agent_id}/channels/{channel_id}/messages:
7529
+ get:
7530
+ tags: [Agent Channels]
7531
+ summary: Channel message history
7532
+ description: List inbound and outbound messages for a channel.
7533
+ operationId: listChannelMessages
7534
+ parameters:
7535
+ - $ref: "#/components/parameters/AgentId"
7536
+ - name: channel_id
7537
+ in: path
7538
+ required: true
7539
+ schema:
7540
+ type: string
7541
+ format: uuid
7542
+ - name: limit
7543
+ in: query
7544
+ schema:
7545
+ type: integer
7546
+ default: 50
7547
+ responses:
7548
+ "200":
7549
+ description: Message list
7550
+ content:
7551
+ application/json:
7552
+ schema:
7553
+ $ref: "#/components/schemas/ChannelMessageListResponse"
7554
+ "401":
7555
+ $ref: "#/components/responses/Unauthorized"
7556
+
7557
+ # ---------------------------------------------------------------------------
7558
+ # Channel Webhooks (Public)
7559
+ # ---------------------------------------------------------------------------
7560
+
7561
+ /v1/webhooks/telegram/{webhook_path}:
7562
+ post:
7563
+ tags: [Agent Channels]
7564
+ summary: Telegram webhook
7565
+ description: Public webhook endpoint for receiving Telegram bot updates.
7566
+ operationId: telegramWebhook
7567
+ security: []
7568
+ parameters:
7569
+ - name: webhook_path
7570
+ in: path
7571
+ required: true
7572
+ schema:
7573
+ type: string
7574
+ requestBody:
7575
+ required: true
7576
+ content:
7577
+ application/json:
7578
+ schema:
7579
+ type: object
7580
+ responses:
7581
+ "200":
7582
+ description: Webhook processed
7583
+
7584
+ /v1/webhooks/whatsapp/{webhook_path}:
7585
+ get:
7586
+ tags: [Agent Channels]
7587
+ summary: WhatsApp webhook verification
7588
+ description: Verification endpoint for WhatsApp Cloud API webhook setup.
7589
+ operationId: whatsappWebhookVerify
7590
+ security: []
7591
+ parameters:
7592
+ - name: webhook_path
7593
+ in: path
7594
+ required: true
7595
+ schema:
7596
+ type: string
7597
+ - name: hub.mode
7598
+ in: query
7599
+ schema:
7600
+ type: string
7601
+ - name: hub.verify_token
7602
+ in: query
7603
+ schema:
7604
+ type: string
7605
+ - name: hub.challenge
7606
+ in: query
7607
+ schema:
7608
+ type: string
7609
+ responses:
7610
+ "200":
7611
+ description: Challenge response
7612
+ post:
7613
+ tags: [Agent Channels]
7614
+ summary: WhatsApp webhook
7615
+ description: Public webhook endpoint for receiving WhatsApp Cloud API events.
7616
+ operationId: whatsappWebhook
7617
+ security: []
7618
+ parameters:
7619
+ - name: webhook_path
7620
+ in: path
7621
+ required: true
7622
+ schema:
7623
+ type: string
7624
+ requestBody:
7625
+ required: true
7626
+ content:
7627
+ application/json:
7628
+ schema:
7629
+ type: object
7630
+ responses:
7631
+ "200":
7632
+ description: Webhook processed
7633
+
7634
+ /v1/webhooks/discord/{webhook_path}:
7635
+ post:
7636
+ tags: [Agent Channels]
7637
+ summary: Discord webhook
7638
+ description: Public webhook endpoint for receiving Discord bot interactions.
7639
+ operationId: discordWebhook
7640
+ security: []
7641
+ parameters:
7642
+ - name: webhook_path
7643
+ in: path
7644
+ required: true
7645
+ schema:
7646
+ type: string
7647
+ requestBody:
7648
+ required: true
7649
+ content:
7650
+ application/json:
7651
+ schema:
7652
+ type: object
7653
+ responses:
7654
+ "200":
7655
+ description: Webhook processed
7656
+
7286
7657
  # =============================================================================
7287
7658
  # COMPONENTS
7288
7659
  # =============================================================================
@@ -13215,3 +13586,217 @@ components:
13215
13586
  type: array
13216
13587
  items:
13217
13588
  type: string
13589
+
13590
+ # ── Agent Chat ────────────────────────────────────────────────
13591
+
13592
+ SendChatMessageRequest:
13593
+ type: object
13594
+ required: [message]
13595
+ properties:
13596
+ message:
13597
+ type: string
13598
+ conversation_id:
13599
+ type: string
13600
+ format: uuid
13601
+ mode:
13602
+ type: string
13603
+ model:
13604
+ type: string
13605
+ provider:
13606
+ type: string
13607
+ system_prompt:
13608
+ type: string
13609
+
13610
+ ChatMessageResponse:
13611
+ type: object
13612
+ properties:
13613
+ id:
13614
+ type: string
13615
+ format: uuid
13616
+ conversation_id:
13617
+ type: string
13618
+ format: uuid
13619
+ role:
13620
+ type: string
13621
+ content:
13622
+ type: string
13623
+ tool_calls: {}
13624
+ tool_results: {}
13625
+ tokens_prompt:
13626
+ type: integer
13627
+ tokens_completion:
13628
+ type: integer
13629
+ model:
13630
+ type: string
13631
+ created_at:
13632
+ type: string
13633
+ format: date-time
13634
+
13635
+ ChatConversationResponse:
13636
+ type: object
13637
+ properties:
13638
+ id:
13639
+ type: string
13640
+ format: uuid
13641
+ agent_id:
13642
+ type: string
13643
+ format: uuid
13644
+ title:
13645
+ type: string
13646
+ mode:
13647
+ type: string
13648
+ model:
13649
+ type: string
13650
+ provider:
13651
+ type: string
13652
+ created_at:
13653
+ type: string
13654
+ format: date-time
13655
+ updated_at:
13656
+ type: string
13657
+ format: date-time
13658
+
13659
+ ChatConversationListResponse:
13660
+ type: object
13661
+ properties:
13662
+ conversations:
13663
+ type: array
13664
+ items:
13665
+ $ref: "#/components/schemas/ChatConversationResponse"
13666
+
13667
+ ConversationDetailResponse:
13668
+ type: object
13669
+ properties:
13670
+ conversation:
13671
+ $ref: "#/components/schemas/ChatConversationResponse"
13672
+ messages:
13673
+ type: array
13674
+ items:
13675
+ $ref: "#/components/schemas/ChatMessageResponse"
13676
+
13677
+ SendChatMessageResponse:
13678
+ type: object
13679
+ properties:
13680
+ conversation_id:
13681
+ type: string
13682
+ format: uuid
13683
+ message:
13684
+ $ref: "#/components/schemas/ChatMessageResponse"
13685
+
13686
+ # ── Agent Channels ────────────────────────────────────────────
13687
+
13688
+ CreateChannelRequest:
13689
+ type: object
13690
+ required: [channel_type, config]
13691
+ properties:
13692
+ channel_type:
13693
+ type: string
13694
+ enum: [telegram, whatsapp, discord]
13695
+ channel_name:
13696
+ type: string
13697
+ config:
13698
+ type: object
13699
+ additionalProperties:
13700
+ type: string
13701
+ description: |
13702
+ Platform-specific config.
13703
+ Telegram: { bot_token }.
13704
+ WhatsApp: { phone_number_id, access_token, verify_token }.
13705
+ Discord: { bot_token, application_id }.
13706
+
13707
+ UpdateChannelRequest:
13708
+ type: object
13709
+ properties:
13710
+ channel_name:
13711
+ type: string
13712
+ is_active:
13713
+ type: boolean
13714
+ config:
13715
+ type: object
13716
+ additionalProperties:
13717
+ type: string
13718
+
13719
+ ChannelResponse:
13720
+ type: object
13721
+ properties:
13722
+ id:
13723
+ type: string
13724
+ format: uuid
13725
+ org_id:
13726
+ type: string
13727
+ format: uuid
13728
+ agent_id:
13729
+ type: string
13730
+ format: uuid
13731
+ channel_type:
13732
+ type: string
13733
+ enum: [telegram, whatsapp, discord]
13734
+ channel_name:
13735
+ type: string
13736
+ webhook_path:
13737
+ type: string
13738
+ webhook_url:
13739
+ type: string
13740
+ is_active:
13741
+ type: boolean
13742
+ created_at:
13743
+ type: string
13744
+ format: date-time
13745
+ updated_at:
13746
+ type: string
13747
+ format: date-time
13748
+
13749
+ ChannelListResponse:
13750
+ type: object
13751
+ properties:
13752
+ channels:
13753
+ type: array
13754
+ items:
13755
+ $ref: "#/components/schemas/ChannelResponse"
13756
+
13757
+ SendChannelMessageRequest:
13758
+ type: object
13759
+ required: [external_chat_id, content]
13760
+ properties:
13761
+ external_chat_id:
13762
+ type: string
13763
+ description: External platform chat/user ID
13764
+ content:
13765
+ type: string
13766
+ reply_to:
13767
+ type: string
13768
+ description: External message ID to reply to
13769
+
13770
+ ChannelMessageResponse:
13771
+ type: object
13772
+ properties:
13773
+ id:
13774
+ type: string
13775
+ format: uuid
13776
+ channel_id:
13777
+ type: string
13778
+ format: uuid
13779
+ direction:
13780
+ type: string
13781
+ enum: [inbound, outbound]
13782
+ external_chat_id:
13783
+ type: string
13784
+ external_message_id:
13785
+ type: string
13786
+ sender_name:
13787
+ type: string
13788
+ content:
13789
+ type: string
13790
+ media_url:
13791
+ type: string
13792
+ created_at:
13793
+ type: string
13794
+ format: date-time
13795
+
13796
+ ChannelMessageListResponse:
13797
+ type: object
13798
+ properties:
13799
+ messages:
13800
+ type: array
13801
+ items:
13802
+ $ref: "#/components/schemas/ChannelMessageResponse"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1claw/openapi-spec",
3
- "version": "0.42.0",
3
+ "version": "0.43.0",
4
4
  "description": "OpenAPI 3.1.0 specification for the 1Claw Vault API \u2014 generate clients in any language",
5
5
  "license": "MIT",
6
6
  "repository": {