@kweaver-ai/kweaver-sdk 0.8.1 → 0.8.3
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/README.md +40 -52
- package/README.zh.md +41 -46
- package/dist/agent-providers/index.d.ts +7 -0
- package/dist/agent-providers/index.js +5 -0
- package/dist/agent-providers/prompt-template.d.ts +62 -0
- package/dist/agent-providers/prompt-template.js +105 -0
- package/dist/agent-providers/prompts/rubric-judge-v1.prompt.md +51 -0
- package/dist/agent-providers/prompts/within-trace-synthesizer-v1.prompt.md +60 -0
- package/dist/agent-providers/providers/claude-code-subprocess.d.ts +74 -0
- package/dist/agent-providers/providers/claude-code-subprocess.js +259 -0
- package/dist/agent-providers/providers/stub.d.ts +47 -0
- package/dist/agent-providers/providers/stub.js +77 -0
- package/dist/agent-providers/registry.d.ts +45 -0
- package/dist/agent-providers/registry.js +77 -0
- package/dist/agent-providers/types.d.ts +91 -0
- package/dist/agent-providers/types.js +25 -0
- package/dist/api/agent-chat.js +8 -6
- package/dist/api/context-loader.d.ts +1 -0
- package/dist/api/resources.d.ts +94 -0
- package/dist/api/resources.js +166 -0
- package/dist/api/semantic-search.d.ts +5 -0
- package/dist/api/semantic-search.js +5 -0
- package/dist/api/skills.d.ts +75 -2
- package/dist/api/skills.js +108 -12
- package/dist/api/trace.d.ts +5 -0
- package/dist/api/trace.js +4 -0
- package/dist/cli.js +109 -15
- package/dist/client.d.ts +3 -3
- package/dist/client.js +5 -5
- package/dist/commands/agent/mode.d.ts +6 -0
- package/dist/commands/agent/mode.js +75 -0
- package/dist/commands/agent-members.js +27 -11
- package/dist/commands/agent.js +469 -286
- package/dist/commands/auth.js +184 -71
- package/dist/commands/bkn-metric.js +37 -16
- package/dist/commands/bkn-ops.js +164 -86
- package/dist/commands/bkn-query.js +99 -31
- package/dist/commands/bkn-schema.d.ts +3 -3
- package/dist/commands/bkn-schema.js +127 -86
- package/dist/commands/bkn.js +153 -114
- package/dist/commands/call.js +23 -13
- package/dist/commands/config.js +22 -12
- package/dist/commands/context-loader.js +625 -49
- package/dist/commands/dataflow.js +14 -6
- package/dist/commands/ds.js +52 -30
- package/dist/commands/explore.js +18 -15
- package/dist/commands/model.js +53 -42
- package/dist/commands/resource.d.ts +1 -0
- package/dist/commands/{dataview.js → resource.js} +62 -84
- package/dist/commands/skill.d.ts +21 -1
- package/dist/commands/skill.js +567 -43
- package/dist/commands/token.js +11 -0
- package/dist/commands/tool.js +46 -29
- package/dist/commands/toolbox.js +31 -15
- package/dist/commands/trace.d.ts +26 -1
- package/dist/commands/trace.js +515 -15
- package/dist/commands/vega.js +466 -250
- package/dist/help/format.d.ts +65 -0
- package/dist/help/format.js +141 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3 -3
- package/dist/resources/bkn.d.ts +5 -0
- package/dist/resources/bkn.js +5 -0
- package/dist/resources/{dataviews.d.ts → resources.d.ts} +10 -11
- package/dist/resources/{dataviews.js → resources.js} +12 -13
- package/dist/resources/skills.d.ts +17 -1
- package/dist/resources/skills.js +32 -1
- package/dist/trace-ai/diagnose/agent-binding.d.ts +67 -0
- package/dist/trace-ai/diagnose/agent-binding.js +257 -0
- package/dist/trace-ai/diagnose/builtin-rules/tool-retry-intent-mismatch.yaml +68 -0
- package/dist/trace-ai/diagnose/index.d.ts +32 -0
- package/dist/trace-ai/diagnose/index.js +246 -0
- package/dist/trace-ai/diagnose/output-schema-converter.d.ts +24 -0
- package/dist/trace-ai/diagnose/output-schema-converter.js +81 -0
- package/dist/trace-ai/diagnose/query-extractor.d.ts +14 -0
- package/dist/trace-ai/diagnose/query-extractor.js +45 -0
- package/dist/trace-ai/diagnose/report-assembler.d.ts +31 -0
- package/dist/{trace-core → trace-ai}/diagnose/report-assembler.js +19 -9
- package/dist/trace-ai/diagnose/report-markdown.d.ts +18 -0
- package/dist/trace-ai/diagnose/report-markdown.js +192 -0
- package/dist/{trace-core → trace-ai}/diagnose/rule-loader.js +42 -8
- package/dist/{trace-core → trace-ai}/diagnose/schemas.d.ts +77 -2
- package/dist/trace-ai/diagnose/schemas.js +154 -0
- package/dist/trace-ai/diagnose/signal-probe.d.ts +17 -0
- package/dist/trace-ai/diagnose/signal-probe.js +39 -0
- package/dist/trace-ai/diagnose/synthesizer-agent.d.ts +40 -0
- package/dist/trace-ai/diagnose/synthesizer-agent.js +158 -0
- package/dist/{trace-core → trace-ai}/diagnose/trace-shaper.js +1 -0
- package/dist/{trace-core → trace-ai}/diagnose/types.d.ts +55 -6
- package/dist/trace-ai/eval-set/assertion-evaluator.d.ts +29 -0
- package/dist/trace-ai/eval-set/assertion-evaluator.js +100 -0
- package/dist/trace-ai/eval-set/builder.d.ts +36 -0
- package/dist/trace-ai/eval-set/builder.js +126 -0
- package/dist/trace-ai/eval-set/index.d.ts +15 -0
- package/dist/trace-ai/eval-set/index.js +10 -0
- package/dist/trace-ai/eval-set/output-writer.d.ts +27 -0
- package/dist/trace-ai/eval-set/output-writer.js +126 -0
- package/dist/trace-ai/eval-set/query-picker.d.ts +37 -0
- package/dist/trace-ai/eval-set/query-picker.js +147 -0
- package/dist/trace-ai/eval-set/redactor.d.ts +42 -0
- package/dist/trace-ai/eval-set/redactor.js +133 -0
- package/dist/trace-ai/eval-set/rubric-templates/answer-match-reference.prompt.md +19 -0
- package/dist/trace-ai/eval-set/schemas.d.ts +136 -0
- package/dist/trace-ai/eval-set/schemas.js +130 -0
- package/dist/trace-ai/eval-set/semantic-match-provider.d.ts +33 -0
- package/dist/trace-ai/eval-set/semantic-match-provider.js +51 -0
- package/dist/trace-ai/eval-set/test-runner.d.ts +34 -0
- package/dist/trace-ai/eval-set/test-runner.js +153 -0
- package/dist/trace-ai/eval-set/types.d.ts +46 -0
- package/dist/trace-ai/eval-set/types.js +8 -0
- package/dist/trace-ai/exp/bundle-writer.d.ts +10 -0
- package/dist/trace-ai/exp/bundle-writer.js +54 -0
- package/dist/trace-ai/exp/claude-binary.d.ts +5 -0
- package/dist/trace-ai/exp/claude-binary.js +30 -0
- package/dist/trace-ai/exp/coordinator.d.ts +45 -0
- package/dist/trace-ai/exp/coordinator.js +203 -0
- package/dist/trace-ai/exp/eval-runner.d.ts +14 -0
- package/dist/trace-ai/exp/eval-runner.js +47 -0
- package/dist/trace-ai/exp/exp-store/abort-signal.d.ts +3 -0
- package/dist/trace-ai/exp/exp-store/abort-signal.js +27 -0
- package/dist/trace-ai/exp/exp-store/candidate-lineage-yaml.d.ts +4 -0
- package/dist/trace-ai/exp/exp-store/candidate-lineage-yaml.js +37 -0
- package/dist/trace-ai/exp/exp-store/events-jsonl.d.ts +17 -0
- package/dist/trace-ai/exp/exp-store/events-jsonl.js +60 -0
- package/dist/trace-ai/exp/exp-store/exp-registry.d.ts +6 -0
- package/dist/trace-ai/exp/exp-store/exp-registry.js +41 -0
- package/dist/trace-ai/exp/exp-store/index.d.ts +46 -0
- package/dist/trace-ai/exp/exp-store/index.js +59 -0
- package/dist/trace-ai/exp/exp-store/lock.d.ts +3 -0
- package/dist/trace-ai/exp/exp-store/lock.js +73 -0
- package/dist/trace-ai/exp/exp-store/mission-md.d.ts +3 -0
- package/dist/trace-ai/exp/exp-store/mission-md.js +37 -0
- package/dist/trace-ai/exp/exp-store/readme-template.d.ts +5 -0
- package/dist/trace-ai/exp/exp-store/readme-template.js +25 -0
- package/dist/trace-ai/exp/exp-store/round-yaml.d.ts +3 -0
- package/dist/trace-ai/exp/exp-store/round-yaml.js +33 -0
- package/dist/trace-ai/exp/index.d.ts +8 -0
- package/dist/trace-ai/exp/index.js +238 -0
- package/dist/trace-ai/exp/info.d.ts +35 -0
- package/dist/trace-ai/exp/info.js +120 -0
- package/dist/trace-ai/exp/patch/agent-config.d.ts +1 -0
- package/dist/trace-ai/exp/patch/agent-config.js +26 -0
- package/dist/trace-ai/exp/patch/index.d.ts +2 -0
- package/dist/trace-ai/exp/patch/index.js +13 -0
- package/dist/trace-ai/exp/patch/skill.d.ts +1 -0
- package/dist/trace-ai/exp/patch/skill.js +24 -0
- package/dist/trace-ai/exp/providers/synthesizer-client.d.ts +14 -0
- package/dist/trace-ai/exp/providers/synthesizer-client.js +39 -0
- package/dist/trace-ai/exp/providers/triage-client.d.ts +19 -0
- package/dist/trace-ai/exp/providers/triage-client.js +51 -0
- package/dist/trace-ai/exp/schemas.d.ts +147 -0
- package/dist/trace-ai/exp/schemas.js +50 -0
- package/dist/trace-ai/exp/scoring.d.ts +2 -0
- package/dist/trace-ai/exp/scoring.js +46 -0
- package/dist/trace-ai/scan/aggregator.d.ts +20 -0
- package/dist/trace-ai/scan/aggregator.js +26 -0
- package/dist/trace-ai/scan/artifacts/paths.d.ts +12 -0
- package/dist/trace-ai/scan/artifacts/paths.js +18 -0
- package/dist/trace-ai/scan/artifacts/writer.d.ts +67 -0
- package/dist/trace-ai/scan/artifacts/writer.js +96 -0
- package/dist/trace-ai/scan/batched-rubric.d.ts +55 -0
- package/dist/trace-ai/scan/batched-rubric.js +159 -0
- package/dist/trace-ai/scan/cross-trace-synthesizer.d.ts +24 -0
- package/dist/trace-ai/scan/cross-trace-synthesizer.js +93 -0
- package/dist/trace-ai/scan/index.d.ts +31 -0
- package/dist/trace-ai/scan/index.js +390 -0
- package/dist/trace-ai/scan/prompts/builtin/cross-trace-synthesizer-v1.prompt.md +44 -0
- package/dist/trace-ai/scan/prompts/builtin/rubric-judge-batch-v1.prompt.md +44 -0
- package/dist/trace-ai/scan/runner.d.ts +25 -0
- package/dist/trace-ai/scan/runner.js +42 -0
- package/dist/trace-ai/scan/sampler.d.ts +18 -0
- package/dist/trace-ai/scan/sampler.js +81 -0
- package/dist/trace-ai/scan/scan-summary-markdown.d.ts +2 -0
- package/dist/trace-ai/scan/scan-summary-markdown.js +71 -0
- package/dist/trace-ai/scan/scan-summary-schema.d.ts +73 -0
- package/dist/trace-ai/scan/scan-summary-schema.js +61 -0
- package/dist/trace-ai/scan/single-agent-validator.d.ts +23 -0
- package/dist/trace-ai/scan/single-agent-validator.js +42 -0
- package/dist/trace-ai/scan/traces-list-parser.d.ts +15 -0
- package/dist/trace-ai/scan/traces-list-parser.js +46 -0
- package/package.json +2 -2
- package/dist/api/dataviews.d.ts +0 -117
- package/dist/api/dataviews.js +0 -265
- package/dist/commands/dataview.d.ts +0 -8
- package/dist/trace-core/diagnose/index.d.ts +0 -9
- package/dist/trace-core/diagnose/index.js +0 -104
- package/dist/trace-core/diagnose/report-assembler.d.ts +0 -12
- package/dist/trace-core/diagnose/schemas.js +0 -94
- package/dist/trace-core/diagnose/signal-probe.d.ts +0 -5
- package/dist/trace-core/diagnose/signal-probe.js +0 -21
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/excessive-tool-calls-per-turn.d.ts +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/excessive-tool-calls-per-turn.js +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/excessive-tool-calls-per-turn.yaml +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/llm-response-truncated-no-continue.d.ts +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/llm-response-truncated-no-continue.js +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/llm-response-truncated-no-continue.yaml +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/register.d.ts +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/register.js +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/retrieval-empty-no-fallback.d.ts +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/retrieval-empty-no-fallback.js +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/retrieval-empty-no-fallback.yaml +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/tool-error-swallowed.d.ts +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/tool-error-swallowed.js +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/tool-error-swallowed.yaml +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/tool-loop-no-state-change.d.ts +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/tool-loop-no-state-change.js +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/builtin-rules/tool-loop-no-state-change.yaml +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/predicate-registry.d.ts +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/predicate-registry.js +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/rule-loader.d.ts +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/synthesizer-template.d.ts +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/synthesizer-template.js +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/trace-shaper.d.ts +0 -0
- /package/dist/{trace-core → trace-ai}/diagnose/types.js +0 -0
package/dist/commands/token.js
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import { ensureValidToken, formatHttpError } from "../auth/oauth.js";
|
|
2
|
+
import { renderHelp } from "../help/format.js";
|
|
3
|
+
const HELP = renderHelp({
|
|
4
|
+
tagline: "Print the current access token (auto-refresh first if needed)",
|
|
5
|
+
usage: "kweaver token",
|
|
6
|
+
inheritedFlags: "--base-url, --token, --user, --help",
|
|
7
|
+
examples: ["kweaver token", "kweaver --user alice token"],
|
|
8
|
+
});
|
|
2
9
|
export function parseTokenArgs(args) {
|
|
3
10
|
if (args.length > 0) {
|
|
4
11
|
throw new Error("Usage: kweaver token");
|
|
5
12
|
}
|
|
6
13
|
}
|
|
7
14
|
export async function runTokenCommand(args) {
|
|
15
|
+
if (args[0] === "--help" || args[0] === "-h") {
|
|
16
|
+
console.log(HELP);
|
|
17
|
+
return 0;
|
|
18
|
+
}
|
|
8
19
|
try {
|
|
9
20
|
parseTokenArgs(args);
|
|
10
21
|
}
|
package/dist/commands/tool.js
CHANGED
|
@@ -3,35 +3,52 @@ import { ensureValidToken, formatHttpError, with401RefreshRetry } from "../auth/
|
|
|
3
3
|
import { debugTool, executeTool, listTools, setToolStatuses, uploadTool } from "../api/toolboxes.js";
|
|
4
4
|
import { formatCallOutput } from "./call.js";
|
|
5
5
|
import { resolveBusinessDomain } from "../config/store.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
6
|
+
import { renderHelp } from "../help/format.js";
|
|
7
|
+
const HELP = renderHelp({
|
|
8
|
+
tagline: "Tools inside a toolbox — upload OpenAPI specs, enable/disable, execute",
|
|
9
|
+
usage: "kweaver tool <subcommand> --toolbox <box-id> [flags]",
|
|
10
|
+
sections: [
|
|
11
|
+
{
|
|
12
|
+
title: "AVAILABLE COMMANDS",
|
|
13
|
+
items: [
|
|
14
|
+
{ name: "upload", desc: "Upload an OpenAPI spec file as a tool" },
|
|
15
|
+
{ name: "list", desc: "List tools in a toolbox" },
|
|
16
|
+
{ name: "enable", desc: "Enable one or more tools" },
|
|
17
|
+
{ name: "disable", desc: "Disable one or more tools" },
|
|
18
|
+
{ name: "execute", desc: "Invoke a published+enabled tool" },
|
|
19
|
+
{ name: "debug", desc: "Invoke a tool (works on draft/disabled too)" },
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
flags: [
|
|
24
|
+
{
|
|
25
|
+
title: "Execute / debug",
|
|
26
|
+
flags: [
|
|
27
|
+
{ name: "--body '<json>'", desc: "Request body" },
|
|
28
|
+
{ name: "--body-file <path>", desc: "Request body from file" },
|
|
29
|
+
{ name: "--header '<json>'", desc: "Headers map (Authorization auto-injected if omitted; pass {} to send none)" },
|
|
30
|
+
{ name: "--query '<json>'", desc: "Query params map" },
|
|
31
|
+
{ name: "--path '<json>'", desc: "Path params for OpenAPI placeholders, e.g. {\"id\":\"...\"}" },
|
|
32
|
+
{ name: "--timeout <seconds>", desc: "Per-call timeout (backend default applies when omitted)" },
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: "Common",
|
|
37
|
+
flags: [
|
|
38
|
+
{ name: "-bd, --biz-domain <s>", desc: "Business domain (default: bd_public)" },
|
|
39
|
+
{ name: "--pretty", desc: "Pretty-print JSON (default)" },
|
|
40
|
+
{ name: "--compact", desc: "Single-line JSON (pipeline-friendly)" },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
inheritedFlags: "--base-url, --token, --user, --help",
|
|
45
|
+
examples: [
|
|
46
|
+
"kweaver tool upload --toolbox <box-id> spec.yaml",
|
|
47
|
+
"kweaver tool list --toolbox <box-id>",
|
|
48
|
+
"kweaver tool execute --toolbox <box-id> <tool-id> --body '{\"key\":\"value\"}'",
|
|
49
|
+
],
|
|
50
|
+
learnMore: ["Use `kweaver tool <subcommand> --help` for flag details"],
|
|
51
|
+
});
|
|
35
52
|
export async function runToolCommand(args) {
|
|
36
53
|
const [subcommand, ...rest] = args;
|
|
37
54
|
if (!subcommand || subcommand === "--help" || subcommand === "-h") {
|
package/dist/commands/toolbox.js
CHANGED
|
@@ -4,22 +4,38 @@ import { ensureValidToken, formatHttpError, with401RefreshRetry } from "../auth/
|
|
|
4
4
|
import { createToolbox, deleteToolbox, exportConfig, importConfig, listToolboxes, setToolboxStatus, } from "../api/toolboxes.js";
|
|
5
5
|
import { formatCallOutput } from "./call.js";
|
|
6
6
|
import { resolveBusinessDomain } from "../config/store.js";
|
|
7
|
+
import { renderHelp } from "../help/format.js";
|
|
7
8
|
const VALID_IMPEX_TYPES = new Set(["toolbox", "mcp", "operator"]);
|
|
8
|
-
const HELP =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
const HELP = renderHelp({
|
|
10
|
+
tagline: "Agent toolbox lifecycle — create, list, publish, delete, export/import",
|
|
11
|
+
usage: "kweaver toolbox <subcommand> [flags]",
|
|
12
|
+
sections: [
|
|
13
|
+
{
|
|
14
|
+
title: "AVAILABLE COMMANDS",
|
|
15
|
+
items: [
|
|
16
|
+
{ name: "create", desc: "Create a new toolbox" },
|
|
17
|
+
{ name: "list", desc: "List toolboxes" },
|
|
18
|
+
{ name: "publish", desc: "Publish a toolbox (status=published)" },
|
|
19
|
+
{ name: "unpublish", desc: "Unpublish (status=draft)" },
|
|
20
|
+
{ name: "delete", desc: "Delete a toolbox" },
|
|
21
|
+
{ name: "export", desc: "Export toolbox config (.adp JSON)" },
|
|
22
|
+
{ name: "import", desc: "Import a previously exported config" },
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
flags: [
|
|
27
|
+
{ name: "-bd, --biz-domain <s>", desc: "Business domain (default: bd_public)" },
|
|
28
|
+
{ name: "--pretty", desc: "Pretty-print JSON (default)" },
|
|
29
|
+
{ name: "--compact", desc: "Single-line JSON (pipeline-friendly)" },
|
|
30
|
+
],
|
|
31
|
+
inheritedFlags: "--base-url, --token, --user, --help",
|
|
32
|
+
examples: [
|
|
33
|
+
"kweaver toolbox create --name MyBox --service-url https://svc.example.com",
|
|
34
|
+
"kweaver toolbox list --keyword analytics",
|
|
35
|
+
"kweaver toolbox export <box-id> -o box.adp",
|
|
36
|
+
],
|
|
37
|
+
learnMore: ["Use `kweaver toolbox <subcommand> --help` for flag details"],
|
|
38
|
+
});
|
|
23
39
|
export async function runToolboxCommand(args) {
|
|
24
40
|
const [subcommand, ...rest] = args;
|
|
25
41
|
if (!subcommand || subcommand === "--help" || subcommand === "-h") {
|
package/dist/commands/trace.d.ts
CHANGED
|
@@ -1,14 +1,39 @@
|
|
|
1
1
|
export interface ParsedTraceArgs {
|
|
2
|
-
subcommand: "diagnose" | "rules-validate" | "help";
|
|
2
|
+
subcommand: "diagnose" | "rules-validate" | "eval-set-build" | "eval-set-test" | "schema-validate" | "help";
|
|
3
|
+
mode?: "single" | "batch";
|
|
3
4
|
conversationId?: string;
|
|
5
|
+
traces?: string;
|
|
4
6
|
rulePath?: string;
|
|
5
7
|
out: string | null;
|
|
6
8
|
rulesDir: string | null;
|
|
7
9
|
noBuiltin: boolean;
|
|
8
10
|
noLlm: boolean;
|
|
11
|
+
noArtifacts: boolean;
|
|
12
|
+
maxParallel: number;
|
|
13
|
+
format: 'yaml' | 'markdown' | 'both' | null;
|
|
14
|
+
lang: 'en' | 'zh' | null;
|
|
9
15
|
baseUrl: string | null;
|
|
10
16
|
token: string | null;
|
|
11
17
|
businessDomain: string | null;
|
|
18
|
+
queriesPath?: string;
|
|
19
|
+
diagnosisPath?: string;
|
|
20
|
+
onConflict?: "fail" | "skip" | "overwrite";
|
|
21
|
+
redactionRules?: string;
|
|
22
|
+
evalSetId?: string;
|
|
23
|
+
schemaValidatePath?: string;
|
|
24
|
+
schemaKind?: string;
|
|
25
|
+
evalSetPath?: string;
|
|
26
|
+
candidateAgentId?: string;
|
|
27
|
+
candidateAgentVersion?: string;
|
|
12
28
|
}
|
|
13
29
|
export declare function parseTraceArgs(argv: string[]): ParsedTraceArgs;
|
|
14
30
|
export declare function runTraceCommand(rest: string[]): Promise<number>;
|
|
31
|
+
export declare class SchemaKindRequiredError extends Error {
|
|
32
|
+
constructor(filePath: string);
|
|
33
|
+
}
|
|
34
|
+
export declare function inferKind(filePath: string): string | null;
|
|
35
|
+
export interface RunSchemaValidateOpts {
|
|
36
|
+
filePath: string;
|
|
37
|
+
kind: string | undefined;
|
|
38
|
+
}
|
|
39
|
+
export declare function runSchemaValidate(opts: RunSchemaValidateOpts): Promise<number>;
|