@cortexkit/opencode-anthropic-auth 2.7.3 → 2.8.0
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/fable-fallback.d.ts +1 -1
- package/dist/{index-eq1kbq5z.js → index-h508mdrx.js} +1 -1
- package/dist/{index-r16saahs.js → index-m901y2pg.js} +23 -23
- package/dist/index-pxnn7mg1.js +2 -0
- package/dist/index.js +1 -1
- package/dist/sidebar-state.d.ts +1 -1
- package/dist/sidebar-state.js +1 -1
- package/dist/transform.d.ts +3 -1
- package/dist/v2/models.d.ts +2 -1
- package/dist/v2/server.js +6 -6
- package/dist/v2/tui.js +1 -1
- package/package.json +2 -2
- package/src/sidebar-state.ts +4 -1
- package/src/tui-compiled/sidebar-state.ts +4 -1
- package/dist/index-d4e8qj37.js +0 -2
package/dist/fable-fallback.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export type FableFallbackPlan = {
|
|
|
57
57
|
/**
|
|
58
58
|
* Models whose content-filter refusal we recover from by downgrading to Opus 4.8
|
|
59
59
|
* for a bounded window: capability rows with a `refusalRecoveryFamily` (Fable 5,
|
|
60
|
-
* Fable 5.1, Opus 5 and Opus 5.5). Each has a separate source family because
|
|
60
|
+
* Fable 5.1, Fable 5.2, Opus 5 and Opus 5.5). Each has a separate source family because
|
|
61
61
|
* recovery state must not cross-contaminate distinct requested models. All use
|
|
62
62
|
* Anthropic's `claude-opus-4-8` fallback for the same classifier refusal shape
|
|
63
63
|
* and recovery period. Mythos has no classifiers and Sonnet 5 is not flagged —
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M}from"./index-
|
|
1
|
+
import{M}from"./index-pxnn7mg1.js";import{logger as R}from"@cortexkit/anthropic-auth-core";var K=(f)=>f!==null&&typeof f==="object"&&!Array.isArray(f),X=(f)=>K(f)&&typeof f.sessionId==="string"&&f.sessionId.length>0,U=(f)=>{if(!X(f)||!K(f)||f.command!=="claude"||typeof f.sectionId!=="string"||typeof f.actionId!=="string")return!1;if(f.itemId!==void 0&&typeof f.itemId!=="string")return!1;if(f.confirmed!==void 0&&typeof f.confirmed!=="boolean")return!1;if(f.values!==void 0&&(!K(f.values)||!Object.values(f.values).every((j)=>j===null||typeof j==="string"||typeof j==="boolean"||typeof j==="number"&&Number.isFinite(j))))return!1;return!0};function H(f){return{"~standard":{version:1,vendor:"cortexkit-native",validate:(j)=>f(j)?{value:j}:{issues:[{message:"Invalid native menu payload"}]}}}}var A=(f)=>K(f)&&f.command==="claude"&&K(f.menu)&&f.menu.command==="claude"&&typeof f.menu.title==="string"&&Array.isArray(f.menu.sections),V=(f)=>K(f)&&f.command==="claude"&&typeof f.ok==="boolean"&&typeof f.text==="string"&&(f.authorizationUrl===void 0||typeof f.authorizationUrl==="string")&&K(f.menu)&&Array.isArray(f.menu.sections),L=!1,$=(f,j,B=new Set)=>{if(f===null||typeof f==="string"||typeof f==="boolean")return f;if(typeof f==="number"&&Number.isFinite(f))return f;if(typeof f==="object"&&f!==null&&!B.has(f)){if(B.add(f),Array.isArray(f)){let Q=Array.from(f,(D,G)=>$(D,`${j}[${G}]`,B)??null);return B.delete(f),Q}if(Object.getPrototypeOf(f)===Object.prototype||Object.getPrototypeOf(f)===null){let Q=Object.fromEntries(Object.entries(f).flatMap(([D,G])=>{let W=$(G,`${j}.${D}`,B);return W===void 0?[]:[[D,W]]}));return B.delete(f),Q}B.delete(f)}if(!L)L=!0,R.warn("sidebar","Dropped non-JSON sidebar field",{path:j});return},E={"~standard":{version:1,vendor:"cortexkit-native",validate:(f)=>{let j=M(f);return{value:$(j,"sidebar")}}}},F={id:"cortexkit-anthropic-native",methods:{open:{input:H(X),output:H(A)},apply:{input:H(U),output:H(V)},sidebar:{input:H(X),output:E}},events:{opened:{schema:H((f)=>X(f)&&A(f.payload))},notification:{schema:H((f)=>X(f)&&typeof f.message==="string"&&["info","warning","error"].includes(String(f.kind)))}}};async function T(f,j,B){let Q=new AbortController,D=(q)=>({sessionId:q,notify(Y,Z="info"){G.events.emit("notification",{sessionId:q,message:Y,kind:Z}).catch(()=>{})}}),G=await f.rpc.register(F,{open:(q)=>j.open(D(q.sessionId)),apply:(q)=>j.apply(q,D(q.sessionId)),sidebar:(q)=>B.readSidebar(q.sessionId)}),W;try{W=await f.command.transform((q)=>q.add({name:"claude",description:"Native Claude accounts and settings",async execute(Y){let Z=await j.open(D(Y.sessionID));await G.events.emit("opened",{sessionId:Y.sessionID,payload:Z})}}))}catch(q){throw await G.dispose(),q}let P=(async()=>{try{for await(let q of f.event.subscribe({signal:Q.signal}))if(q.type==="session.deleted")B.forgetSession(q.data.sessionID)}catch{}})(),z=!1;return{async dispose(){if(z)return;z=!0,Q.abort(),await Promise.all([G.dispose(),W.dispose(),P])}}}
|
|
2
2
|
export{F as x,T as y};
|