vibe64 0.1.62 → 0.1.63
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/bin/upgrade-state.js +1701 -1700
- package/dist/assets/{GithubBrowserTabs-BJ2NXiuQ.js → GithubBrowserTabs-DEq5_tSs.js} +1 -1
- package/dist/assets/{LocalDatabaseServer-Z5VQcWgu.js → LocalDatabaseServer-CrQ9aolO.js} +1 -1
- package/dist/assets/{Vibe64AuthSettingsButton-B4FbKoV7.js → Vibe64AuthSettingsButton-Bbgu_IRu.js} +1 -1
- package/dist/assets/{Vibe64ConversationLog-Dk2jeU21.js → Vibe64ConversationLog-MGFaNVSu.js} +1 -1
- package/dist/assets/{Vibe64DashboardShell-BGE8m2VG.js → Vibe64DashboardShell-i01oU7QS.js} +1 -1
- package/dist/assets/{Vibe64DatabaseWorkspace-BrB-0zdd.js → Vibe64DatabaseWorkspace-BqOIE7at.js} +1 -1
- package/dist/assets/{Vibe64OutputControls-JHBVJBQ4.js → Vibe64OutputControls-eaoCQsYn.js} +1 -1
- package/dist/assets/{Vibe64RepositoryWorkspace-DFuF1aDy.js → Vibe64RepositoryWorkspace-CoSH_5qZ.js} +1 -1
- package/dist/assets/{Vibe64SessionFiles-Ih3aXiKq.js → Vibe64SessionFiles-Dt1EY-Qo.js} +1 -1
- package/dist/assets/{Vibe64SessionSourceEditor-EUExI1YB.js → Vibe64SessionSourceEditor-D5-abooo.js} +1 -1
- package/dist/assets/{Vibe64UiStoryboardView-DrE3Dqjr.js → Vibe64UiStoryboardView-CyuufVBB.js} +1 -1
- package/dist/assets/{Vibe64UnavailableSessions-CCWWp2-Y.js → Vibe64UnavailableSessions-CaLRMl-0.js} +1 -1
- package/dist/assets/{_pageId_-JF3VAGm5.js → _pageId_-M5CNslNQ.js} +1 -1
- package/dist/assets/{_sessionId_-DzhYkoTF.js → _sessionId_-jSlkZQLV.js} +1 -1
- package/dist/assets/{_slug_-CK9TQknP.js → _slug_-ClQKNEA9.js} +5 -5
- package/dist/assets/{access-BOqP7tK6.js → access-BqnqYSZR.js} +1 -1
- package/dist/assets/{app-C9NRUu1x.js → app-D7V6OMMB.js} +1 -1
- package/dist/assets/{changes-Df2TTLEm.js → changes-odK1bV6J.js} +1 -1
- package/dist/assets/{client-DdNHOrl8.js → client-BLY6SeL-.js} +1 -1
- package/dist/assets/{client-BzNAjCJm.js → client-DwF9Q0VQ.js} +2 -2
- package/dist/assets/{client-CiGvH-QO.js → client-P5LOKvwh.js} +2 -2
- package/dist/assets/{client-Bkk7jZD9.js → client-rknXpZ1o.js} +1 -1
- package/dist/assets/{conversation-ZN3-8jbz.css → conversation-BMyk8R_u.css} +1 -1
- package/dist/assets/{conversation-wiDH8Ni4.js → conversation-BoB7Drme.js} +2 -2
- package/dist/assets/{dashboard-Dt57zpvc.js → dashboard-D6JkBdZg.js} +1 -1
- package/dist/assets/{english-definitions-C0n2xolE.js → english-definitions-CwCZ8VJ-.js} +1 -1
- package/dist/assets/{env-CIJebqCq.js → env-CIy7uwLb.js} +1 -1
- package/dist/assets/{history-DqtrCyKI.js → history-IBqZqdSL.js} +1 -1
- package/dist/assets/{index-tPEeYKmw.js → index-DAareKn3.js} +4 -4
- package/dist/assets/{integrations-BST4Qw-s.js → integrations-BBMdyyMq.js} +1 -1
- package/dist/assets/{issues-CN8brLcd.js → issues-DwUO1HjX.js} +1 -1
- package/dist/assets/{learning-B8e42exz.js → learning-DAIqaO0B.js} +1 -1
- package/dist/assets/{pages-DWmGyVcJ.js → pages-DoUMcieZ.js} +1 -1
- package/dist/assets/{project-files-CiFrH7b9.js → project-files-DilujZdI.js} +1 -1
- package/dist/assets/{publish-D1Cm9dcY.js → publish-KZQ_gdoN.js} +1 -1
- package/dist/assets/{pull-requests-ujRUy7Rf.js → pull-requests-BB3CAadu.js} +1 -1
- package/dist/assets/{repository-v-kDk9e_.js → repository-B90tiuN6.js} +1 -1
- package/dist/assets/{settings-CMMTWcem.js → settings-DdbhtNHb.js} +1 -1
- package/dist/assets/{useArchivedVibe64Sessions-C3w4gzum.js → useArchivedVibe64Sessions-B_pM75gN.js} +1 -1
- package/dist/assets/{useVibe64ConversationLog-BfW5VQBw.js → useVibe64ConversationLog-Ch0ZbnCG.js} +2 -2
- package/dist/assets/{useVibe64SessionData-BZUDqDiW.js → useVibe64SessionData-COsXmbMm.js} +1 -1
- package/dist/assets/{useVibe64SessionSelection-ChkFsI6Y.js → useVibe64SessionSelection-CKBC-ZJw.js} +1 -1
- package/dist/assets/{vibe64RepositoryRealtime-BamEfp1M.js → vibe64RepositoryRealtime-BIXVm4u9.js} +1 -1
- package/dist/assets/{vibe64SessionFocus-CfH5XqgI.js → vibe64SessionFocus-C0LfHXbF.js} +1 -1
- package/dist/index.html +4 -4
- package/docs/colleague-usage/coding-agent-goals.md +16 -2
- package/node_modules/@jskit-ai/assistant-core/CHANGELOG.md +2 -0
- package/node_modules/@jskit-ai/assistant-core/package.json +1 -1
- package/node_modules/@jskit-ai/assistant-runtime/CHANGELOG.md +1 -0
- package/node_modules/@jskit-ai/assistant-runtime/package.json +1 -1
- package/node_modules/@jskit-ai/assistant-voice/package.json +1 -1
- package/node_modules/@jskit-ai/realtime/package.json +1 -1
- package/node_modules/@local/vibe64-genesis/bin/vibe64-genesis-host-context +75 -75
- package/package.json +5 -5
- package/server.bundle.mjs +18737 -18727
|
@@ -16,7 +16,7 @@ exports.mask=function(e,n,r,o,s){s<48?io(e,n,r,o,s):t.mask(e,n,r,o,s)},Ct.export
|
|
|
16
16
|
n):t.unmask(e,n)}}catch{}});var lo=$((Im,uo)=>{"use strict";var co=Symbol("kDone"),wr=Symbol("kRun"),yr=class{constructor(e){this[co]=()=>{this.pending--,
|
|
17
17
|
this[wr]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[wr]()}[wr](){if(this.pending!==
|
|
18
18
|
this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[co])}}};uo.exports=yr});var Re=$((Sm,ho)=>{"use strict";var Ze=M("zlib"),po=Ye(),ya=lo(),{kStatusCode:fo}=te(),Ia=Buffer[Symbol.species],Sa=Buffer.
|
|
19
|
-
from([0,0,255,255]),
|
|
19
|
+
from([0,0,255,255]),At=Symbol("permessage-deflate"),re=Symbol("total-length"),Ee=Symbol("callback"),ue=Symbol("buffers"),
|
|
20
20
|
Oe=Symbol("error"),_t,Ir=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold!==void 0?this.
|
|
21
21
|
_options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=
|
|
22
22
|
null,this._inflate=null,this.params=null,!_t){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:
|
|
@@ -25,7 +25,7 @@ null,this._inflate=null,this.params=null,!_t){let n=this._options.concurrencyLim
|
|
|
25
25
|
serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=
|
|
26
26
|
this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=
|
|
27
27
|
this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this.
|
|
28
|
-
_inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[
|
|
28
|
+
_inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[Ee];this._deflate.close(),this._deflate=
|
|
29
29
|
null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let n=this._options,
|
|
30
30
|
r=e.find(o=>!(n.serverNoContextTakeover===!1&&o.server_no_context_takeover||o.server_max_window_bits&&(n.serverMaxWindowBits===
|
|
31
31
|
!1||typeof n.serverMaxWindowBits=="number"&&n.serverMaxWindowBits>o.server_max_window_bits)||typeof n.clientMaxWindowBits==
|
|
@@ -47,34 +47,34 @@ if(o!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${o}`)}else t
|
|
|
47
47
|
n[r]=o})}),e}decompress(e,n,r){_t.add(o=>{this._decompress(e,n,(s,i)=>{o(),r(s,i)})})}compress(e,n,r){_t.add(o=>{this._compress(
|
|
48
48
|
e,n,(s,i)=>{o(),r(s,i)})})}_decompress(e,n,r){let o=this._isServer?"client":"server";if(!this._inflate){let s=`${o}_max_\
|
|
49
49
|
window_bits`,i=typeof this.params[s]!="number"?Ze.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=Ze.createInflateRaw(
|
|
50
|
-
{...this._options.zlibInflateOptions,windowBits:i}),this._inflate[
|
|
51
|
-
_inflate.on("error",ba),this._inflate.on("data",mo)}this._inflate[
|
|
50
|
+
{...this._options.zlibInflateOptions,windowBits:i}),this._inflate[At]=this,this._inflate[re]=0,this._inflate[ue]=[],this.
|
|
51
|
+
_inflate.on("error",ba),this._inflate.on("data",mo)}this._inflate[Ee]=r,this._inflate.write(e),n&&this._inflate.write(Sa),
|
|
52
52
|
this._inflate.flush(()=>{let s=this._inflate[Oe];if(s){this._inflate.close(),this._inflate=null,r(s);return}let i=po.concat(
|
|
53
53
|
this._inflate[ue],this._inflate[re]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):
|
|
54
54
|
(this._inflate[re]=0,this._inflate[ue]=[],n&&this.params[`${o}_no_context_takeover`]&&this._inflate.reset()),r(null,i)})}_compress(e,n,r){
|
|
55
55
|
let o=this._isServer?"server":"client";if(!this._deflate){let s=`${o}_max_window_bits`,i=typeof this.params[s]!="number"?
|
|
56
56
|
Ze.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=Ze.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:i}),
|
|
57
|
-
this._deflate[re]=0,this._deflate[ue]=[],this._deflate.on("data",xa)}this._deflate[
|
|
57
|
+
this._deflate[re]=0,this._deflate[ue]=[],this._deflate.on("data",xa)}this._deflate[Ee]=r,this._deflate.write(e),this._deflate.
|
|
58
58
|
flush(Ze.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=po.concat(this._deflate[ue],this._deflate[re]);n&&(s=new Ia(s.
|
|
59
|
-
buffer,s.byteOffset,s.length-4)),this._deflate[
|
|
59
|
+
buffer,s.byteOffset,s.length-4)),this._deflate[Ee]=null,this._deflate[re]=0,this._deflate[ue]=[],n&&this.params[`${o}_no\
|
|
60
60
|
_context_takeover`]&&this._deflate.reset(),r(null,s)})}};ho.exports=Ir;function xa(t){this[ue].push(t),this[re]+=t.length}
|
|
61
|
-
function mo(t){if(this[re]+=t.length,this[
|
|
61
|
+
function mo(t){if(this[re]+=t.length,this[At]._maxPayload<1||this[re]<=this[At]._maxPayload){this[ue].push(t);return}this[Oe]=
|
|
62
62
|
new RangeError("Max payload size exceeded"),this[Oe].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Oe][fo]=1009,this.removeListener(
|
|
63
|
-
"data",mo),this.reset()}function ba(t){if(this[
|
|
64
|
-
t)}});var Pe=$((xm,
|
|
63
|
+
"data",mo),this.reset()}function ba(t){if(this[At]._inflate=null,this[Oe]){this[Ee](this[Oe]);return}t[fo]=1007,this[Ee](
|
|
64
|
+
t)}});var Pe=$((xm,Et)=>{"use strict";var{isUtf8:go}=M("buffer"),{hasBlob:Ta}=te(),Ca=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
65
65
|
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
66
66
|
1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function _a(t){return t>=
|
|
67
67
|
1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function Sr(t){let e=t.length,n=0;for(;n<e;)if((t[n]&128)===
|
|
68
68
|
0)n++;else if((t[n]&224)===192){if(n+1===e||(t[n+1]&192)!==128||(t[n]&254)===192)return!1;n+=2}else if((t[n]&240)===224){
|
|
69
69
|
if(n+2>=e||(t[n+1]&192)!==128||(t[n+2]&192)!==128||t[n]===224&&(t[n+1]&224)===128||t[n]===237&&(t[n+1]&224)===160)return!1;
|
|
70
70
|
n+=3}else if((t[n]&248)===240){if(n+3>=e||(t[n+1]&192)!==128||(t[n+2]&192)!==128||(t[n+3]&192)!==128||t[n]===240&&(t[n+1]&
|
|
71
|
-
240)===128||t[n]===244&&t[n+1]>143||t[n]>244)return!1;n+=4}else return!1;return!0}function
|
|
71
|
+
240)===128||t[n]===244&&t[n+1]>143||t[n]>244)return!1;n+=4}else return!1;return!0}function Aa(t){return Ta&&typeof t=="o\
|
|
72
72
|
bject"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]===
|
|
73
|
-
"Blob"||t[Symbol.toStringTag]==="File")}
|
|
73
|
+
"Blob"||t[Symbol.toStringTag]==="File")}Et.exports={isBlob:Aa,isValidStatusCode:_a,isValidUTF8:Sr,tokenChars:Ca};if(go)Et.
|
|
74
74
|
exports.isValidUTF8=function(t){return t.length<24?Sr(t):go(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=M("utf-8-validate");
|
|
75
|
-
|
|
75
|
+
Et.exports.isValidUTF8=function(e){return e.length<32?Sr(e):t(e)}}catch{}});var _r=$((bm,bo)=>{"use strict";var{Writable:Ea}=M("stream"),vo=Re(),{BINARY_TYPES:Oa,EMPTY_BUFFER:wo,kStatusCode:Ra,kWebSocket:Pa}=te(),
|
|
76
76
|
{concat:xr,toArrayBuffer:ka,unmask:Ma}=Ye(),{isValidStatusCode:Na,isValidUTF8:yo}=Pe(),Ot=Buffer[Symbol.species],G=0,Io=1,
|
|
77
|
-
So=2,xo=3,br=4,Tr=5,Rt=6,Cr=class extends
|
|
77
|
+
So=2,xo=3,br=4,Tr=5,Rt=6,Cr=class extends Ea{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==
|
|
78
78
|
void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||Oa[0],this._extensions=e.extensions||{},this._isServer=
|
|
79
79
|
!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|
|
|
80
80
|
0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Pa]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=
|
|
@@ -136,7 +136,7 @@ this._loop=!1,this.emit("conclude",r,o),this.end()}this._state=G;return}this._al
|
|
|
136
136
|
G,this.startLoop(n)}))}createError(e,n,r,o,s){this._loop=!1,this._errored=!0;let i=new e(r?`Invalid WebSocket frame: ${n}`:
|
|
137
137
|
n);return Error.captureStackTrace(i,this.createError),i.code=s,i[Ra]=o,i}};bo.exports=Cr});var Or=$((Cm,_o)=>{"use strict";var{Duplex:Tm}=M("stream"),{randomFillSync:ja}=M("crypto"),{types:{isUint8Array:Da}}=M("util"),
|
|
138
138
|
To=Re(),{EMPTY_BUFFER:za,kWebSocket:La,NOOP:Ua}=te(),{isBlob:ke,isValidStatusCode:Fa}=Pe(),{mask:Co,toBuffer:ve}=Ye(),W=Symbol(
|
|
139
|
-
"kByteLength"),qa=Buffer.alloc(4),Pt=8*1024,we,Me=Pt,Z=0,$a=1,Ba=2,
|
|
139
|
+
"kByteLength"),qa=Buffer.alloc(4),Pt=8*1024,we,Me=Pt,Z=0,$a=1,Ba=2,Ar=class t{constructor(e,n,r){this._extensions=n||{},
|
|
140
140
|
r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this.
|
|
141
141
|
_bufferedBytes=0,this._queue=[],this._state=Z,this.onerror=Ua,this[La]=void 0}static frame(e,n){let r,o=!1,s=2,i=!1;n.mask&&
|
|
142
142
|
(r=n.maskBuffer||qa,n.generateMask?n.generateMask(r):(Me===Pt&&(we===void 0&&(we=Buffer.alloc(Pt)),ja(we,0,Pt),Me=0),r[0]=
|
|
@@ -166,26 +166,26 @@ t_takeover":"client_no_context_takeover"]&&(i=a>=o._threshold),this._compress=i)
|
|
|
166
166
|
ke(e)?this._state!==Z?this.enqueue([this.getBlobData,e,this._compress,d,r]):this.getBlobData(e,this._compress,d,r):this.
|
|
167
167
|
_state!==Z?this.enqueue([this.dispatch,e,this._compress,d,r]):this.dispatch(e,this._compress,d,r)}getBlobData(e,n,r,o){this.
|
|
168
168
|
_bufferedBytes+=r[W],this._state=Ba,e.arrayBuffer().then(s=>{if(this._socket.destroyed){let a=new Error("The socket was \
|
|
169
|
-
closed while the blob was being read");process.nextTick(
|
|
169
|
+
closed while the blob was being read");process.nextTick(Er,this,a,o);return}this._bufferedBytes-=r[W];let i=ve(s);n?this.
|
|
170
170
|
dispatch(i,n,r,o):(this._state=Z,this.sendFrame(t.frame(i,r),o),this.dequeue())}).catch(s=>{process.nextTick(Ha,this,s,o)})}dispatch(e,n,r,o){
|
|
171
171
|
if(!n){this.sendFrame(t.frame(e,r),o);return}let s=this._extensions[To.extensionName];this._bufferedBytes+=r[W],this._state=
|
|
172
172
|
$a,s.compress(e,r.fin,(i,a)=>{if(this._socket.destroyed){let c=new Error("The socket was closed while data was being com\
|
|
173
|
-
pressed");
|
|
173
|
+
pressed");Er(this,c,o);return}this._bufferedBytes-=r[W],this._state=Z,r.readOnly=!1,this.sendFrame(t.frame(a,r),o),this.
|
|
174
174
|
dequeue()})}dequeue(){for(;this._state===Z&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][W],
|
|
175
175
|
Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][W],this._queue.push(e)}sendFrame(e,n){e.length===
|
|
176
176
|
2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],n),this._socket.uncork()):this._socket.write(e[0],
|
|
177
|
-
n)}};_o.exports=
|
|
178
|
-
length-1];typeof s=="function"&&s(e)}}function Ha(t,e,n){
|
|
177
|
+
n)}};_o.exports=Ar;function Er(t,e,n){typeof n=="function"&&n(e);for(let r=0;r<t._queue.length;r++){let o=t._queue[r],s=o[o.
|
|
178
|
+
length-1];typeof s=="function"&&s(e)}}function Ha(t,e,n){Er(t,e,n),t.onerror(e)}});var jo=$((_m,No)=>{"use strict";var{kForOnEventAttribute:Qe,kListener:Rr}=te(),Ao=Symbol("kCode"),Eo=Symbol("kData"),Oo=Symbol(
|
|
179
179
|
"kError"),Ro=Symbol("kMessage"),Po=Symbol("kReason"),Ne=Symbol("kTarget"),ko=Symbol("kType"),Mo=Symbol("kWasClean"),ne=class{constructor(e){
|
|
180
180
|
this[Ne]=null,this[ko]=e}get target(){return this[Ne]}get type(){return this[ko]}};Object.defineProperty(ne.prototype,"t\
|
|
181
181
|
arget",{enumerable:!0});Object.defineProperty(ne.prototype,"type",{enumerable:!0});var ye=class extends ne{constructor(e,n={}){
|
|
182
|
-
super(e),this[
|
|
183
|
-
return this[
|
|
182
|
+
super(e),this[Ao]=n.code===void 0?0:n.code,this[Po]=n.reason===void 0?"":n.reason,this[Mo]=n.wasClean===void 0?!1:n.wasClean}get code(){
|
|
183
|
+
return this[Ao]}get reason(){return this[Po]}get wasClean(){return this[Mo]}};Object.defineProperty(ye.prototype,"code",
|
|
184
184
|
{enumerable:!0});Object.defineProperty(ye.prototype,"reason",{enumerable:!0});Object.defineProperty(ye.prototype,"wasCle\
|
|
185
185
|
an",{enumerable:!0});var je=class extends ne{constructor(e,n={}){super(e),this[Oo]=n.error===void 0?null:n.error,this[Ro]=
|
|
186
186
|
n.message===void 0?"":n.message}get error(){return this[Oo]}get message(){return this[Ro]}};Object.defineProperty(je.prototype,
|
|
187
187
|
"error",{enumerable:!0});Object.defineProperty(je.prototype,"message",{enumerable:!0});var et=class extends ne{constructor(e,n={}){
|
|
188
|
-
super(e),this[
|
|
188
|
+
super(e),this[Eo]=n.data===void 0?null:n.data}get data(){return this[Eo]}};Object.defineProperty(et.prototype,"data",{enumerable:!0});
|
|
189
189
|
var Va={addEventListener(t,e,n={}){for(let o of this.listeners(t))if(!n[Qe]&&o[Rr]===e&&!o[Qe])return;let r;if(t==="mess\
|
|
190
190
|
age")r=function(s,i){let a=new et("message",{data:i?s:s.toString()});a[Ne]=this,kt(e,this,a)};else if(t==="close")r=function(s,i){
|
|
191
191
|
let a=new ye("close",{code:s,reason:i.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[Ne]=this,kt(
|
|
@@ -193,7 +193,7 @@ e,this,a)};else if(t==="error")r=function(s){let i=new je("error",{error:s,messa
|
|
|
193
193
|
"open")r=function(){let s=new ne("open");s[Ne]=this,kt(e,this,s)};else return;r[Qe]=!!n[Qe],r[Rr]=e,n.once?this.once(t,r):
|
|
194
194
|
this.on(t,r)},removeEventListener(t,e){for(let n of this.listeners(t))if(n[Rr]===e&&!n[Qe]){this.removeListener(t,n);break}}};
|
|
195
195
|
No.exports={CloseEvent:ye,ErrorEvent:je,Event:ne,EventTarget:Va,MessageEvent:et};function kt(t,e,n){typeof t=="object"&&
|
|
196
|
-
t.handleEvent?t.handleEvent.call(t,n):t.call(e,n)}});var Mt=$((
|
|
196
|
+
t.handleEvent?t.handleEvent.call(t,n):t.call(e,n)}});var Mt=$((Am,Do)=>{"use strict";var{tokenChars:tt}=Pe();function ee(t,e,n){t[e]===void 0?t[e]=[n]:t[e].push(n)}function Ga(t){
|
|
197
197
|
let e=Object.create(null),n=Object.create(null),r=!1,o=!1,s=!1,i,a,c=-1,d=-1,p=-1,m=0;for(;m<t.length;m++)if(d=t.charCodeAt(
|
|
198
198
|
m),i===void 0)if(p===-1&&tt[d]===1)c===-1&&(c=m);else if(m!==0&&(d===32||d===9))p===-1&&c!==-1&&(p=m);else if(d===59||d===
|
|
199
199
|
44){if(c===-1)throw new SyntaxError(`Unexpected character at index ${m}`);p===-1&&(p=m);let v=t.slice(c,p);d===44?(ee(e,
|
|
@@ -211,7 +211,7 @@ void 0,c=p=-1}else throw new SyntaxError(`Unexpected character at index ${m}`);i
|
|
|
211
211
|
l.replace(/\\/g,"")):ee(n,a,l),ee(e,i,n)),e}function Wa(t){return Object.keys(t).map(e=>{let n=t[e];return Array.isArray(
|
|
212
212
|
n)||(n=[n]),n.map(r=>[e].concat(Object.keys(r).map(o=>{let s=r[o];return Array.isArray(s)||(s=[s]),s.map(i=>i===!0?o:`${o}\
|
|
213
213
|
=${i}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Do.exports={format:Wa,parse:Ga}});var zt=$((Rm,Ko)=>{"use strict";var Ka=M("events"),Ja=M("https"),Xa=M("http"),Uo=M("net"),Ya=M("tls"),{randomBytes:Za,createHash:Qa}=M("crypto"),
|
|
214
|
-
{Duplex:
|
|
214
|
+
{Duplex:Em,Readable:Om}=M("stream"),{URL:Pr}=M("url"),le=Re(),ec=_r(),tc=Or(),{isBlob:rc}=Pe(),{BINARY_TYPES:zo,CLOSE_TIMEOUT:nc,
|
|
215
215
|
EMPTY_BUFFER:Nt,GUID:oc,kForOnEventAttribute:kr,kListener:sc,kStatusCode:ic,kWebSocket:L,NOOP:Fo}=te(),{EventTarget:{addEventListener:ac,
|
|
216
216
|
removeEventListener:cc}}=jo(),{format:dc,parse:uc}=Mt(),{toBuffer:lc}=Ye(),qo=Symbol("kAborted"),Mr=[8,13],oe=["CONNECTI\
|
|
217
217
|
NG","OPEN","CLOSING","CLOSED"],pc=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,k=class t extends Ka{constructor(e,n,r){super(),this.
|
|
@@ -332,8 +332,8 @@ let i=t.charCodeAt(o);if(r===-1&&Cc[i]===1)n===-1&&(n=o);else if(o!==0&&(i===32|
|
|
|
332
332
|
44){if(n===-1)throw new SyntaxError(`Unexpected character at index ${o}`);r===-1&&(r=o);let a=t.slice(n,r);if(e.has(a))throw new SyntaxError(
|
|
333
333
|
`The "${a}" subprotocol is duplicated`);e.add(a),n=r=-1}else throw new SyntaxError(`Unexpected character at index ${o}`)}
|
|
334
334
|
if(n===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let s=t.slice(n,o);if(e.has(s))throw new SyntaxError(
|
|
335
|
-
`The "${s}" subprotocol is duplicated`);return e.add(s),e}Qo.exports={parse:_c}});var is=$((jm,ss)=>{"use strict";var
|
|
336
|
-
Ie=Re(),Oc=jr(),Rc=zt(),{CLOSE_TIMEOUT:Pc,GUID:kc,kWebSocket:Mc}=te(),Nc=/^[+/0-9A-Za-z]{22}==$/,ts=0,rs=1,os=2,Dr=class extends
|
|
335
|
+
`The "${s}" subprotocol is duplicated`);return e.add(s),e}Qo.exports={parse:_c}});var is=$((jm,ss)=>{"use strict";var Ac=M("events"),Lt=M("http"),{Duplex:Nm}=M("stream"),{createHash:Ec}=M("crypto"),es=Mt(),
|
|
336
|
+
Ie=Re(),Oc=jr(),Rc=zt(),{CLOSE_TIMEOUT:Pc,GUID:kc,kWebSocket:Mc}=te(),Nc=/^[+/0-9A-Za-z]{22}==$/,ts=0,rs=1,os=2,Dr=class extends Ac{constructor(e,n){
|
|
337
337
|
if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:256*1024,maxFragments:16*1024,maxPayload:100*1024*
|
|
338
338
|
1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:Pc,verifyClient:null,
|
|
339
339
|
noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:Rc,...e},e.port==null&&!e.server&&!e.noServer||
|
|
@@ -364,7 +364,7 @@ options.verifyClient.length===2){this.options.verifyClient(l,(v,x,b,O)=>{if(!v)r
|
|
|
364
364
|
m,s,d,e,n,r,o)});return}if(!this.options.verifyClient(l))return nt(n,401)}this.completeUpgrade(m,s,d,e,n,r,o)}completeUpgrade(e,n,r,o,s,i,a){
|
|
365
365
|
if(!s.readable||!s.writable)return s.destroy();if(s[Mc])throw new Error("server.handleUpgrade() was called more than onc\
|
|
366
366
|
e with the same socket, possibly due to a misconfiguration");if(this._state>ts)return nt(s,503);let d=["HTTP/1.1 101 Swi\
|
|
367
|
-
tching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${
|
|
367
|
+
tching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Ec("sha1").update(n+kc).digest("ba\
|
|
368
368
|
se64")}`],p=new this.options.WebSocket(null,void 0,this.options);if(r.size){let m=this.options.handleProtocols?this.options.
|
|
369
369
|
handleProtocols(r,o):r.values().next().value;m&&(d.push(`Sec-WebSocket-Protocol: ${m}`),p._protocol=m)}if(e[Ie.extensionName]){
|
|
370
370
|
let m=e[Ie.extensionName].params,l=es.format({[Ie.extensionName]:[m]});d.push(`Sec-WebSocket-Extensions: ${l}`),p._extensions=
|
|
@@ -382,13 +382,13 @@ l","Content-Length":Buffer.byteLength(n),...r},t.once("finish",t.destroy),t.end(
|
|
|
382
382
|
\r
|
|
383
383
|
`+n)}function Se(t,e,n,r,o,s){if(t.listenerCount("wsClientError")){let i=new Error(o);Error.captureStackTrace(i,Se),t.emit(
|
|
384
384
|
"wsClientError",i,n,e)}else nt(n,r,o,s)}});function I(t){return String(t??"").trim()}function yt(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||
|
|
385
|
-
e===null}var Bp=Object.freeze(["none","pending","committed","rolledBack","unknown"]);function _(t,{fallback:e=""}={}){return String(t||"").trim()||e}function
|
|
386
|
-
{text:"Assistant stopped with an error.",messageCode:"assistant.turn.failed"})});function It(t){return
|
|
385
|
+
e===null}var Bp=Object.freeze(["none","pending","committed","rolledBack","unknown"]);function _(t,{fallback:e=""}={}){return String(t||"").trim()||e}function A(t){return!!(t&&typeof t=="object"&&!Array.isArray(t))}function V(t,{fallback:e=0}={}){let n=Number(t);return!Number.isInteger(n)||n<1?e:n}var Vp=Object.freeze({interrupted:Object.freeze({text:"Stopped.",messageCode:"assistant.turn.stopped"}),failed:Object.freeze(
|
|
386
|
+
{text:"Assistant stopped with an error.",messageCode:"assistant.turn.failed"})});function It(t){return A(t)?{...t}:{}}var N=class extends Error{constructor(e,n,r={}){super(n,r.cause===void 0?void 0:{cause:r.cause}),this.name="AppError",this.
|
|
387
387
|
status=Number(e)||500,this.statusCode=this.status,this.code=r.code||"APP_ERROR",this.params=It(r.params),r.messageCode&&
|
|
388
388
|
(this.messageCode=String(r.messageCode),this.messageParams=It(r.messageParams)),this.details=r.details,this.headers=r.headers||
|
|
389
389
|
{}}};var Sf=new Set(["contextcompaction",...["context","thread","conversation"].flatMap(t=>["compact","compacted","compaction",
|
|
390
390
|
"truncate","truncated","truncation"].flatMap(e=>[`${t}_${e}`,`${e}_${t}`]))]);var F=Object.freeze({ACTIVE:"active",CANCELLED:"cancelled",COMPLETED:"completed",FAILED:"failed",FINALIZING:"finalizing",
|
|
391
|
-
INTERRUPTED:"interrupted",STARTING:"starting",TIMED_OUT:"timed_out"}),
|
|
391
|
+
INTERRUPTED:"interrupted",STARTING:"starting",TIMED_OUT:"timed_out"}),Ef=new Set(Object.values(F)),Of=new Set([F.CANCELLED,
|
|
392
392
|
F.COMPLETED,F.FAILED,F.INTERRUPTED,F.TIMED_OUT]),Rf=new Set([F.ACTIVE,F.FINALIZING,F.STARTING]);import{execFile as na}from"node:child_process";import{readFile as fr,readdir as oa}from"node:fs/promises";import{setTimeout as eo}from"node:timers/promises";import{promisify as sa}from"node:util";var ia=sa(na);async function aa(t){
|
|
393
393
|
let{stdout:e}=await ia("ps",t,{env:{...process.env,LC_ALL:"C",TZ:"UTC"},maxBuffer:67108864});return e}function bt({runtimeTokenEnvironmentName:t="\
|
|
394
394
|
JSKIT_EXECUTION_RUNTIME_TOKEN",commandHashEnvironmentName:e="JSKIT_EXECUTION_COMMAND_HASH",label:n="Native",unavailableCode:r="\
|
|
@@ -402,14 +402,14 @@ kill(-u,0),!0}catch{return!1}}function O(w,u){let f=Number(w),h=process.platform
|
|
|
402
402
|
h,u),!0}catch(g){if(!["ESRCH","EPERM"].includes(String(g?.code||"")))throw g;return!1}}function P(w=""){let u=String(w||
|
|
403
403
|
""),f=u.lastIndexOf(")");if(f<0)return null;let h=u.slice(f+1).trim().split(/\s+/u),g=String(h[0]||""),y=Number(h[1]),S=Number(
|
|
404
404
|
h[2]),T=String(h[19]||"");return!/^[A-Z]$/u.test(g)||!Number.isSafeInteger(y)||y<0||!Number.isSafeInteger(S)||S<=0||!/^\d+$/u.
|
|
405
|
-
test(T)?null:{parentPid:y,processGroupId:S,startTimeTicks:T,state:g}}function j(w={}){let u=
|
|
405
|
+
test(T)?null:{parentPid:y,processGroupId:S,startTimeTicks:T,state:g}}function j(w={}){let u=A(w)?w:{};return{commandHash:I(
|
|
406
406
|
u.commandHash),platform:I(u.platform),runtimeToken:I(u.runtimeToken),startTimeTicks:I(u.startTimeTicks),version:Number(u.
|
|
407
407
|
version||0)}}function D(w={}){let u=j(w);return!!(u.version===c&&Object.values(d).includes(u.platform)&&/^[a-f0-9]{12}$/u.
|
|
408
408
|
test(u.commandHash)&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu.test(u.runtimeToken)&&/^\d+$/u.
|
|
409
409
|
test(u.startTimeTicks))}function U(w=[],u=""){let f=w.find(h=>h.startsWith(`${u}=`));return f?f.slice(u.length+1):""}async function J(){
|
|
410
410
|
let w=[],u=await oa("/proc",{withFileTypes:!0}).catch(()=>[]);for(let f of u){if(!f.isDirectory()||!/^\d+$/u.test(f.name))
|
|
411
411
|
continue;let h=Number(f.name),g=await fr(`/proc/${f.name}/stat`,"utf8").catch(()=>""),y=P(g);if(!y||y.state==="Z")continue;
|
|
412
|
-
let S=null,T=!0;try{S=await fr(`/proc/${f.name}/environ`)}catch(
|
|
412
|
+
let S=null,T=!0;try{S=await fr(`/proc/${f.name}/environ`)}catch(E){if(String(E?.code||"")==="ENOENT")continue;T=!1}let R=T?
|
|
413
413
|
S.toString("utf8").split("\0"):[];w.push({...y,commandHash:U(R,e),environmentReadable:T,pid:h,runtimeToken:U(R,t)})}return w}
|
|
414
414
|
let H=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function q(w=""){let u=/^\w{3}\s+(\w{3})\s+(\d{1,2})\s+(\d{2}):(\d{2}):(\d{2})\s+(\d{4})$/u.
|
|
415
415
|
exec(String(w).trim()),f=u?H.indexOf(u[1]):-1;if(f<0)return"";let[,,h,g,y,S,T]=u.map(Number);return String(Date.UTC(T,f,
|
|
@@ -418,28 +418,28 @@ h,g,y,S)/1e3)}function ae(w=""){let u=new Map;for(let f of String(w).split(`
|
|
|
418
418
|
w))return null;let f=u.slice(w.length).split(/\s+/u).filter(h=>/^[^=\s]+=/u.test(h));return f.length?f:null}async function We(){
|
|
419
419
|
let w=process.getuid(),u=["-x","-U",String(w),"-ww","-o","pid=,command="],[f,h,g]=await Promise.all([s(["-ax","-o","pid=\
|
|
420
420
|
,pgid=,uid=,stat=,lstart="]),s(u),s(["-E",...u])]),y=ae(h),S=ae(g),T=[];for(let R of String(f).split(`
|
|
421
|
-
`)){let
|
|
422
|
-
"Z"))continue;let X=Number(
|
|
423
|
-
pid:X,processGroupId:Number(
|
|
421
|
+
`)){let E=/^\s*(\d+)\s+(\d+)\s+(\d+)\s+(\S+)\s+(\w{3}\s+\w{3}\s+\d{1,2}\s+[\d:]{8}\s+\d{4})\s*$/u.exec(R);if(!E||E[4].startsWith(
|
|
422
|
+
"Z"))continue;let X=Number(E[1]),Y=Number(E[3])===w?me(y.get(X),S.get(X)):null;T.push({commandHash:U(Y||[],e),environmentReadable:!!Y,
|
|
423
|
+
pid:X,processGroupId:Number(E[2]),runtimeToken:U(Y||[],t),startTimeTicks:q(E[5])})}return T}function ht(w){let u=Object.
|
|
424
424
|
values(l).includes(w?.status)?w.status:l.AMBIGUOUS;return{processGroupIds:[...new Set((Array.isArray(w?.processGroupIds)?
|
|
425
425
|
w.processGroupIds:[]).map(Number).filter(f=>Number.isSafeInteger(f)&&f>0))],status:u}}async function gt(w={}){if(!v(w))return{
|
|
426
426
|
processGroupIds:[],status:l.INVALID};if(w.processState===m.STOPPED)return{processGroupIds:[],status:l.ABSENT};let u=w.processIdentity,
|
|
427
427
|
f=u.platform!==p?null:o==="darwin"?await We().catch(()=>null):await J();if(!f)return{processGroupIds:[],status:l.AMBIGUOUS};
|
|
428
|
-
let h=Number(w.pid),g=f.filter(({processGroupId:
|
|
429
|
-
|
|
428
|
+
let h=Number(w.pid),g=f.filter(({processGroupId:E})=>E===h),y=[],S=g.some(({environmentReadable:E})=>!E);for(let E of f)
|
|
429
|
+
E.environmentReadable&&E.runtimeToken===u.runtimeToken&&E.commandHash===u.commandHash&&y.push(E);let T=y.find(({pid:E})=>E===
|
|
430
430
|
h);if(T&&T.startTimeTicks!==u.startTimeTicks)return{processGroupIds:[],status:l.AMBIGUOUS};if(y.length===0)return S?{processGroupIds:[],
|
|
431
|
-
status:l.AMBIGUOUS}:{processGroupIds:[],status:g.length>0||b(h)?l.MISMATCH:l.ABSENT};let R=[...new Set(y.map(({processGroupId:
|
|
432
|
-
for(let
|
|
433
|
-
processGroupIds:[],status:l.AMBIGUOUS};return g.some(
|
|
431
|
+
status:l.AMBIGUOUS}:{processGroupIds:[],status:g.length>0||b(h)?l.MISMATCH:l.ABSENT};let R=[...new Set(y.map(({processGroupId:E})=>E))];
|
|
432
|
+
for(let E of R)if(f.filter(Y=>Y.processGroupId===E).some(Y=>!Y.environmentReadable||!y.some(({pid:Ji})=>Ji===Y.pid)))return{
|
|
433
|
+
processGroupIds:[],status:l.AMBIGUOUS};return g.some(E=>!y.some(({pid:X})=>X===E.pid))?{processGroupIds:[],status:l.AMBIGUOUS}:
|
|
434
434
|
{processGroupIds:R,status:l.EXACT}}async function he(w={},u={}){let f=u.processIdentityInspector??gt;return ht(await f(w))}
|
|
435
435
|
async function vt(w={},u={},f=0){let h=Date.now()+f,g=await he(w,u);for(;Date.now()<h&&g.status===l.EXACT;)await eo(100),
|
|
436
436
|
g=await he(w,u);return g}async function _e(w={},u={}){let f=V(u.processIdentitySettleTimeoutMs,{fallback:1e3}),h=V(u.processIdentitySettlePollMs,
|
|
437
437
|
{fallback:a}),g=Date.now()+f,y=await he(w,u);for(;y.status===l.AMBIGUOUS&&Date.now()<g;)await eo(Math.min(h,Math.max(1,g-
|
|
438
438
|
Date.now()))),y=await he(w,u);return y}async function wt(w={},u="SIGTERM",f={}){let h=f.signalProcessGroup??O,g=await _e(
|
|
439
439
|
w,f);if(g.status!==l.EXACT)return{inspection:g,signaledProcessGroups:[]};let y=Number(w.pid),S=[...g.processGroupIds.filter(
|
|
440
|
-
R=>R!==y),...g.processGroupIds.filter(R=>R===y)],T=[];for(let R of S){let
|
|
441
|
-
l.MISMATCH)return{inspection:
|
|
442
|
-
|
|
440
|
+
R=>R!==y),...g.processGroupIds.filter(R=>R===y)],T=[];for(let R of S){let E=await _e(w,f);if(E.status===l.ABSENT||E.status===
|
|
441
|
+
l.MISMATCH)return{inspection:E,signaledProcessGroups:T};if(E.status!==l.EXACT)return{inspection:E,signaledProcessGroups:T};
|
|
442
|
+
E.processGroupIds.includes(R)&&(h(R,u),T.push(R))}return{inspection:await _e(w,f),signaledProcessGroups:T}}async function ar(w={},u={}){
|
|
443
443
|
if(!v(w))return{identityStatus:l.INVALID,processExitVerified:!1,stopped:!1};if(w.processState===m.STOPPED&&w.processExitVerifiedAt)
|
|
444
444
|
return{alreadyStopped:!0,identityStatus:l.ABSENT,processExitVerified:!0,stopped:!1};let f=await _e(w,u);if(f.status===l.
|
|
445
445
|
ABSENT||f.status===l.MISMATCH)return{identityStatus:f.status,processExitVerified:!0,stopped:!1};if(f.status!==l.EXACT)return{
|
|
@@ -454,7 +454,7 @@ status,pid:Number(w.pid),processExitVerified:S,signaledProcessGroups:y,stopped:S
|
|
|
454
454
|
w)]).catch(()=>"")),f=/^\s*(\d+)\s+(.+?)\s*$/u.exec(u);return f?{processGroupId:Number(f[1]),startTimeTicks:q(f[2])}:null}
|
|
455
455
|
async function dr({commandHash:w="",pid:u=null,reportedIdentity:f=null,runtimeToken:h=""}={}){let g=I(w),y=I(h),S=j(f);if(D(
|
|
456
456
|
S)&&S.commandHash===g&&S.runtimeToken===y)return S;let T=Number(u),R=p&&Number.isSafeInteger(T)&&T>0?await cr(T):null;if(!R?.
|
|
457
|
-
startTimeTicks||R.processGroupId!==T){let
|
|
457
|
+
startTimeTicks||R.processGroupId!==T){let E=new Error(`${n} process identity could not be captured.`);throw E.code=r,E}return{
|
|
458
458
|
commandHash:g,platform:p,runtimeToken:y,startTimeTicks:R.startTimeTicks,version:c}}return Object.freeze({normalize:j,isValid:D,
|
|
459
459
|
normalizeInspection:ht,capture:dr,inspect:he,stop:ar,isProcessAlive:x})}import{execFile as da}from"node:child_process";import{promisify as ua}from"node:util";var Gf=Object.freeze(["plugins","apps","daemon_auto_start"]);var Wf=Object.freeze([[".tmp",/^(?:plugins(?:$|[.-])|git-|bundled-marketplaces$)/u],["cache",/^(?:remote_plugin_catalog|codex_apps_tools|codex_apps_server_info|codex_app_directory|bundled_plugin_exclusions)$/u]]);var Qf=ua(da);function ge(t=""){return Array.from(String(t)).some(e=>{let n=e.codePointAt(0);return n<=31||n===127})}var Tt=(t,e,n,r={})=>Object.freeze({id:t,contextWindow:e,variants:Object.freeze(n),...r}),la=Object.freeze([Object.freeze(
|
|
460
460
|
{id:"deepseek",baseUrl:"https://api.deepseek.com/",claudeBaseUrl:"https://api.deepseek.com/anthropic",claudeAutoCompactWindow:786432,
|
|
@@ -508,10 +508,10 @@ ceived an oversized or invalid MCP server inventory.");return h.sort()}function
|
|
|
508
508
|
"Codex helper execution received an unexpected hook inventory.");let h=u.data[0];if(I(h?.cwd)!==f||I(h?.cwd).length>d||!Array.
|
|
509
509
|
isArray(h.hooks)||!Array.isArray(h.errors)||h.hooks.length>a||h.errors.length>c)throw l("Codex helper execution received\
|
|
510
510
|
an incomplete hook inventory.");if(h.errors.length>0)throw l("Codex helper execution cannot continue while hook discove\
|
|
511
|
-
ry has errors.",{hookErrorCount:h.errors.length});let g=h.hooks.map(S=>{let T=I(S?.key),R=I(S?.currentHash),
|
|
512
|
-
X=I(S?.sourcePath);if(!T||[T,R,
|
|
511
|
+
ry has errors.",{hookErrorCount:h.errors.length});let g=h.hooks.map(S=>{let T=I(S?.key),R=I(S?.currentHash),E=I(S?.handlerType),
|
|
512
|
+
X=I(S?.sourcePath);if(!T||[T,R,E,X].some(Y=>Y.length>d||ge(Y)))throw l("Codex helper execution found an invalid hook inv\
|
|
513
513
|
entory entry.");if(S?.isManaged===!0&&S?.enabled===!0)throw l("Codex helper execution cannot disable a managed hook.");return{
|
|
514
|
-
currentHash:R,enabled:S?.enabled===!0,handlerType:
|
|
514
|
+
currentHash:R,enabled:S?.enabled===!0,handlerType:E,isManaged:S?.isManaged===!0,key:T,sourcePath:X}}).sort((S,T)=>S.key.
|
|
515
515
|
localeCompare(T.key)),y=JSON.stringify(g);if(y.length>p)throw l("Codex helper execution received an oversized hook inven\
|
|
516
516
|
tory.");return{fingerprint:y,hookKeys:g.filter(S=>!S.isManaged).map(S=>S.key)}}function H({effort:u="",summary:f="",hookKeys:h=[],
|
|
517
517
|
mcpServerNames:g=[]}={}){let y={features:Object.fromEntries(n.map(T=>[T,!1])),hooks:{state:Object.fromEntries(h.map(T=>[
|
|
@@ -525,9 +525,9 @@ summary:y,hookKeys:T.hookKeys,mcpServerNames:S})}}async function ae(u,{effort:f=
|
|
|
525
525
|
"function"||typeof u?.listHooks!="function")throw l("Codex helper execution cannot inventory configuration and hooks.");
|
|
526
526
|
let g=await O(u),y=b(u),S=await u.readConfig({cwd:g.cwd,includeLayers:!1});if(b(u)!==y)throw l("Codex app-server reconne\
|
|
527
527
|
cted during helper policy verification.");let T=await u.listHooks([g.cwd]);if(b(u)!==y)throw l("Codex app-server reconne\
|
|
528
|
-
cted during helper policy verification.");let{mcpServerNames:R,hookState:
|
|
529
|
-
freeze({accountIdentitySignature:g.accountIdentitySignature,config:X,connectionGeneration:y,executionCwd:g.cwd,hookFingerprint:
|
|
530
|
-
fingerprint,hookKeys:Object.freeze([...
|
|
528
|
+
cted during helper policy verification.");let{mcpServerNames:R,hookState:E,config:X}=q(S,T,g.cwd,{effort:f,summary:h});return Object.
|
|
529
|
+
freeze({accountIdentitySignature:g.accountIdentitySignature,config:X,connectionGeneration:y,executionCwd:g.cwd,hookFingerprint:E.
|
|
530
|
+
fingerprint,hookKeys:Object.freeze([...E.hookKeys]),mcpServerNames:Object.freeze([...R])})}function me(u=null,f=null){return u?.
|
|
531
531
|
accountIdentitySignature===f?.accountIdentitySignature&&u?.connectionGeneration===f?.connectionGeneration&&u?.executionCwd===
|
|
532
532
|
f?.executionCwd&&u?.hookFingerprint===f?.hookFingerprint&&JSON.stringify(u?.mcpServerNames||[])===JSON.stringify(f?.mcpServerNames||
|
|
533
533
|
[])}function We(u,f,h=""){let g=I(h);if(!f)return u.codexAppServerHelperThreadId=g,u.codexAppServerHelperThreadRetired=!0,
|
|
@@ -570,7 +570,7 @@ d": ["short quote of each unsupported claim"]}, with [] when every claim is supp
|
|
|
570
570
|
`);var dS=64*1024;var Zd="the app",gS=en(Zd);var wS=16*1024*1024;var xS=new URL("./../../../@jskit-ai/assistant-core/src/server/conversation/commandWrapper.js",import.meta.url).href;var su=Object.freeze({streaming:!1,instructions:!1,configuration:!1,goals:!1,goalBudgets:!1,goalCommands:Object.freeze({}),
|
|
571
571
|
attachments:!1,tools:!1,nativeTools:!1});var Qx=Object.freeze({goals:!0,goalBudgets:!1,goalCommands:Object.freeze({set:Object.freeze({delivery:"message",interruptsTurn:!1}),
|
|
572
572
|
resume:Object.freeze({delivery:"message",interruptsTurn:!1}),pause:Object.freeze({delivery:"control",interruptsTurn:!0}),
|
|
573
|
-
cancel:Object.freeze({delivery:"message",interruptsTurn:!0})})}),eb=Object.freeze({});var Ob=new URL("./../../../@jskit-ai/assistant-core/src/server/conversation/codexRuntime.js",import.meta.url).href;import{createHash as Us}from"node:crypto";import{open as Tu}from"node:fs/promises";import Fs from"node:path";var cn=1024*1024,Cu=256*1024,qs=512,_u=128,
|
|
573
|
+
cancel:Object.freeze({delivery:"message",interruptsTurn:!0})})}),eb=Object.freeze({});var Ob=new URL("./../../../@jskit-ai/assistant-core/src/server/conversation/codexRuntime.js",import.meta.url).href;import{createHash as Us}from"node:crypto";import{open as Tu}from"node:fs/promises";import Fs from"node:path";var cn=1024*1024,Cu=256*1024,qs=512,_u=128,Au=16*1024;function dn({errorPrefix:t="",identityNamespace:e="codex-account-v\
|
|
574
574
|
1",secretNamespace:n="codex-auth-secret-v1"}={}){function r(d="",p="",{messageCode:m}={}){let l=new Error(I(p)||"Codex h\
|
|
575
575
|
elper authentication is unavailable. Reconnect Codex and retry.");return l.code=I(d)||`${t}codex_helper_auth_unavailable`,
|
|
576
576
|
I(p)?m&&(l.messageCode=m):l.messageCode="assistant.codex.helperAuthUnavailable",l.messageCode&&(l.messageParams={}),l}function o(d,{
|
|
@@ -583,19 +583,19 @@ let p=null;try{p=await Tu(d,"r");let m=await p.stat();if(!m.isFile()||m.size>cn)
|
|
|
583
583
|
rdInvalid"});let l=Buffer.alloc(cn+1),v=0;for(;v<l.length;){let{bytesRead:b}=await p.read(l,v,l.length-v,null);if(b===0)
|
|
584
584
|
break;v+=b}if(v>cn)throw r(`${t}codex_helper_auth_invalid`,"The selected Codex authentication record is too large. Recon\
|
|
585
585
|
nect Codex and retry.",{messageCode:"assistant.codex.authRecordTooLarge"});let x=JSON.parse(l.subarray(0,v).toString("ut\
|
|
586
|
-
f8"));if(!
|
|
586
|
+
f8"));if(!A(x))throw new Error("invalid authentication record");return x}catch(m){throw m?.code?.startsWith?.(`${t}codex\
|
|
587
587
|
_helper_auth_`)?m:r(`${t}codex_helper_auth_unavailable`,"The selected Codex authentication record could not be read. Rec\
|
|
588
588
|
onnect Codex and retry.",{messageCode:"assistant.codex.authRecordUnreadable"})}finally{await p?.close().catch(()=>null)}}
|
|
589
589
|
async function c(d={}){let p=I(d.toolHomeSource);if(!p||!Fs.isAbsolute(p))throw r(`${t}codex_helper_auth_unavailable`,"T\
|
|
590
590
|
he selected Codex account is unavailable. Reconnect Codex and retry.",{messageCode:"assistant.codex.accountUnavailable"});
|
|
591
|
-
let m=await a(Fs.join(p,".codex","auth.json")),l=I(m.auth_mode).toLowerCase();if(l==="chatgpt"){let v=
|
|
591
|
+
let m=await a(Fs.join(p,".codex","auth.json")),l=I(m.auth_mode).toLowerCase();if(l==="chatgpt"){let v=A(m.tokens)?m.tokens:
|
|
592
592
|
{},x=o(v.account_id,{label:"Codex account identity",maxLength:qs}),b=o(v.access_token,{label:"Codex access token",maxLength:Cu}),
|
|
593
593
|
O=v.chatgpt_plan_type??v.plan_type,P=O==null||O===""?"":o(O,{label:"Codex plan type",maxLength:_u});return Object.freeze(
|
|
594
594
|
{accessToken:b,accountId:x,authMode:"chatgpt",identitySignature:s("chatgpt",x),planType:P,secretSignature:i(b)})}if(["ap\
|
|
595
|
-
ikey","api_key"].includes(l)){let v=o(m.OPENAI_API_KEY,{label:"Codex API key",maxLength:
|
|
595
|
+
ikey","api_key"].includes(l)){let v=o(m.OPENAI_API_KEY,{label:"Codex API key",maxLength:Au});return Object.freeze({apiKey:v,
|
|
596
596
|
authMode:"apiKey",identitySignature:s("apiKey",v),secretSignature:i(v)})}throw r(`${t}codex_helper_auth_invalid`,"The se\
|
|
597
597
|
lected Codex authentication mode is unsupported. Reconnect Codex and retry.",{messageCode:"assistant.codex.authModeUnsup\
|
|
598
|
-
ported"})}return Object.freeze({error:r,identitySignature:s,readRecord:a,readSelected:c})}var Xb=Object.freeze({label:"Checking the Codex sign-in",operationId:"codex-auth-preflight"});var nT=dn().error;var
|
|
598
|
+
ported"})}return Object.freeze({error:r,identitySignature:s,readRecord:a,readSelected:c})}var Xb=Object.freeze({label:"Checking the Codex sign-in",operationId:"codex-auth-preflight"});var nT=dn().error;var AT=4*1024*1024;var zC=Object.freeze({goals:!0,goalBudgets:!0,goalCommands:Object.freeze({set:Object.freeze({delivery:"control",interruptsTurn:!1}),
|
|
599
599
|
resume:Object.freeze({delivery:"control",interruptsTurn:!1}),pause:Object.freeze({delivery:"control",interruptsTurn:!0}),
|
|
600
600
|
cancel:Object.freeze({delivery:"control",interruptsTurn:!1})})});var BC=2*1024*1024,HC=32*1024*1024,VC=2*1024*1024;function z(t){if(t===null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null||
|
|
601
601
|
zu(e)}function zu(t){return t!==null&&typeof t=="object"&&Object.getPrototypeOf(t)===null&&Reflect.ownKeys(t).length===0}function pn(t){return t!==null&&typeof t=="object"&&z(t.structure)&&z(t.operations)&&typeof t.validateWith=="function"&&
|
|
@@ -707,7 +707,7 @@ o,s,{root:!0}),c={$schema:Ku,...ai(a,n)};return Object.keys(i.definitions).lengt
|
|
|
707
707
|
Be}function fl(){return{self:!1,children:{}}}function ui(t){return Object.keys(t.children).length>0}function Te(t,e){return`${t}\
|
|
708
708
|
.${String(e)}`}function gi(t,e){return t===""?String(e):Te(t,e)}function li(t,e){if(t===e)return"";let n=`${e}.`;return t.
|
|
709
709
|
startsWith(n)?t.slice(n.length):null}function qe(t,e){let n={};for(let r of Object.values(t)){let o=Te(e,r.field);C(n,o,
|
|
710
|
-
{...r,field:o})}return n}function
|
|
710
|
+
{...r,field:o})}return n}function En(t){return gn(t,"validatePath")}function pi(t){let e={};for(let n of t){let r=En(n),
|
|
711
711
|
o=e;for(let s=0;s<r.length;s++){let i=r[s];Object.hasOwn(o,i)||C(o,i,fl()),s===r.length-1&&(o[i].self=!0),o=o[i].children}}
|
|
712
712
|
return e}function ml(t,e){let n=t;for(let r of e){if(n==null||typeof n!="object"||!Object.hasOwn(n,r))return;n=n[r]}return n}
|
|
713
713
|
function Qt(t){return t===null?!0:Array.isArray(t)||z(t)?Object.keys(t).length>0:t!==void 0}function fi(t){return[...t].
|
|
@@ -732,10 +732,10 @@ freeze({create:Object.freeze({targetFields:"schema",enforceRequired:!0,applyDefa
|
|
|
732
732
|
replace:Object.freeze({targetFields:"schema",enforceRequired:!0,applyDefaults:!0,outputFields:"validated",rejectExplicitUndefined:!0}),
|
|
733
733
|
patch:Object.freeze({targetFields:"input",enforceRequired:!1,applyDefaults:!1,outputFields:"input",rejectExplicitUndefined:!0})});
|
|
734
734
|
function mi(t,e,n,r){let o=e[n];if(!r.includes(o))throw new Error(`Operation "${t}" must define ${n} as one of: ${r.join(
|
|
735
|
-
", ")}.`)}function
|
|
735
|
+
", ")}.`)}function An(t,e,n,r=!0){let o=e[n];if(!(o===void 0&&!r)&&typeof o!="boolean")throw new Error(`Operation "${t}"\
|
|
736
736
|
must define ${n} as a boolean.`)}function wl(t,e){if(typeof e!="object"||e===null||Array.isArray(e))throw new Error(`Op\
|
|
737
|
-
eration "${t}" must be an object.`);return mi(t,e,"targetFields",["schema","input"]),
|
|
738
|
-
pplyDefaults"),mi(t,e,"outputFields",["validated","input"]),
|
|
737
|
+
eration "${t}" must be an object.`);return mi(t,e,"targetFields",["schema","input"]),An(t,e,"enforceRequired"),An(t,e,"a\
|
|
738
|
+
pplyDefaults"),mi(t,e,"outputFields",["validated","input"]),An(t,e,"rejectExplicitUndefined",!1),Object.freeze({targetFields:e.
|
|
739
739
|
targetFields,enforceRequired:e.enforceRequired,applyDefaults:e.applyDefaults,outputFields:e.outputFields,rejectExplicitUndefined:e.
|
|
740
740
|
rejectExplicitUndefined===void 0?!0:e.rejectExplicitUndefined})}function yl(t={}){if(typeof t!="object"||t===null||Array.
|
|
741
741
|
isArray(t))throw new Error("Schema operations must be an object.");let e=Object.create(null);for(let[n,r]of Object.entries(
|
|
@@ -838,7 +838,7 @@ continue}if(!O)continue;let U=this._castValue(o.definition,P,v,D,0,d,i,j);if(Obj
|
|
|
838
838
|
p,U.errors);continue}if(!U.shouldContinue)continue;let J=this._validateSelectedDescendants(o.definition,x.children,v,D,0,
|
|
839
839
|
i,j);Qt(D[0])&&C(c,l,D[0]),this._mergeErrors(p,J)}return p}validateWith(e,n,r={}){if(!Object.hasOwn(this.operations,e))throw new Error(
|
|
840
840
|
`Unknown operation "${e}".`);let o=this.operations[e];return this._assertPlainObjectInput(e,n),this._validateWithOperation(
|
|
841
|
-
e,o,n,r)}validateAt(e,n,r={}){this._assertPlainObjectInput("validateAt",n);let o=
|
|
841
|
+
e,o,n,r)}validateAt(e,n,r={}){this._assertPlainObjectInput("validateAt",n);let o=En(e),{operationName:s,operation:i,validationOptions:a}=this.
|
|
842
842
|
_resolvePathValidationRequest(r),c=this._validateSelectedTree(pi([e]),n,a,this._buildOperationSettings(s,i,n));return{validatedValue:ml(
|
|
843
843
|
c.validatedObject,o),errors:c.errors}}validatePaths(e,n,r={}){if(this._assertPlainObjectInput("validatePaths",n),!Array.
|
|
844
844
|
isArray(e)||e.length===0)throw new Error("validatePaths() expects a non-empty array of schema paths.");let{operationName:o,
|
|
@@ -846,12 +846,12 @@ operation:s,validationOptions:i}=this._resolvePathValidationRequest(r);return th
|
|
|
846
846
|
_buildOperationSettings(o,s,n))}_installOperationMethods(){for(let e of Object.keys(this.operations)){if(e in this)throw new Error(
|
|
847
847
|
`Operation name "${e}" is reserved and cannot be used as a schema method.`);this[e]=(n,r={})=>this.validateWith(e,n,r)}}toJsonSchema(e={}){
|
|
848
848
|
return ci(this,e)}getFieldDefinitions(){return _n.has(this)||_n.set(this,Cn(this.structure)),_n.get(this)}getFieldDefinition(e){
|
|
849
|
-
if(typeof e!="string"||e.trim()==="")throw new Error("Field path must be a non-empty string.");let n=On(this,
|
|
849
|
+
if(typeof e!="string"||e.trim()==="")throw new Error("Field path must be a non-empty string.");let n=On(this,En(e.trim()));
|
|
850
850
|
return n===null?null:Cn(n)}getFieldMessages(e){let n=this.getFieldDefinition(e);return!n||typeof n.messages!="object"||n.
|
|
851
851
|
messages===null?Object.freeze({}):Cn(n.messages)}cleanup(e,n){let r={};for(let o of Object.keys(e))Object.hasOwn(this.structure,
|
|
852
|
-
o)&&this.structure[o][n]&&C(r,o,e[o]);return r}};var{parse:__,stringify:Sl}=JSON,{keys:
|
|
852
|
+
o)&&this.structure[o][n]&&C(r,o,e[o]);return r}};var{parse:__,stringify:Sl}=JSON,{keys:A_}=Object,xl=String,bl="string";var wi="object",Tl=(t,e)=>e;var yi=(t,e,n)=>{let r=xl(e.push(n)-1);return t.set(n,r),r};var Ii=(t,e,n)=>{let r=e&&typeof e===wi?(p,m)=>p===""||-1<e.indexOf(p)?m:void 0:e||Tl,o=new Map,s=[],i=[],a=+yi(o,s,r.call(
|
|
853
853
|
{"":t},"",t)),c=!a;for(;a<s.length;)c=!0,i[a]=Sl(s[a++],d,n);return"["+i.join(",")+"]";function d(p,m){if(c)return c=!c,
|
|
854
|
-
m;let l=r.call(this,p,m);switch(typeof l){case wi:if(l===null)return l;case bl:return o.get(l)||yi(o,s,l)}return l}};var _l=new Set(["true","1","yes","y","on"]),
|
|
854
|
+
m;let l=r.call(this,p,m);switch(typeof l){case wi:if(l===null)return l;case bl:return o.get(l)||yi(o,s,l)}return l}};var _l=new Set(["true","1","yes","y","on"]),Al=new Set(["false","0","no","n","off"]);function El(t){return t!==null&&(typeof t==
|
|
855
855
|
"object"||typeof t=="function")&&typeof t.then=="function"}function Si(t){if(typeof t=="number")return Number.isFinite(t)?
|
|
856
856
|
t:null;if(typeof t=="bigint"){let e=Number(t);return Number.isSafeInteger(e)?e:null}if(typeof t=="string"){let e=t.trim();
|
|
857
857
|
if(e==="")return null;let n=Number(e);return Number.isFinite(n)?n:null}return null}function Pn(t,e){if(Object.is(t,e))return!0;
|
|
@@ -874,7 +874,7 @@ r.value)}catch{try{return Ii(r.value)}catch{r.throwTypeError()}}}),e("boolean",r
|
|
|
874
874
|
value;if(typeof r.value=="number"){if(r.value===1)return!0;if(r.value===0)return!1;r.throwTypeError()}if(typeof r.value==
|
|
875
875
|
"bigint"){if(r.value===1n)return!0;if(r.value===0n)return!1;r.throwTypeError()}if(typeof r.value=="string"){let o=String(
|
|
876
876
|
r.definition.stringFalseWhen||"false").trim().toLowerCase(),s=String(r.definition.stringTrueWhen||"true").trim().toLowerCase(),
|
|
877
|
-
i=r.value.trim().toLowerCase(),a=new Set([...
|
|
877
|
+
i=r.value.trim().toLowerCase(),a=new Set([...Al,o]),c=new Set([..._l,s]);if(a.has(i))return!1;if(c.has(i))return!0}r.throwTypeError()}),
|
|
878
878
|
e("id",r=>{if(typeof r.value=="number"){if(Number.isSafeInteger(r.value)&&r.value>0)return r.value;r.throwTypeError()}if(typeof r.
|
|
879
879
|
value=="bigint"){if(r.value>0n&&r.value<=BigInt(Number.MAX_SAFE_INTEGER))return Number(r.value);r.throwTypeError()}if(typeof r.
|
|
880
880
|
value=="string"){let o=r.value.trim();/^[1-9][0-9]*$/.test(o)||r.throwTypeError();let s=Number(o);return Number.isSafeInteger(
|
|
@@ -895,7 +895,7 @@ r.throwParamError("PATTERN","Value does not match the required pattern.",{patter
|
|
|
895
895
|
parameterValue){if(r.definition.type!=="boolean")throw new Error(`strictBoolean can only be used on boolean fields (${r.
|
|
896
896
|
fieldName}).`);typeof r.valueBeforeCast!="boolean"&&r.throwParamError("STRICT_BOOLEAN","Value must be a boolean.")}}),n(
|
|
897
897
|
"validator",r=>{if(typeof r.parameterValue!="function")throw new Error(`Validator for ${r.fieldName} must be a function.`);
|
|
898
|
-
let o=r.parameterValue(r.value,r.object,r);if(
|
|
898
|
+
let o=r.parameterValue(r.value,r.object,r);if(El(o))throw new Error(`Custom validator for "${r.fieldName}" must be synch\
|
|
899
899
|
ronous.`);typeof o=="string"&&r.throwParamError("CUSTOM_VALIDATOR_FAILED",o)}),n("uppercase",r=>{if(typeof r.value=="str\
|
|
900
900
|
ing")return r.value.toUpperCase()}),n("lowercase",r=>{if(typeof r.value=="string")return r.value.toLowerCase()}),n("leng\
|
|
901
901
|
th",r=>{if(typeof r.value=="string")return r.value.substr(0,r.parameterValue);Number.isInteger(Number(r.valueBeforeCast))&&
|
|
@@ -907,13 +907,13 @@ r.throwParamError("MAX_ITEMS",`Must have no more than ${r.parameterValue} items.
|
|
|
907
907
|
n("notEmpty",r=>{r.parameterValue&&typeof r.value=="string"&&r.value===""&&r.throwParamError("NOT_EMPTY","Field cannot b\
|
|
908
908
|
e empty.")}),n("required",()=>{}),n("unsigned",()=>{}),n("precision",()=>{}),n("scale",()=>{}),n("temporalPrecision",r=>{
|
|
909
909
|
if(r.definition.type!=="time"&&r.definition.type!=="dateTime")throw new Error(`temporalPrecision can only be used on tim\
|
|
910
|
-
e or dateTime fields (${r.fieldName}).`)}),n("nullable",()=>{}),n("nullOnEmpty",()=>{}),n("defaultTo",()=>{})}},xi=Ol;var _i=new WeakMap,
|
|
910
|
+
e or dateTime fields (${r.fieldName}).`)}),n("nullable",()=>{}),n("nullOnEmpty",()=>{}),n("defaultTo",()=>{})}},xi=Ol;var _i=new WeakMap,Ai=new WeakMap,Ei=Symbol.for("json-rest-schema.registry-metadata"),rr=new WeakSet;function Rl(t,e,n){
|
|
911
911
|
if(typeof n!="function")throw new Error(`Type handler for '${e}' must be a function.`);C(t,e,n)}function Pl(t,e,n){if(typeof n!=
|
|
912
912
|
"function")throw new Error(`Validator handler for '${e}' must be a function.`);C(t,e,n)}function nr(t={}){let e=Object.create(
|
|
913
913
|
null);for(let[n,r]of Object.entries(t))C(e,n,r);return e}function bi(t,e){if(typeof t.install!="function")throw new Error(
|
|
914
|
-
"Plugin must have an install method.");t.install(e)}function Ti(t,e,n){_i.set(t,e),
|
|
914
|
+
"Plugin must have an install method.");t.install(e)}function Ti(t,e,n){_i.set(t,e),Ai.set(t,n),Object.defineProperty(t,Ei,
|
|
915
915
|
{value:Object.freeze({getTypes:()=>e,getValidators:()=>n}),enumerable:!1,configurable:!1,writable:!1})}function kl(t){if(!t||
|
|
916
|
-
typeof t!="object"&&typeof t!="function")return null;let e=_i.get(t),n=
|
|
916
|
+
typeof t!="object"&&typeof t!="function")return null;let e=_i.get(t),n=Ai.get(t);if(e&&n)return{types:e,validators:n};let r=t[Ei];
|
|
917
917
|
return r&&typeof r.getTypes=="function"&&typeof r.getValidators=="function"?{types:r.getTypes(),validators:r.getValidators()}:
|
|
918
918
|
typeof t=="object"&&t.types&&typeof t.types=="object"&&t.validators&&typeof t.validators=="object"&&typeof t.create=="fu\
|
|
919
919
|
nction"&&typeof t.replace=="function"&&typeof t.patch=="function"&&typeof t.toJsonSchema=="function"?{types:t.types,validators:t.
|
|
@@ -928,11 +928,11 @@ s.addValidator=(i,a)=>{Pl(o,i,a)},s.use=i=>{bi(i,{addType:s.addType,addValidator
|
|
|
928
928
|
let a=Nl(r,o,i);return Oi({types:a.types,validators:a.validators,installCore:!1})},n&&bi(xi,{addType:(i,a)=>{rr.add(a),s.
|
|
929
929
|
addType(i,a)},addValidator:(i,a)=>{rr.add(a),s.addValidator(i,a)}}),s}var Q=Oi({installCore:!0});var K_=Object.freeze({schema:Q({}),mode:"replace"});var Ri=/^[a-z][a-z0-9_.-]*$/u,Dl=/^[A-Za-z_$][A-Za-z0-9_$]*$/u;function zl(t){return String(t||"").trim().toLowerCase()}
|
|
930
930
|
function Nn(t,e){let n=zl(t);if(!Ri.test(n))throw new TypeError(`${e} must match ${Ri.toString()}.`);return n}function kn(t,e){
|
|
931
|
-
if(t==null)return Object.freeze({});if(!
|
|
931
|
+
if(t==null)return Object.freeze({});if(!A(t))throw new TypeError(`${e} must be an object mapping local names to capabili\
|
|
932
932
|
ty ids.`);let n={},r=new Set;for(let[o,s]of Object.entries(t)){let i=String(o||"").trim();if(!Dl.test(i))throw new TypeError(
|
|
933
933
|
`${e} local name "${i}" must be a JavaScript identifier.`);let a=Nn(s,`${e}.${i}`);if(r.has(a))throw new TypeError(`${e}\
|
|
934
934
|
declares capability "${a}" more than once.`);r.add(a),n[i]=a}return Object.freeze(n)}function Ll(t,e,n){if(t==null)return Object.
|
|
935
|
-
freeze({});if(!
|
|
935
|
+
freeze({});if(!A(t))throw new TypeError(`${n}.hints must be an object mapping required capability ids to what to registe\
|
|
936
936
|
r.`);let r=new Set(Object.values(e)),o={};for(let[s,i]of Object.entries(t)){let a=Nn(s,`${n}.hints key`);if(!r.has(a))throw new TypeError(
|
|
937
937
|
`${n}.hints names "${a}", which the provider does not require.`);if(typeof i!="string"||!i.trim())throw new TypeError(`${n}\
|
|
938
938
|
.hints["${a}"] must be the text that says what to register.`);o[a]=i.trim()}return Object.freeze(o)}function Ul(t){let e=new Map;
|
|
@@ -948,20 +948,20 @@ is required.");if(typeof d!="function")throw new TypeError(`Bootstrap contributo
|
|
|
948
948
|
p))throw new Error(`Bootstrap contributor "${p}" is duplicated.`);return e.add(p),t.push(Object.freeze({id:p,order:Number.
|
|
949
949
|
isFinite(c)?Number(c):0,contribute:d})),i}async function o(a={}){n=!0;let c={},d=t.map((p,m)=>({entry:p,index:m})).sort(
|
|
950
950
|
(p,m)=>p.entry.order-m.entry.order||p.index-m.index).map(({entry:p})=>p);for(let p of d){let m=await p.contribute(Object.
|
|
951
|
-
freeze({...
|
|
951
|
+
freeze({...A(a)?a:{},payload:Object.freeze({...c})}));c={...c,...A(m)?m:{}}}return Object.freeze(c)}function s(){return Object.
|
|
952
952
|
freeze({sealed:n,contributorIds:Object.freeze(t.map(a=>a.id).sort())})}let i=Object.freeze({register:r,resolve:o,diagnostics:s});
|
|
953
953
|
return i}var ql=or({id:"runtime.bootstrap",requires:{http:"runtime.http"},provides:{bootstrap:"runtime.bootstrap"},setup({http:t}){
|
|
954
954
|
let e=Dn();return t.router.register("GET",ki,{auth:Pi,meta:{tags:["bootstrap"],summary:"Resolve app bootstrap payload"}},
|
|
955
|
-
async(n,r)=>{r.code(200).send(await e.resolve({request:n,reply:r,query:n.query||{}}))}),{bootstrap:e}}});function $l(t){if(!
|
|
955
|
+
async(n,r)=>{r.code(200).send(await e.resolve({request:n,reply:r,query:n.query||{}}))}),{bootstrap:e}}});function $l(t){if(!A(t))throw new TypeError("Event listener must be an object.");let e=String(t.id||"").trim();if(!e)throw new TypeError(
|
|
956
956
|
"Event listener id is required.");if(typeof t.handle!="function")throw new TypeError(`Event listener "${e}" requires han\
|
|
957
957
|
dle().`);if(t.matches!=null&&typeof t.matches!="function")throw new TypeError(`Event listener "${e}" matches must be a f\
|
|
958
|
-
unction when provided.`);return Object.freeze({id:e,handle:t.handle,matches:t.matches??null})}function Bl(t){if(!
|
|
958
|
+
unction when provided.`);return Object.freeze({id:e,handle:t.handle,matches:t.matches??null})}function Bl(t){if(!A(t))throw new TypeError(
|
|
959
959
|
"Published event must be an object.");let e=String(t.type||"").trim();if(!e)throw new TypeError("Published event type is\
|
|
960
960
|
required.");return Object.freeze({...t,type:e})}function zn(){let t=[],e=new Set;function n(i){let a=$l(i);if(e.has(a.id))
|
|
961
961
|
throw new Error(`Event listener "${a.id}" is duplicated.`);return e.add(a.id),t.push(a),s}async function r(i){let a=Bl(i);
|
|
962
962
|
for(let c of t)c.matches&&c.matches(a)!==!0||await c.handle(a);return a}function o(){return Object.freeze({listenerIds:Object.
|
|
963
963
|
freeze(t.map(i=>i.id))})}let s=Object.freeze({register:n,publish:r,diagnostics:o});return s}var Hl=or({id:"runtime.events",provides:{events:"runtime.events"},setup(){return{events:zn()}}});function Ce(t,e=new WeakSet){if(!t||typeof t!="object"||e.has(t))return t;e.add(t);for(let n of Object.getOwnPropertyNames(
|
|
964
|
-
t))Ce(t[n],e);return Object.freeze(t)}var
|
|
964
|
+
t))Ce(t[n],e);return Object.freeze(t)}var UA=Object.freeze({REQUIRED:{messageKey:"required",code:"kernel.validation.field.required"},TYPE_CAST_FAILED:{messageKey:"\
|
|
965
965
|
default",code:"kernel.validation.field.typeCastFailed"},NOT_NULLABLE:{messageKey:"default",code:"kernel.validation.field\
|
|
966
966
|
.notNullable"},MIN_LENGTH:{messageKey:"minLength",code:"kernel.validation.field.minLength"},MAX_LENGTH:{messageKey:"maxL\
|
|
967
967
|
ength",code:"kernel.validation.field.maxLength"},MIN_ITEMS:{messageKey:"minItems",code:"kernel.validation.field.minItems"},
|
|
@@ -971,10 +971,10 @@ code:"kernel.validation.field.pattern"},ENUM_VALUE:{messageKey:"enum",code:"kern
|
|
|
971
971
|
messageKey:"additionalProperties",code:"kernel.validation.field.notAllowed"},CUSTOM_VALIDATOR_FAILED:{messageKey:"valida\
|
|
972
972
|
tor",code:""},STRICT_BOOLEAN:{messageKey:"default",code:"kernel.validation.field.strictBoolean"},RANGE_EXCEEDED:{messageKey:"\
|
|
973
973
|
default",code:"kernel.validation.field.rangeExceeded"},NOT_EMPTY:{messageKey:"default",code:"kernel.validation.field.not\
|
|
974
|
-
Empty"}}),
|
|
974
|
+
Empty"}}),FA=Object.freeze({code:"kernel.validation.invalid",message:"Invalid value."}),qA=Object.freeze(["create","repl\
|
|
975
975
|
ace","patch","toJsonSchema"]);var Kl=Q({cursor:{type:"id",required:!1},limit:{type:"number",required:!1,min:1,unsigned:!0}}),Jl=Object.freeze({schema:Kl,
|
|
976
976
|
mode:"patch"});var Ni=Object.freeze({type:"string",pattern:"^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d)?$",minLength:5}),Xl=Object.freeze(
|
|
977
|
-
{...Ni,nullable:!0});var
|
|
977
|
+
{...Ni,nullable:!0});var pE=new Map([{keyword:"required",code:"kernel.validation.required"},{keyword:"type",code:"kernel.validation.type"},{keyword:"\
|
|
978
978
|
minLength",code:"kernel.validation.minLength"},{keyword:"maxLength",code:"kernel.validation.maxLength"},{keyword:"minimu\
|
|
979
979
|
m",code:"kernel.validation.minimum"},{keyword:"maximum",code:"kernel.validation.maximum"},{keyword:"exclusiveMinimum",code:"\
|
|
980
980
|
kernel.validation.exclusiveMinimum"},{keyword:"exclusiveMaximum",code:"kernel.validation.exclusiveMaximum"},{keyword:"mu\
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibe64",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.63",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Run Vibe64 against the current project.",
|
|
6
6
|
"type": "module",
|
|
@@ -53,16 +53,16 @@
|
|
|
53
53
|
"@fastify/static": "10.1.4",
|
|
54
54
|
"@fastify/websocket": "11.3.1",
|
|
55
55
|
"@jskit-ai/agent": "0.1.3",
|
|
56
|
-
"@jskit-ai/assistant-core": "0.2.
|
|
57
|
-
"@jskit-ai/assistant-runtime": "0.2.
|
|
58
|
-
"@jskit-ai/assistant-voice": "0.2.
|
|
56
|
+
"@jskit-ai/assistant-core": "0.2.44",
|
|
57
|
+
"@jskit-ai/assistant-runtime": "0.2.46",
|
|
58
|
+
"@jskit-ai/assistant-voice": "0.2.46",
|
|
59
59
|
"@jskit-ai/connector-google-calendar": "0.2.28",
|
|
60
60
|
"@jskit-ai/connectors-catalog": "0.2.28",
|
|
61
61
|
"@jskit-ai/connectors-core": "0.2.28",
|
|
62
62
|
"@jskit-ai/http-runtime": "0.2.20",
|
|
63
63
|
"@jskit-ai/kernel": "0.2.20",
|
|
64
64
|
"@jskit-ai/payments-core": "0.2.16",
|
|
65
|
-
"@jskit-ai/realtime": "0.2.
|
|
65
|
+
"@jskit-ai/realtime": "0.2.30",
|
|
66
66
|
"@jskit-ai/resource-core": "0.1.211",
|
|
67
67
|
"@jskit-ai/uploads-runtime": "0.2.20",
|
|
68
68
|
"@local/current-app": "0.1.0",
|