@signetai/connector-pi 0.165.0 → 0.167.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension-bundle.d.ts","sourceRoot":"","sources":["../src/extension-bundle.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"extension-bundle.d.ts","sourceRoot":"","sources":["../src/extension-bundle.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,gBAAgB,4zzUAs7E5B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -23309,7 +23309,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
23309
23309
|
\`)+1;while(Q!==0)this.onNewLine(this.offset+Q),Q=this.source.indexOf(\`
|
|
23310
23310
|
\`,Q)+1}return{type:H,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(H){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 Q=U(H),V=G(Q);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 Q=U(H),V=G(Q);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:V,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(H,Q){if(this.type!=="comment")return!1;if(this.indent<=Q)return!1;return H.every((V)=>V.type==="newline"||V.type==="space")}*documentEnd(H){if(this.type!=="doc-mode"){if(H.end)H.end.push(this.sourceToken);else H.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(H){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(H.end)H.end.push(this.sourceToken);else H.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}Z.Parser=J}),Yz=w((Z)=>{var X=K7(),z=WX(),$=HX(),Y=J7(),q=u(),_=S7(),U=C7();function G(Q){let V=Q.prettyErrors!==!1;return{lineCounter:Q.lineCounter||V&&new _.LineCounter||null,prettyErrors:V}}function W(Q,V={}){let{lineCounter:M,prettyErrors:L}=G(V),A=new U.Parser(M?.addNewLine),D=new X.Composer(V),F=Array.from(D.compose(A.parse(Q)));if(L&&M)for(let j of F)j.errors.forEach($.prettifyError(Q,M)),j.warnings.forEach($.prettifyError(Q,M));if(F.length>0)return F;return Object.assign([],{empty:!0},D.streamInfo())}function B(Q,V={}){let{lineCounter:M,prettyErrors:L}=G(V),A=new U.Parser(M?.addNewLine),D=new X.Composer(V),F=null;for(let j of D.compose(A.parse(Q),!0,Q.length))if(!F)F=j;else if(F.options.logLevel!=="silent"){F.errors.push(new $.YAMLParseError(j.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(L&&M)F.errors.forEach($.prettifyError(Q,M)),F.warnings.forEach($.prettifyError(Q,M));return F}function J(Q,V,M){let L=void 0;if(typeof V==="function")L=V;else if(M===void 0&&V&&typeof V==="object")M=V;let A=B(Q,M);if(!A)return null;if(A.warnings.forEach((D)=>Y.warn(A.options.logLevel,D)),A.errors.length>0)if(A.options.logLevel!=="silent")throw A.errors[0];else A.errors=[];return A.toJS(Object.assign({reviver:L},M))}function H(Q,V,M){let L=null;if(typeof V==="function"||Array.isArray(V))L=V;else if(M===void 0&&V)M=V;if(typeof M==="string")M=M.length;if(typeof M==="number"){let A=Math.round(M);M=A<1?void 0:A>8?{indent:8}:{indent:A}}if(Q===void 0){let{keepUndefined:A}=M??V??{};if(!A)return}if(q.isDocument(Q)&&!L)return Q.toString(M);return new z.Document(Q,L,M).toString(M)}Z.parse=J,Z.parseAllDocuments=W,Z.parseDocument=B,Z.stringify=H}),R7=w((Z)=>{var X=K7(),z=WX(),$=A7(),Y=HX(),q=e6(),_=u(),U=hZ(),G=q0(),W=gZ(),B=vZ(),J=$8(),H=j7(),Q=S7(),V=C7(),M=Yz(),L=t6();Z.Composer=X.Composer,Z.Document=z.Document,Z.Schema=$.Schema,Z.YAMLError=Y.YAMLError,Z.YAMLParseError=Y.YAMLParseError,Z.YAMLWarning=Y.YAMLWarning,Z.Alias=q.Alias,Z.isAlias=_.isAlias,Z.isCollection=_.isCollection,Z.isDocument=_.isDocument,Z.isMap=_.isMap,Z.isNode=_.isNode,Z.isPair=_.isPair,Z.isScalar=_.isScalar,Z.isSeq=_.isSeq,Z.Pair=U.Pair,Z.Scalar=G.Scalar,Z.YAMLMap=W.YAMLMap,Z.YAMLSeq=B.YAMLSeq,Z.CST=J,Z.Lexer=H.Lexer,Z.LineCounter=Q.LineCounter,Z.Parser=V.Parser,Z.parse=M.parse,Z.parseAllDocuments=M.parseAllDocuments,Z.parseDocument=M.parseDocument,Z.stringify=M.stringify,Z.visit=L.visit,Z.visitAsync=L.visitAsync});var E7=["none","acpx","llama-cpp","ollama","claude-code","codex","opencode","anthropic","openrouter","openai-compatible","command"],Vz=E7.filter((Z)=>Z!=="command");var EY=new Set(E7),PY=new Set(Vz);function xZ(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)}function Q8(Z){return Object.fromEntries(Object.entries(Z).filter(([,X])=>X!==void 0))}function Bz(Z){if(typeof Z==="string"){let X=Z.split(",").map((z)=>z.trim()).filter((z)=>z.length>0).join(",");return X.length>0?X:void 0}if(Array.isArray(Z)){let X=Z.map((z)=>z.trim()).filter((z)=>z.length>0).join(",");return X.length>0?X:void 0}return}function _z(Z){if(typeof Z!=="number"||!Number.isFinite(Z))return 10;return Math.min(100,Math.max(1,Math.trunc(Z)))}function Uz(Z){return{primary:Z.filter((X)=>X.supplementary!==!0),supporting:Z.filter((X)=>X.supplementary===!0)}}function Gz(Z,X){if(!xZ(Z))return{totalReturned:X,hasSupplementary:!1,noHits:X===0};let z=typeof Z.totalReturned==="number"?Z.totalReturned:X,$=Z.hasSupplementary===!0,Y="noHits"in Z?Z.noHits===!0:z===0,q=xZ(Z.dedupe)?{enabled:Z.dedupe.enabled===!0,contextEpoch:typeof Z.dedupe.contextEpoch==="number"?Z.dedupe.contextEpoch:void 0,suppressed:typeof Z.dedupe.suppressed==="number"?Z.dedupe.suppressed:0,repeatedReturned:typeof Z.dedupe.repeatedReturned==="number"?Z.dedupe.repeatedReturned:0}:void 0,_=xZ(Z.temporal)?Z.temporal:void 0;return{totalReturned:z,hasSupplementary:$,noHits:Y,...q?{dedupe:q}:{},..._?{temporal:_}:{}}}function S6(Z){let X=xZ(Z)?Z:{},$=(Array.isArray(X.results)?X.results:Array.isArray(X.memories)?X.memories:[]).filter(xZ);return{query:typeof X.query==="string"?X.query:void 0,method:typeof X.method==="string"?X.method:void 0,rows:$,meta:Gz(X.meta,$.length),message:typeof X.message==="string"?X.message:void 0}}function qz(Z){return typeof Z==="string"&&Z.length>0?Z.slice(0,10):"unknown"}function sX(Z,X){let z=typeof Z.score==="number"?\`[\${(Z.score*100).toFixed(0)}%] \`:"",$=typeof Z.source==="string"?Z.source:"unknown",Y=typeof Z.type==="string"?Z.type:"memory",q=typeof Z.who==="string"&&Z.who.length>0?\`, by \${Z.who}\`:"",_=qz(Z.created_at),U=typeof Z.id==="string"&&Z.id.length>0?\`id: \${Z.id}; \`:"";return\`\${X?.includeIndex?\`\${X.includeIndex}. \`:"- "}\${z}\${U}\${Z.content??""} (\${Y}, \${$}, \${_}\${q})\`}function Mz(Z){if(Z.temporal_facet==="session")return"Sessions";if(Z.temporal_facet==="source")return"Source Activity";if(Z.temporal_facet==="occurred"||Z.temporal_facet==="observed"||Z.temporal_facet==="valid")return"Events";return"Memories Captured"}function Lz(Z){let X=new Date(Z);if(Number.isNaN(X.getTime()))return Z.slice(0,10);return X.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric",timeZone:"UTC"})}function Az(Z,X){let z=[Lz(X.start)],$=new Map;for(let Y of Z){let q=Mz(Y);$.set(q,[...$.get(q)??[],Y])}for(let Y of["Sessions","Source Activity","Events","Memories Captured"]){let q=$.get(Y);if(!q||q.length===0)continue;z.push("",Y,...q.map((_)=>sX(_)))}return z.join(\`
|
|
23311
23311
|
\`)}function YX(Z){if(typeof Z!=="object"||Z===null||Array.isArray(Z))return typeof Z==="string"?Z:JSON.stringify(Z,null,2);let X=Z,z=S6(X);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:$,supporting:Y}=Uz(z.rows);if(z.meta.temporal?.mode==="timeline")return Az($,z.meta.temporal);let q=z.meta.totalReturned===1?"memory":"memories",_=X.aggregate?.partial===!0&&typeof X.aggregate.message==="string"?[X.aggregate.message,"",\`Found \${z.meta.totalReturned} \${q}\${z.method?\` (\${z.method})\`:""}.\`]:[\`Found \${z.meta.totalReturned} \${q}\${z.method?\` (\${z.method})\`:""}.\`];if($.length>0)_.push("","Primary matches:",...$.map((U)=>sX(U)));if(Y.length>0)_.push("","Supporting context:",...Y.map((U)=>sX(U)));return _.join(\`
|
|
23312
|
-
\`)}function W8(Z,X={}){return Q8({query:Z,keywordQuery:X.keywordQuery??X.keyword_query,limit:_z(X.limit),project:X.project,type:X.type,tags:X.tags,who:X.who,pinned:X.pinned===!0?!0:void 0,importance_min:X.importance_min,since:X.since,until:X.until,time:X.time,expand:X.expand===!0?!0:void 0,agentId:X.agentId??X.agent_id??X.contextAgentId,sessionKey:X.sessionKey??X.session_key,includeRecalled:X.includeRecalled===!0||X.include_recalled===!0?!0:void 0,scope:X.scope,sourceOnly:X.sourceOnly===!0||X.source_only===!0?!0:void 0,aggregate:X.aggregate===!0?!0:void 0,aggregateBudget:X.aggregateBudget??X.aggregate_budget,saveAggregate:X.saveAggregate===!1||X.save_aggregate===!1?!1:X.saveAggregate===!0||X.save_aggregate===!0?!0:void 0})}function Dz(Z){if(!xZ(Z))return Z;let X=Z.aspects;if(!Array.isArray(X))return Z;return{...Z,aspects:X.map((z)=>{if(!xZ(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:[Q8({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 P7(Z,X={}){return Q8({content:Z,type:X.type,importance:X.importance,tags:Bz(X.tags),who:X.who,pinned:X.pinned===!0?!0:void 0,sourceType:X.sourceType,sourceId:X.sourceId,sourcePath:X.sourcePath,createdAt:X.createdAt,occurredAt:X.occurredAt,observedAt:X.observedAt,validFrom:X.validFrom,validUntil:X.validUntil,sourceCreatedAt:X.sourceCreatedAt,reviewAfter:X.reviewAfter,hints:X.hints,transcript:X.transcript,structured:Dz(X.structured),agentId:X.agentId,visibility:X.visibility,mode:X.mode,idempotencyKey:X.idempotencyKey,runtimePath:X.runtimePath,harness:X.harness,source:X.source})}var Oz=["extract","aggregate-recall","session_end","checkpoint","dreaming"];var I7="unicode61";function Kz(Z){return Z.replace(/\\s+/g," ").trim().toLowerCase()}function T7(Z){Z.exec(\`
|
|
23312
|
+
\`)}function W8(Z,X={}){return Q8({query:Z,keywordQuery:X.keywordQuery??X.keyword_query,limit:_z(X.limit),project:X.project,type:X.type,tags:X.tags,who:X.who,pinned:X.pinned===!0?!0:void 0,importance_min:X.importance_min,since:X.since,until:X.until,time:X.time,expand:X.expand===!0?!0:void 0,agentId:X.agentId??X.agent_id??X.contextAgentId,sessionKey:X.sessionKey??X.session_key,includeRecalled:X.includeRecalled===!0||X.include_recalled===!0?!0:void 0,scope:X.scope,sourceOnly:X.sourceOnly===!0||X.source_only===!0?!0:void 0,aggregate:X.aggregate===!0?!0:void 0,aggregateBudget:X.aggregateBudget??X.aggregate_budget,saveAggregate:X.saveAggregate===!1||X.save_aggregate===!1?!1:X.saveAggregate===!0||X.save_aggregate===!0?!0:void 0})}function Dz(Z){if(!xZ(Z))return Z;let X=Z.aspects;if(!Array.isArray(X))return Z;return{...Z,aspects:X.map((z)=>{if(!xZ(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:[Q8({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 P7(Z,X={}){return Q8({content:Z,type:X.type,importance:X.importance,tags:Bz(X.tags),who:X.who,pinned:X.pinned===!0?!0:void 0,sourceType:X.sourceType,sourceId:X.sourceId,sourcePath:X.sourcePath,createdAt:X.createdAt,occurredAt:X.occurredAt,observedAt:X.observedAt,validFrom:X.validFrom,validUntil:X.validUntil,sourceCreatedAt:X.sourceCreatedAt,reviewAfter:X.reviewAfter,supersedes:X.supersedes,hints:X.hints,transcript:X.transcript,structured:Dz(X.structured),agentId:X.agentId,visibility:X.visibility,mode:X.mode,idempotencyKey:X.idempotencyKey,runtimePath:X.runtimePath,harness:X.harness,source:X.source})}var Oz=["extract","aggregate-recall","session_end","checkpoint","dreaming"];var I7="unicode61";function Kz(Z){return Z.replace(/\\s+/g," ").trim().toLowerCase()}function T7(Z){Z.exec(\`
|
|
23313
23313
|
CREATE VIRTUAL TABLE IF NOT EXISTS memories_fts USING fts5(
|
|
23314
23314
|
content,
|
|
23315
23315
|
content='memories',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/connector-pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.167.0",
|
|
4
4
|
"description": "Signet connector for pi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"typecheck": "tsc --noEmit"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@signetai/connector-base": "0.
|
|
29
|
-
"@signetai/core": "0.
|
|
28
|
+
"@signetai/connector-base": "0.167.0",
|
|
29
|
+
"@signetai/core": "0.167.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.0.0",
|