koneck 2.123.0 → 2.124.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.
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The few things the interface states about a model without running one.
3
+ *
4
+ * Both of these are a line of arithmetic or a sentence of English, and both lived in engine.ts —
5
+ * which imports the OpenAI SDK, execa and ts-morph through fifty-seven modules and costs 645ms to
6
+ * load on a Raspberry Pi 5. The terminal needs them while it is drawing, not while it is working:
7
+ * `/config` prints the sub-agent concurrency and `/agents` explains it, both synchronously inside
8
+ * a render, so neither can wait on an await and neither should drag the engine in front of the
9
+ * first frame.
10
+ *
11
+ * Separated for the same measured reason as tool-outcome.ts and sandbox-modes.ts, and re-exported
12
+ * from engine.ts so nothing that already imports them from there had to change.
13
+ */
14
+ /**
15
+ * How many sub-agents may talk to the provider at once.
16
+ *
17
+ * Not how many may be requested — the model can ask for eight, and all eight still run. This is
18
+ * how many are in flight simultaneously, and it exists because they share one account. Launching
19
+ * eight at once against a rate-limited provider produced eight 429s and eight failures, and burned
20
+ * 949k tokens returning nothing. Three at a time finishes the same work slightly later and
21
+ * actually finishes it.
22
+ */
23
+ export declare const AGENT_CONCURRENCY = 3;
24
+ /** The widest a shared account has been seen to tolerate; past this, 429s are the usual outcome. */
25
+ export declare const MAX_AGENT_CONCURRENCY = 8;
26
+ /**
27
+ * How many sub-agents to run at once, honouring the user's setting.
28
+ *
29
+ * Three is a default, not a truth: a free tier may not sustain even that, while a generous
30
+ * enterprise key runs eight comfortably. Nonsense is ignored rather than passed to the pool, where
31
+ * a zero would stall the fan-out and a negative would throw.
32
+ */
33
+ export declare function resolveAgentConcurrency(requested: number | undefined): number;
34
+ /** Said once per session when the chosen model cannot call tools at all. */
35
+ export declare function toolsUnsupportedNotice(model: string): string;
36
+ //# sourceMappingURL=engine-facts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine-facts.d.ts","sourceRoot":"","sources":["../src/engine-facts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC,oGAAoG;AACpG,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAG7E;AAED,4EAA4E;AAC5E,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAI5D"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * The few things the interface states about a model without running one.
3
+ *
4
+ * Both of these are a line of arithmetic or a sentence of English, and both lived in engine.ts —
5
+ * which imports the OpenAI SDK, execa and ts-morph through fifty-seven modules and costs 645ms to
6
+ * load on a Raspberry Pi 5. The terminal needs them while it is drawing, not while it is working:
7
+ * `/config` prints the sub-agent concurrency and `/agents` explains it, both synchronously inside
8
+ * a render, so neither can wait on an await and neither should drag the engine in front of the
9
+ * first frame.
10
+ *
11
+ * Separated for the same measured reason as tool-outcome.ts and sandbox-modes.ts, and re-exported
12
+ * from engine.ts so nothing that already imports them from there had to change.
13
+ */
14
+ /**
15
+ * How many sub-agents may talk to the provider at once.
16
+ *
17
+ * Not how many may be requested — the model can ask for eight, and all eight still run. This is
18
+ * how many are in flight simultaneously, and it exists because they share one account. Launching
19
+ * eight at once against a rate-limited provider produced eight 429s and eight failures, and burned
20
+ * 949k tokens returning nothing. Three at a time finishes the same work slightly later and
21
+ * actually finishes it.
22
+ */
23
+ export const AGENT_CONCURRENCY = 3;
24
+ /** The widest a shared account has been seen to tolerate; past this, 429s are the usual outcome. */
25
+ export const MAX_AGENT_CONCURRENCY = 8;
26
+ /**
27
+ * How many sub-agents to run at once, honouring the user's setting.
28
+ *
29
+ * Three is a default, not a truth: a free tier may not sustain even that, while a generous
30
+ * enterprise key runs eight comfortably. Nonsense is ignored rather than passed to the pool, where
31
+ * a zero would stall the fan-out and a negative would throw.
32
+ */
33
+ export function resolveAgentConcurrency(requested) {
34
+ if (requested === undefined || !Number.isFinite(requested))
35
+ return AGENT_CONCURRENCY;
36
+ return Math.max(1, Math.min(MAX_AGENT_CONCURRENCY, Math.floor(requested)));
37
+ }
38
+ /** Said once per session when the chosen model cannot call tools at all. */
39
+ export function toolsUnsupportedNotice(model) {
40
+ return `"${model}" cannot call tools, so it cannot read, write, or run anything — ` +
41
+ `it will answer from the conversation alone. Pick a tool-capable model with /models ` +
42
+ `(on Ollama, look for one tagged for tool use) if you want it to work on your files.`;
43
+ }
44
+ //# sourceMappingURL=engine-facts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine-facts.js","sourceRoot":"","sources":["../src/engine-facts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAEnC,oGAAoG;AACpG,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEvC;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CAAC,SAA6B;IACnE,IAAI,SAAS,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,OAAO,iBAAiB,CAAC;IACrF,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC7E,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,sBAAsB,CAAC,KAAa;IAClD,OAAO,IAAI,KAAK,mEAAmE;QACjF,qFAAqF;QACrF,qFAAqF,CAAC;AAC1F,CAAC"}
package/dist/engine.d.ts CHANGED
@@ -120,7 +120,6 @@ export declare function retryDelayMs(err: unknown, attempt: number, random?: ()
120
120
  * the structured field is the more reliable arrangement when one is available.
121
121
  */
122
122
  export declare function textToolCallsNotice(model: string): string;
123
- export declare function toolsUnsupportedNotice(model: string): string;
124
123
  export declare function looksLikeToolsUnsupported(err: unknown): boolean;
125
124
  /**
126
125
  * Detects a provider or gateway error that arrived as assistant *content* with HTTP 200, rather
@@ -237,14 +236,7 @@ export interface ToolAvailability {
237
236
  }
238
237
  export declare function availableToolNames(names: readonly string[], available: ToolAvailability): string[];
239
238
  export declare function detectSearchKey(env?: NodeJS.ProcessEnv): boolean;
240
- /**
241
- * How many sub-agents to run at once, honouring the user's setting.
242
- *
243
- * Three is a default, not a truth: a free tier may not sustain even that, while a generous
244
- * enterprise key runs eight comfortably. Nonsense is ignored rather than passed to the pool, where
245
- * a zero would stall the fan-out and a negative would throw.
246
- */
247
- export declare function resolveAgentConcurrency(requested: number | undefined): number;
239
+ export { AGENT_CONCURRENCY, MAX_AGENT_CONCURRENCY, resolveAgentConcurrency, toolsUnsupportedNotice } from './engine-facts.js';
248
240
  /**
249
241
  * Maps over items with at most `limit` running at once, preserving input order in the results.
250
242
  *
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAc5B,OAAO,EACE,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAuBtC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAMvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAetC,OAAO,EAAwD,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtG,OAAO,EAA2B,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAIlB,OAAO,EAA0D,KAAK,SAAS,EAAE,MAC1E,oBAAoB,CAAC;AAM5B,OAAO,EAAE,kBAAkB,EACK,MAAM,iBAAiB,CAAC;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3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,uFAAuF;IACvF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAGD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,WAAW,EACnB,eAAe,CAAC,EAAE,OAAO,EAAE,EAC3B,MAAM,CAAC,EAAE,YAAY,GACpB,OAAO,CAAC,YAAY,CAAC,CAiLvB"}
package/dist/engine.js CHANGED
@@ -429,11 +429,6 @@ export function textToolCallsNotice(model) {
429
429
  return `${model} writes tool calls as text rather than as structured calls. ` +
430
430
  `They are being read and run, which is slower and less exact than the native form.`;
431
431
  }
432
- export function toolsUnsupportedNotice(model) {
433
- return `"${model}" cannot call tools, so it cannot read, write, or run anything — ` +
434
- `it will answer from the conversation alone. Pick a tool-capable model with /models ` +
435
- `(on Ollama, look for one tagged for tool use) if you want it to work on your files.`;
436
- }
437
432
  export function looksLikeToolsUnsupported(err) {
438
433
  const text = String(err?.message ?? err ?? '').toLowerCase();
439
434
  return /does not support tools|tools are not supported|tool (?:calling|use) (?:is )?not supported|no support for tools/.test(text);
@@ -905,30 +900,11 @@ function buildToolList(mcpClients, plugins, config, available = { git: true, web
905
900
  }
906
901
  const BUILTIN_NAMES = new Set(TOOL_DEFINITIONS.map(d => d.name));
907
902
  // ─── Parallel sub-agents ──────────────────────────────────────────────────────
908
- /**
909
- * How many sub-agents may talk to the provider at once.
910
- *
911
- * Not how many may be requested — the model can ask for eight, and all eight still run. This is
912
- * how many are in flight simultaneously, and it exists because they share one account. Launching
913
- * eight at once against a rate-limited provider produced eight 429s and eight failures, and burned
914
- * 949k tokens returning nothing. Three at a time finishes the same work slightly later and
915
- * actually finishes it.
916
- */
917
- const AGENT_CONCURRENCY = 3;
918
- /** The widest a shared account has been seen to tolerate; past this, 429s are the usual outcome. */
919
- const MAX_AGENT_CONCURRENCY = 8;
920
- /**
921
- * How many sub-agents to run at once, honouring the user's setting.
922
- *
923
- * Three is a default, not a truth: a free tier may not sustain even that, while a generous
924
- * enterprise key runs eight comfortably. Nonsense is ignored rather than passed to the pool, where
925
- * a zero would stall the fan-out and a negative would throw.
926
- */
927
- export function resolveAgentConcurrency(requested) {
928
- if (requested === undefined || !Number.isFinite(requested))
929
- return AGENT_CONCURRENCY;
930
- return Math.max(1, Math.min(MAX_AGENT_CONCURRENCY, Math.floor(requested)));
931
- }
903
+ // The concurrency numbers and the tools-unsupported sentence live in engine-facts.js: the
904
+ // terminal prints them inside a render, and importing this module to read a constant put the
905
+ // whole engine in front of the first frame. Re-exported so existing importers are unaffected.
906
+ export { AGENT_CONCURRENCY, MAX_AGENT_CONCURRENCY, resolveAgentConcurrency, toolsUnsupportedNotice } from './engine-facts.js';
907
+ import { resolveAgentConcurrency, toolsUnsupportedNotice } from './engine-facts.js';
932
908
  /** Stagger between starts, so agents do not all issue their first request on the same tick. */
933
909
  /** How much of a sub-agent's answer comes back. Enough for its conclusions, not its transcript. */
934
910
  const SUBAGENT_REPORT_CHARS = 2_000;