@engineeros/connector 1.59.105 → 1.61.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/README.md CHANGED
@@ -31,12 +31,62 @@ Replace the code and server URL with the values from EngineerOS. Sign in to the
31
31
 
32
32
  Run `engineeros-connector agents` to list supported agents. Use the chosen agent's ID in both commands above; for Claude, use `claude-acp`.
33
33
 
34
+ Auto onboarding requires connector 1.61.0 or newer and the backend's explicit Auto pairing acknowledgement. Deploy the matching backend before enabling the Auto setup command:
35
+
36
+ ```sh
37
+ npx --yes "@engineeros/connector@^1.61.0" pair PAIRING_CODE --url https://your-engineeros.example --workspace . --onboard --auto-agents "codex-cli,forge"
38
+ ```
39
+
40
+ Only the selected installed agents are inspected. `codex-cli` selects native Codex; `forge` selects native Forge. Add exact registry IDs such as `claude-acp` only when their adapters are already installed and signed in. Auto does not install adapters, sign in, or ask models questions during selection. The normal session readiness question runs after pairing succeeds. Unavailable selected peers are reported while healthy selected agents remain usable; a fresh pairing uses the first usable selection. Auto and manual agent launch flags cannot be combined.
41
+
42
+ Stop the running connector before re-pairing an existing folder. Auto retains its primary agent, native sessions, runtime IDs and retired identities. Include that primary in the selection and restore its installation if unavailable; changing it requires the explicit manual agent-change flow. Unselected peers are disabled with their records retained. An uncached npx adapter or uvx launch remains unavailable; Auto never downloads it during later execution or maintenance either.
43
+
44
+ If an older backend rotates the credential without confirming Auto, the new credential is saved securely and execution stays blocked, including after restart. Saved sessions for the same connector are retained. Update the backend or resolve its routing policy, then explicitly pair again; an ordinary reconnect cannot confirm Auto.
45
+
34
46
  Restart an already paired workspace with:
35
47
 
36
48
  ```sh
37
49
  engineeros-connector start --workspace .
38
50
  ```
39
51
 
52
+ ## Enable multiple agent runtimes
53
+
54
+ The paired agent remains the primary runtime, named `default`. Enable additional local runtimes for Auto routing or explicit runtime/model choices:
55
+
56
+ ```sh
57
+ engineeros-connector agent claude-acp install
58
+ engineeros-connector runtime add claude --agent claude-acp --workspace .
59
+ engineeros-connector runtime add codex-native --agent-protocol codex --workspace .
60
+ engineeros-connector runtime add forge --agent-protocol forge --workspace .
61
+ engineeros-connector runtime list --workspace .
62
+ ```
63
+
64
+ Use `--agent opencode` or another supported registry ID for additional ACP agents. Install the chosen agent and complete its provider sign-in locally. `runtime list` and `runtime refresh` inspect enabled agents and report their discovered models, reasoning settings and readiness; they do not ask models to complete engineering work. Credentials and executable configuration remain on this machine.
65
+
66
+ Existing organization and environment agent restrictions apply to every runtime using its local registry identity. Native Codex and Forge use their canonical identities. An unregistered ACP adapter cannot satisfy a restricted agent policy; display names do not grant agent access.
67
+
68
+ Restart the connector after configuration changes, or let its next idle refresh advertise them. A missing or signed-out runtime does not hide healthy peers. A pinned unavailable runtime blocks until its prerequisite is restored; it never silently becomes another provider. Remove an additional entry with `engineeros-connector runtime remove claude --workspace .`.
69
+
70
+ Runtime IDs identify stable installations/accounts. Removing an additional runtime retires its ID permanently within this pairing and removes only its native session mappings; choose a fresh ID for another installation/account. Use `runtime refresh` for sign-in recovery. Saved work, evidence, memory and execution budgets remain retained. Idle ACP resources for retired entries are released when the connector next refreshes safely; active work is not cancelled.
71
+
72
+ Goal checkpoints also retain the native session's pairing, protocol and agent owner. Re-pairing the same workspace to a different primary agent cannot reuse its old Goal session, even when the runtime is still named `default`. Changed or unverified historical owners stop with the original work and allowances retained; reconcile the original installation before continuing.
73
+
74
+ Runtime changes take effect at assignment/session boundaries. Native session IDs and warm processes belong to their runtime and role. Different stages can use different runtimes. Approved Goal plans may freeze up to two runtime transitions and explicit alternatives before approval. A completed writing turn can hand work to a fresh native session only after the previous process has stopped, the workspace checkpoint matches, and all observed effects are resolved. A runtime that never started may use an approved fallback. Started failures with uncertain effects block for reconciliation. Switching retains the same work, evidence, deadline, spend, repair and single formatting-correction allowances. Backend support is required; manual pins receive no unapproved alternatives.
75
+
76
+ Forge does not currently provide the qualified tool-effect observations needed for a handoff after a writing turn. Its effects remain unknown, even when its response lists no tools. Restore and reconcile that work before selecting another runtime; discovery and a successful completion alone cannot authorize the handoff.
77
+
78
+ Direct test automation freezes one approved writing profile for implementation, repairs and fresh rewrites, plus a separate triage profile. Its native contract counts all repair, rewrite and cleanup turns against the inherited total allowance. Use a governed Goal or workflow when the task requires independent review, a hard deadline or a hard dollar bound; direct assignments refuse those unsupported requirements.
79
+
80
+ Provider and model-family tags come from discovery when available. Configure missing tags and normalized reasoning levels locally, using exact model IDs and native settings that the runtime actually advertises:
81
+
82
+ ```sh
83
+ engineeros-connector runtime configure claude --model-metadata ./model-metadata.json --workspace .
84
+ ```
85
+
86
+ The JSON object maps each raw model ID to optional `provider_id`, `model_family` and `reasoning_levels`. For example, a model that advertises `xhigh` can explicitly map `"max": {"reasoning_effort": "xhigh"}` under `reasoning_levels`. The connector does not infer this mapping or a model's family. Configured tags are labeled as configured and cannot grant tool, write, cancellation or data permissions. Runtime/model refresh changes discovery only; it does not change provider sign-in. Requested reasoning settings remain separate from provider-reported actual settings; missing observations stay unknown.
87
+
88
+ Read-only parallel workflow proposals use the existing workflow engine with separate native sessions and detached worktrees at the frozen source head. New-project proposals use separate empty workspaces. They return proposals through the workflow artifact owner and do not write implementation changes or copy ignored credentials. Required independent review receives bounded complete changed-source files, the diff and Proofs; retained file hashes and the actual reviewer usage/session bind its receipt to the final head. Missing or oversized safe source context blocks review rather than claiming inspection.
89
+
40
90
  ## Goal execution and recovery
41
91
 
42
92
  Goal execution uses contract 4 and needs the matching EngineerOS backend. The server retains repair reservations across restarts and Resume, including planning, ticket and repository-quality repairs. Restoring a fresh worktree cannot reset those allowances; keep the original checkpoint and completed work.
@@ -1,4 +1,4 @@
1
- import ae from"node:path";import ce from"node:v8";import{Worker as le,isMainThread as ue,parentPort as L,workerData as v}from"node:worker_threads";import{constants as W}from"node:fs";import{lstat as Y,open as K,realpath as j}from"node:fs/promises";import h from"node:path";var R=10*1024*1024,N=(s,e)=>{let t=h.relative(s,e);return t&&!t.startsWith(`..${h.sep}`)&&t!==".."&&!h.isAbsolute(t)};async function I(s,e,{maxBytes:t=R}={}){let n=()=>Object.assign(new Error("Use a regular file inside the workspace without symlinks or redirected directories."),{code:"WORKSPACE_READ_UNSAFE"}),r=()=>Object.assign(new Error(`Workspace file exceeds the ${t} byte read limit. Provide a smaller file before retrying.`),{code:"WORKSPACE_READ_LIMIT"}),o=String(e||"").replaceAll("\\","/");if(!o||h.isAbsolute(o)||h.win32.isAbsolute(o))throw n();let p=await j(s),f=h.resolve(p,o);if(!N(p,f))throw n();let d=p,i;for(let c of h.relative(p,f).split(h.sep))if(d=h.join(d,c),i=await Y(d),i.isSymbolicLink())throw n();if(!i.isFile())throw n();if(i.size>t)throw r();if(!N(p,await j(f)))throw n();let m=await K(f,W.O_RDONLY|(W.O_NOFOLLOW||0));try{let c=await m.stat();if(!c.isFile()||c.ino!==i.ino||c.dev!==i.dev||!N(p,await j(f)))throw n();if(c.size>t)throw r();let b=Buffer.alloc(Math.min(t+1,64*1024)),x=[],g=0;for(;g<=t;){let{bytesRead:a}=await m.read(b,0,Math.min(b.length,t+1-g),null);if(!a)break;if(g+=a,g>t)throw r();x.push(Buffer.from(b.subarray(0,a)))}return Buffer.concat(x,g)}finally{await m.close()}}import{execFile as q}from"node:child_process";import{promisify as J}from"node:util";var Ce=J(q);var Me=Object.freeze({"skills.include_instructions":!1,"skills.bundled.enabled":!1,"features.apps":!1,"features.plugins":!1,include_apps_instructions:!1}),ee=Object.freeze({"read-only":"read-only","workspace-write":"workspace-write"}),Le=Object.freeze({"codex-acp":ee,"claude-acp":Object.freeze({"read-only":"plan","workspace-write":"acceptEdits"}),opencode:Object.freeze({"read-only":"plan","workspace-write":"build"})});var te="engineeros-verifier",ne=Object.freeze({"*":"ask",read:"allow",glob:"allow",grep:"allow",list:"allow",bash:"allow",edit:"deny",task:"deny",external_directory:"deny",patch:"deny",apply_patch:"deny"});var se=Object.freeze({OPENCODE_CONFIG:"",OPENCODE_CONFIG_CONTENT:JSON.stringify({agent:{[te]:{mode:"primary",description:"Independent Goal verification with commands and no direct edits",permission:ne},plan:{permission:{"*":"ask",read:"allow",glob:"allow",grep:"allow",list:"allow",edit:"deny",bash:"deny",task:"deny",external_directory:"deny",patch:"deny",apply_patch:"deny"}}}}),OPENCODE_DISABLE_PROJECT_CONFIG:"true",OPENCODE_DISABLE_CLAUDE_CODE:"true",OPENCODE_DISABLE_EXTERNAL_SKILLS:"true"});var ze=String.raw`import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
1
+ import ae from"node:path";import ce from"node:v8";import{Worker as le,isMainThread as ue,parentPort as L,workerData as v}from"node:worker_threads";import{constants as W}from"node:fs";import{lstat as Y,open as K,realpath as j}from"node:fs/promises";import h from"node:path";var R=10*1024*1024,N=(s,e)=>{let t=h.relative(s,e);return t&&!t.startsWith(`..${h.sep}`)&&t!==".."&&!h.isAbsolute(t)};async function M(s,e,{maxBytes:t=R}={}){let n=()=>Object.assign(new Error("Use a regular file inside the workspace without symlinks or redirected directories."),{code:"WORKSPACE_READ_UNSAFE"}),r=()=>Object.assign(new Error(`Workspace file exceeds the ${t} byte read limit. Provide a smaller file before retrying.`),{code:"WORKSPACE_READ_LIMIT"}),o=String(e||"").replaceAll("\\","/");if(!o||h.isAbsolute(o)||h.win32.isAbsolute(o))throw n();let p=await j(s),f=h.resolve(p,o);if(!N(p,f))throw n();let d=p,i;for(let c of h.relative(p,f).split(h.sep))if(d=h.join(d,c),i=await Y(d),i.isSymbolicLink())throw n();if(!i.isFile())throw n();if(i.size>t)throw r();if(!N(p,await j(f)))throw n();let m=await K(f,W.O_RDONLY|(W.O_NOFOLLOW||0));try{let c=await m.stat();if(!c.isFile()||c.ino!==i.ino||c.dev!==i.dev||!N(p,await j(f)))throw n();if(c.size>t)throw r();let b=Buffer.alloc(Math.min(t+1,64*1024)),x=[],g=0;for(;g<=t;){let{bytesRead:a}=await m.read(b,0,Math.min(b.length,t+1-g),null);if(!a)break;if(g+=a,g>t)throw r();x.push(Buffer.from(b.subarray(0,a)))}return Buffer.concat(x,g)}finally{await m.close()}}import{execFile as q}from"node:child_process";import{promisify as J}from"node:util";var Ce=J(q);var Ie=Object.freeze({"skills.include_instructions":!1,"skills.bundled.enabled":!1,"features.apps":!1,"features.plugins":!1,include_apps_instructions:!1}),ee=Object.freeze({"read-only":"read-only","workspace-write":"workspace-write"}),Le=Object.freeze({"codex-acp":ee,"claude-acp":Object.freeze({"read-only":"plan","workspace-write":"acceptEdits"}),opencode:Object.freeze({"read-only":"plan","workspace-write":"build"})});var te="engineeros-verifier",ne=Object.freeze({"*":"ask",read:"allow",glob:"allow",grep:"allow",list:"allow",bash:"allow",edit:"deny",task:"deny",external_directory:"deny",patch:"deny",apply_patch:"deny"});var se=Object.freeze({OPENCODE_CONFIG:"",OPENCODE_CONFIG_CONTENT:JSON.stringify({agent:{[te]:{mode:"primary",description:"Independent Goal verification with commands and no direct edits",permission:ne},plan:{permission:{"*":"ask",read:"allow",glob:"allow",grep:"allow",list:"allow",edit:"deny",bash:"deny",task:"deny",external_directory:"deny",patch:"deny",apply_patch:"deny"}}}}),OPENCODE_DISABLE_PROJECT_CONFIG:"true",OPENCODE_DISABLE_CLAUDE_CODE:"true",OPENCODE_DISABLE_EXTERNAL_SKILLS:"true"});var ze=String.raw`import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
2
2
  import path from "node:path";
3
3
  import { spawnSync } from "node:child_process";
4
4
 
@@ -215,14 +215,14 @@ export default {
215
215
  return "Patch applied:\n" + summary.join("\n");
216
216
  },
217
217
  };
218
- `;var He=10080*60*1e3;var Ke=new URL("../grammars/",import.meta.url);var M=`
218
+ `;var He=10080*60*1e3;var Ke=new URL("../grammars/",import.meta.url);var I=`
219
219
  (program (lexical_declaration (variable_declarator name: (identifier) @name) @definition.constant))
220
220
  (program (variable_declaration (variable_declarator name: (identifier) @name) @definition.constant))
221
221
  (program (export_statement declaration: (lexical_declaration (variable_declarator name: (identifier) @name) @definition.constant)))
222
222
  `,B=`
223
223
  (type_alias_declaration name: (type_identifier) @name) @definition.type
224
224
  (enum_declaration name: (identifier) @name) @definition.enum
225
- `,qe={javascript:M,typescript:M+B,tsx:M+B};var Qe=40*1024*1024;var ot=768*1024;var re=new Set([".js",".jsx",".mjs",".cjs",".ts",".tsx"]),rt=new Set([...re,".py",".go",".java",".kt",".cs",".rb",".rs"]);var it=new RegExp([String.raw`\bassert\w*\b`,String.raw`\bexpect\w*\s*\(`,String.raw`\.should\b`,String.raw`\bpytest\.raises\b`,String.raw`\bself\.assert\w+`,String.raw`\bt\.(?:Error|Errorf|Fatal|Fatalf|Fail|FailNow)\b`,String.raw`\brequire\.\w+\(`,String.raw`\bAssert\.\w+`,String.raw`\bassert_(?:eq|ne)!`,String.raw`\bverify\s*\(`,String.raw`\bto(?:Have|Be|Equal|Contain|Match|Throw)\w*\s*\(`].join("|"),"g");var jt=512*1024,Nt=1024*1024;var Rt=10080*60*1e3,It=720*60*60*1e3;var Mt=new Set("a an and are as at be been being but by can could did do does done for from had has have how into is it its may might must need needs no not of on or our our should so than that the their them then there these they this those to too use used using very was were what when where which while who why will with would you your about after all also any before between both during each every here how just make made more most need next now once only other over same should some such take then through under until up upon via want wants well when work works".split(/\s+/));var Lt=256*1024;function _(s){return String(s||"").replace(/[\u0000-\u001f\u007f]/g,e=>`\\u${e.codePointAt(0).toString(16).padStart(4,"0")}`).replaceAll("`","'")}var ie={"claude.md":"Claude Code","gemini.md":"Gemini CLI"},Pt=new Set(["agents.md",...Object.keys(ie)]);var pe=50,D=4e3,G=1e3,U=8,P=1e3,fe=5e3,de=2,F=0;async function Xt(s,e,t){let n=String(e.pattern??""),r=String(e.glob??"");if(!n)throw new Error("Pass a non-empty pattern to engineeros_grep.");if(n.length>4096||r.length>1024)throw new Error("Grep pattern or glob is too long. Use a smaller pattern and narrower glob.");if(F>=de)throw new Error("Two workspace searches are already running. Retry after one finishes.");F+=1;let o,p;try{let f=await t();return o=new le(new URL("./context-grep.mjs",import.meta.url),{workerData:{kind:"context-grep",workspace:s,args:e,files:f},execArgv:[],env:{},resourceLimits:{maxOldGenerationSizeMb:128,maxYoungGenerationSizeMb:16,stackSizeMb:4}}),await new Promise((d,i)=>{p=setTimeout(()=>i(new Error("Workspace search exceeded its five-second limit. Narrow the glob or simplify the regular expression.")),fe),o.once("message",m=>m.error?i(new Error(m.error)):d(m.text)),o.once("error",()=>i(new Error("Workspace search worker failed or exceeded its memory limit. Narrow the glob or pattern."))),o.once("exit",()=>i(new Error("Workspace search stopped before returning a result. Narrow the glob or pattern.")))})}finally{clearTimeout(p);try{o&&await o.terminate()}finally{F-=1}}}!ue&&v?.kind==="context-grep"&&(ce.setFlagsFromString("--enable-experimental-regexp-engine-on-excessive-backtracks"),me(v.workspace,v.args,v.files).then(s=>L.postMessage({text:s}),s=>L.postMessage({error:s.message})).finally(()=>L.close()));async function me(s,e,t){let n=String(e.pattern??"");if(!n)throw new Error("Pass a non-empty pattern to engineeros_grep.");let r;try{r=new RegExp(e.regex===!0?n:n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),e.ignore_case===!0?"i":"")}catch(l){throw new Error(`The pattern is not a valid regular expression: ${l.message}`)}let o=String(e.glob||"").trim(),p=o?ge(o):()=>!0,f=t.filter(p),d=[],i=0,m=0,c=0;e:for(let l=0;l<f.length;l+=U){let S=f.slice(l,l+U),C=await Promise.all(S.map(async w=>{try{return await I(s,w)}catch(y){return y.code==="WORKSPACE_READ_LIMIT"?{tooLarge:!0}:null}}));for(let w=0;w<S.length;w+=1){m+=1;let y=C[w];if(y?.tooLarge){i+=1;continue}if(!y||y.subarray(0,8192).includes(0))continue;let E=y.toString("utf8"),O=[];for(let $=0,z=1;$<=E.length;z+=1){let k=E.indexOf(`
225
+ `,qe={javascript:I,typescript:I+B,tsx:I+B};var Qe=40*1024*1024;var ot=768*1024;var re=new Set([".js",".jsx",".mjs",".cjs",".ts",".tsx"]),rt=new Set([...re,".py",".go",".java",".kt",".cs",".rb",".rs"]);var it=new RegExp([String.raw`\bassert\w*\b`,String.raw`\bexpect\w*\s*\(`,String.raw`\.should\b`,String.raw`\bpytest\.raises\b`,String.raw`\bself\.assert\w+`,String.raw`\bt\.(?:Error|Errorf|Fatal|Fatalf|Fail|FailNow)\b`,String.raw`\brequire\.\w+\(`,String.raw`\bAssert\.\w+`,String.raw`\bassert_(?:eq|ne)!`,String.raw`\bverify\s*\(`,String.raw`\bto(?:Have|Be|Equal|Contain|Match|Throw)\w*\s*\(`].join("|"),"g");var jt=512*1024,Nt=1024*1024;var Rt=10080*60*1e3,Mt=720*60*60*1e3;var It=new Set("a an and are as at be been being but by can could did do does done for from had has have how into is it its may might must need needs no not of on or our our should so than that the their them then there these they this those to too use used using very was were what when where which while who why will with would you your about after all also any before between both during each every here how just make made more most need next now once only other over same should some such take then through under until up upon via want wants well when work works".split(/\s+/));var Lt=256*1024;function _(s){return String(s||"").replace(/[\u0000-\u001f\u007f]/g,e=>`\\u${e.codePointAt(0).toString(16).padStart(4,"0")}`).replaceAll("`","'")}var ie={"claude.md":"Claude Code","gemini.md":"Gemini CLI"},Pt=new Set(["agents.md",...Object.keys(ie)]);var pe=50,D=4e3,G=1e3,U=8,P=1e3,fe=5e3,de=2,F=0;async function Xt(s,e,t){let n=String(e.pattern??""),r=String(e.glob??"");if(!n)throw new Error("Pass a non-empty pattern to engineeros_grep.");if(n.length>4096||r.length>1024)throw new Error("Grep pattern or glob is too long. Use a smaller pattern and narrower glob.");if(F>=de)throw new Error("Two workspace searches are already running. Retry after one finishes.");F+=1;let o,p;try{let f=await t();return o=new le(new URL("./context-grep.mjs",import.meta.url),{workerData:{kind:"context-grep",workspace:s,args:e,files:f},execArgv:[],env:{},resourceLimits:{maxOldGenerationSizeMb:128,maxYoungGenerationSizeMb:16,stackSizeMb:4}}),await new Promise((d,i)=>{p=setTimeout(()=>i(new Error("Workspace search exceeded its five-second limit. Narrow the glob or simplify the regular expression.")),fe),o.once("message",m=>m.error?i(new Error(m.error)):d(m.text)),o.once("error",()=>i(new Error("Workspace search worker failed or exceeded its memory limit. Narrow the glob or pattern."))),o.once("exit",()=>i(new Error("Workspace search stopped before returning a result. Narrow the glob or pattern.")))})}finally{clearTimeout(p);try{o&&await o.terminate()}finally{F-=1}}}!ue&&v?.kind==="context-grep"&&(ce.setFlagsFromString("--enable-experimental-regexp-engine-on-excessive-backtracks"),me(v.workspace,v.args,v.files).then(s=>L.postMessage({text:s}),s=>L.postMessage({error:s.message})).finally(()=>L.close()));async function me(s,e,t){let n=String(e.pattern??"");if(!n)throw new Error("Pass a non-empty pattern to engineeros_grep.");let r;try{r=new RegExp(e.regex===!0?n:n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),e.ignore_case===!0?"i":"")}catch(l){throw new Error(`The pattern is not a valid regular expression: ${l.message}`)}let o=String(e.glob||"").trim(),p=o?ge(o):()=>!0,f=t.filter(p),d=[],i=0,m=0,c=0;e:for(let l=0;l<f.length;l+=U){let S=f.slice(l,l+U),C=await Promise.all(S.map(async w=>{try{return await M(s,w)}catch(y){return y.code==="WORKSPACE_READ_LIMIT"?{tooLarge:!0}:null}}));for(let w=0;w<S.length;w+=1){m+=1;let y=C[w];if(y?.tooLarge){i+=1;continue}if(!y||y.subarray(0,8192).includes(0))continue;let E=y.toString("utf8"),O=[];for(let $=0,z=1;$<=E.length;z+=1){let k=E.indexOf(`
226
226
  `,$),Z=k<0?E.length:k,T=E.slice($,Z).replace(/\r$/,"");if(r.test(T)&&(O.push({line:z,text:he(T,r),shortened:T.trimEnd().length>D}),c+=1),c===P||k<0)break;$=k+1}if(O.length&&d.push({path:S[w],lines:O}),c===P)break e}}let b=c===P,x=`${o?` in \`${_(o)}\``:""}`,g=`searched ${m.toLocaleString()} file(s)${i?`; ${i} file(s) over ${R/1024/1024} MB were not read`:""}`,a=["# EngineerOS Grep",""];if(o&&!f.length)return a.push(`The glob \`${_(o)}\` matched no file, so nothing was searched. A glob without a slash matches file names; name a directory as \`dir/\` or \`dir/**\`.`),a.join(`
227
227
  `);if(!d.length)return a.push(`No file matches \`${_(n)}\`${x} (${g}).`),a.join(`
228
228
  `);let H=e.output==="files"||e.output==="lines"?e.output:c<=pe?"lines":"files";if(a.push(`\`${_(n)}\`${x}: ${c.toLocaleString()} matching line(s) in ${d.length.toLocaleString()} file(s) (${g}).`),b&&a.push("Search reached the 1,000-line limit; counts may be partial. Narrow `glob` or the pattern to continue.",""),H==="files")return a.push('Narrow this with `glob`, or pass `output: "lines"` for the matching lines within the search limit.',"",...d.map(l=>`- \`${_(l.path)}\` (${l.lines.length})`)),a.join(`