@aid-framework/cli 0.1.63 → 0.1.65
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/dist/.tsbuildinfo +1 -1
- package/dist/commands/cost.d.ts +14 -6
- package/dist/commands/cost.d.ts.map +1 -1
- package/dist/commands/cost.js +74 -89
- package/dist/commands/cost.js.map +1 -1
- package/dist/commands/trace.d.ts +31 -0
- package/dist/commands/trace.d.ts.map +1 -0
- package/dist/commands/trace.js +240 -0
- package/dist/commands/trace.js.map +1 -0
- package/dist/diagnostics.d.ts +6 -0
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/diagnostics.js +11 -0
- package/dist/diagnostics.js.map +1 -1
- package/dist/index.d.ts +8 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +19 -1
- package/dist/main.js.map +1 -1
- package/dist/output.d.ts +12 -0
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +29 -0
- package/dist/output.js.map +1 -1
- package/dist/trace-dir.d.ts +75 -0
- package/dist/trace-dir.d.ts.map +1 -0
- package/dist/trace-dir.js +139 -0
- package/dist/trace-dir.js.map +1 -0
- package/dist/trace.d.ts +71 -0
- package/dist/trace.d.ts.map +1 -1
- package/dist/trace.js +157 -0
- package/dist/trace.js.map +1 -1
- package/package.json +6 -6
package/dist/diagnostics.js
CHANGED
|
@@ -62,6 +62,17 @@ export const CLI_DIAGNOSTIC_CODES = {
|
|
|
62
62
|
traceUnreadable: 'cli/trace-unreadable',
|
|
63
63
|
traceMalformed: 'cli/trace-malformed',
|
|
64
64
|
traceEmpty: 'cli/trace-empty',
|
|
65
|
+
// `--budget` turns the report into a ceiling: a value that is not a non-negative
|
|
66
|
+
// number is a wrong invocation (`2`), and measured spend above it is a verdict on the
|
|
67
|
+
// traces (`1`) rather than on the project.
|
|
68
|
+
costBudgetInvalid: 'cli/cost-budget-invalid',
|
|
69
|
+
costOverBudget: 'cli/cost-over-budget',
|
|
70
|
+
// `aid trace` selects one run out of those files. A selector that matches nothing, or
|
|
71
|
+
// more than one, is a wrong invocation (`2`), not a verdict on the project.
|
|
72
|
+
traceRunNotFound: 'cli/trace-run-not-found',
|
|
73
|
+
traceRunAmbiguous: 'cli/trace-run-ambiguous',
|
|
74
|
+
traceNoRuns: 'cli/trace-no-runs',
|
|
75
|
+
traceFlagsConflict: 'cli/trace-flags-conflict',
|
|
65
76
|
// `aid dev` starts the application's own server, so every failure here is about the
|
|
66
77
|
// environment it needs or the address it was given -- not about the spec, which `gen`
|
|
67
78
|
// has already validated by the time any of these can fire.
|
package/dist/diagnostics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAKzE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,cAAc,EAAE,qBAAqB;IACrC,aAAa,EAAE,oBAAoB;IACnC,mBAAmB,EAAE,2BAA2B;IAChD,aAAa,EAAE,oBAAoB;IACnC,aAAa,EAAE,qBAAqB;IACpC,kBAAkB,EAAE,0BAA0B;IAC9C,iBAAiB,EAAE,wBAAwB;IAC3C,iBAAiB,EAAE,wBAAwB;IAC3C,iBAAiB,EAAE,yBAAyB;IAC5C,oBAAoB,EAAE,4BAA4B;IAClD,iBAAiB,EAAE,wBAAwB;IAC3C,YAAY,EAAE,mBAAmB;IACjC,YAAY,EAAE,mBAAmB;IACjC,kFAAkF;IAClF,8EAA8E;IAC9E,eAAe,EAAE,sBAAsB;IACvC,kBAAkB,EAAE,yBAAyB;IAC7C,eAAe,EAAE,sBAAsB;IACvC,YAAY,EAAE,mBAAmB;IACjC,eAAe,EAAE,sBAAsB;IACvC,aAAa,EAAE,oBAAo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@@
|
|
|
1
1
|
/**
|
|
2
|
-
* `@aid-framework/cli` - the `aid` command: init, validate, gen, dev, ingest, eval, cost,
|
|
2
|
+
* `@aid-framework/cli` - the `aid` command: init, validate, gen, dev, ingest, eval, cost, trace,
|
|
3
|
+
* doctor, eject and infra.
|
|
3
4
|
*
|
|
4
5
|
* The CLI is glue. Every judgement it reports -- whether a spec parses, what the IR is,
|
|
5
6
|
* what a target can emit, which generated file was hand-edited, whether an eval regressed
|
|
@@ -32,6 +33,8 @@ export type { InitOptions } from './commands/init.js';
|
|
|
32
33
|
export { init, projectNameFor, starterSpec } from './commands/init.js';
|
|
33
34
|
export type { MigrateOptions } from './commands/migrate.js';
|
|
34
35
|
export { migrate } from './commands/migrate.js';
|
|
36
|
+
export type { TraceOptions } from './commands/trace.js';
|
|
37
|
+
export { trace } from './commands/trace.js';
|
|
35
38
|
export type { ValidateOptions } from './commands/validate.js';
|
|
36
39
|
export { validate } from './commands/validate.js';
|
|
37
40
|
export type { CliContext, Spawn, SpawnOptions, SpawnResult } from './context.js';
|
|
@@ -53,8 +56,10 @@ export { compile, lowerSpec, provenanceFor, readManifest, readSpec } from './pip
|
|
|
53
56
|
export { DEV_PROBE, discoverInterpreter, INTERPRETERS, interpreterCommand, invoke, } from './python.js';
|
|
54
57
|
export type { Target, TargetDev } from './targets.js';
|
|
55
58
|
export { DEFAULT_SPEC_PATH, DEFAULT_TARGET, resolveTarget, TARGETS, targetCapabilities, targetNames, unknownTargetDiagnostic, } from './targets.js';
|
|
56
|
-
export type { CostSummary, Latency, ModelSpend, ParsedTrace, TraceSpan } from './trace.js';
|
|
57
|
-
export { parseSince, parseTraceLines, summariseSpans } from './trace.js';
|
|
59
|
+
export type { CostSummary, Latency, ModelSpend, ParsedTrace, SpanFacts, SpanRow, TraceRun, TraceSpan, } from './trace.js';
|
|
60
|
+
export { childrenOf, factsOf, parseSince, parseTraceLines, runsOf, summariseSpans, treeRowsOf, } from './trace.js';
|
|
61
|
+
export type { TraceDir } from './trace-dir.js';
|
|
62
|
+
export { readTraceDir, resolveTraceDir, TRACE_DIR_ENV } from './trace-dir.js';
|
|
58
63
|
export type { CommandSpec } from './usage.js';
|
|
59
64
|
export { commandUsage, globalUsage } from './usage.js';
|
|
60
65
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC9E,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,YAAY,EAAE,YAAY,EAAE,MAAM,qBA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,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `@aid-framework/cli` - the `aid` command: init, validate, gen, dev, ingest, eval, cost,
|
|
2
|
+
* `@aid-framework/cli` - the `aid` command: init, validate, gen, dev, ingest, eval, cost, trace,
|
|
3
|
+
* doctor, eject and infra.
|
|
3
4
|
*
|
|
4
5
|
* The CLI is glue. Every judgement it reports -- whether a spec parses, what the IR is,
|
|
5
6
|
* what a target can emit, which generated file was hand-edited, whether an eval regressed
|
|
@@ -21,6 +22,7 @@ export { infra } from './commands/infra.js';
|
|
|
21
22
|
export { ingest } from './commands/ingest.js';
|
|
22
23
|
export { init, projectNameFor, starterSpec } from './commands/init.js';
|
|
23
24
|
export { migrate } from './commands/migrate.js';
|
|
25
|
+
export { trace } from './commands/trace.js';
|
|
24
26
|
export { validate } from './commands/validate.js';
|
|
25
27
|
export { createContext } from './context.js';
|
|
26
28
|
export { CLI_DIAGNOSTIC_CODES, cliError, cliWarning } from './diagnostics.js';
|
|
@@ -33,6 +35,7 @@ export { absolutePath, parentPath } from './paths.js';
|
|
|
33
35
|
export { compile, lowerSpec, provenanceFor, readManifest, readSpec } from './pipeline.js';
|
|
34
36
|
export { DEV_PROBE, discoverInterpreter, INTERPRETERS, interpreterCommand, invoke, } from './python.js';
|
|
35
37
|
export { DEFAULT_SPEC_PATH, DEFAULT_TARGET, resolveTarget, TARGETS, targetCapabilities, targetNames, unknownTargetDiagnostic, } from './targets.js';
|
|
36
|
-
export { parseSince, parseTraceLines, summariseSpans } from './trace.js';
|
|
38
|
+
export { childrenOf, factsOf, parseSince, parseTraceLines, runsOf, summariseSpans, treeRowsOf, } from './trace.js';
|
|
39
|
+
export { readTraceDir, resolveTraceDir, TRACE_DIR_ENV } from './trace-dir.js';
|
|
37
40
|
export { commandUsage, globalUsage } from './usage.js';
|
|
38
41
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE9E,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9F,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAWtD,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,MAAM,GACP,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,OAAO,EACP,kBAAkB,EAClB,WAAW,EACX,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAWtB,OAAO,EACL,UAAU,EACV,OAAO,EACP,UAAU,EACV,eAAe,EACf,MAAM,EACN,cAAc,EACd,UAAU,GACX,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE9E,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAejD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG9C,UAAU,OAAQ,SAAQ,WAAW;IACnC,QAAQ,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,KAAK,cAAc,CAAC;IAC7E,kEAAkE;IAClE,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CAClC;AAQD,eAAO,MAAM,QAAQ,EAAE,SAAS,OAAO,EA8OtC,CAAC;AA0BF,wBAAgB,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,GAAG,QAAQ,CA6C1E"}
|
package/dist/main.js
CHANGED
|
@@ -23,6 +23,7 @@ import { infra } from './commands/infra.js';
|
|
|
23
23
|
import { ingest } from './commands/ingest.js';
|
|
24
24
|
import { init } from './commands/init.js';
|
|
25
25
|
import { migrate } from './commands/migrate.js';
|
|
26
|
+
import { trace } from './commands/trace.js';
|
|
26
27
|
import { validate } from './commands/validate.js';
|
|
27
28
|
import { EXIT_OK, EXIT_USAGE } from './exit.js';
|
|
28
29
|
import { emit } from './output.js';
|
|
@@ -164,14 +165,31 @@ export const COMMANDS = [
|
|
|
164
165
|
{
|
|
165
166
|
name: 'cost',
|
|
166
167
|
summary: 'report cost and latency from the local trace sink',
|
|
167
|
-
usage: 'cost [dir] [--since <date>]',
|
|
168
|
+
usage: 'cost [dir] [--since <date>] [--budget <usd>]',
|
|
168
169
|
flags: [
|
|
169
170
|
valueFlag('since', 'date', 'only count spans that started at or after this date (YYYY-MM-DD or an ISO 8601 instant)'),
|
|
171
|
+
valueFlag('budget', 'usd', 'fail when the measured cost exceeds this ceiling'),
|
|
170
172
|
JSON_FLAG,
|
|
171
173
|
],
|
|
172
174
|
run: (context, args) => cost(context, {
|
|
173
175
|
dir: args.positionals[0],
|
|
174
176
|
since: args.values.get('since'),
|
|
177
|
+
budget: args.values.get('budget'),
|
|
178
|
+
}),
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: 'trace',
|
|
182
|
+
summary: 'inspect a traced run: the span tree, timings, models, tokens and cost',
|
|
183
|
+
usage: 'trace [run] [--dir <dir>] [--all]',
|
|
184
|
+
flags: [
|
|
185
|
+
valueFlag('dir', 'dir', 'the trace directory to read (default: $AID_TRACE_DIR)'),
|
|
186
|
+
booleanFlag('all', 'print every run in the directory, not just the run list'),
|
|
187
|
+
JSON_FLAG,
|
|
188
|
+
],
|
|
189
|
+
run: (context, args) => trace(context, {
|
|
190
|
+
run: args.positionals[0],
|
|
191
|
+
dir: args.values.get('dir'),
|
|
192
|
+
all: args.booleans.has('all'),
|
|
175
193
|
}),
|
|
176
194
|
},
|
|
177
195
|
{
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,MAA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AC;IACjB,CAAC;IAED,gFAAgF;IAChF,yFAAyF;IACzF,kFAAkF;IAClF,gEAAgE;IAChE,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,CAAC,CAAC;IACnD,IAAI,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,cAAc,EAAE,CAAC;QACpD,wFAAwF;QACxF,qFAAqF;QACrF,MAAM,KAAK,GAAG,cAAc,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,cAAc,YAAY,CAAC;QAChF,OAAO,UAAU,CACf,OAAO,EACP,SAAS,OAAO,CAAC,IAAI,oBAAoB,KAAK,SAAS,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EACvF,YAAY,CAAC,OAAO,CAAC,CACtB,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9C,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAChE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC"}
|
package/dist/output.d.ts
CHANGED
|
@@ -35,6 +35,18 @@ export interface OutcomeInit {
|
|
|
35
35
|
readonly text?: string;
|
|
36
36
|
readonly stderr?: string;
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Group digits so a reader can count them: `1234567` becomes `1,234,567`.
|
|
40
|
+
*
|
|
41
|
+
* `toLocaleString` would follow the host's locale, which makes a golden test — and a
|
|
42
|
+
* pasted CI log — depend on where the machine thinks it is. This does not.
|
|
43
|
+
*/
|
|
44
|
+
export declare function group(value: number): string;
|
|
45
|
+
/**
|
|
46
|
+
* Money, rounded for reading. `digits` is the default of two cents for a total, and callers
|
|
47
|
+
* showing a single cheap model call pass more, because `$0.00` for a real charge is a lie.
|
|
48
|
+
*/
|
|
49
|
+
export declare function usd(value: number, digits?: number): string;
|
|
38
50
|
export declare function outcome(init: OutcomeInit): CommandOutcome;
|
|
39
51
|
/**
|
|
40
52
|
* Print an outcome and hand back its exit code.
|
package/dist/output.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAG1C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,6BAA6B;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,QAAQ,CAAC,WAAW,EAAE,SAAS,aAAa,EAAE,CAAC;IAC/C,yEAAyE;IACzE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;IAChD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAA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AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAS3C;AAED;;;GAGG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,MAAM,CAOrD;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,cAAc,CAczD;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,GAAG,QAAQ,CAa1F"}
|
package/dist/output.js
CHANGED
|
@@ -9,6 +9,35 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { formatDiagnostics } from '@aid-framework/spec';
|
|
11
11
|
import { EXIT_OK } from './exit.js';
|
|
12
|
+
/**
|
|
13
|
+
* Group digits so a reader can count them: `1234567` becomes `1,234,567`.
|
|
14
|
+
*
|
|
15
|
+
* `toLocaleString` would follow the host's locale, which makes a golden test — and a
|
|
16
|
+
* pasted CI log — depend on where the machine thinks it is. This does not.
|
|
17
|
+
*/
|
|
18
|
+
export function group(value) {
|
|
19
|
+
const digits = String(Math.trunc(Math.abs(value)));
|
|
20
|
+
const sign = value < 0 ? '-' : '';
|
|
21
|
+
let out = '';
|
|
22
|
+
for (let index = 0; index < digits.length; index += 1) {
|
|
23
|
+
if (index > 0 && (digits.length - index) % 3 === 0)
|
|
24
|
+
out += ',';
|
|
25
|
+
out += digits[index];
|
|
26
|
+
}
|
|
27
|
+
return sign + out;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Money, rounded for reading. `digits` is the default of two cents for a total, and callers
|
|
31
|
+
* showing a single cheap model call pass more, because `$0.00` for a real charge is a lie.
|
|
32
|
+
*/
|
|
33
|
+
export function usd(value, digits = 2) {
|
|
34
|
+
const scale = 10 ** digits;
|
|
35
|
+
const rounded = Math.round(Math.abs(value) * scale) / scale;
|
|
36
|
+
const [whole = '0', fraction = ''] = rounded.toFixed(digits).split('.');
|
|
37
|
+
const negative = value < 0 && rounded !== 0;
|
|
38
|
+
const tail = digits === 0 ? '' : `.${fraction}`;
|
|
39
|
+
return `${negative ? '-' : ''}$${group(Number(whole))}${tail}`;
|
|
40
|
+
}
|
|
12
41
|
export function outcome(init) {
|
|
13
42
|
const diagnostics = init.diagnostics ?? [];
|
|
14
43
|
return {
|
package/dist/output.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIxD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6BpC,MAAM,UAAU,OAAO,CAAC,IAAiB;IACvC,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC;IAC3C,OAAO;QACL,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,WAAW;QACX,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE;QACrB,GAAG,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;QAC7D,MAAM,EAAE;YACN,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,EAAE,EAAE,IAAI,CAAC,QAAQ,KAAK,OAAO;YAC7B,GAAG,IAAI,CAAC,MAAM;YACd,WAAW;SACZ;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,IAAI,CAAC,OAAmB,EAAE,IAAa,EAAE,OAAuB;IAC9E,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;I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BAAiB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,OAAO,CAAC,QAAQ,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Finding the directory `aid cost` and `aid trace` both read.
|
|
3
|
+
*
|
|
4
|
+
* The two commands answer different questions about the same files, so they must agree
|
|
5
|
+
* on which files those are. Discovery lives here rather than in either command: if one
|
|
6
|
+
* of them grew its own default, `cost` could report a directory `trace` refused, and
|
|
7
|
+
* nothing would explain the difference.
|
|
8
|
+
*
|
|
9
|
+
* Both outcomes are wrong invocations, so both exit `2`: no directory was named and
|
|
10
|
+
* `AID_TRACE_DIR` is unset, or the named path is not a directory. Neither says anything
|
|
11
|
+
* about the project, which is why neither is `1`.
|
|
12
|
+
*/
|
|
13
|
+
import type { CliContext } from './context.js';
|
|
14
|
+
import type { CommandOutcome } from './output.js';
|
|
15
|
+
import type { TraceSpan } from './trace.js';
|
|
16
|
+
/** The variable the runtimes read. Named here, not imported, because it is a runtime knob. */
|
|
17
|
+
export declare const TRACE_DIR_ENV = "AID_TRACE_DIR";
|
|
18
|
+
/** Everything one trace directory yielded, with failures counted rather than thrown. */
|
|
19
|
+
export interface TraceDir {
|
|
20
|
+
/** The `.jsonl` entries, sorted, so two reads of one directory agree on order. */
|
|
21
|
+
readonly files: readonly string[];
|
|
22
|
+
readonly spans: readonly TraceSpan[];
|
|
23
|
+
/** Lines that were not a span. */
|
|
24
|
+
readonly skipped: number;
|
|
25
|
+
/** Files that existed but could not be read. */
|
|
26
|
+
readonly unreadable: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Read every `.jsonl` file directly inside `absolute`.
|
|
30
|
+
*
|
|
31
|
+
* A file that cannot be read is **counted and skipped**, for the same reason a bad line
|
|
32
|
+
* is: one unreadable file must not hide the spans in the others, and the caller decides
|
|
33
|
+
* whether the count fails the run. Subdirectories are ignored -- the sink writes flat
|
|
34
|
+
* files, and walking a tree would silently mix in traces the caller did not point at.
|
|
35
|
+
*
|
|
36
|
+
* The exception is the directory itself: `readdirSync` throws when it is missing or is
|
|
37
|
+
* not a directory, and the caller has to have checked that before it can say anything
|
|
38
|
+
* useful about it.
|
|
39
|
+
*/
|
|
40
|
+
export declare function readTraceDir(absolute: string): TraceDir;
|
|
41
|
+
/** A directory relative to the cwd when it is below it, else the absolute path. */
|
|
42
|
+
export declare function displayPath(cwd: string, absolute: string): string;
|
|
43
|
+
export type TraceDirResolution = {
|
|
44
|
+
readonly kind: 'ok';
|
|
45
|
+
readonly absolute: string;
|
|
46
|
+
readonly shown: string;
|
|
47
|
+
} | {
|
|
48
|
+
readonly kind: 'refused';
|
|
49
|
+
readonly outcome: CommandOutcome;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Where the directory is, before asking whether it exists.
|
|
53
|
+
*
|
|
54
|
+
* Split from the existence check so `cost` can validate `--since` in the order it always
|
|
55
|
+
* has: a missing directory is reported first, then a bad date, then a path that is not a
|
|
56
|
+
* directory. A command that showed those in a different order would be telling the caller
|
|
57
|
+
* to fix the second thing while the first is still wrong.
|
|
58
|
+
*
|
|
59
|
+
* An all-whitespace variable is treated as unset: a shell that exported an empty value
|
|
60
|
+
* meant "nothing", and resolving it to the cwd would read whatever happened to be there.
|
|
61
|
+
*/
|
|
62
|
+
export declare function locateTraceDir(context: CliContext, argument: string | undefined, command: string, usage?: string): TraceDirResolution;
|
|
63
|
+
/**
|
|
64
|
+
* Confirm a located directory is one, refusing with `2` when it is not.
|
|
65
|
+
*
|
|
66
|
+
* A path that exists but is a file is refused the same way as one that does not: neither
|
|
67
|
+
* is a directory this command can read, and the fix is the same.
|
|
68
|
+
*/
|
|
69
|
+
export declare function confirmTraceDir(located: {
|
|
70
|
+
readonly absolute: string;
|
|
71
|
+
readonly shown: string;
|
|
72
|
+
}, command: string): TraceDirResolution;
|
|
73
|
+
/** Locate and confirm in one call, for a command that has nothing to check in between. */
|
|
74
|
+
export declare function resolveTraceDir(context: CliContext, argument: string | undefined, command: string, usage?: string): TraceDirResolution;
|
|
75
|
+
//# sourceMappingURL=trace-dir.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace-dir.d.ts","sourceRoot":"","sources":["../src/trace-dir.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5C,8FAA8F;AAC9F,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAE7C,wFAAwF;AACxF,MAAM,WAAW,QAAQ;IACvB,kFAAkF;IAClF,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IACrC,kCAAkC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,gDAAgD;IAChD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAwBvD;AAED,mFAAmF;AACnF,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKjE;AAED,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC1E;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAA;CAAE,CAAC;AAEnE;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,EAAE,MAAM,EACf,KAAK,SAAU,GACd,kBAAkB,CAsBpB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAC9D,OAAO,EAAE,MAAM,GACd,kBAAkB,CA6BpB;AAED,0FAA0F;AAC1F,wBAAgB,eAAe,CAC7B,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,EAAE,MAAM,EACf,KAAK,SAAU,GACd,kBAAkB,CAIpB"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Finding the directory `aid cost` and `aid trace` both read.
|
|
3
|
+
*
|
|
4
|
+
* The two commands answer different questions about the same files, so they must agree
|
|
5
|
+
* on which files those are. Discovery lives here rather than in either command: if one
|
|
6
|
+
* of them grew its own default, `cost` could report a directory `trace` refused, and
|
|
7
|
+
* nothing would explain the difference.
|
|
8
|
+
*
|
|
9
|
+
* Both outcomes are wrong invocations, so both exit `2`: no directory was named and
|
|
10
|
+
* `AID_TRACE_DIR` is unset, or the named path is not a directory. Neither says anything
|
|
11
|
+
* about the project, which is why neither is `1`.
|
|
12
|
+
*/
|
|
13
|
+
import { readdirSync, readFileSync, statSync } from 'node:fs';
|
|
14
|
+
import { isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
15
|
+
import { CLI_DIAGNOSTIC_CODES, cliError } from './diagnostics.js';
|
|
16
|
+
import { EXIT_USAGE } from './exit.js';
|
|
17
|
+
import { outcome } from './output.js';
|
|
18
|
+
import { parseTraceLines } from './trace.js';
|
|
19
|
+
/** The variable the runtimes read. Named here, not imported, because it is a runtime knob. */
|
|
20
|
+
export const TRACE_DIR_ENV = 'AID_TRACE_DIR';
|
|
21
|
+
/**
|
|
22
|
+
* Read every `.jsonl` file directly inside `absolute`.
|
|
23
|
+
*
|
|
24
|
+
* A file that cannot be read is **counted and skipped**, for the same reason a bad line
|
|
25
|
+
* is: one unreadable file must not hide the spans in the others, and the caller decides
|
|
26
|
+
* whether the count fails the run. Subdirectories are ignored -- the sink writes flat
|
|
27
|
+
* files, and walking a tree would silently mix in traces the caller did not point at.
|
|
28
|
+
*
|
|
29
|
+
* The exception is the directory itself: `readdirSync` throws when it is missing or is
|
|
30
|
+
* not a directory, and the caller has to have checked that before it can say anything
|
|
31
|
+
* useful about it.
|
|
32
|
+
*/
|
|
33
|
+
export function readTraceDir(absolute) {
|
|
34
|
+
const files = readdirSync(absolute, { withFileTypes: true })
|
|
35
|
+
.filter((entry) => entry.isFile() && entry.name.endsWith('.jsonl'))
|
|
36
|
+
.map((entry) => entry.name)
|
|
37
|
+
.sort();
|
|
38
|
+
const spans = [];
|
|
39
|
+
let skipped = 0;
|
|
40
|
+
let unreadable = 0;
|
|
41
|
+
for (const name of files) {
|
|
42
|
+
let text;
|
|
43
|
+
try {
|
|
44
|
+
text = readFileSync(join(absolute, name), 'utf8');
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
unreadable += 1;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
const parsed = parseTraceLines(text);
|
|
51
|
+
spans.push(...parsed.spans);
|
|
52
|
+
skipped += parsed.skipped;
|
|
53
|
+
}
|
|
54
|
+
return { files, spans, skipped, unreadable };
|
|
55
|
+
}
|
|
56
|
+
/** A directory relative to the cwd when it is below it, else the absolute path. */
|
|
57
|
+
export function displayPath(cwd, absolute) {
|
|
58
|
+
const path = relative(cwd, absolute);
|
|
59
|
+
if (path === '')
|
|
60
|
+
return '.';
|
|
61
|
+
if (path.startsWith('..') || isAbsolute(path))
|
|
62
|
+
return absolute;
|
|
63
|
+
return path.split(sep).join('/');
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Where the directory is, before asking whether it exists.
|
|
67
|
+
*
|
|
68
|
+
* Split from the existence check so `cost` can validate `--since` in the order it always
|
|
69
|
+
* has: a missing directory is reported first, then a bad date, then a path that is not a
|
|
70
|
+
* directory. A command that showed those in a different order would be telling the caller
|
|
71
|
+
* to fix the second thing while the first is still wrong.
|
|
72
|
+
*
|
|
73
|
+
* An all-whitespace variable is treated as unset: a shell that exported an empty value
|
|
74
|
+
* meant "nothing", and resolving it to the cwd would read whatever happened to be there.
|
|
75
|
+
*/
|
|
76
|
+
export function locateTraceDir(context, argument, command, usage = '<dir>') {
|
|
77
|
+
const configured = argument ?? context.env[TRACE_DIR_ENV]?.trim();
|
|
78
|
+
if (configured === undefined || configured.trim() === '') {
|
|
79
|
+
return {
|
|
80
|
+
kind: 'refused',
|
|
81
|
+
outcome: outcome({
|
|
82
|
+
command,
|
|
83
|
+
exitCode: EXIT_USAGE,
|
|
84
|
+
diagnostics: [
|
|
85
|
+
cliError({
|
|
86
|
+
code: CLI_DIAGNOSTIC_CODES.traceDirMissing,
|
|
87
|
+
message: `no trace directory: \`aid ${command}\` needs one to read.`,
|
|
88
|
+
hint: `Pass it as \`aid ${command} ${usage}\`, or set ${TRACE_DIR_ENV} to the directory the runtime writes to.`,
|
|
89
|
+
}),
|
|
90
|
+
],
|
|
91
|
+
text: `aid: no trace directory. Pass one, or set ${TRACE_DIR_ENV}.\n`,
|
|
92
|
+
}),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
const absolute = resolve(context.cwd, configured);
|
|
96
|
+
return { kind: 'ok', absolute, shown: displayPath(context.cwd, absolute) };
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Confirm a located directory is one, refusing with `2` when it is not.
|
|
100
|
+
*
|
|
101
|
+
* A path that exists but is a file is refused the same way as one that does not: neither
|
|
102
|
+
* is a directory this command can read, and the fix is the same.
|
|
103
|
+
*/
|
|
104
|
+
export function confirmTraceDir(located, command) {
|
|
105
|
+
const { absolute, shown } = located;
|
|
106
|
+
let isDirectory = false;
|
|
107
|
+
try {
|
|
108
|
+
isDirectory = statSync(absolute).isDirectory();
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
isDirectory = false;
|
|
112
|
+
}
|
|
113
|
+
if (!isDirectory) {
|
|
114
|
+
return {
|
|
115
|
+
kind: 'refused',
|
|
116
|
+
outcome: outcome({
|
|
117
|
+
command,
|
|
118
|
+
exitCode: EXIT_USAGE,
|
|
119
|
+
diagnostics: [
|
|
120
|
+
cliError({
|
|
121
|
+
code: CLI_DIAGNOSTIC_CODES.traceDirNotFound,
|
|
122
|
+
message: `"${shown}" is not a directory.`,
|
|
123
|
+
hint: `Point \`aid ${command}\` at the directory ${TRACE_DIR_ENV} names, or unset it to be told which is missing.`,
|
|
124
|
+
}),
|
|
125
|
+
],
|
|
126
|
+
text: `aid: "${shown}" is not a directory.\n`,
|
|
127
|
+
}),
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
return { kind: 'ok', absolute, shown };
|
|
131
|
+
}
|
|
132
|
+
/** Locate and confirm in one call, for a command that has nothing to check in between. */
|
|
133
|
+
export function resolveTraceDir(context, argument, command, usage = '<dir>') {
|
|
134
|
+
const located = locateTraceDir(context, argument, command, usage);
|
|
135
|
+
if (located.kind === 'refused')
|
|
136
|
+
return located;
|
|
137
|
+
return confirmTraceDir(located, command);
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=trace-dir.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace-dir.js","sourceRoot":"","sources":["../src/trace-dir.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;A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AAC3C,CAAC"}
|
package/dist/trace.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export interface TraceSpan {
|
|
|
28
28
|
readonly attributes?: Readonly<Record<string, unknown>>;
|
|
29
29
|
readonly status?: {
|
|
30
30
|
readonly code?: string;
|
|
31
|
+
readonly message?: string | null;
|
|
31
32
|
} | null;
|
|
32
33
|
}
|
|
33
34
|
export interface ParsedTrace {
|
|
@@ -86,4 +87,74 @@ export interface CostSummary {
|
|
|
86
87
|
export declare function summariseSpans(spans: readonly TraceSpan[], options?: {
|
|
87
88
|
readonly since?: string;
|
|
88
89
|
}): CostSummary;
|
|
90
|
+
/** One trace: the spans that share a `trace_id`, and what a reader asks about it. */
|
|
91
|
+
export interface TraceRun {
|
|
92
|
+
readonly traceId: string;
|
|
93
|
+
readonly spans: readonly TraceSpan[];
|
|
94
|
+
/**
|
|
95
|
+
* The span the others hang from, when the trace has exactly one. A trace assembled
|
|
96
|
+
* from several exports can have none, or several; a reader that guessed would draw a
|
|
97
|
+
* hierarchy the data does not claim.
|
|
98
|
+
*/
|
|
99
|
+
readonly root?: TraceSpan;
|
|
100
|
+
/** The earliest `started_at` in the run, in the sink's own format. */
|
|
101
|
+
readonly startedAt: string;
|
|
102
|
+
/** Wall time from the earliest start to the latest end. */
|
|
103
|
+
readonly durationMs: number;
|
|
104
|
+
readonly errors: number;
|
|
105
|
+
readonly costUsd: number;
|
|
106
|
+
readonly unpricedSpans: number;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Group spans into runs, newest first.
|
|
110
|
+
*
|
|
111
|
+
* A run is **one `trace_id`**, because that is the only identifier the sink writes that
|
|
112
|
+
* covers a whole request: `span_id` is one step, and there is no separate run record. The
|
|
113
|
+
* cost, error and unpriced counts come from {@link summariseSpans} rather than a second
|
|
114
|
+
* summation here, so one span set can never price two ways.
|
|
115
|
+
*
|
|
116
|
+
* A span whose parent is absent is treated as top-level. That happens legitimately -- a
|
|
117
|
+
* trace can be exported in pieces, or a parent can fail before it records -- and the
|
|
118
|
+
* alternative, dropping it, would hide a span that did run.
|
|
119
|
+
*/
|
|
120
|
+
export declare function runsOf(spans: readonly TraceSpan[]): readonly TraceRun[];
|
|
121
|
+
/** Children of each span in one run, keyed by parent id, in start order. */
|
|
122
|
+
export declare function childrenOf(spans: readonly TraceSpan[]): ReadonlyMap<string, readonly TraceSpan[]>;
|
|
123
|
+
/**
|
|
124
|
+
* One span as a tree row: where it sits, when it began relative to the run, and what the
|
|
125
|
+
* record says about it.
|
|
126
|
+
*/
|
|
127
|
+
export interface SpanRow {
|
|
128
|
+
readonly span: TraceSpan;
|
|
129
|
+
/** Nesting level; a span whose parent is missing sits at the top, not in limbo. */
|
|
130
|
+
readonly depth: number;
|
|
131
|
+
/** Milliseconds after the run's earliest start; absent when the timestamp is unusable. */
|
|
132
|
+
readonly offsetMs?: number;
|
|
133
|
+
readonly facts: SpanFacts;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Flatten a run into print order: depth first, every child after its parent.
|
|
137
|
+
*
|
|
138
|
+
* Roots are spans with no parent *in this run*. Anything unreachable from a root -- only
|
|
139
|
+
* possible when parent links form a cycle, which a writer bug could produce -- is appended
|
|
140
|
+
* at depth zero rather than dropped, because a span that recorded is a span that ran.
|
|
141
|
+
*/
|
|
142
|
+
export declare function treeRowsOf(run: TraceRun): readonly SpanRow[];
|
|
143
|
+
/**
|
|
144
|
+
* What one span line can say without guessing.
|
|
145
|
+
*
|
|
146
|
+
* The attribute keys stay in this module so a reader never has to know them: `trace`
|
|
147
|
+
* prints usage and cost from the same fields `cost` sums, which is what makes the two
|
|
148
|
+
* commands agree about a run.
|
|
149
|
+
*/
|
|
150
|
+
export interface SpanFacts {
|
|
151
|
+
readonly durationMs?: number;
|
|
152
|
+
readonly costUsd?: number;
|
|
153
|
+
readonly inputTokens?: number;
|
|
154
|
+
readonly outputTokens?: number;
|
|
155
|
+
/** The pinned alias, else the model the provider served. Absent when neither is recorded. */
|
|
156
|
+
readonly model?: string;
|
|
157
|
+
readonly error: boolean;
|
|
158
|
+
}
|
|
159
|
+
export declare function factsOf(span: TraceSpan): SpanFacts;
|
|
89
160
|
//# sourceMappingURL=trace.d.ts.map
|
package/dist/trace.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../src/trace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,mFAAmF;AACnF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACxD,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../src/trace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,mFAAmF;AACnF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAA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