alchemylab-opencode 1.0.21 → 1.0.22
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/{chunk-T7EXROHP.js → chunk-2ANK3QEN.js} +1 -1
- package/dist/chunk-5FGJUXLI.js +2260 -0
- package/dist/{chunk-DBKYWUEM.js → chunk-735MVPNG.js} +1 -1
- package/dist/{chunk-A4S3BYGY.js → chunk-CZVKIDQZ.js} +1 -1
- package/dist/{chunk-N2IDMOID.js → chunk-TECR6KUK.js} +1 -1
- package/dist/chunk-WF7L36SZ.js +75 -0
- package/dist/{chunk-ABCQLKMJ.js → chunk-X7PHY2B3.js} +1 -1
- package/dist/{chunk-XREX5MYM.js → chunk-YRY5Y3QL.js} +1 -1
- package/dist/{default-u_dwuiYb-5QQ4GXMV.js → default-u_dwuiYb-652AQZKX.js} +1 -1
- package/dist/{effect-QlVUlMFu-ORZ7TVO5.js → effect-QlVUlMFu-JVYEXAZL.js} +1 -1
- package/dist/{mcp-BCTN55WE.js → mcp-JSKIR2KQ.js} +1 -1
- package/dist/{registry-MRPMZCK4.js → registry-REVWYAGR.js} +1 -1
- package/dist/{run-O75PTUSN.js → run-CPHBVDZ4.js} +1 -1
- package/dist/run.js +1 -1
- package/dist/serve.js +1 -1
- package/dist/{server-QXCNOJQJ.js → server-VHCQ5HOC.js} +1 -1
- package/dist/{session-OLERO43H.js → session-5BXSPMPJ.js} +1 -1
- package/dist/{share-next-7PZI7GKT.js → share-next-GSWCSZSC.js} +1 -1
- package/dist/{sury-CWZTCd75-IXNCX752.js → sury-CWZTCd75-3YHH6KVI.js} +1 -1
- package/dist/{valibot--1zFm7rT-SSCP4J5I.js → valibot--1zFm7rT-FSYJNYJ6.js} +1 -1
- package/dist/{valibot-D_HTw1Gn-KPCJMJMC.js → valibot-D_HTw1Gn-E5NKVIOV.js} +1 -1
- package/dist/{worktree-43SDNYPU.js → worktree-HPW4CL36.js} +1 -1
- package/dist/{zod-Bwrt9trS-BYLM45IZ.js → zod-Bwrt9trS-HVDOFWRP.js} +1 -1
- package/dist/{zod-DSgpEGAE-T3VJY2W3.js → zod-DSgpEGAE-DSH6V7MG.js} +1 -1
- package/package.json +1 -1
- package/dist/chunk-5MPKKAWG.js +0 -2215
- package/dist/chunk-CMU5MV6S.js +0 -75
- /package/dist/{arktype-aI7TBD0R-ETU7X65Q.js → arktype-aI7TBD0R-TFNARRIP.js} +0 -0
- /package/dist/{chunk-T6MY2WE4.js → chunk-FXLFZ5DL.js} +0 -0
- /package/dist/{chunk-BGADAZN4.js → chunk-PWFRMDDF.js} +0 -0
- /package/dist/{typebox-Dei93FPO-K67WT2FO.js → typebox-Dei93FPO-GLI7OCTY.js} +0 -0
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{F as D,a as z,b as V,h as q,k as C}from"./chunk-
|
|
12
|
+
import{F as D,a as z,b as V,h as q,k as C}from"./chunk-5FGJUXLI.js";import{D as N,n as w,q as A}from"./chunk-WF7L36SZ.js";import{B as J,h as S,j as O,k as b,l as B,n as F}from"./chunk-N7PLTD3P.js";import{e as K}from"./chunk-M4CB72HE.js";import{a as c}from"./chunk-MBZTOEAD.js";import{Effect as t,Exit as de,Layer as u,Option as j,Schema as k,Scope as G,ServiceMap as pe,Stream as fe}from"effect";import{FetchHttpClient as le,HttpClient as Q,HttpClientRequest as p,HttpClientResponse as ue}from"effect/unstable/http";import{sqliteTable as ce,text as I}from"drizzle-orm/sqlite-core";var l=ce("session_share",{session_id:I().primaryKey().references(()=>F.id,{onDelete:"cascade"}),id:I().notNull(),secret:I().notNull(),url:I().notNull(),...B});var ye;(x=>{let f=K.create({service:"share-next"}),y=process.env.OPENCODE_DISABLE_SHARE==="true"||process.env.OPENCODE_DISABLE_SHARE==="1",W=k.Struct({id:k.String,url:k.String,secret:k.String});class _ extends pe.Service()("@opencode/ShareNext"){static{c(this,"Service")}}x.Service=_;let $=c(i=>t.sync(()=>O.use(i)),"db");function U(i){return{create:`/api/${i}`,sync:c(d=>`/api/${i}/${d}/sync`,"sync"),remove:c(d=>`/api/${i}/${d}`,"remove"),data:c(d=>`/api/${i}/${d}/data`,"data")}}c(U,"api");let X=U("share"),Y=U("shares");function R(i){switch(i.type){case"session":return"session";case"message":return`message/${i.data.id}`;case"part":return`part/${i.data.messageID}/${i.data.id}`;case"session_diff":return"session_diff";case"model":return"model"}}c(R,"key"),x.layer=u.effect(_,t.gen(function*(){let i=yield*A.Service,d=yield*w.Service,te=yield*N.Service,H=yield*Q.HttpClient,L=Q.filterStatusOk(H),P=yield*C.Service,M=yield*D.Service;function m(e,s){return t.gen(function*(){if(y)return;let n=yield*S.get(E),r=n.queue.get(e);if(r){for(let a of s)r.data.set(R(a),a);return}let o=new Map(s.map(a=>[R(a),a]));n.queue.set(e,{data:o}),yield*re(e).pipe(t.delay(1e3),t.catchCause(a=>t.sync(()=>{f.error("share flush failed",{sessionID:e,cause:a})})),t.forkIn(n.scope))})}c(m,"sync");let E=yield*S.make(t.fn("ShareNext.state")(function*(e){let s={queue:new Map,scope:yield*G.make()};if(yield*t.addFinalizer(()=>G.close(s.scope,de.void).pipe(t.andThen(t.sync(()=>{s.queue.clear()})))),y)return s;let n=c((r,o)=>d.subscribe(r).pipe(fe.runForEach(a=>o(a).pipe(t.catchCause(v=>t.sync(()=>{f.error("share subscriber failed",{type:r.type,cause:v})})))),t.forkScoped),"watch");return yield*n(D.Event.Updated,r=>t.gen(function*(){let o=yield*M.get(r.properties.sessionID);yield*m(o.id,[{type:"session",data:o}])})),yield*n(q.Event.Updated,r=>t.gen(function*(){let o=r.properties.info;if(yield*m(o.sessionID,[{type:"message",data:o}]),o.role!=="user")return;let a=yield*P.getModel(o.model.providerID,o.model.modelID);yield*m(o.sessionID,[{type:"model",data:[a]}])})),yield*n(q.Event.PartUpdated,r=>m(r.properties.part.sessionID,[{type:"part",data:r.properties.part}])),yield*n(D.Event.Diff,r=>m(r.properties.sessionID,[{type:"session_diff",data:r.properties.diff}])),s})),h=t.fn("ShareNext.request")(function*(){let e={},s=yield*i.active();if(j.isNone(s)||!s.value.active_org_id){let r=(yield*te.get()).enterprise?.url??"https://opncd.ai";return{headers:e,api:X,baseUrl:r}}let n=yield*i.token(s.value.id);if(j.isNone(n))throw new Error("No active account token available for sharing");return e.authorization=`Bearer ${n.value}`,e["x-org-id"]=s.value.active_org_id,{headers:e,api:Y,baseUrl:s.value.url}}),T=t.fnUntraced(function*(e){let s=yield*$(n=>n.select().from(l).where((0,b.eq)(l.session_id,e)).get());if(s)return{id:s.id,secret:s.secret,url:s.url}}),re=t.fn("ShareNext.flush")(function*(e){if(y)return;let s=yield*S.get(E),n=s.queue.get(e);if(!n)return;s.queue.delete(e);let r=yield*T(e);if(!r)return;let o=yield*h(),a=yield*p.post(`${o.baseUrl}${o.api.sync(r.id)}`).pipe(p.setHeaders(o.headers),p.bodyJson({secret:r.secret,data:Array.from(n.data.values())}),t.flatMap(v=>H.execute(v)));a.status>=400&&f.warn("failed to sync share",{sessionID:e,shareID:r.id,status:a.status})}),se=t.fn("ShareNext.full")(function*(e){f.info("full sync",{sessionID:e});let s=yield*M.get(e),n=yield*M.diff(e),r=yield*t.sync(()=>Array.from(q.stream(e))),o=yield*t.forEach(Array.from(new Map(r.filter(a=>a.info.role==="user").map(a=>a.info.model).map(a=>[`${a.providerID}/${a.modelID}`,a])).values()),a=>P.getModel(z.make(a.providerID),V.make(a.modelID)),{concurrency:8});yield*m(e,[{type:"session",data:s},...r.map(a=>({type:"message",data:a.info})),...r.flatMap(a=>a.parts.map(v=>({type:"part",data:v}))),{type:"session_diff",data:n},{type:"model",data:o}])}),ne=t.fn("ShareNext.init")(function*(){y||(yield*S.get(E))}),ae=t.fn("ShareNext.url")(function*(){return(yield*h()).baseUrl}),ie=t.fn("ShareNext.create")(function*(e){if(y)return{id:"",url:"",secret:""};f.info("creating share",{sessionID:e});let s=yield*h(),n=yield*p.post(`${s.baseUrl}${s.api.create}`).pipe(p.setHeaders(s.headers),p.bodyJson({sessionID:e}),t.flatMap(o=>L.execute(o)),t.flatMap(ue.schemaBodyJson(W)));yield*$(o=>o.insert(l).values({session_id:e,id:n.id,secret:n.secret,url:n.url}).onConflictDoUpdate({target:l.session_id,set:{id:n.id,secret:n.secret,url:n.url}}).run());let r=yield*S.get(E);return yield*se(e).pipe(t.catchCause(o=>t.sync(()=>{f.error("share full sync failed",{sessionID:e,cause:o})})),t.forkIn(r.scope)),n}),oe=t.fn("ShareNext.remove")(function*(e){if(y)return;f.info("removing share",{sessionID:e});let s=yield*T(e);if(!s)return;let n=yield*h();yield*p.delete(`${n.baseUrl}${n.api.remove(s.id)}`).pipe(p.setHeaders(n.headers),p.bodyJson({secret:s.secret}),t.flatMap(r=>L.execute(r))),yield*$(r=>r.delete(l).where((0,b.eq)(l.session_id,e)).run())});return _.of({init:ne,url:ae,request:h,create:ie,remove:oe})})),x.defaultLayer=x.layer.pipe(u.provide(w.layer),u.provide(A.defaultLayer),u.provide(N.defaultLayer),u.provide(le.layer),u.provide(C.defaultLayer),u.provide(D.defaultLayer));let{runPromise:g}=J(_,x.defaultLayer);async function me(){return g(i=>i.init())}x.init=me,c(me,"init");async function Se(){return g(i=>i.url())}x.url=Se,c(Se,"url");async function ge(){return g(i=>i.request())}x.request=ge,c(ge,"request");async function he(i){return g(d=>d.create(i))}x.create=he,c(he,"create");async function ve(i){return g(d=>d.remove(i))}x.remove=ve,c(ve,"remove")})(ye||={});export{ye as a};
|
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{a as t}from"./chunk-
|
|
12
|
+
import{a as t}from"./chunk-FXLFZ5DL.js";import{b as n}from"./chunk-CZVKIDQZ.js";import{a as e}from"./chunk-MBZTOEAD.js";function p(){return async(a,o)=>t(await n(a,o.options),o)}e(p,"getToOpenAPISchemaFn");export{p as a};
|
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{a}from"./chunk-
|
|
12
|
+
import{a}from"./chunk-YRY5Y3QL.js";import"./chunk-FXLFZ5DL.js";import"./chunk-PWFRMDDF.js";import"./chunk-CZVKIDQZ.js";import"./chunk-MBZTOEAD.js";export{a as default};
|
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{a as e}from"./chunk-
|
|
12
|
+
import{a as e}from"./chunk-CZVKIDQZ.js";import{a as t}from"./chunk-MBZTOEAD.js";async function a(){try{let{JSONSchema:r}=await import("effect");return n=>r.make(n)}catch{throw new e("effect")}}t(a,"getToJsonSchemaFn");export{a as default};
|
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{C as a}from"./chunk-
|
|
12
|
+
import{C as a}from"./chunk-WF7L36SZ.js";import"./chunk-N7PLTD3P.js";import"./chunk-7KKA6WBY.js";import"./chunk-LTCXIXYM.js";import"./chunk-M4CB72HE.js";import"./chunk-MBZTOEAD.js";export{a as MCP};
|
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{A as a}from"./chunk-
|
|
12
|
+
import{A as a}from"./chunk-5FGJUXLI.js";import"./chunk-WF7L36SZ.js";import"./chunk-N7PLTD3P.js";import"./chunk-7KKA6WBY.js";import"./chunk-LTCXIXYM.js";import"./chunk-M4CB72HE.js";import"./chunk-MBZTOEAD.js";export{a as ToolRegistry};
|
|
@@ -9,7 +9,7 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{a as He}from"./chunk-
|
|
12
|
+
import{a as He}from"./chunk-TECR6KUK.js";import{b as Xe}from"./chunk-735MVPNG.js";import"./chunk-X7PHY2B3.js";import"./chunk-2ANK3QEN.js";import"./chunk-PWFRMDDF.js";import{k as Ge,o as Be}from"./chunk-5FGJUXLI.js";import"./chunk-WF7L36SZ.js";import{d as Fe,e as We,z as V}from"./chunk-N7PLTD3P.js";import"./chunk-7KKA6WBY.js";import"./chunk-LTCXIXYM.js";import{c as H}from"./chunk-M4CB72HE.js";import"./chunk-CZVKIDQZ.js";import{a as s,b as lr}from"./chunk-MBZTOEAD.js";import B from"path";import{pathToFileURL as Sr}from"url";import ur from"zod";import{EOL as J}from"os";var Q={left:[" ","\u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2584","\u2588__\u2588 \u2588__\u2588 \u2588^^^ \u2588__\u2588","\u2580\u2580\u2580\u2580 \u2588\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580~~\u2580"],right:[" \u2584 ","\u2588\u2580\u2580\u2580 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588","\u2588___ \u2588__\u2588 \u2588__\u2588 \u2588^^^","\u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580"]};var f;(c=>{let n=["\u2800 \u2584 ","\u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2584 \u2588\u2580\u2580\u2580 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588","\u2588 \u2588 \u2588 \u2588 \u2588\u2580\u2580\u2580 \u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2580\u2580\u2580","\u2580\u2580\u2580\u2580 \u2588\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580 \u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580"];c.CancelledError=Fe.create("UICancelledError",ur.void()),c.Style={TEXT_HIGHLIGHT:"\x1B[96m",TEXT_HIGHLIGHT_BOLD:"\x1B[96m\x1B[1m",TEXT_DIM:"\x1B[90m",TEXT_DIM_BOLD:"\x1B[90m\x1B[1m",TEXT_NORMAL:"\x1B[0m",TEXT_NORMAL_BOLD:"\x1B[1m",TEXT_WARNING:"\x1B[93m",TEXT_WARNING_BOLD:"\x1B[93m\x1B[1m",TEXT_DANGER:"\x1B[91m",TEXT_DANGER_BOLD:"\x1B[91m\x1B[1m",TEXT_SUCCESS:"\x1B[92m",TEXT_SUCCESS_BOLD:"\x1B[92m\x1B[1m",TEXT_INFO:"\x1B[94m",TEXT_INFO_BOLD:"\x1B[94m\x1B[1m"};function t(...h){a(...h),process.stderr.write(J)}c.println=t,s(t,"println");function a(...h){u=!1,process.stderr.write(h.join(" "))}c.print=a,s(a,"print");let u=!1;function d(){u||(t(""+c.Style.TEXT_NORMAL),u=!0)}c.empty=d,s(d,"empty");function l(h){if(!process.stdout.isTTY&&!process.stderr.isTTY){let p=[];for(let T of n)h&&p.push(h),p.push(T),p.push(J);return p.join("").trimEnd()}let w=[],v="\x1B[0m",b={fg:"\x1B[90m",shadow:"\x1B[38;5;235m",bg:"\x1B[48;5;235m"},O={fg:v,shadow:"\x1B[38;5;238m",bg:"\x1B[48;5;238m"},g=" ",E=s((p,T,R,S)=>{let x=[];for(let D of p){if(D==="_"){x.push(S," ",v);continue}if(D==="^"){x.push(T,S,"\u2580",v);continue}if(D==="~"){x.push(R,"\u2580",v);continue}if(D===" "){x.push(" ");continue}x.push(T,D,v)}return x.join("")},"draw");return Q.left.forEach((p,T)=>{h&&w.push(h),w.push(E(p,b.fg,b.shadow,b.bg)),w.push(g);let R=Q.right[T]??"";w.push(E(R,O.fg,O.shadow,O.bg)),w.push(J)}),w.join("").trimEnd()}c.logo=l,s(l,"logo");async function m(h){let v=lr("readline").createInterface({input:process.stdin,output:process.stdout});return new Promise(b=>{v.question(h,O=>{v.close(),b(O.trim())})})}c.input=m,s(m,"input");function y(h){h.startsWith("Error: ")&&(h=h.slice(7)),t(c.Style.TEXT_DANGER_BOLD+"Error: "+c.Style.TEXT_NORMAL+h)}c.error=y,s(y,"error");function o(h){return h}c.markdown=o,s(o,"markdown")})(f||={});async function Ve(n,r){return V.provide({directory:n,init:Xe,fn:s(async()=>{try{return await r()}finally{await V.dispose()}},"fn")})}s(Ve,"bootstrap");import{EOL as G}from"os";var Qe=s(({onRequest:n,onSseError:r,onSseEvent:e,responseTransformer:t,responseValidator:a,sseDefaultRetryDelay:u,sseMaxRetryAttempts:d,sseMaxRetryDelay:l,sseSleepFn:m,url:y,...o})=>{let c,h=m??(b=>new Promise(O=>setTimeout(O,b)));return{stream:s(async function*(){let b=u??3e3,O=0,g=o.signal??new AbortController().signal;for(;!g.aborted;){O++;let E=o.headers instanceof Headers?o.headers:new Headers(o.headers);c!==void 0&&E.set("Last-Event-ID",c);try{let p={redirect:"follow",...o,body:o.serializedBody,headers:E,signal:g},T=new Request(y,p);n&&(T=await n(y,p));let S=await(o.fetch??globalThis.fetch)(T);if(!S.ok)throw new Error(`SSE failed: ${S.status} ${S.statusText}`);if(!S.body)throw new Error("No body in SSE response");let x=S.body.pipeThrough(new TextDecoderStream).getReader(),D="",Me=s(()=>{try{x.cancel()}catch{}},"abortHandler");g.addEventListener("abort",Me);try{for(;;){let{done:ir,value:ar}=await x.read();if(ir)break;D+=ar,D=D.replace(/\r\n/g,`
|
|
13
13
|
`).replace(/\r/g,`
|
|
14
14
|
`);let $e=D.split(`
|
|
15
15
|
|
package/dist/run.js
CHANGED
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{homedir as o}from"node:os";import{join as a}from"node:path";var t=a(o(),".alchemy_lab","opencode");process.env.OPENCODE_DATA_DIR=process.env.OPENCODE_DATA_DIR||t;var{RunCommand:r}=await import("./run-
|
|
12
|
+
import{homedir as o}from"node:os";import{join as a}from"node:path";var t=a(o(),".alchemy_lab","opencode");process.env.OPENCODE_DATA_DIR=process.env.OPENCODE_DATA_DIR||t;var{RunCommand:r}=await import("./run-CPHBVDZ4.js"),e=(await import("yargs")).default,{hideBin:i}=await import("yargs/helpers");e(i(process.argv)).command(r).strict().help().parse();
|
package/dist/serve.js
CHANGED
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{a as s}from"./chunk-MBZTOEAD.js";import{Agent as i,setGlobalDispatcher as c}from"undici";import{homedir as p}from"node:os";import{join as l}from"node:path";c(new i({connect:{keepAlive:!0,keepAliveInitialDelay:5e3},headersTimeout:0,bodyTimeout:0}));function o(e,t){let r=process.argv.indexOf(`--${e}`);return r!==-1&&process.argv[r+1]?process.argv[r+1]:t}s(o,"arg");var m=l(p(),".alchemy_lab","opencode"),d=o("data-dir",m);process.env.OPENCODE_DATA_DIR=d;var{Log:a}=await import("./log-MVJ7H4K5.js"),v=o("log-level","INFO").toUpperCase(),n=a.Level.safeParse(v);a.init({print:!0,level:n.success?n.data:"INFO"});var{Server:g}=await import("./server-
|
|
12
|
+
import{a as s}from"./chunk-MBZTOEAD.js";import{Agent as i,setGlobalDispatcher as c}from"undici";import{homedir as p}from"node:os";import{join as l}from"node:path";c(new i({connect:{keepAlive:!0,keepAliveInitialDelay:5e3},headersTimeout:0,bodyTimeout:0}));function o(e,t){let r=process.argv.indexOf(`--${e}`);return r!==-1&&process.argv[r+1]?process.argv[r+1]:t}s(o,"arg");var m=l(p(),".alchemy_lab","opencode"),d=o("data-dir",m);process.env.OPENCODE_DATA_DIR=d;var{Log:a}=await import("./log-MVJ7H4K5.js"),v=o("log-level","INFO").toUpperCase(),n=a.Level.safeParse(v);a.init({print:!0,level:n.success?n.data:"INFO"});var{Server:g}=await import("./server-VHCQ5HOC.js"),u=parseInt(o("port","4096"),10),h=o("hostname","127.0.0.1");try{let e=await g.listen({port:u,hostname:h});console.log(`opencode server listening on http://${e.hostname}:${e.port}`);let t=s(async()=>{await e.stop(!0),process.exit(0)},"shutdown");process.on("SIGINT",t),process.on("SIGTERM",t),await new Promise(()=>{})}catch(e){console.error("Failed to start server:",e),process.exit(1)}
|
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{a}from"./chunk-
|
|
12
|
+
import{a}from"./chunk-TECR6KUK.js";import"./chunk-735MVPNG.js";import"./chunk-X7PHY2B3.js";import"./chunk-2ANK3QEN.js";import"./chunk-PWFRMDDF.js";import"./chunk-5FGJUXLI.js";import"./chunk-WF7L36SZ.js";import"./chunk-N7PLTD3P.js";import"./chunk-7KKA6WBY.js";import"./chunk-LTCXIXYM.js";import"./chunk-M4CB72HE.js";import"./chunk-CZVKIDQZ.js";import"./chunk-MBZTOEAD.js";export{a as Server};
|
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{F as a}from"./chunk-
|
|
12
|
+
import{F as a}from"./chunk-5FGJUXLI.js";import"./chunk-WF7L36SZ.js";import"./chunk-N7PLTD3P.js";import"./chunk-7KKA6WBY.js";import"./chunk-LTCXIXYM.js";import"./chunk-M4CB72HE.js";import"./chunk-MBZTOEAD.js";export{a as Session};
|
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{a}from"./chunk-
|
|
12
|
+
import{a}from"./chunk-X7PHY2B3.js";import"./chunk-5FGJUXLI.js";import"./chunk-WF7L36SZ.js";import"./chunk-N7PLTD3P.js";import"./chunk-7KKA6WBY.js";import"./chunk-LTCXIXYM.js";import"./chunk-M4CB72HE.js";import"./chunk-MBZTOEAD.js";export{a as ShareNext};
|
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{a as r}from"./chunk-
|
|
12
|
+
import{a as r}from"./chunk-CZVKIDQZ.js";import{a as t}from"./chunk-MBZTOEAD.js";async function e(){try{let{toJSONSchema:o}=await import("sury");return o}catch{throw new r("sury")}}t(e,"getToJsonSchemaFn");export{e as default};
|
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{a as t}from"./chunk-
|
|
12
|
+
import{a as t}from"./chunk-CZVKIDQZ.js";import{a as o}from"./chunk-MBZTOEAD.js";async function a(){try{let{toJsonSchema:n}=await import("@valibot/to-json-schema");return n}catch{throw new t("@valibot/to-json-schema")}}o(a,"getToJsonSchemaFn");export{a as default};
|
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{a as t}from"./chunk-
|
|
12
|
+
import{a as t}from"./chunk-FXLFZ5DL.js";import"./chunk-PWFRMDDF.js";import{b as s}from"./chunk-CZVKIDQZ.js";import{a as o}from"./chunk-MBZTOEAD.js";function h(){return async(p,m)=>{let n=await s(p,{errorMode:"ignore",overrideAction:o(({valibotAction:r,jsonSchema:c})=>{let a=t(c,m);if(r.kind==="metadata"&&r.type==="metadata"&&!("$ref"in a)){let e=r.metadata;if(e.example!==void 0&&(a.example=e.example),e.examples&&e.examples.length>0&&(a.examples=e.examples),e.ref)return m.components.schemas={...m.components.schemas,[e.ref]:a},{$ref:`#/components/schemas/${e.ref}`}}return a},"overrideAction"),...m.options});return"$schema"in n&&delete n.$schema,n}}o(h,"getToOpenAPISchemaFn");export{h as default};
|
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{c as n,d as o}from"./chunk-
|
|
12
|
+
import{c as n,d as o}from"./chunk-735MVPNG.js";import"./chunk-X7PHY2B3.js";import"./chunk-5FGJUXLI.js";import"./chunk-WF7L36SZ.js";import"./chunk-N7PLTD3P.js";import"./chunk-7KKA6WBY.js";import"./chunk-LTCXIXYM.js";import"./chunk-M4CB72HE.js";import"./chunk-MBZTOEAD.js";var t=o.extend({name:o.shape.name.unwrap(),branch:o.shape.branch.unwrap(),directory:o.shape.directory.unwrap()}),i={async configure(e){let r=await n.makeWorktreeInfo(e.name??void 0);return{...e,name:r.name,branch:r.branch,directory:r.directory}},async create(e){let r=t.parse(e);await n.createFromInfo({name:r.name,directory:r.directory,branch:r.branch})},async remove(e){let r=t.parse(e);await n.remove({directory:r.directory})},target(e){return{type:"local",directory:t.parse(e).directory}}};export{i as WorktreeAdaptor};
|
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{a as t}from"./chunk-
|
|
12
|
+
import{a as t}from"./chunk-CZVKIDQZ.js";import{a as n}from"./chunk-MBZTOEAD.js";var c=new t("zod v4");async function d(){return async(r,e)=>{let o;if("_zod"in r)try{o=(await import("zod/v4/core")).toJSONSchema}catch{throw c}else try{o=(await import("zod-to-json-schema")).zodToJsonSchema}catch{throw new t("zod-to-json-schema")}return o(r,e)}}n(d,"getToJsonSchemaFn");export{d as default};
|
|
@@ -9,4 +9,4 @@ if (typeof globalThis.Bun === 'undefined') {
|
|
|
9
9
|
if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
|
|
10
10
|
if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
|
|
11
11
|
|
|
12
|
-
import{a as s}from"./chunk-
|
|
12
|
+
import{a as s}from"./chunk-2ANK3QEN.js";import{a as p}from"./chunk-YRY5Y3QL.js";import"./chunk-FXLFZ5DL.js";import"./chunk-PWFRMDDF.js";import"./chunk-CZVKIDQZ.js";import{a as r}from"./chunk-MBZTOEAD.js";function u(){return async(e,o)=>{if("_zod"in e)return p()(e,{components:o.components,options:{io:"input",...o.options}});try{let{createSchema:t}=await import("zod-openapi"),{schema:i,components:n}=t(e,{schemaType:"input",...o.options});return n&&(o.components.schemas={...o.components.schemas,...n}),i}catch{throw new Error(s('Missing dependencies "zod-openapi v4".'))}}}r(u,"getToOpenAPISchemaFn");export{u as default};
|