{"openapi":"3.1.1","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"Kinoko API","version":"1.0.0","description":"The self-describing HTTP and WebSocket surface of Kinoko."},"servers":[{"url":"https://kinoko.sh"}],"paths":{"/{project}/{deployment}/{rest}":{"get":{"operationId":"prod.serve","summary":"Serve a production deployment and pass through its application path.","description":"Serve a production deployment and pass through its application path.","parameters":[{"name":"project","in":"path","required":true,"description":"The project identifier or URL slug.","schema":{"type":"string"}},{"name":"deployment","in":"path","required":true,"description":"The deployment name.","schema":{"type":"string"}},{"name":"rest","in":"path","required":true,"description":"An optional slash-prefixed pass-through path at runtime.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[],"servers":[{"url":"https://{org}.apps.kinoko.sh","variables":{"org":{"default":"your-org-slug","description":"The organization's URL slug, set in the console."}}}],"x-kinoko-tail":true},"post":{"operationId":"prod.event","summary":"Deliver an event to a production deployment.","description":"Deliver an event to a production deployment.","parameters":[{"name":"project","in":"path","required":true,"description":"The project identifier or URL slug.","schema":{"type":"string"}},{"name":"deployment","in":"path","required":true,"description":"The deployment name.","schema":{"type":"string"}},{"name":"rest","in":"path","required":true,"description":"An optional slash-prefixed pass-through path at runtime.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[],"servers":[{"url":"https://{org}.apps.kinoko.sh","variables":{"org":{"default":"your-org-slug","description":"The organization's URL slug, set in the console."}}}],"x-kinoko-tail":true}},"/health":{"get":{"operationId":"health","summary":"Check platform availability.","description":"Check platform availability.","parameters":[],"responses":{"200":{"description":"Successful response","content":{"text/plain":{"schema":{"type":"string"}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[],"servers":[{"url":"https://kinoko.sh"}]}},"/openapi.json":{"get":{"operationId":"openapi","summary":"Describe the live Kinoko HTTP and WebSocket surface.","description":"Describe the live Kinoko HTTP and WebSocket surface.","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"openapi":{"const":"3.1.1"},"info":{"type":"object"},"servers":{"type":"array"},"paths":{"type":"object"},"components":{"type":"object"}},"required":["openapi","info","servers","paths","components"]}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[],"servers":[{"url":"https://kinoko.sh"}]}},"/mcp":{"post":{"operationId":"mcp","summary":"Handle Model Context Protocol JSON-RPC requests.","description":"Handle Model Context Protocol JSON-RPC requests.","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string"},"method":{"type":"string"},"params":{"type":"object"}},"required":["jsonrpc","method"],"additionalProperties":false}}}}}},"/api/keys":{"get":{"operationId":"keys.list","summary":"List API keys for the verified organization.","description":"List API keys for the verified organization.","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object"}}},"required":["keys"]}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}]},"post":{"operationId":"keys.create","summary":"Create an API key for the verified organization.","description":"Create an API key for the verified organization.","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"}},"required":["id","key"]}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"}},"additionalProperties":false}}}}}},"/api/keys/{key}/revoke":{"post":{"operationId":"keys.revoke","summary":"Revoke an API key.","description":"Revoke an API key.","parameters":[{"name":"key","in":"path","required":true,"description":"The API key identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}]}},"/api/projects":{"get":{"operationId":"projects.list","summary":"List projects for the verified organization.","description":"List projects for the verified organization.","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"object"}}},"required":["projects"]}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}]},"post":{"operationId":"projects.create","summary":"Create a project for the verified organization.","description":"Create a project for the verified organization.","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}}}}}},"/api/projects/{project}/envs":{"get":{"operationId":"envs.list","summary":"List environments in a project.","description":"List environments in a project.","parameters":[{"name":"project","in":"path","required":true,"description":"The project identifier or URL slug.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"environments":{"type":"array","items":{"type":"object"}}},"required":["environments"]}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}]},"post":{"operationId":"envs.create","summary":"Create an environment in a project.","description":"Create an environment in a project.","parameters":[{"name":"project","in":"path","required":true,"description":"The project identifier or URL slug.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}}}}}},"/app/{env}/{app}":{"get":{"operationId":"app.page","summary":"Open an environment application page.","description":"Open an environment application page.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}},{"name":"app","in":"path","required":true,"description":"The application name inside the environment.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"text/html":{"schema":{"type":"string"}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[],"servers":[{"url":"https://kinoko.sh"}]}},"/app/{env}/{app}/ws":{"get":{"operationId":"app.socket","summary":"Open the LiveView application socket.","description":"Open the LiveView application socket.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}},{"name":"app","in":"path","required":true,"description":"The application name inside the environment.","schema":{"type":"string"}}],"responses":{"101":{"description":"Switching Protocols"},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}]}},"/api/org/slug":{"post":{"operationId":"org.slug","summary":"Set the verified organization's public slug.","description":"Set the verified organization's public slug.","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}}}}}},"/api/deployments":{"get":{"operationId":"deployments.list","summary":"List deployments for the verified organization.","description":"List deployments for the verified organization.","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"suffix":{"type":"string"},"slug":{"type":["string","null"]},"deployments":{"type":"array","items":{"type":"object"}}},"required":["deployments"]}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}]},"post":{"operationId":"deployments.create","summary":"Create a deployment slot for the verified organization.","description":"Create a deployment slot for the verified organization.","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"name":{"type":"string"},"projectSlug":{"type":"string"},"defaultApp":{"type":"string"}},"required":["projectId","name"],"additionalProperties":false}}}}}},"/api/prs":{"get":{"operationId":"prs.list","summary":"List proposals for the verified organization.","description":"List proposals for the verified organization.","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"proposals":{"type":"array","items":{"type":"object"}}},"required":["proposals"]}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}]},"post":{"operationId":"prs.create","summary":"Open a proposal between two environments.","description":"Open a proposal between two environments.","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"}},"required":["project","from","to","title"],"additionalProperties":false}}}}}},"/api/prs/{proposal}/review":{"get":{"operationId":"prs.review","summary":"Review a proposal's graph changes.","description":"Review a proposal's graph changes.","parameters":[{"name":"proposal","in":"path","required":true,"description":"The proposal identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}]}},"/api/prs/{proposal}/merge":{"post":{"operationId":"prs.merge","summary":"Merge an approved proposal into its target environment.","description":"Merge an approved proposal into its target environment.","parameters":[{"name":"proposal","in":"path","required":true,"description":"The proposal identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}]}},"/env/{env}/decisions":{"get":{"operationId":"decisions.list","summary":"List an environment's recorded decisions.","description":"List an environment's recorded decisions.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"decisions":{"type":"array","items":{"type":"object"}}},"required":["decisions"]}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}]}},"/env/{env}/decisions/{decision}":{"post":{"operationId":"decisions.correct","summary":"Correct a recorded environment decision.","description":"Correct a recorded environment decision.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}},{"name":"decision","in":"path","required":true,"description":"The decision identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"correction":{"type":"string"}},"required":["correction"],"additionalProperties":false}}}}}},"/env/{env}/events":{"get":{"operationId":"env.events","summary":"Open the environment change event stream.","description":"Open the environment change event stream.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}}],"responses":{"101":{"description":"Switching Protocols"},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}]}},"/env/{env}/{op}":{"get":{"operationId":"repl.read","summary":"Read an environment through its REPL operation.","description":"Read an environment through its REPL operation.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}},{"name":"op","in":"path","required":true,"description":"The REPL operation name.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}]},"post":{"operationId":"repl.write","summary":"Write to an environment through its REPL operation.","description":"Write to an environment through its REPL operation.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}},{"name":"op","in":"path","required":true,"description":"The REPL operation name.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/env/{env}/symbols":{"get":{"operationId":"tool_symbols","summary":"List every committed symbol (name + signature) in the environment.","description":"List every committed symbol (name + signature) in the environment.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"x-kinoko-tool":"symbols"}},"/env/{env}/search":{"get":{"operationId":"tool_search","summary":"Find committed symbols whose name or SOURCE matches the query — discover what exists before writing.","description":"Find committed symbols whose name or SOURCE matches the query — discover what exists before writing.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}},{"name":"query","in":"query","required":true,"description":"The query argument.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"x-kinoko-tool":"search"}},"/env/{env}/read":{"post":{"operationId":"tool_read","summary":"The full current source of committed decls (a patch replaces them whole).","description":"The full current source of committed decls (a patch replaces them whole).","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"x-kinoko-tool":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string"}}},"required":["names"],"additionalProperties":false}}}}}},"/env/{env}/deps":{"get":{"operationId":"tool_deps","summary":"What a symbol uses, and what uses it — usedBy is the blast radius a change must keep type-correct.","description":"What a symbol uses, and what uses it — usedBy is the blast radius a change must keep type-correct.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}},{"name":"name","in":"query","required":true,"description":"The name argument.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"x-kinoko-tool":"deps"}},"/env/{env}/graph":{"get":{"operationId":"tool_graph","summary":"The map: symbols, dependency edges, stores and data flow.","description":"The map: symbols, dependency edges, stores and data flow.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"x-kinoko-tool":"graph"}},"/env/{env}/staged":{"get":{"operationId":"tool_list_staged","summary":"Patches still staged, each with the type-error reasons it cannot promote.","description":"Patches still staged, each with the type-error reasons it cannot promote.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"x-kinoko-tool":"list_staged"}},"/env/{env}/stage_patch":{"post":{"operationId":"tool_stage_patch","summary":"Stage a patch of Yabu source (all the decls that change together). Returns promoted + precise type-error reasons — the instant typecheck loop. A promoted patch becomes one step in the environment history, so name it for ONE intent and say what it does in message.","description":"Stage a patch of Yabu source (all the decls that change together). Returns promoted + precise type-error reasons — the instant typecheck loop. A promoted patch becomes one step in the environment history, so name it for ONE intent and say what it does in message.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"x-kinoko-tool":"stage_patch","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"patch":{"type":"string","description":"a short id naming one intent; restage the same id to iterate"},"source":{"type":"string"},"message":{"type":"string","description":"what this change does, for whoever reviews it"},"tombstones":{"type":"array","items":{"type":"string"}}},"required":["patch","source"],"additionalProperties":false}}}}}},"/env/{env}/unstage":{"post":{"operationId":"tool_unstage","summary":"Remove a staged patch.","description":"Remove a staged patch.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"x-kinoko-tool":"unstage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"patch":{"type":"string"}},"required":["patch"],"additionalProperties":false}}}}}},"/env/{env}/simulate":{"post":{"operationId":"tool_simulate","summary":"Seeded property/reachability simulation over an app's messages, effects included.","description":"Seeded property/reachability simulation over an app's messages, effects included.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"x-kinoko-tool":"simulate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app":{"type":"string"}},"required":["app"],"additionalProperties":false}}}}}},"/env/{env}/call":{"post":{"operationId":"tool_eval","summary":"Run a committed def in the sandbox and return its value.","description":"Run a committed def in the sandbox and return its value.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"x-kinoko-tool":"eval","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}}}}}},"/env/{env}/store_list":{"get":{"operationId":"tool_store_query","summary":"The persisted rows of a store model.","description":"The persisted rows of a store model.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}},{"name":"model","in":"query","required":true,"description":"The model argument.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"x-kinoko-tool":"store_query"}},"/env/{env}/send":{"post":{"operationId":"tool_send","summary":"Dispatch a message to a live app; returns its new model. msg is a variant value, e.g. {\"$v\":\"App.Msg.Add\",\"a\":[]}.","description":"Dispatch a message to a live app; returns its new model. msg is a variant value, e.g. {\"$v\":\"App.Msg.Add\",\"a\":[]}.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"x-kinoko-tool":"send","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app":{"type":"string"},"msg":{"type":"object"}},"required":["app","msg"],"additionalProperties":false}}}}}},"/env/{env}/deploys":{"get":{"operationId":"tool_deploys","summary":"The committed assembly's module cid (`current`, what `promote` requires) and its app list (what a deployment's default app is chosen from).","description":"The committed assembly's module cid (`current`, what `promote` requires) and its app list (what a deployment's default app is chosen from).","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"x-kinoko-tool":"deploys"}},"/env/{env}/promote":{"post":{"operationId":"tool_promote","summary":"Publish the committed assembly INTO a deployment (create it first with `create_deployment`). `cid` must be the module cid you reviewed (see `deploys`.current) — anything else is refused, so what ships is exactly what was looked at. Serves at <org-slug>.apps.kinoko.sh/<project>/<deployment>.","description":"Publish the committed assembly INTO a deployment (create it first with `create_deployment`). `cid` must be the module cid you reviewed (see `deploys`.current) — anything else is refused, so what ships is exactly what was looked at. Serves at <org-slug>.apps.kinoko.sh/<project>/<deployment>.","parameters":[{"name":"env","in":"path","required":true,"description":"The organization-scoped environment identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"4XX":{"description":"Client failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}},"security":[{"ClerkSession":[]},{"KinokoApiKey":[]}],"servers":[{"url":"https://kinoko.sh"}],"x-kinoko-tool":"promote","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cid":{"type":"string","description":"the module cid to publish, from `deploys`.current"},"project":{"type":"string","description":"the project SLUG the deployment lives under"},"deployment":{"type":"string"},"default_app":{"type":"string","description":"served on the bare deployment path"}},"required":["cid","project","deployment"],"additionalProperties":false}}}}}}},"components":{"schemas":{"Failure":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","not_found","method_not_allowed","conflict","internal"]},"hint":{"type":"string"}},"required":["error","code"],"additionalProperties":false}},"securitySchemes":{"KinokoApiKey":{"type":"http","scheme":"bearer","description":"A long-lived Kinoko organization API key."},"ClerkSession":{"type":"http","scheme":"bearer","description":"A Clerk session bearer token with an active organization."}}}}