taphound 0.2.0-dev.11 → 0.2.0-dev.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.
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/assets/skills/taphound-case-suite/SKILL.md +8 -6
- package/assets/skills/taphound-case-suite/scripts/ledger.mjs +84 -19
- package/assets/skills/taphound-journey-brief-author/SKILL.md +8 -3
- package/assets/skills/taphound-journey-brief-author/prompts/brief-author-role.md +3 -1
- package/assets/skills/taphound-journey-brief-author/prompts/brief-author-role.zh-CN.md +1 -1
- package/assets/skills/taphound-journey-generator/SKILL.md +21 -5
- package/assets/skills/taphound-journey-generator/prompts/consume-journey-brief.md +3 -1
- package/assets/skills/taphound-journey-generator/prompts/generate-step.md +9 -0
- package/assets/skills/taphound-journey-generator/scripts/envelope.mjs +80 -10
- package/assets/skills/taphound-verify-change/references/preserve.md +15 -7
- package/assets/skills/taphound-verify-change/scripts/ui-refactor.mjs +1 -1
- package/dist/adapters/appium/appium-ui-snapshot-provider.d.ts +8 -0
- package/dist/adapters/appium/appium-ui-snapshot-provider.js +123 -54
- package/dist/adapters/filesystem/diagnostics-journal.d.ts +17 -0
- package/dist/adapters/filesystem/diagnostics-journal.js +130 -0
- package/dist/application/diagnostics/diagnostics-exporter.d.ts +29 -0
- package/dist/application/diagnostics/diagnostics-exporter.js +283 -0
- package/dist/application/diagnostics/ui-capture-telemetry.d.ts +16 -0
- package/dist/application/diagnostics/ui-capture-telemetry.js +81 -0
- package/dist/application/generation/proposed-step-validator.js +5 -1
- package/dist/application/journey/journey-check-service.d.ts +7 -1
- package/dist/application/journey/journey-check-service.js +16 -1
- package/dist/application/report/report-writer.d.ts +5 -0
- package/dist/application/report/report-writer.js +20 -0
- package/dist/application/runtime/verify-runtime.js +32 -2
- package/dist/application/ui/observed-ui-snapshot-provider.d.ts +15 -0
- package/dist/application/ui/observed-ui-snapshot-provider.js +66 -0
- package/dist/application/ui/ui-stability-probe.d.ts +6 -0
- package/dist/application/ui/ui-stability-probe.js +21 -5
- package/dist/application/wait/idle-waiter.js +29 -6
- package/dist/cli/commands/diagnose.d.ts +3 -0
- package/dist/cli/commands/diagnose.js +84 -0
- package/dist/cli/commands/generation/session-commands.js +4 -1
- package/dist/cli/commands/journey.js +3 -1
- package/dist/cli/commands/verify.js +55 -3
- package/dist/cli/dependencies.d.ts +11 -0
- package/dist/cli/dependencies.js +58 -5
- package/dist/cli/diagnostics-recorder.d.ts +31 -0
- package/dist/cli/diagnostics-recorder.js +82 -0
- package/dist/cli/main.d.ts +1 -1
- package/dist/cli/main.js +58 -1
- package/dist/cli/program.js +3 -1
- package/dist/domain/contract.d.ts +6 -6
- package/dist/domain/diagnostics.d.ts +1396 -0
- package/dist/domain/diagnostics.js +193 -0
- package/dist/domain/failure.js +1 -1
- package/dist/domain/report.d.ts +11 -3
- package/dist/domain/report.js +1 -0
- package/dist/domain/verify-receipt.d.ts +17 -0
- package/dist/domain/verify-receipt.js +17 -0
- package/dist/domain/workspace.d.ts +11 -0
- package/dist/domain/workspace.js +14 -0
- package/dist/ports/diagnostics.d.ts +15 -0
- package/dist/ports/diagnostics.js +1 -0
- package/package.json +4 -3
- package/scripts/feedback-pack.mjs +399 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { FAILURE_CODES } from "./failure.js";
|
|
3
|
+
import { RuntimeBackendChoiceSchema } from "./runtime.js";
|
|
4
|
+
import { UiBackendIdSchema, UiBackendSelectionSchema } from "./ui-backend.js";
|
|
5
|
+
import { UiCacheTelemetrySchema } from "./ui-cache.js";
|
|
6
|
+
/**
|
|
7
|
+
* Diagnostics exist so a user can attach evidence to TapHound feedback
|
|
8
|
+
* without leaking their project. Every schema here is an allowlist: a field
|
|
9
|
+
* that is not declared cannot reach the journal or an exported bundle, and
|
|
10
|
+
* no field carries a path, package, Activity, Journey name, locator value,
|
|
11
|
+
* device serial, or free-text message.
|
|
12
|
+
*/
|
|
13
|
+
export const DIAGNOSTICS_EVENTS_FILE = "events.jsonl";
|
|
14
|
+
export const DIAGNOSTICS_EVENTS_ROTATED_FILE = "events.1.jsonl";
|
|
15
|
+
export const DIAGNOSTICS_SALT_FILE = "salt";
|
|
16
|
+
export const DIAGNOSTICS_DISABLE_ENV_VAR = "TAPHOUND_DIAGNOSTICS";
|
|
17
|
+
/** Upper bounds (exclusive) of the capture latency buckets; the last bucket is open. */
|
|
18
|
+
export const UI_CAPTURE_LATENCY_BUCKETS_MS = [250, 500, 1000, 2000, 5000];
|
|
19
|
+
export const UI_CAPTURE_FAILURE_KINDS = [
|
|
20
|
+
"timeout",
|
|
21
|
+
"cancelled",
|
|
22
|
+
"http4xx",
|
|
23
|
+
"http5xx",
|
|
24
|
+
"error"
|
|
25
|
+
];
|
|
26
|
+
const CountSchema = z.number().int().nonnegative();
|
|
27
|
+
const DurationSchema = z.number().nonnegative();
|
|
28
|
+
const VersionSchema = z.string().regex(/^[\w.+-]{1,64}$/);
|
|
29
|
+
const TokenSchema = z.string().regex(/^[a-zA-Z][a-zA-Z\d]{0,31}$/);
|
|
30
|
+
export const DiagnosticsHostSchema = z.strictObject({
|
|
31
|
+
platform: TokenSchema,
|
|
32
|
+
arch: TokenSchema,
|
|
33
|
+
node: VersionSchema
|
|
34
|
+
});
|
|
35
|
+
export const UiBackendTelemetrySchema = z.strictObject({
|
|
36
|
+
backend: UiBackendIdSchema,
|
|
37
|
+
captures: CountSchema,
|
|
38
|
+
failures: z.strictObject({
|
|
39
|
+
timeout: CountSchema,
|
|
40
|
+
cancelled: CountSchema,
|
|
41
|
+
http4xx: CountSchema,
|
|
42
|
+
http5xx: CountSchema,
|
|
43
|
+
error: CountSchema
|
|
44
|
+
}),
|
|
45
|
+
totalMs: DurationSchema,
|
|
46
|
+
maxMs: DurationSchema,
|
|
47
|
+
latencyBuckets: z.array(CountSchema).length(UI_CAPTURE_LATENCY_BUCKETS_MS.length + 1),
|
|
48
|
+
sessionRecoveries: CountSchema,
|
|
49
|
+
sessionRecoveryFailures: CountSchema
|
|
50
|
+
});
|
|
51
|
+
/** One journal line: a finished CLI invocation. */
|
|
52
|
+
export const CommandEventSchema = z.strictObject({
|
|
53
|
+
version: z.literal(1),
|
|
54
|
+
kind: z.literal("command"),
|
|
55
|
+
at: z.iso.datetime(),
|
|
56
|
+
taphoundVersion: VersionSchema,
|
|
57
|
+
host: DiagnosticsHostSchema,
|
|
58
|
+
command: z.string().regex(/^[a-z][a-z-]*(?: [a-z][a-z-]*){0,3}$/),
|
|
59
|
+
flags: z.array(TokenSchema),
|
|
60
|
+
durationMs: DurationSchema,
|
|
61
|
+
exitCode: z.number().int(),
|
|
62
|
+
status: TokenSchema.optional(),
|
|
63
|
+
failureCode: z.enum(FAILURE_CODES).optional(),
|
|
64
|
+
runId: z.string().regex(/^[\w.-]{1,128}$/).optional(),
|
|
65
|
+
ui: z.array(UiBackendTelemetrySchema)
|
|
66
|
+
});
|
|
67
|
+
const RunAliasSchema = z.string().regex(/^run#\d+$/);
|
|
68
|
+
const ActivityAliasSchema = z.string().regex(/^activity#\d+$/);
|
|
69
|
+
const DeviceAliasSchema = z.string().regex(/^device#\d+$/);
|
|
70
|
+
const StepResultSchema = z.enum(["passed", "failed", "notRun", "manualRequired"]);
|
|
71
|
+
const ActivityCheckSummarySchema = z.strictObject({
|
|
72
|
+
status: StepResultSchema,
|
|
73
|
+
expected: ActivityAliasSchema,
|
|
74
|
+
actual: ActivityAliasSchema.optional()
|
|
75
|
+
});
|
|
76
|
+
export const StepSummarySchema = z.strictObject({
|
|
77
|
+
index: CountSchema,
|
|
78
|
+
action: z.enum([
|
|
79
|
+
"click",
|
|
80
|
+
"longClick",
|
|
81
|
+
"inputText",
|
|
82
|
+
"swipe",
|
|
83
|
+
"scrollTo",
|
|
84
|
+
"back",
|
|
85
|
+
"wait",
|
|
86
|
+
"bridge"
|
|
87
|
+
]),
|
|
88
|
+
status: StepResultSchema,
|
|
89
|
+
device: DeviceAliasSchema.optional(),
|
|
90
|
+
durationMs: DurationSchema,
|
|
91
|
+
locator: z.strictObject({
|
|
92
|
+
status: z.enum(["found", "failed", "notRun"]),
|
|
93
|
+
matchedBy: z.enum(["resourceId", "text", "contentDescription", "anchor"]).optional(),
|
|
94
|
+
requestedFields: z.array(z.enum(["resourceId", "text", "contentDescription", "index", "within"])),
|
|
95
|
+
locatorId: z.string().regex(/^[a-f\d]{16}$/).optional(),
|
|
96
|
+
anchorStatus: z.enum(["resolved", "locatorFallback", "failed"]).optional(),
|
|
97
|
+
fallbackUsed: z.boolean()
|
|
98
|
+
}).optional(),
|
|
99
|
+
idle: z.strictObject({
|
|
100
|
+
status: z.enum(["stable", "timeout", "cancelled", "notRun"]),
|
|
101
|
+
polls: CountSchema,
|
|
102
|
+
durationMs: DurationSchema.optional(),
|
|
103
|
+
samplingDurationMs: DurationSchema.optional(),
|
|
104
|
+
strategy: z.enum(["hybrid", "layoutDiff", "frameStats", "structural"]).optional(),
|
|
105
|
+
backend: z.enum(["uiautomator", "androidCli", "gfxFrameStats", "mobileMcp"]).optional(),
|
|
106
|
+
fallbackUsed: z.boolean().optional(),
|
|
107
|
+
frameActivityDetected: z.boolean().optional(),
|
|
108
|
+
lastDiffCount: CountSchema.optional()
|
|
109
|
+
}).optional(),
|
|
110
|
+
activity: z.strictObject({
|
|
111
|
+
before: ActivityCheckSummarySchema,
|
|
112
|
+
after: ActivityCheckSummarySchema
|
|
113
|
+
}).optional(),
|
|
114
|
+
expectation: z.strictObject({
|
|
115
|
+
type: z.enum(["activity", "element", "logcat", "logcatEvent"]),
|
|
116
|
+
status: StepResultSchema,
|
|
117
|
+
code: z.enum(FAILURE_CODES).optional()
|
|
118
|
+
}).optional(),
|
|
119
|
+
scroll: z.strictObject({
|
|
120
|
+
swipesUsed: CountSchema,
|
|
121
|
+
maxSwipes: CountSchema
|
|
122
|
+
}).optional()
|
|
123
|
+
});
|
|
124
|
+
const LayerStatusSchema = StepResultSchema;
|
|
125
|
+
export const RunSummarySchema = z.strictObject({
|
|
126
|
+
run: RunAliasSchema,
|
|
127
|
+
status: z.enum(["passed", "failed", "error", "manualRequired"]),
|
|
128
|
+
durationMs: DurationSchema,
|
|
129
|
+
journey: z.string().regex(/^journey#\d+$/),
|
|
130
|
+
devices: z.array(z.strictObject({
|
|
131
|
+
device: DeviceAliasSchema,
|
|
132
|
+
uiBackend: z.strictObject({
|
|
133
|
+
id: UiBackendIdSchema,
|
|
134
|
+
adapterVersion: VersionSchema,
|
|
135
|
+
engineVersion: VersionSchema.optional()
|
|
136
|
+
}).optional(),
|
|
137
|
+
uiCache: UiCacheTelemetrySchema.optional()
|
|
138
|
+
})),
|
|
139
|
+
tools: z.partialRecord(z.enum(["node", "adb", "android"]), VersionSchema),
|
|
140
|
+
layers: z.strictObject({
|
|
141
|
+
run: LayerStatusSchema,
|
|
142
|
+
structural: LayerStatusSchema,
|
|
143
|
+
activityCheckpoint: LayerStatusSchema,
|
|
144
|
+
explicitExpect: LayerStatusSchema,
|
|
145
|
+
collection: LayerStatusSchema
|
|
146
|
+
}),
|
|
147
|
+
primaryFailure: z.strictObject({
|
|
148
|
+
code: z.enum(FAILURE_CODES),
|
|
149
|
+
phase: TokenSchema,
|
|
150
|
+
stepIndex: CountSchema.optional()
|
|
151
|
+
}).optional(),
|
|
152
|
+
secondaryErrorCodes: z.array(z.enum(FAILURE_CODES)),
|
|
153
|
+
fallbackUsed: z.boolean(),
|
|
154
|
+
logcatEvidence: z.array(z.strictObject({
|
|
155
|
+
device: DeviceAliasSchema,
|
|
156
|
+
droppedLines: CountSchema,
|
|
157
|
+
droppedBytes: CountSchema
|
|
158
|
+
})),
|
|
159
|
+
steps: z.array(StepSummarySchema)
|
|
160
|
+
});
|
|
161
|
+
export const DiagnosticsConfigSummarySchema = z.strictObject({
|
|
162
|
+
idle: z.strictObject({
|
|
163
|
+
strategy: z.enum(["hybrid", "layoutDiff", "frameStats", "structural"]),
|
|
164
|
+
pollIntervalMs: CountSchema,
|
|
165
|
+
stablePolls: CountSchema,
|
|
166
|
+
timeoutMs: CountSchema,
|
|
167
|
+
ignoreCursorBlink: z.boolean().optional(),
|
|
168
|
+
ignoreLayoutDrift: z.boolean().optional(),
|
|
169
|
+
deviceProfiles: CountSchema
|
|
170
|
+
}),
|
|
171
|
+
ui: z.strictObject({
|
|
172
|
+
backend: UiBackendSelectionSchema,
|
|
173
|
+
snapshotTimeoutMs: CountSchema.optional(),
|
|
174
|
+
cacheEnabled: z.boolean().optional()
|
|
175
|
+
}).optional(),
|
|
176
|
+
runtime: z.strictObject({
|
|
177
|
+
backend: RuntimeBackendChoiceSchema
|
|
178
|
+
}).optional()
|
|
179
|
+
});
|
|
180
|
+
export const DiagnosticsBundleSchema = z.strictObject({
|
|
181
|
+
version: z.literal(1),
|
|
182
|
+
generatedAt: z.iso.datetime(),
|
|
183
|
+
taphoundVersion: VersionSchema,
|
|
184
|
+
host: DiagnosticsHostSchema,
|
|
185
|
+
config: DiagnosticsConfigSummarySchema.optional(),
|
|
186
|
+
journal: z.strictObject({
|
|
187
|
+
events: z.array(CommandEventSchema.extend({
|
|
188
|
+
runId: RunAliasSchema.optional()
|
|
189
|
+
})),
|
|
190
|
+
skippedLines: CountSchema
|
|
191
|
+
}),
|
|
192
|
+
runs: z.array(RunSummarySchema)
|
|
193
|
+
});
|
package/dist/domain/failure.js
CHANGED
package/dist/domain/report.d.ts
CHANGED
|
@@ -150,8 +150,8 @@ export declare const StepReportSchema: z.ZodObject<{
|
|
|
150
150
|
idle: z.ZodOptional<z.ZodObject<{
|
|
151
151
|
status: z.ZodEnum<{
|
|
152
152
|
cancelled: "cancelled";
|
|
153
|
-
notRun: "notRun";
|
|
154
153
|
timeout: "timeout";
|
|
154
|
+
notRun: "notRun";
|
|
155
155
|
stable: "stable";
|
|
156
156
|
}>;
|
|
157
157
|
polls: z.ZodNumber;
|
|
@@ -661,8 +661,8 @@ export declare const TapHoundReportV4Schema: z.ZodObject<{
|
|
|
661
661
|
idle: z.ZodOptional<z.ZodObject<{
|
|
662
662
|
status: z.ZodEnum<{
|
|
663
663
|
cancelled: "cancelled";
|
|
664
|
-
notRun: "notRun";
|
|
665
664
|
timeout: "timeout";
|
|
665
|
+
notRun: "notRun";
|
|
666
666
|
stable: "stable";
|
|
667
667
|
}>;
|
|
668
668
|
polls: z.ZodNumber;
|
|
@@ -851,6 +851,10 @@ export declare const TapHoundReportV4Schema: z.ZodObject<{
|
|
|
851
851
|
logcatEvidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
852
852
|
role: z.ZodString;
|
|
853
853
|
status: z.ZodLiteral<"incomplete">;
|
|
854
|
+
expectationImpact: z.ZodEnum<{
|
|
855
|
+
none: "none";
|
|
856
|
+
possible: "possible";
|
|
857
|
+
}>;
|
|
854
858
|
droppedLines: z.ZodNumber;
|
|
855
859
|
droppedBytes: z.ZodNumber;
|
|
856
860
|
lastDroppedAtMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1288,8 +1292,8 @@ export declare const TapHoundReportSchema: z.ZodObject<{
|
|
|
1288
1292
|
idle: z.ZodOptional<z.ZodObject<{
|
|
1289
1293
|
status: z.ZodEnum<{
|
|
1290
1294
|
cancelled: "cancelled";
|
|
1291
|
-
notRun: "notRun";
|
|
1292
1295
|
timeout: "timeout";
|
|
1296
|
+
notRun: "notRun";
|
|
1293
1297
|
stable: "stable";
|
|
1294
1298
|
}>;
|
|
1295
1299
|
polls: z.ZodNumber;
|
|
@@ -1478,6 +1482,10 @@ export declare const TapHoundReportSchema: z.ZodObject<{
|
|
|
1478
1482
|
logcatEvidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1479
1483
|
role: z.ZodString;
|
|
1480
1484
|
status: z.ZodLiteral<"incomplete">;
|
|
1485
|
+
expectationImpact: z.ZodEnum<{
|
|
1486
|
+
none: "none";
|
|
1487
|
+
possible: "possible";
|
|
1488
|
+
}>;
|
|
1481
1489
|
droppedLines: z.ZodNumber;
|
|
1482
1490
|
droppedBytes: z.ZodNumber;
|
|
1483
1491
|
lastDroppedAtMs: z.ZodOptional<z.ZodNumber>;
|
package/dist/domain/report.js
CHANGED
|
@@ -264,6 +264,7 @@ const ReportFields = {
|
|
|
264
264
|
logcatEvidence: z.array(z.strictObject({
|
|
265
265
|
role: DeviceRoleSchema,
|
|
266
266
|
status: z.literal("incomplete"),
|
|
267
|
+
expectationImpact: z.enum(["none", "possible"]),
|
|
267
268
|
droppedLines: z.number().int().positive(),
|
|
268
269
|
droppedBytes: z.number().int().positive(),
|
|
269
270
|
lastDroppedAtMs: z.number().nonnegative().optional()
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const VERIFY_RECEIPT_FILE = "receipt.json";
|
|
3
|
+
/**
|
|
4
|
+
* A process receipt that `verify --journey` writes beside the report it
|
|
5
|
+
* published. `argv` is the normalized invocation TapHound actually ran:
|
|
6
|
+
* absolute project and Journey paths and the selected device serial, so a
|
|
7
|
+
* Workflow checker never has to trust a hand-written record.
|
|
8
|
+
*/
|
|
9
|
+
export declare const VerifyReceiptSchema: z.ZodObject<{
|
|
10
|
+
version: z.ZodLiteral<1>;
|
|
11
|
+
argv: z.ZodArray<z.ZodString>;
|
|
12
|
+
exitCode: z.ZodNumber;
|
|
13
|
+
journeySha256: z.ZodString;
|
|
14
|
+
reportPath: z.ZodString;
|
|
15
|
+
reportSha256: z.ZodString;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
export type VerifyReceipt = z.infer<typeof VerifyReceiptSchema>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const VERIFY_RECEIPT_FILE = "receipt.json";
|
|
3
|
+
const DigestSchema = z.string().regex(/^[a-f\d]{64}$/);
|
|
4
|
+
/**
|
|
5
|
+
* A process receipt that `verify --journey` writes beside the report it
|
|
6
|
+
* published. `argv` is the normalized invocation TapHound actually ran:
|
|
7
|
+
* absolute project and Journey paths and the selected device serial, so a
|
|
8
|
+
* Workflow checker never has to trust a hand-written record.
|
|
9
|
+
*/
|
|
10
|
+
export const VerifyReceiptSchema = z.strictObject({
|
|
11
|
+
version: z.literal(1),
|
|
12
|
+
argv: z.array(z.string().min(1)).min(1),
|
|
13
|
+
exitCode: z.number().int().min(0).max(4),
|
|
14
|
+
journeySha256: DigestSchema,
|
|
15
|
+
reportPath: z.string().min(1),
|
|
16
|
+
reportSha256: DigestSchema
|
|
17
|
+
});
|
|
@@ -12,11 +12,22 @@ export declare const JOURNEY_SOURCES_DIR = ".taphound/sources";
|
|
|
12
12
|
export declare const JOURNEYS_DIR = ".taphound/journeys";
|
|
13
13
|
export declare const CONTRACTS_DIR = ".taphound/contracts";
|
|
14
14
|
export declare const BASELINES_DIR = ".taphound/baselines";
|
|
15
|
+
export declare const BRIEFS_DIR = ".taphound/briefs";
|
|
16
|
+
export declare const SUITES_DIR = ".taphound/suites";
|
|
17
|
+
/**
|
|
18
|
+
* Journey Briefs are committed project material: standalone Briefs live under
|
|
19
|
+
* `.taphound/briefs/`, Case Suite Briefs under `.taphound/suites/<suite-id>/`.
|
|
20
|
+
* Nothing else in the project may be bound as a Brief.
|
|
21
|
+
*/
|
|
22
|
+
export declare const JOURNEY_BRIEF_ROOTS: readonly [".taphound/briefs", ".taphound/suites"];
|
|
23
|
+
export declare function isJourneyBriefPath(path: string): boolean;
|
|
15
24
|
export declare const BUILD_DIR = ".taphound/build";
|
|
16
25
|
export declare const GENERATIONS_DIR = ".taphound/build/generations";
|
|
17
26
|
export declare const JOBS_DIR = ".taphound/build/jobs";
|
|
18
27
|
export declare const DEFAULT_ARTIFACTS_DIR = ".taphound/build/runs";
|
|
19
28
|
export declare const WORKFLOWS_DIR = ".taphound/build/workflows";
|
|
29
|
+
export declare const DIAGNOSTICS_LOG_DIR = ".taphound/build/log";
|
|
30
|
+
export declare const DIAGNOSTICS_EXPORT_DIR = ".taphound/build/diagnostics";
|
|
20
31
|
export declare function workflowManifestPath(caseId: string): string;
|
|
21
32
|
export declare const BUILD_IGNORE_FILE = ".taphound/.gitignore";
|
|
22
33
|
export declare const BUILD_IGNORE_CONTENT = "build/\n";
|
package/dist/domain/workspace.js
CHANGED
|
@@ -14,11 +14,25 @@ export const JOURNEY_SOURCES_DIR = `${TAPHOUND_DIR}/sources`;
|
|
|
14
14
|
export const JOURNEYS_DIR = `${TAPHOUND_DIR}/journeys`;
|
|
15
15
|
export const CONTRACTS_DIR = `${TAPHOUND_DIR}/contracts`;
|
|
16
16
|
export const BASELINES_DIR = `${TAPHOUND_DIR}/baselines`;
|
|
17
|
+
export const BRIEFS_DIR = `${TAPHOUND_DIR}/briefs`;
|
|
18
|
+
export const SUITES_DIR = `${TAPHOUND_DIR}/suites`;
|
|
19
|
+
/**
|
|
20
|
+
* Journey Briefs are committed project material: standalone Briefs live under
|
|
21
|
+
* `.taphound/briefs/`, Case Suite Briefs under `.taphound/suites/<suite-id>/`.
|
|
22
|
+
* Nothing else in the project may be bound as a Brief.
|
|
23
|
+
*/
|
|
24
|
+
export const JOURNEY_BRIEF_ROOTS = [BRIEFS_DIR, SUITES_DIR];
|
|
25
|
+
export function isJourneyBriefPath(path) {
|
|
26
|
+
const normalized = posix.normalize(path.replaceAll("\\", "/"));
|
|
27
|
+
return JOURNEY_BRIEF_ROOTS.some((root) => normalized.startsWith(`${root}/`));
|
|
28
|
+
}
|
|
17
29
|
export const BUILD_DIR = `${TAPHOUND_DIR}/build`;
|
|
18
30
|
export const GENERATIONS_DIR = `${BUILD_DIR}/generations`;
|
|
19
31
|
export const JOBS_DIR = `${BUILD_DIR}/jobs`;
|
|
20
32
|
export const DEFAULT_ARTIFACTS_DIR = `${BUILD_DIR}/runs`;
|
|
21
33
|
export const WORKFLOWS_DIR = `${BUILD_DIR}/workflows`;
|
|
34
|
+
export const DIAGNOSTICS_LOG_DIR = `${BUILD_DIR}/log`;
|
|
35
|
+
export const DIAGNOSTICS_EXPORT_DIR = `${BUILD_DIR}/diagnostics`;
|
|
22
36
|
export function workflowManifestPath(caseId) {
|
|
23
37
|
if (!/^[a-z][a-z0-9-]{0,63}$/.test(caseId)) {
|
|
24
38
|
throw new Error("Workflow Case id must be a safe lowercase path component");
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CommandEvent } from "../domain/diagnostics.js";
|
|
2
|
+
import type { UiBackendId } from "../domain/ui-backend.js";
|
|
3
|
+
/** Receives UI backend timing facts; never error text. */
|
|
4
|
+
export interface UiCaptureObserver {
|
|
5
|
+
captured: (backend: UiBackendId, durationMs: number, error?: unknown) => void;
|
|
6
|
+
sessionRecovered: (backend: UiBackendId, succeeded: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
/** The local, Git-ignored diagnostics journal of one host project. */
|
|
9
|
+
export interface DiagnosticsJournal {
|
|
10
|
+
append: (projectRoot: string, event: CommandEvent) => Promise<void>;
|
|
11
|
+
/** Raw journal lines, oldest first, including the rotated file. */
|
|
12
|
+
readLines: (projectRoot: string) => Promise<readonly string[]>;
|
|
13
|
+
/** A per-project random salt that never leaves the host. */
|
|
14
|
+
salt: (projectRoot: string) => Promise<Buffer>;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taphound",
|
|
3
|
-
"version": "0.2.0-dev.
|
|
3
|
+
"version": "0.2.0-dev.13",
|
|
4
4
|
"description": "Deterministic app journey recording and verification",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -25,12 +25,13 @@
|
|
|
25
25
|
},
|
|
26
26
|
"type": "module",
|
|
27
27
|
"bin": {
|
|
28
|
-
"taphound": "
|
|
28
|
+
"taphound": "dist/cli/main.js"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"dist",
|
|
32
32
|
"assets/brand/taphound-mark.svg",
|
|
33
|
-
"assets/skills"
|
|
33
|
+
"assets/skills",
|
|
34
|
+
"scripts/feedback-pack.mjs"
|
|
34
35
|
],
|
|
35
36
|
"engines": {
|
|
36
37
|
"node": ">=22"
|