@vpxa/kb 0.1.28 → 0.1.30

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 (78) hide show
  1. package/package.json +1 -1
  2. package/packages/chunker/dist/chunker.interface.d.ts +1 -1
  3. package/packages/chunker/dist/code-chunker.d.ts +1 -1
  4. package/packages/chunker/dist/generic-chunker.d.ts +1 -1
  5. package/packages/chunker/dist/markdown-chunker.d.ts +1 -1
  6. package/packages/chunker/dist/wasm-chunker.d.ts +1 -1
  7. package/packages/cli/dist/commands/upgrade.d.ts +6 -0
  8. package/packages/cli/dist/commands/upgrade.js +1 -0
  9. package/packages/cli/dist/helpers.d.ts +2 -2
  10. package/packages/cli/dist/index.js +2 -2
  11. package/packages/cli/dist/kb-init.d.ts +4 -4
  12. package/packages/elicitation/dist/index.d.ts +2 -2
  13. package/packages/elicitation/dist/index.js +2 -2
  14. package/packages/enterprise-bridge/dist/result-merger.d.ts +1 -1
  15. package/packages/indexer/dist/graph-extractor.d.ts +1 -1
  16. package/packages/indexer/dist/incremental-indexer.d.ts +3 -3
  17. package/packages/kb-client/dist/direct-client.d.ts +2 -2
  18. package/packages/present/dist/index.html +4 -4
  19. package/packages/server/dist/completions.d.ts +1 -1
  20. package/packages/server/dist/config.d.ts +1 -1
  21. package/packages/server/dist/cross-workspace.d.ts +2 -2
  22. package/packages/server/dist/curated-manager.d.ts +2 -2
  23. package/packages/server/dist/dashboard-static.d.ts +2 -2
  24. package/packages/server/dist/elicitor.d.ts +1 -1
  25. package/packages/server/dist/index.js +1 -1
  26. package/packages/server/dist/output-schemas.d.ts +3 -0
  27. package/packages/server/dist/output-schemas.js +1 -1
  28. package/packages/server/dist/prompts.d.ts +1 -1
  29. package/packages/server/dist/resources/resources.d.ts +1 -1
  30. package/packages/server/dist/server.d.ts +7 -7
  31. package/packages/server/dist/server.js +2 -2
  32. package/packages/server/dist/structured-content-guard.d.ts +26 -0
  33. package/packages/server/dist/structured-content-guard.js +1 -0
  34. package/packages/server/dist/tools/analyze.tools.d.ts +2 -2
  35. package/packages/server/dist/tools/audit.tool.d.ts +2 -2
  36. package/packages/server/dist/tools/brainstorm.tool.d.ts +1 -1
  37. package/packages/server/dist/tools/bridge.tools.d.ts +1 -1
  38. package/packages/server/dist/tools/context.tools.d.ts +3 -3
  39. package/packages/server/dist/tools/evolution.tools.d.ts +1 -1
  40. package/packages/server/dist/tools/execution.tools.d.ts +2 -2
  41. package/packages/server/dist/tools/forge.tools.d.ts +3 -3
  42. package/packages/server/dist/tools/graph.tool.d.ts +1 -1
  43. package/packages/server/dist/tools/lookup.tool.d.ts +1 -1
  44. package/packages/server/dist/tools/onboard.tool.d.ts +3 -3
  45. package/packages/server/dist/tools/policy.tools.d.ts +1 -1
  46. package/packages/server/dist/tools/present.tool.d.ts +1 -1
  47. package/packages/server/dist/tools/produce.tool.d.ts +1 -1
  48. package/packages/server/dist/tools/reindex.tool.d.ts +3 -3
  49. package/packages/server/dist/tools/remember.tool.d.ts +1 -1
  50. package/packages/server/dist/tools/search.tool.d.ts +3 -3
  51. package/packages/server/dist/tools/status.tool.d.ts +2 -2
  52. package/packages/server/dist/tools/status.tool.js +2 -2
  53. package/packages/server/dist/version-check.js +1 -1
  54. package/packages/store/dist/lance-store.d.ts +1 -1
  55. package/packages/store/dist/store.interface.d.ts +1 -1
  56. package/packages/tools/dist/audit.d.ts +2 -2
  57. package/packages/tools/dist/compact.d.ts +1 -1
  58. package/packages/tools/dist/dead-symbols.d.ts +2 -2
  59. package/packages/tools/dist/digest.d.ts +1 -1
  60. package/packages/tools/dist/find-examples.d.ts +3 -3
  61. package/packages/tools/dist/find.d.ts +3 -3
  62. package/packages/tools/dist/forge-ground.d.ts +2 -2
  63. package/packages/tools/dist/graph-query.d.ts +1 -1
  64. package/packages/tools/dist/scope-map.d.ts +3 -3
  65. package/packages/tools/dist/stratum-card.d.ts +1 -1
  66. package/packages/tools/dist/symbol.d.ts +2 -2
  67. package/packages/tools/dist/trace.d.ts +2 -2
  68. package/packages/tui/dist/App.d.ts +1 -1
  69. package/packages/tui/dist/hooks/useKBClient.d.ts +3 -3
  70. package/packages/tui/dist/index.d.ts +1 -1
  71. package/packages/elicitation/dist/__tests__/build.test.d.ts +0 -1
  72. package/packages/elicitation/dist/__tests__/fields.test.d.ts +0 -1
  73. package/packages/elicitation/dist/__tests__/normalize.test.d.ts +0 -1
  74. package/packages/elicitation/dist/build.d.ts +0 -13
  75. package/packages/elicitation/dist/fields.d.ts +0 -41
  76. package/packages/elicitation/dist/normalize.d.ts +0 -15
  77. package/packages/elicitation/dist/types.d.ts +0 -85
  78. /package/packages/tui/dist/{types-VcTHNV6s.d.ts → index-Cvx1a7S7.d.ts} +0 -0
@@ -1,13 +0,0 @@
1
- /**
2
- * Request builder — construct MCP-compatible elicitation request parameters.
3
- */
4
- import type { ElicitFormSchema, ElicitOptions, FieldSchema } from './types.js';
5
- /** Build a form schema from a record of named fields. */
6
- export declare function buildFormSchema(fields: Record<string, FieldSchema>, required?: string[]): ElicitFormSchema;
7
- /**
8
- * Build the full elicitation request options.
9
- * `message` — prompt text shown above the form.
10
- * `fields` — record of field-id → FieldSchema.
11
- * `required` — field ids that must be filled.
12
- */
13
- export declare function buildElicitRequest(message: string, fields: Record<string, FieldSchema>, required?: string[]): ElicitOptions;
@@ -1,41 +0,0 @@
1
- /**
2
- * Field builders — create typed field schemas for MCP elicitation forms.
3
- *
4
- * Usage:
5
- * field.text('Name', { description: 'Your full name' })
6
- * field.select('Color', ['red', 'green', 'blue'])
7
- * field.confirm('Proceed?')
8
- */
9
- import type { ArrayFieldSchema, BooleanFieldSchema, EnumFieldSchema, NumberFieldSchema, TextFieldSchema } from './types.js';
10
- export declare const field: {
11
- /** Free text input. */
12
- readonly text: (title: string, opts?: {
13
- description?: string;
14
- minLength?: number;
15
- maxLength?: number;
16
- default?: string;
17
- }) => TextFieldSchema;
18
- /** Single-select dropdown/radio. */
19
- readonly select: (title: string, options: string[], opts?: {
20
- description?: string;
21
- enumNames?: string[];
22
- default?: string;
23
- }) => EnumFieldSchema;
24
- /** Multi-select checkboxes. */
25
- readonly multi: (title: string, options: string[], opts?: {
26
- description?: string;
27
- }) => ArrayFieldSchema;
28
- /** Boolean checkbox / confirmation. */
29
- readonly confirm: (title: string, opts?: {
30
- description?: string;
31
- default?: boolean;
32
- }) => BooleanFieldSchema;
33
- /** Numeric input. */
34
- readonly number: (title: string, opts?: {
35
- description?: string;
36
- minimum?: number;
37
- maximum?: number;
38
- integer?: boolean;
39
- default?: number;
40
- }) => NumberFieldSchema;
41
- };
@@ -1,15 +0,0 @@
1
- /**
2
- * Response normalization — convert raw MCP ElicitResult into typed ElicitResponse.
3
- */
4
- import type { ElicitContent, ElicitResponse } from './types.js';
5
- /** Raw elicitation result from the MCP SDK. */
6
- interface RawElicitResult {
7
- action: string;
8
- content?: Record<string, unknown>;
9
- }
10
- /**
11
- * Normalize a raw MCP elicitation result into a typed response.
12
- * Handles missing fields, unknown actions, and type coercion.
13
- */
14
- export declare function normalizeResponse<T extends ElicitContent = ElicitContent>(raw: RawElicitResult | undefined | null): ElicitResponse<T>;
15
- export {};
@@ -1,85 +0,0 @@
1
- /**
2
- * MCP elicitation types.
3
- *
4
- * Elicitation allows tools to request structured input from the user via
5
- * the MCP client. The schema follows JSON Schema constraints:
6
- * only flat primitives and string arrays are supported.
7
- */
8
- /** User action on the elicitation dialog. */
9
- export type ElicitAction = 'accept' | 'decline' | 'cancel';
10
- /** Flat content map — MCP only supports primitives + string arrays. */
11
- export type ElicitContent = Record<string, string | number | boolean | string[]>;
12
- /** Normalized elicitation response. */
13
- export interface ElicitResponse<T extends ElicitContent = ElicitContent> {
14
- action: ElicitAction;
15
- content?: T;
16
- }
17
- export interface TextFieldSchema {
18
- type: 'string';
19
- title: string;
20
- description?: string;
21
- minLength?: number;
22
- maxLength?: number;
23
- default?: string;
24
- }
25
- export interface EnumFieldSchema {
26
- type: 'string';
27
- title: string;
28
- description?: string;
29
- enum: string[];
30
- enumNames?: string[];
31
- default?: string;
32
- }
33
- export interface ArrayFieldSchema {
34
- type: 'array';
35
- title: string;
36
- description?: string;
37
- items: {
38
- type: 'string';
39
- enum: string[];
40
- };
41
- uniqueItems: true;
42
- }
43
- export interface BooleanFieldSchema {
44
- type: 'boolean';
45
- title: string;
46
- description?: string;
47
- default?: boolean;
48
- }
49
- export interface NumberFieldSchema {
50
- type: 'number' | 'integer';
51
- title: string;
52
- description?: string;
53
- minimum?: number;
54
- maximum?: number;
55
- default?: number;
56
- }
57
- export type FieldSchema = TextFieldSchema | EnumFieldSchema | ArrayFieldSchema | BooleanFieldSchema | NumberFieldSchema;
58
- /** JSON Schema object for the elicitation form. */
59
- export interface ElicitFormSchema {
60
- type: 'object';
61
- properties: Record<string, FieldSchema>;
62
- required?: string[];
63
- }
64
- export interface ElicitOptions {
65
- message: string;
66
- schema: ElicitFormSchema;
67
- }
68
- /**
69
- * High-level elicitation interface exposed to tools.
70
- * Wraps `server.createElicitation()` with convenience methods.
71
- */
72
- export interface Elicitor {
73
- /** Whether the connected client supports elicitation. */
74
- readonly available: boolean;
75
- /** Ask a structured form question. */
76
- ask<T extends ElicitContent = ElicitContent>(opts: ElicitOptions): Promise<ElicitResponse<T>>;
77
- /** Yes/no confirmation. */
78
- confirm(message: string): Promise<boolean>;
79
- /** Pick one from a list. Returns null if declined/cancelled. */
80
- selectOne(message: string, options: string[]): Promise<string | null>;
81
- /** Pick many from a list. Returns empty array if declined/cancelled. */
82
- selectMany(message: string, options: string[]): Promise<string[]>;
83
- /** Free text prompt. Returns null if declined/cancelled. */
84
- promptText(message: string, description?: string): Promise<string | null>;
85
- }