@deepraxis/sdk 0.1.1-dev.5fa7088 → 0.1.1-dev.604ca9a
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.
- package/METHODS.md +111 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +210 -15
- package/dist/generated/sdk.gen.js +511 -14
- package/dist/generated/types.gen.d.ts +2644 -74
- package/dist/operations.generated.js +1019 -77
- package/dist/resources.generated.d.ts +129 -8
- package/dist/resources.generated.js +72 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { client } from './client.gen.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* Read your conversation with an agent
|
|
6
6
|
*
|
|
7
|
-
* Read your conversation with a
|
|
7
|
+
* Read your conversation with a general agent: the events of your own main session with that agent, the same page sessions.events.list returns — same query parameters, same data + next_page envelope, same event shapes. {agent_id} takes the agent_… id, the eight character identity number or the handle; a service or assume agent answers 400. Use it to collect a reply, to find tool calls waiting for approval, or to learn the real session id without ever asking for one.
|
|
8
8
|
*/
|
|
9
9
|
export const listAgentEvents = (options) => (options.client ?? client).get({
|
|
10
10
|
security: [{
|
|
@@ -22,7 +22,7 @@ export const listAgentEvents = (options) => (options.client ?? client).get({
|
|
|
22
22
|
/**
|
|
23
23
|
* Send events to an agent
|
|
24
24
|
*
|
|
25
|
-
* Talk to a
|
|
25
|
+
* Talk to a general agent: the message goes to your own main session with that agent — one entry per person, created on first use and the same every time after — so no session id is needed. This is sessions.events.send addressed by the agent instead of the session: the same body (user.message with exactly one nonempty text block, user.interrupt, user.tool_confirmation, user.custom_tool_result, user.steer, user.withdraw), the same acknowledgement and the same billing. {agent_id} takes the agent_… id, the eight character identity number or the handle. A service or assume agent answers 400 — it has no main session: reach a service agent over A2A, or open a session explicitly with sessions.create. Read the reply with agents.events.list, or follow it while it is produced with agents.events.stream. Example: POST /agent/v1/agents/agent_example/events with {"events":[{"type":"user.message","content":[{"type":"text","text":"你好"}]}]}.
|
|
26
26
|
*/
|
|
27
27
|
export const sendAgentEvents = (options) => (options.client ?? client).post({
|
|
28
28
|
security: [{
|
|
@@ -42,9 +42,9 @@ export const sendAgentEvents = (options) => (options.client ?? client).post({
|
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
/**
|
|
45
|
-
* Follow
|
|
45
|
+
* Follow an agent live
|
|
46
46
|
*
|
|
47
|
-
* Follow
|
|
47
|
+
* Follow an agent live over Server-Sent Events. For a general agent it is the stream of your own main session with that agent, the same stream sessions.events.stream opens, event_deltas[] previews included; read past events with agents.events.list. An assume agent has no main session: its body is its MCP connections, and this stream is its broadcast point, which every live connection of the agent hears at once. It carries two events, each with an SSE id: inbox.letter_delivered { letter_id, sender, sender_name, summary, thread, create_time } when a letter arrives (the letter stays unread; take it with the agent's inbox tool, the body is not in the event), and cognition.ritual_held { ritual, owner, title, engram, create_time } when a domain gives the agent a memory. Reconnect with the Last-Event-ID header to receive what you missed from a short recent buffer (about an hour); a first connection replays nothing, so read agents.inbox.letters.list for mail already waiting. {agent_id} takes the agent_… id, the eight character identity number or the handle; a service agent answers 400. Closing the stream only drops your subscription and does not stop the agent.
|
|
48
48
|
*/
|
|
49
49
|
export const streamAgentEvents = (options) => (options.client ?? client).sse.get({
|
|
50
50
|
security: [{
|
|
@@ -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: the local `praxis agent events wait` reads it once on start and after every reconnect to its agent's event stream, so no letter that arrived while nothing listened is missed. {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/inbox/letters?unread=true&limit=5.
|
|
106
|
+
*/
|
|
107
|
+
export const listAgentInboxLetters = (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}/inbox/letters',
|
|
118
|
+
...options
|
|
119
|
+
});
|
|
102
120
|
/**
|
|
103
121
|
* Apply Agent Version
|
|
104
122
|
*
|
|
@@ -441,7 +459,7 @@ export const computersList = (options) => (options?.client ?? client).get({
|
|
|
441
459
|
/**
|
|
442
460
|
* Create Computer
|
|
443
461
|
*
|
|
444
|
-
* Create a durable computer: a named machine whose files outlive sessions, for general
|
|
462
|
+
* Create a durable computer: a named machine whose files outlive sessions, for general agents.
|
|
445
463
|
*
|
|
446
464
|
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.
|
|
447
465
|
*/
|
|
@@ -759,6 +777,70 @@ export const forkSession = (options) => (options.client ?? client).post({
|
|
|
759
777
|
...options.headers
|
|
760
778
|
}
|
|
761
779
|
});
|
|
780
|
+
/**
|
|
781
|
+
* List Session Artifacts (Extension)
|
|
782
|
+
*
|
|
783
|
+
* List the files this session delivered; an end-customer token reads its own session.
|
|
784
|
+
*
|
|
785
|
+
* Own-face extension. Returns { data: Artifact[] } ordered by create_time. Each artifact is one file in the session outputs directory, or one canvas or media asset the reply pointed at (a part with kind object carrying object_type, object_id and href; one artifact per object, pointing at it again adds no version), with id, name, version, parts, source_hrefs, create_time and update_time. Delivering the same path again keeps the id and adds one to version. Files are captured seconds after the turn ends, so artifacts appear after session.status_idle; also watch the agent.artifact_delivered event. Whoever may read the session may read its artifacts; a session that is missing or not yours returns 404.
|
|
786
|
+
*/
|
|
787
|
+
export const listSessionArtifacts = (options) => (options.client ?? client).get({
|
|
788
|
+
security: [{
|
|
789
|
+
key: 'BearerAuth',
|
|
790
|
+
scheme: 'bearer',
|
|
791
|
+
type: 'http'
|
|
792
|
+
}, {
|
|
793
|
+
key: 'ApiKeyAuth',
|
|
794
|
+
name: 'X-API-Key',
|
|
795
|
+
type: 'apiKey'
|
|
796
|
+
}],
|
|
797
|
+
url: '/agent/v1/sessions/{session_id}/artifacts',
|
|
798
|
+
...options
|
|
799
|
+
});
|
|
800
|
+
/**
|
|
801
|
+
* Create Artifact Content URL (Extension)
|
|
802
|
+
*
|
|
803
|
+
* Mint a short-lived download address for one file of an artifact.
|
|
804
|
+
*
|
|
805
|
+
* Own-face extension. The body is optional: part (index into the artifact parts, default 0) and ttl_seconds (60 to 300, default 300). Returns { url, expire_time }. The address works for minutes; do not store or log it. For an object part the address serves a snapshot picture of a canvas or the own bytes of the asset; an object that no longer exists returns 404 ARTIFACT_NOT_FOUND and a failing share service returns 502. An unknown artifact or an out-of-range part returns 404 ARTIFACT_NOT_FOUND, a session that is missing or not yours returns 404, and a ttl_seconds outside 60 to 300 returns 400.
|
|
806
|
+
*/
|
|
807
|
+
export const createSessionArtifactContentUrl = (options) => (options.client ?? client).post({
|
|
808
|
+
security: [{
|
|
809
|
+
key: 'BearerAuth',
|
|
810
|
+
scheme: 'bearer',
|
|
811
|
+
type: 'http'
|
|
812
|
+
}, {
|
|
813
|
+
key: 'ApiKeyAuth',
|
|
814
|
+
name: 'X-API-Key',
|
|
815
|
+
type: 'apiKey'
|
|
816
|
+
}],
|
|
817
|
+
url: '/agent/v1/sessions/{session_id}/artifacts/{artifact_id}/content_url',
|
|
818
|
+
...options,
|
|
819
|
+
headers: {
|
|
820
|
+
'Content-Type': 'application/json',
|
|
821
|
+
...options.headers
|
|
822
|
+
}
|
|
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
|
+
});
|
|
762
844
|
/**
|
|
763
845
|
* List Session Background Tasks (Extension)
|
|
764
846
|
*
|
|
@@ -1416,7 +1498,7 @@ export const fileRetrieveUpload = (options) => (options.client ?? client).get({
|
|
|
1416
1498
|
/**
|
|
1417
1499
|
* Create a one-time upload URL
|
|
1418
1500
|
*
|
|
1419
|
-
* Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide filename (the stored basename), exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid
|
|
1501
|
+
* Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide filename (the stored basename), exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid or cross-organization URLs return 404, and so does a link whose upload record no longer exists. A URL that is authentic but names another action returns 403 CAPABILITY_MISMATCH: a status link posted to complete_url answers it, and so does a completion link fetched as status_url. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
|
|
1420
1502
|
*/
|
|
1421
1503
|
export const fileCreateSignedUpload = (options) => (options.client ?? client).post({
|
|
1422
1504
|
security: [{
|
|
@@ -3794,7 +3876,7 @@ export const sessionsUpdate = (options) => (options.client ?? client).post({
|
|
|
3794
3876
|
/**
|
|
3795
3877
|
* List agents
|
|
3796
3878
|
*
|
|
3797
|
-
* List the agents of the workspace behind your API key, newest first, in pages of at most 100 (default 20). Use it to find an agent id before creating a session; to read one agent use agents.retrieve, to see its history use agents.versions.list. Archived agents are hidden unless include_archived is true. Filter kind=general
|
|
3879
|
+
* List the agents of the workspace behind your API key, newest first, in pages of at most 100 (default 20). Use it to find an agent id before creating a session; to read one agent use agents.retrieve, to see its history use agents.versions.list. Archived agents are hidden unless include_archived is true. Filter kind=general for durable-computer agents, kind=service for per-session environments, or kind=assume for external MCP clients. Pass next_page from the response as page to read the next page; a null next_page means the end.
|
|
3798
3880
|
*/
|
|
3799
3881
|
export const agentsList = (options) => (options?.client ?? client).get({
|
|
3800
3882
|
security: [{
|
|
@@ -3968,7 +4050,7 @@ export const sessionsArchive = (options) => (options.client ?? client).post({
|
|
|
3968
4050
|
/**
|
|
3969
4051
|
* List session events
|
|
3970
4052
|
*
|
|
3971
|
-
* 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
|
|
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 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.
|
|
3972
4054
|
*/
|
|
3973
4055
|
export const sessionsEventsList = (options) => (options.client ?? client).get({
|
|
3974
4056
|
security: [{
|
|
@@ -3986,7 +4068,7 @@ export const sessionsEventsList = (options) => (options.client ?? client).get({
|
|
|
3986
4068
|
/**
|
|
3987
4069
|
* Send session events
|
|
3988
4070
|
*
|
|
3989
|
-
* Attach optional praxis_context={items:[{name,value}]} to user.message for untrusted page context on this turn only (maximum 32 items, 4096 UTF-8 JSON bytes). /anthropic/v1 rejects this field. Send events to a session: user.message (exactly one nonempty text block), user.interrupt, user.tool_confirmation to allow or deny a pending tool call, user.custom_tool_result to return a custom tool result, user.steer to inject a queued user.message into a turn that is still running, and user.withdraw to retract a queued message. The response only acknowledges the inputs; read replies with sessions.events.list or sessions.events.stream. A message sent while the session waits for tool approval is queued (processed_at null) and runs in order after the approval is resolved. Archived sessions reject new messages. To approve, read a pending agent.tool_use or agent.mcp_tool_use event and send {type: "user.tool_confirmation", tool_use_id: <that event id>, result: "allow"} (or deny); include session_thread_id for a child approval. Native confirmations also accept updated_permissions, answers and annotations, which /anthropic/v1 rejects. Both faces accept user.custom_tool_result with custom_tool_use_id from agent.custom_tool_use.id or the requires_action stop_reason.event_ids. Unlike Anthropic, result content accepts only text blocks (omit it for an empty array). Omitted or null is_error means false. The server routes child calls by id; session_thread_id is rejected in this input. Unknown call ids return 400; duplicate results or calls no longer waiting return 409. This operation addresses one session — normally a worker session an agent dispatched; to talk to a
|
|
4071
|
+
* Attach optional praxis_context={items:[{name,value}]} to user.message for untrusted page context on this turn only (maximum 32 items, 4096 UTF-8 JSON bytes). /anthropic/v1 rejects this field. Send events to a session: user.message (exactly one nonempty text block), user.interrupt, user.tool_confirmation to allow or deny a pending tool call, user.custom_tool_result to return a custom tool result, user.steer to inject a queued user.message into a turn that is still running, and user.withdraw to retract a queued message. The response only acknowledges the inputs; read replies with sessions.events.list or sessions.events.stream. A message sent while the session waits for tool approval is queued (processed_at null) and runs in order after the approval is resolved. Archived sessions reject new messages. To approve, read a pending agent.tool_use or agent.mcp_tool_use event and send {type: "user.tool_confirmation", tool_use_id: <that event id>, result: "allow"} (or deny); include session_thread_id for a child approval. Native confirmations also accept updated_permissions, answers and annotations, which /anthropic/v1 rejects. Both faces accept user.custom_tool_result with custom_tool_use_id from agent.custom_tool_use.id or the requires_action stop_reason.event_ids. Unlike Anthropic, result content accepts only text blocks (omit it for an empty array). Omitted or null is_error means false. The server routes child calls by id; session_thread_id is rejected in this input. Unknown call ids return 400; duplicate results or calls no longer waiting return 409. This operation addresses one session — normally a worker session an agent dispatched; to talk to a general agent itself, use agents.events.send instead. In the path, session_id may also be `main` (your own main session with the 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.
|
|
3990
4072
|
*/
|
|
3991
4073
|
export const sessionsEventsSend = (options) => (options.client ?? client).post({
|
|
3992
4074
|
security: [{
|
|
@@ -4008,7 +4090,7 @@ export const sessionsEventsSend = (options) => (options.client ?? client).post({
|
|
|
4008
4090
|
/**
|
|
4009
4091
|
* Stream session events
|
|
4010
4092
|
*
|
|
4011
|
-
* Open a Server-Sent Events stream of a session's events in real time. Use it to show a reply as it is produced; to read past events use sessions.events.list. Send a message through sessions.events.send in another request while the stream is open. Closing the stream only drops your subscription and does not stop the agent. Pass event_deltas[]=agent.message, agent.thinking or agent.tool_use to also receive event_start / event_delta previews before the final event. This operation addresses one session — normally a worker session an agent dispatched; to follow a
|
|
4093
|
+
* Open a Server-Sent Events stream of a session's events in real time. Use it to show a reply as it is produced; to read past events use sessions.events.list. Send a message through sessions.events.send in another request while the stream is open. Closing the stream only drops your subscription and does not stop the agent. Pass event_deltas[]=agent.message, agent.thinking or agent.tool_use to also receive event_start / event_delta previews before the final event. This operation addresses one session — normally a worker session an agent dispatched; to follow a general agent itself, use agents.events.stream instead. In the path, session_id may also be `main` (your own main session with the 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.
|
|
4012
4094
|
*/
|
|
4013
4095
|
export const sessionsEventsStream = (options) => (options.client ?? client).sse.get({
|
|
4014
4096
|
security: [{
|
|
@@ -4308,7 +4390,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
|
|
|
4308
4390
|
/**
|
|
4309
4391
|
* Create deployment
|
|
4310
4392
|
*
|
|
4311
|
-
* Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general
|
|
4393
|
+
* Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400.
|
|
4312
4394
|
*/
|
|
4313
4395
|
export const deploymentsCreate = (options) => (options.client ?? client).post({
|
|
4314
4396
|
security: [{
|
|
@@ -7637,6 +7719,12 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
7637
7719
|
* - `RippleDeleteRange` — Cut a time range and close the gap.
|
|
7638
7720
|
* - `DeleteWords` — Cut transcript words and ripple every track, keeping a breath.
|
|
7639
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.
|
|
7640
7728
|
* - `AddTrack` — Add a video, audio or caption track.
|
|
7641
7729
|
* - `MoveTrack` — Move a track between layers; 0 is the topmost.
|
|
7642
7730
|
* - `UpdateTrack` — Change a track's name, lock, gain or role.
|
|
@@ -7740,6 +7828,9 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
7740
7828
|
* - `MEDIA_OFFLINE` — The asset cannot be fetched right now.
|
|
7741
7829
|
* - `MEDIA_UNAVAILABLE` — The asset is not usable for rendering.
|
|
7742
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.
|
|
7743
7834
|
* - `FRAME_OUT_OF_RANGE` — The preview time is outside the project.
|
|
7744
7835
|
* - `PROJECT_TOO_LARGE` — The project exceeds the size limit.
|
|
7745
7836
|
* - `RESPONSE_TOO_LARGE` — The response would exceed its budget.
|
|
@@ -9096,6 +9187,24 @@ export const devopsFlagsCreate = (options) => (options.client ?? client).post({
|
|
|
9096
9187
|
...options.headers
|
|
9097
9188
|
}
|
|
9098
9189
|
});
|
|
9190
|
+
/**
|
|
9191
|
+
* Report a project's flag code references
|
|
9192
|
+
*
|
|
9193
|
+
* Store one code-reference scan for a project in a single call: send the commit the scan read (scannedCommit, the checkout's `git rev-parse HEAD`) and, for every flag key the scan knows, the places code reads it ({path, line, snippet}). Send every key the checkout still expects to be referenced, including the ones found nowhere: a project flag with no entry in refs is stored with zero references, and zero is what lets `archive` see the code that named the flag is gone. A key that matches no live flag of the project — one already archived, or from another project — is returned in unknownKeys and stores nothing; reporting it is not an error. updated is how many flags were written, which is every live flag of the project because each gets a row. This is the write side of the archive gate: `POST /v1/flags/{id}:archive` refuses with FLAG_STILL_REFERENCED while the stored count is above zero, and the count it reads is exactly the one stored here. Staleness is not corrected for — the stored scannedCommit and count are used as they stand. At most 500 references are stored per flag; a longer list is truncated for storage while count still reports the true number. Reporting changes no flag's runtime behaviour.
|
|
9194
|
+
*/
|
|
9195
|
+
export const devopsFlagsReportCodeRefs = (options) => (options.client ?? client).post({
|
|
9196
|
+
security: [{
|
|
9197
|
+
key: 'devops-bearerAuth',
|
|
9198
|
+
scheme: 'bearer',
|
|
9199
|
+
type: 'http'
|
|
9200
|
+
}],
|
|
9201
|
+
url: '/devops/v1/projects/{project}/flags/code-refs',
|
|
9202
|
+
...options,
|
|
9203
|
+
headers: {
|
|
9204
|
+
'Content-Type': 'application/json',
|
|
9205
|
+
...options.headers
|
|
9206
|
+
}
|
|
9207
|
+
});
|
|
9099
9208
|
/**
|
|
9100
9209
|
* Retrieve a flag
|
|
9101
9210
|
*
|
|
@@ -9167,7 +9276,7 @@ export const devopsFlagsConclude = (options) => (options.client ?? client).post(
|
|
|
9167
9276
|
/**
|
|
9168
9277
|
* Archive a flag
|
|
9169
9278
|
*
|
|
9170
|
-
* Archive a flag whose code is gone: it stops evaluating in every environment, leaves the ordinary flag list and keeps its key and history. Archiving
|
|
9279
|
+
* Archive a flag whose code is gone: it stops evaluating in every environment, leaves the ordinary flag list and keeps its key and history. Archiving is the delete, and the platform refuses it while the last reported scan still finds the key in code or while the flag is on in an environment: a flag whose codeRefs.count is above zero is refused with FLAG_STILL_REFERENCED, and a flag whose on state is true in any environment is refused with FLAG_HAS_LIVE_RULES, so archiving succeeds only once the code that names the key is deployed away and every environment is off. The gate reads the stored scan as it stands — an out-of-date scannedCommit is not corrected for — and there is no force flag. It is irreversible through the API: there is no unarchive call, an archived flag cannot be updated or configured, and its key stays reserved, so a later create with the same key is refused; archiving an archived flag just answers it again. A flag that may come back is turned off in its environment instead. The order is: open the flag fully (`praxis api devops flag environment update`), delete the code that names the key and deploy that, run `praxis devops flag remove <key>` (local, lists the references still naming the key), then `praxis api devops flag archive <id>`, then `praxis devops flag sync` so the local registry drops it. There is no separate delete call.
|
|
9171
9280
|
*/
|
|
9172
9281
|
export const devopsFlagsArchive = (options) => (options.client ?? client).post({
|
|
9173
9282
|
security: [{
|
|
@@ -9795,7 +9904,7 @@ export const devopsUnitsFetch = (options) => (options.client ?? client).post({
|
|
|
9795
9904
|
/**
|
|
9796
9905
|
* Push a unit's branch
|
|
9797
9906
|
*
|
|
9798
|
-
* 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
|
|
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.
|
|
9799
9908
|
*/
|
|
9800
9909
|
export const devopsUnitsPush = (options) => (options.client ?? client).post({
|
|
9801
9910
|
security: [{
|
|
@@ -10721,7 +10830,7 @@ export const mediaGenerateVideo = (options) => (options.client ?? client).post({
|
|
|
10721
10830
|
/**
|
|
10722
10831
|
* Edit asset
|
|
10723
10832
|
*
|
|
10724
|
-
* 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"}}.
|
|
10725
10834
|
*/
|
|
10726
10835
|
export const mediaEditAsset = (options) => (options.client ?? client).post({
|
|
10727
10836
|
security: [{
|
|
@@ -10874,6 +10983,56 @@ export const mediaGetGenerationCapabilities = (options) => (options?.client ?? c
|
|
|
10874
10983
|
url: '/media/v1/generation/capabilities',
|
|
10875
10984
|
...options
|
|
10876
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
|
+
});
|
|
11004
|
+
/**
|
|
11005
|
+
* Get HLS renditions
|
|
11006
|
+
*
|
|
11007
|
+
* Read how ready a video asset’s on-demand ladder is, rung by rung, without building anything. Use library_id and asset_id as everywhere else. The answer names the asset, its current version, the asset’s own facts (resource_type, is_audio and duration) and one entry per recorded rung — name, height, the first indexed piece’s width, the rung’s bitrate and stored bytes, and its state (processing while pieces run, ready when every piece is ready, failed when a piece gave up). A ladder that was never requested, and an asset that is not a video, answer an empty renditions rather than an error. This read mints no capability and signs nothing, so play the ladder through the content service, which issues the short-lived play address for the current version. Example: GET /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/hls.
|
|
11008
|
+
*/
|
|
11009
|
+
export const mediaGetHlsRenditions = (options) => (options.client ?? client).get({
|
|
11010
|
+
security: [{
|
|
11011
|
+
key: 'media-BearerAuth',
|
|
11012
|
+
scheme: 'bearer',
|
|
11013
|
+
type: 'http'
|
|
11014
|
+
}],
|
|
11015
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/hls',
|
|
11016
|
+
...options
|
|
11017
|
+
});
|
|
11018
|
+
/**
|
|
11019
|
+
* Request HLS renditions
|
|
11020
|
+
*
|
|
11021
|
+
* Build a video asset’s adaptive HLS ladder for its current version, so one asset plays at several clarities on an ordinary player. Use library_id from creation or listing and the asset_id of a video asset; the ladder belongs to the version the asset has now, and a later version gets its own. heights names the rungs to build: a non-empty subset of 480, 720 and 1080 with no repeats, or omitted to build all three. The ladder never upscales — a rung above the source’s short side is dropped, and a list entirely above it keeps its lowest rung. The call is asynchronous and starts paid transcoding: the work runs as the video-transcode-hls model, one piece per rung per ten minutes of source, and it is charged per output minute at that model’s published price to the organization that owns the asset (ADR-146 §5) — a rung the source cannot carry, and a failed rung, are not charged. A source longer than eight hours (28800 seconds) is refused with SOURCE_TOO_LONG before anything is planned. Repeating the call is safe: a rung already processing, ready or failed is left as it is and is never encoded twice. The response is 202 with the asset_id, its current version and one entry per rung — name, height, width, bitrate, bytes and state, where processing means the rung is still being encoded, ready means it plays and failed means it gave up and can be retried by asking again. Poll GET /media/v1/libraries/{library_id}/assets/{asset_id}/hls until every rung is ready, then play the ladder through the content service, which mints the short-lived play address. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/hls with {"heights":[480,720,1080]}.
|
|
11022
|
+
*/
|
|
11023
|
+
export const mediaRequestHlsRenditions = (options) => (options.client ?? client).post({
|
|
11024
|
+
security: [{
|
|
11025
|
+
key: 'media-BearerAuth',
|
|
11026
|
+
scheme: 'bearer',
|
|
11027
|
+
type: 'http'
|
|
11028
|
+
}],
|
|
11029
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/hls',
|
|
11030
|
+
...options,
|
|
11031
|
+
headers: {
|
|
11032
|
+
'Content-Type': 'application/json',
|
|
11033
|
+
...options.headers
|
|
11034
|
+
}
|
|
11035
|
+
});
|
|
10877
11036
|
/**
|
|
10878
11037
|
* List types
|
|
10879
11038
|
*
|
|
@@ -11116,6 +11275,284 @@ export const ontologySearch = (options) => (options.client ?? client).post({
|
|
|
11116
11275
|
...options.headers
|
|
11117
11276
|
}
|
|
11118
11277
|
});
|
|
11278
|
+
/**
|
|
11279
|
+
* List repositories
|
|
11280
|
+
*
|
|
11281
|
+
* 列出这个组织现有的库,默认库也在其中。库很少,一页通常装得下;用 next_cursor 翻页。先在这里拿到 repository_id,再用它列出或发布包。
|
|
11282
|
+
*/
|
|
11283
|
+
export const registryRepositoriesList = (options) => (options?.client ?? client).get({
|
|
11284
|
+
security: [{
|
|
11285
|
+
key: 'registry-bearerAuth',
|
|
11286
|
+
scheme: 'bearer',
|
|
11287
|
+
type: 'http'
|
|
11288
|
+
}],
|
|
11289
|
+
url: '/registry/v1/repositories',
|
|
11290
|
+
...options
|
|
11291
|
+
});
|
|
11292
|
+
/**
|
|
11293
|
+
* Create repository
|
|
11294
|
+
*
|
|
11295
|
+
* 新建一个库来分类存放包。name 是库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且不能和已有的库重名;display_name 和 description 是给人看的。每个组织本来就有一个默认库,需要新分类时才建;一个库非空时不能删除,所以不要用库来临时隔离一次上传。
|
|
11296
|
+
*/
|
|
11297
|
+
export const registryRepositoriesCreate = (options) => (options.client ?? client).post({
|
|
11298
|
+
security: [{
|
|
11299
|
+
key: 'registry-bearerAuth',
|
|
11300
|
+
scheme: 'bearer',
|
|
11301
|
+
type: 'http'
|
|
11302
|
+
}],
|
|
11303
|
+
url: '/registry/v1/repositories',
|
|
11304
|
+
...options,
|
|
11305
|
+
headers: {
|
|
11306
|
+
'Content-Type': 'application/json',
|
|
11307
|
+
...options.headers
|
|
11308
|
+
}
|
|
11309
|
+
});
|
|
11310
|
+
/**
|
|
11311
|
+
* Delete repository
|
|
11312
|
+
*
|
|
11313
|
+
* 删一个空的库。默认库不能删(FAILED_PRECONDITION);库里还有包时也不能删,先把包删掉或改用别的库。删除请求重发会 404,所以删除前先读一次确认。
|
|
11314
|
+
*/
|
|
11315
|
+
export const registryRepositoriesDelete = (options) => (options.client ?? client).delete({
|
|
11316
|
+
security: [{
|
|
11317
|
+
key: 'registry-bearerAuth',
|
|
11318
|
+
scheme: 'bearer',
|
|
11319
|
+
type: 'http'
|
|
11320
|
+
}],
|
|
11321
|
+
url: '/registry/v1/repositories/{repository_id}',
|
|
11322
|
+
...options
|
|
11323
|
+
});
|
|
11324
|
+
/**
|
|
11325
|
+
* Retrieve repository
|
|
11326
|
+
*
|
|
11327
|
+
* 读一个库的名称、说明、包数量和默认标记。repository_id 来自 repositories.list 或 repositories.create;另一个组织的库或不存在的库一律 404,不区分两者。
|
|
11328
|
+
*/
|
|
11329
|
+
export const registryRepositoriesRetrieve = (options) => (options.client ?? client).get({
|
|
11330
|
+
security: [{
|
|
11331
|
+
key: 'registry-bearerAuth',
|
|
11332
|
+
scheme: 'bearer',
|
|
11333
|
+
type: 'http'
|
|
11334
|
+
}],
|
|
11335
|
+
url: '/registry/v1/repositories/{repository_id}',
|
|
11336
|
+
...options
|
|
11337
|
+
});
|
|
11338
|
+
/**
|
|
11339
|
+
* Update repository
|
|
11340
|
+
*
|
|
11341
|
+
* 改库的 display_name 或 description。只送要改的字段,省略的保持原值;name 建库之后不能改,它标识库。一个字段都不送会 400。
|
|
11342
|
+
*/
|
|
11343
|
+
export const registryRepositoriesUpdate = (options) => (options.client ?? client).patch({
|
|
11344
|
+
security: [{
|
|
11345
|
+
key: 'registry-bearerAuth',
|
|
11346
|
+
scheme: 'bearer',
|
|
11347
|
+
type: 'http'
|
|
11348
|
+
}],
|
|
11349
|
+
url: '/registry/v1/repositories/{repository_id}',
|
|
11350
|
+
...options,
|
|
11351
|
+
headers: {
|
|
11352
|
+
'Content-Type': 'application/json',
|
|
11353
|
+
...options.headers
|
|
11354
|
+
}
|
|
11355
|
+
});
|
|
11356
|
+
/**
|
|
11357
|
+
* List packages
|
|
11358
|
+
*
|
|
11359
|
+
* 列出一个库里的包,可按种类筛、按名字搜、按最近更新或下载量排序。kind=skill 只看技能,kind=plugin 只看插件,省略则两类都返回。q 在 name、title 和 description 上做子串匹配。sort 默认 updated;downloads 按累计下载量降序,用来找这个库最常用的资源。
|
|
11360
|
+
*/
|
|
11361
|
+
export const registryRepositoriesPackagesList = (options) => (options.client ?? client).get({
|
|
11362
|
+
security: [{
|
|
11363
|
+
key: 'registry-bearerAuth',
|
|
11364
|
+
scheme: 'bearer',
|
|
11365
|
+
type: 'http'
|
|
11366
|
+
}],
|
|
11367
|
+
url: '/registry/v1/repositories/{repository_id}/packages',
|
|
11368
|
+
...options
|
|
11369
|
+
});
|
|
11370
|
+
/**
|
|
11371
|
+
* Publish a package
|
|
11372
|
+
*
|
|
11373
|
+
* 把一个新包发布进这个库,一次调用建立包并上传它的第一个版本。发布内容是 multipart:version 必填,archive 给一个 zip,或者 files 给一组文件(每个文件的 filename 是相对上传根的路径,例如 pdf/SKILL.md)。单个顶层目录会被剥掉。种类按根上有什么判:有 SKILL.md 就是 skill,有 .claude-plugin/plugin.json 就是 plugin;两者都没有、或都有,会被拒。名字从 SKILL.md 或 plugin.json 里读,不从路径或 query 猜。限额:上传 ≤25 MiB,解压后 ≤50 MiB,≤1000 个文件。版本必须是 semver 且严格递增;第一个版本可以是任意合法 semver,之后每个新版本都要比已发布的最高版本高。把已有智能体的技能搬过来时,先用 GET /agent/v1/skills/{id}/versions/{v}/content 导出 zip,再在这里作为 archive 发布。
|
|
11374
|
+
*/
|
|
11375
|
+
export const registryRepositoriesPackagesCreate = (options) => (options.client ?? client).post({
|
|
11376
|
+
...formDataBodySerializer,
|
|
11377
|
+
security: [{
|
|
11378
|
+
key: 'registry-bearerAuth',
|
|
11379
|
+
scheme: 'bearer',
|
|
11380
|
+
type: 'http'
|
|
11381
|
+
}],
|
|
11382
|
+
url: '/registry/v1/repositories/{repository_id}/packages',
|
|
11383
|
+
...options,
|
|
11384
|
+
headers: {
|
|
11385
|
+
'Content-Type': null,
|
|
11386
|
+
...options.headers
|
|
11387
|
+
}
|
|
11388
|
+
});
|
|
11389
|
+
/**
|
|
11390
|
+
* Retrieve package
|
|
11391
|
+
*
|
|
11392
|
+
* 读一个包的元数据:种类、所属库、当前 latest_version、作者、标签和累计下载量。package_id 来自 packages.list 或 packages.create;另一个组织或不存在都返回 404。
|
|
11393
|
+
*/
|
|
11394
|
+
export const registryPackagesRetrieve = (options) => (options.client ?? client).get({
|
|
11395
|
+
security: [{
|
|
11396
|
+
key: 'registry-bearerAuth',
|
|
11397
|
+
scheme: 'bearer',
|
|
11398
|
+
type: 'http'
|
|
11399
|
+
}],
|
|
11400
|
+
url: '/registry/v1/packages/{package_id}',
|
|
11401
|
+
...options
|
|
11402
|
+
});
|
|
11403
|
+
/**
|
|
11404
|
+
* List versions
|
|
11405
|
+
*
|
|
11406
|
+
* 列出一个包的所有版本,含已撤回的。撤回的版本仍在列表里(它占着版本号),withdrawn 为 true,并带 withdraw_time。按发布顺序返回。
|
|
11407
|
+
*/
|
|
11408
|
+
export const registryPackagesVersionsList = (options) => (options.client ?? client).get({
|
|
11409
|
+
security: [{
|
|
11410
|
+
key: 'registry-bearerAuth',
|
|
11411
|
+
scheme: 'bearer',
|
|
11412
|
+
type: 'http'
|
|
11413
|
+
}],
|
|
11414
|
+
url: '/registry/v1/packages/{package_id}/versions',
|
|
11415
|
+
...options
|
|
11416
|
+
});
|
|
11417
|
+
/**
|
|
11418
|
+
* Publish a version
|
|
11419
|
+
*
|
|
11420
|
+
* 给一个已有的包发新版本。请求体与 packages.create 相同(multipart:version 必填,archive 或 files 给内容),但种类和名字沿用这个包,不再从上传内容重判。version 必须比已发布的最高版本高(撤回的版本也占号,不能复用);比它低或相等返回 FAILED_PRECONDITION。title、description、tags 不填就沿用这个包现在显示的,不会被新版本里 SKILL.md 或 plugin.json 的描述覆盖;要改就在这次请求里给。作者不随新版本改变。
|
|
11421
|
+
*/
|
|
11422
|
+
export const registryPackagesVersionsCreate = (options) => (options.client ?? client).post({
|
|
11423
|
+
...formDataBodySerializer,
|
|
11424
|
+
security: [{
|
|
11425
|
+
key: 'registry-bearerAuth',
|
|
11426
|
+
scheme: 'bearer',
|
|
11427
|
+
type: 'http'
|
|
11428
|
+
}],
|
|
11429
|
+
url: '/registry/v1/packages/{package_id}/versions',
|
|
11430
|
+
...options,
|
|
11431
|
+
headers: {
|
|
11432
|
+
'Content-Type': null,
|
|
11433
|
+
...options.headers
|
|
11434
|
+
}
|
|
11435
|
+
});
|
|
11436
|
+
/**
|
|
11437
|
+
* List version contents
|
|
11438
|
+
*
|
|
11439
|
+
* 列出一个版本解压后的文件清单(路径和大小),用来在不下载整个包的前提下看它包含什么。路径是相对包根的,例如 SKILL.md 或 plugin/skills/review.md。已撤回的版本仍可读清单。
|
|
11440
|
+
*/
|
|
11441
|
+
export const registryPackagesVersionsContents = (options) => (options.client ?? client).get({
|
|
11442
|
+
security: [{
|
|
11443
|
+
key: 'registry-bearerAuth',
|
|
11444
|
+
scheme: 'bearer',
|
|
11445
|
+
type: 'http'
|
|
11446
|
+
}],
|
|
11447
|
+
url: '/registry/v1/packages/{package_id}/versions/{version}/contents',
|
|
11448
|
+
...options
|
|
11449
|
+
});
|
|
11450
|
+
/**
|
|
11451
|
+
* Download a file
|
|
11452
|
+
*
|
|
11453
|
+
* 下载一个版本里的单个文件,返回原始字节。path 是 contents 给出的路径,可以含斜杠(例如 plugin/skills/review.md)。用它按文件取内容,装到磁盘上时保留这个相对路径。不计入 downloads。
|
|
11454
|
+
*/
|
|
11455
|
+
export const registryPackagesVersionsFilesRetrieve = (options) => (options.client ?? client).get({
|
|
11456
|
+
security: [{
|
|
11457
|
+
key: 'registry-bearerAuth',
|
|
11458
|
+
scheme: 'bearer',
|
|
11459
|
+
type: 'http'
|
|
11460
|
+
}],
|
|
11461
|
+
url: '/registry/v1/packages/{package_id}/versions/{version}/files/{path}',
|
|
11462
|
+
...options
|
|
11463
|
+
});
|
|
11464
|
+
/**
|
|
11465
|
+
* Download version archive
|
|
11466
|
+
*
|
|
11467
|
+
* 下载一个版本的完整 zip 归档,用来整包安装或转存。每次调用都计入这个包的 downloads,所以不要为了看内容而反复拉 archive——先读 contents,只取需要的文件用 files 下载。
|
|
11468
|
+
*/
|
|
11469
|
+
export const registryPackagesVersionsArchive = (options) => (options.client ?? client).get({
|
|
11470
|
+
security: [{
|
|
11471
|
+
key: 'registry-bearerAuth',
|
|
11472
|
+
scheme: 'bearer',
|
|
11473
|
+
type: 'http'
|
|
11474
|
+
}],
|
|
11475
|
+
url: '/registry/v1/packages/{package_id}/versions/{version}/archive',
|
|
11476
|
+
...options
|
|
11477
|
+
});
|
|
11478
|
+
/**
|
|
11479
|
+
* Withdraw a version
|
|
11480
|
+
*
|
|
11481
|
+
* 撤回一个版本。撤回后它不再是 latest、不能被新装;已经装好的照常可用。版本号仍被占着,不能再用它发新版本。已经撤回的版本再撤回会返回 FAILED_PRECONDITION。撤回是不可逆的:要重新提供这个版本,用更高的版本号重新发布。
|
|
11482
|
+
*/
|
|
11483
|
+
export const registryPackagesVersionsWithdraw = (options) => (options.client ?? client).post({
|
|
11484
|
+
security: [{
|
|
11485
|
+
key: 'registry-bearerAuth',
|
|
11486
|
+
scheme: 'bearer',
|
|
11487
|
+
type: 'http'
|
|
11488
|
+
}],
|
|
11489
|
+
url: '/registry/v1/packages/{package_id}/versions/{version}:withdraw',
|
|
11490
|
+
...options
|
|
11491
|
+
});
|
|
11492
|
+
/**
|
|
11493
|
+
* List installations
|
|
11494
|
+
*
|
|
11495
|
+
* 列出这个包装在哪些智能体和电脑上。每次读取都会和目标那边对账,以目标现在的实际情况为准,所以每条记录的 state 是读取这一刻的结论:installed 表示目标上有它且版本与记录一致;drifted 表示目标上有它但版本不同,此时 version 显示目标上的版本;missing 表示目标上已经没有它(被人在智能体或电脑那边删掉了),记录仍保留,可以用 installations.delete 清掉,或用 installations.update 重新装回;unknown 表示这次问不到目标,不代表没装,稍后重读。withdrawn 表示这条记录的版本已被撤回。一次返回全部记录,没有分页,按创建时间排序。
|
|
11496
|
+
*/
|
|
11497
|
+
export const registryPackagesInstallationsList = (options) => (options.client ?? client).get({
|
|
11498
|
+
security: [{
|
|
11499
|
+
key: 'registry-bearerAuth',
|
|
11500
|
+
scheme: 'bearer',
|
|
11501
|
+
type: 'http'
|
|
11502
|
+
}],
|
|
11503
|
+
url: '/registry/v1/packages/{package_id}/installations',
|
|
11504
|
+
...options
|
|
11505
|
+
});
|
|
11506
|
+
/**
|
|
11507
|
+
* Install a package
|
|
11508
|
+
*
|
|
11509
|
+
* 把一个包装到目标上:技能装到智能体(agent_ids),插件装到电脑(computer_ids),一次最多 50 个目标;目标种类给错会被拒(400),包的种类可从 packages.retrieve 的 kind 得知。技能装的是具体版本,version 省略时装最新版,之后不会自动升级,要换版本用 installations.update。插件只能装库里的最新版本,version 若给了就必须等于最新版,否则 FAILED_PRECONDITION。撤回的版本不能新装。同一目标重复装同一个包不会报错,而是把它移到这个版本。技能被拒的情形:智能体上已有同名的另一个技能(名字冲突),或这个智能体已经有 20 个技能。各目标独立处理:只要有一个成功就返回 201,成功的在 data 里,失败的目标在 errors 里逐个列出 target_id、code 和 message,按消息修正后只对失败的目标重发;全部失败时不返回 201,而是按第一个失败返回错误状态。装到智能体或电脑上要求调用者本人有权限,权限不足会出现在该目标的 errors 里。
|
|
11510
|
+
*/
|
|
11511
|
+
export const registryPackagesInstallationsCreate = (options) => (options.client ?? client).post({
|
|
11512
|
+
security: [{
|
|
11513
|
+
key: 'registry-bearerAuth',
|
|
11514
|
+
scheme: 'bearer',
|
|
11515
|
+
type: 'http'
|
|
11516
|
+
}],
|
|
11517
|
+
url: '/registry/v1/packages/{package_id}/installations',
|
|
11518
|
+
...options,
|
|
11519
|
+
headers: {
|
|
11520
|
+
'Content-Type': 'application/json',
|
|
11521
|
+
...options.headers
|
|
11522
|
+
}
|
|
11523
|
+
});
|
|
11524
|
+
/**
|
|
11525
|
+
* Update an installation
|
|
11526
|
+
*
|
|
11527
|
+
* 把一条安装记录换到另一个版本。技能可以换到任何未撤回的版本(升级或回退),version 省略时换到最新版;插件只能换到库里的最新版本,version 给了也必须等于最新版。撤回的版本不能换过去。对账为 missing 的记录用它可以重新装回去。同名冲突和 20 个技能上限的规则与安装时相同。
|
|
11528
|
+
*/
|
|
11529
|
+
export const registryInstallationsUpdate = (options) => (options.client ?? client).post({
|
|
11530
|
+
security: [{
|
|
11531
|
+
key: 'registry-bearerAuth',
|
|
11532
|
+
scheme: 'bearer',
|
|
11533
|
+
type: 'http'
|
|
11534
|
+
}],
|
|
11535
|
+
url: '/registry/v1/installations/{installation_id}:update',
|
|
11536
|
+
...options,
|
|
11537
|
+
headers: {
|
|
11538
|
+
'Content-Type': 'application/json',
|
|
11539
|
+
...options.headers
|
|
11540
|
+
}
|
|
11541
|
+
});
|
|
11542
|
+
/**
|
|
11543
|
+
* Remove an installation
|
|
11544
|
+
*
|
|
11545
|
+
* 把包从目标上卸下来,并删掉这条安装记录:技能从智能体的技能列表里移除,插件从电脑上卸载。目标那边已经没有它时也算完成。包本身和它的版本不受影响,之后可以重新安装。记录删除后重发会 404,所以删除前先用 installations.list 确认。
|
|
11546
|
+
*/
|
|
11547
|
+
export const registryInstallationsDelete = (options) => (options.client ?? client).delete({
|
|
11548
|
+
security: [{
|
|
11549
|
+
key: 'registry-bearerAuth',
|
|
11550
|
+
scheme: 'bearer',
|
|
11551
|
+
type: 'http'
|
|
11552
|
+
}],
|
|
11553
|
+
url: '/registry/v1/installations/{installation_id}',
|
|
11554
|
+
...options
|
|
11555
|
+
});
|
|
11119
11556
|
/**
|
|
11120
11557
|
* List sandboxes (v2)
|
|
11121
11558
|
*
|
|
@@ -12236,6 +12673,66 @@ export const searchMap = (options) => (options.client ?? client).post({
|
|
|
12236
12673
|
...options.headers
|
|
12237
12674
|
}
|
|
12238
12675
|
});
|
|
12676
|
+
/**
|
|
12677
|
+
* List shares
|
|
12678
|
+
*
|
|
12679
|
+
* 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.
|
|
12680
|
+
*/
|
|
12681
|
+
export const shareListPermissions = (options) => (options?.client ?? client).get({
|
|
12682
|
+
security: [{
|
|
12683
|
+
key: 'share-bearerAuth',
|
|
12684
|
+
scheme: 'bearer',
|
|
12685
|
+
type: 'http'
|
|
12686
|
+
}],
|
|
12687
|
+
url: '/share/v1/permissions',
|
|
12688
|
+
...options
|
|
12689
|
+
});
|
|
12690
|
+
/**
|
|
12691
|
+
* Create share
|
|
12692
|
+
*
|
|
12693
|
+
* 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.
|
|
12694
|
+
*/
|
|
12695
|
+
export const shareCreatePermission = (options) => (options.client ?? client).post({
|
|
12696
|
+
security: [{
|
|
12697
|
+
key: 'share-bearerAuth',
|
|
12698
|
+
scheme: 'bearer',
|
|
12699
|
+
type: 'http'
|
|
12700
|
+
}],
|
|
12701
|
+
url: '/share/v1/permissions',
|
|
12702
|
+
...options,
|
|
12703
|
+
headers: {
|
|
12704
|
+
'Content-Type': 'application/json',
|
|
12705
|
+
...options.headers
|
|
12706
|
+
}
|
|
12707
|
+
});
|
|
12708
|
+
/**
|
|
12709
|
+
* Delete share
|
|
12710
|
+
*
|
|
12711
|
+
* 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.
|
|
12712
|
+
*/
|
|
12713
|
+
export const shareDeletePermission = (options) => (options.client ?? client).delete({
|
|
12714
|
+
security: [{
|
|
12715
|
+
key: 'share-bearerAuth',
|
|
12716
|
+
scheme: 'bearer',
|
|
12717
|
+
type: 'http'
|
|
12718
|
+
}],
|
|
12719
|
+
url: '/share/v1/permissions/{id}',
|
|
12720
|
+
...options
|
|
12721
|
+
});
|
|
12722
|
+
/**
|
|
12723
|
+
* Retrieve share
|
|
12724
|
+
*
|
|
12725
|
+
* 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.
|
|
12726
|
+
*/
|
|
12727
|
+
export const shareRetrievePermission = (options) => (options.client ?? client).get({
|
|
12728
|
+
security: [{
|
|
12729
|
+
key: 'share-bearerAuth',
|
|
12730
|
+
scheme: 'bearer',
|
|
12731
|
+
type: 'http'
|
|
12732
|
+
}],
|
|
12733
|
+
url: '/share/v1/permissions/{id}',
|
|
12734
|
+
...options
|
|
12735
|
+
});
|
|
12239
12736
|
/**
|
|
12240
12737
|
* List the genres Studio can write
|
|
12241
12738
|
*
|