@deepraxis/sdk 0.1.1-dev.80337c3 → 0.1.1-dev.830431a

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.
@@ -42,9 +42,9 @@ export const sendAgentEvents = (options) => (options.client ?? client).post({
42
42
  }
43
43
  });
44
44
  /**
45
- * Follow your conversation with an agent live
45
+ * Follow an agent live
46
46
  *
47
- * Follow your conversation with a personal or general agent live over Server-Sent Events: the stream of your own main session with that agent, the same stream sessions.events.stream opens, event_deltas[] previews included. {agent_id} takes the agent_… id, the eight character identity number or the handle; a service or assume agent answers 400. Closing the stream only drops your subscription and does not stop the agent; read past events with agents.events.list.
47
+ * Follow an agent live over Server-Sent Events. For a personal or 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
  *
@@ -4032,7 +4050,7 @@ export const sessionsArchive = (options) => (options.client ?? client).post({
4032
4050
  /**
4033
4051
  * List session events
4034
4052
  *
4035
- * 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, 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.
4036
4054
  */
4037
4055
  export const sessionsEventsList = (options) => (options.client ?? client).get({
4038
4056
  security: [{
@@ -9886,7 +9904,7 @@ export const devopsUnitsFetch = (options) => (options.client ?? client).post({
9886
9904
  /**
9887
9905
  * Push a unit's branch
9888
9906
  *
9889
- * 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.
9890
9908
  */
9891
9909
  export const devopsUnitsPush = (options) => (options.client ?? client).post({
9892
9910
  security: [{
@@ -12345,6 +12363,66 @@ export const searchMap = (options) => (options.client ?? client).post({
12345
12363
  ...options.headers
12346
12364
  }
12347
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
+ });
12348
12426
  /**
12349
12427
  * List the genres Studio can write
12350
12428
  *