@elench/testkit 0.1.96 → 0.1.98

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 (79) hide show
  1. package/lib/app/browser-bridge.mjs +1 -1
  2. package/lib/cli/assistant/app.mjs +49 -12
  3. package/lib/cli/assistant/composer.mjs +19 -1
  4. package/lib/cli/assistant/context-pack.mjs +9 -8
  5. package/lib/cli/assistant/interactive.mjs +1 -1
  6. package/lib/cli/assistant/model-discovery.mjs +243 -0
  7. package/lib/cli/assistant/prompt-builder.mjs +2 -5
  8. package/lib/cli/{agents → assistant}/providers/claude.mjs +41 -3
  9. package/lib/cli/{agents → assistant}/providers/codex.mjs +33 -14
  10. package/lib/cli/{agents → assistant/providers}/index.mjs +3 -3
  11. package/lib/cli/{agents → assistant}/providers/shared.mjs +6 -2
  12. package/lib/cli/assistant/session.mjs +31 -6
  13. package/lib/cli/assistant/slash-commands.mjs +30 -3
  14. package/lib/cli/assistant/state.mjs +237 -71
  15. package/lib/cli/assistant/tool-registry.mjs +325 -39
  16. package/lib/cli/assistant/view-model.mjs +1 -1
  17. package/lib/cli/commands/assistant.mjs +4 -3
  18. package/lib/cli/commands/browser/serve.mjs +5 -23
  19. package/lib/cli/commands/cleanup.mjs +8 -2
  20. package/lib/cli/commands/db/snapshot/capture.mjs +8 -4
  21. package/lib/cli/commands/destroy.mjs +8 -2
  22. package/lib/cli/commands/discover.mjs +5 -27
  23. package/lib/cli/commands/doctor.mjs +5 -5
  24. package/lib/cli/commands/flags.mjs +61 -0
  25. package/lib/cli/commands/run.mjs +10 -2
  26. package/lib/cli/commands/status.mjs +10 -2
  27. package/lib/cli/commands/typecheck.mjs +5 -5
  28. package/lib/cli/{tui/inspect-app.mjs → components/blocks/run-tree.mjs} +29 -54
  29. package/lib/cli/{tui → components/primitives}/filter-bar.mjs +1 -1
  30. package/lib/cli/{presentation → components/primitives}/summary-box.mjs +1 -1
  31. package/lib/cli/config.mjs +63 -0
  32. package/lib/cli/operations/browser/serve/operation.mjs +23 -0
  33. package/lib/cli/operations/cleanup/operation.mjs +8 -0
  34. package/lib/cli/{db.mjs → operations/db/snapshot/capture/operation.mjs} +15 -9
  35. package/lib/cli/operations/destroy/operation.mjs +12 -0
  36. package/lib/cli/operations/discover/operation.mjs +32 -0
  37. package/lib/cli/operations/doctor/operation.mjs +5 -0
  38. package/lib/cli/operations/run/operation.mjs +129 -0
  39. package/lib/cli/operations/status/operation.mjs +7 -0
  40. package/lib/cli/operations/typecheck/operation.mjs +5 -0
  41. package/lib/cli/renderers/browser-serve/text.mjs +6 -0
  42. package/lib/cli/renderers/cleanup/text.mjs +3 -0
  43. package/lib/cli/renderers/db-snapshot-capture/text.mjs +3 -0
  44. package/lib/cli/renderers/destroy/text.mjs +3 -0
  45. package/lib/cli/{presentation/discovery-reporter.mjs → renderers/discover/report.mjs} +3 -3
  46. package/lib/cli/renderers/discover/text.mjs +7 -0
  47. package/lib/cli/renderers/doctor/text.mjs +7 -0
  48. package/lib/cli/{presentation/failure-presentation.mjs → renderers/run/failure.mjs} +6 -6
  49. package/lib/cli/renderers/run/interactive.mjs +119 -0
  50. package/lib/cli/{presentation/run-reporter.mjs → renderers/run/text-reporter.mjs} +5 -5
  51. package/lib/cli/renderers/status/text.mjs +7 -0
  52. package/lib/cli/renderers/typecheck/text.mjs +7 -0
  53. package/lib/cli/{tui/inspect-model.mjs → state/run/model.mjs} +11 -26
  54. package/lib/cli/{tui/inspect-state.mjs → state/run/state.mjs} +11 -18
  55. package/lib/cli/{tui → state/tree}/fuzzy-match.mjs +1 -1
  56. package/lib/cli/terminal/capabilities.mjs +33 -0
  57. package/lib/database/index.mjs +9 -21
  58. package/lib/database/template-steps.mjs +3 -3
  59. package/lib/{cli/viewer.mjs → results/artifacts.mjs} +1 -1
  60. package/lib/{cli/context-resources.mjs → results/context.mjs} +1 -1
  61. package/lib/runner/maintenance.mjs +25 -14
  62. package/lib/runner/readiness.mjs +5 -4
  63. package/lib/runner/runtime-preparation.mjs +36 -0
  64. package/lib/runner/state-io.mjs +10 -4
  65. package/lib/runner/template.mjs +24 -3
  66. package/node_modules/@elench/next-analysis/package.json +1 -1
  67. package/node_modules/@elench/testkit-bridge/package.json +2 -2
  68. package/node_modules/@elench/testkit-protocol/package.json +1 -1
  69. package/node_modules/@elench/ts-analysis/package.json +1 -1
  70. package/package.json +5 -5
  71. package/lib/cli/assistant/command-plan.mjs +0 -227
  72. package/lib/cli/command-helpers.mjs +0 -191
  73. package/lib/cli/presentation/tree-reporter.mjs +0 -96
  74. package/lib/cli/tui/inspect-artifact-adapter.mjs +0 -3
  75. package/lib/cli/tui/inspect-live-adapter.mjs +0 -15
  76. /package/lib/cli/{presentation/events-reporter.mjs → renderers/run/events.mjs} +0 -0
  77. /package/lib/cli/{presentation → terminal}/colors.mjs +0 -0
  78. /package/lib/cli/{presentation/terminal-layout.mjs → terminal/layout.mjs} +0 -0
  79. /package/lib/{cli/presentation → results}/code-frames.mjs +0 -0
@@ -1,96 +0,0 @@
1
- import React, { createElement } from "react";
2
- import { render } from "ink";
3
- import { createInspectState } from "../tui/inspect-state.mjs";
4
- import { InspectApp } from "../tui/inspect-app.mjs";
5
- import {
6
- applyReporterPlans,
7
- applyReporterRunSummary,
8
- applyReporterTaskFinished,
9
- applyReporterTaskStarted,
10
- } from "../tui/inspect-live-adapter.mjs";
11
- import { suiteSelectionType } from "../../runner/suite-selection.mjs";
12
-
13
- export function createTreeReporter({ stdout = process.stdout, stderr = process.stderr, productDir } = {}) {
14
- const inspectState = createInspectState({ dataSource: "live" });
15
-
16
- const app = render(
17
- createElement(InspectApp, {
18
- inspectState,
19
- stdout,
20
- productDir,
21
- onRequestClose: close,
22
- }),
23
- { stdout, exitOnCtrlC: false }
24
- );
25
-
26
- const finalize = app.waitUntilExit();
27
-
28
- const reporter = {
29
- outputMode: "compact",
30
-
31
- setServicePlans(plans) {
32
- applyReporterPlans(inspectState, plans);
33
- },
34
-
35
- setTotalFileCount(count) {
36
- inspectState.setTotalFileCount(count);
37
- },
38
-
39
- setRegressionCatalog(document) {
40
- inspectState.setRegressionCatalog(document);
41
- },
42
-
43
- serviceSkipped(config, reason) {
44
- inspectState.markServiceSkipped(config.name, reason);
45
- },
46
-
47
- plannedSkip(entry) {
48
- inspectState.markPlannedSkip(entry);
49
- },
50
-
51
- taskStarted(task, _config) {
52
- const suiteKey = `${task.displayType || suiteSelectionType(task.type, task.framework)}:${task.suiteName}`;
53
- applyReporterTaskStarted(inspectState, task, suiteKey);
54
- },
55
-
56
- taskFinished(task, outcome) {
57
- applyReporterTaskFinished(inspectState, task, outcome);
58
- },
59
-
60
- runtimeError(task, message) {
61
- inspectState.markRuntimeError(task, message);
62
- },
63
-
64
- setupOperationFinished(_operation) {
65
- // tree handles this implicitly through phase
66
- },
67
-
68
- phaseStarted(label) {
69
- inspectState.setPhase(label);
70
- },
71
-
72
- toolchainResolved() {},
73
- localServiceStarting() {},
74
- writeLine() {},
75
- writeDebugLine() {},
76
- telemetry() {},
77
-
78
- runSummary(results, durationMs, regressionReport) {
79
- applyReporterRunSummary(inspectState, results, durationMs, regressionReport);
80
- },
81
-
82
- error(message) {
83
- stderr.write(`${message}\n`);
84
- },
85
- };
86
-
87
- return {
88
- reporter,
89
- finalize,
90
- close,
91
- };
92
-
93
- function close() {
94
- app.unmount();
95
- }
96
- }
@@ -1,3 +0,0 @@
1
- export function hydrateInspectStateFromArtifact(inspectState, artifact) {
2
- inspectState.hydrateFromArtifact(artifact);
3
- }
@@ -1,15 +0,0 @@
1
- export function applyReporterPlans(inspectState, plans) {
2
- inspectState.initFromPlans(plans);
3
- }
4
-
5
- export function applyReporterTaskStarted(inspectState, task, suiteKey) {
6
- inspectState.markFileRunning(task.serviceName, suiteKey, task.file);
7
- }
8
-
9
- export function applyReporterTaskFinished(inspectState, task, outcome) {
10
- inspectState.markFileFinished(task, outcome);
11
- }
12
-
13
- export function applyReporterRunSummary(inspectState, results, durationMs, regressionReport) {
14
- inspectState.finish(results, durationMs, regressionReport);
15
- }
File without changes