{"openapi":"3.1.0","info":{"title":"ClaimFS API","version":"0.4.0","description":"Instant cloud filesystems for AI agents."},"servers":[{"url":"https://www.claimfs.com"}],"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer"},"FilesystemGrant":{"type":"apiKey","in":"header","name":"X-ClaimFS-Grant"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"string"}},"required":["success","error"],"additionalProperties":{}}},"parameters":{}},"paths":{"/api/commands":{"get":{"operationId":"listCliCommands","responses":{"200":{"description":"CLI command metadata","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"install":{"type":"object","properties":{"command":{"type":"string"},"path":{"type":"string"},"requires":{"type":"array","items":{"type":"string"}}},"required":["command","path","requires"]},"commands":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"usage":{"type":"string"},"summary":{"type":"string"}},"required":["name","usage","summary"],"additionalProperties":{}}}},"required":["success","install","commands"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/status":{"get":{"operationId":"getStatus","responses":{"200":{"description":"Service status and limits","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"status":{"type":"string"},"checks":{"type":"object","additionalProperties":{}},"limits":{"type":"object","additionalProperties":{}}},"required":["success","status","checks","limits"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/auth/agent/request-code":{"post":{"operationId":"requestAgentLoginCode","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"]}}}},"responses":{"200":{"description":"Agent login code requested","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"email":{"type":"string"},"expiresInSeconds":{"type":"number"},"delivery":{"type":"string"},"code":{"type":"string"},"warning":{"type":"string"}},"required":["success","email","expiresInSeconds","delivery","code","warning"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/auth/agent/verify-code":{"post":{"operationId":"verifyAgentLoginCode","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"code":{"type":"string","minLength":1}},"required":["email","code"]}}}},"responses":{"200":{"description":"API key created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"account":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"}},"required":["id","email"]},"apiKey":{"type":"string"},"credentialsPath":{"type":"string"},"warning":{"type":"string"}},"required":["success","account","apiKey","credentialsPath","warning"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/filesystems":{"get":{"operationId":"listFilesystems","responses":{"200":{"description":"List filesystems","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"filesystems":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"anonymous":{"type":"boolean"},"ownerAccountId":{"type":["string","null"]},"description":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"accessPolicy":{"type":"string","enum":["grant","public-read"]},"currentCheckpointId":{"type":["string","null"]},"dirty":{"type":"boolean"},"lastFinalizedAt":{"type":["string","null"]},"claimedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","name","status","anonymous","ownerAccountId","description","tags","accessPolicy","currentCheckpointId","dirty","lastFinalizedAt","claimedAt","expiresAt","createdAt","updatedAt"]}}},"required":["success","filesystems"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"createFilesystem","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"ttlHours":{"type":"integer","minimum":1,"maximum":168}}}}}},"responses":{"201":{"description":"Filesystem created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"filesystem":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"anonymous":{"type":"boolean"},"ownerAccountId":{"type":["string","null"]},"description":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"accessPolicy":{"type":"string","enum":["grant","public-read"]},"currentCheckpointId":{"type":["string","null"]},"dirty":{"type":"boolean"},"lastFinalizedAt":{"type":["string","null"]},"claimedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","name","status","anonymous","ownerAccountId","description","tags","accessPolicy","currentCheckpointId","dirty","lastFinalizedAt","claimedAt","expiresAt","createdAt","updatedAt"]},"claimToken":{"type":["string","null"]},"claimUrl":{"type":["string","null"]},"accessToken":{"type":["string","null"]},"commands":{"type":"object","properties":{"exec":{"type":"string"},"mount":{"type":"string"},"mountOpen":{"type":"string"},"unmount":{"type":"string"}},"required":["exec","mount","mountOpen","unmount"]},"warning":{"type":"string"}},"required":["success","filesystem","claimToken","claimUrl","accessToken","commands","warning"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/filesystems/{slug}":{"get":{"operationId":"getFilesystem","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Get filesystem metadata","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"filesystem":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"anonymous":{"type":"boolean"},"ownerAccountId":{"type":["string","null"]},"description":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"accessPolicy":{"type":"string","enum":["grant","public-read"]},"currentCheckpointId":{"type":["string","null"]},"dirty":{"type":"boolean"},"lastFinalizedAt":{"type":["string","null"]},"claimedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","name","status","anonymous","ownerAccountId","description","tags","accessPolicy","currentCheckpointId","dirty","lastFinalizedAt","claimedAt","expiresAt","createdAt","updatedAt"]}},"required":["success","filesystem"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"operationId":"updateFilesystem","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"ttlSeconds":{"type":["integer","null"],"exclusiveMinimum":0},"tags":{"type":"array","items":{"type":"string"}},"accessPolicy":{"type":"string","enum":["grant","public-read"]}}}}}},"responses":{"200":{"description":"Filesystem updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"filesystem":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"anonymous":{"type":"boolean"},"ownerAccountId":{"type":["string","null"]},"description":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"accessPolicy":{"type":"string","enum":["grant","public-read"]},"currentCheckpointId":{"type":["string","null"]},"dirty":{"type":"boolean"},"lastFinalizedAt":{"type":["string","null"]},"claimedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","name","status","anonymous","ownerAccountId","description","tags","accessPolicy","currentCheckpointId","dirty","lastFinalizedAt","claimedAt","expiresAt","createdAt","updatedAt"]}},"required":["success","filesystem"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"deleteFilesystem","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Filesystem deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/filesystems/{slug}/claim":{"post":{"operationId":"claimFilesystem","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"claimToken":{"type":"string","minLength":1}},"required":["claimToken"]}}}},"responses":{"200":{"description":"Filesystem claimed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"filesystem":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"anonymous":{"type":"boolean"},"ownerAccountId":{"type":["string","null"]},"description":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"accessPolicy":{"type":"string","enum":["grant","public-read"]},"currentCheckpointId":{"type":["string","null"]},"dirty":{"type":"boolean"},"lastFinalizedAt":{"type":["string","null"]},"claimedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","name","status","anonymous","ownerAccountId","description","tags","accessPolicy","currentCheckpointId","dirty","lastFinalizedAt","claimedAt","expiresAt","createdAt","updatedAt"]}},"required":["success","filesystem"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/filesystems/{slug}/exec":{"post":{"operationId":"execFilesystem","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"type":"string","minLength":1},"cwd":{"type":"string"},"checkoutPath":{"type":["string","null"]},"checkout":{"type":"boolean"},"checkin":{"type":"boolean"}},"required":["command"]}}}},"responses":{"200":{"description":"Command executed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"exitCode":{"type":"number"},"stdout":{"type":"string"},"stderr":{"type":"string"},"timing":{"type":"object","properties":{"totalMs":{"type":"number"},"queueMs":{"type":"number"},"executeMs":{"type":"number"}}}},"required":["exitCode","stdout","stderr"]}},"required":["success","data"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/filesystems/{slug}/mount":{"get":{"operationId":"createMountGrant","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string"},"required":false,"name":"path","in":"query"}],"responses":{"200":{"description":"Mount material","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"mount":{"type":"object","properties":{"slug":{"type":"string"},"driver":{"type":"string","enum":["claimfs-native"]},"url":{"type":"string"},"shared":{"type":"boolean"},"expiresAt":{"type":["string","null"]}},"required":["slug","driver","url","shared","expiresAt"]}},"required":["success","mount"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/filesystems/{slug}/files":{"get":{"operationId":"readFilesystemPath","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string"},"required":false,"name":"path","in":"query"},{"schema":{"type":"string","enum":["read","stat"]},"required":false,"name":"op","in":"query"},{"schema":{"type":"string","enum":["text","base64"]},"required":false,"name":"encoding","in":"query"},{"schema":{"type":["boolean","null"]},"required":false,"name":"all","in":"query"},{"schema":{"type":["boolean","null"]},"required":false,"name":"includeHidden","in":"query"},{"schema":{"type":["boolean","null"]},"required":false,"name":"recursive","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":64},"required":false,"name":"depth","in":"query"}],"responses":{"200":{"description":"List, read, or stat files","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"kind":{"type":"string","enum":["list"]},"path":{"type":"string"},"entries":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"type":{"type":"string","enum":["file","directory","other"]},"size":{"type":"number"},"mtime":{"type":"number"},"mtimeIso":{"type":"string"}},"required":["name","path","type","size","mtime","mtimeIso"]}}},"required":["success","kind","path","entries"],"additionalProperties":{}},{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"kind":{"type":"string","enum":["read"]},"file":{"type":"object","properties":{"path":{"type":"string"},"encoding":{"type":"string","enum":["text","base64"]},"content":{"type":"string"}},"required":["path","encoding","content"]}},"required":["success","kind","file"],"additionalProperties":{}},{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"kind":{"type":"string","enum":["stat"]},"stat":{"type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"type":{"type":"string","enum":["file","directory","other"]},"size":{"type":"number"},"mtime":{"type":"number"},"mtimeIso":{"type":"string"}},"required":["name","path","type","size","mtime","mtimeIso"]}},"required":["success","kind","stat"],"additionalProperties":{}}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"operationId":"writeFilesystemFile","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","minLength":1},"content":{"type":"string"},"encoding":{"type":"string","enum":["text","base64"]},"createParents":{"type":"boolean"}},"required":["path","content"]}}}},"responses":{"200":{"description":"File written","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"path":{"type":"string"}},"required":["success","path"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"deleteFilesystemFile","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"path","in":"query"}],"responses":{"200":{"description":"File deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"path":{"type":"string"},"targetPath":{"type":["string","null"]}},"required":["success","path","targetPath"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"mutateFilesystemPath","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["mkdir","delete","move","copy"]},"path":{"type":"string","minLength":1},"targetPath":{"type":"string","minLength":1}},"required":["action","path"]}}}},"responses":{"200":{"description":"Path mutated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"path":{"type":"string"},"targetPath":{"type":["string","null"]}},"required":["success","path","targetPath"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/filesystems/{slug}/events":{"get":{"operationId":"listFilesystemEvents","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Filesystem events","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filesystemSlug":{"type":["string","null"]},"type":{"type":"string"},"message":{"type":"string"},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","filesystemSlug","type","message","metadata","createdAt"]}}},"required":["success","events"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/filesystems/{slug}/feedback":{"post":{"operationId":"submitFilesystemFeedback","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":4000},"category":{"type":"string","enum":["blocked","bug","docs","missing-feature","confusing","performance","security","other"]},"severity":{"type":"string","enum":["note","low","medium","high","critical"]},"tryingToDo":{"type":"string","maxLength":2000},"whatTried":{"type":"string","maxLength":4000},"blockedOn":{"type":"string","maxLength":2000},"suggestedFix":{"type":"string","maxLength":2000},"agent":{"type":"string","maxLength":200},"tool":{"type":"string","maxLength":200},"traceId":{"type":"string","maxLength":200},"path":{"type":"string","maxLength":1000},"metadata":{"type":"object","additionalProperties":{}}},"required":["message"]}}}},"responses":{"201":{"description":"Feedback submitted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"feedback":{"type":"object","properties":{"id":{"type":"string"},"filesystemSlug":{"type":"string"},"category":{"type":"string","enum":["blocked","bug","docs","missing-feature","confusing","performance","security","other"]},"severity":{"type":"string","enum":["note","low","medium","high","critical"]},"message":{"type":"string"},"tryingToDo":{"type":["string","null"]},"whatTried":{"type":["string","null"]},"blockedOn":{"type":["string","null"]},"suggestedFix":{"type":["string","null"]},"agent":{"type":["string","null"]},"tool":{"type":["string","null"]},"traceId":{"type":["string","null"]},"path":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"submittedByAccountId":{"type":["string","null"]},"submittedByGrantId":{"type":["string","null"]},"submittedByGrantLabel":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","filesystemSlug","category","severity","message","tryingToDo","whatTried","blockedOn","suggestedFix","agent","tool","traceId","path","metadata","submittedByAccountId","submittedByGrantId","submittedByGrantLabel","createdAt"]}},"required":["success","feedback"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"operationId":"listFilesystemFeedback","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Filesystem feedback","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"feedback":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filesystemSlug":{"type":"string"},"category":{"type":"string","enum":["blocked","bug","docs","missing-feature","confusing","performance","security","other"]},"severity":{"type":"string","enum":["note","low","medium","high","critical"]},"message":{"type":"string"},"tryingToDo":{"type":["string","null"]},"whatTried":{"type":["string","null"]},"blockedOn":{"type":["string","null"]},"suggestedFix":{"type":["string","null"]},"agent":{"type":["string","null"]},"tool":{"type":["string","null"]},"traceId":{"type":["string","null"]},"path":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"submittedByAccountId":{"type":["string","null"]},"submittedByGrantId":{"type":["string","null"]},"submittedByGrantLabel":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","filesystemSlug","category","severity","message","tryingToDo","whatTried","blockedOn","suggestedFix","agent","tool","traceId","path","metadata","submittedByAccountId","submittedByGrantId","submittedByGrantLabel","createdAt"]}}},"required":["success","feedback"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/filesystems/{slug}/checkpoints":{"get":{"operationId":"listFilesystemCheckpoints","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"List checkpoints","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"checkpoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filesystemSlug":{"type":"string"},"label":{"type":"string"},"archivePath":{"type":"string"},"manifest":{"type":"array","items":{"type":"object","additionalProperties":{}}},"sizeBytes":{"type":["number","null"]},"createdAt":{"type":"string"}},"required":["id","filesystemSlug","label","archivePath","manifest","sizeBytes","createdAt"]}}},"required":["success","checkpoints"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"createFilesystemCheckpoint","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1}}}}}},"responses":{"201":{"description":"Checkpoint created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"checkpoint":{"type":"object","properties":{"id":{"type":"string"},"filesystemSlug":{"type":"string"},"label":{"type":"string"},"archivePath":{"type":"string"},"manifest":{"type":"array","items":{"type":"object","additionalProperties":{}}},"sizeBytes":{"type":["number","null"]},"createdAt":{"type":"string"}},"required":["id","filesystemSlug","label","archivePath","manifest","sizeBytes","createdAt"]}},"required":["success","checkpoint"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/filesystems/{slug}/checkpoints/{checkpointId}/restore":{"post":{"operationId":"restoreFilesystemCheckpoint","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"checkpointId","in":"path"}],"responses":{"200":{"description":"Checkpoint restored","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"filesystem":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"anonymous":{"type":"boolean"},"ownerAccountId":{"type":["string","null"]},"description":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"accessPolicy":{"type":"string","enum":["grant","public-read"]},"currentCheckpointId":{"type":["string","null"]},"dirty":{"type":"boolean"},"lastFinalizedAt":{"type":["string","null"]},"claimedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","name","status","anonymous","ownerAccountId","description","tags","accessPolicy","currentCheckpointId","dirty","lastFinalizedAt","claimedAt","expiresAt","createdAt","updatedAt"]}},"required":["success","filesystem"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/filesystems/{slug}/duplicate":{"post":{"operationId":"duplicateFilesystem","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1}}}}}},"responses":{"201":{"description":"Small workspace duplicated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"sourceSlug":{"type":"string"},"filesystem":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"anonymous":{"type":"boolean"},"ownerAccountId":{"type":["string","null"]},"description":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"accessPolicy":{"type":"string","enum":["grant","public-read"]},"currentCheckpointId":{"type":["string","null"]},"dirty":{"type":"boolean"},"lastFinalizedAt":{"type":["string","null"]},"claimedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","name","status","anonymous","ownerAccountId","description","tags","accessPolicy","currentCheckpointId","dirty","lastFinalizedAt","claimedAt","expiresAt","createdAt","updatedAt"]},"accessToken":{"type":["string","null"]},"commands":{"type":"object","properties":{"exec":{"type":"string"},"mount":{"type":"string"},"mountOpen":{"type":"string"},"unmount":{"type":"string"}},"required":["exec","mount","mountOpen","unmount"]}},"required":["success","sourceSlug","filesystem","accessToken","commands"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/filesystems/{slug}/grants":{"get":{"operationId":"listFilesystemGrants","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"List grants","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filesystemSlug":{"type":"string"},"label":{"type":"string"},"tokenSuffix":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string","enum":["read","write","mount","exec","delete","duplicate","admin"]}},"pathScope":{"type":"string"},"expiresAt":{"type":["string","null"]},"revokedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"lastUsedAt":{"type":["string","null"]}},"required":["id","filesystemSlug","label","tokenSuffix","capabilities","pathScope","expiresAt","revokedAt","createdAt","lastUsedAt"]}}},"required":["success","grants"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"createFilesystemGrant","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1},"capabilities":{"type":"array","items":{"type":"string","enum":["read","write","mount","exec","delete","duplicate","admin"]}},"pathScope":{"type":"string"},"ttlSeconds":{"type":["integer","null"],"exclusiveMinimum":0}}}}}},"responses":{"201":{"description":"Grant created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"grant":{"type":"object","properties":{"id":{"type":"string"},"filesystemSlug":{"type":"string"},"label":{"type":"string"},"tokenSuffix":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string","enum":["read","write","mount","exec","delete","duplicate","admin"]}},"pathScope":{"type":"string"},"expiresAt":{"type":["string","null"]},"revokedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"lastUsedAt":{"type":["string","null"]}},"required":["id","filesystemSlug","label","tokenSuffix","capabilities","pathScope","expiresAt","revokedAt","createdAt","lastUsedAt"]},"token":{"type":"string"}},"required":["success","grant","token"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/filesystems/{slug}/agents":{"post":{"operationId":"joinAgentWorkspace","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1},"agentId":{"type":"string","minLength":1},"path":{"type":"string","minLength":1},"ttlSeconds":{"type":["integer","null"],"exclusiveMinimum":0}}}}}},"responses":{"201":{"description":"Agent workspace joined","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"agentId":{"type":"string"},"path":{"type":"string"},"grant":{"type":"object","properties":{"id":{"type":"string"},"filesystemSlug":{"type":"string"},"label":{"type":"string"},"tokenSuffix":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string","enum":["read","write","mount","exec","delete","duplicate","admin"]}},"pathScope":{"type":"string"},"expiresAt":{"type":["string","null"]},"revokedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"lastUsedAt":{"type":["string","null"]}},"required":["id","filesystemSlug","label","tokenSuffix","capabilities","pathScope","expiresAt","revokedAt","createdAt","lastUsedAt"]},"token":{"type":"string"},"commands":{"type":"object","properties":{"exec":{"type":"string"},"mount":{"type":"string"},"mountOpen":{"type":"string"},"unmount":{"type":"string"}},"required":["exec","mount","mountOpen","unmount"]}},"required":["success","agentId","path","grant","token","commands"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/filesystems/{slug}/grants/{grantId}":{"delete":{"operationId":"revokeFilesystemGrant","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"grantId","in":"path"}],"responses":{"200":{"description":"Grant revoked","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"webhooks":{}}