@arbidocs/client 0.3.168 → 0.3.170

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/dist/index.d.cts CHANGED
@@ -427,10 +427,11 @@ interface paths {
427
427
  head?: never;
428
428
  /**
429
429
  * Patch Session
430
- * @description Expire (ttl=0) or reset the remaining TTL of one of the caller's own sessions.
430
+ * @description Expire (ttl=0) or shorten the remaining TTL of one of the caller's own sessions.
431
431
  *
432
432
  * Agents (as with /logout) may only touch their own session; principals may target
433
433
  * any session in their session set, including ones other than the one they're on.
434
+ * Cannot increase a session's TTL — see patch_session_ttl's docstring for why.
434
435
  */
435
436
  patch: operations['patch_session'];
436
437
  trace?: never;
@@ -2345,6 +2346,53 @@ interface paths {
2345
2346
  patch?: never;
2346
2347
  trace?: never;
2347
2348
  };
2349
+ '/v1/agents/authorize-limits': {
2350
+ parameters: {
2351
+ query?: never;
2352
+ header?: never;
2353
+ path?: never;
2354
+ cookie?: never;
2355
+ };
2356
+ /** Get Authorize Limits */
2357
+ get: operations['get_authorize_limits'];
2358
+ put?: never;
2359
+ post?: never;
2360
+ delete?: never;
2361
+ options?: never;
2362
+ head?: never;
2363
+ patch?: never;
2364
+ trace?: never;
2365
+ };
2366
+ '/v1/agents/{agent_ext_id}/authorize': {
2367
+ parameters: {
2368
+ query?: never;
2369
+ header?: never;
2370
+ path?: never;
2371
+ cookie?: never;
2372
+ };
2373
+ get?: never;
2374
+ put?: never;
2375
+ /**
2376
+ * Authorize Agent
2377
+ * @description Mint a fresh, TTL'd session for the caller's own agent.
2378
+ *
2379
+ * Standalone version of the session-mint step ``useRunTaskWithAuth`` performs
2380
+ * inline for a task run (``POST /v1/tasks/{id}/run``) — same primitive
2381
+ * (:func:`mint_agent_session`), just triggerable on its own instead of bundled
2382
+ * into running something. Returns the session's public key so the caller's
2383
+ * client can immediately deposit a temporary workspace key onto it via the
2384
+ * ordinary ``POST /v1/workspace/users`` (``session_pubkey_b64`` branch) —
2385
+ * mirroring the task flow's second step exactly. The session's remaining
2386
+ * time can be checked or ended early afterward via the generic session
2387
+ * endpoints, not extended (see the module docstring above).
2388
+ */
2389
+ post: operations['authorize_agent'];
2390
+ delete?: never;
2391
+ options?: never;
2392
+ head?: never;
2393
+ patch?: never;
2394
+ trace?: never;
2395
+ };
2348
2396
  '/v1/agents/{agent_ext_id}': {
2349
2397
  parameters: {
2350
2398
  query?: never;
@@ -4666,6 +4714,46 @@ interface components {
4666
4714
  /** Reason */
4667
4715
  reason?: string | null;
4668
4716
  };
4717
+ /**
4718
+ * AuthorizeAgentRequest
4719
+ * @description Body for POST /agents/{agent_ext_id}/authorize.
4720
+ */
4721
+ AuthorizeAgentRequest: {
4722
+ /** Workspace Ext Id */
4723
+ workspace_ext_id: string;
4724
+ /**
4725
+ * Ttl Seconds
4726
+ * @description Omit for the deployment default (see GET /agents/authorize-limits).
4727
+ */
4728
+ ttl_seconds?: number | null;
4729
+ };
4730
+ /**
4731
+ * AuthorizeAgentResponse
4732
+ * @description What the caller's client needs to deposit a temporary workspace key onto
4733
+ * the freshly-minted session — the same shape a task run's
4734
+ * ``pending_auth_session_pubkey`` / ``pending_auth_agent_email`` fields carry.
4735
+ */
4736
+ AuthorizeAgentResponse: {
4737
+ /** Session Pubkey B64 */
4738
+ session_pubkey_b64: string;
4739
+ /** Agent Email */
4740
+ agent_email: string;
4741
+ /** Ttl */
4742
+ ttl: number;
4743
+ };
4744
+ /**
4745
+ * AuthorizeLimitsResponse
4746
+ * @description Bounds for ``authorize``'s ``ttl_seconds`` — lets a client show/enforce
4747
+ * the real default and max instead of guessing or discovering them via a 422.
4748
+ * Deployment-tunable (``AGENT_AUTHORIZE_DEFAULT_TTL_SECONDS`` /
4749
+ * ``AGENT_AUTHORIZE_MAX_TTL_SECONDS`` env vars), not hardcoded to 4h.
4750
+ */
4751
+ AuthorizeLimitsResponse: {
4752
+ /** Default Ttl Seconds */
4753
+ default_ttl_seconds: number;
4754
+ /** Max Ttl Seconds */
4755
+ max_ttl_seconds: number;
4756
+ };
4669
4757
  /**
4670
4758
  * BatchCompleteMessage
4671
4759
  * @description Notification that a batch operation (upload or doctag generation) completed.
@@ -10081,7 +10169,7 @@ interface components {
10081
10169
  SessionTTLPatchRequest: {
10082
10170
  /**
10083
10171
  * Ttl
10084
- * @description New remaining TTL in seconds. 0 expires the session immediately; any other value resets its remaining time (capped at the server's max session TTL).
10172
+ * @description New remaining TTL in seconds. 0 expires the session immediately; any other value must be LESS than the session's current remaining TTL — sessions can be ended early or shortened, never extended.
10085
10173
  */
10086
10174
  ttl: number;
10087
10175
  };
@@ -15334,6 +15422,62 @@ interface operations {
15334
15422
  };
15335
15423
  };
15336
15424
  };
15425
+ get_authorize_limits: {
15426
+ parameters: {
15427
+ query?: never;
15428
+ header?: never;
15429
+ path?: never;
15430
+ cookie?: never;
15431
+ };
15432
+ requestBody?: never;
15433
+ responses: {
15434
+ /** @description Successful Response */
15435
+ 200: {
15436
+ headers: {
15437
+ [name: string]: unknown;
15438
+ };
15439
+ content: {
15440
+ 'application/json': components['schemas']['AuthorizeLimitsResponse'];
15441
+ };
15442
+ };
15443
+ };
15444
+ };
15445
+ authorize_agent: {
15446
+ parameters: {
15447
+ query?: never;
15448
+ header?: never;
15449
+ path: {
15450
+ /** @description Agent external id (agt-XXXXXXXX) */
15451
+ agent_ext_id: string;
15452
+ };
15453
+ cookie?: never;
15454
+ };
15455
+ requestBody: {
15456
+ content: {
15457
+ 'application/json': components['schemas']['AuthorizeAgentRequest'];
15458
+ };
15459
+ };
15460
+ responses: {
15461
+ /** @description Successful Response */
15462
+ 200: {
15463
+ headers: {
15464
+ [name: string]: unknown;
15465
+ };
15466
+ content: {
15467
+ 'application/json': components['schemas']['AuthorizeAgentResponse'];
15468
+ };
15469
+ };
15470
+ /** @description Validation Error */
15471
+ 422: {
15472
+ headers: {
15473
+ [name: string]: unknown;
15474
+ };
15475
+ content: {
15476
+ 'application/json': components['schemas']['HTTPValidationError'];
15477
+ };
15478
+ };
15479
+ };
15480
+ };
15337
15481
  update_agent: {
15338
15482
  parameters: {
15339
15483
  query?: never;
package/dist/index.d.ts CHANGED
@@ -427,10 +427,11 @@ interface paths {
427
427
  head?: never;
428
428
  /**
429
429
  * Patch Session
430
- * @description Expire (ttl=0) or reset the remaining TTL of one of the caller's own sessions.
430
+ * @description Expire (ttl=0) or shorten the remaining TTL of one of the caller's own sessions.
431
431
  *
432
432
  * Agents (as with /logout) may only touch their own session; principals may target
433
433
  * any session in their session set, including ones other than the one they're on.
434
+ * Cannot increase a session's TTL — see patch_session_ttl's docstring for why.
434
435
  */
435
436
  patch: operations['patch_session'];
436
437
  trace?: never;
@@ -2345,6 +2346,53 @@ interface paths {
2345
2346
  patch?: never;
2346
2347
  trace?: never;
2347
2348
  };
2349
+ '/v1/agents/authorize-limits': {
2350
+ parameters: {
2351
+ query?: never;
2352
+ header?: never;
2353
+ path?: never;
2354
+ cookie?: never;
2355
+ };
2356
+ /** Get Authorize Limits */
2357
+ get: operations['get_authorize_limits'];
2358
+ put?: never;
2359
+ post?: never;
2360
+ delete?: never;
2361
+ options?: never;
2362
+ head?: never;
2363
+ patch?: never;
2364
+ trace?: never;
2365
+ };
2366
+ '/v1/agents/{agent_ext_id}/authorize': {
2367
+ parameters: {
2368
+ query?: never;
2369
+ header?: never;
2370
+ path?: never;
2371
+ cookie?: never;
2372
+ };
2373
+ get?: never;
2374
+ put?: never;
2375
+ /**
2376
+ * Authorize Agent
2377
+ * @description Mint a fresh, TTL'd session for the caller's own agent.
2378
+ *
2379
+ * Standalone version of the session-mint step ``useRunTaskWithAuth`` performs
2380
+ * inline for a task run (``POST /v1/tasks/{id}/run``) — same primitive
2381
+ * (:func:`mint_agent_session`), just triggerable on its own instead of bundled
2382
+ * into running something. Returns the session's public key so the caller's
2383
+ * client can immediately deposit a temporary workspace key onto it via the
2384
+ * ordinary ``POST /v1/workspace/users`` (``session_pubkey_b64`` branch) —
2385
+ * mirroring the task flow's second step exactly. The session's remaining
2386
+ * time can be checked or ended early afterward via the generic session
2387
+ * endpoints, not extended (see the module docstring above).
2388
+ */
2389
+ post: operations['authorize_agent'];
2390
+ delete?: never;
2391
+ options?: never;
2392
+ head?: never;
2393
+ patch?: never;
2394
+ trace?: never;
2395
+ };
2348
2396
  '/v1/agents/{agent_ext_id}': {
2349
2397
  parameters: {
2350
2398
  query?: never;
@@ -4666,6 +4714,46 @@ interface components {
4666
4714
  /** Reason */
4667
4715
  reason?: string | null;
4668
4716
  };
4717
+ /**
4718
+ * AuthorizeAgentRequest
4719
+ * @description Body for POST /agents/{agent_ext_id}/authorize.
4720
+ */
4721
+ AuthorizeAgentRequest: {
4722
+ /** Workspace Ext Id */
4723
+ workspace_ext_id: string;
4724
+ /**
4725
+ * Ttl Seconds
4726
+ * @description Omit for the deployment default (see GET /agents/authorize-limits).
4727
+ */
4728
+ ttl_seconds?: number | null;
4729
+ };
4730
+ /**
4731
+ * AuthorizeAgentResponse
4732
+ * @description What the caller's client needs to deposit a temporary workspace key onto
4733
+ * the freshly-minted session — the same shape a task run's
4734
+ * ``pending_auth_session_pubkey`` / ``pending_auth_agent_email`` fields carry.
4735
+ */
4736
+ AuthorizeAgentResponse: {
4737
+ /** Session Pubkey B64 */
4738
+ session_pubkey_b64: string;
4739
+ /** Agent Email */
4740
+ agent_email: string;
4741
+ /** Ttl */
4742
+ ttl: number;
4743
+ };
4744
+ /**
4745
+ * AuthorizeLimitsResponse
4746
+ * @description Bounds for ``authorize``'s ``ttl_seconds`` — lets a client show/enforce
4747
+ * the real default and max instead of guessing or discovering them via a 422.
4748
+ * Deployment-tunable (``AGENT_AUTHORIZE_DEFAULT_TTL_SECONDS`` /
4749
+ * ``AGENT_AUTHORIZE_MAX_TTL_SECONDS`` env vars), not hardcoded to 4h.
4750
+ */
4751
+ AuthorizeLimitsResponse: {
4752
+ /** Default Ttl Seconds */
4753
+ default_ttl_seconds: number;
4754
+ /** Max Ttl Seconds */
4755
+ max_ttl_seconds: number;
4756
+ };
4669
4757
  /**
4670
4758
  * BatchCompleteMessage
4671
4759
  * @description Notification that a batch operation (upload or doctag generation) completed.
@@ -10081,7 +10169,7 @@ interface components {
10081
10169
  SessionTTLPatchRequest: {
10082
10170
  /**
10083
10171
  * Ttl
10084
- * @description New remaining TTL in seconds. 0 expires the session immediately; any other value resets its remaining time (capped at the server's max session TTL).
10172
+ * @description New remaining TTL in seconds. 0 expires the session immediately; any other value must be LESS than the session's current remaining TTL — sessions can be ended early or shortened, never extended.
10085
10173
  */
10086
10174
  ttl: number;
10087
10175
  };
@@ -15334,6 +15422,62 @@ interface operations {
15334
15422
  };
15335
15423
  };
15336
15424
  };
15425
+ get_authorize_limits: {
15426
+ parameters: {
15427
+ query?: never;
15428
+ header?: never;
15429
+ path?: never;
15430
+ cookie?: never;
15431
+ };
15432
+ requestBody?: never;
15433
+ responses: {
15434
+ /** @description Successful Response */
15435
+ 200: {
15436
+ headers: {
15437
+ [name: string]: unknown;
15438
+ };
15439
+ content: {
15440
+ 'application/json': components['schemas']['AuthorizeLimitsResponse'];
15441
+ };
15442
+ };
15443
+ };
15444
+ };
15445
+ authorize_agent: {
15446
+ parameters: {
15447
+ query?: never;
15448
+ header?: never;
15449
+ path: {
15450
+ /** @description Agent external id (agt-XXXXXXXX) */
15451
+ agent_ext_id: string;
15452
+ };
15453
+ cookie?: never;
15454
+ };
15455
+ requestBody: {
15456
+ content: {
15457
+ 'application/json': components['schemas']['AuthorizeAgentRequest'];
15458
+ };
15459
+ };
15460
+ responses: {
15461
+ /** @description Successful Response */
15462
+ 200: {
15463
+ headers: {
15464
+ [name: string]: unknown;
15465
+ };
15466
+ content: {
15467
+ 'application/json': components['schemas']['AuthorizeAgentResponse'];
15468
+ };
15469
+ };
15470
+ /** @description Validation Error */
15471
+ 422: {
15472
+ headers: {
15473
+ [name: string]: unknown;
15474
+ };
15475
+ content: {
15476
+ 'application/json': components['schemas']['HTTPValidationError'];
15477
+ };
15478
+ };
15479
+ };
15480
+ };
15337
15481
  update_agent: {
15338
15482
  parameters: {
15339
15483
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbidocs/client",
3
- "version": "0.3.168",
3
+ "version": "0.3.170",
4
4
  "description": "TypeScript SDK for the ARBI API — zero-knowledge auth, E2E encryption, and type-safe REST client",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",