@kaelio/ktx 0.10.0 → 0.12.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.
Files changed (193) hide show
  1. package/assets/python/{kaelio_ktx-0.10.0-py3-none-any.whl → kaelio_ktx-0.12.0-py3-none-any.whl} +0 -0
  2. package/assets/python/manifest.json +4 -4
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/admin.js +1 -1
  5. package/dist/clack.d.ts +16 -0
  6. package/dist/clack.js +37 -6
  7. package/dist/claude-code-prompt-caching.js +1 -1
  8. package/dist/cli-program.js +7 -3
  9. package/dist/cli-runtime.d.ts +2 -0
  10. package/dist/cli-runtime.js +14 -8
  11. package/dist/commands/connection-commands.js +1 -1
  12. package/dist/commands/ingest-commands.js +4 -4
  13. package/dist/commands/mcp-commands.js +12 -12
  14. package/dist/commands/runtime-commands.js +4 -4
  15. package/dist/commands/setup-commands.js +6 -5
  16. package/dist/commands/sl-commands.js +1 -1
  17. package/dist/commands/sql-commands.js +1 -1
  18. package/dist/commands/status-commands.js +1 -1
  19. package/dist/community-cta.d.ts +11 -0
  20. package/dist/community-cta.js +19 -0
  21. package/dist/connection.js +1 -1
  22. package/dist/connectors/clickhouse/connector.js +1 -1
  23. package/dist/connectors/mysql/connector.js +1 -1
  24. package/dist/connectors/snowflake/connector.d.ts +1 -1
  25. package/dist/connectors/sqlite/connector.js +2 -25
  26. package/dist/connectors/sqlserver/connector.js +3 -3
  27. package/dist/context/connections/connection-type.d.ts +1 -1
  28. package/dist/context/connections/read-only-sql.d.ts +1 -0
  29. package/dist/context/connections/read-only-sql.js +116 -2
  30. package/dist/context/core/git-env.d.ts +12 -1
  31. package/dist/context/core/git-env.js +17 -2
  32. package/dist/context/core/git.service.d.ts +23 -0
  33. package/dist/context/core/git.service.js +86 -15
  34. package/dist/context/ingest/adapters/historic-sql/projection.js +2 -1
  35. package/dist/context/ingest/adapters/looker/client.js +7 -2
  36. package/dist/context/ingest/adapters/looker/factory.d.ts +8 -1
  37. package/dist/context/ingest/adapters/looker/factory.js +9 -0
  38. package/dist/context/ingest/adapters/looker/mapping.js +1 -1
  39. package/dist/context/ingest/adapters/looker/types.d.ts +1 -1
  40. package/dist/context/ingest/adapters/metabase/client.d.ts +1 -1
  41. package/dist/context/ingest/adapters/metabase/client.js +1 -1
  42. package/dist/context/ingest/adapters/metabase/local-metabase.adapter.js +1 -1
  43. package/dist/context/ingest/adapters/metabase/mapping.js +6 -6
  44. package/dist/context/ingest/artifact-gates.d.ts +2 -6
  45. package/dist/context/ingest/artifact-gates.js +5 -47
  46. package/dist/context/ingest/constrained-repair.d.ts +55 -0
  47. package/dist/context/ingest/constrained-repair.js +167 -0
  48. package/dist/context/ingest/final-gate-repair.d.ts +9 -11
  49. package/dist/context/ingest/final-gate-repair.js +40 -128
  50. package/dist/context/ingest/finalization-scope.d.ts +1 -1
  51. package/dist/context/ingest/finalization-scope.js +15 -15
  52. package/dist/context/ingest/ingest-bundle.runner.d.ts +1 -0
  53. package/dist/context/ingest/ingest-bundle.runner.js +101 -67
  54. package/dist/context/ingest/isolated-diff/patch-integrator.d.ts +6 -13
  55. package/dist/context/ingest/isolated-diff/patch-integrator.js +32 -109
  56. package/dist/context/ingest/isolated-diff/textual-conflict-resolver.d.ts +8 -9
  57. package/dist/context/ingest/isolated-diff/textual-conflict-resolver.js +63 -141
  58. package/dist/context/ingest/local-bundle-runtime.d.ts +2 -0
  59. package/dist/context/ingest/local-bundle-runtime.js +9 -10
  60. package/dist/context/ingest/local-ingest.d.ts +2 -0
  61. package/dist/context/ingest/local-ingest.js +2 -0
  62. package/dist/context/ingest/memory-flow/view-model.js +1 -1
  63. package/dist/context/ingest/stages/stage-3-work-units.d.ts +2 -6
  64. package/dist/context/ingest/stages/stage-3-work-units.js +2 -1
  65. package/dist/context/ingest/stages/validate-wu-sources.d.ts +7 -1
  66. package/dist/context/ingest/stages/validate-wu-sources.js +109 -4
  67. package/dist/context/ingest/tools/warehouse-verification/create-warehouse-verification-tools.d.ts +2 -0
  68. package/dist/context/ingest/tools/warehouse-verification/create-warehouse-verification-tools.js +1 -1
  69. package/dist/context/ingest/tools/warehouse-verification/discover-data.tool.js +3 -3
  70. package/dist/context/ingest/tools/warehouse-verification/sql-execution.tool.d.ts +3 -1
  71. package/dist/context/ingest/tools/warehouse-verification/sql-execution.tool.js +15 -1
  72. package/dist/context/llm/ai-sdk-runtime.js +2 -2
  73. package/dist/context/llm/claude-code-runtime.js +1 -1
  74. package/dist/context/llm/local-config.js +1 -1
  75. package/dist/context/llm/runtime-tools.js +2 -2
  76. package/dist/context/mcp/context-tools.js +7 -7
  77. package/dist/context/mcp/local-project-ports.js +23 -54
  78. package/dist/context/memory/local-memory.js +4 -1
  79. package/dist/context/memory/memory-agent.service.js +1 -1
  80. package/dist/context/project/config.d.ts +11 -4
  81. package/dist/context/project/config.js +85 -30
  82. package/dist/context/project/driver-schemas.js +1 -1
  83. package/dist/context/project/mappings-yaml-schema.js +2 -2
  84. package/dist/context/project/project.js +12 -4
  85. package/dist/context/scan/description-generation.js +4 -4
  86. package/dist/context/scan/local-enrichment-artifacts.js +2 -1
  87. package/dist/context/scan/local-scan.js +2 -2
  88. package/dist/context/scan/local-structural-artifacts.js +5 -5
  89. package/dist/context/scan/relationship-benchmark-report.js +1 -1
  90. package/dist/context/scan/relationship-discovery.js +3 -3
  91. package/dist/context/scan/relationship-llm-proposal.js +3 -3
  92. package/dist/context/sl/local-query.js +3 -33
  93. package/dist/context/sl/local-sl.d.ts +0 -8
  94. package/dist/context/sl/local-sl.js +44 -69
  95. package/dist/context/sl/semantic-layer.service.d.ts +25 -8
  96. package/dist/context/sl/semantic-layer.service.js +109 -56
  97. package/dist/context/sl/source-files.d.ts +46 -0
  98. package/dist/context/sl/source-files.js +131 -0
  99. package/dist/context/sl/tools/base-semantic-layer.tool.d.ts +2 -2
  100. package/dist/context/sl/tools/base-semantic-layer.tool.js +2 -7
  101. package/dist/context/sl/tools/sl-edit-source.tool.js +10 -8
  102. package/dist/context/sl/tools/sl-warehouse-validation.js +55 -27
  103. package/dist/context/sl/tools/sl-write-source.tool.js +12 -9
  104. package/dist/context/sql-analysis/dialect.d.ts +2 -0
  105. package/dist/context/sql-analysis/dialect.js +20 -0
  106. package/dist/context/tools/base-tool.d.ts +6 -19
  107. package/dist/context/tools/base-tool.js +0 -14
  108. package/dist/context-build-view.js +5 -5
  109. package/dist/database-tree-picker.js +18 -3
  110. package/dist/demo-assets.js +0 -1
  111. package/dist/doctor.d.ts +1 -1
  112. package/dist/doctor.js +31 -23
  113. package/dist/errors.d.ts +31 -0
  114. package/dist/errors.js +44 -0
  115. package/dist/ingest.d.ts +1 -1
  116. package/dist/ingest.js +8 -2
  117. package/dist/io/symbols.d.ts +2 -0
  118. package/dist/io/symbols.js +2 -0
  119. package/dist/io/tty.d.ts +17 -0
  120. package/dist/io/tty.js +21 -0
  121. package/dist/links.d.ts +1 -0
  122. package/dist/links.js +1 -0
  123. package/dist/llm/embedding-health.js +1 -1
  124. package/dist/llm/embedding-provider.js +3 -3
  125. package/dist/llm/model-provider.js +1 -1
  126. package/dist/local-adapters.d.ts +1 -0
  127. package/dist/local-adapters.js +2 -2
  128. package/dist/local-scan-connectors.js +1 -1
  129. package/dist/managed-local-embeddings.js +17 -8
  130. package/dist/managed-mcp-daemon.js +3 -3
  131. package/dist/managed-python-command.d.ts +7 -0
  132. package/dist/managed-python-command.js +34 -8
  133. package/dist/managed-python-daemon.js +2 -2
  134. package/dist/managed-python-http.js +3 -3
  135. package/dist/managed-python-runtime.d.ts +30 -1
  136. package/dist/managed-python-runtime.js +134 -18
  137. package/dist/managed-uv-release.d.ts +7 -0
  138. package/dist/managed-uv-release.js +11 -0
  139. package/dist/mcp-http-server.js +4 -4
  140. package/dist/mcp-server-factory.js +3 -3
  141. package/dist/mcp-stdio-server.js +1 -1
  142. package/dist/memory-flow-hud.js +2 -2
  143. package/dist/next-steps.js +2 -2
  144. package/dist/prompt-navigation.d.ts +17 -0
  145. package/dist/prompt-navigation.js +49 -3
  146. package/dist/prompts/memory_agent_bundle_ingest_work_unit.md +2 -2
  147. package/dist/prompts/memory_agent_external_ingest.md +2 -2
  148. package/dist/public-ingest-copy.js +1 -1
  149. package/dist/public-ingest.js +3 -3
  150. package/dist/release-version.js +1 -1
  151. package/dist/runtime-requirements.js +1 -1
  152. package/dist/runtime.js +9 -9
  153. package/dist/scan.js +1 -1
  154. package/dist/setup-agents.js +22 -35
  155. package/dist/setup-banner.d.ts +20 -0
  156. package/dist/setup-banner.js +39 -0
  157. package/dist/setup-context.js +24 -15
  158. package/dist/setup-databases.js +31 -59
  159. package/dist/setup-demo-tour.js +12 -8
  160. package/dist/setup-embeddings.js +9 -9
  161. package/dist/setup-interrupt.js +1 -1
  162. package/dist/setup-models.d.ts +4 -1
  163. package/dist/setup-models.js +54 -28
  164. package/dist/setup-project.js +29 -5
  165. package/dist/setup-prompts.js +16 -5
  166. package/dist/setup-ready-menu.js +1 -1
  167. package/dist/setup-sources.js +27 -7
  168. package/dist/setup.d.ts +25 -0
  169. package/dist/setup.js +90 -19
  170. package/dist/skills/analytics/SKILL.md +3 -3
  171. package/dist/skills/dbt_ingest/SKILL.md +3 -3
  172. package/dist/skills/looker_ingest/SKILL.md +3 -3
  173. package/dist/skills/lookml_ingest/SKILL.md +7 -7
  174. package/dist/skills/metabase_ingest/SKILL.md +4 -4
  175. package/dist/skills/metricflow_ingest/SKILL.md +15 -15
  176. package/dist/skills/notion_synthesize/SKILL.md +1 -1
  177. package/dist/skills/sl/SKILL.md +3 -3
  178. package/dist/skills/sl_capture/SKILL.md +1 -1
  179. package/dist/skills/wiki_capture/SKILL.md +1 -1
  180. package/dist/source-mapping.js +1 -1
  181. package/dist/startup-profile.js +1 -1
  182. package/dist/status-project.d.ts +0 -2
  183. package/dist/status-project.js +4 -6
  184. package/dist/telemetry/command-hook.d.ts +24 -0
  185. package/dist/telemetry/command-hook.js +37 -3
  186. package/dist/telemetry/events.d.ts +1 -1
  187. package/dist/telemetry/exception.js +14 -0
  188. package/dist/telemetry/index.d.ts +2 -2
  189. package/dist/telemetry/index.js +2 -2
  190. package/dist/text-ingest.js +1 -1
  191. package/dist/tree-picker-tui.d.ts +0 -1
  192. package/dist/tree-picker-tui.js +2 -3
  193. package/package.json +1 -1
@@ -3,18 +3,52 @@ let activeCommandSpan;
3
3
  export function beginCommandSpan(input) {
4
4
  activeCommandSpan = input;
5
5
  }
6
+ /**
7
+ * Let a command action record the true outcome and reason on the active span.
8
+ *
9
+ * The Commander wrapper can only derive an outcome from a thrown error or the
10
+ * process exit code, so a command that exits non-zero *without throwing* (e.g.
11
+ * `ktx setup` when the user abandons the wizard) lands as `outcome: 'error'`
12
+ * with no `errorClass`/`errorDetail` — an unactionable blank in the dashboard.
13
+ * The action is the decision-maker: it can mark the run `aborted`, or attach a
14
+ * scrubbed reason so the next occurrence is self-diagnosing. A later thrown
15
+ * error still wins (see {@link completeCommandSpan}), since that is the most
16
+ * authoritative signal and also feeds the `$exception` stream. No-ops when no
17
+ * span is active so call sites stay safe in tests and bare-help paths.
18
+ *
19
+ * Values are emitted verbatim and must already satisfy the telemetry privacy
20
+ * rules — pass synthetic or already-scrubbed strings, never raw user input.
21
+ */
22
+ export function annotateCommandOutcome(input) {
23
+ if (!activeCommandSpan) {
24
+ return;
25
+ }
26
+ if (input.outcome !== undefined) {
27
+ activeCommandSpan.annotatedOutcome = input.outcome;
28
+ }
29
+ if (input.errorClass !== undefined) {
30
+ activeCommandSpan.annotatedErrorClass = input.errorClass;
31
+ }
32
+ if (input.errorDetail !== undefined) {
33
+ activeCommandSpan.annotatedErrorDetail = input.errorDetail;
34
+ }
35
+ }
6
36
  export function completeCommandSpan(input) {
7
37
  const span = activeCommandSpan;
8
38
  activeCommandSpan = undefined;
9
39
  if (!span) {
10
40
  return undefined;
11
41
  }
12
- const errorClass = input.error ? scrubErrorClass(input.error) : undefined;
13
- const errorDetail = input.error ? formatErrorDetail(input.error) : undefined;
42
+ // Precedence: a thrown error is authoritative; otherwise an action's own
43
+ // annotation; otherwise the wrapper's exit-code-derived outcome.
44
+ const thrown = Boolean(input.error);
45
+ const outcome = thrown ? input.outcome : (span.annotatedOutcome ?? input.outcome);
46
+ const errorClass = thrown ? scrubErrorClass(input.error) : span.annotatedErrorClass;
47
+ const errorDetail = thrown ? formatErrorDetail(input.error) : span.annotatedErrorDetail;
14
48
  return {
15
49
  commandPath: span.commandPath,
16
50
  durationMs: Math.max(0, input.completedAt - span.startedAt),
17
- outcome: input.outcome,
51
+ outcome,
18
52
  ...(errorClass ? { errorClass } : {}),
19
53
  ...(errorDetail ? { errorDetail } : {}),
20
54
  flagsPresent: span.flagsPresent,
@@ -357,9 +357,9 @@ export declare const telemetryEventSchemas: {
357
357
  error: "error";
358
358
  }>;
359
359
  stage: z.ZodEnum<{
360
+ resolve: "resolve";
360
361
  parse: "parse";
361
362
  compile: "compile";
362
- resolve: "resolve";
363
363
  transpile: "transpile";
364
364
  }>;
365
365
  errorClass: z.ZodOptional<z.ZodString>;
@@ -1,5 +1,6 @@
1
1
  import { inspect } from 'node:util';
2
2
  import { getKtxCliPackageInfo } from '../cli-runtime.js';
3
+ import { KtxExpectedError } from '../errors.js';
3
4
  import { buildCommonEnvelope } from './events.js';
4
5
  import { trackTelemetryException } from './emitter.js';
5
6
  import { computeTelemetryProjectId, loadTelemetryIdentity } from './identity.js';
@@ -24,6 +25,16 @@ function consumeHandledPrimitive(value) {
24
25
  recentHandledPrimitives.splice(index, 1);
25
26
  return true;
26
27
  }
28
+ /**
29
+ * Expected operational errors are surfaced to the caller and recorded by the
30
+ * outcome-tagged telemetry events; they are not ktx faults, so they never reach
31
+ * Error Tracking. ktx marks these with KtxExpectedError at the site that knows
32
+ * the rejection is expected — the classification is never inferred globally from
33
+ * a generic error type, which would also swallow internal/fatal faults.
34
+ */
35
+ function isExpectedError(error) {
36
+ return error instanceof KtxExpectedError;
37
+ }
27
38
  function shouldSkipAsAlreadyReported(error, handled) {
28
39
  if ((typeof error === 'object' || typeof error === 'function') && error !== null) {
29
40
  if (reportedObjects.has(error)) {
@@ -116,6 +127,9 @@ function sanitizedError(error, secrets) {
116
127
  }
117
128
  export async function reportException(input) {
118
129
  try {
130
+ if (isExpectedError(input.error)) {
131
+ return;
132
+ }
119
133
  if (shouldSkipAsAlreadyReported(input.error, input.context.handled)) {
120
134
  return;
121
135
  }
@@ -1,9 +1,9 @@
1
1
  import { type KtxCliIo, type KtxCliPackageInfo } from '../cli-runtime.js';
2
- import { beginCommandSpan, completeCommandSpan, type CommandOutcome, type CompletedCommandSpan } from './command-hook.js';
2
+ import { annotateCommandOutcome, beginCommandSpan, completeCommandSpan, type CommandOutcome, type CompletedCommandSpan } from './command-hook.js';
3
3
  import { shutdownTelemetryEmitter } from './emitter.js';
4
4
  import { reportException, type ExceptionContext } from './exception.js';
5
5
  import { type TelemetryCommonEnvelope, type TelemetryEventName, type TelemetryEventProperties } from './events.js';
6
- export { beginCommandSpan, completeCommandSpan, reportException, shutdownTelemetryEmitter };
6
+ export { annotateCommandOutcome, beginCommandSpan, completeCommandSpan, reportException, shutdownTelemetryEmitter };
7
7
  export type { CommandOutcome, CompletedCommandSpan, ExceptionContext };
8
8
  export declare function showTelemetryNoticeIfNeeded(io: KtxCliIo, packageInfo: KtxCliPackageInfo): Promise<void>;
9
9
  type TelemetryEventFields<Name extends TelemetryEventName> = Omit<TelemetryEventProperties<Name>, keyof TelemetryCommonEnvelope>;
@@ -1,12 +1,12 @@
1
1
  import { getKtxCliPackageInfo } from '../cli-runtime.js';
2
2
  import { loadKtxProject } from '../context/project/project.js';
3
- import { beginCommandSpan, completeCommandSpan, } from './command-hook.js';
3
+ import { annotateCommandOutcome, beginCommandSpan, completeCommandSpan, } from './command-hook.js';
4
4
  import { shutdownTelemetryEmitter, trackTelemetryEvent } from './emitter.js';
5
5
  import { reportException } from './exception.js';
6
6
  import { buildCommonEnvelope, buildTelemetryEvent, } from './events.js';
7
7
  import { computeTelemetryProjectId, loadTelemetryIdentity } from './identity.js';
8
8
  import { buildProjectStackSnapshotFields } from './project-snapshot.js';
9
- export { beginCommandSpan, completeCommandSpan, reportException, shutdownTelemetryEmitter };
9
+ export { annotateCommandOutcome, beginCommandSpan, completeCommandSpan, reportException, shutdownTelemetryEmitter };
10
10
  export async function showTelemetryNoticeIfNeeded(io, packageInfo) {
11
11
  const identity = await loadTelemetryIdentity({
12
12
  stderr: io.stderr,
@@ -213,7 +213,7 @@ export async function runKtxTextIngest(args, io, deps = {}) {
213
213
  const ingestInput = {
214
214
  userId: args.userId,
215
215
  chatId: `cli-text-ingest-${batchId}-${index + 1}`,
216
- userMessage: `Ingest external text artifact ${artifactReference(item.label)} into KTX memory.`,
216
+ userMessage: `Ingest external text artifact ${artifactReference(item.label)} into ktx memory.`,
217
217
  assistantMessage: item.content.trim(),
218
218
  ...(args.connectionId ? { connectionId: args.connectionId } : {}),
219
219
  sourceType: 'external_ingest',
@@ -33,7 +33,6 @@ export type TreePickerResult = {
33
33
  };
34
34
  export interface TreePickerChrome {
35
35
  title: string;
36
- helpText?: string;
37
36
  subtitleLines?: readonly string[];
38
37
  warningLines?: readonly string[];
39
38
  confirmSaveMessage?: (state: PickerState) => string;
@@ -3,6 +3,7 @@ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
3
  import { Box, Text, render as renderInkRuntime, useApp, useInput } from 'ink';
4
4
  import { useEffect, useMemo, useRef, useState } from 'react';
5
5
  import { filterTree, flattenSelection, hasPartialChildren, isAncestorChecked, reducer, visibleNodeIds, } from './tree-picker-state.js';
6
+ import { TREE_PICKER_NAVIGATION_HINT } from './prompt-navigation.js';
6
7
  const COLOR_THEME = {
7
8
  text: 'white',
8
9
  muted: 'gray',
@@ -17,7 +18,6 @@ const NO_COLOR_THEME = {
17
18
  selected: 'white',
18
19
  warning: 'white',
19
20
  };
20
- const DEFAULT_TREE_PICKER_HELP_TEXT = 'Up/Down to move, Right/Left to expand or collapse, Tab to select, Type to search, Enter to confirm, Escape to clear search or go back, Ctrl+C to exit.';
21
21
  const DEFAULT_SKIP_EMPTY_MESSAGE = 'Nothing selected. Skip this step? Press Enter to skip or Escape to go back.';
22
22
  function resolveTheme(env = process.env) {
23
23
  return env.NO_COLOR || env.TERM === 'dumb' ? NO_COLOR_THEME : COLOR_THEME;
@@ -136,7 +136,6 @@ export function TreePickerApp(props) {
136
136
  const hiddenBelow = Math.max(0, visibleIds.length - rows.offset - rows.items.length);
137
137
  const searchMatchCount = filterTree(state).visibleIds.size;
138
138
  const width = resolveTreePickerWidth(props.terminalWidth);
139
- const helpText = props.chrome.helpText ?? DEFAULT_TREE_PICKER_HELP_TEXT;
140
139
  const skipEmptyMessage = props.chrome.skipEmptyMessage ?? DEFAULT_SKIP_EMPTY_MESSAGE;
141
140
  stateRef.current = state;
142
141
  useEffect(() => {
@@ -177,7 +176,7 @@ export function TreePickerApp(props) {
177
176
  app.exit();
178
177
  }
179
178
  });
180
- return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { children: [_jsx(Text, { color: theme.active, children: "\u25C6" }), _jsxs(Text, { bold: true, children: [" ", props.chrome.title] })] }), _jsxs(Box, { flexDirection: "column", borderStyle: "single", borderTop: false, borderRight: false, borderBottom: false, borderColor: theme.active, paddingLeft: 1, children: [_jsx(Text, { color: theme.muted, children: helpText }), _jsx(Text, { children: " " }), (props.chrome.subtitleLines ?? []).map((line, idx) => (_jsx(Text, { color: theme.muted, children: line }, `subtitle-${idx}`))), (props.chrome.warningLines ?? []).map((line, idx) => (_jsx(Text, { color: theme.warning, children: line }, `chromewarn-${idx}`))), state.preLoadWarnings.map((warning) => (_jsx(Text, { color: theme.warning, children: warning }, warning))), _jsxs(Text, { children: [_jsx(Text, { color: theme.muted, children: "Search: " }), state.isNavigating ? (_jsx(Text, { color: theme.muted, children: state.search.query || '(type to filter)' })) : (_jsxs(Text, { children: [state.search.query, _jsx(Text, { inverse: true, children: " " })] })), _jsxs(Text, { color: theme.muted, children: [" (", searchMatchCount, " match", searchMatchCount === 1 ? '' : 'es', ")"] })] }), _jsx(Text, { children: " " }), hiddenAbove > 0 ? _jsxs(Text, { color: theme.muted, children: ["\u2191 ", hiddenAbove, " more"] }) : null, rows.items.map((nodeId) => (_jsx(PickerRow, { state: state, nodeId: nodeId, width: width, theme: theme }, nodeId))), hiddenBelow > 0 ? _jsxs(Text, { color: theme.muted, children: ["\u2193 ", hiddenBelow, " more"] }) : null, state.pendingConfirm === 'save-confirm' ? (_jsx(Text, { color: theme.warning, children: props.chrome.confirmSaveMessage
179
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { children: [_jsx(Text, { color: theme.active, children: "\u25C6" }), _jsxs(Text, { bold: true, children: [" ", props.chrome.title] })] }), _jsxs(Box, { flexDirection: "column", borderStyle: "single", borderTop: false, borderRight: false, borderBottom: false, borderColor: theme.active, paddingLeft: 1, children: [_jsx(Text, { color: theme.muted, children: TREE_PICKER_NAVIGATION_HINT }), _jsx(Text, { children: " " }), (props.chrome.subtitleLines ?? []).map((line, idx) => (_jsx(Text, { color: theme.muted, children: line }, `subtitle-${idx}`))), (props.chrome.warningLines ?? []).map((line, idx) => (_jsx(Text, { color: theme.warning, children: line }, `chromewarn-${idx}`))), state.preLoadWarnings.map((warning) => (_jsx(Text, { color: theme.warning, children: warning }, warning))), _jsxs(Text, { children: [_jsx(Text, { color: theme.muted, children: "Search: " }), state.isNavigating ? (_jsx(Text, { color: theme.muted, children: state.search.query || '(type to search)' })) : (_jsxs(Text, { children: [state.search.query, _jsx(Text, { inverse: true, children: " " })] })), _jsxs(Text, { color: theme.muted, children: [" (", searchMatchCount, " match", searchMatchCount === 1 ? '' : 'es', ")"] })] }), _jsx(Text, { children: " " }), hiddenAbove > 0 ? _jsxs(Text, { color: theme.muted, children: ["\u2191 ", hiddenAbove, " more"] }) : null, rows.items.map((nodeId) => (_jsx(PickerRow, { state: state, nodeId: nodeId, width: width, theme: theme }, nodeId))), hiddenBelow > 0 ? _jsxs(Text, { color: theme.muted, children: ["\u2193 ", hiddenBelow, " more"] }) : null, state.pendingConfirm === 'save-confirm' ? (_jsx(Text, { color: theme.warning, children: props.chrome.confirmSaveMessage
181
180
  ? props.chrome.confirmSaveMessage(state)
182
181
  : 'Confirm save? Press Enter to confirm or Escape to go back.' })) : null, state.pendingConfirm === 'skip-empty' ? _jsx(Text, { color: theme.warning, children: skipEmptyMessage }) : null, state.transientHint ? _jsx(Text, { color: theme.warning, children: state.transientHint.text }) : null] }), _jsx(Text, { color: theme.active, children: "\u2514" })] }));
183
182
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaelio/ktx",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "Standalone ktx context layer for data agents",
5
5
  "author": {
6
6
  "name": "Kaelio",