@wrongstack/cli 1.0.27 → 1.0.28

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.
@@ -6,7 +6,7 @@ import {
6
6
  runGit,
7
7
  setAutoSuggestions,
8
8
  setSuggestions
9
- } from "./chunk-HDMFKTT3.js";
9
+ } from "./chunk-7IQWQCBH.js";
10
10
  import {
11
11
  deriveFsAccessPair,
12
12
  persistConfigSetting
@@ -7342,4 +7342,4 @@ export {
7342
7342
  execute,
7343
7343
  resolveReviewerFallbackModels
7344
7344
  };
7345
- //# sourceMappingURL=execution-3STBD2U7.js.map
7345
+ //# sourceMappingURL=execution-THXWTHYT.js.map
@@ -0,0 +1,43 @@
1
+ import type { Director } from '@wrongstack/core/coordination';
2
+ import type { EventBus } from '@wrongstack/core/kernel';
3
+ import type { SubagentConfig } from '@wrongstack/core/types';
4
+ import { type SageSurface } from '@wrongstack/sage';
5
+ import { snapshotMemoryEvidence } from './memory-companion-evidence.js';
6
+ interface Input {
7
+ director: Director;
8
+ events: EventBus;
9
+ projectRoot: string;
10
+ roster: Record<string, SubagentConfig>;
11
+ memory: () => SageSurface | undefined;
12
+ enabled: (sessionId: string) => boolean;
13
+ scrub: (text: string) => string;
14
+ note: (sessionId: string, subject: string, body: string) => void;
15
+ /** Test seams; production uses bounded file snapshots and a 75-second watchdog. */
16
+ snapshot?: typeof snapshotMemoryEvidence;
17
+ timeoutMs?: number;
18
+ ioTimeoutMs?: number;
19
+ }
20
+ /** One bounded worker at a time; one lazily spawned resident per live conversation. */
21
+ export declare class HostMemoryCompanion {
22
+ private readonly input;
23
+ private sessions;
24
+ private pending;
25
+ private cooldown;
26
+ private draining;
27
+ private stopped;
28
+ private active;
29
+ private readonly off;
30
+ constructor(input: Input);
31
+ ensure(sessionId: string): void;
32
+ release(sessionId: string): void;
33
+ stop(): void;
34
+ private allowed;
35
+ private enqueue;
36
+ private drain;
37
+ private review;
38
+ private send;
39
+ private withinIoBudget;
40
+ private spawnBounded;
41
+ }
42
+ export {};
43
+ //# sourceMappingURL=host-memory-companion.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { type AgentFactory, type DirectorSessionFactory } from '@wrongstack/core/coordination';
2
- import type { ToolRegistry } from '@wrongstack/core/registry';
2
+ import { ToolRegistry } from '@wrongstack/core/registry';
3
3
  import type { Config, SubagentConfig, Tool } from '@wrongstack/core/types';
4
4
  import type { MultiAgentDeps, MultiAgentHostOptions } from './host-types.js';
5
5
  interface HostSubagentFactoryContext {
@@ -60,6 +60,7 @@ export declare class MultiAgentHost {
60
60
  * fleet.exploreCompanion.enabled=false. Probes are assigned to a
61
61
  * lazily-spawned resident `explore-companion` subagent per session. */
62
62
  private exploreCompanions;
63
+ private memoryCompanion;
63
64
  /** `agent.run.started` subscription that opens a companion for a new tab. */
64
65
  private exploreCompanionOff;
65
66
  /** Built-ins plus lazily-resolved project-created roles. */
@@ -0,0 +1,12 @@
1
+ import type { MemoryEvidenceSnapshot } from '@wrongstack/sage';
2
+ export { type MemoryEvidenceSnapshot, snapshotMemoryEvidence } from '@wrongstack/sage';
3
+ export interface MemoryCompanionVerdict {
4
+ verdict: 'supported' | 'outdated' | 'contradicted' | 'unverifiable' | 'irrelevant';
5
+ summary: string;
6
+ evidence: Array<{
7
+ path: string;
8
+ quote: string;
9
+ }>;
10
+ }
11
+ export declare function parseMemoryCompanionVerdict(raw: string, snapshot: MemoryEvidenceSnapshot): MemoryCompanionVerdict | undefined;
12
+ //# sourceMappingURL=memory-companion-evidence.d.ts.map
@@ -0,0 +1,9 @@
1
+ import type { SubagentConfig, Tool } from '@wrongstack/core/types';
2
+ export declare const MEMORY_COMPANION_READ_TOOLS: string[];
3
+ /** This predicate only narrows privileges; copying the prefix cannot grant any. */
4
+ export declare function isMemoryCompanion(config: SubagentConfig): boolean;
5
+ /** Reapply the host's read-only boundary AFTER project role/model overrides. */
6
+ export declare function constrainMemoryCompanion(config: SubagentConfig): SubagentConfig;
7
+ /** Do not auto-add session_note: all conclusions must pass the host's evidence gate. */
8
+ export declare function memoryCompanionTools(available: readonly Tool[]): Tool[];
9
+ //# sourceMappingURL=memory-companion-policy.d.ts.map
@@ -8,6 +8,16 @@ export declare function pathExists(p: string): Promise<boolean>;
8
8
  * test run); gitText keeps the head (its commands are tiny).
9
9
  */
10
10
  export declare const MAX_CMD_OUTPUT = 200000;
11
+ /**
12
+ * The last `cap` characters of a stream, trimmed WHILE it grows (at 2x the
13
+ * cap, so amortized linear). Collecting every chunk and slicing once at the
14
+ * end held the whole transcript: +146 MB retained for 150 MB of output.
15
+ */
16
+ export declare function createTailBuffer(cap: number): {
17
+ push(chunk: string): void;
18
+ value(): string;
19
+ retained(): number;
20
+ };
11
21
  /** Run a git command, returning trimmed stdout (empty string on failure). */
12
22
  export declare function gitText(args: string[], cwd: string): Promise<{
13
23
  code: number;
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@ async function main(argv) {
20
20
  applyAsciiMode(earlyFlags);
21
21
  }
22
22
  if (earlyFlags["help"] === true || earlyFlags["version"] === true) {
23
- const { handleHelpVersionShortCircuit } = await import("./short-circuit-flags-5TNTJPQR.js");
23
+ const { handleHelpVersionShortCircuit } = await import("./short-circuit-flags-BSIPTAPD.js");
24
24
  const earlyExit = await handleHelpVersionShortCircuit(argv);
25
25
  if (earlyExit !== null) return earlyExit;
26
26
  }
27
- const { initializeCli } = await import("./cli-context-C7RBSWHF.js");
27
+ const { initializeCli } = await import("./cli-context-O2SHBDFH.js");
28
28
  const cliCtx = await initializeCli(argv);
29
29
  if (typeof cliCtx === "number") return cliCtx;
30
- const { runInteractive } = await import("./cli-main-TQTH73ZK.js");
30
+ const { runInteractive } = await import("./cli-main-BKG4ZVLN.js");
31
31
  return runInteractive(cliCtx);
32
32
  }
33
33
 
@@ -10,7 +10,9 @@
10
10
  * Never rejects on a non-zero exit — the caller inspects `code`. It rejects
11
11
  * only when git could not be spawned at all, or when the 30s timeout fires.
12
12
  */
13
- export declare function runGit(args: string[], cwd: string): Promise<{
13
+ export declare function runGit(args: string[], cwd: string,
14
+ /** Extra environment (e.g. `GIT_INDEX_FILE`), merged over this process's. */
15
+ env?: NodeJS.ProcessEnv): Promise<{
14
16
  stdout: string;
15
17
  stderr: string;
16
18
  code: number;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  handleHelpVersionShortCircuit
3
- } from "./chunk-HFZH2XJN.js";
3
+ } from "./chunk-L5TD7UIG.js";
4
4
  import "./chunk-5JYDKG5B.js";
5
5
  import "./chunk-F5DCFAKI.js";
6
6
  import "./chunk-Q4INH2DG.js";
7
7
  export {
8
8
  handleHelpVersionShortCircuit
9
9
  };
10
- //# sourceMappingURL=short-circuit-flags-5TNTJPQR.js.map
10
+ //# sourceMappingURL=short-circuit-flags-BSIPTAPD.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  subcommandNames,
3
3
  subcommands
4
- } from "./chunk-N57IU5FG.js";
4
+ } from "./chunk-3ZTLPNEQ.js";
5
5
  export {
6
6
  subcommandNames,
7
7
  subcommands
8
8
  };
9
- //# sourceMappingURL=subcommands-BHQYLDSD.js.map
9
+ //# sourceMappingURL=subcommands-SRRB3RAS.js.map
@@ -278,7 +278,15 @@ async function lintConventions(deps, write) {
278
278
  }
279
279
  }
280
280
  const base = typeof flags["base"] === "string" ? flags["base"] : void 0;
281
- const diffArgs = ["diff", "--no-color", "--no-ext-diff", "-U24"];
281
+ const diffArgs = [
282
+ "diff",
283
+ "--no-color",
284
+ "--no-ext-diff",
285
+ "--no-textconv",
286
+ "--src-prefix=a/",
287
+ "--dst-prefix=b/",
288
+ "-U24"
289
+ ];
282
290
  if (flags["staged"] === true) diffArgs.push("--cached");
283
291
  else if (base) diffArgs.push(`${base}...HEAD`);
284
292
  let diff;
@@ -313,4 +321,4 @@ async function lintConventions(deps, write) {
313
321
  export {
314
322
  typesafeCmd
315
323
  };
316
- //# sourceMappingURL=typesafe-U7YB2RRV.js.map
324
+ //# sourceMappingURL=typesafe-WA5O3KVS.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/cli",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "license": "MIT",
5
5
  "description": "WrongStack CLI — terminal AI coding agent with provider catalog from models.dev. Provides `wrongstack` and `wstack` binaries.",
6
6
  "keywords": [
@@ -41,41 +41,41 @@
41
41
  "data"
42
42
  ],
43
43
  "dependencies": {
44
- "@wrongstack/acp": "1.0.27",
45
- "@wrongstack/bench": "1.0.27",
46
- "@wrongstack/core": "1.0.27",
47
- "@wrongstack/kanban": "1.0.27",
48
- "@wrongstack/mcp": "1.0.27",
49
- "@wrongstack/persistence": "1.0.27",
50
- "@wrongstack/plug-lsp": "1.0.27",
51
- "@wrongstack/plugins": "1.0.27",
52
- "@wrongstack/primitives": "1.0.27",
53
- "@wrongstack/providers": "1.0.27",
54
- "@wrongstack/requirement-intake": "1.0.27",
55
- "@wrongstack/runtime": "1.0.27",
56
- "@wrongstack/sage": "1.0.27",
57
- "@wrongstack/sdd": "1.0.27",
58
- "@wrongstack/security-scanner": "1.0.27",
59
- "@wrongstack/simpleui": "1.0.27",
60
- "@wrongstack/techstack": "1.0.27",
61
- "@wrongstack/telegram": "1.0.27",
62
- "@wrongstack/tools": "1.0.27",
63
- "@wrongstack/tui": "1.0.27",
64
- "@wrongstack/vector-memory": "1.0.27",
65
- "@wrongstack/webui": "1.0.27",
66
- "@wrongstack/webui-hq": "1.0.27",
67
- "@wrongstack/webui-protocol": "1.0.27",
68
- "@wrongstack/webui-server": "1.0.27",
69
- "@wrongstack/wrongtrace": "1.0.27",
44
+ "@wrongstack/acp": "1.0.28",
45
+ "@wrongstack/bench": "1.0.28",
46
+ "@wrongstack/core": "1.0.28",
47
+ "@wrongstack/kanban": "1.0.28",
48
+ "@wrongstack/mcp": "1.0.28",
49
+ "@wrongstack/persistence": "1.0.28",
50
+ "@wrongstack/plug-lsp": "1.0.28",
51
+ "@wrongstack/plugins": "1.0.28",
52
+ "@wrongstack/primitives": "1.0.28",
53
+ "@wrongstack/providers": "1.0.28",
54
+ "@wrongstack/requirement-intake": "1.0.28",
55
+ "@wrongstack/runtime": "1.0.28",
56
+ "@wrongstack/sage": "1.0.28",
57
+ "@wrongstack/sdd": "1.0.28",
58
+ "@wrongstack/security-scanner": "1.0.28",
59
+ "@wrongstack/simpleui": "1.0.28",
60
+ "@wrongstack/techstack": "1.0.28",
61
+ "@wrongstack/telegram": "1.0.28",
62
+ "@wrongstack/tools": "1.0.28",
63
+ "@wrongstack/tui": "1.0.28",
64
+ "@wrongstack/vector-memory": "1.0.28",
65
+ "@wrongstack/webui": "1.0.28",
66
+ "@wrongstack/webui-hq": "1.0.28",
67
+ "@wrongstack/webui-protocol": "1.0.28",
68
+ "@wrongstack/webui-server": "1.0.28",
69
+ "@wrongstack/wrongtrace": "1.0.28",
70
70
  "ws": "^8.21.3"
71
71
  },
72
72
  "optionalDependencies": {
73
- "@wrongstack/desktop": "1.0.27"
73
+ "@wrongstack/desktop": "1.0.28"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@types/node": "^26.5.1",
77
77
  "@types/ws": "^8.18.1",
78
- "@wrongstack/governance": "1.0.27",
78
+ "@wrongstack/governance": "1.0.28",
79
79
  "jsdom": "^30.0.1",
80
80
  "typescript": "^7.0.2"
81
81
  },