@hop-top/kit 0.5.0-alpha.0 → 0.5.0-alpha.10
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/CHANGELOG.md +262 -0
- package/LICENSE +1 -1
- package/LICENSE-cobra.txt +174 -0
- package/NOTICE +15 -0
- package/README.md +55 -259
- package/dist/aim-DZHwwiIc.d.ts +139 -0
- package/dist/aim.d.ts +1 -116
- package/dist/aim.js +13 -414
- package/dist/alias-D9_qFlyP.d.ts +174 -0
- package/dist/alias.d.ts +2 -73
- package/dist/alias.js +27 -207
- package/dist/api-DAexsu2H.d.ts +77 -0
- package/dist/api.d.ts +1 -62
- package/dist/api.js +10 -164
- package/dist/auth-2-jfgiHn.d.ts +34 -0
- package/dist/auth.d.ts +1 -26
- package/dist/auth.js +6 -40
- package/dist/chunk-2JV3A7OP.js +1894 -0
- package/dist/chunk-3FIKGFKI.js +54 -0
- package/dist/chunk-4UE5TCMQ.js +104 -0
- package/dist/chunk-6HFAEZ52.js +29 -0
- package/dist/chunk-6SVOHNIC.js +17 -0
- package/dist/chunk-72XZWQX7.js +504 -0
- package/dist/chunk-ABQSE7AI.js +513 -0
- package/dist/chunk-BDNNPRX6.js +41 -0
- package/dist/chunk-BLS2OBIQ.js +263 -0
- package/dist/chunk-BRNEKPWX.js +37 -0
- package/dist/chunk-CSJWB6D3.js +151 -0
- package/dist/chunk-GGWJRWWA.js +309 -0
- package/dist/chunk-GHPJJV5L.js +613 -0
- package/dist/chunk-IXVQ62NZ.js +334 -0
- package/dist/chunk-JKMQSAJP.js +174 -0
- package/dist/chunk-JZ22ZUFA.js +1131 -0
- package/dist/chunk-K7VCKJ27.js +814 -0
- package/dist/chunk-KVG7YCTS.js +115 -0
- package/dist/chunk-L23O2FFE.js +51 -0
- package/dist/chunk-MQXYDYRD.js +968 -0
- package/dist/chunk-MUIQVU6E.js +251 -0
- package/dist/chunk-NLMS7HGP.js +178 -0
- package/dist/chunk-POR5L2DG.js +247 -0
- package/dist/chunk-PSFYJGDG.js +1445 -0
- package/dist/chunk-QJVSKKRQ.js +369 -0
- package/dist/chunk-QPUCXQXT.js +67 -0
- package/dist/chunk-QQQYCWSC.js +240 -0
- package/dist/chunk-R5U7XKVJ.js +16 -0
- package/dist/chunk-SNVGDYX7.js +187 -0
- package/dist/chunk-T46YPHKN.js +669 -0
- package/dist/chunk-UKZIAQA7.js +26 -0
- package/dist/chunk-WBVO43HU.js +355 -0
- package/dist/chunk-WUOAQVOA.js +86 -0
- package/dist/chunk-WWUKGJB5.js +90 -0
- package/dist/chunk-XJTRY453.js +868 -0
- package/dist/chunk-YGYQUFGY.js +219 -0
- package/dist/chunk-YOBAUCVN.js +583 -0
- package/dist/cli-C5B5tnpA.d.ts +400 -0
- package/dist/cli.d.ts +7 -309
- package/dist/cli.js +70 -885
- package/dist/completion-csVun6SP.d.ts +112 -0
- package/dist/completion-values-By-mnjNt.d.ts +142 -0
- package/dist/completion-values.d.ts +1 -0
- package/dist/completion-values.js +29 -0
- package/dist/completion.d.ts +3 -0
- package/dist/completion.js +34 -0
- package/dist/compliance-AxFf-uMy.d.ts +60 -0
- package/dist/compliance.d.ts +1 -0
- package/dist/compliance.js +17 -0
- package/dist/config-CaK60ByQ.d.ts +241 -0
- package/dist/config.d.ts +1 -97
- package/dist/config.js +8 -78
- package/dist/errcorrect-BcX1Ft0K.d.ts +44 -0
- package/dist/errcorrect.d.ts +1 -37
- package/dist/errcorrect.js +8 -68
- package/dist/error-Do8Qji43.d.ts +231 -0
- package/dist/id/index.d.ts +2 -83
- package/dist/id/index.js +14 -65
- package/dist/index-BKJZClJx.d.ts +1486 -0
- package/dist/index-C3Zw4wDJ.d.ts +359 -0
- package/dist/index-DCe1boBz.d.ts +328 -0
- package/dist/index-VLDcI5NF.d.ts +95 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +132 -0
- package/dist/llm-DYuR7_uX.d.ts +1069 -0
- package/dist/llm-anthropic-Cd_I2xXB.d.ts +67 -0
- package/dist/llm-anthropic.d.ts +2 -0
- package/dist/llm-anthropic.js +13 -0
- package/dist/llm-openai-DyFrucmV.d.ts +87 -0
- package/dist/llm-openai.d.ts +2 -0
- package/dist/llm-openai.js +19 -0
- package/dist/llm.d.ts +1 -188
- package/dist/llm.js +101 -356
- package/dist/log-CkaxMX3U.d.ts +115 -0
- package/dist/log.d.ts +2 -0
- package/dist/log.js +14 -0
- package/dist/mcp/index.d.ts +4 -0
- package/dist/mcp/index.js +184 -0
- package/dist/netpolicy-Brx5XZUB.d.ts +151 -0
- package/dist/netpolicy.d.ts +1 -0
- package/dist/netpolicy.js +25 -0
- package/dist/output-CjZWmL8s.d.ts +420 -0
- package/dist/output.d.ts +3 -213
- package/dist/output.js +137 -447
- package/dist/parity-CvMuYcVI.d.ts +61 -0
- package/dist/progress-CAzyxeWl.d.ts +38 -0
- package/dist/progress.d.ts +1 -30
- package/dist/progress.js +6 -55
- package/dist/provenance-SMFHm5gx.d.ts +30 -0
- package/dist/provenance.d.ts +1 -24
- package/dist/provenance.js +6 -31
- package/dist/routellm-B0nv59mH.d.ts +111 -0
- package/dist/routellm.d.ts +2 -64
- package/dist/routellm.js +13 -255
- package/dist/rpc-D31Lg0Kc.d.ts +32 -0
- package/dist/rpc.d.ts +2 -25
- package/dist/rpc.js +4 -98
- package/dist/safety-CUaYEjZc.d.ts +30 -0
- package/dist/safety.d.ts +1 -24
- package/dist/safety.js +6 -43
- package/dist/scope-BrhYB4ij.d.ts +141 -0
- package/dist/scope.d.ts +1 -121
- package/dist/scope.js +20 -377
- package/dist/serve-D8yWMrTc.d.ts +646 -0
- package/dist/serve.d.ts +3 -0
- package/dist/serve.js +75 -0
- package/dist/sqlstore.js +6 -39
- package/dist/stream-CrjeCp0M.d.ts +44 -0
- package/dist/stream.d.ts +1 -35
- package/dist/stream.js +8 -51
- package/dist/telemetry/index.d.ts +1 -315
- package/dist/telemetry/index.js +26 -599
- package/dist/toolspec-DcPwwoAZ.d.ts +368 -0
- package/dist/toolspec.d.ts +2 -0
- package/dist/toolspec.js +37 -0
- package/dist/tui/index.d.ts +6 -298
- package/dist/tui/index.js +18 -322
- package/dist/upgrade-p_zh3pvV.d.ts +102 -0
- package/dist/upgrade.d.ts +1 -95
- package/dist/upgrade.js +6 -114
- package/dist/xdg-DB7Shoib.d.ts +179 -0
- package/dist/xdg.d.ts +1 -169
- package/dist/xdg.js +14 -128
- package/package.json +236 -46
- package/src/README.md +15 -0
- package/src/alias.conformance.test.ts +250 -0
- package/src/alias.test.ts +206 -2
- package/src/alias.ts +196 -21
- package/src/cli.help-command.test.ts +105 -0
- package/src/cli.offline.test.ts +93 -0
- package/src/cli.parity.test.ts +192 -0
- package/src/cli.test.ts +95 -1
- package/src/cli.ts +195 -25
- package/src/completion-scripts.ts +16 -0
- package/src/completion-values.test.ts +76 -16
- package/src/completion-values.ts +170 -66
- package/src/completion.conformance.test.ts +297 -0
- package/src/completion.test.ts +256 -145
- package/src/completion.ts +767 -121
- package/src/compliance.test.ts +196 -2
- package/src/compliance.ts +440 -20
- package/src/config-merge.test.ts +425 -0
- package/src/config.test.ts +228 -1
- package/src/config.ts +429 -16
- package/src/gen/crud_pb.ts +7 -7
- package/src/id/README.md +38 -0
- package/src/id/contract.test.ts +1 -1
- package/src/id/index.test.ts +1 -1
- package/src/id/index.ts +3 -2
- package/src/index.test.ts +71 -0
- package/src/index.ts +46 -0
- package/src/llm-anthropic.conformance.test.ts +1135 -0
- package/src/llm-anthropic.test.ts +152 -0
- package/src/llm-anthropic.ts +940 -0
- package/src/llm-choice-hermetic.test.ts +335 -0
- package/src/llm-config.test.ts +232 -0
- package/src/llm-config.ts +106 -0
- package/src/llm-endpoint.ts +254 -0
- package/src/llm-error.ts +17 -0
- package/src/llm-errors.ts +152 -0
- package/src/llm-file.ts +126 -0
- package/src/llm-http.ts +317 -0
- package/src/llm-keys.ts +167 -0
- package/src/llm-media.conformance.test.ts +87 -0
- package/src/llm-media.test.ts +279 -0
- package/src/llm-media.ts +322 -0
- package/src/llm-openai.conformance.test.ts +407 -0
- package/src/llm-openai.test.ts +510 -0
- package/src/llm-openai.ts +708 -0
- package/src/llm-payload.ts +155 -0
- package/src/llm-quote.ts +46 -0
- package/src/llm-routellm.conformance.test.ts +44 -0
- package/src/llm-toolnames.conformance.test.ts +112 -0
- package/src/llm-toolnames.test.ts +132 -0
- package/src/llm-toolnames.ts +298 -0
- package/src/llm-uri.ts +99 -0
- package/src/llm.test.ts +43 -15
- package/src/llm.toolcall.test.ts +175 -0
- package/src/llm.ts +602 -190
- package/src/log.parity.test.ts +105 -0
- package/src/log.test.ts +270 -1
- package/src/log.ts +228 -49
- package/src/mcp/README.md +63 -0
- package/src/mcp/args-separator.test.ts +164 -0
- package/src/mcp/args.test.ts +223 -0
- package/src/mcp/args.ts +160 -0
- package/src/mcp/audit.test.ts +520 -0
- package/src/mcp/audit.ts +70 -0
- package/src/mcp/bridge.test.ts +222 -0
- package/src/mcp/bridge.ts +291 -0
- package/src/mcp/conformance.test.ts +357 -0
- package/src/mcp/dispatch.ts +359 -0
- package/src/mcp/identity.test.ts +166 -0
- package/src/mcp/identity.ts +72 -0
- package/src/mcp/index.ts +176 -0
- package/src/mcp/legacy-notify.test.ts +59 -0
- package/src/mcp/legacy.ts +367 -0
- package/src/mcp/mcp.test.ts +707 -0
- package/src/mcp/modern-confirm.test.ts +520 -0
- package/src/mcp/modern-confirm.ts +484 -0
- package/src/mcp/modern.ts +788 -0
- package/src/mcp/stdio.test.ts +313 -0
- package/src/mcp/stdio.ts +254 -0
- package/src/mcp/tasks.ts +82 -0
- package/src/mcp/testtree.ts +250 -0
- package/src/mcp/toolname.test.ts +147 -0
- package/src/mcp/types.ts +689 -0
- package/src/netpolicy.test.ts +280 -0
- package/src/netpolicy.ts +256 -0
- package/src/output/README.md +46 -0
- package/src/output/builtins.ts +5 -5
- package/src/output/dispatch.ts +10 -2
- package/src/output/error.ts +459 -0
- package/src/output/formatter.ts +29 -5
- package/src/output/formatters/README.md +50 -0
- package/src/output/formatters/csv.ts +48 -12
- package/src/output/formatters/json.ts +4 -25
- package/src/output/formatters/project.ts +34 -0
- package/src/output/formatters/table.ts +8 -6
- package/src/output/formatters/text.ts +7 -3
- package/src/output/formatters/yaml.ts +5 -22
- package/src/output/projection.test.ts +298 -0
- package/src/output/projection.ts +33 -59
- package/src/output/template.ts +11 -21
- package/src/output.surface.test.ts +41 -0
- package/src/output.ts +64 -3
- package/src/published-types.test.ts +133 -0
- package/src/routellm.test.ts +209 -28
- package/src/routellm.toolcall.test.ts +521 -0
- package/src/routellm.ts +213 -177
- package/src/router/README.md +44 -0
- package/src/router/server.test.ts +41 -0
- package/src/router/server.ts +11 -0
- package/src/safety.test.ts +19 -9
- package/src/scope-defaults.json +29 -29
- package/src/serve.test.ts +1257 -0
- package/src/serve.ts +1665 -0
- package/src/telemetry/README.md +48 -0
- package/src/telemetry/client.test.ts +31 -0
- package/src/telemetry/client.ts +12 -6
- package/src/telemetry/offline.test.ts +64 -0
- package/src/toolspec-internal.ts +279 -0
- package/src/toolspec-manifest.test.ts +167 -0
- package/src/toolspec-manifest.ts +410 -0
- package/src/toolspec-spec-schemas.ts +12 -0
- package/src/toolspec-spec.test.ts +273 -0
- package/src/toolspec-spec.ts +458 -0
- package/src/toolspec.from-command.test.ts +350 -0
- package/src/toolspec.test.ts +2 -2
- package/src/toolspec.ts +222 -0
- package/src/triton/README.md +34 -0
- package/src/tui/README.md +42 -0
- package/src/tui/parity.test.ts +142 -0
- package/src/tui/parity.ts +59 -13
- package/src/wizard.test.ts +7 -7
- package/test/llm/conformance-helpers.ts +100 -0
- package/test/output/csv.test.ts +164 -0
- package/test/output/dispatch.test.ts +1 -2
- package/test/output/error.test.ts +277 -0
- package/test/output/smoke-capture.ts +2 -2
- package/test/output/smoke.test.ts +2 -2
- package/test/output/taxonomy-contract.test.ts +148 -0
- package/test/setup-env.ts +16 -0
- package/test/toolspec/fixture.ts +79 -0
- package/tsconfig.json +3 -1
- package/tsconfig.test.json +10 -0
- package/vitest.config.ts +9 -0
package/dist/xdg.js
CHANGED
|
@@ -1,129 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
29
2
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
function platform(override) {
|
|
44
|
-
return override ?? process.platform;
|
|
45
|
-
}
|
|
46
|
-
function configDir(tool, plt) {
|
|
47
|
-
const xdg = process.env["XDG_CONFIG_HOME"];
|
|
48
|
-
if (xdg) return path.join(xdg, tool);
|
|
49
|
-
const p = platform(plt);
|
|
50
|
-
const home = os.homedir();
|
|
51
|
-
switch (p) {
|
|
52
|
-
case "darwin":
|
|
53
|
-
return path.join(home, "Library", "Preferences", tool);
|
|
54
|
-
case "win32": {
|
|
55
|
-
const appdata = process.env["APPDATA"];
|
|
56
|
-
if (!appdata) throw new Error("%APPDATA% is not set");
|
|
57
|
-
return path.join(appdata, tool);
|
|
58
|
-
}
|
|
59
|
-
default:
|
|
60
|
-
return path.join(home, ".config", tool);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
function dataDir(tool, plt) {
|
|
64
|
-
const xdg = process.env["XDG_DATA_HOME"];
|
|
65
|
-
if (xdg) return path.join(xdg, tool);
|
|
66
|
-
const p = platform(plt);
|
|
67
|
-
const home = os.homedir();
|
|
68
|
-
switch (p) {
|
|
69
|
-
case "darwin":
|
|
70
|
-
return path.join(home, "Library", "Application Support", tool);
|
|
71
|
-
case "win32": {
|
|
72
|
-
const local = process.env["LocalAppData"];
|
|
73
|
-
if (!local) throw new Error("%LocalAppData% is not set");
|
|
74
|
-
return path.win32.join(local, tool);
|
|
75
|
-
}
|
|
76
|
-
default:
|
|
77
|
-
return path.join(home, ".local", "share", tool);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
function cacheDir(tool, plt) {
|
|
81
|
-
const xdg = process.env["XDG_CACHE_HOME"];
|
|
82
|
-
if (xdg) return path.join(xdg, tool);
|
|
83
|
-
const p = platform(plt);
|
|
84
|
-
const home = os.homedir();
|
|
85
|
-
switch (p) {
|
|
86
|
-
case "darwin":
|
|
87
|
-
return path.join(home, "Library", "Caches", tool);
|
|
88
|
-
case "win32": {
|
|
89
|
-
const local = process.env["LocalAppData"];
|
|
90
|
-
if (!local) throw new Error("%LocalAppData% is not set");
|
|
91
|
-
return path.win32.join(local, tool, "cache");
|
|
92
|
-
}
|
|
93
|
-
default:
|
|
94
|
-
return path.join(home, ".cache", tool);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function stateDir(tool, plt) {
|
|
98
|
-
const xdg = process.env["XDG_STATE_HOME"];
|
|
99
|
-
if (xdg) return path.join(xdg, tool);
|
|
100
|
-
const p = platform(plt);
|
|
101
|
-
const home = os.homedir();
|
|
102
|
-
switch (p) {
|
|
103
|
-
case "darwin":
|
|
104
|
-
return path.join(home, "Library", "Application Support", tool, "state");
|
|
105
|
-
case "win32": {
|
|
106
|
-
const local = process.env["LocalAppData"];
|
|
107
|
-
if (!local) throw new Error("%LocalAppData% is not set");
|
|
108
|
-
return path.win32.join(local, tool, "state");
|
|
109
|
-
}
|
|
110
|
-
default:
|
|
111
|
-
return path.join(home, ".local", "state", tool);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
function mustEnsure(dir) {
|
|
115
|
-
fs.mkdirSync(dir, { recursive: true, mode: 488 });
|
|
116
|
-
const stat = fs.statSync(dir);
|
|
117
|
-
if (!stat.isDirectory()) {
|
|
118
|
-
throw new Error(`mustEnsure: path exists but is not a directory: ${dir}`);
|
|
119
|
-
}
|
|
120
|
-
return dir;
|
|
121
|
-
}
|
|
122
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
123
|
-
0 && (module.exports = {
|
|
124
|
-
cacheDir,
|
|
125
|
-
configDir,
|
|
126
|
-
dataDir,
|
|
127
|
-
mustEnsure,
|
|
128
|
-
stateDir
|
|
129
|
-
});
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunk4UE5TCMQjs = require('./chunk-4UE5TCMQ.js');
|
|
8
|
+
require('./chunk-R5U7XKVJ.js');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
exports.cacheDir = _chunk4UE5TCMQjs.cacheDir; exports.configDir = _chunk4UE5TCMQjs.configDir; exports.dataDir = _chunk4UE5TCMQjs.dataDir; exports.mustEnsure = _chunk4UE5TCMQjs.mustEnsure; exports.stateDir = _chunk4UE5TCMQjs.stateDir;
|
package/package.json
CHANGED
|
@@ -1,143 +1,333 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hop-top/kit",
|
|
3
|
-
"version": "0.5.0-alpha.
|
|
3
|
+
"version": "0.5.0-alpha.10",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/hop-top/poly-kit.git",
|
|
7
|
+
"directory": "sdk/ts"
|
|
8
|
+
},
|
|
4
9
|
"description": "Shared CLI utilities for hop-top tools — TypeScript/CJS edition",
|
|
5
10
|
"type": "commonjs",
|
|
6
11
|
"main": "./dist/index.js",
|
|
7
12
|
"types": "./dist/index.d.ts",
|
|
8
13
|
"exports": {
|
|
9
14
|
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
10
16
|
"require": "./dist/index.js",
|
|
11
|
-
"
|
|
17
|
+
"default": "./dist/index.js"
|
|
12
18
|
},
|
|
13
19
|
"./cli": {
|
|
20
|
+
"types": "./dist/cli.d.ts",
|
|
14
21
|
"require": "./dist/cli.js",
|
|
15
|
-
"
|
|
22
|
+
"default": "./dist/cli.js"
|
|
16
23
|
},
|
|
17
24
|
"./output": {
|
|
25
|
+
"types": "./dist/output.d.ts",
|
|
18
26
|
"require": "./dist/output.js",
|
|
19
|
-
"
|
|
27
|
+
"default": "./dist/output.js"
|
|
20
28
|
},
|
|
21
29
|
"./xdg": {
|
|
30
|
+
"types": "./dist/xdg.d.ts",
|
|
22
31
|
"require": "./dist/xdg.js",
|
|
23
|
-
"
|
|
32
|
+
"default": "./dist/xdg.js"
|
|
24
33
|
},
|
|
25
34
|
"./config": {
|
|
35
|
+
"types": "./dist/config.d.ts",
|
|
26
36
|
"require": "./dist/config.js",
|
|
27
|
-
"
|
|
37
|
+
"default": "./dist/config.js"
|
|
28
38
|
},
|
|
29
39
|
"./sqlstore": {
|
|
40
|
+
"types": "./dist/sqlstore.d.ts",
|
|
30
41
|
"require": "./dist/sqlstore.js",
|
|
31
|
-
"
|
|
42
|
+
"default": "./dist/sqlstore.js"
|
|
32
43
|
},
|
|
33
44
|
"./upgrade": {
|
|
45
|
+
"types": "./dist/upgrade.d.ts",
|
|
34
46
|
"require": "./dist/upgrade.js",
|
|
35
|
-
"
|
|
47
|
+
"default": "./dist/upgrade.js"
|
|
36
48
|
},
|
|
37
49
|
"./llm": {
|
|
50
|
+
"types": "./dist/llm.d.ts",
|
|
38
51
|
"require": "./dist/llm.js",
|
|
39
|
-
"
|
|
52
|
+
"default": "./dist/llm.js"
|
|
53
|
+
},
|
|
54
|
+
"./anthropic": {
|
|
55
|
+
"types": "./dist/llm-anthropic.d.ts",
|
|
56
|
+
"require": "./dist/llm-anthropic.js",
|
|
57
|
+
"default": "./dist/llm-anthropic.js"
|
|
58
|
+
},
|
|
59
|
+
"./openai": {
|
|
60
|
+
"types": "./dist/llm-openai.d.ts",
|
|
61
|
+
"require": "./dist/llm-openai.js",
|
|
62
|
+
"default": "./dist/llm-openai.js"
|
|
40
63
|
},
|
|
41
64
|
"./routellm": {
|
|
65
|
+
"types": "./dist/routellm.d.ts",
|
|
42
66
|
"require": "./dist/routellm.js",
|
|
43
|
-
"
|
|
67
|
+
"default": "./dist/routellm.js"
|
|
44
68
|
},
|
|
45
69
|
"./alias": {
|
|
70
|
+
"types": "./dist/alias.d.ts",
|
|
46
71
|
"require": "./dist/alias.js",
|
|
47
|
-
"
|
|
72
|
+
"default": "./dist/alias.js"
|
|
48
73
|
},
|
|
49
74
|
"./tui": {
|
|
75
|
+
"types": "./dist/tui/index.d.ts",
|
|
50
76
|
"require": "./dist/tui/index.js",
|
|
51
|
-
"
|
|
77
|
+
"default": "./dist/tui/index.js"
|
|
52
78
|
},
|
|
53
79
|
"./errcorrect": {
|
|
80
|
+
"types": "./dist/errcorrect.d.ts",
|
|
54
81
|
"require": "./dist/errcorrect.js",
|
|
55
|
-
"
|
|
82
|
+
"default": "./dist/errcorrect.js"
|
|
56
83
|
},
|
|
57
84
|
"./safety": {
|
|
85
|
+
"types": "./dist/safety.d.ts",
|
|
58
86
|
"require": "./dist/safety.js",
|
|
59
|
-
"
|
|
87
|
+
"default": "./dist/safety.js"
|
|
60
88
|
},
|
|
61
89
|
"./provenance": {
|
|
90
|
+
"types": "./dist/provenance.d.ts",
|
|
62
91
|
"require": "./dist/provenance.js",
|
|
63
|
-
"
|
|
92
|
+
"default": "./dist/provenance.js"
|
|
64
93
|
},
|
|
65
94
|
"./stream": {
|
|
95
|
+
"types": "./dist/stream.d.ts",
|
|
66
96
|
"require": "./dist/stream.js",
|
|
67
|
-
"
|
|
97
|
+
"default": "./dist/stream.js"
|
|
68
98
|
},
|
|
69
99
|
"./progress": {
|
|
100
|
+
"types": "./dist/progress.d.ts",
|
|
70
101
|
"require": "./dist/progress.js",
|
|
71
|
-
"
|
|
102
|
+
"default": "./dist/progress.js"
|
|
72
103
|
},
|
|
73
104
|
"./auth": {
|
|
105
|
+
"types": "./dist/auth.d.ts",
|
|
74
106
|
"require": "./dist/auth.js",
|
|
75
|
-
"
|
|
107
|
+
"default": "./dist/auth.js"
|
|
76
108
|
},
|
|
77
109
|
"./api": {
|
|
110
|
+
"types": "./dist/api.d.ts",
|
|
78
111
|
"require": "./dist/api.js",
|
|
79
|
-
"
|
|
112
|
+
"default": "./dist/api.js"
|
|
80
113
|
},
|
|
81
114
|
"./rpc": {
|
|
115
|
+
"types": "./dist/rpc.d.ts",
|
|
82
116
|
"require": "./dist/rpc.js",
|
|
83
|
-
"
|
|
117
|
+
"default": "./dist/rpc.js"
|
|
84
118
|
},
|
|
85
119
|
"./aim": {
|
|
120
|
+
"types": "./dist/aim.d.ts",
|
|
86
121
|
"require": "./dist/aim.js",
|
|
87
|
-
"
|
|
122
|
+
"default": "./dist/aim.js"
|
|
123
|
+
},
|
|
124
|
+
"./netpolicy": {
|
|
125
|
+
"types": "./dist/netpolicy.d.ts",
|
|
126
|
+
"require": "./dist/netpolicy.js",
|
|
127
|
+
"default": "./dist/netpolicy.js"
|
|
88
128
|
},
|
|
89
129
|
"./scope": {
|
|
130
|
+
"types": "./dist/scope.d.ts",
|
|
90
131
|
"require": "./dist/scope.js",
|
|
91
|
-
"
|
|
132
|
+
"default": "./dist/scope.js"
|
|
133
|
+
},
|
|
134
|
+
"./serve": {
|
|
135
|
+
"types": "./dist/serve.d.ts",
|
|
136
|
+
"require": "./dist/serve.js",
|
|
137
|
+
"default": "./dist/serve.js"
|
|
92
138
|
},
|
|
93
139
|
"./telemetry": {
|
|
140
|
+
"types": "./dist/telemetry/index.d.ts",
|
|
94
141
|
"require": "./dist/telemetry/index.js",
|
|
95
|
-
"
|
|
142
|
+
"default": "./dist/telemetry/index.js"
|
|
96
143
|
},
|
|
97
144
|
"./id": {
|
|
145
|
+
"types": "./dist/id/index.d.ts",
|
|
98
146
|
"require": "./dist/id/index.js",
|
|
99
|
-
"
|
|
147
|
+
"default": "./dist/id/index.js"
|
|
148
|
+
},
|
|
149
|
+
"./mcp": {
|
|
150
|
+
"types": "./dist/mcp/index.d.ts",
|
|
151
|
+
"require": "./dist/mcp/index.js",
|
|
152
|
+
"default": "./dist/mcp/index.js"
|
|
153
|
+
},
|
|
154
|
+
"./log": {
|
|
155
|
+
"types": "./dist/log.d.ts",
|
|
156
|
+
"require": "./dist/log.js",
|
|
157
|
+
"default": "./dist/log.js"
|
|
158
|
+
},
|
|
159
|
+
"./completion": {
|
|
160
|
+
"types": "./dist/completion.d.ts",
|
|
161
|
+
"require": "./dist/completion.js",
|
|
162
|
+
"default": "./dist/completion.js"
|
|
163
|
+
},
|
|
164
|
+
"./toolspec": {
|
|
165
|
+
"types": "./dist/toolspec.d.ts",
|
|
166
|
+
"require": "./dist/toolspec.js",
|
|
167
|
+
"default": "./dist/toolspec.js"
|
|
168
|
+
},
|
|
169
|
+
"./completion-values": {
|
|
170
|
+
"types": "./dist/completion-values.d.ts",
|
|
171
|
+
"require": "./dist/completion-values.js",
|
|
172
|
+
"default": "./dist/completion-values.js"
|
|
173
|
+
},
|
|
174
|
+
"./compliance": {
|
|
175
|
+
"types": "./dist/compliance.d.ts",
|
|
176
|
+
"require": "./dist/compliance.js",
|
|
177
|
+
"default": "./dist/compliance.js"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"typesVersions": {
|
|
181
|
+
"*": {
|
|
182
|
+
"cli": [
|
|
183
|
+
"./dist/cli.d.ts"
|
|
184
|
+
],
|
|
185
|
+
"output": [
|
|
186
|
+
"./dist/output.d.ts"
|
|
187
|
+
],
|
|
188
|
+
"xdg": [
|
|
189
|
+
"./dist/xdg.d.ts"
|
|
190
|
+
],
|
|
191
|
+
"config": [
|
|
192
|
+
"./dist/config.d.ts"
|
|
193
|
+
],
|
|
194
|
+
"sqlstore": [
|
|
195
|
+
"./dist/sqlstore.d.ts"
|
|
196
|
+
],
|
|
197
|
+
"upgrade": [
|
|
198
|
+
"./dist/upgrade.d.ts"
|
|
199
|
+
],
|
|
200
|
+
"llm": [
|
|
201
|
+
"./dist/llm.d.ts"
|
|
202
|
+
],
|
|
203
|
+
"anthropic": [
|
|
204
|
+
"./dist/llm-anthropic.d.ts"
|
|
205
|
+
],
|
|
206
|
+
"openai": [
|
|
207
|
+
"./dist/llm-openai.d.ts"
|
|
208
|
+
],
|
|
209
|
+
"routellm": [
|
|
210
|
+
"./dist/routellm.d.ts"
|
|
211
|
+
],
|
|
212
|
+
"alias": [
|
|
213
|
+
"./dist/alias.d.ts"
|
|
214
|
+
],
|
|
215
|
+
"tui": [
|
|
216
|
+
"./dist/tui/index.d.ts"
|
|
217
|
+
],
|
|
218
|
+
"errcorrect": [
|
|
219
|
+
"./dist/errcorrect.d.ts"
|
|
220
|
+
],
|
|
221
|
+
"safety": [
|
|
222
|
+
"./dist/safety.d.ts"
|
|
223
|
+
],
|
|
224
|
+
"provenance": [
|
|
225
|
+
"./dist/provenance.d.ts"
|
|
226
|
+
],
|
|
227
|
+
"stream": [
|
|
228
|
+
"./dist/stream.d.ts"
|
|
229
|
+
],
|
|
230
|
+
"progress": [
|
|
231
|
+
"./dist/progress.d.ts"
|
|
232
|
+
],
|
|
233
|
+
"auth": [
|
|
234
|
+
"./dist/auth.d.ts"
|
|
235
|
+
],
|
|
236
|
+
"api": [
|
|
237
|
+
"./dist/api.d.ts"
|
|
238
|
+
],
|
|
239
|
+
"rpc": [
|
|
240
|
+
"./dist/rpc.d.ts"
|
|
241
|
+
],
|
|
242
|
+
"aim": [
|
|
243
|
+
"./dist/aim.d.ts"
|
|
244
|
+
],
|
|
245
|
+
"netpolicy": [
|
|
246
|
+
"./dist/netpolicy.d.ts"
|
|
247
|
+
],
|
|
248
|
+
"scope": [
|
|
249
|
+
"./dist/scope.d.ts"
|
|
250
|
+
],
|
|
251
|
+
"serve": [
|
|
252
|
+
"./dist/serve.d.ts"
|
|
253
|
+
],
|
|
254
|
+
"telemetry": [
|
|
255
|
+
"./dist/telemetry/index.d.ts"
|
|
256
|
+
],
|
|
257
|
+
"id": [
|
|
258
|
+
"./dist/id/index.d.ts"
|
|
259
|
+
],
|
|
260
|
+
"mcp": [
|
|
261
|
+
"./dist/mcp/index.d.ts"
|
|
262
|
+
],
|
|
263
|
+
"log": [
|
|
264
|
+
"./dist/log.d.ts"
|
|
265
|
+
],
|
|
266
|
+
"completion": [
|
|
267
|
+
"./dist/completion.d.ts"
|
|
268
|
+
],
|
|
269
|
+
"toolspec": [
|
|
270
|
+
"./dist/toolspec.d.ts"
|
|
271
|
+
],
|
|
272
|
+
"completion-values": [
|
|
273
|
+
"./dist/completion-values.d.ts"
|
|
274
|
+
],
|
|
275
|
+
"compliance": [
|
|
276
|
+
"./dist/compliance.d.ts"
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"peerDependencies": {
|
|
281
|
+
"@types/better-sqlite3": "^7.6.13"
|
|
282
|
+
},
|
|
283
|
+
"peerDependenciesMeta": {
|
|
284
|
+
"@types/better-sqlite3": {
|
|
285
|
+
"optional": true
|
|
100
286
|
}
|
|
101
287
|
},
|
|
102
288
|
"dependencies": {
|
|
103
|
-
"@bufbuild/protobuf": "^2.
|
|
104
|
-
"@clack/prompts": "^1.
|
|
105
|
-
"@connectrpc/connect": "^2.
|
|
106
|
-
"@connectrpc/connect-web": "^2.
|
|
107
|
-
"@hop-top/cite": "^0.1.
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
289
|
+
"@bufbuild/protobuf": "^2.16.0",
|
|
290
|
+
"@clack/prompts": "^1.8.1",
|
|
291
|
+
"@connectrpc/connect": "^2.2.0",
|
|
292
|
+
"@connectrpc/connect-web": "^2.2.0",
|
|
293
|
+
"@hop-top/cite": "^0.1.2",
|
|
294
|
+
"@modelcontextprotocol/core": "2.3.1",
|
|
295
|
+
"@modelcontextprotocol/server": "2.3.1",
|
|
296
|
+
"better-sqlite3": "^12.11.1",
|
|
297
|
+
"commander": "15.0.0",
|
|
298
|
+
"csv-stringify": "^6.9.0",
|
|
111
299
|
"eta": "^4.6.0",
|
|
112
|
-
"hono": "^4.
|
|
113
|
-
"js-yaml": "^4.
|
|
114
|
-
"picomatch": "^4.0.
|
|
115
|
-
"pino": "^10.
|
|
116
|
-
"semver": "^7.
|
|
300
|
+
"hono": "^4.13.13",
|
|
301
|
+
"js-yaml": "^4.3.2",
|
|
302
|
+
"picomatch": "^4.0.7",
|
|
303
|
+
"pino": "^10.4.0",
|
|
304
|
+
"semver": "^7.8.5",
|
|
117
305
|
"typeid-js": "^1.2.0",
|
|
118
|
-
"zod": "^4.
|
|
306
|
+
"zod": "^4.6.7"
|
|
119
307
|
},
|
|
120
308
|
"devDependencies": {
|
|
121
309
|
"@types/better-sqlite3": "^7.6.13",
|
|
122
310
|
"@types/js-yaml": "^4.0.9",
|
|
123
|
-
"@types/node": "^
|
|
311
|
+
"@types/node": "^24",
|
|
124
312
|
"@types/picomatch": "^4.0.3",
|
|
125
|
-
"@types/semver": "^7.
|
|
126
|
-
"esbuild": "^0.
|
|
127
|
-
"eslint": "^10.
|
|
313
|
+
"@types/semver": "^7.8.0",
|
|
314
|
+
"esbuild": "^0.28.2",
|
|
315
|
+
"eslint": "^10.12.0",
|
|
128
316
|
"tsup": "^8",
|
|
129
317
|
"typescript": "^5",
|
|
130
|
-
"typescript-eslint": "^8.
|
|
131
|
-
"
|
|
318
|
+
"typescript-eslint": "^8.71.2",
|
|
319
|
+
"vite": "^8.3.4",
|
|
320
|
+
"vitest": "^5.0.4"
|
|
132
321
|
},
|
|
133
322
|
"engines": {
|
|
134
|
-
"node": ">=
|
|
323
|
+
"node": ">=22.12"
|
|
135
324
|
},
|
|
136
325
|
"license": "MIT",
|
|
137
326
|
"scripts": {
|
|
138
|
-
"build": "tsup 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/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/scope.ts src/telemetry/index.ts src/id/index.ts --format cjs --dts",
|
|
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",
|
|
139
328
|
"lint": "eslint src/",
|
|
140
329
|
"lint:fix": "eslint src/ --fix",
|
|
330
|
+
"typecheck": "tsc --noEmit -p tsconfig.json && tsc -p tsconfig.test.json",
|
|
141
331
|
"test": "vitest run"
|
|
142
332
|
}
|
|
143
333
|
}
|
package/src/README.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
# src
|
|
2
2
|
|
|
3
3
|
TypeScript implementation source files.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
| Path | What it is | Start here when |
|
|
8
|
+
|------|------------|-----------------|
|
|
9
|
+
| [`id/`](id/README.md) | TypeID primitive, cross-language wire form | you mint or parse entity ids |
|
|
10
|
+
| [`mcp/`](mcp/README.md) | dual-spec MCP surface, framework-free handler | you serve a Commander tree to MCP clients |
|
|
11
|
+
| [`output/`](output/README.md) | formatter registry, output flag suite, error envelope | a command renders structured data |
|
|
12
|
+
| [`output/formatters/`](output/formatters/README.md) | built-in json, yaml, table, csv, text | you need one formatter or add one |
|
|
13
|
+
| [`router/`](router/README.md) | RouteLLM scorers, `Controller`, Hono handler (not exported) | you route prompts between strong and weak models |
|
|
14
|
+
| [`telemetry/`](telemetry/README.md) | mode gate, install id, consent, redactor, `Client` | you emit usage telemetry |
|
|
15
|
+
| [`triton/`](triton/README.md) | KServe v2 HTTP client (not exported) | you call a Triton-hosted model |
|
|
16
|
+
| [`tui/`](tui/README.md) | status, badge, spinner, progress, prompts | a TTY needs styled widgets |
|
|
17
|
+
| `gen/` | generated Connect stubs, do not edit | never; regenerate instead |
|
|
18
|
+
| top-level modules (`cli.ts`, `serve.ts`, `scope.ts`, ...) | single-file ports, one per package export | see [`../README.md`](../README.md), section "Other modules" |
|