docuvia 1.5.0 → 1.6.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/ast-worker.js +1 -1
- package/dist/{chunk-NVJTYHFP.js → chunk-4LF6QMCA.js} +2 -2
- package/dist/{chunk-2SHCGLUG.js → chunk-6QKWHRVI.js} +5 -5
- package/dist/{chunk-2SHCGLUG.js.map → chunk-6QKWHRVI.js.map} +1 -1
- package/dist/{chunk-SHETYVFI.js → chunk-PDVG2FNW.js} +2 -2
- package/dist/{chunk-UWJ63SYU.js → chunk-QOHSEJH7.js} +2 -2
- package/dist/cli.js +40 -40
- package/dist/cli.js.map +1 -1
- package/dist/fs-utils-AO2MH2JN.js +3 -0
- package/dist/{init-templates-2B5JAJCP.js → init-templates-Y7UDMTIL.js} +2 -2
- package/package.json +1 -1
- package/dist/fs-utils-PHJS46G6.js +0 -3
- /package/dist/{chunk-NVJTYHFP.js.map → chunk-4LF6QMCA.js.map} +0 -0
- /package/dist/{chunk-SHETYVFI.js.map → chunk-PDVG2FNW.js.map} +0 -0
- /package/dist/{chunk-UWJ63SYU.js.map → chunk-QOHSEJH7.js.map} +0 -0
- /package/dist/{fs-utils-PHJS46G6.js.map → fs-utils-AO2MH2JN.js.map} +0 -0
- /package/dist/{init-templates-2B5JAJCP.js.map → init-templates-Y7UDMTIL.js.map} +0 -0
package/dist/ast-worker.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{c,d as a,e as y,f as _,h as T}from"./chunk-
|
|
2
|
+
import{c,d as a,e as y,f as _,h as T}from"./chunk-4LF6QMCA.js";import{ca as P,d as L,fa as E}from"./chunk-6QKWHRVI.js";import"./chunk-KVOCOCYJ.js";import{parentPort as N}from"worker_threads";import{Parser as w,Language as U}from"web-tree-sitter";import*as O from"path";import*as D from"fs";import{createHash as H}from"crypto";function h(e){return H(P).update(e.text).digest("hex")}var x=new L(e=>N?.postMessage(e));process.on("uncaughtException",e=>{x.error(a.WORKER_UNCAUGHT_EXCEPTION,{error:e instanceof Error?e.message:String(e)})});process.on("unhandledRejection",e=>{x.error(a.WORKER_UNHANDLED_REJECTION,{error:e instanceof Error?e.message:String(e)})});var S=!1,b=null;function G(){return b??=_(),b}var C=new Map;function K(e){let t=C.get(e);return t||(t=U.load(e),C.set(e,t)),t}function Y(e){let t=[],n=e.matchAll(/import\s+{([^}]+)}\s+from\s+['"]([^'"]+)['"]/g);for(let r of n)t.push({localName:r[1].trim(),originalName:r[1].trim(),modulePath:r[2]});return t}function F(e){return e.childForFieldName("name")?.text||e.descendantsOfType("identifier")[0]?.text||a.ANONYMOUS_NAME}function Q(e){let t=e.childForFieldName("declarator")?.childForFieldName("declarator");if(t)return t.type===c.QUALIFIED_IDENTIFIER?t.childForFieldName("name")?.text??a.ANONYMOUS_NAME:t.text}function V(e){let t=e.childForFieldName("name");if(t)return t.text;let n=Q(e);if(n)return n;let r=new Set([c.VARIABLE_DECLARATOR,c.ASSIGNMENT_EXPRESSION,c.PAIR,c.PUBLIC_FIELD_DEFINITION]),o=e.parent;for(;o&&o.type!==c.ARGUMENTS;){if(r.has(o.type)){let s=o.childForFieldName("name")||o.childForFieldName("key")||o.childForFieldName("left");if(s)return s.text}o=o.parent}return a.ANONYMOUS_NAME}function W(e){return e.childForFieldName("function")||e.childForFieldName("expression")||e.childForFieldName("type")||e.childForFieldName("name")||e.childForFieldName("method")||e}function J(e){let t=W(e),n=t.namedChildren,r=n[n.length-1],o=n.length>=2?n[n.length-2]:void 0;if(!r||!o)return{targetFunction:f(t.text),calleeName:t.text,calleeKind:"bare"};if(!j.has(r.type))return{targetFunction:f(t.text),calleeKind:"computed"};let s=r.text,i=o.text;return i.includes("(")?{targetFunction:f(t.text),calleeName:s,receiverText:i,calleeKind:"arg-chain"}:{targetFunction:f(t.text),calleeName:s,receiverText:i,calleeKind:i==="this"||i==="super"?"this":"member"}}function f(e){return e.replace(/\s+/g,"")}var j=new Set(["identifier","property_identifier","field_identifier","shorthand_property_identifier","attribute"]);function B(e){return((e.childForFieldName("property")||e.childForFieldName("field")||e.childForFieldName("attribute")||e.childForFieldName("name")||e.childForFieldName("method"))??e).startPosition}function g(e,t){let n=e.parent;for(;n;){if(t.has(n.id))return F(n);n=n.parent}return a.ANONYMOUS_NAME}function v(e){return e.type===c.TYPE_IDENTIFIER?e.text:e.descendantsOfType(c.TYPE_IDENTIFIER)[0]?.text}function X(e){let t=e.parent;for(;t;){if(t.type===c.IMPL_ITEM){let n=t.childForFieldName("type");return n?v(n):void 0}t=t.parent}}function z(e){let n=e.childForFieldName("receiver")?.namedChild(0)?.childForFieldName("type");return n?v(n):void 0}function Z(e){let n=e.childForFieldName("declarator")?.childForFieldName("declarator");if(n?.type!==c.QUALIFIED_IDENTIFIER)return;let r=n.childForFieldName("scope");if(r)return r.type===c.QUALIFIED_IDENTIFIER?r.childForFieldName("name")?.text:r.text}function $(e){return X(e)??z(e)??Z(e)}function q(e,t,n){let r=t.extractClasses(e.rootNode);for(let o of r)n.push({name:F(o),startLine:o.startPosition.row,endLine:o.endPosition.row,methods:[],contentHash:h(o)});return r}var ee=new Set(["arrow_function","function_expression"]);function te(e,t,n){let r=t.extractVariables?.(e.rootNode)??[];for(let o of r){let s=o.childForFieldName("value");s&&ee.has(s.type)||n.push({name:F(o),startLine:o.startPosition.row,endLine:o.endPosition.row,contentHash:h(o)})}return r}function ne(e,t,n,r){let o=new Set(r.map(i=>i.id)),s=t.extractFunctions(e.rootNode);for(let i of s){let d=g(i,o),l=d===a.ANONYMOUS_NAME?$(i):d;n.push({name:V(i),startLine:i.startPosition.row,endLine:i.endPosition.row,contentHash:h(i),containerName:l})}return s}function re(e,t,n,r){let o=new Set(n.map(i=>i.id)),s=t.extractCalls(e.rootNode);for(let i of s){if(r.length>=1e3)break;let d=B(i),l=J(i);r.push({sourceFunction:g(i,o),targetFunction:l.targetFunction,startLine:d.row,startColumn:d.column,calleeName:l.calleeName,receiverText:l.receiverText,calleeKind:l.calleeKind})}}function oe(e,t,n,r){if(!t.extractImplements)return;let o=new Set(n.map(s=>s.id));for(let s of t.extractImplements(e.rootNode))r.push({sourceClass:g(s,o),targetInterface:s.text})}function se(e,t,n,r){if(!t.extractExtends)return;let o=new Set(n.map(s=>s.id));for(let s of t.extractExtends(e.rootNode))r.push({sourceClass:g(s,o),targetClass:s.text})}var ie=new Set([E.TYPESCRIPT,E.JAVASCRIPT]),ae="Worker",ce="path",le="resolve",de="join",ue="__dirname";function me(e){if(e.type!=="call_expression")return!1;let t=e.childForFieldName("function");if(!t||t.type!=="member_expression")return!1;let n=t.childForFieldName("object")?.text,r=t.childForFieldName("property")?.text;return n===ce&&(r===le||r===de)}function ge(e){let t=e.childForFieldName("arguments");return!t||!t.namedChildren.some(o=>o?.type==="identifier"&&o.text===ue)?void 0:t.descendantsOfType("string")[0]?.text.replace(/['"]/g,"")}function pe(e,t){for(let n of e.rootNode.descendantsOfType(c.ASSIGNMENT_EXPRESSION)){if(!n)continue;let r=n.childForFieldName("left"),o=n.childForFieldName("right");if(r?.text!==t||!o||!me(o))continue;let s=ge(o);if(s)return s}}function fe(e,t){if(t.type==="string")return t.text.replace(/['"]/g,"");if(t.type==="identifier"||t.type==="member_expression")return pe(e,t.text)}function Ne(e,t,n,r){if(!ie.has(t))return;let o=new Set(n.map(s=>s.id));for(let s of e.rootNode.descendantsOfType("new_expression")){if(!s||s.childForFieldName("constructor")?.text!==ae)continue;let l=s.childForFieldName("arguments")?.namedChildren.find(p=>p!==null);if(!l)continue;let m=fe(e,l);m&&r.push({sourceFunction:g(s,o),targetPath:m})}}function Ee(e,t,n){let r=[],o=[],s=[],i=[],d=[],l=[],m=[],p=[],A=[],I=[];if(e){r.push(a.parsedViaTreeSitter(e.rootNode.childCount));try{let u=q(e,t,d),R=ne(e,t,i,u),M=t.extractImports(e.rootNode);o.push(...y(M)),te(e,t,l),re(e,t,R,m),oe(e,t,u,p),se(e,t,u,A),Ne(e,n,R,I),r.push(a.QUERIED_VIA_LANGUAGE_PROVIDER)}catch(u){r.push(a.providerQueryFailed(u instanceof Error?u.message:String(u)))}}return{imports:o,exports:s,functions:i,classes:d,variables:l,calls:m,implements:p,extends:A,workerSpawns:I,decisions:r}}function he(e,t){for(let n of e.drainQueryCompileFailures?.()??[])x.error(a.QUERY_COMPILE_FAILED,{language:t,kind:n.kind,pattern:n.pattern,message:n.message})}function xe(e,t,n,r){let o=new w;o.setLanguage(n),t.initQueries?.(n),he(t,r);let s=o.parse(e),i=Ee(s,t,r);return s&&s.delete(),o.delete(),i}async function Fe(e){S||(await w.init(),S=!0);let t=await G(),n=O.extname(e.filePath),r=t.getProviderForExtension(n);if(!r)return{taskId:e.taskId,success:!0,data:{imports:[],exports:[],functions:[],classes:[],calls:[],decisions:[a.noLanguageProviderForExtension(n)]}};let{wasmPath:o,attemptedPaths:s}=T(r.wasm_file);if(!D.existsSync(o))return{taskId:e.taskId,success:!0,data:{imports:Y(e.code),exports:[],functions:[],classes:[],calls:[],decisions:[a.wasmNotFound(e.language,s.join(", "))]}};let i=await K(o),d=xe(e.code,r,i,e.language);return{taskId:e.taskId,success:!0,data:d}}N?.on("message",async e=>{try{let t=await Fe(e);N?.postMessage(t)}catch(t){N?.postMessage({taskId:e.taskId,success:!1,error:t.stack||String(t)})}});export{Fe as buildParseResponse,ne as collectFunctionNodes,Ne as collectWorkerSpawns,J as getCalleeEvidence,he as reportQueryCompileFailures,V as resolveCallableName,T as resolveWasmPath};
|
|
3
3
|
//# sourceMappingURL=ast-worker.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{ba as F,fa as u,ga as v,ha as k,ia as Y,ja as B,ka as G,la as H,ma as Q,na as V,oa as j,pa as W,qa as q}from"./chunk-2SHCGLUG.js";var J="anonymous";var Pt="AstWorkerCrashError",Ft={ARGUMENTS:"arguments",VARIABLE_DECLARATOR:"variable_declarator",ASSIGNMENT_EXPRESSION:"assignment_expression",PAIR:"pair",PUBLIC_FIELD_DEFINITION:"public_field_definition",IMPL_ITEM:"impl_item",TYPE_IDENTIFIER:"type_identifier",POINTER_TYPE:"pointer_type",QUALIFIED_IDENTIFIER:"qualified_identifier"},gt={PARSE_FAILURE_NO_DETAIL:"parse returned success=false with no error detail",PARSE_FAILURE_RESULT:"AST parse returned failure result",PARSE_THREW:"AST parse threw (worker crash or rejection)",WORKER_UNCAUGHT_EXCEPTION:"AST worker uncaughtException",QUERY_COMPILE_FAILED:"AST language query failed to compile; using fallback",WORKER_UNHANDLED_REJECTION:"AST worker unhandledRejection",WORKER_EXITED_DURING_SHUTDOWN:"AST worker exited during pool shutdown (expected)",WORKER_CRASHED_EXITED:"AST worker crashed/exited",WORKER_EXITED_UNEXPECTEDLY:"Worker exited unexpectedly",UNKNOWN_FILE:"(unknown file)",PARSE_CACHE_HIT:"AST parse cache hit",CACHE_METRICS_AND_QUEUE_PERFORMANCE:"AST cache metrics and queue performance",TASK_TIMED_OUT_TERMINATING:"AST worker task timed out \u2014 terminating stuck worker",WORKER_TERMINATE_FAILED:"AST worker terminate() rejected \u2014 forced termination did not complete",QUERIED_VIA_LANGUAGE_PROVIDER:"Queried nodes using @workspace/ast-core LanguageProvider",ANONYMOUS_NAME:J,workerCrashWhileParsing:n=>`AST worker crashed while parsing ${n}: `,taskTimedOutAfterMs:(n,e)=>`AST worker task ${n} timed out after ${e}ms`,workerExitedWithCode:n=>`Worker exited with code ${n}`,noLanguageProviderForExtension:n=>`No language provider registered for extension ${n}`,wasmNotFound:(n,e)=>`WASM not found for ${n}, AST parsing skipped (Regex fallback used). Tried paths: ${e}`,parsedViaTreeSitter:n=>`Parsed via web-tree-sitter (nodes: ${n})`,providerQueryFailed:n=>`ast-core provider query failed: ${n}`};var p={FILE:"file",CLASS:"class",FUNCTION:"function",CALL:"call",METHOD_CALL:"method_call",IMPORT:"import",API_CONTRACT:"api_contract"};var N={IDENTIFIER:"identifier",SCOPED_IDENTIFIER:"scoped_identifier",QUALIFIED_IDENTIFIER:"qualified_identifier",DOTTED_NAME:"dotted_name",ALIASED_IMPORT:"aliased_import",USE_AS_CLAUSE:"use_as_clause",USE_WILDCARD:"use_wildcard",SCOPED_USE_LIST:"scoped_use_list",USE_LIST:"use_list",DOT:"dot",BLANK_IDENTIFIER:"blank_identifier",NAMESPACE_USE_DECLARATION:"namespace_use_declaration",INCLUDE_EXPRESSION:"include_expression",INCLUDE_ONCE_EXPRESSION:"include_once_expression",REQUIRE_EXPRESSION:"require_expression",REQUIRE_ONCE_EXPRESSION:"require_once_expression",IMPORT_STATEMENT:"import_statement",IMPORT_FROM_STATEMENT:"import_from_statement",USE_DECLARATION:"use_declaration",IMPORT_DECLARATION:"import_declaration",PREPROC_INCLUDE:"preproc_include",USING_DECLARATION:"using_declaration",CALL:"call",USING_DIRECTIVE:"using_directive",CALL_EXPRESSION:"call_expression",METHOD_INVOCATION:"method_invocation",EXPLICIT_CONSTRUCTOR_INVOCATION:"explicit_constructor_invocation",COMMAND_CALL:"command_call",FUNCTION_CALL_EXPRESSION:"function_call_expression",MEMBER_CALL_EXPRESSION:"member_call_expression",SCOPED_CALL_EXPRESSION:"scoped_call_expression",INVOCATION_EXPRESSION:"invocation_expression",OBJECT_CREATION_EXPRESSION:"object_creation_expression",MEMBER_EXPRESSION:"member_expression",ATTRIBUTE:"attribute",MEMBER_ACCESS_EXPRESSION:"member_access_expression",VARIABLE_DECLARATION:"variable_declaration",LEXICAL_DECLARATION:"lexical_declaration",VARIABLE_DECLARATOR:"variable_declarator",ARROW_FUNCTION:"arrow_function",FUNCTION_DECLARATION:"function_declaration",METHOD_DEFINITION:"method_definition",CLASS_DECLARATION:"class_declaration",INTERFACE_DECLARATION:"interface_declaration",TYPE_ALIAS_DECLARATION:"type_alias_declaration",EXPORT_STATEMENT:"export_statement"};var d="*",_e=["require","require_relative","load"],K="this",Ae="new";function wt(n){let e=[];for(let o of n){let r=o.type,i=pe[r];if(i){i(o,e);continue}if(be(r)){ke(o,r,e);continue}Be(o,e)}return e}var pe={[N.IMPORT_STATEMENT]:Ce,[N.EXPORT_STATEMENT]:Oe,[N.IMPORT_FROM_STATEMENT]:Se,[N.USE_DECLARATION]:$e,[N.IMPORT_DECLARATION]:Ue,[N.PREPROC_INCLUDE]:Me,[N.USING_DECLARATION]:ye,[N.CALL]:we,[N.USING_DIRECTIVE]:Ye};function Ce(n,e){let o=n.descendantsOfType("string").pop();if(!o)return;let r=o.text.replace(/['"]/g,""),i=n.descendantsOfType("namespace_import")[0];if(i){let l=i.descendantsOfType("identifier")[0];l&&e.push({localName:l.text,originalName:d,modulePath:r});return}let s=n.descendantsOfType("named_imports")[0];if(s){let l=s.descendantsOfType("import_specifier");for(let I of l){if(!I)continue;let E=I.childForFieldName("name"),f=I.childForFieldName("alias");if(E){let S=E.text,C=f?f.text:S;e.push({localName:C,originalName:S,modulePath:r})}}return}let a=n.descendantsOfType("identifier")[0];a&&e.push({localName:a.text,originalName:d,modulePath:r})}function Oe(n,e){let o=n.childForFieldName("source");if(!o)return;let r=o.text.replace(/['"]/g,""),i=n.descendantsOfType("export_clause")[0];if(i)for(let s of i.descendantsOfType("export_specifier")){if(!s)continue;let a=s.childForFieldName("name");if(!a)continue;let l=s.childForFieldName("alias");e.push({localName:l?l.text:a.text,originalName:a.text,modulePath:r,viaReexport:!0})}}function Se(n,e){let o=n.childForFieldName("module_name");if(!o)return;let r=o.text;if(n.descendantsOfType("wildcard_import")[0])return;n.childForFieldName("name")&&Ge(n,r,e)}function Re(n,e){let o=n.childForFieldName("path"),r=n.childForFieldName("alias");o&&r&&e.push({localName:r.text,originalName:d,modulePath:o.text})}function Le(n,e,o){let r=n.childForFieldName("path"),i=n.childForFieldName("alias");r&&i&&o.push({localName:i.text,originalName:d,modulePath:`${e}::${r.text}`})}function he(n,e,o){let r=n.descendantsOfType("identifier").pop();r&&o.push({localName:r.text,originalName:d,modulePath:`${e}::${n.text}`})}function De(n,e,o){if(n.type===N.USE_AS_CLAUSE){Le(n,e,o);return}if(n.type===N.IDENTIFIER){o.push({localName:n.text,originalName:d,modulePath:`${e}::${n.text}`});return}n.type===N.SCOPED_IDENTIFIER&&he(n,e,o)}function Pe(n,e){let o=n.childForFieldName("path"),r=n.childForFieldName("list");if(!o||!r)return;let i=o.text;for(let s of r.namedChildren)s&&De(s,i,e)}function Fe(n,e){let o=n.descendantsOfType("identifier"),r=o[o.length-1];r&&e.push({localName:r.text,originalName:d,modulePath:n.text})}function ge(n,e){for(let o of n.namedChildren)o&&o.type===N.IDENTIFIER&&e.push({localName:o.text,originalName:d,modulePath:o.text})}function $e(n,e){let o=n.childForFieldName("argument");if(o){if(o.type===N.USE_AS_CLAUSE){Re(o,e);return}if(o.type!==N.USE_WILDCARD){if(o.type===N.SCOPED_USE_LIST){Pe(o,e);return}if(o.type===N.SCOPED_IDENTIFIER||o.type===N.IDENTIFIER){Fe(o,e);return}o.type===N.USE_LIST&&ge(o,e)}}}function xe(n,e){let o=n.childForFieldName("path");if(!o)return;let r=o.text.replace(/['"]/g,""),i=n.childForFieldName("name");if(i){if(i.type===N.DOT||i.type===N.BLANK_IDENTIFIER)return;e.push({localName:i.text,originalName:d,modulePath:r})}else{let s=r.split("/"),a=s[s.length-1];e.push({localName:a,originalName:d,modulePath:r})}}function Ue(n,e){let o=n.descendantsOfType("import_spec_list")[0];if(!o)return;let r=o.descendantsOfType("import_spec");for(let i of r)i&&xe(i,e)}function Me(n,e){let o=n.childForFieldName("path");if(o){let r=o.text.replace(/[<>"']/g,"");e.push({localName:r,originalName:d,modulePath:r})}}function ye(n,e){let o=n.namedChildren;for(let r of o)if(r)if(r.type===N.QUALIFIED_IDENTIFIER){let i=r.descendantsOfType("identifier"),s=i[i.length-1];s&&e.push({localName:s.text,originalName:d,modulePath:r.text})}else r.type===N.IDENTIFIER&&e.push({localName:r.text,originalName:d,modulePath:r.text})}function we(n,e){let o=n.childForFieldName("method");if(!o)return;let r=o.text;if(!_e.includes(r))return;let i=n.childForFieldName("arguments");if(!i)return;let s=i.descendantsOfType("string_content")[0]||i.descendantsOfType("string")[0];if(!s)return;let a=s.text.replace(/['"]/g,""),l=a.replace(/\.rb$/,"");e.push({localName:l,originalName:d,modulePath:a})}function be(n){return n===N.NAMESPACE_USE_DECLARATION||n===N.INCLUDE_EXPRESSION||n===N.INCLUDE_ONCE_EXPRESSION||n===N.REQUIRE_EXPRESSION||n===N.REQUIRE_ONCE_EXPRESSION}function Xe(n,e){let o=n.descendantsOfType("qualified_name")[0]||n.descendantsOfType("name")[0];if(o){let r=o.text,i=r.split("\\"),s=i[i.length-1];e.push({localName:s,originalName:d,modulePath:r})}}function ve(n,e){let o=n.descendantsOfType("string")[0]||n.descendantsOfType("string_content")[0];if(o){let r=o.text.replace(/['"]/g,"");e.push({localName:r,originalName:d,modulePath:r})}}function ke(n,e,o){e===N.NAMESPACE_USE_DECLARATION?Xe(n,o):ve(n,o)}function Ye(n,e){let o=n.descendantsOfType("qualified_name")[0]||n.descendantsOfType("identifier")[0];if(o){let r=o.text,i=r.split("."),s=i[i.length-1];e.push({localName:s,originalName:d,modulePath:r})}}function Be(n,e){let o=n.descendantsOfType("string").pop();if(!o)return;let r=o.text.replace(/['"]/g,""),i=n.descendantsOfType("identifier");for(let s of i)s&&(e.some(a=>a.localName===s.text)||e.push({localName:s.text,originalName:s.text,modulePath:r}))}function Ge(n,e,o){if(n.childForFieldName("name")){for(let i of n.namedChildren)if(i)if(i.type===N.ALIASED_IMPORT){let s=i.childForFieldName("name"),a=i.childForFieldName("alias");s&&a&&o.push({localName:a.text,originalName:s.text,modulePath:e})}else if(i.type===N.DOTTED_NAME){let s=i.descendantsOfType("identifier"),a=s[s.length-1];a&&o.push({localName:a.text,originalName:i.text,modulePath:e})}else i.type===N.IDENTIFIER&&o.push({localName:i.text,originalName:i.text,modulePath:e})}}function He(n){let e=n.childForFieldName("function");if(!e)return{isMethodCall:!1,methodName:""};if(e.type===N.MEMBER_EXPRESSION){let o=e.childForFieldName("property"),r=e.childForFieldName("object");if(o)return{isMethodCall:!0,methodName:o.text,objectName:r?.text}}return{isMethodCall:!1,methodName:e.text}}function Qe(n){let e=n.childForFieldName("function");if(!e)return{isMethodCall:!1,methodName:""};if(e.type===N.ATTRIBUTE){let o=e.childForFieldName("attribute"),r=e.childForFieldName("object");if(o)return{isMethodCall:!0,methodName:o.text,objectName:r?.text}}return{isMethodCall:!1,methodName:e.text}}function Ve(n){let e=n.childForFieldName("name"),o=n.childForFieldName("object");if(e)return{isMethodCall:!0,methodName:e.text,objectName:o?.text}}function je(n){return{isMethodCall:!0,methodName:n.childForFieldName("constructor")?.text||K,objectName:K}}function We(n){let e=n.childForFieldName("method");if(!e)return;let o=n.childForFieldName("receiver");return o?{isMethodCall:!0,methodName:e.text,objectName:o.text}:{isMethodCall:!1,methodName:e.text}}function M(n){let e=n.type,r=n.childForFieldName("name")?.text||"";if(e===N.MEMBER_CALL_EXPRESSION){let i=n.childForFieldName("object");return{isMethodCall:!0,methodName:r,objectName:i?.text}}if(e===N.SCOPED_CALL_EXPRESSION){let i=n.childForFieldName("scope");return{isMethodCall:!0,methodName:r,objectName:i?.text}}return{isMethodCall:!1,methodName:r}}function qe(n){let e=n.childForFieldName("function")||n.namedChildren[0];if(e&&e.type===N.MEMBER_ACCESS_EXPRESSION){let o=e.childForFieldName("name"),r=e.childForFieldName("expression");if(o)return{isMethodCall:!0,methodName:o.text,objectName:r?.text}}if(e)return{isMethodCall:!1,methodName:e.text}}function Je(n){let e=n.childForFieldName("type");return{isMethodCall:!0,methodName:Ae,objectName:e?.text}}var bt={[N.CALL_EXPRESSION]:He,[N.CALL]:Qe,[N.METHOD_INVOCATION]:Ve,[N.EXPLICIT_CONSTRUCTOR_INVOCATION]:je,[N.COMMAND_CALL]:We,[N.FUNCTION_CALL_EXPRESSION]:M,[N.MEMBER_CALL_EXPRESSION]:M,[N.SCOPED_CALL_EXPRESSION]:M,[N.INVOCATION_EXPRESSION]:qe,[N.OBJECT_CREATION_EXPRESSION]:Je};var Ke=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,L=class n extends Date{#t=!1;#n=!1;#e=null;constructor(e){let o=!0,r=!0,i="Z";if(typeof e=="string"){let s=e.match(Ke);s?(s[1]||(o=!1,e=`0000-01-01T${e}`),r=!!s[2],r&&e[10]===" "&&(e=e.replace(" ","T")),s[2]&&+s[2]>23?e="":(i=s[3]||null,e=e.toUpperCase(),!i&&r&&(e+="Z"))):e=""}super(e),isNaN(this.getTime())||(this.#t=o,this.#n=r,this.#e=i)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#e===null)return e.slice(0,-1);if(this.#e==="Z")return e;let o=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return o=this.#e[0]==="-"?o:-o,new Date(this.getTime()-o*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(e,o="Z"){let r=new n(e);return r.#e=o,r}static wrapAsLocalDateTime(e){let o=new n(e);return o.#e=null,o}static wrapAsLocalDate(e){let o=new n(e);return o.#n=!1,o.#e=null,o}static wrapAsLocalTime(e){let o=new n(e);return o.#t=!1,o.#e=null,o}};function ze(n,e){let o=n.slice(0,e).split(/\r\n|\n|\r/g);return[o.length,o.pop().length+1]}function Ze(n,e,o){let r=n.split(/\r\n|\n|\r/g),i="",s=(Math.log10(e+1)|0)+1;for(let a=e-1;a<=e+1;a++){let l=r[a-1];l&&(i+=a.toString().padEnd(s," "),i+=": ",i+=l,i+=`
|
|
2
|
+
import{ba as F,fa as u,ga as v,ha as k,ia as Y,ja as B,ka as G,la as H,ma as Q,na as V,oa as j,pa as W,qa as q}from"./chunk-6QKWHRVI.js";var J="anonymous";var Pt="AstWorkerCrashError",Ft={ARGUMENTS:"arguments",VARIABLE_DECLARATOR:"variable_declarator",ASSIGNMENT_EXPRESSION:"assignment_expression",PAIR:"pair",PUBLIC_FIELD_DEFINITION:"public_field_definition",IMPL_ITEM:"impl_item",TYPE_IDENTIFIER:"type_identifier",POINTER_TYPE:"pointer_type",QUALIFIED_IDENTIFIER:"qualified_identifier"},gt={PARSE_FAILURE_NO_DETAIL:"parse returned success=false with no error detail",PARSE_FAILURE_RESULT:"AST parse returned failure result",PARSE_THREW:"AST parse threw (worker crash or rejection)",WORKER_UNCAUGHT_EXCEPTION:"AST worker uncaughtException",QUERY_COMPILE_FAILED:"AST language query failed to compile; using fallback",WORKER_UNHANDLED_REJECTION:"AST worker unhandledRejection",WORKER_EXITED_DURING_SHUTDOWN:"AST worker exited during pool shutdown (expected)",WORKER_CRASHED_EXITED:"AST worker crashed/exited",WORKER_EXITED_UNEXPECTEDLY:"Worker exited unexpectedly",UNKNOWN_FILE:"(unknown file)",PARSE_CACHE_HIT:"AST parse cache hit",CACHE_METRICS_AND_QUEUE_PERFORMANCE:"AST cache metrics and queue performance",TASK_TIMED_OUT_TERMINATING:"AST worker task timed out \u2014 terminating stuck worker",WORKER_TERMINATE_FAILED:"AST worker terminate() rejected \u2014 forced termination did not complete",QUERIED_VIA_LANGUAGE_PROVIDER:"Queried nodes using @workspace/ast-core LanguageProvider",ANONYMOUS_NAME:J,workerCrashWhileParsing:n=>`AST worker crashed while parsing ${n}: `,taskTimedOutAfterMs:(n,e)=>`AST worker task ${n} timed out after ${e}ms`,workerExitedWithCode:n=>`Worker exited with code ${n}`,noLanguageProviderForExtension:n=>`No language provider registered for extension ${n}`,wasmNotFound:(n,e)=>`WASM not found for ${n}, AST parsing skipped (Regex fallback used). Tried paths: ${e}`,parsedViaTreeSitter:n=>`Parsed via web-tree-sitter (nodes: ${n})`,providerQueryFailed:n=>`ast-core provider query failed: ${n}`};var p={FILE:"file",CLASS:"class",FUNCTION:"function",CALL:"call",METHOD_CALL:"method_call",IMPORT:"import",API_CONTRACT:"api_contract"};var N={IDENTIFIER:"identifier",SCOPED_IDENTIFIER:"scoped_identifier",QUALIFIED_IDENTIFIER:"qualified_identifier",DOTTED_NAME:"dotted_name",ALIASED_IMPORT:"aliased_import",USE_AS_CLAUSE:"use_as_clause",USE_WILDCARD:"use_wildcard",SCOPED_USE_LIST:"scoped_use_list",USE_LIST:"use_list",DOT:"dot",BLANK_IDENTIFIER:"blank_identifier",NAMESPACE_USE_DECLARATION:"namespace_use_declaration",INCLUDE_EXPRESSION:"include_expression",INCLUDE_ONCE_EXPRESSION:"include_once_expression",REQUIRE_EXPRESSION:"require_expression",REQUIRE_ONCE_EXPRESSION:"require_once_expression",IMPORT_STATEMENT:"import_statement",IMPORT_FROM_STATEMENT:"import_from_statement",USE_DECLARATION:"use_declaration",IMPORT_DECLARATION:"import_declaration",PREPROC_INCLUDE:"preproc_include",USING_DECLARATION:"using_declaration",CALL:"call",USING_DIRECTIVE:"using_directive",CALL_EXPRESSION:"call_expression",METHOD_INVOCATION:"method_invocation",EXPLICIT_CONSTRUCTOR_INVOCATION:"explicit_constructor_invocation",COMMAND_CALL:"command_call",FUNCTION_CALL_EXPRESSION:"function_call_expression",MEMBER_CALL_EXPRESSION:"member_call_expression",SCOPED_CALL_EXPRESSION:"scoped_call_expression",INVOCATION_EXPRESSION:"invocation_expression",OBJECT_CREATION_EXPRESSION:"object_creation_expression",MEMBER_EXPRESSION:"member_expression",ATTRIBUTE:"attribute",MEMBER_ACCESS_EXPRESSION:"member_access_expression",VARIABLE_DECLARATION:"variable_declaration",LEXICAL_DECLARATION:"lexical_declaration",VARIABLE_DECLARATOR:"variable_declarator",ARROW_FUNCTION:"arrow_function",FUNCTION_DECLARATION:"function_declaration",METHOD_DEFINITION:"method_definition",CLASS_DECLARATION:"class_declaration",INTERFACE_DECLARATION:"interface_declaration",TYPE_ALIAS_DECLARATION:"type_alias_declaration",EXPORT_STATEMENT:"export_statement"};var d="*",_e=["require","require_relative","load"],K="this",Ae="new";function wt(n){let e=[];for(let o of n){let r=o.type,i=pe[r];if(i){i(o,e);continue}if(be(r)){ke(o,r,e);continue}Be(o,e)}return e}var pe={[N.IMPORT_STATEMENT]:Ce,[N.EXPORT_STATEMENT]:Oe,[N.IMPORT_FROM_STATEMENT]:Se,[N.USE_DECLARATION]:$e,[N.IMPORT_DECLARATION]:Ue,[N.PREPROC_INCLUDE]:Me,[N.USING_DECLARATION]:ye,[N.CALL]:we,[N.USING_DIRECTIVE]:Ye};function Ce(n,e){let o=n.descendantsOfType("string").pop();if(!o)return;let r=o.text.replace(/['"]/g,""),i=n.descendantsOfType("namespace_import")[0];if(i){let l=i.descendantsOfType("identifier")[0];l&&e.push({localName:l.text,originalName:d,modulePath:r});return}let s=n.descendantsOfType("named_imports")[0];if(s){let l=s.descendantsOfType("import_specifier");for(let I of l){if(!I)continue;let E=I.childForFieldName("name"),f=I.childForFieldName("alias");if(E){let S=E.text,C=f?f.text:S;e.push({localName:C,originalName:S,modulePath:r})}}return}let a=n.descendantsOfType("identifier")[0];a&&e.push({localName:a.text,originalName:d,modulePath:r})}function Oe(n,e){let o=n.childForFieldName("source");if(!o)return;let r=o.text.replace(/['"]/g,""),i=n.descendantsOfType("export_clause")[0];if(i)for(let s of i.descendantsOfType("export_specifier")){if(!s)continue;let a=s.childForFieldName("name");if(!a)continue;let l=s.childForFieldName("alias");e.push({localName:l?l.text:a.text,originalName:a.text,modulePath:r,viaReexport:!0})}}function Se(n,e){let o=n.childForFieldName("module_name");if(!o)return;let r=o.text;if(n.descendantsOfType("wildcard_import")[0])return;n.childForFieldName("name")&&Ge(n,r,e)}function Re(n,e){let o=n.childForFieldName("path"),r=n.childForFieldName("alias");o&&r&&e.push({localName:r.text,originalName:d,modulePath:o.text})}function Le(n,e,o){let r=n.childForFieldName("path"),i=n.childForFieldName("alias");r&&i&&o.push({localName:i.text,originalName:d,modulePath:`${e}::${r.text}`})}function he(n,e,o){let r=n.descendantsOfType("identifier").pop();r&&o.push({localName:r.text,originalName:d,modulePath:`${e}::${n.text}`})}function De(n,e,o){if(n.type===N.USE_AS_CLAUSE){Le(n,e,o);return}if(n.type===N.IDENTIFIER){o.push({localName:n.text,originalName:d,modulePath:`${e}::${n.text}`});return}n.type===N.SCOPED_IDENTIFIER&&he(n,e,o)}function Pe(n,e){let o=n.childForFieldName("path"),r=n.childForFieldName("list");if(!o||!r)return;let i=o.text;for(let s of r.namedChildren)s&&De(s,i,e)}function Fe(n,e){let o=n.descendantsOfType("identifier"),r=o[o.length-1];r&&e.push({localName:r.text,originalName:d,modulePath:n.text})}function ge(n,e){for(let o of n.namedChildren)o&&o.type===N.IDENTIFIER&&e.push({localName:o.text,originalName:d,modulePath:o.text})}function $e(n,e){let o=n.childForFieldName("argument");if(o){if(o.type===N.USE_AS_CLAUSE){Re(o,e);return}if(o.type!==N.USE_WILDCARD){if(o.type===N.SCOPED_USE_LIST){Pe(o,e);return}if(o.type===N.SCOPED_IDENTIFIER||o.type===N.IDENTIFIER){Fe(o,e);return}o.type===N.USE_LIST&&ge(o,e)}}}function xe(n,e){let o=n.childForFieldName("path");if(!o)return;let r=o.text.replace(/['"]/g,""),i=n.childForFieldName("name");if(i){if(i.type===N.DOT||i.type===N.BLANK_IDENTIFIER)return;e.push({localName:i.text,originalName:d,modulePath:r})}else{let s=r.split("/"),a=s[s.length-1];e.push({localName:a,originalName:d,modulePath:r})}}function Ue(n,e){let o=n.descendantsOfType("import_spec_list")[0];if(!o)return;let r=o.descendantsOfType("import_spec");for(let i of r)i&&xe(i,e)}function Me(n,e){let o=n.childForFieldName("path");if(o){let r=o.text.replace(/[<>"']/g,"");e.push({localName:r,originalName:d,modulePath:r})}}function ye(n,e){let o=n.namedChildren;for(let r of o)if(r)if(r.type===N.QUALIFIED_IDENTIFIER){let i=r.descendantsOfType("identifier"),s=i[i.length-1];s&&e.push({localName:s.text,originalName:d,modulePath:r.text})}else r.type===N.IDENTIFIER&&e.push({localName:r.text,originalName:d,modulePath:r.text})}function we(n,e){let o=n.childForFieldName("method");if(!o)return;let r=o.text;if(!_e.includes(r))return;let i=n.childForFieldName("arguments");if(!i)return;let s=i.descendantsOfType("string_content")[0]||i.descendantsOfType("string")[0];if(!s)return;let a=s.text.replace(/['"]/g,""),l=a.replace(/\.rb$/,"");e.push({localName:l,originalName:d,modulePath:a})}function be(n){return n===N.NAMESPACE_USE_DECLARATION||n===N.INCLUDE_EXPRESSION||n===N.INCLUDE_ONCE_EXPRESSION||n===N.REQUIRE_EXPRESSION||n===N.REQUIRE_ONCE_EXPRESSION}function Xe(n,e){let o=n.descendantsOfType("qualified_name")[0]||n.descendantsOfType("name")[0];if(o){let r=o.text,i=r.split("\\"),s=i[i.length-1];e.push({localName:s,originalName:d,modulePath:r})}}function ve(n,e){let o=n.descendantsOfType("string")[0]||n.descendantsOfType("string_content")[0];if(o){let r=o.text.replace(/['"]/g,"");e.push({localName:r,originalName:d,modulePath:r})}}function ke(n,e,o){e===N.NAMESPACE_USE_DECLARATION?Xe(n,o):ve(n,o)}function Ye(n,e){let o=n.descendantsOfType("qualified_name")[0]||n.descendantsOfType("identifier")[0];if(o){let r=o.text,i=r.split("."),s=i[i.length-1];e.push({localName:s,originalName:d,modulePath:r})}}function Be(n,e){let o=n.descendantsOfType("string").pop();if(!o)return;let r=o.text.replace(/['"]/g,""),i=n.descendantsOfType("identifier");for(let s of i)s&&(e.some(a=>a.localName===s.text)||e.push({localName:s.text,originalName:s.text,modulePath:r}))}function Ge(n,e,o){if(n.childForFieldName("name")){for(let i of n.namedChildren)if(i)if(i.type===N.ALIASED_IMPORT){let s=i.childForFieldName("name"),a=i.childForFieldName("alias");s&&a&&o.push({localName:a.text,originalName:s.text,modulePath:e})}else if(i.type===N.DOTTED_NAME){let s=i.descendantsOfType("identifier"),a=s[s.length-1];a&&o.push({localName:a.text,originalName:i.text,modulePath:e})}else i.type===N.IDENTIFIER&&o.push({localName:i.text,originalName:i.text,modulePath:e})}}function He(n){let e=n.childForFieldName("function");if(!e)return{isMethodCall:!1,methodName:""};if(e.type===N.MEMBER_EXPRESSION){let o=e.childForFieldName("property"),r=e.childForFieldName("object");if(o)return{isMethodCall:!0,methodName:o.text,objectName:r?.text}}return{isMethodCall:!1,methodName:e.text}}function Qe(n){let e=n.childForFieldName("function");if(!e)return{isMethodCall:!1,methodName:""};if(e.type===N.ATTRIBUTE){let o=e.childForFieldName("attribute"),r=e.childForFieldName("object");if(o)return{isMethodCall:!0,methodName:o.text,objectName:r?.text}}return{isMethodCall:!1,methodName:e.text}}function Ve(n){let e=n.childForFieldName("name"),o=n.childForFieldName("object");if(e)return{isMethodCall:!0,methodName:e.text,objectName:o?.text}}function je(n){return{isMethodCall:!0,methodName:n.childForFieldName("constructor")?.text||K,objectName:K}}function We(n){let e=n.childForFieldName("method");if(!e)return;let o=n.childForFieldName("receiver");return o?{isMethodCall:!0,methodName:e.text,objectName:o.text}:{isMethodCall:!1,methodName:e.text}}function M(n){let e=n.type,r=n.childForFieldName("name")?.text||"";if(e===N.MEMBER_CALL_EXPRESSION){let i=n.childForFieldName("object");return{isMethodCall:!0,methodName:r,objectName:i?.text}}if(e===N.SCOPED_CALL_EXPRESSION){let i=n.childForFieldName("scope");return{isMethodCall:!0,methodName:r,objectName:i?.text}}return{isMethodCall:!1,methodName:r}}function qe(n){let e=n.childForFieldName("function")||n.namedChildren[0];if(e&&e.type===N.MEMBER_ACCESS_EXPRESSION){let o=e.childForFieldName("name"),r=e.childForFieldName("expression");if(o)return{isMethodCall:!0,methodName:o.text,objectName:r?.text}}if(e)return{isMethodCall:!1,methodName:e.text}}function Je(n){let e=n.childForFieldName("type");return{isMethodCall:!0,methodName:Ae,objectName:e?.text}}var bt={[N.CALL_EXPRESSION]:He,[N.CALL]:Qe,[N.METHOD_INVOCATION]:Ve,[N.EXPLICIT_CONSTRUCTOR_INVOCATION]:je,[N.COMMAND_CALL]:We,[N.FUNCTION_CALL_EXPRESSION]:M,[N.MEMBER_CALL_EXPRESSION]:M,[N.SCOPED_CALL_EXPRESSION]:M,[N.INVOCATION_EXPRESSION]:qe,[N.OBJECT_CREATION_EXPRESSION]:Je};var Ke=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,L=class n extends Date{#t=!1;#n=!1;#e=null;constructor(e){let o=!0,r=!0,i="Z";if(typeof e=="string"){let s=e.match(Ke);s?(s[1]||(o=!1,e=`0000-01-01T${e}`),r=!!s[2],r&&e[10]===" "&&(e=e.replace(" ","T")),s[2]&&+s[2]>23?e="":(i=s[3]||null,e=e.toUpperCase(),!i&&r&&(e+="Z"))):e=""}super(e),isNaN(this.getTime())||(this.#t=o,this.#n=r,this.#e=i)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#e===null)return e.slice(0,-1);if(this.#e==="Z")return e;let o=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return o=this.#e[0]==="-"?o:-o,new Date(this.getTime()-o*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(e,o="Z"){let r=new n(e);return r.#e=o,r}static wrapAsLocalDateTime(e){let o=new n(e);return o.#e=null,o}static wrapAsLocalDate(e){let o=new n(e);return o.#n=!1,o.#e=null,o}static wrapAsLocalTime(e){let o=new n(e);return o.#t=!1,o.#e=null,o}};function ze(n,e){let o=n.slice(0,e).split(/\r\n|\n|\r/g);return[o.length,o.pop().length+1]}function Ze(n,e,o){let r=n.split(/\r\n|\n|\r/g),i="",s=(Math.log10(e+1)|0)+1;for(let a=e-1;a<=e+1;a++){let l=r[a-1];l&&(i+=a.toString().padEnd(s," "),i+=": ",i+=l,i+=`
|
|
3
3
|
`,a===e&&(i+=" ".repeat(s+o+2),i+=`^
|
|
4
4
|
`))}return i}var T=class extends Error{line;column;codeblock;constructor(e,o){let[r,i]=ze(o.toml,o.ptr),s=Ze(o.toml,r,i);super(`Invalid TOML document: ${e}
|
|
5
5
|
|
|
@@ -59,4 +59,4 @@ smol-toml/dist/index.js:
|
|
|
59
59
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
60
60
|
*)
|
|
61
61
|
*/
|
|
62
|
-
//# sourceMappingURL=chunk-
|
|
62
|
+
//# sourceMappingURL=chunk-4LF6QMCA.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
var a={DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error"};var u="ipc-log";function
|
|
2
|
+
var a={DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error"};var u="ipc-log";function S(t){return typeof t=="object"&&t!==null&&t.type===u}var R=class{constructor(e){this.postMessageFn=e}postMessageFn;debug(e,o){this.send(a.DEBUG,e,o)}info(e,o){this.send(a.INFO,e,o)}warn(e,o){this.send(a.WARN,e,o)}error(e,o){this.send(a.ERROR,e,o)}onLog(){return()=>{}}send(e,o,r){let s=r?{type:u,level:e,message:o,context:r}:{type:u,level:e,message:o};this.postMessageFn(s)}};var _={CONTEXT_INJECTION:"context-injection",COMMIT_L3_WRITE:"commit-l3-write",TIER_B_C_PREPUSH:"tier-b-c-prepush"},z={[_.CONTEXT_INJECTION]:!0,[_.COMMIT_L3_WRITE]:!0,[_.TIER_B_C_PREPUSH]:!0};var I=".docuvia",Z="logs",$="init.log",ee="clean.log",te="status.log",oe="sync.log",re="analyze.log",ne="review.log",se="impact.log",ie="query.log",ae="export-topology.log",ce="snapshot.log",le="hydrate.log",pe="sync-knowledge.log",h="node_modules",ge="local.db",de="init.lock",ue="tierC.lock",me="sync-state.json",Ee="hooks-config.json",_e="pending-l3-decisions.json";var A="utf8";var fe="sha256";var i={TYPESCRIPT:"typescript",JAVASCRIPT:"javascript",PYTHON:"python",RUST:"rust",GO:"go",JAVA:"java",C:"c",CPP:"cpp",RUBY:"ruby",PHP:"php",CSHARP:"csharp"};var Te=".claude/hooks",ye=".cursor/hooks",Le="docuvia-hook.js",Se="docuvia-hook.cjs";var m=class{listeners=new Set;debug(e,o){this.emit(a.DEBUG,e,o)}info(e,o){this.emit(a.INFO,e,o)}warn(e,o){this.emit(a.WARN,e,o)}error(e,o){this.emit(a.ERROR,e,o)}onLog(e){return this.listeners.add(e),()=>this.listeners.delete(e)}emit(e,o,r){let s=r?{level:e,message:o,context:r}:{level:e,message:o};for(let l of this.listeners)l(s)}};function Re(){return new m}var C=class{constructor(e){this.logger=e}logger;handleMessage(e){return S(e)?(this.logger[e.level](e.message,e.context),!0):!1}};var g={GIT_COMMAND_FAILED:"GIT_COMMAND_FAILED",GIT_NETWORK_TIMEOUT:"GIT_NETWORK_TIMEOUT",GIT_NOT_A_REPOSITORY:"GIT_NOT_A_REPOSITORY",GIT_BRANCH_CREATE_FAILED:"GIT_BRANCH_CREATE_FAILED",GIT_HOOK_INSTALL_FAILED:"GIT_HOOK_INSTALL_FAILED",GIT_FAST_IMPORT_FAILED:"GIT_FAST_IMPORT_FAILED",DB_OPEN_FAILED:"DB_OPEN_FAILED",DB_NOT_FOUND:"DB_NOT_FOUND",DB_MIGRATION_FAILED:"DB_MIGRATION_FAILED",DB_QUERY_FAILED:"DB_QUERY_FAILED",DB_LOCKED:"DB_LOCKED",AST_WORKER_CRASHED:"AST_WORKER_CRASHED",AST_PARSE_FAILED:"AST_PARSE_FAILED",FS_READ_FAILED:"FS_READ_FAILED",FS_PATH_TRAVERSAL:"FS_PATH_TRAVERSAL",FACTORY_TOKEN_NOT_REGISTERED:"FACTORY_TOKEN_NOT_REGISTERED",FACTORY_LOCKED:"FACTORY_LOCKED",MEMORY_SCOPE_NOT_FOUND:"MEMORY_SCOPE_NOT_FOUND",SYNC_FETCH_FAILED:"SYNC_FETCH_FAILED",SYNC_PUSH_FAILED:"SYNC_PUSH_FAILED",LLM_NOT_INITIALIZED:"LLM_NOT_INITIALIZED",LLM_CHAT_COMPLETION_FAILED:"LLM_CHAT_COMPLETION_FAILED",LLM_STREAM_FAILED:"LLM_STREAM_FAILED",LLM_INVALID_RESPONSE:"LLM_INVALID_RESPONSE",INIT_WORKFLOW_FAILED:"INIT_WORKFLOW_FAILED",CLEAN_WORKFLOW_FAILED:"CLEAN_WORKFLOW_FAILED",INVALID_INPUT:"INVALID_INPUT"};var Ie="DocuviaError",c=class t extends Error{code;cause;constructor(e,o,r){super(o),this.name=Ie,this.code=e,this.cause=r}static wrap(e,o,r){if(r instanceof t)return r;let s=r instanceof Error?r.message:String(r);return new t(e,`${o}: ${s}`,r)}};var he={WORKSPACE_ROOT:"workspaceRoot",API_URL:"apiUrl",PROJECT_ID:"projectId",COMMIT_SHA:"commitSha",TARGET_PATH:"targetPath",LLM_BASE_URL:"llmBaseUrl",LLM_MODEL:"llmModel",BASE_REF:"baseRef",TARGET:"target",ESCALATE_TO_LSP:"escalateToLsp",TIER_B_FULL_RESYNC:"tierBFullResync",LIMIT:"limit",COLLAPSE:"collapse",KEEP_DB:"keepDb",LSP_BINARY_OVERRIDE:"lspBinaryOverride",LSP_ARGS_OVERRIDE:"lspArgsOverride",LSP_TIMEOUT_MS:"lspTimeoutMs",LSP_MAX_PROCESSES:"lspMaxProcesses",TIER_B_COMMIT_CAP:"tierBCommitCap",TIER_C_DAILY_CALL_CAP:"tierCDailyCallCap",TIER_C_DAILY_TOKEN_CAP:"tierCDailyTokenCap",TIER_C_WALL_CLOCK_MS:"tierCWallClockMs",TIER_C_ITEM_CAP:"tierCItemCap",TIER_C_LOAD_THRESHOLD:"tierCLoadThreshold",GIT_NETWORK_TIMEOUT_MS:"gitNetworkTimeoutMs",FORCE:"force",AGENT_AUTHORED_DECISIONS:"agentAuthoredDecisions",HOOK_NAME:"hookName",HOOK_ENABLED:"hookEnabled",FLUSH_STAGED_L3:"flushStagedL3"},Ae={SCOPE_NOT_FOUND:(t,e)=>`Cannot set "${t}": memory scope "${e}" was never created`},f=class{scopes=new Map;createScope(e){this.scopes.has(e)||this.scopes.set(e,new Map)}set(e,o,r){let s=this.scopes.get(e);if(!s)throw new c(g.MEMORY_SCOPE_NOT_FOUND,Ae.SCOPE_NOT_FOUND(o,e));s.set(o,r)}get(e,o){return this.scopes.get(e)?.get(o)}deleteScope(e){this.scopes.delete(e)}hasScope(e){return this.scopes.has(e)}},Ce=new f;var b={REGISTER_LOCKED:t=>`Cannot register "${t}": factory is locked (test isolation)`,PROVIDER_NOT_REGISTERED:t=>`No provider registered for "${t}" \u2014 the implementation library that owns it was never imported for its registration side effect`},T=class{providers=new Map;locked=!1;register(e,o){if(this.locked)throw new c(g.FACTORY_LOCKED,b.REGISTER_LOCKED(String(e.description)));this.providers.set(e,o)}resolve(e,o){let r=this.providers.get(e);if(!r)throw new c(g.FACTORY_TOKEN_NOT_REGISTERED,b.PROVIDER_NOT_REGISTERED(String(e.description)));return r(this,o)}has(e){return this.providers.has(e)}lock(){this.locked=!0}unlock(){this.locked=!1}reset(){this.providers.clear(),this.locked=!1}},M=new T;function n(t){return Symbol(t)}var Ne={GitProvider:n("IGitProvider"),LineBlameProvider:n("ILineBlameProvider"),KnowledgeGitService:n("IKnowledgeGitService"),FileDiscovery:n("IFileDiscovery"),ConfigScanner:n("IConfigScanner"),VcsScanner:n("IVcsScanner"),AstProcessor:n("IAstProcessor"),GraphPersister:n("IGraphPersister"),TempFileManager:n("TempFileManager"),GraphStoreOpener:n("GraphStoreOpener"),RemoteSyncClient:n("RemoteSyncClient"),LlmClient:n("LlmClient"),QueryService:n("IQueryService"),TierBCoverageHintProvider:n("ITierBCoverageHintProvider"),ImpactService:n("IImpactService"),ChangeDetectionService:n("IChangeDetectionService"),TopologyBuilder:n("ITopologyBuilder"),SnapshotRenderer:n("ISnapshotRenderer"),HydrationService:n("IHydrationService"),DiagnosticRunnerDb:n("DiagnosticRunnerDb"),DiagnosticRunnerGit:n("DiagnosticRunnerGit"),SemanticDiffAnalyzer:n("ISemanticDiffAnalyzer"),EdgeResolutionProviders:n("EdgeResolutionProviders")};var Oe={ADDED:"added",MODIFIED:"modified",DELETED:"deleted",RENAMED:"renamed"};var Pe={LSP:"lsp",LLM_INFERRED:"llm-inferred"},ve={TYPESCRIPT:"typescript",PYTHON:"python",GO:"go",RUST:"rust",JAVA:"java",CPP:"cpp",CSHARP:"csharp",PHP:"php",RUBY:"ruby"};var xe={NO_REMOTE:"no-remote",UP_TO_DATE:"up-to-date",FAST_FORWARDED_LOCAL:"fast-forwarded-local",PUSHED_LOCAL:"pushed-local",MERGED:"merged"};var De={MODULE:"module",PACKAGE:"package",PCD:"pcd"},be={CONTAINS:"contains",CALLS:"calls",IMPLEMENTS:"implements",EXTENDS:"extends",IMPORTS:"imports",DEPENDS_ON:"depends_on",DECISION:"decision"};var Me={PENDING:"pending",ACTIVE:"active",DRAFT:"draft",GARBAGE:"garbage"},ke={ANALYZE:"analyze",AGENT_AUTHORED:"agent-authored"};var Fe={CREATE_L3:"CREATE_L3"};var we={SYSTEM:"system",USER:"user",ASSISTANT:"assistant",TOOL:"tool"};var Ge={LOW:"LOW",MEDIUM:"MEDIUM",HIGH:"HIGH",CRITICAL:"CRITICAL",UNKNOWN:"UNKNOWN"},He={EXACT:"exact",LOWER_BOUND:"lower-bound"},Be={LSP_FALLBACK:"lsp-fallback"};var Ke={L2:"l2",L3:"l3"};var Ue={FILE:"file",SYMBOL:"symbol",DECISION:"decision"},je={AUTO:"auto",FILE:"file",SYMBOL:"symbol"},Ye={L1_TAG:"l1_tag",DIRECTORY:"directory"};var Ve={TYPESCRIPT:"typescript",REACT:"react",EXPRESS:"express",VUE:"vue"},We={UNKNOWN:"unknown",JAVASCRIPT:"javascript",GENERIC:"generic",RUST:"rust",PYTHON:"python",GO:"go"},Xe="general",Qe={FRONTEND:"frontend",BACKEND:"backend",NEXTJS:"nextjs",SSR:"ssr",DRIZZLE:"drizzle",DATABASE:"database",TAILWINDCSS:"tailwindcss",CSS:"css",JEST:"jest",TESTING:"testing",VITEST:"vitest",POSTGRES:"postgres",MONOREPO:"monorepo",TOKIO:"tokio",ASYNC:"async",ACTIX:"actix",SERDE:"serde",TAURI:"tauri",DESKTOP:"desktop",DJANGO:"django",FASTAPI:"fastapi",PANDAS:"pandas",DATA:"data",GIN:"gin",STRICT_TS:"strict-ts",VITE:"vite",BUILD_TOOL:"build-tool"};var k="origin",N={KNOWLEDGE_ROOT:"docuvia-knowledge",KNOWLEDGE_DIR_NAME:"knowledge",GRAPH_DIR_NAME:"graph",L3_DIR_NAME:"_l3",NODES_JSONL_NAME:"nodes.jsonl",EDGES_JSONL_NAME:"edges.jsonl",SOURCE_COMMIT_TRAILER_KEY:"Docuvia-Source",POST_COMMIT_HOOK_NAME:"post-commit",POST_COMMIT_HOOK_MARKER:"docuvia analyze",POST_COMMIT_FLUSH_L3_MARKER:"docuvia analyze --flush-staged-l3",POST_COMMIT_NOHUP_MARKER:"nohup npx --no-install docuvia analyze",DOCUVIA_HOOK_HEADER_COMMENT:"# Docuvia Knowledge Graph Evolver Hook",POST_COMMIT_HOOK_CONTENT:`#!/bin/bash
|
|
3
3
|
# Docuvia Knowledge Graph Evolver Hook
|
|
4
4
|
# Non-intrusively extracts AST deltas in the background
|
|
5
5
|
if command -v npx > /dev/null 2>&1; then
|
|
@@ -35,7 +35,7 @@ if command -v npx &> /dev/null; then
|
|
|
35
35
|
# Fire and forget (do not block commit)
|
|
36
36
|
npx --no-install docuvia snapshot > /dev/null 2>&1 &
|
|
37
37
|
fi
|
|
38
|
-
`,LOCAL_REMOTE_URL_SCHEME:"file://",DEFAULT_REMOTE_NAME:k,REMOTE_REF_PREFIX:"refs/remotes/",HEAD_REF:"HEAD",DEFAULT_LOCAL_PROJECT_ID:1,META_KEY_KNOWLEDGE_TIP_SHA:"hydratedKnowledgeSha",META_KEY_LAST_INGESTED_SOURCE_SHA:"lastIngestedSourceSha",META_KEY_NODE_KEY_FORMAT_VERSION:"nodeKeyFormatVersion",META_KEY_TIER_B_QUEUE:"tierBQueue",EMPTY_KNOWLEDGE_TEMP_DIR_PREFIX:"docuvia-empty-knowledge-",META_KEY_LAST_TIER_B_BATCH_SHA:"lastTierBBatchSha",META_KEY_TIER_B_BATCH_PENDING:"tierBBatchPending",META_KEY_KNOWLEDGE_PACK_PENDING:"knowledgePackPending",META_KEY_TIER_B_CHANGED_BYTES:"tierBChangedBytes",DEFAULT_TIER_B_COMMIT_CAP_BYTES:512e3,DEFAULT_TIER_B_COVERAGE_FAIL_THRESHOLD:.5,DEFAULT_L2_SEMANTIC_COVERAGE_FAIL_THRESHOLD:.1,META_KEY_TIER_B_ZERO_PROGRESS_BATCHES:"tierBZeroProgressBatches",DEFAULT_TIER_B_ZERO_PROGRESS_MAX_BATCHES:3,DEFAULT_POST_COMMIT_INGESTION_GRACE_MS:6e5,META_KEY_CALL_RESOLUTION_STATS:"callResolutionStats",DEFAULT_CALL_RESOLUTION_NOTE_THRESHOLD:.5,DEFAULT_CALL_RESOLUTION_MIN_SAMPLE:5,DEFAULT_CANARY_SAMPLE_SIZE:20,PRE_PUSH_HOOK_NAME:"pre-push",PRE_PUSH_HOOK_MARKER:"docuvia analyze --escalate-to-lsp",PRE_PUSH_SYNC_KNOWLEDGE_MARKER:"docuvia sync-knowledge",PRE_PUSH_ENV_GATE_MARKER:"--fallback-ast",PRE_PUSH_HOOKS_CHECK_MARKER:"docuvia hooks check",PRE_PUSH_HOOK_CONTENT:`#!/bin/bash
|
|
38
|
+
`,LOCAL_REMOTE_URL_SCHEME:"file://",DEFAULT_REMOTE_NAME:k,REMOTE_REF_PREFIX:"refs/remotes/",HEAD_REF:"HEAD",DEFAULT_LOCAL_PROJECT_ID:1,META_KEY_KNOWLEDGE_TIP_SHA:"hydratedKnowledgeSha",META_KEY_LAST_INGESTED_SOURCE_SHA:"lastIngestedSourceSha",META_KEY_NODE_KEY_FORMAT_VERSION:"nodeKeyFormatVersion",META_KEY_TIER_B_QUEUE:"tierBQueue",EMPTY_KNOWLEDGE_TEMP_DIR_PREFIX:"docuvia-empty-knowledge-",META_KEY_LAST_TIER_B_BATCH_SHA:"lastTierBBatchSha",META_KEY_TIER_B_BATCH_PENDING:"tierBBatchPending",META_KEY_KNOWLEDGE_PACK_PENDING:"knowledgePackPending",META_KEY_TIER_B_CHANGED_BYTES:"tierBChangedBytes",DEFAULT_TIER_B_COMMIT_CAP_BYTES:512e3,DEFAULT_TIER_B_COVERAGE_FAIL_THRESHOLD:.5,DEFAULT_L2_SEMANTIC_COVERAGE_FAIL_THRESHOLD:.1,DEFAULT_STAGED_L3_STRANDED_AFTER_MS:864e5,META_KEY_TIER_B_ZERO_PROGRESS_BATCHES:"tierBZeroProgressBatches",DEFAULT_TIER_B_ZERO_PROGRESS_MAX_BATCHES:3,DEFAULT_POST_COMMIT_INGESTION_GRACE_MS:6e5,META_KEY_CALL_RESOLUTION_STATS:"callResolutionStats",DEFAULT_CALL_RESOLUTION_NOTE_THRESHOLD:.5,DEFAULT_CALL_RESOLUTION_MIN_SAMPLE:5,DEFAULT_CANARY_SAMPLE_SIZE:20,PRE_PUSH_HOOK_NAME:"pre-push",PRE_PUSH_HOOK_MARKER:"docuvia analyze --escalate-to-lsp",PRE_PUSH_SYNC_KNOWLEDGE_MARKER:"docuvia sync-knowledge",PRE_PUSH_ENV_GATE_MARKER:"--fallback-ast",PRE_PUSH_HOOKS_CHECK_MARKER:"docuvia hooks check",PRE_PUSH_HOOK_CONTENT:`#!/bin/bash
|
|
39
39
|
# Docuvia Tier B Batch Hook (LSP escalation + snapshot + knowledge sync)
|
|
40
40
|
# Runs synchronously (generous timeout) so pushed code carries corrected knowledge -- see
|
|
41
41
|
# docs/gitbook/analysis/phase1-decision-integration.md \xA78h and
|
|
@@ -82,6 +82,6 @@ fi
|
|
|
82
82
|
# Never blocks the push on a Tier B failure -- PLAT-007's reliability requirement (failures
|
|
83
83
|
# only ever surface via JSONL logs / doctor, never to the pushing developer).
|
|
84
84
|
exit 0
|
|
85
|
-
`,META_KEY_TIER_C_QUEUE:"tierCQueue",META_KEY_TIER_C_BUDGET:"tierCBudget",DEFAULT_TIER_C_DAILY_CALL_CAP:50,DEFAULT_TIER_C_DAILY_TOKEN_CAP:1e5,DEFAULT_TIER_C_WALL_CLOCK_MS:12e3,DEFAULT_TIER_C_ITEM_CAP:20,DEFAULT_TIER_C_LOAD_THRESHOLD:.8,DEFAULT_TIER_C_MAX_ITEM_FAILURES:3};import y from"path";var F=[".ts",".tsx",".mts",".cts"],w=[".js",".jsx",".mjs",".cjs"],G=[".py"],H=[".rs"],B=[".go"],K=[".java"],U=[".c",".h"],j=[".cpp",".cxx",".cc",".hpp",".hxx",".hh",".cu",".cuh"],Y=[".rb",".rake",".gemspec"],V=[".php",".phtml",".php3",".php4",".php5",".phps"],W=[".cs"],O=new Set(["Rakefile","Gemfile","Guardfile","Vagrantfile","Brewfile"]),P=(()=>{let t=new Map,e=[[i.TYPESCRIPT,F],[i.JAVASCRIPT,w],[i.PYTHON,G],[i.RUST,H],[i.GO,B],[i.JAVA,K],[i.C,U],[i.CPP,j],[i.RUBY,Y],[i.PHP,V],[i.CSHARP,W]];for(let[o,r]of e)for(let s of r)t.set(s,o);return t})();function Je(t){let e=P.get(y.extname(t).toLowerCase());return e||(O.has(y.basename(t))?i.RUBY:void 0)}function X(t){return P.has(y.extname(t).toLowerCase())?!0:O.has(y.basename(t))}function qe(){return Array.from(P.keys()).map(t=>t.replace(/^\./,""))}function ze(t){return X(t)&&!t.includes(`${h}/`)&&!t.includes(`${I}/`)}var v="EEXIST",L="EPERM",x="EACCES",D="EBUSY";import d from"fs/promises";var Ze={TIMED_OUT_WAITING:t=>`Timed out waiting for the lock at ${t} \u2014 another process may be stuck`},$e={maxWaitMs:1e4,retryIntervalMs:100,heartbeatIntervalMs:1e4,staleAfterMs:3e4};function et(t){return new Promise(e=>setTimeout(e,t))}function tt(t){try{return process.kill(t,0),!0}catch(e){return e.code===L}}async function ot(t){try{let e=Number.parseInt(await d.readFile(t,
|
|
86
|
-
`)){let o=e.trim();if(o.startsWith(J))return o.slice(J.length).trim()}}function ct(t,e,o,r){if(!o&&!r)return;let l=(e?t.files.getTierBFileStatus(e):void 0)?.lastProcessedAt??null,E=r&&l===null,p=t.files.getTierBCoverage(),q=o&&p.processedFiles<p.totalFiles;if(!(!E&&!q))return{ownFileLastProcessedAt:l,workspaceFilesProcessed:p.processedFiles,workspaceFilesTotal:p.totalFiles}}function lt(t){let e={total:0,resolved:0,selfDiscarded:0,unresolved:0,unresolvable:0,external:0,unknownReceiver:0};for(let o of Object.values(t))e.total+=o.total,e.resolved+=o.resolved,e.selfDiscarded+=o.selfDiscarded,e.unresolvable=(e.unresolvable??0)+(o.unresolvable??0),e.external=(e.external??0)+(o.external??0),e.unknownReceiver=(e.unknownReceiver??0)+(o.unknownReceiver??0),e.unresolved+=o.unresolved;return e}function pt(t){return t.total-t.selfDiscarded-(t.unresolvable??0)-(t.external??0)-(t.unknownReceiver??0)}var gt={PASS:"pass",FAIL:"fail"};export{a,m as b,
|
|
87
|
-
//# sourceMappingURL=chunk-
|
|
85
|
+
`,META_KEY_TIER_C_QUEUE:"tierCQueue",META_KEY_TIER_C_BUDGET:"tierCBudget",DEFAULT_TIER_C_DAILY_CALL_CAP:50,DEFAULT_TIER_C_DAILY_TOKEN_CAP:1e5,DEFAULT_TIER_C_WALL_CLOCK_MS:12e3,DEFAULT_TIER_C_ITEM_CAP:20,DEFAULT_TIER_C_LOAD_THRESHOLD:.8,DEFAULT_TIER_C_MAX_ITEM_FAILURES:3};import y from"path";var F=[".ts",".tsx",".mts",".cts"],w=[".js",".jsx",".mjs",".cjs"],G=[".py"],H=[".rs"],B=[".go"],K=[".java"],U=[".c",".h"],j=[".cpp",".cxx",".cc",".hpp",".hxx",".hh",".cu",".cuh"],Y=[".rb",".rake",".gemspec"],V=[".php",".phtml",".php3",".php4",".php5",".phps"],W=[".cs"],O=new Set(["Rakefile","Gemfile","Guardfile","Vagrantfile","Brewfile"]),P=(()=>{let t=new Map,e=[[i.TYPESCRIPT,F],[i.JAVASCRIPT,w],[i.PYTHON,G],[i.RUST,H],[i.GO,B],[i.JAVA,K],[i.C,U],[i.CPP,j],[i.RUBY,Y],[i.PHP,V],[i.CSHARP,W]];for(let[o,r]of e)for(let s of r)t.set(s,o);return t})();function Je(t){let e=P.get(y.extname(t).toLowerCase());return e||(O.has(y.basename(t))?i.RUBY:void 0)}function X(t){return P.has(y.extname(t).toLowerCase())?!0:O.has(y.basename(t))}function qe(){return Array.from(P.keys()).map(t=>t.replace(/^\./,""))}function ze(t){return X(t)&&!t.includes(`${h}/`)&&!t.includes(`${I}/`)}var v="EEXIST",L="EPERM",x="EACCES",D="EBUSY";import d from"fs/promises";var Ze={TIMED_OUT_WAITING:t=>`Timed out waiting for the lock at ${t} \u2014 another process may be stuck`},$e={maxWaitMs:1e4,retryIntervalMs:100,heartbeatIntervalMs:1e4,staleAfterMs:3e4};function et(t){return new Promise(e=>setTimeout(e,t))}function tt(t){try{return process.kill(t,0),!0}catch(e){return e.code===L}}async function ot(t){try{let e=Number.parseInt(await d.readFile(t,A),10);return Number.isFinite(e)?e:void 0}catch{return}}async function rt(t,e){let o=await d.stat(t).catch(()=>{});if(!o||Date.now()-o.mtimeMs<=e)return!1;let r=await ot(t);return r!==void 0&&tt(r)?!1:(await d.rm(t,{force:!0}).catch(()=>{}),!0)}function nt(t){let e=t.code;return e===v||e===L||e===x||e===D}async function st(t){try{let e=await d.open(t,"wx");return await e.writeFile(String(process.pid)),await e.close(),!0}catch(e){if(!nt(e))throw e;return!1}}async function it(t,e={}){let o={...$e,...e},r=Date.now()+o.maxWaitMs,s=!1;for(;!await st(t);)if(s||(s=!0,e.onWaiting?.()),!await rt(t,o.staleAfterMs)){if(Date.now()>r)throw new Error(Ze.TIMED_OUT_WAITING(t));await et(o.retryIntervalMs)}let l=setInterval(()=>{let p=new Date;d.utimes(t,p,p).catch(()=>{})},o.heartbeatIntervalMs);l.unref?.();let E=!1;return{async release(){E||(E=!0,clearInterval(l),await d.rm(t,{force:!0}).catch(()=>{}))}}}var J=`${N.SOURCE_COMMIT_TRAILER_KEY}: `;function at(t){for(let e of t.split(`
|
|
86
|
+
`)){let o=e.trim();if(o.startsWith(J))return o.slice(J.length).trim()}}function ct(t,e,o,r){if(!o&&!r)return;let l=(e?t.files.getTierBFileStatus(e):void 0)?.lastProcessedAt??null,E=r&&l===null,p=t.files.getTierBCoverage(),q=o&&p.processedFiles<p.totalFiles;if(!(!E&&!q))return{ownFileLastProcessedAt:l,workspaceFilesProcessed:p.processedFiles,workspaceFilesTotal:p.totalFiles}}function lt(t){let e={total:0,resolved:0,selfDiscarded:0,unresolved:0,unresolvable:0,external:0,unknownReceiver:0};for(let o of Object.values(t))e.total+=o.total,e.resolved+=o.resolved,e.selfDiscarded+=o.selfDiscarded,e.unresolvable=(e.unresolvable??0)+(o.unresolvable??0),e.external=(e.external??0)+(o.external??0),e.unknownReceiver=(e.unknownReceiver??0)+(o.unknownReceiver??0),e.unresolved+=o.unresolved;return e}function pt(t){return t.total-t.selfDiscarded-(t.unresolvable??0)-(t.external??0)-(t.unknownReceiver??0)}var gt={PASS:"pass",FAIL:"fail"};export{a,m as b,Re as c,R as d,C as e,g as f,c as g,he as h,Ce as i,M as j,Ne as k,Oe as l,Pe as m,ve as n,xe as o,De as p,be as q,Me as r,ke as s,Fe as t,we as u,Ge as v,He as w,Be as x,Ke as y,Ue as z,je as A,Ye as B,_ as C,z as D,I as E,Z as F,$ as G,ee as H,te as I,oe as J,re as K,ne as L,se as M,ie as N,ae as O,ce as P,le as Q,pe as R,h as S,ge as T,de as U,ue as V,me as W,Ee as X,_e as Y,Ve as Z,We as _,Xe as $,Qe as aa,A as ba,fe as ca,k as da,N as ea,i as fa,F as ga,w as ha,G as ia,H as ja,B as ka,K as la,U as ma,j as na,Y as oa,V as pa,W as qa,O as ra,Je as sa,X as ta,qe as ua,ze as va,v as wa,L as xa,x as ya,D as za,it as Aa,at as Ba,ct as Ca,lt as Da,pt as Ea,gt as Fa,Te as Ga,ye as Ha,Le as Ia,Se as Ja};
|
|
87
|
+
//# sourceMappingURL=chunk-6QKWHRVI.js.map
|