@hop-top/kit 0.5.0-alpha.11 → 0.5.0-alpha.13

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 (102) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +5 -5
  3. package/dist/bus-D2bAOPYz.d.ts +55 -0
  4. package/dist/bus.d.ts +1 -0
  5. package/dist/bus.js +13 -0
  6. package/dist/chunk-74E6RNOI.js +82 -0
  7. package/dist/chunk-B7XTFDBB.js +17 -0
  8. package/dist/chunk-CAONBSPO.js +497 -0
  9. package/dist/chunk-F7RSL4N4.js +88 -0
  10. package/dist/chunk-I6XDPSXQ.js +75 -0
  11. package/dist/chunk-IDM6YZXN.js +204 -0
  12. package/dist/chunk-P3Y46PYF.js +138 -0
  13. package/dist/chunk-VKQCOVKI.js +880 -0
  14. package/dist/cli.js +3 -3
  15. package/dist/id/index.d.ts +1 -1
  16. package/dist/id/index.js +4 -2
  17. package/dist/index-BqZ7WGQf.d.ts +731 -0
  18. package/dist/{index-VLDcI5NF.d.ts → index-D9zpUrpE.d.ts} +18 -6
  19. package/dist/index.d.ts +5 -2
  20. package/dist/index.js +27 -13
  21. package/dist/upgrade/drivers/configfile.d.ts +45 -0
  22. package/dist/upgrade/drivers/configfile.js +78 -0
  23. package/dist/upgrade/drivers/fsdir.d.ts +61 -0
  24. package/dist/upgrade/drivers/fsdir.js +170 -0
  25. package/dist/upgrade/drivers/postgres.d.ts +121 -0
  26. package/dist/upgrade/drivers/postgres.js +195 -0
  27. package/dist/upgrade/drivers/sqlite.d.ts +101 -0
  28. package/dist/upgrade/drivers/sqlite.js +241 -0
  29. package/dist/upgrade/index.d.ts +2 -0
  30. package/dist/upgrade/index.js +73 -0
  31. package/dist/uri-IJ_AoY3d.d.ts +144 -0
  32. package/dist/uri.d.ts +1 -0
  33. package/dist/uri.js +37 -0
  34. package/dist/version-DEJ3pbiO.d.ts +10 -0
  35. package/dist/wizard-Bf_qHc31.d.ts +159 -0
  36. package/dist/wizard.d.ts +1 -0
  37. package/dist/wizard.js +39 -0
  38. package/package.json +78 -19
  39. package/skills/hop-top-kit-ts/.claude-plugin/plugin.json +19 -0
  40. package/skills/hop-top-kit-ts/SKILL.md +117 -0
  41. package/skills/hop-top-kit-ts/assets/snippets/mcp/mcp.expected +2 -0
  42. package/skills/hop-top-kit-ts/assets/snippets/mcp/mcp.ts +20 -0
  43. package/skills/hop-top-kit-ts/assets/snippets/quickstart/quickstart.expected +13 -0
  44. package/skills/hop-top-kit-ts/assets/snippets/quickstart/quickstart.ts +26 -0
  45. package/skills/hop-top-kit-ts/gym.json +5 -0
  46. package/skills/hop-top-kit-ts/references/ai-and-agents.md +45 -0
  47. package/skills/hop-top-kit-ts/references/cli-and-console.md +63 -0
  48. package/skills/hop-top-kit-ts/references/coverage.md +56 -0
  49. package/skills/hop-top-kit-ts/references/guardrails-and-trust.md +60 -0
  50. package/skills/hop-top-kit-ts/references/other-ports.md +31 -0
  51. package/skills/hop-top-kit-ts/references/serving-and-transports.md +49 -0
  52. package/skills/hop-top-kit-ts/scripts/detect-port.sh +168 -0
  53. package/src/id/README.md +2 -2
  54. package/src/id/contract.test.ts +11 -8
  55. package/src/id/differential.test.ts +54 -0
  56. package/src/id/index.ts +123 -17
  57. package/src/index.test.ts +48 -2
  58. package/src/index.ts +6 -1
  59. package/src/published-types.test.ts +8 -0
  60. package/src/serve.stopped-order.test.ts +156 -0
  61. package/src/upgrade/README.md +42 -0
  62. package/src/upgrade/backup.ts +174 -0
  63. package/src/upgrade/conformance.test.ts +310 -0
  64. package/src/upgrade/document.ts +229 -0
  65. package/src/upgrade/driver.ts +66 -0
  66. package/src/upgrade/drivers/README.md +47 -0
  67. package/src/upgrade/drivers/configfile.test.ts +112 -0
  68. package/src/upgrade/drivers/configfile.ts +107 -0
  69. package/src/upgrade/drivers/fsdir.test.ts +188 -0
  70. package/src/upgrade/drivers/fsdir.ts +216 -0
  71. package/src/upgrade/drivers/isolation.test.ts +18 -0
  72. package/src/upgrade/drivers/postgres.integration.test.ts +395 -0
  73. package/src/upgrade/drivers/postgres.test.ts +272 -0
  74. package/src/upgrade/drivers/postgres.ts +284 -0
  75. package/src/upgrade/drivers/sqlite.integration.test.ts +492 -0
  76. package/src/upgrade/drivers/sqlite.ts +300 -0
  77. package/src/upgrade/drivers/version.ts +21 -0
  78. package/src/upgrade/errors.ts +117 -0
  79. package/src/upgrade/events.ts +117 -0
  80. package/src/{upgrade.test.ts → upgrade/index.test.ts} +102 -1
  81. package/src/{upgrade.ts → upgrade/index.ts} +96 -27
  82. package/src/upgrade/migration.ts +89 -0
  83. package/src/upgrade/migrator.test.ts +391 -0
  84. package/src/upgrade/migrator.ts +527 -0
  85. package/src/upgrade/options.ts +59 -0
  86. package/src/upgrade/semver.ts +90 -0
  87. package/test/skill-snippets.test.ts +60 -0
  88. package/test/upgrade/conformance-migrator.ts +439 -0
  89. package/test/upgrade/conformance-support.ts +44 -0
  90. package/test/upgrade/driver-support.ts +44 -0
  91. package/test/upgrade/pg-container.ts +64 -0
  92. package/test/upgrade/pg-race-worker.ts +48 -0
  93. package/test/upgrade/race-helper.ts +36 -0
  94. package/test/upgrade/sqlite-support.ts +41 -0
  95. package/test/upgrade/testdata/go-fsdir-mydata.tar.gz +0 -0
  96. package/vitest.config.ts +26 -0
  97. package/dist/chunk-4GPCWBBA.js +0 -143
  98. package/dist/chunk-L23O2FFE.js +0 -51
  99. package/dist/upgrade-C3RWGwRi.d.ts +0 -125
  100. package/dist/upgrade.d.ts +0 -1
  101. package/dist/upgrade.js +0 -7
  102. package/dist/{chunk-MFVUENZR.js → chunk-KV7FYEAF.js} +2 -2
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Thin facade over @hop-top/cite for kit SDK consumers.
3
+ *
4
+ * The URI implementation lives in @hop-top/cite; this module only adapts the
5
+ * kit-facing helper names used by the Go URI command group.
6
+ */
7
+ interface URI {
8
+ readonly scheme: string;
9
+ readonly namespace: string;
10
+ readonly id: string;
11
+ readonly query: string;
12
+ readonly fragment: string;
13
+ readonly original: string;
14
+ readonly action: string;
15
+ canonical(): string;
16
+ vanity(): string;
17
+ toString(): string;
18
+ }
19
+ interface VanityAlias {
20
+ from: string;
21
+ to: string;
22
+ prefix?: boolean;
23
+ preserveSuffix?: boolean;
24
+ }
25
+ interface ActionRoute {
26
+ command: string;
27
+ args?: string[];
28
+ }
29
+ interface ResolvedAction {
30
+ action: string;
31
+ command: string;
32
+ args: string[];
33
+ }
34
+ interface Policy {
35
+ defaultNamespaceSegments?: number;
36
+ schemeNamespaceSegments?: Record<string, number>;
37
+ vanityAliases?: VanityAlias[];
38
+ actionRoutes?: Record<string, ActionRoute>;
39
+ }
40
+ interface ParseOptions {
41
+ strict?: boolean;
42
+ jsonAmbiguity?: boolean;
43
+ }
44
+ interface VanityCandidate {
45
+ from: string;
46
+ to: string;
47
+ distance: number;
48
+ }
49
+ type Parser = (input: string) => URI;
50
+ type Completer = (prefix: string) => string[] | Promise<string[]>;
51
+ interface TypeRegistration {
52
+ name: string;
53
+ parser?: Parser;
54
+ completer?: Completer;
55
+ }
56
+ interface CompletionResult {
57
+ suggestions: string[];
58
+ }
59
+ type Language = 'go' | 'ts' | 'py' | 'rs' | 'php';
60
+ interface HandlerSpec {
61
+ vendor: string;
62
+ app: string;
63
+ instance?: string;
64
+ language: Language | string;
65
+ scheme: string;
66
+ version?: string;
67
+ channel?: string;
68
+ appPath: string;
69
+ displayName?: string;
70
+ }
71
+ type HandlerPlatform = 'linux' | 'macos' | 'ios' | 'windows' | string;
72
+ declare const defaultPolicy: Policy;
73
+ declare const DefaultPolicy: Policy;
74
+ interface Registry {
75
+ register(reg: TypeRegistration): void;
76
+ parse(input: string): URI;
77
+ completeVanity(input: string): VanityCandidate[];
78
+ complete(typeName: string, prefix: string): Promise<string[]>;
79
+ types(): string[];
80
+ }
81
+ declare const Registry: new (policy?: Policy) => Registry;
82
+ /** Parse a custom URI using @hop-top/cite policy and parse options. */
83
+ declare function parse(input: string, policy?: Policy, options?: ParseOptions): URI;
84
+ /**
85
+ * Resolve an action route to a command plan without executing it.
86
+ * Accepts either a parsed URI or a raw URI string.
87
+ */
88
+ declare function resolve(input: string | URI, policy?: Policy, options?: ParseOptions): ResolvedAction;
89
+ /** Resolve an already parsed URI action route without executing it. */
90
+ declare function resolveAction(parsed: URI, policy?: Policy): ResolvedAction;
91
+ /** Return vanity alias completion candidates. */
92
+ declare function completeVanity(input: string, policy?: Policy): VanityCandidate[];
93
+ declare const vanityCandidates: typeof completeVanity;
94
+ /** Complete URI values using a @hop-top/cite registry. */
95
+ declare function complete(registry: Registry, typeName: string, input: string): Promise<CompletionResult>;
96
+ /** Create a @hop-top/cite registry with an optional policy. */
97
+ declare function newRegistry(policy?: Policy): Registry;
98
+ declare function validateHandlerSpec(spec: HandlerSpec): void;
99
+ declare function handlerID(spec: HandlerSpec): string;
100
+ declare function desktopFilename(spec: HandlerSpec): string;
101
+ declare function handlerSnippet(platform: HandlerPlatform, spec: HandlerSpec): string;
102
+ declare const snippet: typeof handlerSnippet;
103
+ declare const handler: {
104
+ validate: typeof validateHandlerSpec;
105
+ id: typeof handlerID;
106
+ desktopFilename: typeof desktopFilename;
107
+ snippet: typeof handlerSnippet;
108
+ };
109
+
110
+ type uri_ActionRoute = ActionRoute;
111
+ type uri_Completer = Completer;
112
+ type uri_CompletionResult = CompletionResult;
113
+ declare const uri_DefaultPolicy: typeof DefaultPolicy;
114
+ type uri_HandlerPlatform = HandlerPlatform;
115
+ type uri_HandlerSpec = HandlerSpec;
116
+ type uri_Language = Language;
117
+ type uri_ParseOptions = ParseOptions;
118
+ type uri_Parser = Parser;
119
+ type uri_Policy = Policy;
120
+ declare const uri_Registry: typeof Registry;
121
+ type uri_ResolvedAction = ResolvedAction;
122
+ type uri_TypeRegistration = TypeRegistration;
123
+ type uri_URI = URI;
124
+ type uri_VanityAlias = VanityAlias;
125
+ type uri_VanityCandidate = VanityCandidate;
126
+ declare const uri_complete: typeof complete;
127
+ declare const uri_completeVanity: typeof completeVanity;
128
+ declare const uri_defaultPolicy: typeof defaultPolicy;
129
+ declare const uri_desktopFilename: typeof desktopFilename;
130
+ declare const uri_handler: typeof handler;
131
+ declare const uri_handlerID: typeof handlerID;
132
+ declare const uri_handlerSnippet: typeof handlerSnippet;
133
+ declare const uri_newRegistry: typeof newRegistry;
134
+ declare const uri_parse: typeof parse;
135
+ declare const uri_resolve: typeof resolve;
136
+ declare const uri_resolveAction: typeof resolveAction;
137
+ declare const uri_snippet: typeof snippet;
138
+ declare const uri_validateHandlerSpec: typeof validateHandlerSpec;
139
+ declare const uri_vanityCandidates: typeof vanityCandidates;
140
+ declare namespace uri {
141
+ export { type uri_ActionRoute as ActionRoute, type uri_Completer as Completer, type uri_CompletionResult as CompletionResult, uri_DefaultPolicy as DefaultPolicy, type uri_HandlerPlatform as HandlerPlatform, type uri_HandlerSpec as HandlerSpec, type uri_Language as Language, type uri_ParseOptions as ParseOptions, type uri_Parser as Parser, type uri_Policy as Policy, uri_Registry as Registry, type uri_ResolvedAction as ResolvedAction, type uri_TypeRegistration as TypeRegistration, type uri_URI as URI, type uri_VanityAlias as VanityAlias, type uri_VanityCandidate as VanityCandidate, uri_complete as complete, uri_completeVanity as completeVanity, uri_defaultPolicy as defaultPolicy, uri_desktopFilename as desktopFilename, uri_handler as handler, uri_handlerID as handlerID, uri_handlerSnippet as handlerSnippet, uri_newRegistry as newRegistry, uri_parse as parse, uri_resolve as resolve, uri_resolveAction as resolveAction, uri_snippet as snippet, uri_validateHandlerSpec as validateHandlerSpec, uri_vanityCandidates as vanityCandidates };
142
+ }
143
+
144
+ export { type ActionRoute as A, type Completer as C, DefaultPolicy as D, type HandlerPlatform as H, type Language as L, type ParseOptions as P, Registry as R, type TypeRegistration as T, type URI as U, type VanityAlias as V, type CompletionResult as a, type HandlerSpec as b, type Parser as c, type Policy as d, type ResolvedAction as e, type VanityCandidate as f, complete as g, completeVanity as h, defaultPolicy as i, desktopFilename as j, handler as k, handlerID as l, handlerSnippet as m, newRegistry as n, resolveAction as o, parse as p, vanityCandidates as q, resolve as r, snippet as s, uri as u, validateHandlerSpec as v };
package/dist/uri.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { A as ActionRoute, C as Completer, a as CompletionResult, D as DefaultPolicy, H as HandlerPlatform, b as HandlerSpec, L as Language, P as ParseOptions, c as Parser, d as Policy, R as Registry, e as ResolvedAction, T as TypeRegistration, U as URI, V as VanityAlias, f as VanityCandidate, g as complete, h as completeVanity, i as defaultPolicy, j as desktopFilename, k as handler, l as handlerID, m as handlerSnippet, n as newRegistry, p as parse, r as resolve, o as resolveAction, s as snippet, v as validateHandlerSpec, q as vanityCandidates } from './uri-IJ_AoY3d.js';
package/dist/uri.js ADDED
@@ -0,0 +1,37 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+ var _chunkF7RSL4N4js = require('./chunk-F7RSL4N4.js');
19
+ require('./chunk-R5U7XKVJ.js');
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+ exports.DefaultPolicy = _chunkF7RSL4N4js.DefaultPolicy; exports.Registry = _chunkF7RSL4N4js.Registry; exports.complete = _chunkF7RSL4N4js.complete; exports.completeVanity = _chunkF7RSL4N4js.completeVanity; exports.defaultPolicy = _chunkF7RSL4N4js.defaultPolicy; exports.desktopFilename = _chunkF7RSL4N4js.desktopFilename; exports.handler = _chunkF7RSL4N4js.handler; exports.handlerID = _chunkF7RSL4N4js.handlerID; exports.handlerSnippet = _chunkF7RSL4N4js.handlerSnippet; exports.newRegistry = _chunkF7RSL4N4js.newRegistry; exports.parse = _chunkF7RSL4N4js.parse; exports.resolve = _chunkF7RSL4N4js.resolve; exports.resolveAction = _chunkF7RSL4N4js.resolveAction; exports.snippet = _chunkF7RSL4N4js.snippet; exports.validateHandlerSpec = _chunkF7RSL4N4js.validateHandlerSpec; exports.vanityCandidates = _chunkF7RSL4N4js.vanityCandidates;
@@ -0,0 +1,10 @@
1
+ /** Where a version-file driver reads its version, shared by the drivers here. */
2
+ /** Options every driver in this directory accepts. */
3
+ interface DriverOptions {
4
+ /** Reads the version file under this dir, for a Migrator built with the same `dataDir`. */
5
+ dataDir?: string;
6
+ /** Tool name for the default data dir `<xdg data dir>/hop/<tool>`. */
7
+ tool?: string;
8
+ }
9
+
10
+ export type { DriverOptions as D };
@@ -0,0 +1,159 @@
1
+ /**
2
+ * Headless sequential wizard engine — TypeScript port of kit/wizard.
3
+ */
4
+ declare enum StepKind {
5
+ TextInput = "text_input",
6
+ Select = "select",
7
+ Confirm = "confirm",
8
+ MultiSelect = "multi_select",
9
+ Action = "action",
10
+ Summary = "summary"
11
+ }
12
+ declare enum ErrorAction {
13
+ Abort = 0,
14
+ Retry = 1,
15
+ Skip = 2
16
+ }
17
+ interface Option {
18
+ value: string;
19
+ label: string;
20
+ description?: string;
21
+ }
22
+ interface Condition {
23
+ key: string;
24
+ pred: (value: unknown) => boolean;
25
+ }
26
+ type ActionFn = (results: Record<string, unknown>) => void | Promise<void>;
27
+ type ValidateTextFn = (value: string) => void;
28
+ type ValidateChoiceFn = (value: string) => void;
29
+ type ValidateChoicesFn = (values: string[]) => void;
30
+ type FormatFn = (results: Record<string, unknown>) => string;
31
+ declare class Step {
32
+ key: string;
33
+ kind: StepKind;
34
+ label: string;
35
+ description?: string;
36
+ group?: string;
37
+ required: boolean;
38
+ defaultValue?: unknown;
39
+ options?: Option[];
40
+ validateText?: ValidateTextFn;
41
+ validateChoice?: ValidateChoiceFn;
42
+ validateChoices?: ValidateChoicesFn;
43
+ when?: Condition;
44
+ actionFn?: ActionFn;
45
+ onError: ErrorAction;
46
+ formatFn?: FormatFn;
47
+ constructor(init: {
48
+ key: string;
49
+ kind: StepKind;
50
+ label: string;
51
+ description?: string;
52
+ group?: string;
53
+ required?: boolean;
54
+ defaultValue?: unknown;
55
+ options?: Option[];
56
+ validateText?: ValidateTextFn;
57
+ validateChoice?: ValidateChoiceFn;
58
+ validateChoices?: ValidateChoicesFn;
59
+ when?: Condition;
60
+ actionFn?: ActionFn;
61
+ onError?: ErrorAction;
62
+ formatFn?: FormatFn;
63
+ });
64
+ private clone;
65
+ withRequired(): Step;
66
+ withDefault(v: unknown): Step;
67
+ withGroup(g: string): Step;
68
+ withDescription(d: string): Step;
69
+ withValidateText(fn: ValidateTextFn): Step;
70
+ withValidateChoice(fn: ValidateChoiceFn): Step;
71
+ withValidateChoices(fn: ValidateChoicesFn): Step;
72
+ withWhen(key: string, pred: (value: unknown) => boolean): Step;
73
+ withOnError(a: ErrorAction): Step;
74
+ withFormat(fn: FormatFn): Step;
75
+ }
76
+ declare function textInput(key: string, label: string): Step;
77
+ declare function select(key: string, label: string, options: Option[]): Step;
78
+ declare function confirm(key: string, label: string): Step;
79
+ declare function multiSelect(key: string, label: string, options: Option[]): Step;
80
+ declare function action(key: string, label: string, fn: ActionFn): Step;
81
+ declare function summary(label: string): Step;
82
+ declare class ValidationError extends Error {
83
+ stepKey: string;
84
+ constructor(stepKey: string, cause: Error | string);
85
+ }
86
+ declare class ActionError extends Error {
87
+ stepKey: string;
88
+ cause: Error;
89
+ action: ErrorAction;
90
+ constructor(stepKey: string, cause: Error, act: ErrorAction);
91
+ }
92
+ declare class ActionRequest {
93
+ stepKey: string;
94
+ run: ActionFn;
95
+ constructor(stepKey: string, run: ActionFn);
96
+ }
97
+ declare class Wizard {
98
+ private steps;
99
+ private _current;
100
+ private _results;
101
+ private _done;
102
+ private _dryRun;
103
+ private _onComplete?;
104
+ constructor(...steps: Step[]);
105
+ current(): Step | null;
106
+ advance(value: unknown): [ActionRequest | null, ValidationError | null];
107
+ private doAdvance;
108
+ resolveAction(err: Error | null): ActionError | null;
109
+ back(): void;
110
+ results(): Record<string, unknown>;
111
+ done(): boolean;
112
+ stepCount(): number;
113
+ stepIndex(): number;
114
+ setDryRun(v: boolean): void;
115
+ dryRun(): boolean;
116
+ setOnComplete(fn: (results: Record<string, unknown>) => void): void;
117
+ complete(): void;
118
+ }
119
+ declare function resultString(results: Record<string, unknown>, key: string): string;
120
+ declare function resultBool(results: Record<string, unknown>, key: string): boolean;
121
+ declare function resultStrings(results: Record<string, unknown>, key: string): string[] | null;
122
+ declare function resultChoice(results: Record<string, unknown>, key: string): string;
123
+
124
+ type wizard_ActionError = ActionError;
125
+ declare const wizard_ActionError: typeof ActionError;
126
+ type wizard_ActionFn = ActionFn;
127
+ type wizard_ActionRequest = ActionRequest;
128
+ declare const wizard_ActionRequest: typeof ActionRequest;
129
+ type wizard_Condition = Condition;
130
+ type wizard_ErrorAction = ErrorAction;
131
+ declare const wizard_ErrorAction: typeof ErrorAction;
132
+ type wizard_FormatFn = FormatFn;
133
+ type wizard_Option = Option;
134
+ type wizard_Step = Step;
135
+ declare const wizard_Step: typeof Step;
136
+ type wizard_StepKind = StepKind;
137
+ declare const wizard_StepKind: typeof StepKind;
138
+ type wizard_ValidateChoiceFn = ValidateChoiceFn;
139
+ type wizard_ValidateChoicesFn = ValidateChoicesFn;
140
+ type wizard_ValidateTextFn = ValidateTextFn;
141
+ type wizard_ValidationError = ValidationError;
142
+ declare const wizard_ValidationError: typeof ValidationError;
143
+ type wizard_Wizard = Wizard;
144
+ declare const wizard_Wizard: typeof Wizard;
145
+ declare const wizard_action: typeof action;
146
+ declare const wizard_confirm: typeof confirm;
147
+ declare const wizard_multiSelect: typeof multiSelect;
148
+ declare const wizard_resultBool: typeof resultBool;
149
+ declare const wizard_resultChoice: typeof resultChoice;
150
+ declare const wizard_resultString: typeof resultString;
151
+ declare const wizard_resultStrings: typeof resultStrings;
152
+ declare const wizard_select: typeof select;
153
+ declare const wizard_summary: typeof summary;
154
+ declare const wizard_textInput: typeof textInput;
155
+ declare namespace wizard {
156
+ export { wizard_ActionError as ActionError, type wizard_ActionFn as ActionFn, wizard_ActionRequest as ActionRequest, type wizard_Condition as Condition, wizard_ErrorAction as ErrorAction, type wizard_FormatFn as FormatFn, type wizard_Option as Option, wizard_Step as Step, wizard_StepKind as StepKind, type wizard_ValidateChoiceFn as ValidateChoiceFn, type wizard_ValidateChoicesFn as ValidateChoicesFn, type wizard_ValidateTextFn as ValidateTextFn, wizard_ValidationError as ValidationError, wizard_Wizard as Wizard, wizard_action as action, wizard_confirm as confirm, wizard_multiSelect as multiSelect, wizard_resultBool as resultBool, wizard_resultChoice as resultChoice, wizard_resultString as resultString, wizard_resultStrings as resultStrings, wizard_select as select, wizard_summary as summary, wizard_textInput as textInput };
157
+ }
158
+
159
+ export { ActionError as A, type Condition as C, ErrorAction as E, type FormatFn as F, type Option as O, Step as S, type ValidateChoiceFn as V, Wizard as W, type ActionFn as a, ActionRequest as b, StepKind as c, type ValidateChoicesFn as d, type ValidateTextFn as e, ValidationError as f, action as g, confirm as h, resultChoice as i, resultString as j, resultStrings as k, summary as l, multiSelect as m, resultBool as r, select as s, textInput as t, wizard as w };
@@ -0,0 +1 @@
1
+ export { A as ActionError, a as ActionFn, b as ActionRequest, C as Condition, E as ErrorAction, F as FormatFn, O as Option, S as Step, c as StepKind, V as ValidateChoiceFn, d as ValidateChoicesFn, e as ValidateTextFn, f as ValidationError, W as Wizard, g as action, h as confirm, m as multiSelect, r as resultBool, i as resultChoice, j as resultString, k as resultStrings, s as select, l as summary, t as textInput } from './wizard-Bf_qHc31.js';
package/dist/wizard.js ADDED
@@ -0,0 +1,39 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+ var _chunkCAONBSPOjs = require('./chunk-CAONBSPO.js');
20
+ require('./chunk-R5U7XKVJ.js');
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+ exports.ActionError = _chunkCAONBSPOjs.ActionError; exports.ActionRequest = _chunkCAONBSPOjs.ActionRequest; exports.ErrorAction = _chunkCAONBSPOjs.ErrorAction; exports.Step = _chunkCAONBSPOjs.Step; exports.StepKind = _chunkCAONBSPOjs.StepKind; exports.ValidationError = _chunkCAONBSPOjs.ValidationError; exports.Wizard = _chunkCAONBSPOjs.Wizard; exports.action = _chunkCAONBSPOjs.action; exports.confirm = _chunkCAONBSPOjs.confirm; exports.multiSelect = _chunkCAONBSPOjs.multiSelect; exports.resultBool = _chunkCAONBSPOjs.resultBool; exports.resultChoice = _chunkCAONBSPOjs.resultChoice; exports.resultString = _chunkCAONBSPOjs.resultString; exports.resultStrings = _chunkCAONBSPOjs.resultStrings; exports.select = _chunkCAONBSPOjs.select; exports.summary = _chunkCAONBSPOjs.summary; exports.textInput = _chunkCAONBSPOjs.textInput;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hop-top/kit",
3
- "version": "0.5.0-alpha.11",
3
+ "version": "0.5.0-alpha.13",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hop-top/poly-kit.git",
@@ -42,9 +42,29 @@
42
42
  "default": "./dist/sqlstore.js"
43
43
  },
44
44
  "./upgrade": {
45
- "types": "./dist/upgrade.d.ts",
46
- "require": "./dist/upgrade.js",
47
- "default": "./dist/upgrade.js"
45
+ "types": "./dist/upgrade/index.d.ts",
46
+ "require": "./dist/upgrade/index.js",
47
+ "default": "./dist/upgrade/index.js"
48
+ },
49
+ "./upgrade/drivers/configfile": {
50
+ "types": "./dist/upgrade/drivers/configfile.d.ts",
51
+ "require": "./dist/upgrade/drivers/configfile.js",
52
+ "default": "./dist/upgrade/drivers/configfile.js"
53
+ },
54
+ "./upgrade/drivers/fsdir": {
55
+ "types": "./dist/upgrade/drivers/fsdir.d.ts",
56
+ "require": "./dist/upgrade/drivers/fsdir.js",
57
+ "default": "./dist/upgrade/drivers/fsdir.js"
58
+ },
59
+ "./upgrade/drivers/sqlite": {
60
+ "types": "./dist/upgrade/drivers/sqlite.d.ts",
61
+ "require": "./dist/upgrade/drivers/sqlite.js",
62
+ "default": "./dist/upgrade/drivers/sqlite.js"
63
+ },
64
+ "./upgrade/drivers/postgres": {
65
+ "types": "./dist/upgrade/drivers/postgres.d.ts",
66
+ "require": "./dist/upgrade/drivers/postgres.js",
67
+ "default": "./dist/upgrade/drivers/postgres.js"
48
68
  },
49
69
  "./llm": {
50
70
  "types": "./dist/llm.d.ts",
@@ -175,6 +195,21 @@
175
195
  "types": "./dist/compliance.d.ts",
176
196
  "require": "./dist/compliance.js",
177
197
  "default": "./dist/compliance.js"
198
+ },
199
+ "./uri": {
200
+ "types": "./dist/uri.d.ts",
201
+ "require": "./dist/uri.js",
202
+ "default": "./dist/uri.js"
203
+ },
204
+ "./wizard": {
205
+ "types": "./dist/wizard.d.ts",
206
+ "require": "./dist/wizard.js",
207
+ "default": "./dist/wizard.js"
208
+ },
209
+ "./bus": {
210
+ "types": "./dist/bus.d.ts",
211
+ "require": "./dist/bus.js",
212
+ "default": "./dist/bus.js"
178
213
  }
179
214
  },
180
215
  "typesVersions": {
@@ -195,7 +230,19 @@
195
230
  "./dist/sqlstore.d.ts"
196
231
  ],
197
232
  "upgrade": [
198
- "./dist/upgrade.d.ts"
233
+ "./dist/upgrade/index.d.ts"
234
+ ],
235
+ "upgrade/drivers/configfile": [
236
+ "./dist/upgrade/drivers/configfile.d.ts"
237
+ ],
238
+ "upgrade/drivers/fsdir": [
239
+ "./dist/upgrade/drivers/fsdir.d.ts"
240
+ ],
241
+ "upgrade/drivers/sqlite": [
242
+ "./dist/upgrade/drivers/sqlite.d.ts"
243
+ ],
244
+ "upgrade/drivers/postgres": [
245
+ "./dist/upgrade/drivers/postgres.d.ts"
199
246
  ],
200
247
  "llm": [
201
248
  "./dist/llm.d.ts"
@@ -274,6 +321,15 @@
274
321
  ],
275
322
  "compliance": [
276
323
  "./dist/compliance.d.ts"
324
+ ],
325
+ "uri": [
326
+ "./dist/uri.d.ts"
327
+ ],
328
+ "wizard": [
329
+ "./dist/wizard.d.ts"
330
+ ],
331
+ "bus": [
332
+ "./dist/bus.d.ts"
277
333
  ]
278
334
  }
279
335
  },
@@ -286,45 +342,48 @@
286
342
  }
287
343
  },
288
344
  "dependencies": {
289
- "@bufbuild/protobuf": "^2.16.0",
345
+ "@bufbuild/protobuf": "^2.17.0",
290
346
  "@clack/prompts": "^1.8.1",
291
- "@connectrpc/connect": "^2.2.0",
292
- "@connectrpc/connect-web": "^2.2.0",
347
+ "@connectrpc/connect": "^2.3.0",
348
+ "@connectrpc/connect-web": "^2.3.0",
293
349
  "@hop-top/cite": "^0.1.2",
294
- "@modelcontextprotocol/core": "2.3.1",
295
- "@modelcontextprotocol/server": "2.3.1",
350
+ "@modelcontextprotocol/core": "2.4.0",
351
+ "@modelcontextprotocol/server": "2.4.0",
296
352
  "better-sqlite3": "^12.11.1",
297
- "commander": "15.0.0",
353
+ "commander": "15.1.0",
298
354
  "csv-stringify": "^6.9.0",
299
355
  "eta": "^4.6.0",
300
- "hono": "^4.13.13",
356
+ "hono": "^4.13.17",
301
357
  "js-yaml": "^4.3.2",
302
358
  "picomatch": "^4.0.7",
303
359
  "pino": "^10.4.0",
304
- "semver": "^7.8.5",
305
- "typeid-js": "^1.2.0",
360
+ "semver": "^7.8.6",
361
+ "tar": "7.5.23",
306
362
  "zod": "^4.6.7"
307
363
  },
308
364
  "devDependencies": {
309
365
  "@types/better-sqlite3": "^7.6.13",
310
366
  "@types/js-yaml": "^4.0.9",
311
367
  "@types/node": "^24",
368
+ "@types/pg": "^8.23.1",
312
369
  "@types/picomatch": "^4.0.3",
313
370
  "@types/semver": "^7.8.0",
314
371
  "esbuild": "^0.28.2",
315
- "eslint": "^10.12.0",
372
+ "eslint": "^10.14.0",
373
+ "pg": "^8.23.1",
316
374
  "tsup": "^8",
375
+ "typeid-js": "^1.2.0",
317
376
  "typescript": "^5",
318
- "typescript-eslint": "^8.71.2",
319
- "vite": "^8.3.4",
320
- "vitest": "^5.0.4"
377
+ "typescript-eslint": "^8.72.1",
378
+ "vite": "^8.3.6",
379
+ "vitest": "^5.1.0"
321
380
  },
322
381
  "engines": {
323
382
  "node": ">=22.12"
324
383
  },
325
384
  "license": "MIT",
326
385
  "scripts": {
327
- "build": "tsup src/index.ts src/alias.ts src/cli.ts src/output.ts src/xdg.ts src/config.ts src/sqlstore.ts src/upgrade.ts src/llm.ts src/llm-anthropic.ts src/llm-openai.ts src/routellm.ts src/tui/index.ts src/errcorrect.ts src/safety.ts src/provenance.ts src/stream.ts src/progress.ts src/auth.ts src/api.ts src/rpc.ts src/aim.ts src/netpolicy.ts src/scope.ts src/serve.ts src/telemetry/index.ts src/id/index.ts src/mcp/index.ts src/log.ts src/completion.ts src/toolspec.ts src/completion-values.ts src/compliance.ts --format cjs --splitting --dts",
386
+ "build": "tsup src/index.ts src/alias.ts src/cli.ts src/output.ts src/xdg.ts src/config.ts src/sqlstore.ts src/upgrade/index.ts src/upgrade/drivers/configfile.ts src/upgrade/drivers/fsdir.ts src/upgrade/drivers/sqlite.ts src/upgrade/drivers/postgres.ts src/llm.ts src/llm-anthropic.ts src/llm-openai.ts src/routellm.ts src/tui/index.ts src/errcorrect.ts src/safety.ts src/provenance.ts src/stream.ts src/progress.ts src/auth.ts src/api.ts src/rpc.ts src/aim.ts src/netpolicy.ts src/scope.ts src/serve.ts src/telemetry/index.ts src/id/index.ts src/mcp/index.ts src/log.ts src/completion.ts src/toolspec.ts src/completion-values.ts src/compliance.ts src/uri.ts src/wizard.ts src/bus.ts --format cjs --splitting --dts",
328
387
  "lint": "eslint src/",
329
388
  "lint:fix": "eslint src/ --fix",
330
389
  "typecheck": "tsc --noEmit -p tsconfig.json && tsc -p tsconfig.test.json",
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "hop-top-kit-ts",
3
+ "version": "0.5.0-alpha.13",
4
+ "description": "Build CLIs and services in TypeScript or JavaScript with the kit SDK `@hop-top/kit`, covering createCLI, output formats, layered config, MCP serving, safety guards, LLM adapters. Use when code imports `@hop-top/kit`, when adding kit to a Node project, or when a task needs a kit capability in TypeScript and you must check this port covers it. Not for choosing a language; the router skill does that.",
5
+ "author": {
6
+ "name": "hop-top",
7
+ "url": "https://github.com/hop-top"
8
+ },
9
+ "homepage": "https://github.com/hop-top/kit-ts/blob/main/skills/hop-top-kit-ts/SKILL.md",
10
+ "repository": "https://github.com/hop-top/kit-ts",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "hop-top",
14
+ "kit",
15
+ "agent-skill",
16
+ "typescript",
17
+ "node"
18
+ ]
19
+ }