@north-light/cli 0.3.730 → 0.3.731
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/api/errors.d.ts +5 -0
- package/dist/api/errors.js +1 -1
- package/dist/clients/attach/viewer.js +526 -526
- package/dist/core/canvas/history.d.ts +1 -1
- package/dist/core/canvas/history.js +8 -8
- package/dist/core/conversation-store/row-store.js +13 -13
- package/dist/core/environment-starter-script.d.ts +1 -1
- package/dist/core/environment-starter-script.js +4 -1
- package/dist/core/model-auth/activations.js +1 -1
- package/dist/core/runtime/runner/blaxel/image-build.d.ts +3 -0
- package/dist/core/runtime/runner/blaxel/image-build.js +6 -6
- package/dist/daemon/api/bridge.js +2 -2
- package/dist/daemon/api/handlers/canvas.js +1 -1
- package/dist/pi-extensions/canvas-inbox-watcher.js +2 -2
- package/package.json +3 -3
- package/packages/crouter-api/dist/api/errors.js +11 -0
- package/packages/crouter-api/dist/core/canvas/history.js +3 -3
- package/packages/crouter-api/dist/core/conversation-store/row-store.js +7 -2
- package/packages/crouter-api/dist/core/environment-starter-script.js +4 -1
- package/packages/crouter-api/dist/core/runtime/runner/blaxel/image-build.js +4 -1
- package/packages/crouter-api/package.json +1 -1
- package/packages/crouter-identity/package.json +1 -1
- package/packages/crouter-plugin/package.json +3 -3
- package/runtime.lock.json +14 -14
package/dist/api/errors.d.ts
CHANGED
|
@@ -43,6 +43,11 @@ export { APIError as ApiError };
|
|
|
43
43
|
/** A local API transport failure has stable status/code identity, independent
|
|
44
44
|
* of message prose. */
|
|
45
45
|
export declare function isDaemonTransportApiError(error: unknown): error is APIError;
|
|
46
|
+
/** A daemon answer that says nothing about the caller's data: the daemon was unreachable, starting, draining for a
|
|
47
|
+
* restart (503 `startup_blocked`), overloaded, or failed server-side. Retrying the same request later can succeed, so a
|
|
48
|
+
* long-lived caller (a broker's inbox poll) retries it rather than treating it as corrupt state. A 4xx other than
|
|
49
|
+
* 408/429 is about the request itself and is not transient. */
|
|
50
|
+
export declare function isTransientDaemonApiError(error: unknown): error is APIError;
|
|
46
51
|
/** The daemon refused the caller's node token. A teardown revokes the broker's token before its process stops, so a broker
|
|
47
52
|
* that sees this on a poll is being shut down, not hitting a corrupt state. */
|
|
48
53
|
export declare function isTokenRevokedApiError(error: unknown): error is APIError;
|
package/dist/api/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var d=Object.defineProperty;var r=(t,e)=>d(t,"name",{value:e,configurable:!0});class a extends Error{static{r(this,"APIError")}status;code;details;headers;type;param;origin;retryable;retryAfterS;resetAt;requestId;runId;questionId;scope;userAction;constructor(e,i,n,o,u,s){super(n),this.name="APIError",this.status=e,this.code=i,this.headers=new Headers(u),o!==void 0&&(this.details=o),this.type=s?.type,this.param=s?.param,this.origin=s?.origin,this.retryable=s?.retryable,this.retryAfterS=s?.retry_after_s,this.resetAt=s?.reset_at,this.requestId=s?.request_id??this.headers.get("Request-Id")??void 0,this.runId=s?.run_id,this.questionId=s?.question_id,this.scope=s?.scope,this.userAction=s?.user_action}}function c(t){return t instanceof a?t.status===503&&(t.code==="daemon_unavailable"||t.code==="transport_error"||t.code==="daemon_request_interrupted"||t.code==="runtime_starting"||t.code==="northlight_unreachable")||t.status===504&&(t.code==="request_timeout"||t.code==="deadline_exceeded")||t.status>=500&&t.code==="daemon_health_unavailable":!1}r(c,"isDaemonTransportApiError");function h(t){if(!(t instanceof a))return!1;const{status:e,code:i,retryable:n}=t;return c(t)||n===!0||i==="startup_blocked"||e===408||e===429||e>=500}r(h,"isTransientDaemonApiError");function p(t){return t instanceof a&&t.status===401}r(p,"isTokenRevokedApiError");function _(t){if(typeof t!="object"||t===null)return!1;const e=t.error;if(typeof e!="object"||e===null)return!1;const{code:i,message:n}=e;return typeof i=="string"&&typeof n=="string"}r(_,"isErrorBody");export{a as APIError,a as ApiError,c as isDaemonTransportApiError,_ as isErrorBody,p as isTokenRevokedApiError,h as isTransientDaemonApiError};
|