@north-light/cli 0.3.558 → 0.3.559

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.
Files changed (45) hide show
  1. package/dist/api/contract.d.ts +1 -1
  2. package/dist/api/contract.js +1 -1
  3. package/dist/api/dto/exec.d.ts +10 -0
  4. package/dist/api/dto/exec.js +0 -0
  5. package/dist/api/error-codes.d.ts +15 -0
  6. package/dist/api/error-codes.js +1 -1
  7. package/dist/api/index.d.ts +1 -0
  8. package/dist/api/index.js +1 -1
  9. package/dist/api/routes.d.ts +1 -0
  10. package/dist/api/routes.js +1 -1
  11. package/dist/build-root.js +1 -1
  12. package/dist/builtin-memory/crouter-sdk/release-notes.md +8 -0
  13. package/dist/builtin-memory/crouter-sdk/resources.md +1 -1
  14. package/dist/clients/attach/viewer.js +130 -130
  15. package/dist/core/canvas/crons.d.ts +4 -1
  16. package/dist/core/canvas/crons.js +5 -5
  17. package/dist/core/canvas/schema-pg/004-cron-armed-from-exec.sql +6 -0
  18. package/dist/core/canvas/schema-version.d.ts +1 -1
  19. package/dist/core/canvas/schema-version.js +1 -1
  20. package/dist/core/io.js +5 -5
  21. package/dist/core/model-auth/readiness.d.ts +12 -0
  22. package/dist/core/model-auth/readiness.js +1 -0
  23. package/dist/daemon/api/app-listener.js +13 -13
  24. package/dist/daemon/api/handlers/crons.js +1 -1
  25. package/dist/daemon/api/handlers/exec.d.ts +6 -0
  26. package/dist/daemon/api/handlers/exec.js +1 -0
  27. package/dist/daemon/api/handlers/modelauth.js +1 -1
  28. package/dist/daemon/api/handlers/nodes.js +1 -1
  29. package/dist/daemon/api/operations.js +1 -1
  30. package/dist/daemon/api/router.d.ts +11 -4
  31. package/dist/daemon/cron/armed-context.d.ts +2 -1
  32. package/dist/daemon/cron/armed-context.js +1 -1
  33. package/dist/daemon/cron/authority.d.ts +16 -4
  34. package/dist/daemon/cron/authority.js +1 -1
  35. package/dist/daemon/cron/escalation.js +3 -3
  36. package/dist/daemon/cron/live-runs.d.ts +12 -3
  37. package/dist/daemon/cron/run-socket.js +1 -1
  38. package/dist/daemon/cron/sinks.js +2 -2
  39. package/dist/daemon/cron-run.js +2 -2
  40. package/dist/daemon/reconcilers/action-lane.js +1 -1
  41. package/docs/sdk/release-notes.md +8 -0
  42. package/docs/sdk/resources.md +1 -1
  43. package/package.json +2 -2
  44. package/packages/crouter-identity/package.json +1 -1
  45. package/runtime.lock.json +13 -13
@@ -1,5 +1,5 @@
1
1
  /** The contract level this build serves and requires. Written by `scripts/contract.mjs release`; never edit by hand. */
2
- export declare const CONTRACT_LEVEL = "1.33";
2
+ export declare const CONTRACT_LEVEL = "1.34";
3
3
  /** Request header naming the one contract level the caller needs, e.g. `1.3`. Optional: absent means no check. */
4
4
  export declare const REQUIRED_CONTRACT_HEADER = "Crouter-Required-Contract";
5
5
  /** Response header listing the contract levels the server serves, comma-separated, one per major, e.g. `1.3`. */
@@ -1 +1 @@
1
- var c=Object.defineProperty;var e=(r,t)=>c(r,"name",{value:t,configurable:!0});const f="1.33",i="Crouter-Required-Contract",p="Crouter-Contract";function l(r){const t=/^(\d+)\.(\d+)$/.exec(r.trim());return t===null?null:{major:Number(t[1]),minor:Number(t[2])}}e(l,"parseContractLevel");function a(r){return r==null?[]:r.split(",").map(t=>l(t)).filter(t=>t!==null)}e(a,"parseServedContracts");function s(r,t){const n=l(r);return n===null?!1:(typeof t=="string"||t===null||t===void 0?a(t):t).some(u=>u.major===n.major&&u.minor>=n.minor)}e(s,"contractSatisfies");function C(r,t,n={}){if(r===void 0)return null;if(l(r)===null)return{status:400,code:"invalid_request",param:i,message:`${i} must be a contract level like 1.0.`};if(s(r,t))return null;const o=r.trim();return{status:426,code:"runtime_version_unsupported",message:t===null||a(t).length===0?`The runtime did not name its contract level; the caller requires contract ${o} or later. Roll the runtime forward.`:`The runtime serves contract ${t}; the caller requires contract ${o} or later within the same major. Roll the runtime forward, or pin an SDK whose crouterContract the runtime serves.`,details:{sdk_version:(n.legacyMinimum??"").trim(),runtime_version:n.runtimeVersion??null,required_contract:o,runtime_contract:t}}}e(C,"contractRefusal");export{p as CONTRACT_HEADER,f as CONTRACT_LEVEL,i as REQUIRED_CONTRACT_HEADER,C as contractRefusal,s as contractSatisfies,l as parseContractLevel,a as parseServedContracts};
1
+ var c=Object.defineProperty;var e=(r,t)=>c(r,"name",{value:t,configurable:!0});const f="1.34",i="Crouter-Required-Contract",p="Crouter-Contract";function l(r){const t=/^(\d+)\.(\d+)$/.exec(r.trim());return t===null?null:{major:Number(t[1]),minor:Number(t[2])}}e(l,"parseContractLevel");function a(r){return r==null?[]:r.split(",").map(t=>l(t)).filter(t=>t!==null)}e(a,"parseServedContracts");function s(r,t){const n=l(r);return n===null?!1:(typeof t=="string"||t===null||t===void 0?a(t):t).some(u=>u.major===n.major&&u.minor>=n.minor)}e(s,"contractSatisfies");function C(r,t,n={}){if(r===void 0)return null;if(l(r)===null)return{status:400,code:"invalid_request",param:i,message:`${i} must be a contract level like 1.0.`};if(s(r,t))return null;const o=r.trim();return{status:426,code:"runtime_version_unsupported",message:t===null||a(t).length===0?`The runtime did not name its contract level; the caller requires contract ${o} or later. Roll the runtime forward.`:`The runtime serves contract ${t}; the caller requires contract ${o} or later within the same major. Roll the runtime forward, or pin an SDK whose crouterContract the runtime serves.`,details:{sdk_version:(n.legacyMinimum??"").trim(),runtime_version:n.runtimeVersion??null,required_contract:o,runtime_contract:t}}}e(C,"contractRefusal");export{p as CONTRACT_HEADER,f as CONTRACT_LEVEL,i as REQUIRED_CONTRACT_HEADER,C as contractRefusal,s as contractSatisfies,l as parseContractLevel,a as parseServedContracts};
@@ -0,0 +1,10 @@
1
+ import type { BashRunDTO } from './bash.js';
2
+ /** `POST /v1/exec`: run the `crtr` binary with `argv` (no shell, no stdin) in the calling app's sandbox. */
3
+ export interface ExecRunParams {
4
+ /** Arguments after `crtr`; at least one, under 32 KB as JSON text. */
5
+ argv: string[];
6
+ /** Seconds before the process is killed; default 60, at most 100. */
7
+ timeout_s?: number;
8
+ }
9
+ /** A non-zero exit or a timeout is still a 200 with this body. */
10
+ export type ExecRunDTO = BashRunDTO;
File without changes
@@ -134,6 +134,11 @@ export declare const errorCodes: {
134
134
  readonly status: 409;
135
135
  readonly retryable: false;
136
136
  };
137
+ readonly model_sign_in_required: {
138
+ readonly type: "invalid_request_error";
139
+ readonly status: 409;
140
+ readonly retryable: false;
141
+ };
137
142
  readonly invalid_argument: {
138
143
  readonly type: "invalid_request_error";
139
144
  readonly status: 400;
@@ -214,6 +219,11 @@ export declare const errorCodes: {
214
219
  readonly status: 429;
215
220
  readonly retryable: true;
216
221
  };
222
+ readonly busy: {
223
+ readonly type: "rate_limit_error";
224
+ readonly status: 429;
225
+ readonly retryable: true;
226
+ };
217
227
  readonly runtime_unreachable: {
218
228
  readonly type: "server_error";
219
229
  readonly status: 503;
@@ -224,6 +234,11 @@ export declare const errorCodes: {
224
234
  readonly status: 503;
225
235
  readonly retryable: true;
226
236
  };
237
+ readonly sandbox_unavailable: {
238
+ readonly type: "server_error";
239
+ readonly status: 503;
240
+ readonly retryable: false;
241
+ };
227
242
  readonly runtime_starting: {
228
243
  readonly type: "server_error";
229
244
  readonly status: 503;
@@ -1 +1 @@
1
- const e={unauthorized:{type:"authentication_error",status:401,retryable:!1},machine_revoked:{type:"authentication_error",status:401,retryable:!1},grant_revoked:{type:"authentication_error",status:401,retryable:!1},grant_removed:{type:"authentication_error",status:401,retryable:!1},grant_suspended:{type:"authentication_error",status:401,retryable:!1},refresh_token_expired:{type:"authentication_error",status:401,retryable:!1},refresh_token_reused:{type:"authentication_error",status:401,retryable:!1},scope_missing:{type:"permission_error",status:403,retryable:!1},owner_only:{type:"permission_error",status:403,retryable:!1},other_app_run:{type:"permission_error",status:403,retryable:!1},payer_not_app:{type:"permission_error",status:403,retryable:!1},approval_pending:{type:"permission_error",status:403,retryable:!1},user_denied:{type:"permission_error",status:403,retryable:!1},provider_refused:{type:"permission_error",status:403,retryable:!1},provider_not_connected:{type:"permission_error",status:403,retryable:!1},provider_setup_pending:{type:"permission_error",status:403,retryable:!1},question_pages_off:{type:"permission_error",status:403,retryable:!1},unsandboxed_machine:{type:"permission_error",status:403,retryable:!1},app_not_granted:{type:"permission_error",status:403,retryable:!1},isolated_run:{type:"permission_error",status:403,retryable:!1},provider_version_retired:{type:"permission_error",status:403,retryable:!1},invalid_scope:{type:"invalid_request_error",status:400,retryable:!1},invalid_request:{type:"invalid_request_error",status:400,retryable:!1},range_not_satisfiable:{type:"invalid_request_error",status:416,retryable:!1},not_here:{type:"invalid_request_error",status:404,retryable:!1},peer_version_too_old:{type:"invalid_request_error",status:426,retryable:!1},conflict:{type:"invalid_request_error",status:409,retryable:!1},invalid_argument:{type:"invalid_request_error",status:400,retryable:!1},machine_required:{type:"invalid_request_error",status:409,retryable:!1},device_offline:{type:"server_error",status:503,retryable:!0},device_timeout:{type:"server_error",status:504,retryable:!0},device_disconnected:{type:"server_error",status:503,retryable:!1},not_found:{type:"invalid_request_error",status:404,retryable:!1},model_unavailable:{type:"invalid_request_error",status:404,retryable:!1},upstream_model_unavailable:{type:"server_error",status:503,retryable:!0},substitution_refused:{type:"invalid_request_error",status:400,retryable:!1},idempotency_conflict:{type:"invalid_request_error",status:409,retryable:!1},run_settled:{type:"invalid_request_error",status:409,retryable:!1},cap_exhausted:{type:"rate_limit_error",status:402,retryable:!1},concurrency_limit:{type:"rate_limit_error",status:429,retryable:!0},all_routes_exhausted:{type:"rate_limit_error",status:429,retryable:!0},provider_rate_limited:{type:"rate_limit_error",status:429,retryable:!0},rate_limited:{type:"rate_limit_error",status:429,retryable:!0},runtime_unreachable:{type:"server_error",status:503,retryable:!0},isolated_unavailable:{type:"server_error",status:503,retryable:!0},runtime_starting:{type:"server_error",status:503,retryable:!0},runtime_provisioning:{type:"server_error",status:503,retryable:!0},provider_unavailable:{type:"server_error",status:503,retryable:!0},upstream_refused:{type:"server_error",status:502,retryable:!1},provider_bad_response:{type:"server_error",status:502,retryable:!1},service_unavailable:{type:"server_error",status:503,retryable:!0},not_implemented:{type:"server_error",status:501,retryable:!1},permission_error:{type:"permission_error",status:403,retryable:!1},storage_unavailable:{type:"server_error",status:503,retryable:!0},server_error:{type:"server_error",status:500,retryable:!0},server_failure:{type:"server_error",status:500,retryable:!1},wake_timeout:{type:"server_error",status:504,retryable:!0}};export{e as errorCodes};
1
+ const e={unauthorized:{type:"authentication_error",status:401,retryable:!1},machine_revoked:{type:"authentication_error",status:401,retryable:!1},grant_revoked:{type:"authentication_error",status:401,retryable:!1},grant_removed:{type:"authentication_error",status:401,retryable:!1},grant_suspended:{type:"authentication_error",status:401,retryable:!1},refresh_token_expired:{type:"authentication_error",status:401,retryable:!1},refresh_token_reused:{type:"authentication_error",status:401,retryable:!1},scope_missing:{type:"permission_error",status:403,retryable:!1},owner_only:{type:"permission_error",status:403,retryable:!1},other_app_run:{type:"permission_error",status:403,retryable:!1},payer_not_app:{type:"permission_error",status:403,retryable:!1},approval_pending:{type:"permission_error",status:403,retryable:!1},user_denied:{type:"permission_error",status:403,retryable:!1},provider_refused:{type:"permission_error",status:403,retryable:!1},provider_not_connected:{type:"permission_error",status:403,retryable:!1},provider_setup_pending:{type:"permission_error",status:403,retryable:!1},question_pages_off:{type:"permission_error",status:403,retryable:!1},unsandboxed_machine:{type:"permission_error",status:403,retryable:!1},app_not_granted:{type:"permission_error",status:403,retryable:!1},isolated_run:{type:"permission_error",status:403,retryable:!1},provider_version_retired:{type:"permission_error",status:403,retryable:!1},invalid_scope:{type:"invalid_request_error",status:400,retryable:!1},invalid_request:{type:"invalid_request_error",status:400,retryable:!1},range_not_satisfiable:{type:"invalid_request_error",status:416,retryable:!1},not_here:{type:"invalid_request_error",status:404,retryable:!1},peer_version_too_old:{type:"invalid_request_error",status:426,retryable:!1},conflict:{type:"invalid_request_error",status:409,retryable:!1},model_sign_in_required:{type:"invalid_request_error",status:409,retryable:!1},invalid_argument:{type:"invalid_request_error",status:400,retryable:!1},machine_required:{type:"invalid_request_error",status:409,retryable:!1},device_offline:{type:"server_error",status:503,retryable:!0},device_timeout:{type:"server_error",status:504,retryable:!0},device_disconnected:{type:"server_error",status:503,retryable:!1},not_found:{type:"invalid_request_error",status:404,retryable:!1},model_unavailable:{type:"invalid_request_error",status:404,retryable:!1},upstream_model_unavailable:{type:"server_error",status:503,retryable:!0},substitution_refused:{type:"invalid_request_error",status:400,retryable:!1},idempotency_conflict:{type:"invalid_request_error",status:409,retryable:!1},run_settled:{type:"invalid_request_error",status:409,retryable:!1},cap_exhausted:{type:"rate_limit_error",status:402,retryable:!1},concurrency_limit:{type:"rate_limit_error",status:429,retryable:!0},all_routes_exhausted:{type:"rate_limit_error",status:429,retryable:!0},provider_rate_limited:{type:"rate_limit_error",status:429,retryable:!0},rate_limited:{type:"rate_limit_error",status:429,retryable:!0},busy:{type:"rate_limit_error",status:429,retryable:!0},runtime_unreachable:{type:"server_error",status:503,retryable:!0},isolated_unavailable:{type:"server_error",status:503,retryable:!0},sandbox_unavailable:{type:"server_error",status:503,retryable:!1},runtime_starting:{type:"server_error",status:503,retryable:!0},runtime_provisioning:{type:"server_error",status:503,retryable:!0},provider_unavailable:{type:"server_error",status:503,retryable:!0},upstream_refused:{type:"server_error",status:502,retryable:!1},provider_bad_response:{type:"server_error",status:502,retryable:!1},service_unavailable:{type:"server_error",status:503,retryable:!0},not_implemented:{type:"server_error",status:501,retryable:!1},permission_error:{type:"permission_error",status:403,retryable:!1},storage_unavailable:{type:"server_error",status:503,retryable:!0},server_error:{type:"server_error",status:500,retryable:!0},server_failure:{type:"server_error",status:500,retryable:!1},wake_timeout:{type:"server_error",status:504,retryable:!0}};export{e as errorCodes};
@@ -42,6 +42,7 @@ export * from './dto/worktree.js';
42
42
  export * from './dto/human.js';
43
43
  export * from './dto/files.js';
44
44
  export * from './dto/bash.js';
45
+ export * from './dto/exec.js';
45
46
  export * from './dto/inbox.js';
46
47
  export * from './dto/human-requests.js';
47
48
  export * from './dto/reviews.js';
package/dist/api/index.js CHANGED
@@ -1 +1 @@
1
- import{CrtrClient as e,deadlineExceeded as t,MAX_TIMER_MS as m,sleepWithin as p,waitForDaemonAvailability as f}from"./client.js";import{APIError as E,ApiError as R,isErrorBody as _}from"./errors.js";import{errorCodes as i}from"./error-codes.js";import{API_VERSION as s,routes as n}from"./routes.js";import{RUNTIME_VERSION_HEADER as C,MINIMUM_RUNTIME_VERSION_HEADER as I,compareReleaseVersions as N,minimumRuntimeRefusal as O}from"./runtime-version.js";import{CONTRACT_HEADER as d,CONTRACT_LEVEL as S,REQUIRED_CONTRACT_HEADER as c,contractRefusal as L,contractSatisfies as M,parseContractLevel as u,parseServedContracts as D}from"./contract.js";import{LONG_POLL_MAX_WAIT_SECONDS as H,LONG_POLL_ROUTES as U,longPollHoldSeconds as V,longPollRoute as v,requestedWait as W}from"./long-poll.js";export*from"../shared/generated-context.js";export*from"./dto/common.js";export*from"./dto/health.js";export*from"./dto/limits.js";export*from"./dto/grants.js";export*from"./dto/usage.js";export*from"./dto/charges.js";export*from"./dto/nodes.js";export*from"./dto/node-outcomes.js";export*from"./dto/node-events.js";export*from"./dto/run-events.js";export*from"./dto/broker-signals.js";export*from"./dto/bash-jobs.js";export*from"./dto/messages.js";export*from"./dto/reports.js";export*from"./dto/structured-requests.js";export*from"./dto/lifecycle.js";export*from"./dto/subscriptions.js";export*from"./dto/focus.js";export*from"./dto/crons.js";export*from"./dto/config.js";export*from"./dto/attach.js";export*from"./dto/broker.js";export*from"./dto/profiles.js";export*from"./dto/modelauth.js";export*from"./dto/model-config.js";export*from"./dto/canvas.js";export*from"./dto/worktree.js";export*from"./dto/human.js";export*from"./dto/files.js";export*from"./dto/bash.js";export*from"./dto/inbox.js";export*from"./dto/human-requests.js";export*from"./dto/reviews.js";export*from"./dto/review-comments.js";export*from"./dto/chat-inventory.js";export*from"./dto/analytics.js";export*from"./dto/custom-objects.js";export*from"./dto/plugins.js";export*from"./dto/permissions.js";export{E as APIError,s as API_VERSION,R as ApiError,d as CONTRACT_HEADER,S as CONTRACT_LEVEL,e as CrtrClient,H as LONG_POLL_MAX_WAIT_SECONDS,U as LONG_POLL_ROUTES,m as MAX_TIMER_MS,I as MINIMUM_RUNTIME_VERSION_HEADER,c as REQUIRED_CONTRACT_HEADER,C as RUNTIME_VERSION_HEADER,N as compareReleaseVersions,L as contractRefusal,M as contractSatisfies,t as deadlineExceeded,i as errorCodes,_ as isErrorBody,V as longPollHoldSeconds,v as longPollRoute,O as minimumRuntimeRefusal,u as parseContractLevel,D as parseServedContracts,W as requestedWait,n as routes,p as sleepWithin,f as waitForDaemonAvailability};
1
+ import{CrtrClient as e,deadlineExceeded as t,MAX_TIMER_MS as m,sleepWithin as p,waitForDaemonAvailability as f}from"./client.js";import{APIError as E,ApiError as R,isErrorBody as _}from"./errors.js";import{errorCodes as i}from"./error-codes.js";import{API_VERSION as s,routes as n}from"./routes.js";import{RUNTIME_VERSION_HEADER as C,MINIMUM_RUNTIME_VERSION_HEADER as I,compareReleaseVersions as N,minimumRuntimeRefusal as O}from"./runtime-version.js";import{CONTRACT_HEADER as d,CONTRACT_LEVEL as S,REQUIRED_CONTRACT_HEADER as c,contractRefusal as L,contractSatisfies as M,parseContractLevel as u,parseServedContracts as D}from"./contract.js";import{LONG_POLL_MAX_WAIT_SECONDS as H,LONG_POLL_ROUTES as U,longPollHoldSeconds as V,longPollRoute as v,requestedWait as W}from"./long-poll.js";export*from"../shared/generated-context.js";export*from"./dto/common.js";export*from"./dto/health.js";export*from"./dto/limits.js";export*from"./dto/grants.js";export*from"./dto/usage.js";export*from"./dto/charges.js";export*from"./dto/nodes.js";export*from"./dto/node-outcomes.js";export*from"./dto/node-events.js";export*from"./dto/run-events.js";export*from"./dto/broker-signals.js";export*from"./dto/bash-jobs.js";export*from"./dto/messages.js";export*from"./dto/reports.js";export*from"./dto/structured-requests.js";export*from"./dto/lifecycle.js";export*from"./dto/subscriptions.js";export*from"./dto/focus.js";export*from"./dto/crons.js";export*from"./dto/config.js";export*from"./dto/attach.js";export*from"./dto/broker.js";export*from"./dto/profiles.js";export*from"./dto/modelauth.js";export*from"./dto/model-config.js";export*from"./dto/canvas.js";export*from"./dto/worktree.js";export*from"./dto/human.js";export*from"./dto/files.js";export*from"./dto/bash.js";export*from"./dto/exec.js";export*from"./dto/inbox.js";export*from"./dto/human-requests.js";export*from"./dto/reviews.js";export*from"./dto/review-comments.js";export*from"./dto/chat-inventory.js";export*from"./dto/analytics.js";export*from"./dto/custom-objects.js";export*from"./dto/plugins.js";export*from"./dto/permissions.js";export{E as APIError,s as API_VERSION,R as ApiError,d as CONTRACT_HEADER,S as CONTRACT_LEVEL,e as CrtrClient,H as LONG_POLL_MAX_WAIT_SECONDS,U as LONG_POLL_ROUTES,m as MAX_TIMER_MS,I as MINIMUM_RUNTIME_VERSION_HEADER,c as REQUIRED_CONTRACT_HEADER,C as RUNTIME_VERSION_HEADER,N as compareReleaseVersions,L as contractRefusal,M as contractSatisfies,t as deadlineExceeded,i as errorCodes,_ as isErrorBody,V as longPollHoldSeconds,v as longPollRoute,O as minimumRuntimeRefusal,u as parseContractLevel,D as parseServedContracts,W as requestedWait,n as routes,p as sleepWithin,f as waitForDaemonAvailability};
@@ -151,6 +151,7 @@ export declare const routes: {
151
151
  readonly fileWrite: () => string;
152
152
  readonly fileList: () => string;
153
153
  readonly bash: () => string;
154
+ readonly exec: () => string;
154
155
  readonly objects: () => string;
155
156
  readonly object: (ref: string) => string;
156
157
  readonly objectsSearch: () => string;
@@ -1 +1 @@
1
- var s=Object.defineProperty;var o=(e,n)=>s(e,"name",{value:n,configurable:!0});const t="v1",r="/v1",a={healthz:o(()=>"/healthz","healthz"),ready:o(()=>"/v1/ready","ready"),status:o(()=>"/v1/status","status"),due:o(()=>"/v1/due","due"),daemonRestart:o(()=>"/v1/daemon/restart","daemonRestart"),daemonMigrate:o(()=>"/v1/daemon/migrate","daemonMigrate"),daemonAdmit:o(()=>"/v1/daemon/admit","daemonAdmit"),nodes:o(()=>"/v1/nodes","nodes"),reviveAll:o(()=>"/v1/nodes/revive-all","reviveAll"),node:o(e=>`/v1/nodes/${e}`,"node"),nodeMemoryReads:o(e=>`/v1/nodes/${e}/memory-reads`,"nodeMemoryReads"),nodeOutcome:o(e=>`/v1/nodes/${e}/outcome`,"nodeOutcome"),nodeOutcomeDelivery:o(e=>`/v1/nodes/${e}/outcome-delivery`,"nodeOutcomeDelivery"),nodeEvents:o(e=>`/v1/nodes/${e}/events`,"nodeEvents"),nodeSnapshot:o(e=>`/v1/nodes/${e}/snapshot`,"nodeSnapshot"),nodeSubject:o(e=>`/v1/nodes/${e}/subject`,"nodeSubject"),nodeSession:o(e=>`/v1/nodes/${e}/session`,"nodeSession"),nodeChatInventory:o(e=>`/v1/nodes/${e}/chat-inventory`,"nodeChatInventory"),prospectiveChatInventory:o(()=>"/v1/prospective-chat-inventory","prospectiveChatInventory"),nodeTranscript:o(e=>`/v1/nodes/${e}/transcript`,"nodeTranscript"),nodeContext:o(e=>`/v1/nodes/${e}/context`,"nodeContext"),nodeReports:o(e=>`/v1/nodes/${e}/reports`,"nodeReports"),nodeResult:o(e=>`/v1/nodes/${e}/result`,"nodeResult"),nodeJobs:o(e=>`/v1/nodes/${e}/jobs`,"nodeJobs"),nodeJob:o((e,n)=>`/v1/nodes/${e}/jobs/${n}`,"nodeJob"),nodeJobBackground:o((e,n)=>`/v1/nodes/${e}/jobs/${n}/background`,"nodeJobBackground"),nodeDelivery:o(e=>`/v1/nodes/${e}/delivery`,"nodeDelivery"),deliveryDryRun:o(()=>"/v1/delivery/dry-run","deliveryDryRun"),deliveryRetry:o(e=>`/v1/deliveries/${encodeURIComponent(e)}/retry`,"deliveryRetry"),nodeMessages:o(e=>`/v1/nodes/${e}/messages`,"nodeMessages"),nodeInterrupt:o(e=>`/v1/nodes/${e}/interrupt`,"nodeInterrupt"),nodeFork:o(e=>`/v1/nodes/${e}/fork`,"nodeFork"),nodeRevive:o(e=>`/v1/nodes/${e}/revive`,"nodeRevive"),nodeRelaunchRoot:o(e=>`/v1/nodes/${e}/relaunch-root`,"nodeRelaunchRoot"),nodeBrokerSessionBound:o(e=>`/v1/nodes/${e}/broker/session-bound`,"nodeBrokerSessionBound"),nodeBrokerSettle:o(e=>`/v1/nodes/${e}/broker/settle`,"nodeBrokerSettle"),nodeBrokerParkComplete:o(e=>`/v1/nodes/${e}/broker/park-complete`,"nodeBrokerParkComplete"),nodeBrokerParkActivity:o(e=>`/v1/nodes/${e}/broker/park-activity`,"nodeBrokerParkActivity"),nodeBrokerTelemetry:o(e=>`/v1/nodes/${e}/broker/telemetry`,"nodeBrokerTelemetry"),nodeLog:o(e=>`/v1/nodes/${e}/records/log`,"nodeLog"),nodeTelemetry:o(e=>`/v1/nodes/${e}/records/telemetry`,"nodeTelemetry"),nodeRecap:o(e=>`/v1/nodes/${e}/records/recap`,"nodeRecap"),nodeInboxReport:o(e=>`/v1/nodes/${e}/records/inbox`,"nodeInboxReport"),nodePassiveMessage:o(e=>`/v1/nodes/${e}/records/passive`,"nodePassiveMessage"),nodePushedFinal:o(e=>`/v1/nodes/${e}/records/pushed-final`,"nodePushedFinal"),nodeMailClaim:o(e=>`/v1/nodes/${e}/mail/claim`,"nodeMailClaim"),nodeMailAcknowledge:o(e=>`/v1/nodes/${e}/mail/acknowledge`,"nodeMailAcknowledge"),nodeBrokerModel:o(e=>`/v1/nodes/${e}/broker/model`,"nodeBrokerModel"),nodeBrokerExtensionState:o(e=>`/v1/nodes/${e}/broker/extension-state`,"nodeBrokerExtensionState"),nodeBrokerSignals:o(e=>`/v1/nodes/${e}/broker/signals`,"nodeBrokerSignals"),nodeBrokerGeneratedName:o(e=>`/v1/nodes/${e}/broker/generated-name`,"nodeBrokerGeneratedName"),nodeBrokerPersonaAck:o(e=>`/v1/nodes/${e}/broker/persona-ack`,"nodeBrokerPersonaAck"),brokerTurn:o(e=>`/v1/broker/${e}/turn`,"brokerTurn"),brokerProviderRetry:o(e=>`/v1/broker/${e}/provider-retry`,"brokerProviderRetry"),brokerFault:o(e=>`/v1/broker/${e}/fault`,"brokerFault"),brokerRecovery:o(e=>`/v1/broker/${e}/recovery`,"brokerRecovery"),nodeFault:o(e=>`/v1/nodes/${e}/fault`,"nodeFault"),nodeClose:o(e=>`/v1/nodes/${e}/close`,"nodeClose"),nodeRead:o(e=>`/v1/nodes/${e}/read`,"nodeRead"),nodeRecycle:o(e=>`/v1/nodes/${e}/recycle`,"nodeRecycle"),nodeDemote:o(e=>`/v1/nodes/${e}/demote`,"nodeDemote"),nodePromote:o(e=>`/v1/nodes/${e}/promote`,"nodePromote"),nodeYield:o(e=>`/v1/nodes/${e}/yield`,"nodeYield"),nodeWait:o(e=>`/v1/nodes/${e}/wait`,"nodeWait"),nodeConfig:o(e=>`/v1/nodes/${e}/config`,"nodeConfig"),kinds:o(()=>"/v1/kinds","kinds"),nodeWorktreeClose:o(e=>`/v1/nodes/${e}/worktree/close`,"nodeWorktreeClose"),nodeWorktreeAbandon:o(e=>`/v1/nodes/${e}/worktree/abandon`,"nodeWorktreeAbandon"),quarantinedWorktrees:o(()=>"/v1/worktrees/quarantined","quarantinedWorktrees"),spaces:o(()=>"/v1/spaces","spaces"),limits:o(()=>"/v1/limits","limits"),limitsApp:o(e=>`/v1/limits/apps/${encodeURIComponent(e)}`,"limitsApp"),charges:o(()=>"/v1/charges","charges"),spendLimits:o(()=>"/v1/spend-limits","spendLimits"),spendLimit:o(e=>`/v1/spend-limits/${encodeURIComponent(e)}`,"spendLimit"),nodeAttach:o(e=>`/v1/nodes/${e}/attach`,"nodeAttach"),focuses:o(()=>"/v1/focuses","focuses"),focusByNode:o(()=>"/v1/focuses/by-node","focusByNode"),focusByPane:o(()=>"/v1/focuses/by-pane","focusByPane"),focus:o(e=>`/v1/focuses/${e}`,"focus"),nodeSubscriptions:o(e=>`/v1/nodes/${e}/subscriptions`,"nodeSubscriptions"),nodeSubscription:o((e,n)=>`/v1/nodes/${e}/subscriptions/${n}`,"nodeSubscription"),crons:o(()=>"/v1/crons","crons"),cron:o(e=>`/v1/crons/${e}`,"cron"),cronPause:o(e=>`/v1/crons/${e}/pause`,"cronPause"),cronResume:o(e=>`/v1/crons/${e}/resume`,"cronResume"),cronRun:o(e=>`/v1/crons/${e}/run`,"cronRun"),cronsPoke:o(()=>"/v1/crons/poke","cronsPoke"),canvasAttention:o(()=>"/v1/canvas/attention","canvasAttention"),canvasAttentionCounts:o(()=>"/v1/canvas/attention/counts","canvasAttentionCounts"),canvasHistorySearch:o(()=>"/v1/canvas/history/search","canvasHistorySearch"),canvasHistoryGrep:o(()=>"/v1/canvas/history/grep","canvasHistoryGrep"),canvasHistoryRead:o(()=>"/v1/canvas/history/read","canvasHistoryRead"),canvasHistoryStats:o(()=>"/v1/canvas/history/stats","canvasHistoryStats"),canvasSnapshot:o(()=>"/v1/canvas/snapshot","canvasSnapshot"),canvasLiveRoots:o(()=>"/v1/canvas/live-roots","canvasLiveRoots"),canvasRoster:o(()=>"/v1/canvas/roster","canvasRoster"),canvasBrowse:o(()=>"/v1/canvas/browse","canvasBrowse"),canvasAnalytics:o(()=>"/v1/canvas/analytics","canvasAnalytics"),canvasGraph:o(()=>"/v1/canvas/graph","canvasGraph"),canvasPrune:o(()=>"/v1/canvas/prune","canvasPrune"),humanReviews:o(()=>"/v1/human/reviews","humanReviews"),humanReview:o(e=>`/v1/human/reviews/${e}`,"humanReview"),humanReviewSubmit:o(e=>`/v1/human/reviews/${e}/submit`,"humanReviewSubmit"),humanReviewCancel:o(e=>`/v1/human/reviews/${e}/cancel`,"humanReviewCancel"),humanReviewDocument:o(e=>`/v1/human/reviews/${e}/document`,"humanReviewDocument"),humanReviewComments:o(e=>`/v1/human/reviews/${e}/comments`,"humanReviewComments"),humanReviewCommentEvents:o(e=>`/v1/human/reviews/${e}/comment-events`,"humanReviewCommentEvents"),humanReviewCommentRanges:o(e=>`/v1/human/reviews/${e}/comment-ranges`,"humanReviewCommentRanges"),humanComment:o(e=>`/v1/human/comments/${e}`,"humanComment"),humanCommentEdit:o(e=>`/v1/human/comments/${e}/edit`,"humanCommentEdit"),humanCommentResolve:o(e=>`/v1/human/comments/${e}/resolve`,"humanCommentResolve"),humanCommentReopen:o(e=>`/v1/human/comments/${e}/reopen`,"humanCommentReopen"),humanCommentDelete:o(e=>`/v1/human/comments/${e}/delete`,"humanCommentDelete"),humanCommentFork:o(e=>`/v1/human/comments/${e}/fork`,"humanCommentFork"),humanInbox:o(()=>"/v1/human/inbox","humanInbox"),humanInboxTicket:o(e=>`/v1/human/inbox/${e}`,"humanInboxTicket"),humanInboxRespond:o(e=>`/v1/human/inbox/${e}/respond`,"humanInboxRespond"),humanInboxProgress:o(e=>`/v1/human/inbox/${e}/progress`,"humanInboxProgress"),humanInboxResponse:o(e=>`/v1/human/inbox/${e}/response`,"humanInboxResponse"),humanInboxCancel:o(e=>`/v1/human/inbox/${e}/cancel`,"humanInboxCancel"),humanInboxFeedbackResolve:o((e,n)=>`/v1/human/inbox/${e}/feedback-comments/${n}/resolve`,"humanInboxFeedbackResolve"),humanRequests:o(()=>"/v1/human/requests","humanRequests"),humanComponents:o(()=>"/v1/human/components","humanComponents"),humanRequest:o(e=>`/v1/human/requests/${e}`,"humanRequest"),humanRequestReplace:o(e=>`/v1/human/requests/${e}/replace`,"humanRequestReplace"),humanRequestRespond:o(e=>`/v1/human/requests/${e}/respond`,"humanRequestRespond"),humanRequestDismiss:o(e=>`/v1/human/requests/${e}/dismiss`,"humanRequestDismiss"),humanRequestCancel:o(e=>`/v1/human/requests/${e}/cancel`,"humanRequestCancel"),profiles:o(()=>"/v1/profiles","profiles"),profile:o(e=>`/v1/profiles/${e}`,"profile"),profilePause:o(e=>`/v1/profiles/${e}/pause`,"profilePause"),profileResume:o(e=>`/v1/profiles/${e}/resume`,"profileResume"),profileMetadata:o(e=>`/v1/profiles/${e}/metadata`,"profileMetadata"),appEnv:o(()=>"/v1/apps/self/env","appEnv"),appEnvVar:o(e=>`/v1/apps/self/env/${encodeURIComponent(e)}`,"appEnvVar"),profileEnv:o(e=>`/v1/profiles/${e}/env`,"profileEnv"),profileEnvVar:o((e,n)=>`/v1/profiles/${e}/env/${n}`,"profileEnvVar"),modelAuths:o(()=>"/v1/model-auth","modelAuths"),modelAuthReadiness:o(()=>"/v1/model-auth/readiness","modelAuthReadiness"),modelAuth:o(e=>`/v1/model-auth/${e}`,"modelAuth"),modelAuthFlows:o(()=>"/v1/model-auth/flows","modelAuthFlows"),modelAuthFlow:o(e=>`/v1/model-auth/flows/${encodeURIComponent(e)}`,"modelAuthFlow"),modelAuthFlowComplete:o(e=>`/v1/model-auth/flows/${encodeURIComponent(e)}/complete`,"modelAuthFlowComplete"),modelAuthFlowCancel:o(e=>`/v1/model-auth/flows/${encodeURIComponent(e)}/cancel`,"modelAuthFlowCancel"),filePeek:o(()=>"/v1/files/peek","filePeek"),fileWrite:o(()=>"/v1/files/write","fileWrite"),fileList:o(()=>"/v1/files/list","fileList"),bash:o(()=>"/v1/bash","bash"),objects:o(()=>"/v1/objects","objects"),object:o(e=>`/v1/objects/${encodeURIComponent(e)}`,"object"),objectsSearch:o(()=>"/v1/objects/search","objectsSearch"),objectWatch:o(e=>`/v1/objects/${encodeURIComponent(e)}/watch`,"objectWatch"),customObjects:o(()=>"/v1/custom-objects","customObjects"),customObject:o(e=>`/v1/custom-objects/${encodeURIComponent(e)}`,"customObject"),customObjectEvents:o(e=>`/v1/custom-objects/${encodeURIComponent(e)}/events`,"customObjectEvents"),customObjectDeliveries:o(e=>`/v1/custom-objects/${encodeURIComponent(e)}/deliveries`,"customObjectDeliveries"),customObjectAck:o(e=>`/v1/custom-objects/${encodeURIComponent(e)}/deliveries/ack`,"customObjectAck"),objectShares:o(e=>`/v1/objects/${encodeURIComponent(e)}/shares`,"objectShares"),objectEdges:o(e=>`/v1/objects/${encodeURIComponent(e)}/edges`,"objectEdges"),docs:o(()=>"/v1/docs","docs"),doc:o(e=>`/v1/docs/${encodeURIComponent(e)}`,"doc"),docMove:o(e=>`/v1/docs/${encodeURIComponent(e)}/move`,"docMove"),docHistory:o(e=>`/v1/docs/${encodeURIComponent(e)}/history`,"docHistory"),docsLint:o(()=>"/v1/docs/lint","docsLint"),schemas:o(()=>"/v1/schemas","schemas"),relations:o(()=>"/v1/relations","relations"),check:o(()=>"/v1/check","check"),pluginAppToken:o(e=>`/v1/plugins/${encodeURIComponent(e)}/app-token`,"pluginAppToken"),pluginCallHeaders:o(e=>`/v1/plugins/${encodeURIComponent(e)}/call-headers`,"pluginCallHeaders"),documentsBrowserAccess:o(()=>"/v1/documents/browser-access","documentsBrowserAccess"),documentsReconcilePackages:o(()=>"/v1/documents/reconcile-packages","documentsReconcilePackages")};export{t as API_VERSION,a as routes};
1
+ var s=Object.defineProperty;var o=(e,n)=>s(e,"name",{value:n,configurable:!0});const t="v1",r="/v1",a={healthz:o(()=>"/healthz","healthz"),ready:o(()=>"/v1/ready","ready"),status:o(()=>"/v1/status","status"),due:o(()=>"/v1/due","due"),daemonRestart:o(()=>"/v1/daemon/restart","daemonRestart"),daemonMigrate:o(()=>"/v1/daemon/migrate","daemonMigrate"),daemonAdmit:o(()=>"/v1/daemon/admit","daemonAdmit"),nodes:o(()=>"/v1/nodes","nodes"),reviveAll:o(()=>"/v1/nodes/revive-all","reviveAll"),node:o(e=>`/v1/nodes/${e}`,"node"),nodeMemoryReads:o(e=>`/v1/nodes/${e}/memory-reads`,"nodeMemoryReads"),nodeOutcome:o(e=>`/v1/nodes/${e}/outcome`,"nodeOutcome"),nodeOutcomeDelivery:o(e=>`/v1/nodes/${e}/outcome-delivery`,"nodeOutcomeDelivery"),nodeEvents:o(e=>`/v1/nodes/${e}/events`,"nodeEvents"),nodeSnapshot:o(e=>`/v1/nodes/${e}/snapshot`,"nodeSnapshot"),nodeSubject:o(e=>`/v1/nodes/${e}/subject`,"nodeSubject"),nodeSession:o(e=>`/v1/nodes/${e}/session`,"nodeSession"),nodeChatInventory:o(e=>`/v1/nodes/${e}/chat-inventory`,"nodeChatInventory"),prospectiveChatInventory:o(()=>"/v1/prospective-chat-inventory","prospectiveChatInventory"),nodeTranscript:o(e=>`/v1/nodes/${e}/transcript`,"nodeTranscript"),nodeContext:o(e=>`/v1/nodes/${e}/context`,"nodeContext"),nodeReports:o(e=>`/v1/nodes/${e}/reports`,"nodeReports"),nodeResult:o(e=>`/v1/nodes/${e}/result`,"nodeResult"),nodeJobs:o(e=>`/v1/nodes/${e}/jobs`,"nodeJobs"),nodeJob:o((e,n)=>`/v1/nodes/${e}/jobs/${n}`,"nodeJob"),nodeJobBackground:o((e,n)=>`/v1/nodes/${e}/jobs/${n}/background`,"nodeJobBackground"),nodeDelivery:o(e=>`/v1/nodes/${e}/delivery`,"nodeDelivery"),deliveryDryRun:o(()=>"/v1/delivery/dry-run","deliveryDryRun"),deliveryRetry:o(e=>`/v1/deliveries/${encodeURIComponent(e)}/retry`,"deliveryRetry"),nodeMessages:o(e=>`/v1/nodes/${e}/messages`,"nodeMessages"),nodeInterrupt:o(e=>`/v1/nodes/${e}/interrupt`,"nodeInterrupt"),nodeFork:o(e=>`/v1/nodes/${e}/fork`,"nodeFork"),nodeRevive:o(e=>`/v1/nodes/${e}/revive`,"nodeRevive"),nodeRelaunchRoot:o(e=>`/v1/nodes/${e}/relaunch-root`,"nodeRelaunchRoot"),nodeBrokerSessionBound:o(e=>`/v1/nodes/${e}/broker/session-bound`,"nodeBrokerSessionBound"),nodeBrokerSettle:o(e=>`/v1/nodes/${e}/broker/settle`,"nodeBrokerSettle"),nodeBrokerParkComplete:o(e=>`/v1/nodes/${e}/broker/park-complete`,"nodeBrokerParkComplete"),nodeBrokerParkActivity:o(e=>`/v1/nodes/${e}/broker/park-activity`,"nodeBrokerParkActivity"),nodeBrokerTelemetry:o(e=>`/v1/nodes/${e}/broker/telemetry`,"nodeBrokerTelemetry"),nodeLog:o(e=>`/v1/nodes/${e}/records/log`,"nodeLog"),nodeTelemetry:o(e=>`/v1/nodes/${e}/records/telemetry`,"nodeTelemetry"),nodeRecap:o(e=>`/v1/nodes/${e}/records/recap`,"nodeRecap"),nodeInboxReport:o(e=>`/v1/nodes/${e}/records/inbox`,"nodeInboxReport"),nodePassiveMessage:o(e=>`/v1/nodes/${e}/records/passive`,"nodePassiveMessage"),nodePushedFinal:o(e=>`/v1/nodes/${e}/records/pushed-final`,"nodePushedFinal"),nodeMailClaim:o(e=>`/v1/nodes/${e}/mail/claim`,"nodeMailClaim"),nodeMailAcknowledge:o(e=>`/v1/nodes/${e}/mail/acknowledge`,"nodeMailAcknowledge"),nodeBrokerModel:o(e=>`/v1/nodes/${e}/broker/model`,"nodeBrokerModel"),nodeBrokerExtensionState:o(e=>`/v1/nodes/${e}/broker/extension-state`,"nodeBrokerExtensionState"),nodeBrokerSignals:o(e=>`/v1/nodes/${e}/broker/signals`,"nodeBrokerSignals"),nodeBrokerGeneratedName:o(e=>`/v1/nodes/${e}/broker/generated-name`,"nodeBrokerGeneratedName"),nodeBrokerPersonaAck:o(e=>`/v1/nodes/${e}/broker/persona-ack`,"nodeBrokerPersonaAck"),brokerTurn:o(e=>`/v1/broker/${e}/turn`,"brokerTurn"),brokerProviderRetry:o(e=>`/v1/broker/${e}/provider-retry`,"brokerProviderRetry"),brokerFault:o(e=>`/v1/broker/${e}/fault`,"brokerFault"),brokerRecovery:o(e=>`/v1/broker/${e}/recovery`,"brokerRecovery"),nodeFault:o(e=>`/v1/nodes/${e}/fault`,"nodeFault"),nodeClose:o(e=>`/v1/nodes/${e}/close`,"nodeClose"),nodeRead:o(e=>`/v1/nodes/${e}/read`,"nodeRead"),nodeRecycle:o(e=>`/v1/nodes/${e}/recycle`,"nodeRecycle"),nodeDemote:o(e=>`/v1/nodes/${e}/demote`,"nodeDemote"),nodePromote:o(e=>`/v1/nodes/${e}/promote`,"nodePromote"),nodeYield:o(e=>`/v1/nodes/${e}/yield`,"nodeYield"),nodeWait:o(e=>`/v1/nodes/${e}/wait`,"nodeWait"),nodeConfig:o(e=>`/v1/nodes/${e}/config`,"nodeConfig"),kinds:o(()=>"/v1/kinds","kinds"),nodeWorktreeClose:o(e=>`/v1/nodes/${e}/worktree/close`,"nodeWorktreeClose"),nodeWorktreeAbandon:o(e=>`/v1/nodes/${e}/worktree/abandon`,"nodeWorktreeAbandon"),quarantinedWorktrees:o(()=>"/v1/worktrees/quarantined","quarantinedWorktrees"),spaces:o(()=>"/v1/spaces","spaces"),limits:o(()=>"/v1/limits","limits"),limitsApp:o(e=>`/v1/limits/apps/${encodeURIComponent(e)}`,"limitsApp"),charges:o(()=>"/v1/charges","charges"),spendLimits:o(()=>"/v1/spend-limits","spendLimits"),spendLimit:o(e=>`/v1/spend-limits/${encodeURIComponent(e)}`,"spendLimit"),nodeAttach:o(e=>`/v1/nodes/${e}/attach`,"nodeAttach"),focuses:o(()=>"/v1/focuses","focuses"),focusByNode:o(()=>"/v1/focuses/by-node","focusByNode"),focusByPane:o(()=>"/v1/focuses/by-pane","focusByPane"),focus:o(e=>`/v1/focuses/${e}`,"focus"),nodeSubscriptions:o(e=>`/v1/nodes/${e}/subscriptions`,"nodeSubscriptions"),nodeSubscription:o((e,n)=>`/v1/nodes/${e}/subscriptions/${n}`,"nodeSubscription"),crons:o(()=>"/v1/crons","crons"),cron:o(e=>`/v1/crons/${e}`,"cron"),cronPause:o(e=>`/v1/crons/${e}/pause`,"cronPause"),cronResume:o(e=>`/v1/crons/${e}/resume`,"cronResume"),cronRun:o(e=>`/v1/crons/${e}/run`,"cronRun"),cronsPoke:o(()=>"/v1/crons/poke","cronsPoke"),canvasAttention:o(()=>"/v1/canvas/attention","canvasAttention"),canvasAttentionCounts:o(()=>"/v1/canvas/attention/counts","canvasAttentionCounts"),canvasHistorySearch:o(()=>"/v1/canvas/history/search","canvasHistorySearch"),canvasHistoryGrep:o(()=>"/v1/canvas/history/grep","canvasHistoryGrep"),canvasHistoryRead:o(()=>"/v1/canvas/history/read","canvasHistoryRead"),canvasHistoryStats:o(()=>"/v1/canvas/history/stats","canvasHistoryStats"),canvasSnapshot:o(()=>"/v1/canvas/snapshot","canvasSnapshot"),canvasLiveRoots:o(()=>"/v1/canvas/live-roots","canvasLiveRoots"),canvasRoster:o(()=>"/v1/canvas/roster","canvasRoster"),canvasBrowse:o(()=>"/v1/canvas/browse","canvasBrowse"),canvasAnalytics:o(()=>"/v1/canvas/analytics","canvasAnalytics"),canvasGraph:o(()=>"/v1/canvas/graph","canvasGraph"),canvasPrune:o(()=>"/v1/canvas/prune","canvasPrune"),humanReviews:o(()=>"/v1/human/reviews","humanReviews"),humanReview:o(e=>`/v1/human/reviews/${e}`,"humanReview"),humanReviewSubmit:o(e=>`/v1/human/reviews/${e}/submit`,"humanReviewSubmit"),humanReviewCancel:o(e=>`/v1/human/reviews/${e}/cancel`,"humanReviewCancel"),humanReviewDocument:o(e=>`/v1/human/reviews/${e}/document`,"humanReviewDocument"),humanReviewComments:o(e=>`/v1/human/reviews/${e}/comments`,"humanReviewComments"),humanReviewCommentEvents:o(e=>`/v1/human/reviews/${e}/comment-events`,"humanReviewCommentEvents"),humanReviewCommentRanges:o(e=>`/v1/human/reviews/${e}/comment-ranges`,"humanReviewCommentRanges"),humanComment:o(e=>`/v1/human/comments/${e}`,"humanComment"),humanCommentEdit:o(e=>`/v1/human/comments/${e}/edit`,"humanCommentEdit"),humanCommentResolve:o(e=>`/v1/human/comments/${e}/resolve`,"humanCommentResolve"),humanCommentReopen:o(e=>`/v1/human/comments/${e}/reopen`,"humanCommentReopen"),humanCommentDelete:o(e=>`/v1/human/comments/${e}/delete`,"humanCommentDelete"),humanCommentFork:o(e=>`/v1/human/comments/${e}/fork`,"humanCommentFork"),humanInbox:o(()=>"/v1/human/inbox","humanInbox"),humanInboxTicket:o(e=>`/v1/human/inbox/${e}`,"humanInboxTicket"),humanInboxRespond:o(e=>`/v1/human/inbox/${e}/respond`,"humanInboxRespond"),humanInboxProgress:o(e=>`/v1/human/inbox/${e}/progress`,"humanInboxProgress"),humanInboxResponse:o(e=>`/v1/human/inbox/${e}/response`,"humanInboxResponse"),humanInboxCancel:o(e=>`/v1/human/inbox/${e}/cancel`,"humanInboxCancel"),humanInboxFeedbackResolve:o((e,n)=>`/v1/human/inbox/${e}/feedback-comments/${n}/resolve`,"humanInboxFeedbackResolve"),humanRequests:o(()=>"/v1/human/requests","humanRequests"),humanComponents:o(()=>"/v1/human/components","humanComponents"),humanRequest:o(e=>`/v1/human/requests/${e}`,"humanRequest"),humanRequestReplace:o(e=>`/v1/human/requests/${e}/replace`,"humanRequestReplace"),humanRequestRespond:o(e=>`/v1/human/requests/${e}/respond`,"humanRequestRespond"),humanRequestDismiss:o(e=>`/v1/human/requests/${e}/dismiss`,"humanRequestDismiss"),humanRequestCancel:o(e=>`/v1/human/requests/${e}/cancel`,"humanRequestCancel"),profiles:o(()=>"/v1/profiles","profiles"),profile:o(e=>`/v1/profiles/${e}`,"profile"),profilePause:o(e=>`/v1/profiles/${e}/pause`,"profilePause"),profileResume:o(e=>`/v1/profiles/${e}/resume`,"profileResume"),profileMetadata:o(e=>`/v1/profiles/${e}/metadata`,"profileMetadata"),appEnv:o(()=>"/v1/apps/self/env","appEnv"),appEnvVar:o(e=>`/v1/apps/self/env/${encodeURIComponent(e)}`,"appEnvVar"),profileEnv:o(e=>`/v1/profiles/${e}/env`,"profileEnv"),profileEnvVar:o((e,n)=>`/v1/profiles/${e}/env/${n}`,"profileEnvVar"),modelAuths:o(()=>"/v1/model-auth","modelAuths"),modelAuthReadiness:o(()=>"/v1/model-auth/readiness","modelAuthReadiness"),modelAuth:o(e=>`/v1/model-auth/${e}`,"modelAuth"),modelAuthFlows:o(()=>"/v1/model-auth/flows","modelAuthFlows"),modelAuthFlow:o(e=>`/v1/model-auth/flows/${encodeURIComponent(e)}`,"modelAuthFlow"),modelAuthFlowComplete:o(e=>`/v1/model-auth/flows/${encodeURIComponent(e)}/complete`,"modelAuthFlowComplete"),modelAuthFlowCancel:o(e=>`/v1/model-auth/flows/${encodeURIComponent(e)}/cancel`,"modelAuthFlowCancel"),filePeek:o(()=>"/v1/files/peek","filePeek"),fileWrite:o(()=>"/v1/files/write","fileWrite"),fileList:o(()=>"/v1/files/list","fileList"),bash:o(()=>"/v1/bash","bash"),exec:o(()=>"/v1/exec","exec"),objects:o(()=>"/v1/objects","objects"),object:o(e=>`/v1/objects/${encodeURIComponent(e)}`,"object"),objectsSearch:o(()=>"/v1/objects/search","objectsSearch"),objectWatch:o(e=>`/v1/objects/${encodeURIComponent(e)}/watch`,"objectWatch"),customObjects:o(()=>"/v1/custom-objects","customObjects"),customObject:o(e=>`/v1/custom-objects/${encodeURIComponent(e)}`,"customObject"),customObjectEvents:o(e=>`/v1/custom-objects/${encodeURIComponent(e)}/events`,"customObjectEvents"),customObjectDeliveries:o(e=>`/v1/custom-objects/${encodeURIComponent(e)}/deliveries`,"customObjectDeliveries"),customObjectAck:o(e=>`/v1/custom-objects/${encodeURIComponent(e)}/deliveries/ack`,"customObjectAck"),objectShares:o(e=>`/v1/objects/${encodeURIComponent(e)}/shares`,"objectShares"),objectEdges:o(e=>`/v1/objects/${encodeURIComponent(e)}/edges`,"objectEdges"),docs:o(()=>"/v1/docs","docs"),doc:o(e=>`/v1/docs/${encodeURIComponent(e)}`,"doc"),docMove:o(e=>`/v1/docs/${encodeURIComponent(e)}/move`,"docMove"),docHistory:o(e=>`/v1/docs/${encodeURIComponent(e)}/history`,"docHistory"),docsLint:o(()=>"/v1/docs/lint","docsLint"),schemas:o(()=>"/v1/schemas","schemas"),relations:o(()=>"/v1/relations","relations"),check:o(()=>"/v1/check","check"),pluginAppToken:o(e=>`/v1/plugins/${encodeURIComponent(e)}/app-token`,"pluginAppToken"),pluginCallHeaders:o(e=>`/v1/plugins/${encodeURIComponent(e)}/call-headers`,"pluginCallHeaders"),documentsBrowserAccess:o(()=>"/v1/documents/browser-access","documentsBrowserAccess"),documentsReconcilePackages:o(()=>"/v1/documents/reconcile-packages","documentsReconcilePackages")};export{t as API_VERSION,a as routes};
@@ -1 +1 @@
1
- var D=Object.defineProperty;var o=(e,t)=>D(e,"name",{value:t,configurable:!0});import{defineBranch as I,defineRoot as y,GLOBAL_TOKENS as O}from"./core/command.js";import{createCoreHookCatalog as x}from"./core/command-hooks/catalog.js";import{composeCoreHooks as R}from"./core/command-hooks/compose.js";import{mark as p}from"./core/timing.js";import{envScopes as G,isSandboxedNode as E,scopeAllowed as U}from"./shared/env.js";const S="crtr: agentic runtime.",b=[{name:"--json",desc:"stdout as the leaf's declared outputs in raw JSON instead of prose \u2014 for scripts (a cron's bash, external tooling) that must branch on canvas state; prose stays the contract for what you read yourself."}],k=Object.assign(Object.create(null),{doc:o(async()=>(await import("./commands/doc.js")).registerDoc(),"doc"),"custom-object":o(async()=>(await import("./commands/custom-object.js")).registerCustomObject(),"custom-object"),profile:o(async()=>(await import("./commands/profile.js")).registerProfile(),"profile"),pkg:o(async()=>(await import("./commands/pkg.js")).registerPkg(),"pkg"),human:o(async()=>(await import("./commands/human.js")).registerHuman(),"human"),sys:o(async()=>(await import("./commands/sys.js")).registerSys(),"sys"),node:o(async()=>(await import("./commands/node.js")).registerNode(),"node"),push:o(async()=>(await import("./commands/push.js")).registerPush(),"push"),cron:o(async()=>(await import("./commands/cron.js")).registerCron(),"cron"),canvas:o(async()=>(await import("./commands/canvas.js")).registerCanvas(),"canvas"),surface:o(async()=>(await import("./commands/surface.js")).registerSurface(),"surface")}),d=Object.freeze(Object.keys(k)),q={human:["crtr:act"],cron:["crtr:schedule"],doc:["crtr:memory:read:user","crtr:memory:rw:user"]};function B(e){const t=G();return t===null?e:e.filter(r=>{const n=q[r.name];return n===void 0||n.some(s=>U(t,s))||r.name==="doc"&&process.env.CRTR_GRANTEE?.startsWith("app:")===!0})}o(B,"allowedSubtrees");const L=new Map;function N(e){let t=L.get(e);return t===void 0&&(t=k[e](),L.set(e,t)),t}o(N,"loadSubtree");function v(e){return Promise.all(d.filter(t=>e.has(t)).map(N))}o(v,"loadCoreSubtreesNamed");function C(){return v(new Set(d))}o(C,"loadCoreSubtrees");function P(e){const t=new Set;for(const r of e){const n=r.split(" ")[0];d.includes(n)&&t.add(n)}return t}o(P,"subtreesNamedBy");let j;function oe(){return p("cli.hooks.catalog"),j??=C().then(x),j}o(oe,"coreHookCatalog");function T(){let e;return()=>(e??=(async()=>{const{compileHookRegistry:t,declaredCommandHookTargets:r,effectiveHookPlugins:n}=await import("./core/command-hooks/discovery.js"),s=n(),a=E()?await(await import("./core/command-hooks/transport/plan.js")).remoteHookPlan(process.cwd()):[];if(p("cli.hooks.effective_plugins",{count:s.length+a.length}),s.length===0&&a.length===0)return p("cli.hooks.empty_registry"),t(x([]),[]);const c=E()?s.filter(l=>l.scope==="project"):s,i=P([...r(c),...a.map(l=>l.target)]);return p("cli.hooks.catalog",{subtrees:[...i].join(",")}),t(x(await v(i)),c,a)})(),e)}o(T,"hookRegistryLoader");function g(e){const t=new Set,r=o((n,s)=>{if(!(n.kind==="branch"&&n.passthrough!==void 0)&&(t.add(s),n.kind==="branch"))for(const a of n.children)r(a,`${s} ${a.name}`)},"visit");for(const n of e)r(n,n.name);return t}o(g,"commandPathsFor");async function re(){return g(await C())}o(re,"coreCommandPaths");async function se(e){return g(await v(P(e)))}o(se,"coreCommandPathsCovering");function z(e){const t=[],r=o((n,s)=>{n.extensible===!0&&t.push(s);for(const a of n.children)a.kind==="branch"&&r(a,[...s,a.name])},"visit");for(const n of e)r(n,[n.name]);return t}o(z,"extensibleBranchPaths");const W=Object.freeze(["human","sys tutorial"]);async function _(){return new Set(W)}o(_,"extensibleCoreBranches");async function ae(){return new Set(z(await C()).map(e=>e.join(" ")))}o(ae,"declaredExtensibleCoreBranches");function $(e,t){const{listing:r,...n}=e.help;return I({name:e.name,description:e.description,whenToUse:e.whenToUse,tier:e.tier,help:n,rootEntry:e.rootEntry,extensible:e.extensible,plugin:e.plugin,slash:e.slash,passthrough:e.passthrough,children:t})}o($,"rebuildBranch");async function A(e,t,r){if(t.size===0)return e;const[{buildExternalCommandSnapshot:n},{composeCoreBranchMounts:s}]=await Promise.all([import("./core/command-plugins/discovery.js"),import("./core/command-plugins/compose.js")]),a=n(new Set(d),void 0,void 0,r,t),c=o((i,l)=>{let h=!1;const w=i.children.map(m=>{if(m.kind!=="branch")return m;const u=c(m,[...l,m.name]);return u!==m&&(h=!0),u}),f=i.extensible===!0?s(a.coreMounts,l):[];return h||f.length>0?$(i,[...w,...f]):i},"composeBranch");return e.map(i=>c(i,[i.name]))}o(A,"composeCorePluginMounts");async function F(e,t){const{validateEffectiveCommandPlugins:r}=await import("./core/command-plugins/discovery.js"),s=r(new Set(d),void 0,void 0,void 0,t).flatMap(c=>c.manifest===void 0?[]:[c.manifest]).filter(c=>c.coreMounts.some(i=>i.parent[0]===e));if(s.length===0)return null;const a=P(s.flatMap(c=>[...c.coreMounts.map(i=>i.parent.join(" ")),...Object.keys(c.helpAddenda??{})]));return a.add(e),g(await v(a))}o(F,"dispatchCommandPaths");function M(e,t){const r=e.slice(2).filter(n=>!O.has(n));return r[0]==="sys"&&r[1]===t}o(M,"isSysInvocation");const J=[["surface"],["sys"],["pkg"],["profile","default"],["canvas","chord"],["canvas","config"],["canvas","use"],["canvas","browse"],["canvas","issue"]],K=[["sys","feedback"]];function H(e,t){return t.every((r,n)=>e[n]===r)}o(H,"startsWithPath");function ie(e){const t=e.slice(2).filter(n=>!O.has(n));if(K.some(n=>H(t,n)))return null;const r=J.find(n=>H(t,n));return r===void 0?null:r.join(" ")}o(ie,"personOnlyInvocation");function ce(e){return M(e,"daemon")}o(ce,"isDaemonControlInvocation");function ue(e){return M(e,"migrate")}o(ue,"isLayoutMigrationInvocation");async function le(){const{registerDaemonControlSys:e}=await import("./commands/sys/daemon.js");return y({tagline:S,globals:b,subtrees:[e()]})}o(le,"resolveDaemonControlRoot");async function me(){const[{defineSysBranch:e},{sysMigrateLeaf:t}]=await Promise.all([import("./commands/sys/branch.js"),import("./commands/sys/migrate.js")]);return y({tagline:S,globals:b,subtrees:[e([t])]})}o(me,"resolveLayoutMigrationRoot");async function de(e){return(e!==void 0?await X(e):null)??Y()}o(de,"resolveRoot");async function X(e){if(k[e]===void 0)return null;const t=await N(e),r=await _(),n=[...r].some(a=>a.split(" ")[0]===e)?await F(e,r):null,s=B(n===null?[t]:await A([t],r,n));return s.length>0?y({tagline:S,globals:b,subtrees:R(s,T())}):null}o(X,"resolveCoreRoot");async function Y(){const e=await C(),[{buildExternalCommandSnapshot:t},{composeExternalSubtrees:r,composeSandboxProviderSubtrees:n},{qualifiedTopLevelCommandName:s}]=await Promise.all([import("./core/command-plugins/discovery.js"),import("./core/command-plugins/compose.js"),import("./core/command-manifests/registry.js")]),a=await _(),c=await A(e,a,g(e)),i=t(new Set(d),void 0,void 0,g(e),a);let l=r(i);if(E()){const{cliClient:h}=await import("./commands/api-client.js");p("cli.providers.request");const{providers:w}=await h().request("GET","/v1/providers/tools");p("cli.providers.fetched",{providers:w.length});const f=n(w,new Set(d)),m=new Set(f.map(u=>u.name));l=[...f,...r({...i,contributions:i.contributions.map(u=>m.has(u.node.name)?{...u,node:{...u.node,name:s(u.contributor,u.node.name)}}:u)})]}return y({tagline:S,globals:b,subtrees:[...R(B(c),T()),...l]})}o(Y,"buildRoot");export{W as EXTENSIBLE_CORE_BRANCHES,d as SUBTREE_NAMES,Y as buildRoot,re as coreCommandPaths,se as coreCommandPathsCovering,oe as coreHookCatalog,ae as declaredExtensibleCoreBranches,_ as extensibleCoreBranches,ce as isDaemonControlInvocation,ue as isLayoutMigrationInvocation,ie as personOnlyInvocation,X as resolveCoreRoot,le as resolveDaemonControlRoot,me as resolveLayoutMigrationRoot,de as resolveRoot};
1
+ var I=Object.defineProperty;var o=(e,t)=>I(e,"name",{value:t,configurable:!0});import{defineBranch as D,defineRoot as y,GLOBAL_TOKENS as O}from"./core/command.js";import{createCoreHookCatalog as x}from"./core/command-hooks/catalog.js";import{composeCoreHooks as R}from"./core/command-hooks/compose.js";import{mark as p}from"./core/timing.js";import{envNodeId as G,envScopes as U,isSandboxedNode as E,scopeAllowed as q}from"./shared/env.js";const S="crtr: agentic runtime.",b=[{name:"--json",desc:"stdout as the leaf's declared outputs in raw JSON instead of prose \u2014 for scripts (a cron's bash, external tooling) that must branch on canvas state; prose stays the contract for what you read yourself."}],k=Object.assign(Object.create(null),{doc:o(async()=>(await import("./commands/doc.js")).registerDoc(),"doc"),"custom-object":o(async()=>(await import("./commands/custom-object.js")).registerCustomObject(),"custom-object"),profile:o(async()=>(await import("./commands/profile.js")).registerProfile(),"profile"),pkg:o(async()=>(await import("./commands/pkg.js")).registerPkg(),"pkg"),human:o(async()=>(await import("./commands/human.js")).registerHuman(),"human"),sys:o(async()=>(await import("./commands/sys.js")).registerSys(),"sys"),node:o(async()=>(await import("./commands/node.js")).registerNode(),"node"),push:o(async()=>(await import("./commands/push.js")).registerPush(),"push"),cron:o(async()=>(await import("./commands/cron.js")).registerCron(),"cron"),canvas:o(async()=>(await import("./commands/canvas.js")).registerCanvas(),"canvas"),surface:o(async()=>(await import("./commands/surface.js")).registerSurface(),"surface")}),m=Object.freeze(Object.keys(k)),z={human:["crtr:act"],cron:["crtr:schedule"],doc:["crtr:memory:read:user","crtr:memory:rw:user"]};function B(e){const t=U();return t===null?e:e.filter(r=>{const n=z[r.name];return n===void 0||n.some(s=>q(t,s))||r.name==="doc"&&process.env.CRTR_GRANTEE?.startsWith("app:")===!0})}o(B,"allowedSubtrees");const N=new Map;function L(e){let t=N.get(e);return t===void 0&&(t=k[e](),N.set(e,t)),t}o(L,"loadSubtree");function v(e){return Promise.all(m.filter(t=>e.has(t)).map(L))}o(v,"loadCoreSubtreesNamed");function C(){return v(new Set(m))}o(C,"loadCoreSubtrees");function P(e){const t=new Set;for(const r of e){const n=r.split(" ")[0];m.includes(n)&&t.add(n)}return t}o(P,"subtreesNamedBy");let j;function re(){return p("cli.hooks.catalog"),j??=C().then(x),j}o(re,"coreHookCatalog");function T(){let e;return()=>(e??=(async()=>{const{compileHookRegistry:t,declaredCommandHookTargets:r,effectiveHookPlugins:n}=await import("./core/command-hooks/discovery.js"),s=n(),a=E()&&G()!==void 0?await(await import("./core/command-hooks/transport/plan.js")).remoteHookPlan(process.cwd()):[];if(p("cli.hooks.effective_plugins",{count:s.length+a.length}),s.length===0&&a.length===0)return p("cli.hooks.empty_registry"),t(x([]),[]);const c=E()?s.filter(l=>l.scope==="project"):s,i=P([...r(c),...a.map(l=>l.target)]);return p("cli.hooks.catalog",{subtrees:[...i].join(",")}),t(x(await v(i)),c,a)})(),e)}o(T,"hookRegistryLoader");function g(e){const t=new Set,r=o((n,s)=>{if(!(n.kind==="branch"&&n.passthrough!==void 0)&&(t.add(s),n.kind==="branch"))for(const a of n.children)r(a,`${s} ${a.name}`)},"visit");for(const n of e)r(n,n.name);return t}o(g,"commandPathsFor");async function se(){return g(await C())}o(se,"coreCommandPaths");async function ae(e){return g(await v(P(e)))}o(ae,"coreCommandPathsCovering");function W(e){const t=[],r=o((n,s)=>{n.extensible===!0&&t.push(s);for(const a of n.children)a.kind==="branch"&&r(a,[...s,a.name])},"visit");for(const n of e)r(n,[n.name]);return t}o(W,"extensibleBranchPaths");const $=Object.freeze(["human","sys tutorial"]);async function _(){return new Set($)}o(_,"extensibleCoreBranches");async function ie(){return new Set(W(await C()).map(e=>e.join(" ")))}o(ie,"declaredExtensibleCoreBranches");function F(e,t){const{listing:r,...n}=e.help;return D({name:e.name,description:e.description,whenToUse:e.whenToUse,tier:e.tier,help:n,rootEntry:e.rootEntry,extensible:e.extensible,plugin:e.plugin,slash:e.slash,passthrough:e.passthrough,children:t})}o(F,"rebuildBranch");async function A(e,t,r){if(t.size===0)return e;const[{buildExternalCommandSnapshot:n},{composeCoreBranchMounts:s}]=await Promise.all([import("./core/command-plugins/discovery.js"),import("./core/command-plugins/compose.js")]),a=n(new Set(m),void 0,void 0,r,t),c=o((i,l)=>{let h=!1;const w=i.children.map(d=>{if(d.kind!=="branch")return d;const u=c(d,[...l,d.name]);return u!==d&&(h=!0),u}),f=i.extensible===!0?s(a.coreMounts,l):[];return h||f.length>0?F(i,[...w,...f]):i},"composeBranch");return e.map(i=>c(i,[i.name]))}o(A,"composeCorePluginMounts");async function J(e,t){const{validateEffectiveCommandPlugins:r}=await import("./core/command-plugins/discovery.js"),s=r(new Set(m),void 0,void 0,void 0,t).flatMap(c=>c.manifest===void 0?[]:[c.manifest]).filter(c=>c.coreMounts.some(i=>i.parent[0]===e));if(s.length===0)return null;const a=P(s.flatMap(c=>[...c.coreMounts.map(i=>i.parent.join(" ")),...Object.keys(c.helpAddenda??{})]));return a.add(e),g(await v(a))}o(J,"dispatchCommandPaths");function M(e,t){const r=e.slice(2).filter(n=>!O.has(n));return r[0]==="sys"&&r[1]===t}o(M,"isSysInvocation");const K=[["surface"],["sys"],["pkg"],["profile","default"],["canvas","chord"],["canvas","config"],["canvas","use"],["canvas","browse"],["canvas","issue"]],X=[["sys","feedback"]];function H(e,t){return t.every((r,n)=>e[n]===r)}o(H,"startsWithPath");function ce(e){const t=e.slice(2).filter(n=>!O.has(n));if(X.some(n=>H(t,n)))return null;const r=K.find(n=>H(t,n));return r===void 0?null:r.join(" ")}o(ce,"personOnlyInvocation");function ue(e){return M(e,"daemon")}o(ue,"isDaemonControlInvocation");function le(e){return M(e,"migrate")}o(le,"isLayoutMigrationInvocation");async function de(){const{registerDaemonControlSys:e}=await import("./commands/sys/daemon.js");return y({tagline:S,globals:b,subtrees:[e()]})}o(de,"resolveDaemonControlRoot");async function me(){const[{defineSysBranch:e},{sysMigrateLeaf:t}]=await Promise.all([import("./commands/sys/branch.js"),import("./commands/sys/migrate.js")]);return y({tagline:S,globals:b,subtrees:[e([t])]})}o(me,"resolveLayoutMigrationRoot");async function pe(e){return(e!==void 0?await Y(e):null)??Q()}o(pe,"resolveRoot");async function Y(e){if(k[e]===void 0)return null;const t=await L(e),r=await _(),n=[...r].some(a=>a.split(" ")[0]===e)?await J(e,r):null,s=B(n===null?[t]:await A([t],r,n));return s.length>0?y({tagline:S,globals:b,subtrees:R(s,T())}):null}o(Y,"resolveCoreRoot");async function Q(){const e=await C(),[{buildExternalCommandSnapshot:t},{composeExternalSubtrees:r,composeSandboxProviderSubtrees:n},{qualifiedTopLevelCommandName:s}]=await Promise.all([import("./core/command-plugins/discovery.js"),import("./core/command-plugins/compose.js"),import("./core/command-manifests/registry.js")]),a=await _(),c=await A(e,a,g(e)),i=t(new Set(m),void 0,void 0,g(e),a);let l=r(i);if(E()){const{cliClient:h}=await import("./commands/api-client.js");p("cli.providers.request");const{providers:w}=await h().request("GET","/v1/providers/tools");p("cli.providers.fetched",{providers:w.length});const f=n(w,new Set(m)),d=new Set(f.map(u=>u.name));l=[...f,...r({...i,contributions:i.contributions.map(u=>d.has(u.node.name)?{...u,node:{...u.node,name:s(u.contributor,u.node.name)}}:u)})]}return y({tagline:S,globals:b,subtrees:[...R(B(c),T()),...l]})}o(Q,"buildRoot");export{$ as EXTENSIBLE_CORE_BRANCHES,m as SUBTREE_NAMES,Q as buildRoot,se as coreCommandPaths,ae as coreCommandPathsCovering,re as coreHookCatalog,ie as declaredExtensibleCoreBranches,_ as extensibleCoreBranches,ue as isDaemonControlInvocation,le as isLayoutMigrationInvocation,ce as personOnlyInvocation,Y as resolveCoreRoot,de as resolveDaemonControlRoot,me as resolveLayoutMigrationRoot,pe as resolveRoot};
@@ -9,6 +9,14 @@ when-and-why-to-read: When you need Release notes, this knowledge should be read
9
9
 
10
10
  Changes to `@north-light/sdk` that can change what an existing app sees. Newest first.
11
11
 
12
+ ## 0.3.559
13
+
14
+ An app can run the `crtr` command line in its own sandbox on the person's runtime. Additive.
15
+
16
+ - **`ConnectedCrouter.exec(argv, { timeoutS? })`** (`POST /v1/exec`, scopes `crtr:act` and `crtr:schedule`) runs `crtr` with `argv` (no shell, no stdin; under 32 KB as JSON text) in the app's files folder, as the app under its current grant, and returns `exit_code`, `signal`, `stdout`, `stderr` (256 KiB each, with a `*_truncated` flag), `timed_out` and `duration_ms`. A non-zero exit or a timeout resolves. `timeoutS` defaults to 60 and is at most 100. A fifth exec while 4 of the app's are running is refused `429 busy` (retryable), and a runtime with no root launcher (a person's own Mac) refuses `503 sandbox_unavailable`.
17
+ - **`409 model_sign_in_required`.** An agent started from an exec, or by a cron armed from one, is refused when the person has not signed in to a model for it; `details.url` is the directory's AI subscription page to send them to. `crtr` prints the message and that URL.
18
+ - **FakeCloud** serves `exec`: `cloud.exec.respond(handler)` sets the answer (throw `FakeCloud.error(...)` for a refusal) and `cloud.exec.calls` lists the accepted calls. It checks both scopes and the 4-live cap.
19
+
12
20
  ## 0.3.554
13
21
 
14
22
  `RunObject.recap` (`runs.get`, `runs.list`): the root's latest idle recap, `{ goal, state, at }`, where `goal` says what the conversation is for and `state` where it stands. The runtime writes it after a turn once the root goes idle; it is absent before the first one. Additive.
@@ -40,7 +40,7 @@ Every namespace exported by the client. Namespaces are camelCase. Verbs are `cre
40
40
  | `grant` | `get` (`wait`, `since`: hold until `version` changes) | `GET /v1/grant` |
41
41
  | `health` | `get` | `GET /v1/health` |
42
42
 
43
- `runs`, `uploads`, `attachments`, `shares`, `questions`, `docs` and the app side of `grant` and `providers` are the application-facing API an app reaches through the app listener; `oauth.client(userId)` returns a client typed to exactly that set (`AppClient`); `customObjects` (`register`, `publish`, `unregister`) and `canvas` (`watch`, `unwatch`) are served too, for the custom objects your app owns; `oauth.appClient(userId)` returns the same `AppClient` type without a stored sign-in ([Connections](https://sdk.docs.northlight.ai/docs/concepts/connections#acting-without-a-sign-in)). `nodes`, `bash`, `crons`, `human`, `models`, `structuredRequests`, `system`, `auth`, the rest of `canvas` and `customObjects` (`receive`, `ack`), `files.read/write/list` and `profiles.ensure/retrieve` are the owner's own daemon and are not served to an app. An app schedules work with its own timer calling `runs.start`, or a run's agent runs `crtr cron add` under `crtr:schedule`. See [[crouter-sdk/guides/apps-on-northlight]] and [[crouter-sdk/guides/apps-with-many-users]]. `memory` is the person's `public` documents ([[crouter-sdk/memory]]). `docs` writes, reads and edits documents the calling app owns: `docs.write({name, body, preview, kind?, rules?})` returns the canonical `name`; `docs.get(name)` returns `body`, `revision`, `rules` and the edit `base`; `docs.edit(name, {body, rationale, base?})` changes it in place and refuses a stale `base` with `ConflictError` (`stale_revision`). To keep one document current, `get` it (catch `NotFoundError` on first run to `write`), compare `body` to your text, and `edit` only when they differ. `system.health` (`/healthz`) is the daemon's liveness check; `health.get` is the app listener's.
43
+ `runs`, `uploads`, `attachments`, `shares`, `questions`, `docs` and the app side of `grant` and `providers` are the application-facing API an app reaches through the app listener; `oauth.client(userId)` returns a client typed to exactly that set (`AppClient`); `customObjects` (`register`, `publish`, `unregister`) and `canvas` (`watch`, `unwatch`) are served too, for the custom objects your app owns; `oauth.appClient(userId)` returns the same `AppClient` type without a stored sign-in ([Connections](https://sdk.docs.northlight.ai/docs/concepts/connections#acting-without-a-sign-in)). Both return a `ConnectedCrouter`, which also has `exec(argv, { timeoutS? })` (`POST /v1/exec`, scopes `crtr:act` and `crtr:schedule`): it runs `crtr <argv>` with no shell in the app's sandbox on the person's runtime and returns the same result shape as `bash.run`; at most 4 run at once per app (`429 busy`). `nodes`, `bash`, `crons`, `human`, `models`, `structuredRequests`, `system`, `auth`, the rest of `canvas` and `customObjects` (`receive`, `ack`), `files.read/write/list` and `profiles.ensure/retrieve` are the owner's own daemon and are not served to an app. An app schedules work with its own timer calling `runs.start`, or a run's agent runs `crtr cron add` under `crtr:schedule`. See [[crouter-sdk/guides/apps-on-northlight]] and [[crouter-sdk/guides/apps-with-many-users]]. `memory` is the person's `public` documents ([[crouter-sdk/memory]]). `docs` writes, reads and edits documents the calling app owns: `docs.write({name, body, preview, kind?, rules?})` returns the canonical `name`; `docs.get(name)` returns `body`, `revision`, `rules` and the edit `base`; `docs.edit(name, {body, rationale, base?})` changes it in place and refuses a stale `base` with `ConflictError` (`stale_revision`). To keep one document current, `get` it (catch `NotFoundError` on first run to `write`), compare `body` to your text, and `edit` only when they differ. `system.health` (`/healthz`) is the daemon's liveness check; `health.get` is the app listener's.
44
44
 
45
45
  Action methods keep the product's literal name (`fork`, `revive`, `promote`, `yield`) rather than being renamed into a generic verb. Every request-capable method takes `RequestOptions` as its final argument after its path, body, or query arguments. `RequestOptions` is `{ headers?, signal?, timeout?, maxRetries? }`; stream event options exclude `timeout` and add `after`.
46
46