@aexol/spectral 0.9.156 → 0.9.158

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.
Files changed (62) hide show
  1. package/dist/auth-helper.d.ts +3 -3
  2. package/dist/auth-helper.d.ts.map +1 -1
  3. package/dist/auth-helper.js +3 -3
  4. package/dist/cli.js +5 -13
  5. package/dist/commands/login.d.ts +1 -1
  6. package/dist/commands/login.js +6 -6
  7. package/dist/commands/serve.d.ts.map +1 -1
  8. package/dist/commands/serve.js +8 -20
  9. package/dist/commands/update.d.ts.map +1 -1
  10. package/dist/commands/update.js +6 -15
  11. package/dist/extensions/browser/index.d.ts +1 -1
  12. package/dist/extensions/browser/index.js +1 -1
  13. package/dist/extensions/image-generation/index.js +1 -1
  14. package/dist/memory/compaction.d.ts +0 -89
  15. package/dist/memory/compaction.d.ts.map +1 -1
  16. package/dist/memory/compaction.js +2 -759
  17. package/dist/memory/hooks/compaction-hook.d.ts.map +1 -1
  18. package/dist/memory/hooks/compaction-hook.js +9 -235
  19. package/dist/memory/prompts.d.ts +0 -4
  20. package/dist/memory/prompts.d.ts.map +1 -1
  21. package/dist/memory/prompts.js +0 -165
  22. package/dist/relay/auto-research.d.ts.map +1 -1
  23. package/dist/relay/auto-research.js +0 -1
  24. package/dist/sdk/ai/env-api-keys.d.ts.map +1 -1
  25. package/dist/sdk/ai/env-api-keys.js +0 -4
  26. package/dist/sdk/ai/models.generated.d.ts +0 -399
  27. package/dist/sdk/ai/models.generated.d.ts.map +1 -1
  28. package/dist/sdk/ai/models.generated.js +0 -395
  29. package/dist/sdk/ai/providers/register-builtins.d.ts +0 -4
  30. package/dist/sdk/ai/providers/register-builtins.d.ts.map +1 -1
  31. package/dist/sdk/ai/providers/register-builtins.js +0 -16
  32. package/dist/sdk/ai/types.d.ts +1 -1
  33. package/dist/sdk/ai/types.d.ts.map +1 -1
  34. package/dist/sdk/ai/utils/oauth/index.d.ts +0 -1
  35. package/dist/sdk/ai/utils/oauth/index.d.ts.map +1 -1
  36. package/dist/sdk/ai/utils/oauth/index.js +0 -3
  37. package/dist/sdk/coding-agent/config.d.ts.map +1 -1
  38. package/dist/sdk/coding-agent/config.js +2 -1
  39. package/dist/sdk/coding-agent/core/agent-session.d.ts.map +1 -1
  40. package/dist/sdk/coding-agent/core/agent-session.js +4 -0
  41. package/dist/sdk/coding-agent/core/extensions/native-extensions.d.ts.map +1 -1
  42. package/dist/sdk/coding-agent/core/extensions/native-extensions.js +0 -10
  43. package/dist/sdk/coding-agent/core/model-resolver.d.ts.map +1 -1
  44. package/dist/sdk/coding-agent/core/model-resolver.js +0 -1
  45. package/dist/server/agent-bridge.d.ts.map +1 -1
  46. package/dist/server/agent-bridge.js +0 -2
  47. package/dist/version.d.ts +4 -0
  48. package/dist/version.d.ts.map +1 -0
  49. package/dist/version.js +88 -0
  50. package/package.json +1 -1
  51. package/dist/extensions/kanban-bridge.d.ts +0 -24
  52. package/dist/extensions/kanban-bridge.d.ts.map +0 -1
  53. package/dist/extensions/kanban-bridge.js +0 -858
  54. package/dist/memory/unified-compaction.d.ts +0 -59
  55. package/dist/memory/unified-compaction.d.ts.map +0 -1
  56. package/dist/memory/unified-compaction.js +0 -332
  57. package/dist/sdk/ai/providers/anthropic.d.ts +0 -54
  58. package/dist/sdk/ai/providers/anthropic.d.ts.map +0 -1
  59. package/dist/sdk/ai/providers/anthropic.js +0 -921
  60. package/dist/sdk/ai/utils/oauth/anthropic.d.ts +0 -25
  61. package/dist/sdk/ai/utils/oauth/anthropic.d.ts.map +0 -1
  62. package/dist/sdk/ai/utils/oauth/anthropic.js +0 -334
@@ -6,7 +6,7 @@
6
6
  * - `ensureAuthenticated()` — checks token validity, triggers OAuth re-login on 401/403
7
7
  * - `isAuthError()` — checks if an error indicates auth failure
8
8
  *
9
- * Extensions (aexol-mcp, kanban-bridge) call ensureAuthenticated() when they
9
+ * Extensions (aexol-mcp, image-generation) call ensureAuthenticated() when they
10
10
  * detect an auth failure so the user can re-authenticate without dropping
11
11
  * out to the terminal and running `spectral login` manually.
12
12
  */
@@ -33,8 +33,8 @@ export declare const OAUTH_REASON: {
33
33
  readonly SERVE: "serve";
34
34
  /** Background re-auth after a 401/403 from the backend. */
35
35
  readonly REAUTH: "reauth";
36
- /** Kanban / Studio authorization step. */
37
- readonly KANBAN: "kanban";
36
+ /** Aexol Studio authorization step. */
37
+ readonly STUDIO: "studio";
38
38
  };
39
39
  export type OAuthReason = (typeof OAUTH_REASON)[keyof typeof OAUTH_REASON];
40
40
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"auth-helper.d.ts","sourceRoot":"","sources":["../src/auth-helper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAOrB,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY;IACvB,4DAA4D;;IAE5D,6EAA6E;;IAE7E,2DAA2D;;IAE3D,0CAA0C;;CAElC,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AA8F3E;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAChC,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,GAAE,MAAyB,EACpC,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,WAAW,CAAC,CAmEtB;AAMD,0EAA0E;AAC1E,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAUjD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAgErE"}
1
+ {"version":3,"file":"auth-helper.d.ts","sourceRoot":"","sources":["../src/auth-helper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAOrB,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY;IACvB,4DAA4D;;IAE5D,6EAA6E;;IAE7E,2DAA2D;;IAE3D,uCAAuC;;CAE/B,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AA8F3E;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAChC,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,GAAE,MAAyB,EACpC,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,WAAW,CAAC,CAmEtB;AAMD,0EAA0E;AAC1E,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAUjD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAgErE"}
@@ -6,7 +6,7 @@
6
6
  * - `ensureAuthenticated()` — checks token validity, triggers OAuth re-login on 401/403
7
7
  * - `isAuthError()` — checks if an error indicates auth failure
8
8
  *
9
- * Extensions (aexol-mcp, kanban-bridge) call ensureAuthenticated() when they
9
+ * Extensions (aexol-mcp, image-generation) call ensureAuthenticated() when they
10
10
  * detect an auth failure so the user can re-authenticate without dropping
11
11
  * out to the terminal and running `spectral login` manually.
12
12
  */
@@ -27,8 +27,8 @@ export const OAUTH_REASON = {
27
27
  SERVE: "serve",
28
28
  /** Background re-auth after a 401/403 from the backend. */
29
29
  REAUTH: "reauth",
30
- /** Kanban / Studio authorization step. */
31
- KANBAN: "kanban",
30
+ /** Aexol Studio authorization step. */
31
+ STUDIO: "studio",
32
32
  };
33
33
  // ---------------------------------------------------------------------------
34
34
  // Constants
package/dist/cli.js CHANGED
@@ -13,20 +13,12 @@
13
13
  * - `spectral --version` / `--help` → branded short-circuits, no auth needed.
14
14
  * - anything else → error with usage hint.
15
15
  */
16
- import { readFileSync } from "node:fs";
17
- import { dirname, resolve } from "node:path";
18
- import { fileURLToPath } from "node:url";
19
- const __dirname = dirname(fileURLToPath(import.meta.url));
16
+ import { getVersion } from "./version.js";
20
17
  // ---- Read our own version ----------------------------------------------------
21
- let VERSION = process.env.npm_package_version ?? "0.0.0";
22
- try {
23
- const pkgPath = resolve(__dirname, "..", "package.json");
24
- const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
25
- VERSION = pkg.version;
26
- }
27
- catch {
28
- // Standalone Bun binaries do not carry the source package.json.
29
- }
18
+ // Centralized in src/version.ts so the standalone Bun binary, the npm
19
+ // install, and the electron app all resolve the same real version instead of
20
+ // silently falling back to "0.0.0".
21
+ const VERSION = getVersion();
30
22
  const TAGLINE = "Coding agent that never sleeps";
31
23
  // ---- Branded helpers ---------------------------------------------------------
32
24
  function printVersion() {
@@ -9,7 +9,7 @@
9
9
  * 2b. OAuth: open browser for Aexol Studio authorization.
10
10
  * 3. Verify reachability + auth by calling tools/list against the URL.
11
11
  * 4. On success: persist to ~/.spectral/config.json (mode 0600).
12
- * 5. Chain OAuth to also obtain a user JWT for Kanban/Studio features.
12
+ * 5. Chain OAuth to also obtain a user JWT for Studio features.
13
13
  *
14
14
  * Exits non-zero on any failure so shell scripts can detect it.
15
15
  *
@@ -9,7 +9,7 @@
9
9
  * 2b. OAuth: open browser for Aexol Studio authorization.
10
10
  * 3. Verify reachability + auth by calling tools/list against the URL.
11
11
  * 4. On success: persist to ~/.spectral/config.json (mode 0600).
12
- * 5. Chain OAuth to also obtain a user JWT for Kanban/Studio features.
12
+ * 5. Chain OAuth to also obtain a user JWT for Studio features.
13
13
  *
14
14
  * Exits non-zero on any failure so shell scripts can detect it.
15
15
  *
@@ -128,14 +128,14 @@ export async function runLogin() {
128
128
  }
129
129
  process.stdout.write(pc.green(`✓ Authenticated. Found ${result.toolCount} tools.\n`));
130
130
  process.stdout.write(pc.dim(`Saved credentials to ${getConfigFile()}\n`));
131
- // Chain OAuth for Kanban/Studio features (non-fatal — MCP tools work without it)
132
- process.stdout.write(pc.dim("\nAuthorizing for Aexol Studio features (Kanban)...\n"));
133
- const oauthResult = await runOAuthFlow(apiUrl, undefined, OAUTH_REASON.KANBAN);
131
+ // Chain OAuth for Studio features (non-fatal — MCP tools work without it)
132
+ process.stdout.write(pc.dim("\nAuthorizing for Aexol Studio features...\n"));
133
+ const oauthResult = await runOAuthFlow(apiUrl, undefined, OAUTH_REASON.STUDIO);
134
134
  if (oauthResult.ok) {
135
- process.stdout.write(pc.green("✓ CLI authorized for Studio/Kanban.\n"));
135
+ process.stdout.write(pc.green("✓ CLI authorized for Studio.\n"));
136
136
  }
137
137
  else {
138
- process.stderr.write(pc.yellow(`⚠ OAuth authorization skipped (${oauthResult.reason}). Kanban/Studio features may not be available.\n`));
138
+ process.stderr.write(pc.yellow(`⚠ OAuth authorization skipped (${oauthResult.reason}). Studio features may not be available.\n`));
139
139
  process.stderr.write(pc.dim(" Run `spectral login` and choose OAuth to set it up later.\n"));
140
140
  }
141
141
  }
@@ -1 +1 @@
1
- {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AA0BH,OAAO,EAAE,WAAW,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,EAAE,aAAa,CAAC;IAC9B,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4CAA4C;IAC5C,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,qBAAqB,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;CAC/E;AAED,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,KAAK,EAAE,YAAY,CAAC;IACpB,wDAAwD;IACxD,OAAO,EAAE,oBAAoB,CAAC;IAC9B,4CAA4C;IAC5C,KAAK,EAAE,WAAW,CAAC;IACnB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,wBAAsB,QAAQ,CAAC,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CAmelF;AA+DD;;;GAGG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAa5E"}
@@ -27,10 +27,8 @@
27
27
  * `relayUrlOverride` + `fetchImpl` + `webSocketImpl` to point at an
28
28
  * in-process fake backend.
29
29
  */
30
- import { readFileSync } from "node:fs";
31
30
  import { hostname } from "node:os";
32
- import { dirname, join, resolve } from "node:path";
33
- import { fileURLToPath } from "node:url";
31
+ import { join } from "node:path";
34
32
  import { getConfigDir } from "../config.js";
35
33
  import { readStudioBinding } from "../studio-binding.js";
36
34
  import { NATIVE_EXTENSIONS, buildNativeExtensionsInfo } from "../sdk/coding-agent/core/extensions/native-extensions.js";
@@ -46,24 +44,14 @@ import { SessionStreamManager } from "../server/session-stream.js";
46
44
  import { gracefulShutdown } from "../server/shutdown.js";
47
45
  import { getLiveMcpState } from "../mcp/state-getter.js";
48
46
  import { preflightSqlite, SessionStore } from "../server/storage.js";
49
- const __dirname = dirname(fileURLToPath(import.meta.url));
50
47
  /** Default backend base URL when neither env nor override is set. */
51
48
  const DEFAULT_BACKEND_URL = "https://api.aexol.ai";
52
- function readPackageVersion() {
53
- // dist/commands/serve.js → ../../package.json
54
- // src/commands/serve.ts../../package.json (tsx / vitest)
55
- // In a Bun standalone binary the source tree is not present, so the
56
- // package.json lookup below fails. Return a fallback version instead of
57
- // crashing the serve process.
58
- try {
59
- const pkgPath = resolve(__dirname, "..", "..", "package.json");
60
- const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
61
- return pkg.version;
62
- }
63
- catch {
64
- return process.env.npm_package_version ?? "0.0.0";
65
- }
66
- }
49
+ import { getVersion } from "../version.js";
50
+ // CLI version is resolved centrally via getVersion() (see src/version.ts):
51
+ // env override → package.json read "0.0.0". For standalone Bun binaries the
52
+ // version is also inlined at compile time via `bun build --define` in
53
+ // build-standalone.sh, so the relay always receives the real version instead
54
+ // of falling back to "0.0.0".
67
55
  /**
68
56
  * Translate a backend HTTP(S) base URL to the relay WS(S) URL.
69
57
  * `http://x:y` → `ws://x:y/agent-connection`
@@ -130,7 +118,7 @@ export function parseServeArgs(args) {
130
118
  export async function runServe(opts = {}) {
131
119
  const cfg = await requireLogin();
132
120
  const cwd = opts.cwd ?? process.cwd();
133
- const version = readPackageVersion();
121
+ const version = getVersion();
134
122
  const installSignalHandlers = opts.installSignalHandlers ?? true;
135
123
  const silent = opts.silent ?? false;
136
124
  const dbPath = opts.dbPath ?? join(getConfigDir(), "sessions.db");
@@ -1 +1 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAsOH;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA8H7D"}
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA2NH;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA8H7D"}
@@ -10,28 +10,19 @@
10
10
  */
11
11
  import { createHash } from "node:crypto";
12
12
  import { chmod, mkdtemp, rename, rm, stat, writeFile, } from "node:fs/promises";
13
- import { readFileSync } from "node:fs";
14
13
  import { tmpdir } from "node:os";
15
- import { basename, dirname, join, resolve } from "node:path";
16
- import { fileURLToPath } from "node:url";
14
+ import { basename, dirname, join } from "node:path";
17
15
  import pc from "picocolors";
18
- const __dirname = dirname(fileURLToPath(import.meta.url));
16
+ import { getVersion } from "../version.js";
19
17
  /** Base URL for the Aexol release manifest / binary downloads. */
20
18
  const RELEASE_BASE = "https://api.aexol.ai/api/releases/download";
21
19
  /**
22
- * Resolve the current CLI version. Reads package.json adjacent to this module
23
- * when available (dev / npm install), falling back to the npm-injected env var
24
- * and finally "0.0.0"mirroring the logic in cli.ts.
20
+ * Resolve the current CLI version via the centralized getVersion() helper
21
+ * (src/version.ts), which works for npm install, standalone Bun binaries, and
22
+ * the Electron appall of which previously fell back to "0.0.0".
25
23
  */
26
24
  function currentVersion() {
27
- try {
28
- const pkgPath = resolve(__dirname, "..", "package.json");
29
- const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
30
- return pkg.version;
31
- }
32
- catch {
33
- return process.env.npm_package_version ?? "0.0.0";
34
- }
25
+ return getVersion();
35
26
  }
36
27
  /**
37
28
  * Compare two semver-ish version strings (e.g. "1.2.3", "v1.2.3").
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * Architecture:
13
13
  * - BrowserService (singleton) — one browser, one context, multiple pages
14
- * - Tools register via ext.registerTool() — same pattern as kanban-bridge
14
+ * - Tools register via ext.registerTool() — same pattern as aexol-mcp
15
15
  * - Browser auto-closes on session_shutdown
16
16
  *
17
17
  * Registered tools (20):
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * Architecture:
13
13
  * - BrowserService (singleton) — one browser, one context, multiple pages
14
- * - Tools register via ext.registerTool() — same pattern as kanban-bridge
14
+ * - Tools register via ext.registerTool() — same pattern as aexol-mcp
15
15
  * - Browser auto-closes on session_shutdown
16
16
  *
17
17
  * Registered tools (20):
@@ -1,6 +1,6 @@
1
1
  import { Type } from "typebox";
2
2
  import { generateImages, getImageModel, getImageModels } from "../../sdk/ai/index.js";
3
- // App-layer routing helpers (mirror kanban-bridge.ts): obtain backendUrl +
3
+ // App-layer routing helpers (mirror aexol-mcp.ts): obtain backendUrl +
4
4
  // machineJwt the same way agent-bridge.ts gets them for text models, so image
5
5
  // generation routes through the backend proxy (POST /image/generation) using
6
6
  // the backend's own OPENROUTER_API_KEY instead of a local env key.
@@ -1,94 +1,6 @@
1
- import { agentLoop } from "../sdk/agent-core/index.js";
2
- import { type Model } from "../sdk/ai/index.js";
3
1
  import type { MemoryReflection, ObservationRecord } from "./types.js";
4
- export declare const REFLECTOR_MAX_PASSES = 1;
5
- export declare const PRUNER_MAX_PASSES = 2;
6
2
  export declare function observationPoolTokens(observations: ObservationRecord[]): number;
7
- interface LlmArgs {
8
- model: Model<any>;
9
- apiKey: string;
10
- headers?: Record<string, string>;
11
- signal?: AbortSignal;
12
- agentLoop?: typeof agentLoop;
13
- onEvent?: (event: import("../sdk/agent-core/index.js").AgentEvent) => void;
14
- maxTurns?: number;
15
- }
16
- export type ObservationCoverageTag = "uncited" | "cited" | "reinforced";
17
- export interface CoverageTagCounts {
18
- uncited: number;
19
- cited: number;
20
- reinforced: number;
21
- }
22
- export declare function deriveObservationCoverageTags(reflections: MemoryReflection[], observations: ObservationRecord[]): Map<string, ObservationCoverageTag>;
23
- export declare function coverageTagCounts(reflections: MemoryReflection[], observations: ObservationRecord[]): CoverageTagCounts;
24
- export declare function renderObservationsForPrunerPrompt(observations: ObservationRecord[], coverageTags: ReadonlyMap<string, ObservationCoverageTag>): string;
25
3
  export declare function migrateLegacyReflections(reflections: MemoryReflection[]): MemoryReflection[];
26
- export declare function normalizeSupportingObservationIds(supportingObservationIds: readonly string[] | undefined, allowedObservationIds: readonly string[]): string[] | undefined;
27
- export interface ReflectorPassContext {
28
- pass: number;
29
- maxPasses: number;
30
- minSupportingObservationIds: number;
31
- }
32
- export type ReflectionProposal = {
33
- content: string;
34
- supportingObservationIds?: readonly string[];
35
- };
36
- export interface ApplyReflectionProposalsResult {
37
- reflections: MemoryReflection[];
38
- accepted: number;
39
- added: number;
40
- merged: number;
41
- promoted: number;
42
- duplicates: number;
43
- unsupported: number;
44
- }
45
- export interface ReflectorPassStats {
46
- pass: number;
47
- toolCalls: number;
48
- accepted: number;
49
- added: number;
50
- merged: number;
51
- promoted: number;
52
- duplicates: number;
53
- unsupported: number;
54
- failed: boolean;
55
- }
56
- export interface ReflectorStats {
57
- passes: ReflectorPassStats[];
58
- toolCalls: number;
59
- accepted: number;
60
- added: number;
61
- merged: number;
62
- promoted: number;
63
- duplicates: number;
64
- unsupported: number;
65
- failedPass?: number;
66
- }
67
- export interface ReflectorResult {
68
- reflections: MemoryReflection[];
69
- stats: ReflectorStats;
70
- }
71
- export declare function renderReflectionsForReflectorPrompt(reflections: MemoryReflection[]): string;
72
- export declare function applyReflectionProposals(reflections: MemoryReflection[], proposals: readonly ReflectionProposal[], allowedObservationIds: readonly string[], passContext: Pick<ReflectorPassContext, "minSupportingObservationIds">): ApplyReflectionProposalsResult;
73
- export declare function runReflector(args: LlmArgs, reflections: MemoryReflection[], observations: ObservationRecord[], onPassStart?: (pass: number, maxPasses: number) => void): Promise<ReflectorResult>;
74
- export type PrunerStopReason = "empty" | "under_target" | "fell_back" | "zero_drops" | "max_passes";
75
- export interface PrunerPassStats {
76
- pass: number;
77
- poolTokens: number;
78
- targetTokens: number;
79
- deltaTokens: number;
80
- dropped: number;
81
- remaining: number;
82
- fellBack: boolean;
83
- }
84
- export interface PrunerResult {
85
- observations: ObservationRecord[];
86
- droppedIds: string[];
87
- fellBack: boolean;
88
- passes: PrunerPassStats[];
89
- stopReason: PrunerStopReason;
90
- }
91
- export declare function runPruner(args: LlmArgs, reflections: MemoryReflection[], observations: ObservationRecord[], budgetTokens: number, onPassStart?: (pass: number, maxPasses: number) => void): Promise<PrunerResult>;
92
4
  /**
93
5
  * Format an observation for Markdown-safe display.
94
6
  * Wraps the ID in backticks so it renders as inline code in Markdown
@@ -109,5 +21,4 @@ export declare function observationsToMarkdownList(observations: ObservationReco
109
21
  */
110
22
  export declare function reflectionsToMarkdownList(reflections: MemoryReflection[]): string;
111
23
  export declare function renderSummary(reflections: MemoryReflection[], observations: ObservationRecord[]): string;
112
- export {};
113
24
  //# sourceMappingURL=compaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compaction.d.ts","sourceRoot":"","sources":["../../src/memory/compaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA4E,MAAM,4BAA4B,CAAC;AAEjI,OAAO,EAAsB,KAAK,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAUpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAoB,MAAM,YAAY,CAAC;AAExF,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAGnC,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAE/E;AAED,UAAU,OAAO;IAChB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,4BAA4B,EAAE,UAAU,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