@deepraxis/sdk 0.1.1-dev.3aab976 → 0.1.1-dev.3b48b63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,6 +99,24 @@ export const getAgentConsolidation = (options) => (options.client ?? client).get
99
99
  url: '/agent/v1/agents/{agent_id}/consolidations/{consolidation_id}',
100
100
  ...options
101
101
  });
102
+ /**
103
+ * List an assume agent's waiting letters
104
+ *
105
+ * Check whether mail waits for an assume agent without taking it: answers unread, the count of delivered letters the agent has not read, and letters, the newest unread ones (id, sender address, summary, thread, create_time; never the body). Nothing is marked read, so calling it again answers the same until the agent reads its mail with its own inbox tool (praxis_assume_inbox, action "read"). Use it when something outside the agent has to learn that mail arrived: an assume agent is never woken for a letter, so the local `praxis agent support-mcp` polls this to tell its coding agent. {agent_id} takes the agent_… id, the eight character identity number or the handle of an assume agent in your organization; any other kind answers 400 ASSUME_AGENT_REQUIRED. To read or answer the letters, use the agent's inbox tool, not this read. Example: GET /agent/v1/agents/R1M9TQ2X/letters?unread=true&limit=5.
106
+ */
107
+ export const listAgentLetters = (options) => (options.client ?? client).get({
108
+ security: [{
109
+ key: 'BearerAuth',
110
+ scheme: 'bearer',
111
+ type: 'http'
112
+ }, {
113
+ key: 'ApiKeyAuth',
114
+ name: 'X-API-Key',
115
+ type: 'apiKey'
116
+ }],
117
+ url: '/agent/v1/agents/{agent_id}/letters',
118
+ ...options
119
+ });
102
120
  /**
103
121
  * Apply Agent Version
104
122
  *
@@ -803,6 +821,26 @@ export const createSessionArtifactContentUrl = (options) => (options.client ?? c
803
821
  ...options.headers
804
822
  }
805
823
  });
824
+ /**
825
+ * List Session Requests (Extension)
826
+ *
827
+ * List the requests a session is waiting on; an end-customer token reads its own session.
828
+ *
829
+ * Own-face extension. When a session stops at session.status_idle with stop_reason requires_action, read what it waits on here instead of replaying events. Returns { data: Request[] } ordered by create_time, an empty array when nothing is pending, not paginated. Each request has id (the pending tool call id), object (request), kind (question for the ask_user_question tool, approval for any other tool that waits for permission), status (pending), tool_name, input (the same input the agent.tool_use event shows), create_time and expire_time. Answer a request as before: send a user.tool_confirmation event for its id. expire_time is set only for a session with no collaboration mode while the requests-v1 release is on (create_time plus 24 hours; an expired request counts as declined), otherwise null. Answered, expired and superseded requests are not listed, and neither are pending custom tool results (user.custom_tool_result). Whoever may read the session may read its requests; a session that is missing or not yours returns 404.
830
+ */
831
+ export const listSessionRequests = (options) => (options.client ?? client).get({
832
+ security: [{
833
+ key: 'BearerAuth',
834
+ scheme: 'bearer',
835
+ type: 'http'
836
+ }, {
837
+ key: 'ApiKeyAuth',
838
+ name: 'X-API-Key',
839
+ type: 'apiKey'
840
+ }],
841
+ url: '/agent/v1/sessions/{session_id}/requests',
842
+ ...options
843
+ });
806
844
  /**
807
845
  * List Session Background Tasks (Extension)
808
846
  *
@@ -4012,7 +4050,7 @@ export const sessionsArchive = (options) => (options.client ?? client).post({
4012
4050
  /**
4013
4051
  * List session events
4014
4052
  *
4015
- * Read the event history of a session as a page of events, oldest first by default (order=desc for newest first). Use it after sending a message to collect the reply, to find tool calls that wait for approval or client custom tool results (session.status_idle with stop_reason requires_action lists their event_ids), or to audit a run; to follow a running session live use sessions.events.stream instead. Filter by types and by a created_at range on processed_at; pages hold at most 100 events (default 20) and next_page continues. A failed run emits session.error before session.status_terminated. Native history also includes user.steer, user.withdraw, system.notification, session.forked, session.goal_changed and session.goal_verification; these are not accepted by the /anthropic/v1 event-type filter. This operation addresses one session — normally a worker session an agent dispatched; to talk to a personal or general agent itself, use agents.events.list instead. In the path, session_id may also be `main` (your own main session with that agent) or a short session name, and either alias then requires agent_id with the agent_… id, the eight character identity number or the handle; only the own face /agent/v1 accepts an alias, /anthropic/v1 requires a real sesn_… id.
4053
+ * Read the event history of a session as a page of events, oldest first by default (order=desc for newest first). Use it after sending a message to collect the reply, to find tool calls that wait for approval or client custom tool results (session.status_idle with stop_reason requires_action lists their event_ids; a request nobody answered within 24 hours is settled as unanswered and the session goes idle with stop_reason request_expired, which the /anthropic/v1 face shows as end_turn), or to audit a run; to follow a running session live use sessions.events.stream instead. Filter by types and by a created_at range on processed_at; pages hold at most 100 events (default 20) and next_page continues. A failed run emits session.error before session.status_terminated. Native history also includes user.steer, user.withdraw, system.notification, system.notification_suppressed (pending background notifications that hit the wake quota and started no run), system.notification_recorded, session.forked, session.goal_changed and session.goal_verification; these are not accepted by the /anthropic/v1 event-type filter. This operation addresses one session — normally a worker session an agent dispatched; to talk to a personal or general agent itself, use agents.events.list instead. In the path, session_id may also be `main` (your own main session with that agent) or a short session name, and either alias then requires agent_id with the agent_… id, the eight character identity number or the handle; only the own face /agent/v1 accepts an alias, /anthropic/v1 requires a real sesn_… id.
4016
4054
  */
4017
4055
  export const sessionsEventsList = (options) => (options.client ?? client).get({
4018
4056
  security: [{
@@ -7681,6 +7719,12 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
7681
7719
  * - `RippleDeleteRange` — Cut a time range and close the gap.
7682
7720
  * - `DeleteWords` — Cut transcript words and ripple every track, keeping a breath.
7683
7721
  * - `RemoveFillers` — List and delete filler words by media's own labels; dryRun first.
7722
+ * - `Matte` — Replace the clip's background with media's matte of its source, read as a luma mask.
7723
+ * - `EnhanceVoice` — Replace a clip's sound with media's enhanced speech on its own audio track.
7724
+ * - `AlignByAudio` — Line two recordings of the same sound up by media's measurement of their offset.
7725
+ * - `Reframe` — Swap the clip's media for media's reframed take at the aspect you ask for.
7726
+ * - `Upscale` — Swap the clip's media for media's upscaled take at the height you ask for.
7727
+ * - `Redact` — Pixelate the faces, QR codes or text media marks, leaving the rest of the frame plain.
7684
7728
  * - `AddTrack` — Add a video, audio or caption track.
7685
7729
  * - `MoveTrack` — Move a track between layers; 0 is the topmost.
7686
7730
  * - `UpdateTrack` — Change a track's name, lock, gain or role.
@@ -7784,6 +7828,9 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
7784
7828
  * - `MEDIA_OFFLINE` — The asset cannot be fetched right now.
7785
7829
  * - `MEDIA_UNAVAILABLE` — The asset is not usable for rendering.
7786
7830
  * - `MEDIA_IMPORT_FAILED` — Importing media failed.
7831
+ * - `MEDIA_PROCESSING` — Media is still processing the clip; wait for the job and rerun.
7832
+ * - `MEDIA_PROCESSING_FAILED` — Media's processing job failed; nothing changed.
7833
+ * - `ALIGNMENT_UNCERTAIN` — `AlignByAudio` confidence too low; nothing changed.
7787
7834
  * - `FRAME_OUT_OF_RANGE` — The preview time is outside the project.
7788
7835
  * - `PROJECT_TOO_LARGE` — The project exceeds the size limit.
7789
7836
  * - `RESPONSE_TOO_LARGE` — The response would exceed its budget.
@@ -9857,7 +9904,7 @@ export const devopsUnitsFetch = (options) => (options.client ?? client).post({
9857
9904
  /**
9858
9905
  * Push a unit's branch
9859
9906
  *
9860
- * Publish the unit's local commits to the remote for the change: the machine itself holds no git credential and cannot reach the remote, so this verb is the way work done on a unit lands. ref says what to push — branch for the change's own branch, wip for this unit's own refs/praxis/wip/<change>, or a full ref name; anything else (the default branch, another change's branch, a tag, another unit's wip ref) is refused with 400 PUSH_REF_FORBIDDEN and nothing is pushed. expectedHead is the commit you believe the remote branch is at now; DevOps checks it before signing anything, and a remote that has moved since answers 409 HEAD_MOVED with nothing pushed, so fetch first when unsure, reconcile, and send the new head. For branch the call also takes a lease on that head, so the push cannot silently overwrite work that landed in between; wip is this change's own ref and is force-pushed. On success the answer is pushedSha, the commit that landed. Commit inside the machine first, through the sandbox instance API — this verb pushes commits, it does not create them. The unit must be available with a machine and a checkout, or the call answers 409 UNIT_INVALID_STATE; a push that fails inside the machine answers 500 EXECUTION_FAILED and the machine's own words are in the unit's transitions.
9907
+ * Publish the unit's local commits to the remote for the change: the machine itself holds no git credential and cannot reach the remote, so this verb is the way work done on a unit lands. ref says what to push — branch for the change's own branch, wip for this unit's own refs/praxis/wip/<change>, or a full ref name; anything else (the default branch, another change's branch, a tag, another unit's wip ref) is refused with 400 PUSH_REF_FORBIDDEN and nothing is pushed. expectedHead is the commit you believe the remote branch is at now; DevOps checks it before signing anything, and a remote that has moved since answers 409 HEAD_MOVED with nothing pushed, so fetch first when unsure, reconcile, and send the new head. For branch the call also takes a lease on that head, so the push cannot silently overwrite work that landed in between; wip is this change's own ref and is force-pushed. On success the answer is pushedSha, the commit that landed. Commit inside the machine first, through the sandbox instance API — this verb pushes commits, it does not create them. The unit must be available with a machine and a checkout, or the call answers 409 UNIT_INVALID_STATE; a push that git refuses inside the machine answers with the cause in the error message and in details.detail (the last 4000 characters of git's output, credentials redacted) and details.exitCode (git's exit code): 409 PUSH_REJECTED_BY_HOOK when a pre-push hook such as lefthook rejected it, so read the hook output, fix the content and push again, 409 PUSH_REJECTED_NON_FAST_FORWARD when the remote moved ahead, so fetch and reconcile, 409 HEAD_MOVED when the lease on expectedHead no longer holds, and 500 PUSH_FAILED for anything else. Do not retry the same push unchanged.
9861
9908
  */
9862
9909
  export const devopsUnitsPush = (options) => (options.client ?? client).post({
9863
9910
  security: [{
@@ -10783,7 +10830,7 @@ export const mediaGenerateVideo = (options) => (options.client ?? client).post({
10783
10830
  /**
10784
10831
  * Edit asset
10785
10832
  *
10786
- * Edit an existing asset and store the result as a new asset. Use library_id from creation or listing and asset_id from asset creation or listing; library_id also accepts the literal default, which resolves to the organization’s default library before the credential check. The source asset is never overwritten: the new asset hangs under it in the edit chain, records it in derived_from, and reads back with assets.lineage, so earlier steps stay reachable. The body is operation plus the optional model, asset_folder, understanding and idempotency_key; operation.type selects the edit and carries that operation’s own fields. This release performs variations, inpaint, erase, replace_object, recolor and replace_background on images, remove_background on an image or a video, and to_video, frame and resynthesize on the material each takes; every other type in the operation vocabulary is refused with OPERATION_NOT_SUPPORTED. remove_background on a video produces a portrait matte video for compositing without a green screen: output picks mask (a black-and-white matte as a small H.264 video, person white and background black: use it as a Cut track mask with channel luma under the original video to lay a lecturer over slides — the choice for compositing) or alpha (the default: the person on a transparent background as ProRes 4444, which is very large, about 870 MB per 15 seconds of 1080p, so ask for it only when a transparent file itself is the deliverable), and model picks the matting model from types.matting.models of the generation capabilities — read it first, because a request that names none takes the first available matting model and a video is refused with OPERATION_NOT_SUPPORTED, in the model field, when the platform has published none. output and model mean nothing for an image source and are refused with INVALID_PARAMS naming the field rather than ignored. inpaint takes mask, a PNG File identifier beginning with file- whose transparent area marks the region to replace, plus the prompt describing what belongs there. Aspects beyond the source asset’s material type return REFERENCE_TYPE_MISMATCH. Editing is billed by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals) and the new asset carries it in provenance.cost; when the job is done, tell the person the usage amount and give them the output’s viewer_url. The response is 202 with a queued Job whose type is image, whose operation is the edit applied, and whose source_asset_id is the asset edited; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read the produced asset. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/edits with {"operation":{"type":"variations","strength":"subtle"}}.
10833
+ * Edit an existing asset and store the result as a new asset. Use library_id from creation or listing and asset_id from asset creation or listing; library_id also accepts the literal default, which resolves to the organization’s default library before the credential check. The source asset is never overwritten: the new asset hangs under it in the edit chain, records it in derived_from, and reads back with assets.lineage, so earlier steps stay reachable. The body is operation plus the optional model, asset_folder, understanding and idempotency_key; operation.type selects the edit and carries that operation’s own fields. This release performs variations, inpaint, erase, replace_object, recolor and replace_background on images, remove_background on an image or a video, upscale, enhance_voice, reframe and redact through Media’s processing lane (upscale on a picture or a video; enhance_voice on a recording or a video, whose audio is used; reframe and redact on a video), and to_video, frame and resynthesize on the material each takes; every other type in the operation vocabulary is refused with OPERATION_NOT_SUPPORTED. The processing lane takes its model from the platform model catalogue, judged by the operation’s capability and overridable with operation.model, and bills per second of input; each edit is idempotent on the source, the operation and the parameters, so a second request that would make the same asset answers the asset already made instead of paying again, and an operation whose catalogue list is empty is refused with OPERATION_NOT_SUPPORTED, 尚未上架. remove_background on a video produces a portrait matte video for compositing without a green screen: output picks mask (a black-and-white matte as a small H.264 video, person white and background black: use it as a Cut track mask with channel luma under the original video to lay a lecturer over slides — the choice for compositing) or alpha (the default: the person on a transparent background as ProRes 4444, which is very large, about 870 MB per 15 seconds of 1080p, so ask for it only when a transparent file itself is the deliverable), and model picks the matting model from types.matting.models of the generation capabilities — read it first, because a request that names none takes the first available matting model and a video is refused with OPERATION_NOT_SUPPORTED, in the model field, when the platform has published none. output and model mean nothing for an image source and are refused with INVALID_PARAMS naming the field rather than ignored. inpaint takes mask, a PNG File identifier beginning with file- whose transparent area marks the region to replace, plus the prompt describing what belongs there. Aspects beyond the source asset’s material type return REFERENCE_TYPE_MISMATCH. Editing is billed by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals) and the new asset carries it in provenance.cost; when the job is done, tell the person the usage amount and give them the output’s viewer_url. The response is 202 with a queued Job whose type is image, whose operation is the edit applied, and whose source_asset_id is the asset edited; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read the produced asset. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/edits with {"operation":{"type":"variations","strength":"subtle"}}.
10787
10834
  */
10788
10835
  export const mediaEditAsset = (options) => (options.client ?? client).post({
10789
10836
  security: [{
@@ -10936,6 +10983,24 @@ export const mediaGetGenerationCapabilities = (options) => (options?.client ?? c
10936
10983
  url: '/media/v1/generation/capabilities',
10937
10984
  ...options
10938
10985
  });
10986
+ /**
10987
+ * Align asset
10988
+ *
10989
+ * Align two recordings by their sound and learn how they line up, without producing an asset. The route names the source asset; the body names the reference to compare against it. Both must be audio or a video, of the same library; anything else is refused with REFERENCE_TYPE_MISMATCH before a job exists. The call is an analysis: it decides and charges nothing else, bills per second of input, and stores no asset — the completed job carries the answer in result, offset_seconds saying how many seconds later the reference starts (so a caller holding both recordings knows which one to slide) and confidence how sure the correlation is. The analysis is idempotent on the source, the reference and the parameters: asking again with the same pair answers the completed job and its result instead of analysing and charging again. A max_offset_seconds caps how far apart the two may be; alignment needs an alignment model from the platform model catalogue, and with none published the request is refused with OPERATION_NOT_SUPPORTED, 尚未上架. Send Idempotency-Key, or idempotency_key in the body, to retry without analysing twice. The response is 202 with a queued Job whose operation is align; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read result. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/align with {"reference_asset_id":"3f2a9c1e5b7d4e6f8a0b1c2d3e4f5a6b","max_offset_seconds":30}.
10990
+ */
10991
+ export const mediaAlignAsset = (options) => (options.client ?? client).post({
10992
+ security: [{
10993
+ key: 'media-BearerAuth',
10994
+ scheme: 'bearer',
10995
+ type: 'http'
10996
+ }],
10997
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/align',
10998
+ ...options,
10999
+ headers: {
11000
+ 'Content-Type': 'application/json',
11001
+ ...options.headers
11002
+ }
11003
+ });
10939
11004
  /**
10940
11005
  * List types
10941
11006
  *
@@ -12298,6 +12363,66 @@ export const searchMap = (options) => (options.client ?? client).post({
12298
12363
  ...options.headers
12299
12364
  }
12300
12365
  });
12366
+ /**
12367
+ * List shares
12368
+ *
12369
+ * Find the shares of this organization, newest first, for example every link that exposes one file before you decide which to revoke. Filter by resource_type, resource_id and status; filters combine with AND. Continue with next_page_token as page_token until next_page_token is null. Records never include link.web_url. A credential bound to specific files must pass resource_type and resource_id of a bound file, and an unbound file answers 404.
12370
+ */
12371
+ export const shareListPermissions = (options) => (options?.client ?? client).get({
12372
+ security: [{
12373
+ key: 'share-bearerAuth',
12374
+ scheme: 'bearer',
12375
+ type: 'http'
12376
+ }],
12377
+ url: '/share/v1/permissions',
12378
+ ...options
12379
+ });
12380
+ /**
12381
+ * Create share
12382
+ *
12383
+ * Make one file readable by anyone holding a link, before sending the link to a person or embedding it. Name the object as resource {type, id}, with the file id from the File API. The response is 201 and is the only time link.web_url is returned; store it, because later reads omit it and a lost address means creating another share (the old one keeps working until you delete it). The link is anonymous and read-only. A type other than file answers 400 RESOURCE_TYPE_UNSUPPORTED, and a file that is missing or outside your organization answers 404 RESOURCE_NOT_FOUND.
12384
+ */
12385
+ export const shareCreatePermission = (options) => (options.client ?? client).post({
12386
+ security: [{
12387
+ key: 'share-bearerAuth',
12388
+ scheme: 'bearer',
12389
+ type: 'http'
12390
+ }],
12391
+ url: '/share/v1/permissions',
12392
+ ...options,
12393
+ headers: {
12394
+ 'Content-Type': 'application/json',
12395
+ ...options.headers
12396
+ }
12397
+ });
12398
+ /**
12399
+ * Delete share
12400
+ *
12401
+ * Take a link back so nobody can open it again. This revokes the share, the record stays readable with status revoked, and opening the link answers 410. Repeating the call on a revoked share is harmless and answers 204 again. Content addresses already signed when the link was opened expire on their own within five minutes. Take the id from shares.create or shares.list.
12402
+ */
12403
+ export const shareDeletePermission = (options) => (options.client ?? client).delete({
12404
+ security: [{
12405
+ key: 'share-bearerAuth',
12406
+ scheme: 'bearer',
12407
+ type: 'http'
12408
+ }],
12409
+ url: '/share/v1/permissions/{id}',
12410
+ ...options
12411
+ });
12412
+ /**
12413
+ * Retrieve share
12414
+ *
12415
+ * Read one share to see whether its link is still active, when it expires, and how many times it was opened. Take the id from shares.create or shares.list. The record never includes link.web_url, because the address is shown once at creation. A share that does not exist or belongs to another organization answers 404 PERMISSION_NOT_FOUND.
12416
+ */
12417
+ export const shareRetrievePermission = (options) => (options.client ?? client).get({
12418
+ security: [{
12419
+ key: 'share-bearerAuth',
12420
+ scheme: 'bearer',
12421
+ type: 'http'
12422
+ }],
12423
+ url: '/share/v1/permissions/{id}',
12424
+ ...options
12425
+ });
12301
12426
  /**
12302
12427
  * List the genres Studio can write
12303
12428
  *