@north-light/cli 0.3.721 → 0.3.722
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/dto/recovery.d.ts +2 -0
- package/dist/clients/attach/viewer.js +281 -281
- package/dist/commands/node/inspect.js +7 -7
- package/dist/core/canvas/schema-pg/032-model-cooldown-vendor-limit.sql +4 -0
- package/dist/core/canvas/schema-version.d.ts +1 -1
- package/dist/core/canvas/schema-version.js +1 -1
- package/dist/core/llm/run.js +2 -2
- package/dist/core/managed-providers.d.ts +9 -1
- package/dist/core/provider-failure.d.ts +2 -0
- package/dist/core/provider-failure.js +1 -1
- package/dist/core/runtime/broker/model-adapter.js +3 -3
- package/dist/core/runtime/revive.d.ts +2 -0
- package/dist/core/runtime/revive.js +2 -2
- 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/core/subscription-state.d.ts +4 -4
- package/dist/core/subscription-state.js +1 -1
- package/dist/daemon/api/handlers/messages.js +2 -2
- package/dist/daemon/api/handlers/nodes.js +1 -1
- package/dist/daemon/reconcilers/broker-supervision.js +3 -3
- package/package.json +3 -3
- package/packages/crouter-api/dist/commands/node/inspect.js +2 -1
- package/packages/crouter-api/dist/core/canvas/schema-version.js +1 -1
- package/packages/crouter-api/dist/core/llm/run.js +13 -2
- package/packages/crouter-api/dist/core/provider-failure.js +9 -0
- package/packages/crouter-api/dist/core/runtime/broker/model-adapter.js +3 -1
- package/packages/crouter-api/dist/core/runtime/revive.js +11 -0
- package/packages/crouter-api/dist/core/runtime/runner/blaxel/image-build.js +16 -1
- package/packages/crouter-api/dist/core/subscription-state.js +26 -10
- package/packages/crouter-api/dist/daemon/reconcilers/broker-supervision.js +3 -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
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var j=Object.defineProperty;var _=(i,e)=>j(i,"name",{value:e,configurable:!0});import{existsSync as J}from"node:fs";import{LAUNCHER_SOCKET as Q}from"../../launcher/spec.js";import{launcherRequest as X}from"../../launcher/client.js";import{execFile as Z}from"node:child_process";import{promisify as ee}from"node:util";import{getNode as S,isWarmSpare as te,subscribersOf as ne}from"../../core/canvas/index.js";import{isSafeNodeId as c}from"../../core/canvas/paths.js";import{fullName as $}from"../../core/canvas/labels.js";import{recordedPidLiveness as B}from"../../core/canvas/pid.js";import{transition as re}from"../../core/runtime/lifecycle.js";import{hasAdmittedTurn as ae,listUnnotifiedFatalFaultNodes as ie,markFaultNotified as oe,readFault as L,readLiveTurn as F,recordFault as se}from"../../core/canvas/recovery.js";import{errorClassFromFault as de}from"../../core/fault-classifier.js";import{nextFaultRetry as le}from"../../core/runtime/fault-recovery.js";import{publishNotice as W}from"../../core/runtime/close.js";import{openDb as x,withCanvasWrite as ce}from"../../core/canvas/db.js";import{getById as ue}from"../../core/graph/objects.js";import{watcherIdsOf as fe}from"../../core/graph/watches.js";import{headlessBrokerHost as pe}from"../../core/runtime/host.js";import{endExecution as me,liveExecutionForNode as N,requestExecutionStop as _e}from"../../core/canvas/executions.js";import{runnerForExecution as he}from"../../core/runtime/runner/index.js";import{emitEvent as f}from"../../core/events/emit.js";import{operationIdContext as D}from"../../core/events/operation-id.js";import{hasUnseenWakeMail as we,resetStaleExecutionMail as ke}from"../../core/canvas/deliveries.js";import{runningJobs as ge}from"../../core/graph/jobs.js";import{focusOf as ve}from"../../core/runtime/placement.js";import{hasAttachedBrokerViewers as ye}from"../api/viewer-presence.js";import{deliverLive as be}from"../../core/runtime/interactive-deliver.js";import{BrokerUnreachableError as Se}from"../../core/runtime/broker-request.js";import{formatCard as Te,PARK_SUMMARY_PROMPT as Ae}from"../../shared/generated-context.js";import{brokerThresholdsForDaemon as Ie}from"../../core/runtime/fleet.js";import{readConfig as Re}from"../../core/config.js";import{beginPendingPark as Me,clearSupervisionMark as h,consumePendingPark as T,pendingParkIds as Pe,pendingParkStartedAt as Ee,readSupervisionMark as A,writeSupervisionMark as I}from"../park-pending.js";import{shouldParkAfterSummary as $e}from"../park-activity.js";import{applyParkEvent as R,noticeUnfinishedIdle as Fe,parkVerdict as xe}from"./live-obligation.js";import{readGoal as Ne}from"../../core/runtime/kickoff.js";import{memoryDeniedRecently as De}from"../../core/runtime/memory-admission.js";import{envNoDaemonAutostart as Oe,envTestUnattendedParkMs as Ce,parkSummaryGraceMs as Be,envUnattendedParkMs as Le}from"../../shared/env.js";import{KILL_ESCALATE_MS as G,sampleBrokerTree as We,wedgeVerdict as Ge,WEDGE_QUIET_MS as O,YIELD_STALL_GRACE_MS as U,yieldStallVerdict as q}from"../../core/runtime/broker-wedge.js";const C=ee(Z);async function Ue(i){return!await ae(i)&&((await Ne(i))?.trim()??"")!==""}_(Ue,"awaitsBirthTurn");async function Y(i){const e=await N(i);return e!==null&&e.runner!=="process"&&e.state==="running"?e:null}_(Y,"remoteExecutionOf");async function qe(i){return(await F(i))?.busy===!0}_(qe,"liveBusy");async function xt(i){const e=(await F(i))?.progressAt;if(e==null)return null;const t=Date.parse(e);return Number.isNaN(t)?null:t}_(xt,"liveTurnProgressMs");function V(i,e){return e===null?null:`${i}:${e}`}_(V,"incarnationOf");async function b(i){const e=await F(i.node_id),t=e?.busy===!0&&e.progressAt!==null?Date.parse(e.progressAt):Number.NaN,r=i.launched_at===null||i.launched_at===void 0?Number.NaN:Date.parse(i.launched_at);return!Number.isFinite(t)||!Number.isFinite(r)||t<r?null:t}_(b,"busySinceForIncarnation");const Ye=5*6e4;function Ve(i,e){return i===null||i.parent!=null?!1:i.lifecycle==="terminal"?!0:(e==="cap_exhausted"||e==="payment_refused"||e==="all_routes_exhausted")&&i.run_id===i.node_id}_(Ve,"settlesOnFatalProviderFault");function He(){const i=Le();if(i!==void 0)return i;const e=Re("user").lifecycle.unattendedParkMs;return Oe()?Ce()??e:e}_(He,"unattendedParkMsForDaemon");function H(){return Be()}_(H,"parkSummaryGraceMsForDaemon");function Ke(i,e,t,r,a){const n=`Child wedged \u2014 ${i} is alive and mid-turn but has shown NO engine progress for ${e}+ minutes and `;if(t)return n+"its process is near-idle. It will NOT recover on its own \u2014 read `crtr canvas read wedged-child-on-runaway-bash` and kill the runaway SUBPROCESS (not this node) so its turn can resume with no lost context.";const s="it has no subprocess to kill (the engine itself stalled). ";return r?n+s+"The daemon did not SIGTERM the broker because its PID identity cannot be confirmed alive.":a?n+s+"The daemon sent SIGTERM to the broker and will resume a cleanly aborted session with a continuation, or start a recovery cycle if the abort cannot settle.":n+s+"The daemon attempted SIGTERM to the broker, but the signal call failed."}_(Ke,"wedgeLabel");async function K(i,e){f({level:"error",event:"broker.wedge.detected",...c(i)?{node_id:i}:{},fields:{...c(i)?{}:{affected_node_id:i},pid:e.pid,quiet_ms:e.quietForMs,cpu_percent:e.cpuPercent,has_descendants:e.hasDescendants,kick_attempted:e.kickAttempted,kicked:e.kicked,...e.kickSuppressionReason===null?{}:{kick_suppression_reason:e.kickSuppressionReason}}});try{await se(i,{link:"daemon\u2192node",op:"engine wedge",kind:"wedged",retry:{disposition:"manual"},message:e.label})}catch(t){f({level:"error",event:"broker.wedge.fault_record_failed",...c(i)?{node_id:i}:{fields:{affected_node_id:i}},error:t})}await W(i,"notice.crash",e.label,{reason:"child-wedged",child:i,quiet_ms:e.quietForMs,cpu_percent:e.cpuPercent,kick_attempted:e.kickAttempted,kicked:e.kicked,...e.kickSuppressionReason===null?{}:{kick_suppression_reason:e.kickSuppressionReason}})}_(K,"reportWedge");class Nt{static{_(this,"BrokerSupervisionReconciler")}yieldTermedAt=new Map;sampleTree;signal;lastOverCapWarnAt=Number.NEGATIVE_INFINITY;constructor(e={}){this.sampleTree=e.readTreeSample??We,this.signal=e.signal??((t,r)=>{if(process.platform==="linux"&&J(Q)){if(r!=="SIGTERM"&&r!=="SIGKILL")throw new Error(`unsupported launcher signal ${r}`);return X({operation:"stop",pid:t,signal:r}).then(()=>{})}process.kill(t,r)})}async runFleetPreamble(e){return Ie()}warnIfSaturated(e){if(e.fleet.size()<e.thresholds.warning||!e.lifecycle.acceptsDetachedWork())return;const t=D.fresh(()=>this.warnOverCapInTmux(e.fleet.size(),e.thresholds,e.frozen));e.lifecycle.registerDetached(t)}async run(e,t){const r=He();for(const a of await ie())t.held.has(a)||await D.fresh(async()=>{try{await this.handleFatalFault(a)}catch(n){f({level:"error",event:"broker.supervision.failed",...c(a)?{node_id:a}:{fields:{affected_node_id:a}},error:n})}});for(const a of t.rows){const n=a.node_id,s=t.fleet.get(n),d=s===void 0?await Y(n):null;if(s===void 0&&d===null||a.status!=="active"&&a.status!=="idle"){await h(n,"unattended_since");continue}await D.fresh(async()=>{try{s!==void 0?(await this.handleYieldStall(a,s,t.fleet,e),await this.handleWedgeDetection(a,s,t.fleet,e)):d.runner==="blaxel"&&(await this.handleRemoteYieldStall(a,d,e),await this.handleRemoteWedge(a,d,e)),await this.handleUnattendedParking(n,await S(n),s?.pid??d.pid,d,e,t,r)}catch(l){await h(n,"unattended_since"),f({level:"error",event:"broker.supervision.failed",...c(n)?{node_id:n}:{fields:{affected_node_id:n}},error:l})}})}for(const a of await Pe())await t.fleet.has(a)||await T(a);await ke(e)}async parkResetCondition(e,t,r,a){if(t.pi_session_id==null||t.pi_pid!==r||t.status==="done"||t.status==="canceled"||t.status==="dead"||t.intent!==null||(await ge(await x(),e)).length>0||await ve(e)!==null||await ye(e))return!0;const n=await L(e);return n!==null&&n.retry.disposition==="auto"&&n.retry.by==="daemon"&&(n.kind==="connection"||n.kind==="rate-limit"||n.kind==="overloaded")&&(n.retry.nextAt!==void 0||le(n,a)!==null)?!0:await we(e)}async handleUnattendedParking(e,t,r,a,n,s,d){if(await te(e)){await h(e,"unattended_since"),await T(e);return}if(t===null){await h(e,"unattended_since"),await T(e);return}const l=await this.parkResetCondition(e,t,r,n),o=await Ee(e);if(o!==void 0){if(n-o<H())return;const v=await T(e);if(v===void 0||(await h(e,"unattended_since"),!await $e(e,t,v)))return;f({level:"warn",event:"broker.park.summary_expired",...c(e)?{node_id:e}:{},fields:{...c(e)?{}:{affected_node_id:e},grace_ms:H()}}),await R(e,"park"),this.teardownBroker(e,a);return}if(l||await qe(e)||await Ue(e)){await h(e,"unattended_since");return}const p=await A(e,"unattended_since");if(p===void 0){await I(e,"unattended_since",n);return}const{event:u,heldOnlyBySubscriber:w}=await xe(e,t.lifecycle),k=u!=="cancel"&&De(t.grantee??"app:terminal",n)?0:d;if(!(n-p<k)){if(await h(e,"unattended_since"),u==="release"){await R(e,u),w&&await Fe(e),this.teardownBroker(e,a);return}if(u==="cancel"){await R(e,u),this.teardownBroker(e,a);return}if(t.grantee!==void 0&&t.grantee!=="app:terminal"){await R(e,"park"),this.teardownBroker(e,a);return}s.lifecycle.acceptsDetachedWork()&&(await Me(e,n),s.lifecycle.registerDetached(this.requestParkSummary(e,a)))}}async requestParkSummary(e,t){try{const r=await be(e,Te("park",{},Ae),{origin:{type:"runtime",kind:"park"}});f({level:"info",event:"broker.park.summary_requested",...c(e)?{node_id:e}:{},fields:{...c(e)?{}:{affected_node_id:e},route:r}})}catch(r){if(await T(e)===void 0)return;if(r instanceof Se){await R(e,"park"),this.teardownBroker(e,t);return}f({level:"error",event:"broker.park.summary_failed",...c(e)?{node_id:e}:{fields:{affected_node_id:e}},error:r})}}async warnOverCapInTmux(e,t,r){const a=Date.now();if(a-this.lastOverCapWarnAt<Ye)return;this.lastOverCapWarnAt=a;const{warning:n,automaticReviveCap:s}=t,d=r.stalled+r.waitingOnMail;f({level:"warn",event:"broker.capacity.warning",fields:{live_count:e,warning_threshold:n,hard_cap:s,frozen_stalled:r.stalled,frozen_waiting_on_mail:r.waitingOnMail}});const l=d===0?"":` \u2014 ${d} frozen (${r.stalled} stalled, ${r.waitingOnMail} waiting on mail)`,o=`\u26A0 crtrd: ${e} live brokers (warning ${n}; hard cap ${s})${l} \u2014 possible broker leak. ps -ax | grep broker-cli.js`;try{const p=await C("tmux",["list-clients","-F","#{client_name}"],{encoding:"utf8",timeout:2e3});if(typeof p.stdout!="string")return;await Promise.allSettled(p.stdout.split(`
|
|
2
|
-
`).map(async u=>{if(u!=="")try{await C("tmux",["display-message","-C","-d","10000","-c",u,o],{encoding:"utf8",timeout:2e3})}catch{try{await C("tmux",["display-message","-c",u,o],{encoding:"utf8",timeout:2e3})}catch(w){f({level:"error",event:"broker.capacity.tmux_display_failed",error:w,fields:{client:u}})}}}))}catch(p){f({level:"error",event:"broker.capacity.tmux_list_clients_failed",error:p})}}async teardownBroker(e,t){return t===null?await
|
|
3
|
-
`)[0]??"").slice(0,200),o=r.providerError,p=o===void 0?"":` Provider: ${o.provider}/${o.model}.`+(o.status===void 0?"":` HTTP status: ${o.status}.`)+(o.errno===void 0?"":` Errno: ${o.errno}.`)+(o.code===void 0?"":` Code: ${o.code}.`)+(o.body===void 0?"":` Body: ${o.body.slice(0,200)}.`)+(
|
|
1
|
+
var j=Object.defineProperty;var _=(i,e)=>j(i,"name",{value:e,configurable:!0});import{existsSync as J}from"node:fs";import{LAUNCHER_SOCKET as Q}from"../../launcher/spec.js";import{launcherRequest as X}from"../../launcher/client.js";import{execFile as Z}from"node:child_process";import{promisify as ee}from"node:util";import{getNode as S,isWarmSpare as te,subscribersOf as ne}from"../../core/canvas/index.js";import{isSafeNodeId as c}from"../../core/canvas/paths.js";import{fullName as x}from"../../core/canvas/labels.js";import{recordedPidLiveness as B}from"../../core/canvas/pid.js";import{transition as re}from"../../core/runtime/lifecycle.js";import{hasAdmittedTurn as ae,listUnnotifiedFatalFaultNodes as ie,markFaultNotified as oe,readFault as L,readLiveTurn as F,recordFault as se}from"../../core/canvas/recovery.js";import{errorClassFromFault as de}from"../../core/fault-classifier.js";import{describeVendorLimit as le}from"../../core/provider-failure.js";import{nextFaultRetry as ce}from"../../core/runtime/fault-recovery.js";import{publishNotice as W}from"../../core/runtime/close.js";import{openDb as $,withCanvasWrite as ue}from"../../core/canvas/db.js";import{getById as fe}from"../../core/graph/objects.js";import{watcherIdsOf as pe}from"../../core/graph/watches.js";import{headlessBrokerHost as me}from"../../core/runtime/host.js";import{endExecution as _e,liveExecutionForNode as N,requestExecutionStop as he}from"../../core/canvas/executions.js";import{runnerForExecution as we}from"../../core/runtime/runner/index.js";import{emitEvent as f}from"../../core/events/emit.js";import{operationIdContext as D}from"../../core/events/operation-id.js";import{hasUnseenWakeMail as ke,resetStaleExecutionMail as ge}from"../../core/canvas/deliveries.js";import{runningJobs as ve}from"../../core/graph/jobs.js";import{focusOf as ye}from"../../core/runtime/placement.js";import{hasAttachedBrokerViewers as be}from"../api/viewer-presence.js";import{deliverLive as Se}from"../../core/runtime/interactive-deliver.js";import{BrokerUnreachableError as Ae}from"../../core/runtime/broker-request.js";import{formatCard as Te,PARK_SUMMARY_PROMPT as Ie}from"../../shared/generated-context.js";import{brokerThresholdsForDaemon as Me}from"../../core/runtime/fleet.js";import{readConfig as Pe}from"../../core/config.js";import{beginPendingPark as Re,clearSupervisionMark as h,consumePendingPark as A,pendingParkIds as Ee,pendingParkStartedAt as xe,readSupervisionMark as T,writeSupervisionMark as I}from"../park-pending.js";import{shouldParkAfterSummary as Fe}from"../park-activity.js";import{applyParkEvent as M,noticeUnfinishedIdle as $e,parkVerdict as Ne}from"./live-obligation.js";import{readGoal as De}from"../../core/runtime/kickoff.js";import{memoryDeniedRecently as Oe}from"../../core/runtime/memory-admission.js";import{envNoDaemonAutostart as Ce,envTestUnattendedParkMs as Be,parkSummaryGraceMs as Le,envUnattendedParkMs as We}from"../../shared/env.js";import{KILL_ESCALATE_MS as G,sampleBrokerTree as Ge,wedgeVerdict as Ue,WEDGE_QUIET_MS as O,YIELD_STALL_GRACE_MS as U,yieldStallVerdict as q}from"../../core/runtime/broker-wedge.js";const C=ee(Z);async function qe(i){return!await ae(i)&&((await De(i))?.trim()??"")!==""}_(qe,"awaitsBirthTurn");async function Y(i){const e=await N(i);return e!==null&&e.runner!=="process"&&e.state==="running"?e:null}_(Y,"remoteExecutionOf");async function Ye(i){return(await F(i))?.busy===!0}_(Ye,"liveBusy");async function Dt(i){const e=(await F(i))?.progressAt;if(e==null)return null;const t=Date.parse(e);return Number.isNaN(t)?null:t}_(Dt,"liveTurnProgressMs");function V(i,e){return e===null?null:`${i}:${e}`}_(V,"incarnationOf");async function b(i){const e=await F(i.node_id),t=e?.busy===!0&&e.progressAt!==null?Date.parse(e.progressAt):Number.NaN,r=i.launched_at===null||i.launched_at===void 0?Number.NaN:Date.parse(i.launched_at);return!Number.isFinite(t)||!Number.isFinite(r)||t<r?null:t}_(b,"busySinceForIncarnation");const Ve=5*6e4;function He(i,e){return i===null||i.parent!=null?!1:i.lifecycle==="terminal"?!0:(e==="cap_exhausted"||e==="payment_refused"||e==="all_routes_exhausted")&&i.run_id===i.node_id}_(He,"settlesOnFatalProviderFault");function Ke(){const i=We();if(i!==void 0)return i;const e=Pe("user").lifecycle.unattendedParkMs;return Ce()?Be()??e:e}_(Ke,"unattendedParkMsForDaemon");function H(){return Le()}_(H,"parkSummaryGraceMsForDaemon");function ze(i,e,t,r,a){const n=`Child wedged \u2014 ${i} is alive and mid-turn but has shown NO engine progress for ${e}+ minutes and `;if(t)return n+"its process is near-idle. It will NOT recover on its own \u2014 read `crtr canvas read wedged-child-on-runaway-bash` and kill the runaway SUBPROCESS (not this node) so its turn can resume with no lost context.";const s="it has no subprocess to kill (the engine itself stalled). ";return r?n+s+"The daemon did not SIGTERM the broker because its PID identity cannot be confirmed alive.":a?n+s+"The daemon sent SIGTERM to the broker and will resume a cleanly aborted session with a continuation, or start a recovery cycle if the abort cannot settle.":n+s+"The daemon attempted SIGTERM to the broker, but the signal call failed."}_(ze,"wedgeLabel");async function K(i,e){f({level:"error",event:"broker.wedge.detected",...c(i)?{node_id:i}:{},fields:{...c(i)?{}:{affected_node_id:i},pid:e.pid,quiet_ms:e.quietForMs,cpu_percent:e.cpuPercent,has_descendants:e.hasDescendants,kick_attempted:e.kickAttempted,kicked:e.kicked,...e.kickSuppressionReason===null?{}:{kick_suppression_reason:e.kickSuppressionReason}}});try{await se(i,{link:"daemon\u2192node",op:"engine wedge",kind:"wedged",retry:{disposition:"manual"},message:e.label})}catch(t){f({level:"error",event:"broker.wedge.fault_record_failed",...c(i)?{node_id:i}:{fields:{affected_node_id:i}},error:t})}await W(i,"notice.crash",e.label,{reason:"child-wedged",child:i,quiet_ms:e.quietForMs,cpu_percent:e.cpuPercent,kick_attempted:e.kickAttempted,kicked:e.kicked,...e.kickSuppressionReason===null?{}:{kick_suppression_reason:e.kickSuppressionReason}})}_(K,"reportWedge");class Ot{static{_(this,"BrokerSupervisionReconciler")}yieldTermedAt=new Map;sampleTree;signal;lastOverCapWarnAt=Number.NEGATIVE_INFINITY;constructor(e={}){this.sampleTree=e.readTreeSample??Ge,this.signal=e.signal??((t,r)=>{if(process.platform==="linux"&&J(Q)){if(r!=="SIGTERM"&&r!=="SIGKILL")throw new Error(`unsupported launcher signal ${r}`);return X({operation:"stop",pid:t,signal:r}).then(()=>{})}process.kill(t,r)})}async runFleetPreamble(e){return Me()}warnIfSaturated(e){if(e.fleet.size()<e.thresholds.warning||!e.lifecycle.acceptsDetachedWork())return;const t=D.fresh(()=>this.warnOverCapInTmux(e.fleet.size(),e.thresholds,e.frozen));e.lifecycle.registerDetached(t)}async run(e,t){const r=Ke();for(const a of await ie())t.held.has(a)||await D.fresh(async()=>{try{await this.handleFatalFault(a)}catch(n){f({level:"error",event:"broker.supervision.failed",...c(a)?{node_id:a}:{fields:{affected_node_id:a}},error:n})}});for(const a of t.rows){const n=a.node_id,s=t.fleet.get(n),d=s===void 0?await Y(n):null;if(s===void 0&&d===null||a.status!=="active"&&a.status!=="idle"){await h(n,"unattended_since");continue}await D.fresh(async()=>{try{s!==void 0?(await this.handleYieldStall(a,s,t.fleet,e),await this.handleWedgeDetection(a,s,t.fleet,e)):d.runner==="blaxel"&&(await this.handleRemoteYieldStall(a,d,e),await this.handleRemoteWedge(a,d,e)),await this.handleUnattendedParking(n,await S(n),s?.pid??d.pid,d,e,t,r)}catch(l){await h(n,"unattended_since"),f({level:"error",event:"broker.supervision.failed",...c(n)?{node_id:n}:{fields:{affected_node_id:n}},error:l})}})}for(const a of await Ee())await t.fleet.has(a)||await A(a);await ge(e)}async parkResetCondition(e,t,r,a){if(t.pi_session_id==null||t.pi_pid!==r||t.status==="done"||t.status==="canceled"||t.status==="dead"||t.intent!==null||(await ve(await $(),e)).length>0||await ye(e)!==null||await be(e))return!0;const n=await L(e);return n!==null&&n.retry.disposition==="auto"&&n.retry.by==="daemon"&&(n.kind==="connection"||n.kind==="rate-limit"||n.kind==="overloaded")&&(n.retry.nextAt!==void 0||ce(n,a)!==null)?!0:await ke(e)}async handleUnattendedParking(e,t,r,a,n,s,d){if(await te(e)){await h(e,"unattended_since"),await A(e);return}if(t===null){await h(e,"unattended_since"),await A(e);return}const l=await this.parkResetCondition(e,t,r,n),o=await xe(e);if(o!==void 0){if(n-o<H())return;const v=await A(e);if(v===void 0||(await h(e,"unattended_since"),!await Fe(e,t,v)))return;f({level:"warn",event:"broker.park.summary_expired",...c(e)?{node_id:e}:{},fields:{...c(e)?{}:{affected_node_id:e},grace_ms:H()}}),await M(e,"park"),this.teardownBroker(e,a);return}if(l||await Ye(e)||await qe(e)){await h(e,"unattended_since");return}const p=await T(e,"unattended_since");if(p===void 0){await I(e,"unattended_since",n);return}const{event:u,heldOnlyBySubscriber:w}=await Ne(e,t.lifecycle),k=u!=="cancel"&&Oe(t.grantee??"app:terminal",n)?0:d;if(!(n-p<k)){if(await h(e,"unattended_since"),u==="release"){await M(e,u),w&&await $e(e),this.teardownBroker(e,a);return}if(u==="cancel"){await M(e,u),this.teardownBroker(e,a);return}if(t.grantee!==void 0&&t.grantee!=="app:terminal"){await M(e,"park"),this.teardownBroker(e,a);return}s.lifecycle.acceptsDetachedWork()&&(await Re(e,n),s.lifecycle.registerDetached(this.requestParkSummary(e,a)))}}async requestParkSummary(e,t){try{const r=await Se(e,Te("park",{},Ie),{origin:{type:"runtime",kind:"park"}});f({level:"info",event:"broker.park.summary_requested",...c(e)?{node_id:e}:{},fields:{...c(e)?{}:{affected_node_id:e},route:r}})}catch(r){if(await A(e)===void 0)return;if(r instanceof Ae){await M(e,"park"),this.teardownBroker(e,t);return}f({level:"error",event:"broker.park.summary_failed",...c(e)?{node_id:e}:{fields:{affected_node_id:e}},error:r})}}async warnOverCapInTmux(e,t,r){const a=Date.now();if(a-this.lastOverCapWarnAt<Ve)return;this.lastOverCapWarnAt=a;const{warning:n,automaticReviveCap:s}=t,d=r.stalled+r.waitingOnMail;f({level:"warn",event:"broker.capacity.warning",fields:{live_count:e,warning_threshold:n,hard_cap:s,frozen_stalled:r.stalled,frozen_waiting_on_mail:r.waitingOnMail}});const l=d===0?"":` \u2014 ${d} frozen (${r.stalled} stalled, ${r.waitingOnMail} waiting on mail)`,o=`\u26A0 crtrd: ${e} live brokers (warning ${n}; hard cap ${s})${l} \u2014 possible broker leak. ps -ax | grep broker-cli.js`;try{const p=await C("tmux",["list-clients","-F","#{client_name}"],{encoding:"utf8",timeout:2e3});if(typeof p.stdout!="string")return;await Promise.allSettled(p.stdout.split(`
|
|
2
|
+
`).map(async u=>{if(u!=="")try{await C("tmux",["display-message","-C","-d","10000","-c",u,o],{encoding:"utf8",timeout:2e3})}catch{try{await C("tmux",["display-message","-c",u,o],{encoding:"utf8",timeout:2e3})}catch(w){f({level:"error",event:"broker.capacity.tmux_display_failed",error:w,fields:{client:u}})}}}))}catch(p){f({level:"error",event:"broker.capacity.tmux_list_clients_failed",error:p})}}async teardownBroker(e,t){return t===null?await me.teardown(e):await this.stopRemote(t,"teardown")}async stopRemote(e,t){await he(e.nodeId,{afterTurn:!1,reason:t});const r=await we(e.runner).stop(e,{reason:t});return r.confirmed?await _e(e.executionId,{reason:t}):f({level:"error",event:"broker.teardown.unconfirmed",node_id:e.nodeId,error:r.error}),r}async handleRemoteYieldStall(e,t,r){const a=e.node_id;if(e.intent!=="refresh"&&e.cycle_pending!==!0||await b(e)!==null){await h(a,"stall_noticed_at");return}const n=await T(a,"stall_noticed_at");if(n===void 0){await I(a,"stall_noticed_at",r);return}q(!0,!1,r-n)==="kill"&&(await N(a))?.executionId===t.executionId&&(f({level:"warn",event:"broker.yield_stall.remote_stop",...c(a)?{node_id:a}:{},fields:{...c(a)?{}:{affected_node_id:a},execution_id:t.executionId,elapsed_ms:r-n,grace_ms:U}}),await this.stopRemote(t,"yield_stall"))}async handleRemoteWedge(e,t,r){const a=e.node_id,n=await b(e);if(n===null){await h(a,"wedge_noticed_at");return}const s=r-n;if(s<O)return;const d=await S(a);if(d===null||(await N(a))?.executionId!==t.executionId||await b(d)!==n||await T(a,"wedge_noticed_at")===n)return;await I(a,"wedge_noticed_at",n);const l=Math.round(s/6e4);await K(a,{quietForMs:s,cpuPercent:null,hasDescendants:null,kickAttempted:!1,kicked:!1,kickSuppressionReason:"remote_no_process_evidence",pid:t.pid,label:`Child wedged \u2014 ${x(d)} (${a}) runs in a sandbox and is mid-turn but has shown NO engine progress for ${l}+ minutes. The daemon cannot see its processes there, so it did not stop the broker; if it is not running a long command, interrupt or close it.`})}async handleYieldStall(e,t,r,a){const n=e.node_id,s=V(t.pid,e.pi_pid_identity);if(e.intent!=="refresh"&&e.cycle_pending!==!0||await b(e)!==null||s===null){await h(n,"stall_noticed_at"),s!==null&&this.yieldTermedAt.delete(s);return}const d=await T(n,"stall_noticed_at");if(d===void 0){await I(n,"stall_noticed_at",a);return}const l={since:d,termedAt:this.yieldTermedAt.get(s)};if(q(!0,!1,a-l.since)!=="kill")return;const o=await S(n);if(!(r.get(n)!==t||o?.pi_pid!==t.pid||o.pi_pid_identity!==e.pi_pid_identity||B(t.pid,e.pi_pid_identity)!=="alive"))if(l.termedAt===void 0){if(!await this.signalYieldStall(n,t.pid,"SIGTERM"))return;this.yieldTermedAt.set(s,a),l.termedAt=a,f({level:"warn",event:"broker.yield_stall.sigterm",...c(n)?{node_id:n}:{},fields:{...c(n)?{}:{affected_node_id:n},pid:t.pid,elapsed_ms:a-l.since,grace_ms:U}})}else a-l.termedAt>=G&&await this.signalYieldStall(n,t.pid,"SIGKILL")&&f({level:"warn",event:"broker.yield_stall.sigkill",...c(n)?{node_id:n}:{},fields:{...c(n)?{}:{affected_node_id:n},pid:t.pid,elapsed_ms:a-l.termedAt,grace_ms:G,stall_elapsed_ms:a-l.since}})}async signalYieldStall(e,t,r){try{return await this.signal(t,r),!0}catch(a){return f({level:"error",event:"broker.yield_stall.signal_failed",...c(e)?{node_id:e}:{},error:a,fields:{...c(e)?{}:{affected_node_id:e},pid:t,signal:r}}),!1}}async handleWedgeDetection(e,t,r,a){const n=e.node_id,s=V(t.pid,e.pi_pid_identity),d=await b(e);if(d===null||s===null){await h(n,"wedge_noticed_at");return}const l=a-d,o=l>=O?await this.sampleTree(t.pid):null,p=await S(n),u=p===null?null:await b(p);if(r.get(n)!==t||p===null||p.pi_pid!==t.pid||p.pi_pid_identity!==e.pi_pid_identity||u!==d)return;const w=o?.cpuPercent??null,k=o?.hasDescendants??null;if(Ue({busy:!0,quietForMs:l,cpuPercent:w,hasDescendants:k})!=="wedged"||await T(n,"wedge_noticed_at")===d)return;await I(n,"wedge_noticed_at",d);const v=x(p),E=Math.round((l??O)/6e4),g=k??!0,y=!g&&B(t.pid,e.pi_pid_identity)!=="alive"?"pid_identity_unproven":null;let P=!1,m=!1;if(!g&&y===null){P=!0;try{await this.signal(t.pid,"SIGTERM"),m=!0}catch(z){f({level:"error",event:"broker.wedge.signal_failed",...c(n)?{node_id:n}:{},error:z,fields:{...c(n)?{}:{affected_node_id:n},pid:t.pid,signal:"SIGTERM"}})}}const R=ze(`${v} (${n})`,E,g,y!==null,m);await K(n,{quietForMs:l,cpuPercent:w,hasDescendants:g,kickAttempted:P,kicked:m,kickSuppressionReason:y,pid:t.pid,label:R})}async handleFatalFault(e,t=!0){const r=await L(e);if(r===null||r.retry.disposition!=="fatal"||r.link!=="pi\u2192provider"||r.notifiedSince===r.since)return;const a=await S(e),n=await Y(e),s=a!==null?x(a):e,d=r.kind==="auth",l=(r.message.split(`
|
|
3
|
+
`)[0]??"").slice(0,200),o=r.providerError,p=o===void 0?"":` Provider: ${o.provider}/${o.model}.`+(o.status===void 0?"":` HTTP status: ${o.status}.`)+(o.errno===void 0?"":` Errno: ${o.errno}.`)+(o.code===void 0?"":` Code: ${o.code}.`)+(o.body===void 0?"":` Body: ${o.body.slice(0,200)}.`)+(r.retry.nextAt===void 0?"":` Next router probe: ${r.retry.nextAt}.`)+le(o),u=r.kind==="context-overflow",w=He(a,typeof o?.code=="string"?o.code:void 0),k=u||w,v=u?`exceeded its model context window and is now dead. Shrink the task or loaded context, or choose a larger-context model before spawning it again. Error: ${l}`:`got a non-retryable ${r.kind} error and will NOT recover on its own; `+(w?"its terminal run has failed. ":"it stays alive, and waking it clears the fault as soon as one turn completes \u2014 a wake that hits the same cause fails again. "+(d?"Its provider credential is dead \u2014 re-authenticate (`/login`, or re-auth crtr); it recovers on its next wake once the auth reloads. ":""))+`Error: ${l}.${p}`,E=u?"failed":"hit a fatal provider fault",g=new Set((await ne(e)).map(m=>m.node_id)),y=await pe(await $(),await fe(await $(),e)),P=[{relation:"Child",recipients:y.filter(m=>g.has(m))},{relation:"Watched node",recipients:y.filter(m=>!g.has(m))}];f({level:"error",event:"fault.fatal.fanout",...c(e)?{node_id:e}:{},fields:{...c(e)?{}:{affected_node_id:e},kind:r.kind,link:r.link,terminal_overflow:u,terminal_provider_fault:w}}),await ue(async()=>{for(const{relation:m,recipients:R}of P)R.length!==0&&await W(e,"notice.crash",`${m} ${E} \u2014 ${s} (${e}) ${v}`,{reason:u?"child-context-overflow":"child-fault-fatal",child:e,kind:r.kind,message:l,...o===void 0?{}:{provider_error:o}},"normal",null,R);await oe(r.faultId),t&&k&&await re(e,"crash",{reason:u?"context_overflow":o?.code==="cap_exhausted"?"cap_exhausted":"provider_fatal",outcome:{detail:{schema:"crtr.node-outcome-detail/v1",message:r.message,fault_kind:r.kind,error_class:de(r).class,...typeof o?.code=="string"?{provider_code:o.code}:{},...o?.payment===void 0?{}:{payment:o.payment}}}})}),t&&k&&this.teardownBroker(e,n).then(m=>{m.confirmed||f({level:"error",event:"fault.fatal.teardown_failed",node_id:e,error:m.error??new Error("Broker teardown not confirmed")})},m=>f({level:"error",event:"fault.fatal.teardown_failed",node_id:e,error:m}))}}export{Ot as BrokerSupervisionReconciler,H as parkSummaryGraceMsForDaemon,K as reportWedge,He as settlesOnFatalProviderFault,Ke as unattendedParkMsForDaemon,ze as wedgeLabel};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.722",
|
|
4
4
|
"description": "crtr — agent runtime with memory, plugins, and marketplaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -158,8 +158,8 @@
|
|
|
158
158
|
},
|
|
159
159
|
"license": "UNLICENSED",
|
|
160
160
|
"dependencies": {
|
|
161
|
-
"@north-light/identity": "0.3.
|
|
162
|
-
"@north-light/plugin": "0.3.
|
|
161
|
+
"@north-light/identity": "0.3.722",
|
|
162
|
+
"@north-light/plugin": "0.3.722",
|
|
163
163
|
"@earendil-works/chord": "1.5.2",
|
|
164
164
|
"@earendil-works/pi-agent-core": "1.5.2",
|
|
165
165
|
"@earendil-works/pi-ai": "1.5.2",
|
|
@@ -9,6 +9,7 @@ import { nodeSnapshotLeaf } from '../node-snapshot.js';
|
|
|
9
9
|
import { nodeTranscriptLeaf } from '../node-transcript.js';
|
|
10
10
|
import { nodeContextLeaf } from '../node-context.js';
|
|
11
11
|
import { ApiError } from '../../api/index.js';
|
|
12
|
+
import { describeVendorLimit } from '../../core/provider-failure.js';
|
|
12
13
|
import { cliClient, cliCanvasSource, rethrowAsCliError } from '../api-client.js';
|
|
13
14
|
import { RemoteCanvasSource } from '../../core/canvas/remote-canvas-source.js';
|
|
14
15
|
import { kindsStateBlock, profilesStateBlock, resolveProfileViaDaemon } from '../profile/daemon-profiles.js';
|
|
@@ -203,7 +204,7 @@ const nodeShow = defineLeaf({
|
|
|
203
204
|
const meta = [
|
|
204
205
|
`- kind/mode/lifecycle: ${node['kind']} / ${node['mode']} / ${node['lifecycle']}`,
|
|
205
206
|
`- status: ${node['status']}${intent}`,
|
|
206
|
-
...(fault === null || fault === undefined ? [] : [`- fault: ${String(fault['kind'])} / ${String(fault['retry']?.disposition)} since ${String(fault['since'])}`]),
|
|
207
|
+
...(fault === null || fault === undefined ? [] : [`- fault: ${String(fault['kind'])} / ${String(fault['retry']?.disposition)} since ${String(fault['since'])}${fault.retry?.nextAt === undefined ? '' : `. Next router probe: ${fault.retry.nextAt}.`}${describeVendorLimit(fault.providerError)}`]),
|
|
207
208
|
`- broker pid: ${pid ?? '(none)'} — ${alive}`,
|
|
208
209
|
`- cwd: ${node['cwd']}`,
|
|
209
210
|
`- host: ${node['host_kind']}` + (node['profile_id'] ? ` · profile ${node['profile_id']}` : ''),
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/** The canvas schema version this build supports: the number of the highest delta in `schema-pg/` (the baseline
|
|
7
7
|
* `schema-pg.sql` is version 1). `scripts/install-runtime.mjs` reads this module from a candidate generation to refuse
|
|
8
8
|
* one below the live database's `schema_min_reader`. */
|
|
9
|
-
export const CANVAS_SCHEMA_VERSION =
|
|
9
|
+
export const CANVAS_SCHEMA_VERSION = 32;
|
|
10
10
|
/** The Postgres schema holding the canvas tables: `CRTR_DATABASE_SCHEMA` (`crtr` in the cloud deploy). Unset or empty
|
|
11
11
|
* means the role's own search_path (`public` on a Mac and on a VM). A name that is not a plain identifier is an error:
|
|
12
12
|
* it is put in a `search_path` connection option. */
|
|
@@ -5,7 +5,7 @@ import { KEY_CREDENTIAL_SOURCE, parseModelSpec } from '../model-routes.js';
|
|
|
5
5
|
import { openModelRegistry } from '../runtime/model-registry.js';
|
|
6
6
|
import { getProviderLabel, isInvalidRefreshTokenError } from '../managed-providers.js';
|
|
7
7
|
import { MAX_RATE_LIMIT_COOLDOWN_MS, coolingUntilFor, isManagedProvider, markSubscriptionRateLimited, markSubscriptionSuccess, readSubscriptionPool, retryAfterMsFromHeaders, retryAfterMsFromError, refreshSubscriptionCredential, subscriptionNeedsSuccessWrite, vendorRateLimit, RefreshBusyError, RefreshTimeoutError } from '../subscription-state.js';
|
|
8
|
-
import { describeRateLimitScope, rateLimitHeaders } from '../rate-limit-scope.js';
|
|
8
|
+
import { describeRateLimitScope, modelCooldownFamily, rateLimitHeaders } from '../rate-limit-scope.js';
|
|
9
9
|
import { RunError } from '../runs/operations.js';
|
|
10
10
|
import { recognizeProviderError } from '../provider-error-recognition.js';
|
|
11
11
|
import { isSafetyRefusal } from './refusal.js';
|
|
@@ -282,6 +282,17 @@ export async function runLlm(input, signal, onChunk, target, spend, caller, caus
|
|
|
282
282
|
earliestCooling = frees;
|
|
283
283
|
coolingRoute = `${model.provider}/${model.id}`;
|
|
284
284
|
}
|
|
285
|
+
// Each cooling account's stored vendor 429 still speaks for it: its named reset joins the earliest-reset aggregate, and with no fresh 429 this call its observation is the refusal's rate-limit block.
|
|
286
|
+
const family = modelCooldownFamily(model.id);
|
|
287
|
+
for (const row of pool) {
|
|
288
|
+
// Only the observation of a cooldown still in force: an expired row's facts belong to an earlier window.
|
|
289
|
+
const stored = family !== undefined && (row.modelCooldowns?.[family] ?? 0) > Date.now() ? row.vendorLimits?.[family] : row.rateLimitedUntil > Date.now() ? row.vendorLimits?.['account'] : undefined;
|
|
290
|
+
if (stored === undefined)
|
|
291
|
+
continue;
|
|
292
|
+
if (stored.vendorReset !== undefined && stored.vendorReset > Date.now())
|
|
293
|
+
earliestVendorReset = Math.min(earliestVendorReset, stored.vendorReset);
|
|
294
|
+
lastLimit ??= { provider, model: stored.model, account: row.label, observation: stored.observation };
|
|
295
|
+
}
|
|
285
296
|
continue;
|
|
286
297
|
}
|
|
287
298
|
// An app-paid or hosted candidate gets a second attempt only to re-mint after a 401.
|
|
@@ -491,7 +502,7 @@ export async function runLlm(input, signal, onChunk, target, spend, caller, caus
|
|
|
491
502
|
lastLimit = { provider, model: model.id, ...(account ? { account: account.label } : {}), observation };
|
|
492
503
|
console.error(`[llm] 429 from ${served}${account ? ` account "${account.label}"` : ''}: scope=${describeRateLimitScope(observation.scope)} retry_after_ms=${retryMs} headers=${JSON.stringify(observation.headers)}`);
|
|
493
504
|
if (account && isManagedProvider(provider))
|
|
494
|
-
await markSubscriptionRateLimited(provider, account.label, retryMs, at, Date.now(), observation.scope);
|
|
505
|
+
await markSubscriptionRateLimited(provider, account.label, retryMs, at, Date.now(), observation.scope, { model: model.id, ...(vendorReset !== undefined ? { vendorReset } : {}), observation });
|
|
495
506
|
if (vendorReset !== undefined)
|
|
496
507
|
earliestVendorReset = Math.min(earliestVendorReset, vendorReset);
|
|
497
508
|
if (Date.now() + Math.min(retryMs, MAX_RATE_LIMIT_COOLDOWN_MS) < earliestCooling) {
|
|
@@ -79,6 +79,15 @@ function jsonDetails(details) {
|
|
|
79
79
|
const RATELIMIT_HEADER_LIMIT = 48;
|
|
80
80
|
const RATELIMIT_VALUE_LIMIT = 256;
|
|
81
81
|
const PAYMENT_REASONS = new Set(PAYMENT_REFUSAL_REASONS);
|
|
82
|
+
/** Plain text for a fault's vendor facts: the earliest known vendor reset (across the pool), then the last 429's window with its own account and model. Never pairs the aggregate reset with that window. */
|
|
83
|
+
export function describeVendorLimit(details) {
|
|
84
|
+
const reset = details?.payment?.reset_at ? ` Earliest known vendor reset: ${details.payment.reset_at}.` : '';
|
|
85
|
+
const limit = details?.ratelimit;
|
|
86
|
+
if (limit === undefined)
|
|
87
|
+
return reset;
|
|
88
|
+
const window = limit.headers['anthropic-ratelimit-unified-reset'];
|
|
89
|
+
return `${reset} Rate limit: ${limit.scope ?? 'account'}${limit.claim === undefined ? '' : ` (${limit.claim})`}${limit.account === undefined ? '' : ` on account ${limit.account}`}${limit.model === undefined ? '' : ` for ${limit.model}`}${window === undefined || !Number(window) ? '' : `, that window resets ${new Date(Number(window) * 1000).toISOString()}`}.`;
|
|
90
|
+
}
|
|
82
91
|
/** Strictly parse a recorded payment refusal: a known reason and a message, nothing else trusted. */
|
|
83
92
|
export function parseProviderPayment(value) {
|
|
84
93
|
const raw = record(value);
|
|
@@ -320,7 +320,9 @@ export function streamBrokerModel(model, context, options = {}, intent, causedBy
|
|
|
320
320
|
const remaining = LLM_BROKER_RETRY_WINDOW_S - waited;
|
|
321
321
|
if (seconds > remaining) {
|
|
322
322
|
const retryAt = Date.now() + seconds * 1000;
|
|
323
|
-
|
|
323
|
+
// The router's next probe and the vendor's own reset are different times: name both, never one as the other.
|
|
324
|
+
const vendorReset = refusalPayment(error)?.reset_at;
|
|
325
|
+
throw new LlmRefusalError(`${error.message} (retry after ${seconds}s, at ${new Date(retryAt).toISOString()}: the router's next probe${vendorReset ? `; earliest known vendor reset ${vendorReset}` : ''})`, retryAt, refusalRateLimit(error), error.code, response.status, refusalPayment(error));
|
|
324
326
|
}
|
|
325
327
|
await sleep(seconds * 1000, undefined, { signal: options.signal });
|
|
326
328
|
waited += seconds;
|
|
@@ -368,6 +368,17 @@ export async function assertRecordedCwdExists(nodeId, meta) {
|
|
|
368
368
|
}
|
|
369
369
|
return { blaxelEnvironment, remoteMachine };
|
|
370
370
|
}
|
|
371
|
+
/** Cleanup deleted this node's managed checkout and its branch, and nothing rebuilds them: refuse on any host, before a caller changes state. */
|
|
372
|
+
export function assertCheckoutNotRemoved(nodeId, meta) {
|
|
373
|
+
const worktree = meta.managed_worktree;
|
|
374
|
+
if (worktree?.state !== 'closed' || worktree.cleanup !== 'complete' || meta.cwd !== worktree.path)
|
|
375
|
+
return;
|
|
376
|
+
throw new InputError({
|
|
377
|
+
error: 'checkout_removed',
|
|
378
|
+
message: `${nodeId} cannot be revived — cleanup removed its checkout ${worktree.path} and branch ${worktree.branch}`,
|
|
379
|
+
next: `Start a new node in ${worktree.repo_root}.`,
|
|
380
|
+
});
|
|
381
|
+
}
|
|
371
382
|
/** The `node:start` lifecycle hooks for a node coming up: a launch, or a cycle started in a running process. */
|
|
372
383
|
export async function runNodeStartHooks(nodeId, meta, isBirth) {
|
|
373
384
|
const lifecycleHooks = discoverLifecycleHookRegistry(meta.cwd, meta.profile_id).plans.get('node:start') ?? [];
|
|
@@ -23,6 +23,14 @@ export const BLAXEL_TOML_FILE = 'blaxel.toml';
|
|
|
23
23
|
export const BLAXEL_TOML = '[build]\nslim = false\n';
|
|
24
24
|
const PI_VERSION = '1.1.0';
|
|
25
25
|
export const SETUP_SCRIPT_FILE = 'recipe-setup.sh';
|
|
26
|
+
/** The run user's npmrc. pnpm 12 ignores an env-expanded `_authToken` in a repository's `.npmrc`, so the GitHub Packages auth line lives here; it names the
|
|
27
|
+
* variable, never its value. `store-dir` pins one pnpm store in the image that every repository's `pnpm install` links from. */
|
|
28
|
+
export const RUN_USER_NPMRC = [
|
|
29
|
+
'@northlight-systems:registry=https://npm.pkg.github.com',
|
|
30
|
+
'//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}',
|
|
31
|
+
`store-dir=/home/${RUN_USER}/.local/share/pnpm/store`,
|
|
32
|
+
];
|
|
33
|
+
const writeRunUserNpmrc = () => `printf '%s\\n' ${RUN_USER_NPMRC.map((l) => `'${l}'`).join(' ')} > /home/${RUN_USER}/.npmrc`;
|
|
26
34
|
export const REPOS_DIR = 'repos';
|
|
27
35
|
/** Where the image keeps the setup script's output, and its exit status when it failed. `sandbox-start.mjs` reads both (it derives them from `/work/.crtr`). */
|
|
28
36
|
export const SETUP_LOG_FILE = '/work/.crtr/setup.log';
|
|
@@ -63,6 +71,12 @@ export function recipeDockerfile(recipe, revision, packagesToken = false) {
|
|
|
63
71
|
if (hasScript)
|
|
64
72
|
out.push(`COPY ${SETUP_SCRIPT_FILE} /tmp/${SETUP_SCRIPT_FILE}`);
|
|
65
73
|
out.push('WORKDIR /work');
|
|
74
|
+
out.push(`RUN ${writeRunUserNpmrc()}`);
|
|
75
|
+
// Warm the image's pnpm store from each repository's lockfile, so `pnpm install` in the sandbox links instead of downloading. A failed fetch only costs that
|
|
76
|
+
// warmth, so it is logged and never refuses the sandbox start.
|
|
77
|
+
for (const repo of recipe.repositories) {
|
|
78
|
+
out.push(`RUN if [ -f /work/${repo.name}/pnpm-lock.yaml ]; then cd /work/${repo.name} && HOME=/home/${RUN_USER} pnpm fetch >> ${SETUP_LOG_FILE} 2>&1 || echo 'pnpm fetch ${repo.name} failed' >> ${SETUP_LOG_FILE}; fi`);
|
|
79
|
+
}
|
|
66
80
|
for (const source of packages)
|
|
67
81
|
out.push(guarded(`pi install ${source}`, `HOME=/var/lib/crtr PI_CODING_AGENT_DIR=${RECIPE_PI_AGENT_DIR} pi install ${shellQuote(source)}`));
|
|
68
82
|
// Blaxel never reports a failed Docker step: the image stays BUILDING until the timeout, and its build log is not readable. So a failing script must not fail
|
|
@@ -79,8 +93,9 @@ export function recipeDockerfile(recipe, revision, packagesToken = false) {
|
|
|
79
93
|
out.push('COPY --from=build /var/lib/postgresql /var/lib/postgresql');
|
|
80
94
|
// The copied /etc/passwd now names the postgres user (when the setup script installed postgres); its data directory must belong to it or the server refuses to start.
|
|
81
95
|
out.push('RUN if getent passwd postgres >/dev/null; then chown -R postgres:postgres /var/lib/postgresql; fi');
|
|
96
|
+
// A setup script may have written a resolved token into an npmrc; the run user's npmrc is rewritten to the token-free lines.
|
|
82
97
|
if (packagesToken)
|
|
83
|
-
out.push(
|
|
98
|
+
out.push('RUN rm -f /work/.npmrc', `RUN ${writeRunUserNpmrc()} && chown ${RUN_USER}:${RUN_USER} /home/${RUN_USER}/.npmrc`);
|
|
84
99
|
out.push(`USER ${RUN_USER}`, 'WORKDIR /work', 'ENTRYPOINT ["/usr/local/bin/sandbox-api"]', '');
|
|
85
100
|
return out.join('\n');
|
|
86
101
|
}
|
|
@@ -40,7 +40,7 @@ export class RefreshBusyError extends Error {
|
|
|
40
40
|
export class RefreshTimeoutError extends Error {
|
|
41
41
|
constructor(provider) { super(`${getProviderLabel(provider)} ${REFRESH_TIMEOUT_PHRASE} ${REFRESH_EXCHANGE_TIMEOUT_MS} ms`); this.name = 'RefreshTimeoutError'; }
|
|
42
42
|
}
|
|
43
|
-
const COLUMNS = 'id,label,label_key,position,last_attempt_at,last_rate_limited_at,rate_limited_until,auth_failure,refresh_sealed,access_sealed,expires,vendor_account_id,client_id,key_id';
|
|
43
|
+
const COLUMNS = 'id,label,label_key,position,last_attempt_at,last_rate_limited_at,rate_limited_until,auth_failure,refresh_sealed,access_sealed,expires,vendor_account_id,client_id,key_id,vendor_limit_json';
|
|
44
44
|
export const aadOf = (person, provider, id, part) => `model_accounts|${person}|${provider}|${id}|${part}`;
|
|
45
45
|
function stored(entry) { return { refresh: entry.refresh, access: entry.access, expires: entry.expires, ...(entry.accountId ? { accountId: entry.accountId } : {}), ...(entry.clientId ? { clientId: entry.clientId } : {}) }; }
|
|
46
46
|
function rowOf(provider, r) { return { providerId: provider, id: r.id, label: r.label, labelKey: r.label_key, position: r.position, lastAttemptAt: r.last_attempt_at, lastRateLimitedAt: r.last_rate_limited_at, rateLimitedUntil: r.rate_limited_until, ...(r.auth_failure ? { authFailure: r.auth_failure } : {}) }; }
|
|
@@ -51,20 +51,28 @@ function toPublic(person, provider, r, cooldowns = []) {
|
|
|
51
51
|
const refresh = open(r.refresh_sealed, r.key_id, secrets, aadOf(person, provider, r.id, 'refresh'));
|
|
52
52
|
const access = open(r.access_sealed, r.key_id, secrets, aadOf(person, provider, r.id, 'access'));
|
|
53
53
|
const row = rowOf(provider, r);
|
|
54
|
-
const
|
|
54
|
+
const vendorLimits = Object.fromEntries([...(vendorLimitOf(r.vendor_limit_json) ? [['account', vendorLimitOf(r.vendor_limit_json)]] : []), ...cooldowns.flatMap((cooldown) => cooldown.vendorLimit ? [[cooldown.family, cooldown.vendorLimit]] : [])]);
|
|
55
|
+
const entry = { label: row.label, refresh, access, expires: r.expires, rateLimitedUntil: row.authFailure || !row.lastRateLimitedAt ? row.rateLimitedUntil : Math.min(row.rateLimitedUntil, row.lastRateLimitedAt + MAX_RATE_LIMIT_COOLDOWN_MS), lastAttemptAt: row.lastAttemptAt, lastRateLimitedAt: row.lastRateLimitedAt, ...(row.authFailure ? { authFailure: row.authFailure } : {}), ...(r.vendor_account_id ? { accountId: r.vendor_account_id } : {}), ...(r.client_id ? { clientId: r.client_id } : {}), ...(cooldowns.length ? { modelCooldowns: Object.fromEntries(cooldowns.map((cooldown) => [cooldown.family, cooldown.lastRateLimitedAt ? Math.min(cooldown.rateLimitedUntil, cooldown.lastRateLimitedAt + MAX_RATE_LIMIT_COOLDOWN_MS) : cooldown.rateLimitedUntil])) } : {}), ...(Object.keys(vendorLimits).length ? { vendorLimits } : {}) };
|
|
55
56
|
return { row, entry };
|
|
56
57
|
}
|
|
58
|
+
/** A stored vendor observation; an unreadable value is no observation, never a failed pool read. */
|
|
59
|
+
function vendorLimitOf(json) { try {
|
|
60
|
+
return json ? JSON.parse(json) : undefined;
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
return undefined;
|
|
64
|
+
} }
|
|
57
65
|
function groupCooldowns(rows) {
|
|
58
66
|
const out = new Map();
|
|
59
67
|
for (const r of rows) {
|
|
60
68
|
const list = out.get(r.account_id) ?? [];
|
|
61
|
-
list.push({ family: r.family, rateLimitedUntil: r.rate_limited_until, lastRateLimitedAt: r.last_rate_limited_at });
|
|
69
|
+
list.push({ family: r.family, rateLimitedUntil: r.rate_limited_until, lastRateLimitedAt: r.last_rate_limited_at, ...(vendorLimitOf(r.vendor_limit_json) ? { vendorLimit: vendorLimitOf(r.vendor_limit_json) } : {}) });
|
|
62
70
|
out.set(r.account_id, list);
|
|
63
71
|
}
|
|
64
72
|
return out;
|
|
65
73
|
}
|
|
66
74
|
async function loadCooldowns(db, person, provider) {
|
|
67
|
-
return groupCooldowns(await db.prepare('SELECT account_id,family,rate_limited_until,last_rate_limited_at FROM model_account_cooldowns WHERE person=? AND provider_id=? ORDER BY family').all(person, provider));
|
|
75
|
+
return groupCooldowns(await db.prepare('SELECT account_id,family,rate_limited_until,last_rate_limited_at,vendor_limit_json FROM model_account_cooldowns WHERE person=? AND provider_id=? ORDER BY family').all(person, provider));
|
|
68
76
|
}
|
|
69
77
|
/** The person's accounts at one provider in pool order, tokens opened. `forUpdate` row-locks them. */
|
|
70
78
|
async function loadPool(db, person, provider, forUpdate = false) {
|
|
@@ -77,7 +85,7 @@ export async function readAllSubscriptionPools() {
|
|
|
77
85
|
const person = await personIdAsync();
|
|
78
86
|
const db = await openDb();
|
|
79
87
|
const rows = await db.prepare(`SELECT provider_id,${COLUMNS} FROM model_accounts WHERE person=? ORDER BY provider_id,position`).all(person);
|
|
80
|
-
const cooldowns = groupCooldowns(await db.prepare('SELECT account_id,family,rate_limited_until,last_rate_limited_at FROM model_account_cooldowns WHERE person=? ORDER BY family').all(person));
|
|
88
|
+
const cooldowns = groupCooldowns(await db.prepare('SELECT account_id,family,rate_limited_until,last_rate_limited_at,vendor_limit_json FROM model_account_cooldowns WHERE person=? ORDER BY family').all(person));
|
|
81
89
|
const pools = new Map();
|
|
82
90
|
for (const r of rows) {
|
|
83
91
|
const list = pools.get(r.provider_id) ?? [];
|
|
@@ -121,7 +129,8 @@ async function setCredential(db, person, provider, id, entry, spent) {
|
|
|
121
129
|
return (await db.prepare(`UPDATE model_accounts SET refresh_sealed=?,access_sealed=?,expires=?,vendor_account_id=?,client_id=?,key_id=?,refresh_claimed_until=0 WHERE person=? AND provider_id=? AND id=?${spent ? ' AND refresh_sealed=?' : ''}`).run(refresh.sealed, access.sealed, entry.expires, entry.accountId ?? null, entry.clientId ?? null, refresh.keyId, person, provider, id, ...(spent ? [spent] : []))).changes === 1;
|
|
122
130
|
}
|
|
123
131
|
async function updateHealth(db, person, row) { await db.prepare('UPDATE model_accounts SET label=?,label_key=?,position=?,last_attempt_at=?,last_rate_limited_at=?,rate_limited_until=?,auth_failure=? WHERE person=? AND provider_id=? AND id=?').run(row.label, row.labelKey, row.position, row.lastAttemptAt, row.lastRateLimitedAt, row.rateLimitedUntil, row.authFailure ?? null, person, row.providerId, row.id); }
|
|
124
|
-
export async function upsertModelCooldown(db, person, provider, accountId, family, until, rateLimitedAt) { await db.prepare('INSERT INTO model_account_cooldowns(person,provider_id,account_id,family,rate_limited_until,last_rate_limited_at) VALUES(
|
|
132
|
+
export async function upsertModelCooldown(db, person, provider, accountId, family, until, rateLimitedAt, vendorLimit) { await db.prepare('INSERT INTO model_account_cooldowns(person,provider_id,account_id,family,rate_limited_until,last_rate_limited_at,vendor_limit_json) VALUES(?,?,?,?,?,?,?) ON CONFLICT(person,provider_id,account_id,family) DO UPDATE SET rate_limited_until=excluded.rate_limited_until,last_rate_limited_at=excluded.last_rate_limited_at,vendor_limit_json=excluded.vendor_limit_json').run(person, provider, accountId, family, until, rateLimitedAt, vendorLimit ? JSON.stringify(vendorLimit) : null); }
|
|
133
|
+
async function setAccountVendorLimit(db, person, row, vendorLimit) { await db.prepare('UPDATE model_accounts SET vendor_limit_json=? WHERE person=? AND provider_id=? AND id=?').run(vendorLimit ? JSON.stringify(vendorLimit) : null, person, row.providerId, row.id); }
|
|
125
134
|
async function deleteModelCooldowns(db, person, provider, accountId) { if (accountId === undefined)
|
|
126
135
|
await db.prepare('DELETE FROM model_account_cooldowns WHERE person=? AND provider_id=?').run(person, provider);
|
|
127
136
|
else
|
|
@@ -183,6 +192,8 @@ export async function upsertSubscriptionWithUniqueAccount(provider, entry) {
|
|
|
183
192
|
const cooldownIncoming = checked.lastRateLimitedAt >= row.lastRateLimitedAt;
|
|
184
193
|
await setCredential(db, person, provider, row.id, stored(checked));
|
|
185
194
|
await updateHealth(db, person, { ...row, authFailure: undefined, label: checked.label, labelKey: key(checked.label), lastAttemptAt: Math.max(row.lastAttemptAt, checked.lastAttemptAt), lastRateLimitedAt: cooldownIncoming ? checked.lastRateLimitedAt : row.lastRateLimitedAt, rateLimitedUntil: cooldownIncoming ? checked.rateLimitedUntil : row.rateLimitedUntil });
|
|
195
|
+
if (cooldownIncoming || differentAccount(existing.entry, checked))
|
|
196
|
+
await setAccountVendorLimit(db, person, row, undefined);
|
|
186
197
|
if (differentAccount(existing.entry, checked))
|
|
187
198
|
await deleteModelCooldowns(db, person, provider, row.id);
|
|
188
199
|
return publicPool(pool, provider);
|
|
@@ -255,29 +266,32 @@ async function healthWrite(provider, ref, write) {
|
|
|
255
266
|
return readSubscriptionPool(provider);
|
|
256
267
|
}
|
|
257
268
|
export async function markSubscriptionAttempt(provider, ref, attemptAt = Date.now()) { return healthWrite(provider, ref, (db, person, row) => updateHealth(db, person, { ...row, lastAttemptAt: Math.max(row.lastAttemptAt, attemptAt) })); }
|
|
258
|
-
/** Record a 429 on an account. `scope` defaults to the whole account; a model scope cools only that family on this account, and a 429 older than the newest one already recorded for the same scope is ignored. */
|
|
259
|
-
export async function markSubscriptionRateLimited(provider, ref, retryAfterMs, attemptAt = Date.now(), rateLimitedAt = Date.now(), scope = { kind: 'account' }) {
|
|
269
|
+
/** Record a 429 on an account. `scope` defaults to the whole account; a model scope cools only that family on this account, and a 429 older than the newest one already recorded for the same scope is ignored. `vendorLimit` replaces that cooldown's stored vendor observation. */
|
|
270
|
+
export async function markSubscriptionRateLimited(provider, ref, retryAfterMs, attemptAt = Date.now(), rateLimitedAt = Date.now(), scope = { kind: 'account' }, vendorLimit) {
|
|
260
271
|
retryAfterMs = Math.min(Math.max(0, retryAfterMs), MAX_RATE_LIMIT_COOLDOWN_MS);
|
|
261
272
|
return healthWrite(provider, ref, async (db, person, row) => {
|
|
262
273
|
if (scope.kind === 'account') {
|
|
263
274
|
if (rateLimitedAt < row.lastRateLimitedAt)
|
|
264
275
|
return;
|
|
265
276
|
await updateHealth(db, person, { ...row, lastAttemptAt: Math.max(row.lastAttemptAt, attemptAt), lastRateLimitedAt: rateLimitedAt, rateLimitedUntil: rateLimitedAt + retryAfterMs });
|
|
277
|
+
await setAccountVendorLimit(db, person, row, vendorLimit);
|
|
266
278
|
return;
|
|
267
279
|
}
|
|
268
280
|
await updateHealth(db, person, { ...row, lastAttemptAt: Math.max(row.lastAttemptAt, attemptAt) });
|
|
269
281
|
const current = (await loadCooldowns(db, person, provider)).get(row.id)?.find((cooldown) => cooldown.family === scope.family);
|
|
270
282
|
if (current && rateLimitedAt < current.lastRateLimitedAt)
|
|
271
283
|
return;
|
|
272
|
-
await upsertModelCooldown(db, person, provider, row.id, scope.family, rateLimitedAt + retryAfterMs, rateLimitedAt);
|
|
284
|
+
await upsertModelCooldown(db, person, provider, row.id, scope.family, rateLimitedAt + retryAfterMs, rateLimitedAt, vendorLimit);
|
|
273
285
|
});
|
|
274
286
|
}
|
|
275
287
|
/** A call on `modelId` succeeded: clear the account-wide cooldown and auth failure, and that model family's cooldown, unless a newer 429 for the same scope landed after `attemptAt` began. */
|
|
276
288
|
export async function markSubscriptionSuccess(provider, ref, attemptAt = Date.now(), modelId) {
|
|
277
289
|
const family = modelCooldownFamily(modelId);
|
|
278
290
|
return healthWrite(provider, ref, async (db, person, row) => {
|
|
279
|
-
if (attemptAt >= row.lastRateLimitedAt)
|
|
291
|
+
if (attemptAt >= row.lastRateLimitedAt) {
|
|
280
292
|
await updateHealth(db, person, { ...row, authFailure: undefined, lastAttemptAt: Math.max(row.lastAttemptAt, attemptAt), rateLimitedUntil: 0 });
|
|
293
|
+
await setAccountVendorLimit(db, person, row, undefined);
|
|
294
|
+
}
|
|
281
295
|
if (family === undefined)
|
|
282
296
|
return;
|
|
283
297
|
const current = (await loadCooldowns(db, person, provider)).get(row.id)?.find((cooldown) => cooldown.family === family);
|
|
@@ -412,6 +426,8 @@ export async function commitManagedLogin(provider, label, value) {
|
|
|
412
426
|
const clear = entry.lastRateLimitedAt >= row.lastRateLimitedAt;
|
|
413
427
|
await setCredential(db, person, provider, row.id, stored(entry));
|
|
414
428
|
await updateHealth(db, person, { ...row, authFailure: undefined, lastAttemptAt: Math.max(row.lastAttemptAt, entry.lastAttemptAt), lastRateLimitedAt: clear ? entry.lastRateLimitedAt : row.lastRateLimitedAt, rateLimitedUntil: clear ? 0 : row.rateLimitedUntil });
|
|
429
|
+
if (clear || differentAccount(matching.entry, entry))
|
|
430
|
+
await setAccountVendorLimit(db, person, row, undefined);
|
|
415
431
|
if (differentAccount(matching.entry, entry))
|
|
416
432
|
await deleteModelCooldowns(db, person, provider, row.id);
|
|
417
433
|
return publicPool(pool, provider);
|
|
@@ -10,6 +10,7 @@ import { recordedPidLiveness } from '../../core/canvas/pid.js';
|
|
|
10
10
|
import { transition } from '../../core/runtime/lifecycle.js';
|
|
11
11
|
import { hasAdmittedTurn, listUnnotifiedFatalFaultNodes, markFaultNotified, readFault, readLiveTurn, recordFault } from '../../core/canvas/recovery.js';
|
|
12
12
|
import { errorClassFromFault } from '../../core/fault-classifier.js';
|
|
13
|
+
import { describeVendorLimit } from '../../core/provider-failure.js';
|
|
13
14
|
import { nextFaultRetry } from '../../core/runtime/fault-recovery.js';
|
|
14
15
|
import { publishNotice } from '../../core/runtime/close.js';
|
|
15
16
|
import { openDb, withCanvasWrite } from '../../core/canvas/db.js';
|
|
@@ -671,7 +672,8 @@ export class BrokerSupervisionReconciler {
|
|
|
671
672
|
(providerError.errno === undefined ? '' : ` Errno: ${providerError.errno}.`) +
|
|
672
673
|
(providerError.code === undefined ? '' : ` Code: ${providerError.code}.`) +
|
|
673
674
|
(providerError.body === undefined ? '' : ` Body: ${providerError.body.slice(0, 200)}.`) +
|
|
674
|
-
(
|
|
675
|
+
(fault.retry.nextAt === undefined ? '' : ` Next router probe: ${fault.retry.nextAt}.`) +
|
|
676
|
+
describeVendorLimit(providerError);
|
|
675
677
|
const terminalOverflow = fault.kind === 'context-overflow';
|
|
676
678
|
const terminalProviderFault = settlesOnFatalProviderFault(meta, typeof providerError?.code === 'string' ? providerError.code : undefined);
|
|
677
679
|
const terminalFault = terminalOverflow || terminalProviderFault;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/api",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.722",
|
|
4
4
|
"description": "Typed crtrd /v1 API contract — DTOs, route builders, the error contract, the CrtrClient, and the command-plugin manifest format. Zero runtime dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/api/index.js",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/plugin",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.722",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"postpack": "node ../../scripts/pack-minify.mjs postpack packages/crouter-plugin"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@north-light/api": "0.3.
|
|
31
|
-
"@north-light/identity": "0.3.
|
|
30
|
+
"@north-light/api": "0.3.722",
|
|
31
|
+
"@north-light/identity": "0.3.722"
|
|
32
32
|
},
|
|
33
33
|
"license": "UNLICENSED",
|
|
34
34
|
"publishConfig": {
|
package/runtime.lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.722",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@north-light/cli",
|
|
9
|
-
"version": "0.3.
|
|
9
|
+
"version": "0.3.722",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "UNLICENSED",
|
|
12
12
|
"workspaces": [
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"@milkdown/preset-gfm": "^7.22.3",
|
|
29
29
|
"@milkdown/prose": "^7.22.3",
|
|
30
30
|
"@milkdown/utils": "^7.22.3",
|
|
31
|
-
"@north-light/identity": "0.3.
|
|
32
|
-
"@north-light/plugin": "0.3.
|
|
31
|
+
"@north-light/identity": "0.3.722",
|
|
32
|
+
"@north-light/plugin": "0.3.722",
|
|
33
33
|
"cron-parser": "^5.6.0",
|
|
34
34
|
"esbuild": "0.28.2",
|
|
35
35
|
"jose": "^6.2.12",
|
|
@@ -11902,17 +11902,17 @@
|
|
|
11902
11902
|
},
|
|
11903
11903
|
"packages/crouter-api": {
|
|
11904
11904
|
"name": "@north-light/api",
|
|
11905
|
-
"version": "0.3.
|
|
11905
|
+
"version": "0.3.722",
|
|
11906
11906
|
"license": "UNLICENSED"
|
|
11907
11907
|
},
|
|
11908
11908
|
"packages/crouter-env-docker": {
|
|
11909
11909
|
"name": "@north-light/env-docker",
|
|
11910
|
-
"version": "0.3.
|
|
11910
|
+
"version": "0.3.722",
|
|
11911
11911
|
"license": "UNLICENSED"
|
|
11912
11912
|
},
|
|
11913
11913
|
"packages/crouter-identity": {
|
|
11914
11914
|
"name": "@north-light/identity",
|
|
11915
|
-
"version": "0.3.
|
|
11915
|
+
"version": "0.3.722",
|
|
11916
11916
|
"license": "UNLICENSED",
|
|
11917
11917
|
"dependencies": {
|
|
11918
11918
|
"jose": "^6.2.1"
|
|
@@ -11920,21 +11920,21 @@
|
|
|
11920
11920
|
},
|
|
11921
11921
|
"packages/crouter-plugin": {
|
|
11922
11922
|
"name": "@north-light/plugin",
|
|
11923
|
-
"version": "0.3.
|
|
11923
|
+
"version": "0.3.722",
|
|
11924
11924
|
"license": "UNLICENSED",
|
|
11925
11925
|
"dependencies": {
|
|
11926
|
-
"@north-light/api": "0.3.
|
|
11927
|
-
"@north-light/identity": "0.3.
|
|
11926
|
+
"@north-light/api": "0.3.722",
|
|
11927
|
+
"@north-light/identity": "0.3.722"
|
|
11928
11928
|
}
|
|
11929
11929
|
},
|
|
11930
11930
|
"packages/crouter-sdk": {
|
|
11931
11931
|
"name": "@north-light/sdk",
|
|
11932
|
-
"version": "0.3.
|
|
11932
|
+
"version": "0.3.722",
|
|
11933
11933
|
"license": "UNLICENSED",
|
|
11934
11934
|
"dependencies": {
|
|
11935
|
-
"@north-light/api": "0.3.
|
|
11936
|
-
"@north-light/identity": "0.3.
|
|
11937
|
-
"@north-light/plugin": "0.3.
|
|
11935
|
+
"@north-light/api": "0.3.722",
|
|
11936
|
+
"@north-light/identity": "0.3.722",
|
|
11937
|
+
"@north-light/plugin": "0.3.722",
|
|
11938
11938
|
"jose": "^6.2.1"
|
|
11939
11939
|
},
|
|
11940
11940
|
"bin": {
|