@cortexkit/opencode-anthropic-auth 1.23.0 → 2.0.1

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.
Files changed (88) hide show
  1. package/README.md +239 -195
  2. package/dist/cli-failure.d.ts +69 -0
  3. package/dist/cli.d.ts +14 -9
  4. package/dist/cli.js +103 -80
  5. package/dist/custody-dimensions.d.ts +7 -24
  6. package/dist/custody-mode.d.ts +29 -169
  7. package/dist/effort-history.d.ts +6 -1
  8. package/dist/{index-xzbhzz0a.js → index-04syas8a.js} +2 -2
  9. package/dist/index-1jkyhgyr.js +2 -0
  10. package/dist/{index-8y2t4mwz.js → index-2arfb1y3.js} +1 -1
  11. package/dist/index-3xqv3rw3.js +2 -0
  12. package/dist/{index-0jfsxyn9.js → index-52r2e1h9.js} +1 -1
  13. package/dist/index-b3mxpp4w.js +2 -0
  14. package/dist/index-p4wvcwhh.js +3 -0
  15. package/dist/{index-1gr8v4fn.js → index-rqync0pc.js} +1 -1
  16. package/dist/index-ynq181e8.js +42 -0
  17. package/dist/index-yxtdke11.js +449 -0
  18. package/dist/index-zdgceztz.js +1 -0
  19. package/dist/index.js +1 -38
  20. package/dist/native-command.d.ts +19 -0
  21. package/dist/rpc/notifications.d.ts +2 -1
  22. package/dist/rpc/port-file.js +1 -1
  23. package/dist/rpc/protocol.d.ts +8 -4
  24. package/dist/rpc/protocol.js +1 -1
  25. package/dist/rpc/rpc-client.d.ts +2 -0
  26. package/dist/rpc/rpc-client.js +1 -1
  27. package/dist/rpc/rpc-dir.js +1 -1
  28. package/dist/rpc/rpc-server.d.ts +5 -1
  29. package/dist/setup/command.d.ts +12 -0
  30. package/dist/setup/command.test.d.ts +1 -0
  31. package/dist/setup/detect.d.ts +7 -4
  32. package/dist/setup/host-executable.d.ts +3 -0
  33. package/dist/setup/native-activation.d.ts +29 -0
  34. package/dist/setup/native-enrollment.d.ts +26 -0
  35. package/dist/setup/native-enrollment.test.d.ts +1 -0
  36. package/dist/setup/native-local.d.ts +20 -0
  37. package/dist/setup/native-login.d.ts +3 -0
  38. package/dist/setup/native-paths.d.ts +15 -0
  39. package/dist/setup/native-paths.test.d.ts +1 -0
  40. package/dist/setup/paths.d.ts +3 -2
  41. package/dist/setup/pi.d.ts +14 -4
  42. package/dist/setup/process-fence.d.ts +7 -1
  43. package/dist/setup/process-fence.test.d.ts +1 -0
  44. package/dist/sidebar-state.js +1 -1
  45. package/dist/tui/command-dialogs.d.ts +5 -0
  46. package/dist/tui-preferences.js +2 -2
  47. package/dist/v2/activation.d.ts +7 -0
  48. package/dist/v2/adapter.d.ts +276 -0
  49. package/dist/v2/install.d.ts +13 -0
  50. package/dist/v2/lifecycle.d.ts +8 -0
  51. package/dist/v2/menu-contract.d.ts +8 -0
  52. package/dist/v2/menu.d.ts +10 -0
  53. package/dist/v2/models.d.ts +6 -0
  54. package/dist/v2/ownership.d.ts +11 -0
  55. package/dist/v2/prime.d.ts +12 -0
  56. package/dist/v2/rpc.d.ts +50 -0
  57. package/dist/v2/server.d.ts +8 -0
  58. package/dist/v2/server.js +4 -0
  59. package/dist/v2/setup.d.ts +58 -0
  60. package/dist/v2/source.d.ts +41 -0
  61. package/dist/v2/tui.d.ts +13 -0
  62. package/dist/v2/tui.js +2 -0
  63. package/dist/v2/wire.d.ts +36 -0
  64. package/package.json +20 -5
  65. package/src/rpc/notifications.ts +9 -2
  66. package/src/rpc/protocol.ts +8 -7
  67. package/src/rpc/rpc-client.ts +17 -0
  68. package/src/rpc/rpc-server.ts +20 -3
  69. package/src/tui/command-dialogs.tsx +264 -0
  70. package/src/tui/entry.mjs +44 -18
  71. package/src/tui-compiled/rpc/protocol.ts +8 -7
  72. package/src/tui-compiled/rpc/rpc-client.ts +17 -0
  73. package/src/tui-compiled/tui/command-dialogs.tsx +315 -76
  74. package/src/tui-compiled/tui.tsx +24 -7
  75. package/src/tui.tsx +37 -9
  76. package/dist/claustrum-enrollment-registry.d.ts +0 -4
  77. package/dist/custody-enrollment.d.ts +0 -14
  78. package/dist/custody-live.d.ts +0 -111
  79. package/dist/custody-manifest-watcher.d.ts +0 -16
  80. package/dist/index-1fq7h6yd.js +0 -430
  81. package/dist/index-797pmamn.js +0 -2
  82. package/dist/index-a5d6v3ba.js +0 -5
  83. package/dist/index-n96q8pks.js +0 -2
  84. package/dist/index-xxhyhp98.js +0 -2
  85. package/dist/index-z7gfdyv3.js +0 -1
  86. package/dist/local-login.d.ts +0 -64
  87. package/dist/logger-kk9vyem9.js +0 -1
  88. package/dist/setup/claustrum.d.ts +0 -26
@@ -1,2 +0,0 @@
1
- import{Ia as H,Sa as N,W as J,_ as K,ma as M}from"./index-1fq7h6yd.js";import{createHash as T}from"node:crypto";import{readFile as W,rename as X,writeFile as Y}from"node:fs/promises";function I(j){if(j.servedVersion!==void 0)return j.servedVersion;if(j.cacheVersion!==void 0)return j.cacheVersion;return j.warn?.(j.accountId),0}function Z(j,k){return{minimumRecordVersion:j+1,observedAt:k}}function S(j,k){let q=k.claustrumDivergence?.[j.credentialId];return!q||j.recordVersion>=q.minimumRecordVersion?{ok:!0}:{ok:!1,message:"missing fresh vault import"}}class Q extends Error{code="custody_login_observation_unavailable";constructor(){super("Local login cannot be verified while OPENCODE_AUTH_CONTENT is set; unset it before signing in.");this.name="CustodyLoginObservationUnavailableError"}}function y(j){if(j.OPENCODE_AUTH_CONTENT!==void 0)throw new Q}function _(j,k){let q=(w)=>`${w.length}:${w}`;return T("sha256").update(q(j)+q(k)).digest("hex")}async function $(j,k,q){if(!j||k?.type!=="oauth")return"not-cleared";if(!k.access||!k.refresh)return"not-cleared";if(_(k.access,k.refresh)!==j.authFingerprint)return"not-cleared";if(await q.beforeRemove?.(),q.divergence)await E(q.divergence.statePath,j.credentialId,q.divergence.lastVaultServedRecordVersion,Date.now());let w=await(q.remove??M)({path:q.manifestPath,entry:q.entry});if(w==="removed")return"cleared";if(w==="missing")return"not-cleared";return w.code===void 0?"refused":"refused-transient"}async function E(j,k,q,w){let B={version:1};try{let D=JSON.parse(await W(j,"utf8"));if(D&&typeof D==="object"&&!Array.isArray(D))B=D}catch{}let F=B.claustrumDivergence&&typeof B.claustrumDivergence==="object"&&!Array.isArray(B.claustrumDivergence)?B.claustrumDivergence:{};F[k]=Z(q,w),B.claustrumDivergence=F;let G=`${j}.${process.pid}.tmp`;await Y(G,JSON.stringify(B,null,2),{mode:384}),await X(G,j)}async function L(j,k){if(!j)return"not-cleared";let q=await N(k.accountStoragePath),w=q?.accounts.find((z)=>z.id===j.accountId&&H(z));if(!q||!w?.label)return"not-cleared";let B=await new K({path:k.manifestPath,provider:"anthropic",serve:"anthropic-auth"}).read();if(B.status!=="ready")return"not-cleared";let F=new Map;for(let z of q.accounts)if(H(z)&&z.label)F.set(z.label,(F.get(z.label)??0)+1);let G=new Set([...F].filter(([,z])=>z>1).map(([z])=>z)),D=J({account:w,manifest:B.manifest,duplicateOAuthLabels:G.size===0?void 0:G});if(D.status!=="resolved"||D.source!=="manifest")return"not-cleared";if(D.credentialId!==j.credentialId)return"not-cleared";return $(j,{type:"oauth",access:w.access,refresh:w.refresh},{manifestPath:k.manifestPath,entry:{label:w.label,handle:D.handle,credentialId:D.credentialId},remove:k.remove,divergence:k.divergence})}
2
- export{I as a,S as b,y as c,_ as d,$ as e,E as f,L as g};
@@ -1,5 +0,0 @@
1
- import*as B from"node:fs";import*as w from"node:os";import*as F from"node:path";var E="9d1c250a-e61b-44d9-88ed-5944d1962f5e",v={console:"https://platform.claude.com/oauth/authorize",max:"https://claude.com/cai/oauth/authorize"},u="https://platform.claude.com/oauth/code/callback",m="https://platform.claude.com/v1/oauth/token",b=/^ckh_[A-Za-z0-9_-]{43}$/,o="axios/1.15.2",d=["org:create_api_key","user:profile","user:inference","user:sessions:claude_code","user:mcp_servers","user:file_upload"],n="user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload",t="mcp_",s=["oauth-2025-04-20","interleaved-thinking-2025-05-14"],l="fast-mode-2026-02-01";function a(q,Q){let W=(q??"").split(",").map(($)=>$.trim()).filter(Boolean);return[...new Set([...W,...Q])].join(",")}function e(q){return typeof q==="string"&&(q.startsWith("claude-opus-4-6")||q.startsWith("claude-opus-4-7")||q.startsWith("claude-opus-4-8")||q.startsWith("claude-opus-5"))}var qq="You are OpenCode",Qq="You are Claude Code, Anthropic's official CLI for Claude.",Wq=["<use_parallel_tool_calls>","For maximum efficiency, whenever you perform multiple independent operations, invoke all relevant tools simultaneously rather than sequentially. Prioritize calling independent tools in parallel whenever possible. For example, when reading 3 known files, run 3 tool calls in parallel to read all 3 files into context at the same time. When running multiple independent read-only commands like `ls` or `list_dir`, run all of those commands in parallel. Err on the side of maximizing parallel tool calls for independent work rather than running too many tools sequentially.","","Do not parallelize tool calls when one call depends on the output of another call. If a tool call needs an ID, filename, search result, or any other value returned by a previous tool call, run the first call, wait for its result, then run the dependent call using the real returned value. Never invent placeholder IDs, guessed task IDs, or other guessed values for dependent tool calls just to place them in the same parallel block.","</use_parallel_tool_calls>"].join(`
2
- `),$q="59cf53e54c78",Bq=[4,7,20],S="2.1.280",O="cli",Jq="0.112.1",jq="v26.3.0",zq=`claude-cli/${S} (external, ${O})`,Kq=["explicit","automatic","hybrid"],Zq="explicit",Hq=["github.com/anomalyco/opencode","opencode.ai/docs"],Yq=[{match:"if OpenCode honestly",replacement:"if the assistant honestly"},{match:"Here is some useful information about the environment you are running in:",replacement:"Environment context you are running in:"}];var X={error:0,warn:1,info:2,debug:3,trace:4},R=new Set(Object.keys(X));function I(q){if(!q)return null;let Q=q.trim().toLowerCase();return R.has(Q)?Q:null}var k=I(process.env.OPENCODE_ANTHROPIC_AUTH_LOG_LEVEL),V=k??"info";function Xq(q){V=q}function Uq(){return V}function C(q){return X[q]<=X[V]}var z=process.env.OPENCODE_ANTHROPIC_AUTH_LOG_FILE??F.join(w.tmpdir(),"opencode-anthropic-auth.log");function Vq(){return z}var f=5242880,D=3;function T(){try{if(!B.existsSync(z))return;if(B.statSync(z).size<f)return}catch{return}try{for(let q=D;q>=1;q--){let Q=q===1?z:`${z}.${q-1}`,W=`${z}.${q}`;try{if(q===D)try{B.unlinkSync(W)}catch{}if(B.existsSync(Q))B.renameSync(Q,W)}catch{}}}catch{}}var _=/^(authorization|x-api-key|cookie|set-cookie|refresh|access|token|handle)$/i;function g(q){if(_.test(q))return!0;let Q=q.toLowerCase().replace(/[-_]/g,"");if(Q.includes("apikey"))return!0;if(Q.endsWith("secret")||Q.endsWith("password"))return!0;if(Q.endsWith("token")&&!Q.endsWith("tokens"))return!0;return!1}var c=[/Bearer\s+\S+/,/sk-[A-Za-z0-9-]+/,/eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/,b];function y(q){if(typeof q!=="string")return!1;return c.some((Q)=>Q.test(q))}function N(q){if(q==null||Object.keys(q).length===0)return;let Q=new WeakSet;function W($){if($==null||typeof $!=="object"){if(y($))return"***REDACTED***";return $}if(Q.has($))return"[Circular]";Q.add($);try{if(Array.isArray($))return $.map(W);let J=$,j={};for(let[H,M]of Object.entries(J)){if(g(H)){j[H]="***REDACTED***";continue}j[H]=W(M)}return j}finally{Q.delete($)}}return W(q)}function L(q,Q,W,$){let J=new Date().toISOString(),j=q.toUpperCase().padEnd(5),H=Q?` [${Q}]`:"",M=(()=>{try{let P=N($),A=P?{...P,pid:process.pid}:{pid:process.pid};return` ${JSON.stringify(A)}`}catch{return` {"pid":${process.pid},"payload":"[unserializable]"}`}})();return`[${J}] ${j}${H} ${W}${M}`}var U=null;function Cq(q){U=q}function K(q,Q,W,$){if(!C(q))return;if(U)try{U({level:q,channel:Q,message:W,payload:N($)})}catch{}if(x)return;try{let J=`${L(q,Q,W,$)}
3
- `;if(Y.push(J),Y.length>=p)G();else i()}catch{}}var Gq={error(q,Q,W){K("error",q,Q,W)},warn(q,Q,W){K("warn",q,Q,W)},info(q,Q,W){K("info",q,Q,W)},debug(q,Q,W){K("debug",q,Q,W)},trace(q,Q,W){K("trace",q,Q,W)}},x=!1,r=500,p=50,Y=[],Z=null;function G(){if(Z)clearTimeout(Z),Z=null;if(Y.length===0)return;let q=Y.join("");Y=[];try{T(),B.appendFileSync(z,q)}catch{}}function i(){if(Z)return;Z=setTimeout(()=>{Z=null,G()},r)}var h=/^\[([\w-]+)\]\s*/;function Pq(q,Q){if(!C("debug"))return;if(x)return;try{let W="",$=q,J=q.match(h);if(J)W=J[1]??"",$=q.slice(J[0].length);let j;if(Q!=null){if(Q instanceof Error)j={error:`${Q.message}${Q.stack?`
4
- ${Q.stack}`:""}`};else if(typeof Q==="object")j=Q}K("debug",W,$,j)}catch{}}function bq(q,Q){if(!C("debug"))return;if(x)return;try{let W;if(Q!=null){if(typeof Q==="object"&&!(Q instanceof Error))W=Q}K("debug","relay",q,W)}catch{}}if(!x)process.on("exit",G);
5
- export{E as Bg,v as Cg,u as Dg,m as Eg,b as Fg,o as Gg,d as Hg,n as Ig,t as Jg,s as Kg,l as Lg,a as Mg,e as Ng,qq as Og,Qq as Pg,Wq as Qg,$q as Rg,Bq as Sg,S as Tg,O as Ug,Jq as Vg,jq as Wg,zq as Xg,Kq as Yg,Zq as Zg,Hq as _g,Yq as $g,I as ah,Xq as bh,Uq as ch,C as dh,Vq as eh,_ as fh,g as gh,N as hh,L as ih,Cq as jh,Gq as kh,Pq as lh,bq as mh};
@@ -1,2 +0,0 @@
1
- import{createRequire as s}from"node:module";var l=Object.create;var{getPrototypeOf:m,defineProperty:k,getOwnPropertyNames:n}=Object;var o=Object.prototype.hasOwnProperty;function p(a){return this[a]}var q,r,v=(a,b,d)=>{var e=a!=null&&typeof a==="object";if(e){var h=b?q??=new WeakMap:r??=new WeakMap,g=h.get(a);if(g)return g}d=a!=null?l(m(a)):{};let c=b||!a||!a.__esModule?k(d,"default",{value:a,enumerable:!0}):d;for(let f of n(a))if(!o.call(c,f))k(c,f,{get:p.bind(a,f),enumerable:!0});if(e)h.set(a,c);return c};var w=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var y=s(import.meta.url),t=Symbol.dispose||Symbol.for("Symbol.dispose"),u=Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose"),z=(a,b,d)=>{if(b!=null){if(typeof b!=="object"&&typeof b!=="function")throw TypeError('Object expected to be assigned to "using" declaration');var e;if(d)e=b[u];if(e===void 0)e=b[t];if(typeof e!=="function")throw TypeError("Object not disposable");a.push([d,e,b])}else if(d)a.push([d]);return b},A=(a,b,d)=>{var e=typeof SuppressedError==="function"?SuppressedError:function(c,f,i,j){return j=Error(i),j.name="SuppressedError",j.error=c,j.suppressed=f,j},h=(c)=>b=d?new e(c,b,"An error was suppressed during disposal"):(d=!0,c),g=(c)=>{while(c=a.pop())try{var f=c[1]&&c[1].call(c[2]);if(c[0])return Promise.resolve(f).then(g,(i)=>(h(i),g()))}catch(i){h(i)}if(d)throw b};return g()};
2
- export{v as th,w as uh,y as vh,z as wh,A as xh};
@@ -1,2 +0,0 @@
1
- import{uh as R,vh as X}from"./index-n96q8pks.js";var T=R((Y,L)=>{(function(D){if(typeof L==="object"&&typeof L.exports==="object"){var z=D(X,Y);if(z!==void 0)L.exports=z}else if(typeof define==="function"&&define.amd)define(["require","exports","./impl/format","./impl/edit","./impl/scanner","./impl/parser"],D)})(function(D,z){Object.defineProperty(z,"__esModule",{value:!0}),z.applyEdits=z.modify=z.format=z.printParseErrorCode=z.ParseErrorCode=z.stripComments=z.visit=z.getNodeValue=z.getNodePath=z.findNodeAtOffset=z.findNodeAtLocation=z.parseTree=z.parse=z.getLocation=z.SyntaxKind=z.ScanError=z.createScanner=void 0;let Z=D("./impl/format"),N=D("./impl/edit"),$=D("./impl/scanner"),B=D("./impl/parser");z.createScanner=$.createScanner;var Q;(function(j){j[j.None=0]="None",j[j.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",j[j.UnexpectedEndOfString=2]="UnexpectedEndOfString",j[j.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",j[j.InvalidUnicode=4]="InvalidUnicode",j[j.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",j[j.InvalidCharacter=6]="InvalidCharacter"})(Q||(z.ScanError=Q={}));var U;(function(j){j[j.OpenBraceToken=1]="OpenBraceToken",j[j.CloseBraceToken=2]="CloseBraceToken",j[j.OpenBracketToken=3]="OpenBracketToken",j[j.CloseBracketToken=4]="CloseBracketToken",j[j.CommaToken=5]="CommaToken",j[j.ColonToken=6]="ColonToken",j[j.NullKeyword=7]="NullKeyword",j[j.TrueKeyword=8]="TrueKeyword",j[j.FalseKeyword=9]="FalseKeyword",j[j.StringLiteral=10]="StringLiteral",j[j.NumericLiteral=11]="NumericLiteral",j[j.LineCommentTrivia=12]="LineCommentTrivia",j[j.BlockCommentTrivia=13]="BlockCommentTrivia",j[j.LineBreakTrivia=14]="LineBreakTrivia",j[j.Trivia=15]="Trivia",j[j.Unknown=16]="Unknown",j[j.EOF=17]="EOF"})(U||(z.SyntaxKind=U={})),z.getLocation=B.getLocation,z.parse=B.parse,z.parseTree=B.parseTree,z.findNodeAtLocation=B.findNodeAtLocation,z.findNodeAtOffset=B.findNodeAtOffset,z.getNodePath=B.getNodePath,z.getNodeValue=B.getNodeValue,z.visit=B.visit,z.stripComments=B.stripComments;var V;(function(j){j[j.InvalidSymbol=1]="InvalidSymbol",j[j.InvalidNumberFormat=2]="InvalidNumberFormat",j[j.PropertyNameExpected=3]="PropertyNameExpected",j[j.ValueExpected=4]="ValueExpected",j[j.ColonExpected=5]="ColonExpected",j[j.CommaExpected=6]="CommaExpected",j[j.CloseBraceExpected=7]="CloseBraceExpected",j[j.CloseBracketExpected=8]="CloseBracketExpected",j[j.EndOfFileExpected=9]="EndOfFileExpected",j[j.InvalidCommentToken=10]="InvalidCommentToken",j[j.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",j[j.UnexpectedEndOfString=12]="UnexpectedEndOfString",j[j.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",j[j.InvalidUnicode=14]="InvalidUnicode",j[j.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",j[j.InvalidCharacter=16]="InvalidCharacter"})(V||(z.ParseErrorCode=V={}));function k(j){switch(j){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}z.printParseErrorCode=k;function A(j,I,G){return Z.format(j,I,G)}z.format=A;function M(j,I,G,J){return N.setProperty(j,I,G,J)}z.modify=M;function O(j,I){let G=I.slice(0).sort((H,F)=>{let W=H.offset-F.offset;if(W===0)return H.length-F.length;return W}),J=j.length;for(let H=G.length-1;H>=0;H--){let F=G[H];if(F.offset+F.length<=J)j=N.applyEdit(j,F);else throw Error("Overlapping edit");J=F.offset}return j}z.applyEdits=O})});
2
- export{T as nh};
@@ -1 +0,0 @@
1
- import{$ as la,$a as lb,$b as lc,$c as ld,$d as le,$e as mf,$f as mg,Aa as Ma,Ab as Mb,Ac as Mc,Ad as Md,Ae as Me,Af as Nf,Ag as Ng,Ba as Na,Bb as Nb,Bc as Nc,Bd as Nd,Be as Ne,Bf as Of,C as B,Ca as Oa,Cb as Ob,Cc as Oc,Cd as Od,Ce as Oe,Cf as Pf,D as P,Da as Pa,Db as Pb,Dc as Pc,Dd as Pd,De as Pe,Df as Qf,E as Q,Ea as Qa,Eb as Qb,Ec as Qc,Ed as Qd,Ee as Qe,Ef as Rf,F as R,Fa as Ra,Fb as Rb,Fc as Rc,Fd as Rd,Fe as Re,Ff as Sf,G as S,Ga as Sa,Gb as Sb,Gc as Sc,Gd as Sd,Ge as Se,Gf as Tf,H as T,Ha as Ta,Hb as Tb,Hc as Tc,Hd as Td,He as Te,Hf as Uf,I as U,Ia as Ua,Ib as Ub,Ic as Uc,Id as Ud,Ie as Ue,If as Vf,J as V,Ja as Va,Jb as Vb,Jc as Vc,Jd as Vd,Je as Ve,Jf as Wf,K as W,Ka as Wa,Kb as Wb,Kc as Wc,Kd as Wd,Ke as We,Kf as Xf,L as X,La as Xa,Lb as Xb,Lc as Xc,Ld as Xd,Le as Xe,Lf as Yf,M as Y,Ma as Ya,Mb as Yb,Mc as Yc,Md as Yd,Me as Ye,Mf as Zf,N as Z,Na as Za,Nb as Zb,Nc as Zc,Nd as Zd,Ne as Ze,Nf as _f,O as _,Oa as _a,Ob as _b,Oc as _c,Od as _d,Oe as _e,Of as $f,P as $,Pa as $a,Pb as $b,Pc as $c,Pd as $d,Pe as $e,Pf as ag,Q as aa,Qa as ab,Qb as ac,Qc as ad,Qd as ae,Qe as af,Qf as bg,R as ba,Ra as bb,Rb as bc,Rc as bd,Rd as be,Re as bf,Rf as cg,S as ca,Sa as cb,Sb as cc,Sc as cd,Sd as ce,Se as cf,Sf as dg,T as da,Ta as db,Tb as dc,Tc as dd,Td as de,Te as df,Tf as eg,U as ea,Ua as eb,Ub as ec,Uc as ed,Ud as ee,Ue as ef,Uf as fg,V as fa,Va as fb,Vb as fc,Vc as fd,Vd as fe,Ve as ff,Vf as gg,W as ga,Wa as gb,Wb as gc,Wc as gd,Wd as ge,We as gf,Wf as hg,X as ha,Xa as hb,Xb as hc,Xc as hd,Xd as he,Xe as hf,Xf as ig,Y as ia,Ya as ib,Yb as ic,Yc as id,Yd as ie,Ye as jf,Yf as jg,Z as ja,Za as jb,Zb as jc,Zc as jd,Zd as je,Ze as kf,Zf as kg,_ as ka,_a as kb,_b as kc,_c as kd,_d as ke,_e as lf,_f as lg,aa as ma,ab as mb,ac as mc,ad as md,ae as me,af as nf,ag as ng,ba as na,bb as nb,bc as nc,bd as nd,be as ne,bf as of,bg as og,ca as oa,cb as ob,cc as oc,cd as od,ce as oe,cf as pf,cg as pg,da as pa,db as pb,dc as pc,dd as pd,de as pe,df as qf,dg as qg,ea as qa,eb as qb,ec as qc,ed as qd,ee as qe,ef as rf,eg as rg,fa as ra,fb as rb,fc as rc,fd as rd,fe as re,ff as sf,fg as sg,ga as sa,gb as sb,gc as sc,gd as sd,ge as se,gf as tf,gg as tg,ha as ta,hb as tb,hc as tc,hd as td,he as te,hf as uf,hg as ug,ia as ua,ib as ub,ic as uc,id as ud,ie as ue,if as vf,ig as vg,ja as va,jb as vb,jc as vc,jd as vd,je as ve,jf as wf,jg as wg,ka as wa,kb as wb,kc as wc,kd as wd,ke as we,kf as xf,kg as xg,la as xa,lb as xb,lc as xc,ld as xd,le as xe,lf as yf,lg as yg,ma as ya,mb as yb,mc as yc,md as yd,me as ye,mf as zf,mg as zg,na as za,nb as zb,nc as zc,nd as zd,ne as ze,nf as Af,ng as Ag,oa as Aa,ob as Ab,oc as Ac,od as Ad,oe as Ae,of as Bf,og as Bg,pa as Ba,pb as Bb,pc as Bc,pd as Bd,pe as Be,pf as Cf,pg as Cg,qa as Ca,qb as Cb,qc as Cc,qd as Cd,qe as Ce,qf as Df,qg as Dg,ra as Da,rb as Db,rc as Dc,rd as Dd,re as De,rf as Ef,rg as Eg,sa as Ea,sb as Eb,sc as Ec,sd as Ed,se as Ee,sf as Ff,sg as Fg,ta as Fa,tb as Fb,tc as Fc,td as Fd,te as Fe,tf as Gf,tg as Gg,ua as Ga,ub as Gb,uc as Gc,ud as Gd,ue as Ge,uf as Hf,ug as Hg,va as Ha,vb as Hb,vc as Hc,vd as Hd,ve as He,vf as If,vg as Ig,wa as Ia,wb as Ib,wc as Ic,wd as Id,we as Ie,wf as Jf,wg as Jg,xa as Ja,xb as Jb,xc as Jc,xd as Jd,xe as Je,xf as Kf,xg as Kg,ya as Ka,yb as Kb,yc as Kc,yd as Kd,ye as Ke,yf as Lf,yg as Lg,za as La,zb as Lb,zc as Lc,zd as Ld,ze as Le,zf as Mf,zg as Mg}from"./index-1fq7h6yd.js";import{$g as A,Bg as a,Cg as b,Dg as c,Eg as d,Fg as e,Gg as f,Hg as g,Ig as h,Jg as i,Kg as j,Lg as k,Mg as l,Ng as m,Og as n,Pg as o,Qg as p,Rg as q,Sg as r,Tg as s,Ug as t,Vg as u,Wg as v,Xg as w,Yg as x,Zg as y,_g as z,ah as C,bh as D,ch as E,dh as F,eh as G,fh as H,gh as I,hh as J,ih as K,jh as L,kh as M,lh as N,mh as O}from"./index-a5d6v3ba.js";import"./index-n96q8pks.js";export{md as writeDumpFile,za as writeCustodyHandleManifestEntryLocked,xa as writeCustodyHandleManifestEntry,wa as withCustodyManifestLock,xf as usesMidConversationOutputConfig,sc as upsertAccount,Oa as tokenFingerprint,nd as sweepDumpDirectory,Wc as stripBillingLineageFromBody,Vc as stripBillingLineageFields,Eg as stickyRouteKnownFableExhausted,Cg as stickyRouteFamilyForModel,Dg as stickyRouteCandidateWeight,Hg as stickyRetryAfterWithJitter,Bg as stickyQuotaSnapshotIsFresh,Sc as signRequestBody,Ib as shouldFallbackStatus,F as shouldEmit,qg as setRoutingMode,Fb as setPrimePersistentEnabled,Yb as setLogLevelPersistent,D as setLogLevel,lc as setKillswitchPersistent,yb as setFastModePersistentEnabled,ye as setFastModeEnabled,wb as setDumpPersistentEnabled,jd as setDumpEnabled,ib as setClaustrumModePersistent,Db as setCacheKeepSubagentsEnabled,zb as setCacheKeepPersistentWindow,Bb as setCacheKeepPersistentEnabled,Ab as setCacheKeepPersistentAlways,Ec as setCache1hState,ub as setCache1hPersistentMode,tb as setCache1hPersistentEnabled,Dc as setCache1hMode,Cc as setCache1hEnabled,Xc as setBounded,oc as setAccountEnabledPersistent,xc as setAccountEnabled,kg as sendViaRelay,dd as selectClaudeCodeBetas,ob as saveOAuthProfileState,kb as saveAccounts,nb as saveAccountState,T as resolveCustodyHandlesPath,ga as resolveCustodyHandle,S as resolveClaustrumConnectionPath,$c as resolveClaudeCodeIdentity,ze as resetFastModeState,kd as resetDumpState,ae as resetClaustrumEnrollmentState,Zc as resetClaudeCodeIdentityCachesForTest,Fc as resetCache1hState,Qc as resetBillingHeaderCCH,nc as reorderAccountsPersistent,wc as reorderAccounts,ya as removeCustodyHandleManifestEntry,mc as removeAccountPersistent,vc as removeAccount,Af as remapRequestBodyModel,zf as remapModelId,O as relayLog,fe as refreshClaustrumScopedRoster,La as refreshClaudeOAuthToken,Pb as refreshBackoffActive,J as redactPayload,ha as readCustodyHandles,_d as readClaustrumEnrollmentToken,Zd as readClaustrumEnrollmentStatus,cc as quotaSnapshotPassesPolicy,bc as quotaSnapshotPassesModelScope,ac as quotaSnapshotModelScopeIsExhausted,dc as quotaSnapshotHasStandardWindows,db as quotaSnapshotCheckedAt,eb as quotaFieldSource,Ub as quotaBackoffActive,ee as projectClaustrumScopedRoster,Qf as primeStorageFingerprint,Tf as primeMarkerPath,Rf as primeMarkerNamespaceDir,Mf as primeIsEligible,Nf as primeEligibilityReasonLabel,Sf as primeAccountMarkerDir,tc as persistFallbackQuotaHeaderPersistent,rg as parseRoutingCommandAction,Ja as parseRetryAfterHeader,Hf as parsePrimeCommandAction,Ie as parseLoggingCommandAction,C as parseLogLevel,vg as parseLaneStartCommandAction,Ee as parseKillswitchCommandAction,B as parseJsonRedacted,Ae as parseFastModeCommandAction,od as parseDumpCommandAction,ue as parseCustomHeaders,Fd as parseCacheKeepCommandAction,Gc as parseCache1hCommandAction,oe as parseAccountCommandAction,fd as orderClaudeCodeBody,ie as oauthProfileMatchesIdentity,je as oauthProfileIsFresh,$f as normalizeQuotaHeaders,fc as normalizeKillswitchThresholds,Qe as normalizeAnthropicModelId,wf as normalizeAdaptiveEffort,lb as mutateAccountsPersistent,bb as mergeMainRefreshErrorClearedAt,ab as mergeMainQuotaErrorClearedAt,ag as mergeHeaderQuotaSnapshot,fb as mergeHeaderQuotaForPersistence,l as mergeAnthropicBetas,M as logger,N as log,Md as localDayKey,cb as loadAccounts,jc as killswitchRetryAfterSeconds,ic as killswitchPassesPolicy,Kd as isWithinCacheKeepWindow,ca as isValidCustodyLabel,da as isValidCustodyHandle,Kc as isValidBillingPromptId,Wa as isValidApiBaseURL,Jc as isValidAnthropicRequestId,I as isSecretKey,Sb as isQuotaPolicyAuthError,_f as isQuotaBearingHeaderFrame,Eb as isPrimePersistentlyEnabled,Ob as isPermanentRefreshError,uf as isOpenAIReasoningSignature,hb as isOAuthAccountVaultOwned,Ua as isOAuthAccount,gc as isKillswitchEnabled,m as isFastModeSupportedModel,xb as isFastModePersistentlyEnabled,xe as isFastModeEnabled,vb as isDumpPersistentlyEnabled,id as isDumpEnabled,Z as isCustodyTombstoneValue,_ as isCustodyTombstoneOAuth,Xa as isCostZeroingEnabled,hf as isClaudeSonnet5Model,lf as isClaudeOpus5Model,tf as isClaudeOpus5FamilyModel,sf as isClaudeOpus55Model,bf as isClaudeFableOrMythos5Model,cf as isClaudeFableOrMythos51Model,df as isClaudeFable51Model,Cb as isCacheKeepSubagentsEnabled,Id as isCacheKeepPersistentlyEnabled,Jd as isCacheKeepHybridActive,Hd as isCacheKeepAlways,Ld as isCacheKeepActiveNow,rb as isCache1hPersistentlyEnabled,Ac as isCache1hEnabled,Va as isApiKeyAccount,Hb as incrementPrimeUsagePersistent,Mb as hashRefreshToken,ig as hashBody,Ng as hasThinkingBindingControls,Lg as hasReplayableThinkingBlocks,Ta as hasNoLocalCredential,Kg as getThinkingPrefixMismatchBehavior,Gg as getStickyRoutingStatePath,$b as getScopedQuotaWindowForModel,pg as getRoutingMode,gg as getRelayConfig,Lb as getRefreshIntervalMs,Kb as getRefreshBeforeExpiryMs,_b as getQuotaRefreshEveryNRequests,qc as getQuotaNextRefreshAt,Jb as getQuotaMinimumRemainingThresholds,Wb as getQuotaCheckIntervalMs,Zb as getPersistedMainQuota,Xb as getPersistedLogLevel,Gb as getOrCreatePrimeAuthLineageId,mb as getOrCreateMainAccountId,E as getLogLevel,G as getLogFilePath,hc as getKillswitchThresholdsForAccount,kc as getKillswitchConfig,be as getHostClaustrumEnrollmentPaths,Rb as getFallbackReauthLabels,ld as getDumpDirectory,Xf as getDefaultQuotaHeaderFeedDirectory,U as getDefaultClaustrumHandlesPath,R as getDefaultClaustrumConnectionPath,Sd as getDefaultCacheKeepRegistryDirectory,gb as getClaustrumMode,Yd as getClaustrumEnrollmentPaths,ef as getClaudeFableMythos5ReleaseDate,_c as getClaudeCodeIdentityForVerifiedAccount,Yc as getClaudeCodeIdentity,Gd as getCacheKeepWindow,sb as getCache1hPersistentMode,Bc as getCache1hMode,Za as getAccountStoragePath,_a as getAccountStatePath,hg as generateRelayToken,Ia as generatePKCE,Qb as formatRefreshBackoffMessage,dg as formatQuotaMoney,Vb as formatQuotaBackoffMessage,ke as formatOAuthAccountTier,K as formatLogLine,qe as formatEnrollmentStatus,Q as findExistingClaustrumConnectionPath,rc as fetchOAuthQuotaSnapshot,he as fetchOAuthAccountProfile,uc as fallbackAccountUuidForLineage,Mc as extractFirstUserMessageText,Rc as extractBillingHeaderCCH,tg as executeRoutingCommand,Lf as executePrimeCommand,Ke as executeLoggingCommand,wg as executeLaneStartCommand,Fe as executeKillswitchCommand,Ce as executeFastModeCommand,qd as executeDumpCommand,Od as executeCacheKeepCommand,Ic as executeCache1hCommand,se as executeAccountCommand,Na as exchange,If as estimatePrimeCostUsd,td as dumpResponseArtifact,sd as dumpRelayRequest,rd as dumpDirectRequest,V as detectClaustrumConnection,Fg as decideStickyQuotaFailure,Y as custodyTombstoneOAuth,X as custodyTombstoneKey,pe as custodyStatusLabel,fa as custodyCredentialIdFromResolution,ea as custodyCredentialId,jg as createStringPatch,Ag as createStickyNoRouteResponse,$a as createEmptyStorage,le as connectClaustrumScopedClient,Xd as connectClaustrumEnrollmentClient,Ha as connectClaustrumCredentialCache,Ba as connectClaustrumClient,Yf as configuredAnthropicOAuthAccountCount,Pc as computeXxhash64Hex,Tc as computeCcVersionSuffix,Oc as computeCCH,pb as clearClaustrumRefreshErrorPersistent,jb as clearClaustrumHandlePersistent,gd as claudeCodeEntrypoint,sg as buildRoutingStatusSummary,Nb as buildRefreshOperationError,Tb as buildQuotaOperationError,Kf as buildPrimeStatusSummary,Pf as buildPrimeRequestBody,Jf as buildPrimeAccountStatuses,Je as buildLoggingStatusSummary,Be as buildFastModeStatusSummary,eg as buildFallbackQuotaSummaries,pd as buildDumpStatusSummary,fg as buildClaudeQuotaSummary,ad as buildClaudeCodeMetadataUserId,Nd as buildCacheKeepStatusSummary,Pd as buildCacheKeepPrewarmBody,Hc as buildCache1hStatusSummary,Uc as buildBillingHeaderValue,re as buildAccountList,Ma as authorize,ba as assertNotCustodyTombstone,Mg as applyThinkingBindingControls,yf as applyMidConversationOutputConfig,ve as applyCustomHeaders,bd as applyClaudeCodeMetadata,ed as applyClaudeCodeHeaders,ce as adoptClaustrumEnrollment,pc as addAccountPersistent,qb as acquireRefreshFileLock,L as __setLogTestSink,pa as __setCustodyManifestLockTestOptions,va as __deriveCustodyManifestStaleLockPrefix,lg as WORKER_SCRIPT,w as USER_AGENT,i as TOOL_PREFIX,d as TOKEN_URL,Jg as THINKING_BINDING_CONTROLS_BETA,A as TEXT_REPLACEMENTS,Ig as StickySessionRouter,yg as STICKY_ROUTING_SHORT_RESET_GRACE_MS,xg as STICKY_ROUTING_MAIN_ACCOUNT_ID,zg as STICKY_ROUTING_ASSIGNMENT_TTL_MS,H as SECRET_KEY_EXACT,ng as ROUTING_MODES,j as REQUIRED_BETAS,h as REFRESH_SCOPE,bg as QuotaManager,Zf as QuotaHeaderFeedRegistry,Ra as QUOTA_URL,Vf as QUOTA_HEADER_FEED_SCHEMA_VERSION,Wf as QUOTA_HEADER_FEED_LEASE_MS,Sa as QUOTA_FIELD_NAMES,Uf as PrimeManager,ge as PROFILE_TTL_MS,P as PRODUCTION_CLAUSTRUM_CONNECTION_FILE_NAME,Cf as PRIME_TICK_MS,Of as PRIME_REQUEST_BODY,Ff as PRIME_POST_FIRE_REFRESH_MS,Ef as PRIME_MARKER_MAX_AGE_MS,Df as PRIME_DUE_OFFSET_MS,Gf as PRIME_CHECK_THROTTLE_MS,p as PARALLEL_TOOL_CALLS_SYSTEM_PROMPT,z as PARAGRAPH_REMOVAL_ANCHORS,n as OPENCODE_IDENTITY_PREFIX,g as OAUTH_SCOPES,vf as MID_CONVERSATION_OUTPUT_CONFIG_BETA,He as LOGGING_LEVELS,De as KILLSWITCH_COMMAND_NAME,yc as FallbackAccountManager,k as FAST_MODE_BETA,Ya as FALLBACK_BACKGROUND_TICK_MS,Ea as ERROR_CLASS_WIRE_SET,og as DEFAULT_ROUTING_MODE,ec as DEFAULT_KILLSWITCH_THRESHOLDS,Da as DEFAULT_CLAUSTRUM_CREDENTIAL_MIN_TTL_MS,y as DEFAULT_CACHE_1H_MODE,$ as CustodyTombstoneRefreshError,aa as CustodyTombstoneLoginError,ja as CustodyManifestSelectionError,ta as CustodyManifestLockOwnerInvalidError,ua as CustodyManifestLockLeaseLostError,ra as CustodyManifestLockError,sa as CustodyManifestLockBusyError,ka as CustodyHandleManifestReader,me as ClaustrumScopedRuntime,de as ClaustrumScopedCustody,Ud as ClaustrumScopedCredentialError,$d as ClaustrumEnrollmentManager,Fa as ClaustrumCredentialError,Ga as ClaustrumCredentialCache,Aa as ClaustrumClient,Ka as ClaudeOAuthRefreshError,Nc as ClaudeCodeFirstUserTextTracker,Td as CacheKeepSessionRegistry,Qd as CacheKeepManager,W as CUSTODY_TOMBSTONE_PREFIX,ia as CUSTODY_MANIFEST_SELECTION_ERROR_CODES,la as CUSTODY_MANIFEST_LOCK_TTL_MS,na as CUSTODY_MANIFEST_LOCK_RETRY_MIN_MS,oa as CUSTODY_MANIFEST_LOCK_RETRY_MAX_MS,ma as CUSTODY_MANIFEST_LOCK_RENEW_MS,qa as CUSTODY_MANIFEST_LOCK_ERROR_CODES,e as CUSTODY_HANDLE_PATTERN,c as CODE_CALLBACK_URL,a as CLIENT_ID,Wd as CLAUSTRUM_PI_ENROLLMENT_NAME,Vd as CLAUSTRUM_OPENCODE_ENROLLMENT_NAME,Ca as CLAUSTRUM_MODULE_ID,ug as CLAUDE_START_COMMAND_NAME,ff as CLAUDE_SONNET_5_MODEL_ID,gf as CLAUDE_SONNET_5_ADAPTIVE_THINKING,mg as CLAUDE_ROUTING_COMMAND_NAME,cg as CLAUDE_QUOTAS_COMMAND_NAME,Bf as CLAUDE_PRIME_COMMAND_NAME,jf as CLAUDE_OPUS_5_MODEL_ID,kf as CLAUDE_OPUS_5_ADAPTIVE_THINKING,nf as CLAUDE_OPUS_5_5_RELEASE_DATE,qf as CLAUDE_OPUS_5_5_PRICING,mf as CLAUDE_OPUS_5_5_MODEL_ID,pf as CLAUDE_OPUS_5_5_MAX_OUTPUT_TOKENS,of as CLAUDE_OPUS_5_5_CONTEXT_WINDOW,rf as CLAUDE_OPUS_5_5_ADAPTIVE_THINKING,Me as CLAUDE_MYTHOS_5_MODEL_ID,Oe as CLAUDE_MYTHOS_5_1_MODEL_ID,Ge as CLAUDE_LOGGING_COMMAND_NAME,Re as CLAUDE_HAIKU_4_5_PRICING,Pe as CLAUDE_HAIKU_4_5_MODEL_ID,we as CLAUDE_FAST_COMMAND_NAME,Ue as CLAUDE_FABLE_MYTHOS_5_SUMMARIZED_THINKING,Ze as CLAUDE_FABLE_MYTHOS_5_RELEASE_DATE,Ve as CLAUDE_FABLE_MYTHOS_5_PRICING,$e as CLAUDE_FABLE_MYTHOS_5_MODEL_SPECS,Te as CLAUDE_FABLE_MYTHOS_5_MODEL_IDS,Ye as CLAUDE_FABLE_MYTHOS_5_MAX_OUTPUT_TOKENS,Xe as CLAUDE_FABLE_MYTHOS_5_CONTEXT_WINDOW,_e as CLAUDE_FABLE_MYTHOS_5_1_RELEASE_DATE,We as CLAUDE_FABLE_MYTHOS_5_1_PRICING,af as CLAUDE_FABLE_MYTHOS_5_1_MODEL_SPECS,Se as CLAUDE_FABLE_MYTHOS_5_1_MODEL_IDS,Le as CLAUDE_FABLE_5_MODEL_ID,Ne as CLAUDE_FABLE_5_1_MODEL_ID,hd as CLAUDE_DUMP_COMMAND_NAME,s as CLAUDE_CODE_VERSION,v as CLAUDE_CODE_STAINLESS_RUNTIME_VERSION,u as CLAUDE_CODE_STAINLESS_PACKAGE_VERSION,o as CLAUDE_CODE_IDENTITY,cd as CLAUDE_CODE_FULL_AGENT_BETAS,t as CLAUDE_CODE_ENTRYPOINT,ud as CLAUDE_CACHE_KEEP_COMMAND_NAME,ne as CLAUDE_ACCOUNT_COMMAND_NAME,q as CCH_SALT,r as CCH_POSITIONS,Lc as CCH_PATTERN,vd as CACHE_KEEP_TTL_MS,xd as CACHE_KEEP_TICK_MS,Dd as CACHE_KEEP_RETRY_MAX_MS,Ed as CACHE_KEEP_RETRY_JITTER_MAX_MS,Cd as CACHE_KEEP_RETRY_BASE_MS,Rd as CACHE_KEEP_REGISTRY_LEASE_MS,Bd as CACHE_KEEP_PREWARM_TIMEOUT_MS,wd as CACHE_KEEP_PREWARM_LEAD_MS,zd as CACHE_KEEP_MAX_TARGETS,Ad as CACHE_KEEP_MAX_BODY_BYTES,yd as CACHE_KEEP_EXTENDED_TTL_BETA,x as CACHE_1H_MODES,zc as CACHE_1H_COMMAND_NAME,f as AXIOS_USER_AGENT,b as AUTHORIZE_URLS,te as ANTHROPIC_CUSTOM_HEADERS_ENV,Qa as ACCOUNT_STATE_FILE_NAME,Pa as ACCOUNT_FILE_NAME};
@@ -1,64 +0,0 @@
1
- import { type CustodyHandleAccount, type CustodyHandleManifestRemovalResult } from '@cortexkit/anthropic-auth-core';
2
- export type CompletedLocalLogin = {
3
- accountId: string;
4
- credentialId: string;
5
- authFingerprint: string;
6
- completedAt: number;
7
- };
8
- export type CustodyDivergence = {
9
- minimumRecordVersion: number;
10
- observedAt: number;
11
- };
12
- export type CustodyDivergenceState = {
13
- claustrumDivergence?: Record<string, CustodyDivergence>;
14
- };
15
- export declare function lastVaultServedRecordVersion(input: {
16
- accountId: string;
17
- servedVersion?: number;
18
- cacheVersion?: number;
19
- warn?: (accountId: string) => void;
20
- }): number;
21
- export declare function custodyDivergenceMarker(lastVaultServedRecordVersion: number, observedAt: number): CustodyDivergence;
22
- export declare function custodyPreflightDivergenceCheck(binding: {
23
- credentialId: string;
24
- recordVersion: number;
25
- }, state: CustodyDivergenceState): {
26
- ok: true;
27
- } | {
28
- ok: false;
29
- message: 'missing fresh vault import';
30
- };
31
- export declare class CustodyLoginObservationUnavailableError extends Error {
32
- readonly code = "custody_login_observation_unavailable";
33
- constructor();
34
- }
35
- export declare function assertLocalLoginObservationAvailable(env: Record<string, string | undefined>): void;
36
- export type ObservedLocalAuth = {
37
- type: string;
38
- access?: string;
39
- refresh?: string;
40
- };
41
- export declare function localAuthFingerprint(access: string, refresh: string): string;
42
- export type AcknowledgeLocalOAuthLoginOptions = {
43
- manifestPath: string;
44
- entry: CustodyHandleAccount;
45
- remove?: (input: {
46
- path: string;
47
- entry: CustodyHandleAccount;
48
- }) => Promise<CustodyHandleManifestRemovalResult>;
49
- beforeRemove?: () => Promise<void>;
50
- divergence?: {
51
- statePath: string;
52
- lastVaultServedRecordVersion: number;
53
- };
54
- };
55
- export type AcknowledgeLocalOAuthLoginFromStorageOptions = {
56
- accountStoragePath: string;
57
- manifestPath: string;
58
- remove?: AcknowledgeLocalOAuthLoginOptions['remove'];
59
- divergence?: AcknowledgeLocalOAuthLoginOptions['divergence'];
60
- };
61
- export type AcknowledgeLocalOAuthLoginResult = 'cleared' | 'not-cleared' | 'refused' | 'refused-transient';
62
- export declare function acknowledgeLocalOAuthLogin(completion: CompletedLocalLogin | undefined, observedAuth: ObservedLocalAuth | undefined, options: AcknowledgeLocalOAuthLoginOptions): Promise<AcknowledgeLocalOAuthLoginResult>;
63
- export declare function persistCustodyDivergenceState(statePath: string, credentialId: string, lastVaultServedRecordVersion: number, observedAt: number): Promise<void>;
64
- export declare function acknowledgeLocalOAuthLoginFromStorage(completion: CompletedLocalLogin | undefined, options: AcknowledgeLocalOAuthLoginFromStorageOptions): Promise<AcknowledgeLocalOAuthLoginResult>;
@@ -1 +0,0 @@
1
- import{ah as a,bh as b,ch as c,dh as d,eh as e,fh as f,gh as g,hh as h,ih as i,jh as j,kh as k,lh as l,mh as m}from"./index-a5d6v3ba.js";import"./index-n96q8pks.js";export{d as shouldEmit,b as setLogLevel,m as relayLog,h as redactPayload,a as parseLogLevel,k as logger,l as log,g as isSecretKey,c as getLogLevel,e as getLogFilePath,i as formatLogLine,j as __setLogTestSink,f as SECRET_KEY_EXACT};
@@ -1,26 +0,0 @@
1
- import { type ClaustrumEnrollmentClient, type ClaustrumScopedClient } from '@cortexkit/anthropic-auth-core';
2
- import type { CommandRunner, HarnessKind } from './types.ts';
3
- export interface SetupClaustrumOptions {
4
- paths?: {
5
- tokenPath: string;
6
- statePath: string;
7
- };
8
- ckBinary?: string;
9
- runner?: CommandRunner;
10
- enrollmentClient?: ClaustrumEnrollmentClient & {
11
- close?: () => void;
12
- };
13
- scopedClient?: ClaustrumScopedClient & {
14
- close?: () => void;
15
- };
16
- env?: NodeJS.ProcessEnv;
17
- }
18
- export interface SetupClaustrumResult {
19
- ok: boolean;
20
- message: string;
21
- discoveredAccounts: Array<{
22
- credentialId: string;
23
- accountId: string;
24
- }>;
25
- }
26
- export declare function setupClaustrumForHost(host: HarnessKind, options?: SetupClaustrumOptions): Promise<SetupClaustrumResult>;