{"openapi":"3.1.0","info":{"title":"LogiShell Connect preview","version":"0.1.0","description":"Explicit JSON exchanges only. No account-wide API access. Obtain a one-hour opaque token through the first-party PKCE consent flow at /connect/authorize. SDK is a source preview."},"servers":[{"url":"https://app.logishell.com"}],"security":[{"ConnectBearer":[]}],"components":{"securitySchemes":{"ConnectBearer":{"type":"http","scheme":"bearer","description":"Opaque connection token, scoped to a person, product, grant and environment. Not an owner or personal MCP token."}}},"paths":{"/api/connect/v1/exchanges":{"get":{"operationId":"list_exchanges","summary":"Read selected exchanges (exchanges:read)","parameters":[{"name":"after","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"agent","in":"query","schema":{"type":"string","maxLength":48},"description":"Only exchanges addressed to this agent card"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"exchanges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sequence":{"type":"integer"},"title":{"type":"string"},"payload":{},"result":{},"status":{"enum":["pending","completed"]},"created_at":{"type":"integer","description":"Epoch milliseconds"},"agent":{"type":["string","null"],"description":"The agent card this exchange is addressed to"}},"required":["id","sequence","title","payload","result","status","created_at","agent"]},"maxItems":50},"next_cursor":{"type":["integer","null"]}},"required":["exchanges","next_cursor"]}}}},"401":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"403":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"404":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"429":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"503":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}}}}},"/api/connect/v1/exchanges/{id}":{"get":{"operationId":"get_exchange","summary":"Read one selected exchange (exchanges:read)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sequence":{"type":"integer"},"title":{"type":"string"},"payload":{},"result":{},"status":{"enum":["pending","completed"]},"created_at":{"type":"integer","description":"Epoch milliseconds"},"agent":{"type":["string","null"],"description":"The agent card this exchange is addressed to"}},"required":["id","sequence","title","payload","result","status","created_at","agent"]}}}},"401":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"403":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"404":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"429":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"503":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}}}}},"/api/connect/v1/exchanges/{id}/result":{"post":{"operationId":"submit_result","summary":"Return a JSON result up to 64 KiB (results:write)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"result":{}},"required":["result"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"401":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"403":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"404":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"409":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"413":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"429":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"503":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}}}}},"/api/connect/drafts":{"post":{"operationId":"prepare_draft","security":[],"summary":"Prepare a product profile draft for a person to review. Registers nothing.","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"profile":{"type":"object","properties":{"version":{"const":1},"manifest":{"type":"object","description":"Version 1 product manifest"},"tagline":{"type":"string","maxLength":120},"capabilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","maxLength":80},"summary":{"type":"string","maxLength":240},"needs_approval":{"type":"boolean"}},"required":["id","title","summary","needs_approval"],"additionalProperties":false},"maxItems":20},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","maxLength":80},"role":{"type":"string","maxLength":160},"skills":{"type":"array","items":{"type":"string"},"maxItems":20},"transport":{"enum":["mcp","rest","none"]},"brain":{"enum":["log","claude","own"]}},"required":["id","name","role","skills","transport","brain"],"additionalProperties":false},"maxItems":8}},"required":["version","manifest","capabilities","agents"],"additionalProperties":false}},"required":["profile"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Only the origin is used. Never fetched."},"name":{"type":"string"},"description":{"type":"string"},"openapi":{"type":"object"},"brain":{"enum":["log","claude","own"]}},"required":["url"],"additionalProperties":false}},"required":["source"],"additionalProperties":false}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"draft":{"type":"string"},"review_url":{"type":"string","format":"uri"},"expires_at":{"type":"integer"},"profile":{"type":"object","properties":{"version":{"const":1},"manifest":{"type":"object","description":"Version 1 product manifest"},"tagline":{"type":"string","maxLength":120},"capabilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","maxLength":80},"summary":{"type":"string","maxLength":240},"needs_approval":{"type":"boolean"}},"required":["id","title","summary","needs_approval"],"additionalProperties":false},"maxItems":20},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","maxLength":80},"role":{"type":"string","maxLength":160},"skills":{"type":"array","items":{"type":"string"},"maxItems":20},"transport":{"enum":["mcp","rest","none"]},"brain":{"enum":["log","claude","own"]}},"required":["id","name","role","skills","transport","brain"],"additionalProperties":false},"maxItems":8}},"required":["version","manifest","capabilities","agents"],"additionalProperties":false}},"required":["draft","review_url","expires_at","profile"]}}}},"400":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"413":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"429":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"503":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}}}}},"/api/connect/drafts/{code}":{"get":{"operationId":"get_draft","security":[],"summary":"Read a draft by its review code","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"object","properties":{"version":{"const":1},"manifest":{"type":"object","description":"Version 1 product manifest"},"tagline":{"type":"string","maxLength":120},"capabilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","maxLength":80},"summary":{"type":"string","maxLength":240},"needs_approval":{"type":"boolean"}},"required":["id","title","summary","needs_approval"],"additionalProperties":false},"maxItems":20},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","maxLength":80},"role":{"type":"string","maxLength":160},"skills":{"type":"array","items":{"type":"string"},"maxItems":20},"transport":{"enum":["mcp","rest","none"]},"brain":{"enum":["log","claude","own"]}},"required":["id","name","role","skills","transport","brain"],"additionalProperties":false},"maxItems":8}},"required":["version","manifest","capabilities","agents"],"additionalProperties":false},"expires_at":{"type":"integer"}},"required":["profile","expires_at"]}}}},"404":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}}}}},"/api/connect/products":{"get":{"operationId":"list_products","security":[],"summary":"Products whose owner proved the domain and listed them in LogNet","parameters":[{"name":"q","in":"query","schema":{"type":"string","maxLength":80},"description":"Part of the product name"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","maxItems":24,"items":{"type":"object"}}},"required":["products"]}}}}}}},"/api/connect/products/{client_id}":{"get":{"operationId":"get_product","security":[],"summary":"The public, unverified card of a registered product: manifest, capabilities and agent cards","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string"},"manifest":{"type":"object"},"verified":{"type":"boolean"},"tagline":{"type":"string"},"capabilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","maxLength":80},"summary":{"type":"string","maxLength":240},"needs_approval":{"type":"boolean"}},"required":["id","title","summary","needs_approval"],"additionalProperties":false}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","maxLength":80},"role":{"type":"string","maxLength":160},"skills":{"type":"array","items":{"type":"string"},"maxItems":20},"transport":{"enum":["mcp","rest","none"]},"brain":{"enum":["log","claude","own"]}},"required":["id","name","role","skills","transport","brain"],"additionalProperties":false}}},"required":["client_id","manifest","verified","tagline","capabilities","agents"]}}}},"404":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}}}}},"/api/connect/v1/room":{"get":{"operationId":"read_room","summary":"Read the room of this connection (room:talk)","parameters":[{"name":"after","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","maxItems":50,"items":{"type":"object","properties":{"sequence":{"type":"integer"},"from":{"enum":["person","agent"]},"agent":{"type":["string","null"]},"text":{"type":"string"},"created_at":{"type":"integer"}},"required":["sequence","from","agent","text","created_at"]}},"next_cursor":{"type":["integer","null"]}},"required":["messages","next_cursor"]}}}},"401":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"403":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"404":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"429":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"503":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}}}},"post":{"operationId":"say_in_room","summary":"Write one text message to the room (room:talk)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Up to 4 KiB of plain text"},"agent":{"type":"string","maxLength":48,"description":"An agent card id of this product"}},"required":["text"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"sequence":{"type":"integer"}},"required":["sequence"]}}}},"400":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"401":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"403":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"404":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"409":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"413":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"429":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"503":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}}}}},"/api/connect/oauth/token":{"post":{"operationId":"exchange_code","security":[],"summary":"Exchange a one-time code with PKCE S256","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"grant_type":{"const":"authorization_code"},"client_id":{"type":"string"},"redirect_uri":{"type":"string","format":"uri"},"code":{"type":"string"},"code_verifier":{"type":"string","minLength":43,"maxLength":128}},"required":["grant_type","client_id","redirect_uri","code","code_verifier"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"const":"Bearer"},"expires_in":{"type":"integer"},"scope":{"type":"string"},"grant_id":{"type":"string"}}}}}},"400":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"401":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"403":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"404":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"429":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}},"503":{"description":"A stable error code and a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}}}}}}}