@signetai/connector-opencode 0.165.0 → 0.166.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/index.js CHANGED
@@ -26421,7 +26421,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
26421
26421
  \`)+1;while(J!==0)this.onNewLine(this.offset+J),J=this.source.indexOf(\`
26422
26422
  \`,J)+1}return{type:G,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(G){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let J=W(G),V=N(J);return V.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:V,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let J=W(G),V=N(J);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:V,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(G,J){if(this.type!=="comment")return!1;if(this.indent<=J)return!1;return G.every((V)=>V.type==="newline"||V.type==="space")}*documentEnd(G){if(this.type!=="doc-mode"){if(G.end)G.end.push(this.sourceToken);else G.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(G){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if(G.end)G.end.push(this.sourceToken);else G.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}$.Parser=Q}),JX=w(($)=>{var I=FO(),z=B4(),j=S4(),U=XO(),_=y(),O=RO(),W=MO();function N(J){let V=J.prettyErrors!==!1;return{lineCounter:J.lineCounter||V&&new O.LineCounter||null,prettyErrors:V}}function X(J,V={}){let{lineCounter:Y,prettyErrors:L}=N(V),K=new W.Parser(Y?.addNewLine),B=new I.Composer(V),S=Array.from(B.compose(K.parse(J)));if(L&&Y)for(let A of S)A.errors.forEach(j.prettifyError(J,Y)),A.warnings.forEach(j.prettifyError(J,Y));if(S.length>0)return S;return Object.assign([],{empty:!0},B.streamInfo())}function H(J,V={}){let{lineCounter:Y,prettyErrors:L}=N(V),K=new W.Parser(Y?.addNewLine),B=new I.Composer(V),S=null;for(let A of B.compose(K.parse(J),!0,J.length))if(!S)S=A;else if(S.options.logLevel!=="silent"){S.errors.push(new j.YAMLParseError(A.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(L&&Y)S.errors.forEach(j.prettifyError(J,Y)),S.warnings.forEach(j.prettifyError(J,Y));return S}function Q(J,V,Y){let L=void 0;if(typeof V==="function")L=V;else if(Y===void 0&&V&&typeof V==="object")Y=V;let K=H(J,Y);if(!K)return null;if(K.warnings.forEach((B)=>U.warn(K.options.logLevel,B)),K.errors.length>0)if(K.options.logLevel!=="silent")throw K.errors[0];else K.errors=[];return K.toJS(Object.assign({reviver:L},Y))}function G(J,V,Y){let L=null;if(typeof V==="function"||Array.isArray(V))L=V;else if(Y===void 0&&V)Y=V;if(typeof Y==="string")Y=Y.length;if(typeof Y==="number"){let K=Math.round(Y);Y=K<1?void 0:K>8?{indent:8}:{indent:K}}if(J===void 0){let{keepUndefined:K}=Y??V??{};if(!K)return}if(_.isDocument(J)&&!L)return J.toString(Y);return new z.Document(J,L,Y).toString(Y)}$.parse=Q,$.parseAllDocuments=X,$.parseDocument=H,$.stringify=G}),TO=w(($)=>{var I=FO(),z=B4(),j=BO(),U=S4(),_=V4(),O=y(),W=c$(),N=t(),X=l$(),H=r$(),Q=pU(),G=qO(),J=RO(),V=MO(),Y=JX(),L=Q4();$.Composer=I.Composer,$.Document=z.Document,$.Schema=j.Schema,$.YAMLError=U.YAMLError,$.YAMLParseError=U.YAMLParseError,$.YAMLWarning=U.YAMLWarning,$.Alias=_.Alias,$.isAlias=O.isAlias,$.isCollection=O.isCollection,$.isDocument=O.isDocument,$.isMap=O.isMap,$.isNode=O.isNode,$.isPair=O.isPair,$.isScalar=O.isScalar,$.isSeq=O.isSeq,$.Pair=W.Pair,$.Scalar=N.Scalar,$.YAMLMap=X.YAMLMap,$.YAMLSeq=H.YAMLSeq,$.CST=Q,$.Lexer=G.Lexer,$.LineCounter=J.LineCounter,$.Parser=V.Parser,$.parse=Y.parse,$.parseAllDocuments=Y.parseAllDocuments,$.parseDocument=Y.parseDocument,$.stringify=Y.stringify,$.visit=L.visit,$.visitAsync=L.visitAsync});var PO=["none","acpx","llama-cpp","ollama","claude-code","codex","opencode","anthropic","openrouter","openai-compatible","command"],XX=PO.filter(($)=>$!=="command");var HV=new Set(PO),NV=new Set(XX);function E$($){return typeof $==="object"&&$!==null&&!Array.isArray($)}function dU($){return Object.fromEntries(Object.entries($).filter(([,I])=>I!==void 0))}function GX($){if(typeof $==="string"){let I=$.split(",").map((z)=>z.trim()).filter((z)=>z.length>0).join(",");return I.length>0?I:void 0}if(Array.isArray($)){let I=$.map((z)=>z.trim()).filter((z)=>z.length>0).join(",");return I.length>0?I:void 0}return}function WX($){if(typeof $!=="number"||!Number.isFinite($))return 10;return Math.min(100,Math.max(1,Math.trunc($)))}function QX($){return{primary:$.filter((I)=>I.supplementary!==!0),supporting:$.filter((I)=>I.supplementary===!0)}}function VX($,I){if(!E$($))return{totalReturned:I,hasSupplementary:!1,noHits:I===0};let z=typeof $.totalReturned==="number"?$.totalReturned:I,j=$.hasSupplementary===!0,U="noHits"in $?$.noHits===!0:z===0,_=E$($.dedupe)?{enabled:$.dedupe.enabled===!0,contextEpoch:typeof $.dedupe.contextEpoch==="number"?$.dedupe.contextEpoch:void 0,suppressed:typeof $.dedupe.suppressed==="number"?$.dedupe.suppressed:0,repeatedReturned:typeof $.dedupe.repeatedReturned==="number"?$.dedupe.repeatedReturned:0}:void 0,O=E$($.temporal)?$.temporal:void 0;return{totalReturned:z,hasSupplementary:j,noHits:U,..._?{dedupe:_}:{},...O?{temporal:O}:{}}}function HX($){let I=E$($)?$:{},j=(Array.isArray(I.results)?I.results:Array.isArray(I.memories)?I.memories:[]).filter(E$);return{query:typeof I.query==="string"?I.query:void 0,method:typeof I.method==="string"?I.method:void 0,rows:j,meta:VX(I.meta,j.length),message:typeof I.message==="string"?I.message:void 0}}function EO($,I){if(typeof I!=="number"||!Number.isFinite(I)||typeof $!=="object"||$===null||Array.isArray($))return $;let z=$,U=(Array.isArray(z.results)?z.results:[]).filter((_)=>typeof _.score!=="number"||_.score>=I);return{...z,results:U,meta:{...E$(z.meta)?z.meta:{},totalReturned:U.length,hasSupplementary:U.some((_)=>_.supplementary===!0),noHits:U.length===0}}}function NX($){return typeof $==="string"&&$.length>0?$.slice(0,10):"unknown"}function fU($,I){let z=typeof $.score==="number"?\`[\${($.score*100).toFixed(0)}%] \`:"",j=typeof $.source==="string"?$.source:"unknown",U=typeof $.type==="string"?$.type:"memory",_=typeof $.who==="string"&&$.who.length>0?\`, by \${$.who}\`:"",O=NX($.created_at),W=typeof $.id==="string"&&$.id.length>0?\`id: \${$.id}; \`:"";return\`\${I?.includeIndex?\`\${I.includeIndex}. \`:"- "}\${z}\${W}\${$.content??""} (\${U}, \${j}, \${O}\${_})\`}function YX($){if($.temporal_facet==="session")return"Sessions";if($.temporal_facet==="source")return"Source Activity";if($.temporal_facet==="occurred"||$.temporal_facet==="observed"||$.temporal_facet==="valid")return"Events";return"Memories Captured"}function LX($){let I=new Date($);if(Number.isNaN(I.getTime()))return $.slice(0,10);return I.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric",timeZone:"UTC"})}function KX($,I){let z=[LX(I.start)],j=new Map;for(let U of $){let _=YX(U);j.set(_,[...j.get(_)??[],U])}for(let U of["Sessions","Source Activity","Events","Memories Captured"]){let _=j.get(U);if(!_||_.length===0)continue;z.push("",U,..._.map((O)=>fU(O)))}return z.join(\`
26423
26423
  \`)}function CO($){if(typeof $!=="object"||$===null||Array.isArray($))return typeof $==="string"?$:JSON.stringify($,null,2);let I=$,z=HX(I);if(z.message&&z.rows.length===0)return z.message;if(z.meta.noHits||z.rows.length===0)return"No matching memories found.";let{primary:j,supporting:U}=QX(z.rows);if(z.meta.temporal?.mode==="timeline")return KX(j,z.meta.temporal);let _=z.meta.totalReturned===1?"memory":"memories",O=I.aggregate?.partial===!0&&typeof I.aggregate.message==="string"?[I.aggregate.message,"",\`Found \${z.meta.totalReturned} \${_}\${z.method?\` (\${z.method})\`:""}.\`]:[\`Found \${z.meta.totalReturned} \${_}\${z.method?\` (\${z.method})\`:""}.\`];if(j.length>0)O.push("","Primary matches:",...j.map((W)=>fU(W)));if(U.length>0)O.push("","Supporting context:",...U.map((W)=>fU(W)));return O.join(\`
26424
- \`)}function vO($,I={}){return dU({query:$,keywordQuery:I.keywordQuery??I.keyword_query,limit:WX(I.limit),project:I.project,type:I.type,tags:I.tags,who:I.who,pinned:I.pinned===!0?!0:void 0,importance_min:I.importance_min,since:I.since,until:I.until,time:I.time,expand:I.expand===!0?!0:void 0,agentId:I.agentId??I.agent_id??I.contextAgentId,sessionKey:I.sessionKey??I.session_key,includeRecalled:I.includeRecalled===!0||I.include_recalled===!0?!0:void 0,scope:I.scope,sourceOnly:I.sourceOnly===!0||I.source_only===!0?!0:void 0,aggregate:I.aggregate===!0?!0:void 0,aggregateBudget:I.aggregateBudget??I.aggregate_budget,saveAggregate:I.saveAggregate===!1||I.save_aggregate===!1?!1:I.saveAggregate===!0||I.save_aggregate===!0?!0:void 0})}function BX($){if(!E$($))return $;let I=$.aspects;if(!Array.isArray(I))return $;return{...$,aspects:I.map((z)=>{if(!E$(z))return z;if(typeof z.entityName==="string"&&Array.isArray(z.attributes))return z;if(typeof z.entity==="string"&&typeof z.aspect==="string"&&typeof z.value==="string")return{entityName:z.entity,aspect:z.aspect,attributes:[dU({content:z.value,groupKey:typeof z.groupKey==="string"?z.groupKey:void 0,claimKey:typeof z.claimKey==="string"?z.claimKey:void 0,confidence:typeof z.confidence==="number"?z.confidence:void 0,importance:typeof z.importance==="number"?z.importance:void 0})]};return z})}}function wO($,I={}){return dU({content:$,type:I.type,importance:I.importance,tags:GX(I.tags),who:I.who,pinned:I.pinned===!0?!0:void 0,sourceType:I.sourceType,sourceId:I.sourceId,sourcePath:I.sourcePath,createdAt:I.createdAt,occurredAt:I.occurredAt,observedAt:I.observedAt,validFrom:I.validFrom,validUntil:I.validUntil,sourceCreatedAt:I.sourceCreatedAt,reviewAfter:I.reviewAfter,hints:I.hints,transcript:I.transcript,structured:BX(I.structured),agentId:I.agentId,visibility:I.visibility,mode:I.mode,idempotencyKey:I.idempotencyKey,runtimePath:I.runtimePath,harness:I.harness,source:I.source})}var ZX=["extract","aggregate-recall","session_end","checkpoint","dreaming"];var gO="unicode61";function AX($){return $.replace(/\\s+/g," ").trim().toLowerCase()}function kO($){$.exec(\`
26424
+ \`)}function vO($,I={}){return dU({query:$,keywordQuery:I.keywordQuery??I.keyword_query,limit:WX(I.limit),project:I.project,type:I.type,tags:I.tags,who:I.who,pinned:I.pinned===!0?!0:void 0,importance_min:I.importance_min,since:I.since,until:I.until,time:I.time,expand:I.expand===!0?!0:void 0,agentId:I.agentId??I.agent_id??I.contextAgentId,sessionKey:I.sessionKey??I.session_key,includeRecalled:I.includeRecalled===!0||I.include_recalled===!0?!0:void 0,scope:I.scope,sourceOnly:I.sourceOnly===!0||I.source_only===!0?!0:void 0,aggregate:I.aggregate===!0?!0:void 0,aggregateBudget:I.aggregateBudget??I.aggregate_budget,saveAggregate:I.saveAggregate===!1||I.save_aggregate===!1?!1:I.saveAggregate===!0||I.save_aggregate===!0?!0:void 0})}function BX($){if(!E$($))return $;let I=$.aspects;if(!Array.isArray(I))return $;return{...$,aspects:I.map((z)=>{if(!E$(z))return z;if(typeof z.entityName==="string"&&Array.isArray(z.attributes))return z;if(typeof z.entity==="string"&&typeof z.aspect==="string"&&typeof z.value==="string")return{entityName:z.entity,aspect:z.aspect,attributes:[dU({content:z.value,groupKey:typeof z.groupKey==="string"?z.groupKey:void 0,claimKey:typeof z.claimKey==="string"?z.claimKey:void 0,confidence:typeof z.confidence==="number"?z.confidence:void 0,importance:typeof z.importance==="number"?z.importance:void 0})]};return z})}}function wO($,I={}){return dU({content:$,type:I.type,importance:I.importance,tags:GX(I.tags),who:I.who,pinned:I.pinned===!0?!0:void 0,sourceType:I.sourceType,sourceId:I.sourceId,sourcePath:I.sourcePath,createdAt:I.createdAt,occurredAt:I.occurredAt,observedAt:I.observedAt,validFrom:I.validFrom,validUntil:I.validUntil,sourceCreatedAt:I.sourceCreatedAt,reviewAfter:I.reviewAfter,supersedes:I.supersedes,hints:I.hints,transcript:I.transcript,structured:BX(I.structured),agentId:I.agentId,visibility:I.visibility,mode:I.mode,idempotencyKey:I.idempotencyKey,runtimePath:I.runtimePath,harness:I.harness,source:I.source})}var ZX=["extract","aggregate-recall","session_end","checkpoint","dreaming"];var gO="unicode61";function AX($){return $.replace(/\\s+/g," ").trim().toLowerCase()}function kO($){$.exec(\`
26425
26425
  CREATE VIRTUAL TABLE IF NOT EXISTS memories_fts USING fts5(
26426
26426
  content,
26427
26427
  content='memories',