@axiom-lattice/core 3.0.2 → 3.0.4

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/index.d.mts CHANGED
@@ -5276,89 +5276,6 @@ declare function setBindingRegistry(r: BindingRegistry): void;
5276
5276
  */
5277
5277
  declare function getBindingRegistry(): BindingRegistry;
5278
5278
 
5279
- /**
5280
- * Service contract for controlling evaluation runs.
5281
- *
5282
- * The gateway layer implements this interface and registers it via
5283
- * {@link setEvalRunService} so that agent tools (e.g., `run_eval`) can
5284
- * start, abort, and monitor evaluation runs without knowing the
5285
- * underlying run-time infrastructure.
5286
- *
5287
- * @see {@link setEvalRunService}
5288
- * @see {@link getEvalRunService}
5289
- */
5290
- interface EvalRunService {
5291
- /**
5292
- * Start a new evaluation run for the given project.
5293
- *
5294
- * @param tenantId - Tenant that owns the project
5295
- * @param projectId - Project to evaluate
5296
- * @param suiteIds - Optional suite filter — only these suites run.
5297
- * Omit to run all suites. Used to keep the validation suite
5298
- * untouched during the fix loop (hold-out isolation).
5299
- * @returns The newly created run ID
5300
- */
5301
- startRun(tenantId: string, projectId: string, suiteIds?: string[]): Promise<string>;
5302
- /**
5303
- * Abort a running evaluation.
5304
- *
5305
- * @param runId - The run to abort
5306
- * @returns `true` if the run was successfully aborted
5307
- */
5308
- abortRun(runId: string): Promise<boolean>;
5309
- /**
5310
- * Check whether a run's runner process is still alive.
5311
- *
5312
- * @param runId - The run to check
5313
- * @returns `true` if the runner process is still active
5314
- */
5315
- isRunning(runId: string): boolean;
5316
- }
5317
- /**
5318
- * Sets the global {@link EvalRunService} instance used by agent evaluation tools.
5319
- *
5320
- * The service enables the `run_eval` tool to start, abort, and monitor evaluation
5321
- * runs. This must be called **at gateway startup** before any agent invocation that
5322
- * expects `run_eval` to be functional.
5323
- *
5324
- * @example
5325
- * ```ts
5326
- * import { setEvalRunService } from "@axiom-lattice/core";
5327
- *
5328
- * const evalSvc: EvalRunService = {
5329
- * startRun: async (tid, pid) => { ... },
5330
- * abortRun: async (rid) => { ... },
5331
- * isRunning: (rid) => { ... },
5332
- * };
5333
- * setEvalRunService(evalSvc);
5334
- * ```
5335
- *
5336
- * @param s - An {@link EvalRunService} implementation
5337
- * @see {@link getEvalRunService}
5338
- */
5339
- declare function setEvalRunService(s: EvalRunService): void;
5340
- /**
5341
- * Returns the globally registered {@link EvalRunService}.
5342
- *
5343
- * Must be called **after** {@link setEvalRunService}. Used by the `run_eval`
5344
- * tool to start, abort, and monitor evaluation runs.
5345
- *
5346
- * @returns The active {@link EvalRunService} instance
5347
- * @throws {Error} If the service has not been initialized
5348
- * @see {@link setEvalRunService}
5349
- */
5350
- declare function getEvalRunService(): EvalRunService;
5351
- /**
5352
- * Resets the global {@link EvalRunService} to `null`.
5353
- *
5354
- * Restricted to the `test` environment for test isolation only. Production
5355
- * code must never call this function.
5356
- *
5357
- * @throws {Error} If `NODE_ENV` is not `"test"`
5358
- * @see {@link setEvalRunService}
5359
- */
5360
- declare function clearEvalRunService(): void;
5361
-
5362
5279
  interface LatticeAgentStepConfig {
5363
5280
  agent_id: string;
5364
5281
  override_message?: string;
@@ -5497,6 +5414,114 @@ interface CaseRunResult {
5497
5414
  logs: LatticeEvalLogEvent[];
5498
5415
  }
5499
5416
 
5417
+ /**
5418
+ * Service contract for controlling evaluation runs.
5419
+ *
5420
+ * The gateway layer implements this interface and registers it via
5421
+ * {@link setEvalRunService} so that agent tools (e.g., `run_eval`) can
5422
+ * start, abort, and monitor evaluation runs without knowing the
5423
+ * underlying run-time infrastructure.
5424
+ *
5425
+ * @see {@link setEvalRunService}
5426
+ * @see {@link getEvalRunService}
5427
+ */
5428
+ interface EvalRunService {
5429
+ /**
5430
+ * Start a new evaluation run for the given project.
5431
+ *
5432
+ * @param tenantId - Tenant that owns the project
5433
+ * @param projectId - Project to evaluate
5434
+ * @param suiteIds - Optional suite filter — only these suites run.
5435
+ * Omit to run all suites. Used to keep the validation suite
5436
+ * untouched during the fix loop (hold-out isolation).
5437
+ * @param caseIds - Optional case filter — only these cases run (across
5438
+ * the suites selected by `suiteIds`, or all suites if omitted).
5439
+ * Suites with no matching cases are skipped; an error is thrown if
5440
+ * no case matches at all.
5441
+ * @param runConfig - Runtime environment (workspace/project) the eval
5442
+ * executes in. Comes from the CALLER's runConfig, NOT from the eval
5443
+ * project's targetServerConfig. Test cases are environment-agnostic;
5444
+ * the run environment is decided at run time.
5445
+ * @returns The newly created run ID
5446
+ */
5447
+ startRun(tenantId: string, projectId: string, suiteIds?: string[], caseIds?: string[], runConfig?: {
5448
+ workspaceId?: string;
5449
+ projectId?: string;
5450
+ }): Promise<string>;
5451
+ /**
5452
+ * Abort a running evaluation.
5453
+ *
5454
+ * @param runId - The run to abort
5455
+ * @returns `true` if the run was successfully aborted
5456
+ */
5457
+ abortRun(runId: string): Promise<boolean>;
5458
+ /**
5459
+ * Wait for a run to reach a terminal state and return its batch report.
5460
+ *
5461
+ * Resolves when the run finishes (completed, failed, or aborted) and its
5462
+ * status has been persisted to the store — the caller can then read the
5463
+ * run and its results without polling. Enables synchronous tool execution
5464
+ * (`run_eval start` with `wait: true`).
5465
+ *
5466
+ * @param runId - The run to wait for
5467
+ * @returns The final batch report of the run
5468
+ * @throws {Error} If the run is not tracked in this process's memory
5469
+ * (already finished and cleaned up, or owned by another gateway instance)
5470
+ */
5471
+ waitForRun(runId: string): Promise<LatticeEvalBatchReport>;
5472
+ /**
5473
+ * Check whether a run's runner process is still alive.
5474
+ *
5475
+ * @param runId - The run to check
5476
+ * @returns `true` if the runner process is still active
5477
+ */
5478
+ isRunning(runId: string): boolean;
5479
+ }
5480
+ /**
5481
+ * Sets the global {@link EvalRunService} instance used by agent evaluation tools.
5482
+ *
5483
+ * The service enables the `run_eval` tool to start, abort, and monitor evaluation
5484
+ * runs. This must be called **at gateway startup** before any agent invocation that
5485
+ * expects `run_eval` to be functional.
5486
+ *
5487
+ * @example
5488
+ * ```ts
5489
+ * import { setEvalRunService } from "@axiom-lattice/core";
5490
+ *
5491
+ * const evalSvc: EvalRunService = {
5492
+ * startRun: async (tid, pid) => { ... },
5493
+ * abortRun: async (rid) => { ... },
5494
+ * isRunning: (rid) => { ... },
5495
+ * };
5496
+ * setEvalRunService(evalSvc);
5497
+ * ```
5498
+ *
5499
+ * @param s - An {@link EvalRunService} implementation
5500
+ * @see {@link getEvalRunService}
5501
+ */
5502
+ declare function setEvalRunService(s: EvalRunService): void;
5503
+ /**
5504
+ * Returns the globally registered {@link EvalRunService}.
5505
+ *
5506
+ * Must be called **after** {@link setEvalRunService}. Used by the `run_eval`
5507
+ * tool to start, abort, and monitor evaluation runs.
5508
+ *
5509
+ * @returns The active {@link EvalRunService} instance
5510
+ * @throws {Error} If the service has not been initialized
5511
+ * @see {@link setEvalRunService}
5512
+ */
5513
+ declare function getEvalRunService(): EvalRunService;
5514
+ /**
5515
+ * Resets the global {@link EvalRunService} to `null`.
5516
+ *
5517
+ * Restricted to the `test` environment for test isolation only. Production
5518
+ * code must never call this function.
5519
+ *
5520
+ * @throws {Error} If `NODE_ENV` is not `"test"`
5521
+ * @see {@link setEvalRunService}
5522
+ */
5523
+ declare function clearEvalRunService(): void;
5524
+
5500
5525
  interface JudgeVerdict {
5501
5526
  pass?: boolean;
5502
5527
  final_score?: number;
@@ -5641,6 +5666,7 @@ declare class LatticeEvalProject {
5641
5666
  calibrateJudge(): Promise<{
5642
5667
  ok: boolean;
5643
5668
  reason?: string;
5669
+ bypassed?: boolean;
5644
5670
  }>;
5645
5671
  /**
5646
5672
  * Run all suites as a batch and build an in-memory report.
@@ -7552,11 +7578,12 @@ declare function serializePluginMeta(plugin: Plugin): PluginMetaOutput;
7552
7578
  declare const BUILTIN_PLUGINS: Plugin[];
7553
7579
 
7554
7580
  /**
7555
- * Document Learning Plugin
7581
+ * Capability Learning Plugin
7556
7582
  *
7557
- * Provides a document-learner agent and learn-document procedural skill.
7558
- * The agent guides users through turning documents into structured skill
7559
- * systems with evaluations following a supervised learning paradigm.
7583
+ * Provides a document-learner agent and learn-capability procedural skill.
7584
+ * The agent guides users through turning source material (documents, API
7585
+ * specs, conversations, spreadsheets) into structured skill systems with
7586
+ * evaluations — following a supervised learning paradigm.
7560
7587
  */
7561
7588
 
7562
7589
  declare const documentLearningPlugin: Plugin;
package/dist/index.d.ts CHANGED
@@ -5276,89 +5276,6 @@ declare function setBindingRegistry(r: BindingRegistry): void;
5276
5276
  */
5277
5277
  declare function getBindingRegistry(): BindingRegistry;
5278
5278
 
5279
- /**
5280
- * Service contract for controlling evaluation runs.
5281
- *
5282
- * The gateway layer implements this interface and registers it via
5283
- * {@link setEvalRunService} so that agent tools (e.g., `run_eval`) can
5284
- * start, abort, and monitor evaluation runs without knowing the
5285
- * underlying run-time infrastructure.
5286
- *
5287
- * @see {@link setEvalRunService}
5288
- * @see {@link getEvalRunService}
5289
- */
5290
- interface EvalRunService {
5291
- /**
5292
- * Start a new evaluation run for the given project.
5293
- *
5294
- * @param tenantId - Tenant that owns the project
5295
- * @param projectId - Project to evaluate
5296
- * @param suiteIds - Optional suite filter — only these suites run.
5297
- * Omit to run all suites. Used to keep the validation suite
5298
- * untouched during the fix loop (hold-out isolation).
5299
- * @returns The newly created run ID
5300
- */
5301
- startRun(tenantId: string, projectId: string, suiteIds?: string[]): Promise<string>;
5302
- /**
5303
- * Abort a running evaluation.
5304
- *
5305
- * @param runId - The run to abort
5306
- * @returns `true` if the run was successfully aborted
5307
- */
5308
- abortRun(runId: string): Promise<boolean>;
5309
- /**
5310
- * Check whether a run's runner process is still alive.
5311
- *
5312
- * @param runId - The run to check
5313
- * @returns `true` if the runner process is still active
5314
- */
5315
- isRunning(runId: string): boolean;
5316
- }
5317
- /**
5318
- * Sets the global {@link EvalRunService} instance used by agent evaluation tools.
5319
- *
5320
- * The service enables the `run_eval` tool to start, abort, and monitor evaluation
5321
- * runs. This must be called **at gateway startup** before any agent invocation that
5322
- * expects `run_eval` to be functional.
5323
- *
5324
- * @example
5325
- * ```ts
5326
- * import { setEvalRunService } from "@axiom-lattice/core";
5327
- *
5328
- * const evalSvc: EvalRunService = {
5329
- * startRun: async (tid, pid) => { ... },
5330
- * abortRun: async (rid) => { ... },
5331
- * isRunning: (rid) => { ... },
5332
- * };
5333
- * setEvalRunService(evalSvc);
5334
- * ```
5335
- *
5336
- * @param s - An {@link EvalRunService} implementation
5337
- * @see {@link getEvalRunService}
5338
- */
5339
- declare function setEvalRunService(s: EvalRunService): void;
5340
- /**
5341
- * Returns the globally registered {@link EvalRunService}.
5342
- *
5343
- * Must be called **after** {@link setEvalRunService}. Used by the `run_eval`
5344
- * tool to start, abort, and monitor evaluation runs.
5345
- *
5346
- * @returns The active {@link EvalRunService} instance
5347
- * @throws {Error} If the service has not been initialized
5348
- * @see {@link setEvalRunService}
5349
- */
5350
- declare function getEvalRunService(): EvalRunService;
5351
- /**
5352
- * Resets the global {@link EvalRunService} to `null`.
5353
- *
5354
- * Restricted to the `test` environment for test isolation only. Production
5355
- * code must never call this function.
5356
- *
5357
- * @throws {Error} If `NODE_ENV` is not `"test"`
5358
- * @see {@link setEvalRunService}
5359
- */
5360
- declare function clearEvalRunService(): void;
5361
-
5362
5279
  interface LatticeAgentStepConfig {
5363
5280
  agent_id: string;
5364
5281
  override_message?: string;
@@ -5497,6 +5414,114 @@ interface CaseRunResult {
5497
5414
  logs: LatticeEvalLogEvent[];
5498
5415
  }
5499
5416
 
5417
+ /**
5418
+ * Service contract for controlling evaluation runs.
5419
+ *
5420
+ * The gateway layer implements this interface and registers it via
5421
+ * {@link setEvalRunService} so that agent tools (e.g., `run_eval`) can
5422
+ * start, abort, and monitor evaluation runs without knowing the
5423
+ * underlying run-time infrastructure.
5424
+ *
5425
+ * @see {@link setEvalRunService}
5426
+ * @see {@link getEvalRunService}
5427
+ */
5428
+ interface EvalRunService {
5429
+ /**
5430
+ * Start a new evaluation run for the given project.
5431
+ *
5432
+ * @param tenantId - Tenant that owns the project
5433
+ * @param projectId - Project to evaluate
5434
+ * @param suiteIds - Optional suite filter — only these suites run.
5435
+ * Omit to run all suites. Used to keep the validation suite
5436
+ * untouched during the fix loop (hold-out isolation).
5437
+ * @param caseIds - Optional case filter — only these cases run (across
5438
+ * the suites selected by `suiteIds`, or all suites if omitted).
5439
+ * Suites with no matching cases are skipped; an error is thrown if
5440
+ * no case matches at all.
5441
+ * @param runConfig - Runtime environment (workspace/project) the eval
5442
+ * executes in. Comes from the CALLER's runConfig, NOT from the eval
5443
+ * project's targetServerConfig. Test cases are environment-agnostic;
5444
+ * the run environment is decided at run time.
5445
+ * @returns The newly created run ID
5446
+ */
5447
+ startRun(tenantId: string, projectId: string, suiteIds?: string[], caseIds?: string[], runConfig?: {
5448
+ workspaceId?: string;
5449
+ projectId?: string;
5450
+ }): Promise<string>;
5451
+ /**
5452
+ * Abort a running evaluation.
5453
+ *
5454
+ * @param runId - The run to abort
5455
+ * @returns `true` if the run was successfully aborted
5456
+ */
5457
+ abortRun(runId: string): Promise<boolean>;
5458
+ /**
5459
+ * Wait for a run to reach a terminal state and return its batch report.
5460
+ *
5461
+ * Resolves when the run finishes (completed, failed, or aborted) and its
5462
+ * status has been persisted to the store — the caller can then read the
5463
+ * run and its results without polling. Enables synchronous tool execution
5464
+ * (`run_eval start` with `wait: true`).
5465
+ *
5466
+ * @param runId - The run to wait for
5467
+ * @returns The final batch report of the run
5468
+ * @throws {Error} If the run is not tracked in this process's memory
5469
+ * (already finished and cleaned up, or owned by another gateway instance)
5470
+ */
5471
+ waitForRun(runId: string): Promise<LatticeEvalBatchReport>;
5472
+ /**
5473
+ * Check whether a run's runner process is still alive.
5474
+ *
5475
+ * @param runId - The run to check
5476
+ * @returns `true` if the runner process is still active
5477
+ */
5478
+ isRunning(runId: string): boolean;
5479
+ }
5480
+ /**
5481
+ * Sets the global {@link EvalRunService} instance used by agent evaluation tools.
5482
+ *
5483
+ * The service enables the `run_eval` tool to start, abort, and monitor evaluation
5484
+ * runs. This must be called **at gateway startup** before any agent invocation that
5485
+ * expects `run_eval` to be functional.
5486
+ *
5487
+ * @example
5488
+ * ```ts
5489
+ * import { setEvalRunService } from "@axiom-lattice/core";
5490
+ *
5491
+ * const evalSvc: EvalRunService = {
5492
+ * startRun: async (tid, pid) => { ... },
5493
+ * abortRun: async (rid) => { ... },
5494
+ * isRunning: (rid) => { ... },
5495
+ * };
5496
+ * setEvalRunService(evalSvc);
5497
+ * ```
5498
+ *
5499
+ * @param s - An {@link EvalRunService} implementation
5500
+ * @see {@link getEvalRunService}
5501
+ */
5502
+ declare function setEvalRunService(s: EvalRunService): void;
5503
+ /**
5504
+ * Returns the globally registered {@link EvalRunService}.
5505
+ *
5506
+ * Must be called **after** {@link setEvalRunService}. Used by the `run_eval`
5507
+ * tool to start, abort, and monitor evaluation runs.
5508
+ *
5509
+ * @returns The active {@link EvalRunService} instance
5510
+ * @throws {Error} If the service has not been initialized
5511
+ * @see {@link setEvalRunService}
5512
+ */
5513
+ declare function getEvalRunService(): EvalRunService;
5514
+ /**
5515
+ * Resets the global {@link EvalRunService} to `null`.
5516
+ *
5517
+ * Restricted to the `test` environment for test isolation only. Production
5518
+ * code must never call this function.
5519
+ *
5520
+ * @throws {Error} If `NODE_ENV` is not `"test"`
5521
+ * @see {@link setEvalRunService}
5522
+ */
5523
+ declare function clearEvalRunService(): void;
5524
+
5500
5525
  interface JudgeVerdict {
5501
5526
  pass?: boolean;
5502
5527
  final_score?: number;
@@ -5641,6 +5666,7 @@ declare class LatticeEvalProject {
5641
5666
  calibrateJudge(): Promise<{
5642
5667
  ok: boolean;
5643
5668
  reason?: string;
5669
+ bypassed?: boolean;
5644
5670
  }>;
5645
5671
  /**
5646
5672
  * Run all suites as a batch and build an in-memory report.
@@ -7552,11 +7578,12 @@ declare function serializePluginMeta(plugin: Plugin): PluginMetaOutput;
7552
7578
  declare const BUILTIN_PLUGINS: Plugin[];
7553
7579
 
7554
7580
  /**
7555
- * Document Learning Plugin
7581
+ * Capability Learning Plugin
7556
7582
  *
7557
- * Provides a document-learner agent and learn-document procedural skill.
7558
- * The agent guides users through turning documents into structured skill
7559
- * systems with evaluations following a supervised learning paradigm.
7583
+ * Provides a document-learner agent and learn-capability procedural skill.
7584
+ * The agent guides users through turning source material (documents, API
7585
+ * specs, conversations, spreadsheets) into structured skill systems with
7586
+ * evaluations — following a supervised learning paradigm.
7560
7587
  */
7561
7588
 
7562
7589
  declare const documentLearningPlugin: Plugin;