@harness-engineering/cli 2.4.0 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/agents-md-2M46KG4F.js +10 -0
  2. package/dist/{architecture-I2G7PNQB.js → architecture-3ZSN5RDQ.js} +5 -5
  3. package/dist/{assess-project-LO6NCLE7.js → assess-project-KZWFQEJE.js} +5 -3
  4. package/dist/bin/harness-mcp.js +16 -16
  5. package/dist/bin/harness.js +29 -27
  6. package/dist/{check-phase-gate-52SQFNJB.js → check-phase-gate-EWV5VYTG.js} +5 -5
  7. package/dist/{chunk-GDJ2MRYH.js → chunk-2TGCYJMT.js} +259 -5
  8. package/dist/{chunk-TIQU5VY7.js → chunk-5FDBXUFW.js} +1 -1
  9. package/dist/{chunk-7BNK4M23.js → chunk-5XLLIYYL.js} +1 -1
  10. package/dist/{chunk-U4XK4BB3.js → chunk-73KZ2E47.js} +9 -9
  11. package/dist/{chunk-NGCM4B4V.js → chunk-7RZZV73V.js} +5 -5
  12. package/dist/{chunk-WY2J54IZ.js → chunk-B2ZYMQGT.js} +64 -30
  13. package/dist/{chunk-XPRGWHBL.js → chunk-BCFDGOMA.js} +1 -1
  14. package/dist/{chunk-27EHWQPK.js → chunk-GLKASJZE.js} +6 -6
  15. package/dist/{chunk-TCR5PKMU.js → chunk-GOSUZC5H.js} +514 -208
  16. package/dist/{chunk-MQRKPF46.js → chunk-I2KULMPD.js} +10 -10
  17. package/dist/{chunk-4XB37LST.js → chunk-IEHXZB6J.js} +9 -9
  18. package/dist/{chunk-5YOHXTK3.js → chunk-KOK7BFP2.js} +3 -3
  19. package/dist/{chunk-2L2A6W6I.js → chunk-KRQTN46U.js} +3 -3
  20. package/dist/{chunk-GN2CSZC6.js → chunk-LHHO7AH4.js} +3 -3
  21. package/dist/{chunk-OFMQEUYN.js → chunk-LJF6UY4R.js} +2 -2
  22. package/dist/{chunk-KPWUZSHL.js → chunk-MXOQEI72.js} +25 -8
  23. package/dist/{chunk-54JTO4NZ.js → chunk-NM3ZIWVN.js} +2 -2
  24. package/dist/{chunk-JGPOQJ73.js → chunk-NTOKQJOX.js} +2 -2
  25. package/dist/chunk-O63AAPIZ.js +190 -0
  26. package/dist/{chunk-TVJZX53C.js → chunk-OUXYITL5.js} +2 -2
  27. package/dist/{chunk-MSBVH6ER.js → chunk-PPQ3TY2R.js} +2 -2
  28. package/dist/{chunk-RYVL76ZF.js → chunk-QV5EBDWA.js} +1 -1
  29. package/dist/{chunk-FJJYQWUP.js → chunk-RRTTJ3VB.js} +2 -2
  30. package/dist/{chunk-Q43LM7CO.js → chunk-TPNA2I4J.js} +206 -97
  31. package/dist/{chunk-RZASDABE.js → chunk-UPV7VDUB.js} +2 -2
  32. package/dist/{chunk-DJRRTZGD.js → chunk-UQJV7NNM.js} +2 -2
  33. package/dist/ci-workflow-5TBUHJFC.js +10 -0
  34. package/dist/{dist-ZJGFXGIB.js → dist-HA6IIPRC.js} +39 -3
  35. package/dist/dist-O733ZU6I.js +49 -0
  36. package/dist/{dist-SQAOKWXM.js → dist-QPWXPCPL.js} +1 -1
  37. package/dist/{docs-7CW7WUFB.js → docs-D6WI2LCF.js} +5 -5
  38. package/dist/engine-GBEVIZZQ.js +10 -0
  39. package/dist/{entropy-P6QELTFA.js → entropy-V6M4KJDC.js} +4 -4
  40. package/dist/{feedback-PJWCDRRZ.js → feedback-22I4HHXM.js} +1 -1
  41. package/dist/{generate-agent-definitions-ONDIJHHK.js → generate-agent-definitions-UM7T3WLA.js} +5 -5
  42. package/dist/{glob-helper-JE3MO4UD.js → glob-helper-XE2UGEOV.js} +1 -1
  43. package/dist/{graph-loader-TJU4E7KL.js → graph-loader-EQBOIHFZ.js} +1 -1
  44. package/dist/index.d.ts +100 -10
  45. package/dist/index.js +26 -26
  46. package/dist/loader-5V72NYMF.js +12 -0
  47. package/dist/{mcp-UUNLS3MC.js → mcp-5KQGFG5U.js} +16 -16
  48. package/dist/{performance-7X3EFAOD.js → performance-MVORVVMG.js} +5 -5
  49. package/dist/{review-pipeline-GAJ22PBC.js → review-pipeline-JYSVCNGJ.js} +4 -4
  50. package/dist/runtime-KZC2OQI7.js +11 -0
  51. package/dist/{scan-SFX5U3TE.js → scan-4PPP6ZXT.js} +1 -1
  52. package/dist/{security-ZSU643D7.js → security-WOVOBLCI.js} +1 -1
  53. package/dist/{tool-tiers-7QGZ3FKY.js → tool-tiers-QVWKAZX4.js} +5 -1
  54. package/dist/{validate-IDX6RI3U.js → validate-55HGQKWR.js} +5 -5
  55. package/dist/validate-cross-check-H3PSV4VY.js +10 -0
  56. package/package.json +6 -6
  57. package/dist/agents-md-ROTDQOXM.js +0 -10
  58. package/dist/chunk-RL4VMEXL.js +0 -53
  59. package/dist/ci-workflow-MYBH64CR.js +0 -10
  60. package/dist/dist-3EWNRFFQ.js +0 -21
  61. package/dist/engine-Y75QZW6N.js +0 -10
  62. package/dist/loader-DQRNWKOZ.js +0 -12
  63. package/dist/runtime-6TK6U72R.js +0 -11
  64. package/dist/validate-cross-check-5YEWZ3EW.js +0 -10
@@ -7,13 +7,13 @@ import {
7
7
  import {
8
8
  findConfigFile,
9
9
  loadConfig
10
- } from "./chunk-KPWUZSHL.js";
10
+ } from "./chunk-MXOQEI72.js";
11
11
  import {
12
12
  init_dist
13
- } from "./chunk-GDJ2MRYH.js";
13
+ } from "./chunk-2TGCYJMT.js";
14
14
  import {
15
15
  Ok
16
- } from "./chunk-RL4VMEXL.js";
16
+ } from "./chunk-O63AAPIZ.js";
17
17
 
18
18
  // src/mcp/tools/docs.ts
19
19
  init_dist();
@@ -50,18 +50,18 @@ async function handleCheckDocs(input) {
50
50
  const projectPath = sanitizePath(input.path);
51
51
  const scope = input.scope ?? "coverage";
52
52
  if (scope === "integrity") {
53
- const { validateKnowledgeMap } = await import("./dist-ZJGFXGIB.js");
53
+ const { validateKnowledgeMap } = await import("./dist-HA6IIPRC.js");
54
54
  const result2 = await validateKnowledgeMap(projectPath);
55
55
  return resultToMcpResponse(result2);
56
56
  }
57
57
  if (scope === "all") {
58
- const { checkDocCoverage: checkDocCoverage2, validateKnowledgeMap } = await import("./dist-ZJGFXGIB.js");
58
+ const { checkDocCoverage: checkDocCoverage2, validateKnowledgeMap } = await import("./dist-HA6IIPRC.js");
59
59
  const domain2 = input.domain ?? "src";
60
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-TJU4E7KL.js");
60
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-EQBOIHFZ.js");
61
61
  const store2 = await loadGraphStore2(projectPath);
62
62
  let graphCoverage2;
63
63
  if (store2) {
64
- const { Assembler } = await import("./dist-SQAOKWXM.js");
64
+ const { Assembler } = await import("./dist-QPWXPCPL.js");
65
65
  const assembler = new Assembler(store2);
66
66
  const report = assembler.checkCoverage();
67
67
  graphCoverage2 = {
@@ -94,13 +94,13 @@ async function handleCheckDocs(input) {
94
94
  }
95
95
  return resultToMcpResponse(Ok({ coverage, integrity }));
96
96
  }
97
- const { checkDocCoverage } = await import("./dist-ZJGFXGIB.js");
97
+ const { checkDocCoverage } = await import("./dist-HA6IIPRC.js");
98
98
  const domain = input.domain ?? "src";
99
- const { loadGraphStore } = await import("./graph-loader-TJU4E7KL.js");
99
+ const { loadGraphStore } = await import("./graph-loader-EQBOIHFZ.js");
100
100
  const store = await loadGraphStore(projectPath);
101
101
  let graphCoverage;
102
102
  if (store) {
103
- const { Assembler } = await import("./dist-SQAOKWXM.js");
103
+ const { Assembler } = await import("./dist-QPWXPCPL.js");
104
104
  const assembler = new Assembler(store);
105
105
  const report = assembler.checkCoverage();
106
106
  graphCoverage = {
@@ -33,7 +33,7 @@ var createSelfReviewDefinition = {
33
33
  };
34
34
  async function handleCreateSelfReview(input) {
35
35
  try {
36
- const { parseDiff, createSelfReview } = await import("./dist-ZJGFXGIB.js");
36
+ const { parseDiff, createSelfReview } = await import("./dist-HA6IIPRC.js");
37
37
  const parseResult = parseDiff(input.diff);
38
38
  if (!parseResult.ok) {
39
39
  return resultToMcpResponse(parseResult);
@@ -53,11 +53,11 @@ async function handleCreateSelfReview(input) {
53
53
  ...input.maxFileCount !== void 0 ? { maxChangedFiles: input.maxFileCount } : {}
54
54
  }
55
55
  };
56
- const { loadGraphStore } = await import("./graph-loader-TJU4E7KL.js");
56
+ const { loadGraphStore } = await import("./graph-loader-EQBOIHFZ.js");
57
57
  const store = await loadGraphStore(projectPath);
58
58
  let graphData;
59
59
  if (store) {
60
- const { GraphFeedbackAdapter } = await import("./dist-SQAOKWXM.js");
60
+ const { GraphFeedbackAdapter } = await import("./dist-QPWXPCPL.js");
61
61
  const adapter = new GraphFeedbackAdapter(store);
62
62
  const changedFiles = parseResult.value.files.map((f) => f.path);
63
63
  const impact = adapter.computeImpactData(changedFiles);
@@ -119,7 +119,7 @@ var analyzeDiffDefinition = {
119
119
  };
120
120
  async function handleAnalyzeDiff(input) {
121
121
  try {
122
- const { parseDiff, analyzeDiff } = await import("./dist-ZJGFXGIB.js");
122
+ const { parseDiff, analyzeDiff } = await import("./dist-HA6IIPRC.js");
123
123
  const parseResult = parseDiff(input.diff);
124
124
  if (!parseResult.ok) {
125
125
  return resultToMcpResponse(parseResult);
@@ -139,10 +139,10 @@ async function handleAnalyzeDiff(input) {
139
139
  let graphImpactData;
140
140
  if (input.path) {
141
141
  try {
142
- const { loadGraphStore } = await import("./graph-loader-TJU4E7KL.js");
142
+ const { loadGraphStore } = await import("./graph-loader-EQBOIHFZ.js");
143
143
  const store = await loadGraphStore(sanitizePath(input.path));
144
144
  if (store) {
145
- const { GraphFeedbackAdapter } = await import("./dist-SQAOKWXM.js");
145
+ const { GraphFeedbackAdapter } = await import("./dist-QPWXPCPL.js");
146
146
  const adapter = new GraphFeedbackAdapter(store);
147
147
  const changedFiles = parseResult.value.files.map((f) => f.path);
148
148
  const impact = adapter.computeImpactData(changedFiles);
@@ -195,7 +195,7 @@ var requestPeerReviewDefinition = {
195
195
  };
196
196
  async function handleRequestPeerReview(input) {
197
197
  try {
198
- const { parseDiff, requestPeerReview } = await import("./dist-ZJGFXGIB.js");
198
+ const { parseDiff, requestPeerReview } = await import("./dist-HA6IIPRC.js");
199
199
  const parseResult = parseDiff(input.diff);
200
200
  if (!parseResult.ok) {
201
201
  return resultToMcpResponse(parseResult);
@@ -206,10 +206,10 @@ async function handleRequestPeerReview(input) {
206
206
  ...input.context ? { metadata: { context: input.context } } : {}
207
207
  };
208
208
  try {
209
- const { loadGraphStore } = await import("./graph-loader-TJU4E7KL.js");
209
+ const { loadGraphStore } = await import("./graph-loader-EQBOIHFZ.js");
210
210
  const store = await loadGraphStore(sanitizePath(input.path));
211
211
  if (store) {
212
- const { GraphFeedbackAdapter } = await import("./dist-SQAOKWXM.js");
212
+ const { GraphFeedbackAdapter } = await import("./dist-QPWXPCPL.js");
213
213
  const adapter = new GraphFeedbackAdapter(store);
214
214
  const changedFiles = parseResult.value.files.map((f) => f.path);
215
215
  const impactData = adapter.computeImpactData(changedFiles);
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  resolveConfig
3
- } from "./chunk-KPWUZSHL.js";
3
+ } from "./chunk-MXOQEI72.js";
4
4
  import {
5
5
  init_dist
6
- } from "./chunk-GDJ2MRYH.js";
6
+ } from "./chunk-2TGCYJMT.js";
7
7
  import {
8
8
  Ok
9
- } from "./chunk-RL4VMEXL.js";
9
+ } from "./chunk-O63AAPIZ.js";
10
10
  import {
11
11
  logger
12
12
  } from "./chunk-EBJQ6N4M.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveProjectConfig
3
- } from "./chunk-OFMQEUYN.js";
3
+ } from "./chunk-LJF6UY4R.js";
4
4
  import {
5
5
  sanitizePath
6
6
  } from "./chunk-W6Y7ZW3Y.js";
@@ -49,7 +49,7 @@ async function handleValidateProject(input) {
49
49
  checks.config = "pass";
50
50
  const config = configResult.value;
51
51
  try {
52
- const core = await import("./dist-ZJGFXGIB.js");
52
+ const core = await import("./dist-HA6IIPRC.js");
53
53
  if (typeof core.validateFileStructure === "function" && Array.isArray(config.conventions)) {
54
54
  const conventions = config.conventions;
55
55
  const structureResult = await core.validateFileStructure(projectPath, conventions);
@@ -68,7 +68,7 @@ async function handleValidateProject(input) {
68
68
  } catch {
69
69
  }
70
70
  try {
71
- const core = await import("./dist-ZJGFXGIB.js");
71
+ const core = await import("./dist-HA6IIPRC.js");
72
72
  if (typeof core.validateAgentsMap === "function") {
73
73
  const agentsMapPath = path.join(projectPath, "AGENTS.md");
74
74
  const agentsResult = await core.validateAgentsMap(agentsMapPath);
@@ -27,7 +27,7 @@ var runSecurityScanDefinition = {
27
27
  };
28
28
  async function handleRunSecurityScan(input) {
29
29
  try {
30
- const core = await import("./dist-ZJGFXGIB.js");
30
+ const core = await import("./dist-HA6IIPRC.js");
31
31
  const projectRoot = sanitizePath(input.path);
32
32
  let configData = {};
33
33
  try {
@@ -50,7 +50,7 @@ async function handleRunSecurityScan(input) {
50
50
  if (input.files && input.files.length > 0) {
51
51
  filesToScan = input.files.map((f) => path.resolve(projectRoot, f));
52
52
  } else {
53
- const { globFiles } = await import("./glob-helper-JE3MO4UD.js");
53
+ const { globFiles } = await import("./glob-helper-XE2UGEOV.js");
54
54
  filesToScan = await globFiles(projectRoot, securityConfig.exclude);
55
55
  }
56
56
  const result = await scanner.scanFiles(filesToScan);
@@ -114,7 +114,7 @@ var getSecurityTrendsDefinition = {
114
114
  };
115
115
  async function handleGetSecurityTrends(input) {
116
116
  try {
117
- const core = await import("./dist-ZJGFXGIB.js");
117
+ const core = await import("./dist-HA6IIPRC.js");
118
118
  const projectRoot = sanitizePath(input.path);
119
119
  const manager = new core.SecurityTimelineManager(projectRoot);
120
120
  const trendOptions = {};
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  init_dist
3
- } from "./chunk-GDJ2MRYH.js";
3
+ } from "./chunk-2TGCYJMT.js";
4
4
  import {
5
5
  Err,
6
6
  Ok
7
- } from "./chunk-RL4VMEXL.js";
7
+ } from "./chunk-O63AAPIZ.js";
8
8
 
9
9
  // src/mcp/utils/config-resolver.ts
10
10
  init_dist();
@@ -4,15 +4,15 @@ import {
4
4
  import {
5
5
  ArchConfigSchema,
6
6
  init_dist as init_dist2
7
- } from "./chunk-GDJ2MRYH.js";
7
+ } from "./chunk-2TGCYJMT.js";
8
8
  import {
9
9
  Err,
10
10
  Ok
11
- } from "./chunk-RL4VMEXL.js";
11
+ } from "./chunk-O63AAPIZ.js";
12
12
  import {
13
13
  init_dist,
14
14
  skipDirGlobs
15
- } from "./chunk-XPRGWHBL.js";
15
+ } from "./chunk-BCFDGOMA.js";
16
16
  import {
17
17
  CLIError,
18
18
  ExitCode
@@ -219,6 +219,26 @@ var KnowledgeConfigSchema = z.object({
219
219
  /** Caller-supplied blocklisted path segments (e.g. `["scratch", "fixtures"]`). Extends defaults. */
220
220
  domainBlocklist: z.array(z.string().min(1)).optional().default([])
221
221
  });
222
+ var TelemetryExportOTLPSchema = z.object({
223
+ /** Full URL to the OTLP/HTTP traces ingestion endpoint. */
224
+ endpoint: z.string().url(),
225
+ /** Whether the exporter is active. Default: true. */
226
+ enabled: z.boolean().default(true),
227
+ /** Optional headers forwarded on every flush (e.g. collector auth tokens). */
228
+ headers: z.record(z.string(), z.string()).optional(),
229
+ /** Flush cadence in milliseconds. Default: 2000. */
230
+ flushIntervalMs: z.number().int().positive().default(2e3),
231
+ /** Maximum buffered spans before forcing an early flush. Default: 64. */
232
+ batchSize: z.number().int().positive().default(64)
233
+ });
234
+ var TelemetryConfigSchema = z.object({
235
+ /** Whether anonymous central telemetry (PostHog) is enabled (default: true). */
236
+ enabled: z.boolean().default(true),
237
+ /** Trace exporter configuration. Currently the only export channel is OTLP/HTTP. */
238
+ export: z.object({
239
+ otlp: TelemetryExportOTLPSchema.optional()
240
+ }).optional()
241
+ });
222
242
  var BranchingConfigSchema = z.object({
223
243
  /** Allowed branch name prefixes */
224
244
  prefixes: z.array(z.string()).default(["feat", "fix", "chore", "docs", "refactor", "test", "perf"]),
@@ -331,11 +351,8 @@ var HarnessConfigSchema = z.object({
331
351
  }).optional(),
332
352
  /** Compliance and convention enforcement settings */
333
353
  compliance: ComplianceConfigSchema.optional(),
334
- /** Central telemetry collection settings */
335
- telemetry: z.object({
336
- /** Whether anonymous telemetry is enabled (default: true) */
337
- enabled: z.boolean().default(true)
338
- }).optional(),
354
+ /** Central telemetry + trace export settings */
355
+ telemetry: TelemetryConfigSchema.optional(),
339
356
  /** How often (in ms) to check for CLI updates */
340
357
  updateCheckInterval: z.number().int().min(0).optional(),
341
358
  /** Graph ingest and connector settings */
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  init_dist
3
- } from "./chunk-GDJ2MRYH.js";
3
+ } from "./chunk-2TGCYJMT.js";
4
4
  import {
5
5
  Err,
6
6
  Ok
7
- } from "./chunk-RL4VMEXL.js";
7
+ } from "./chunk-O63AAPIZ.js";
8
8
 
9
9
  // src/templates/engine.ts
10
10
  init_dist();
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  init_dist
3
- } from "./chunk-GDJ2MRYH.js";
3
+ } from "./chunk-2TGCYJMT.js";
4
4
  import {
5
5
  Err,
6
6
  Ok
7
- } from "./chunk-RL4VMEXL.js";
7
+ } from "./chunk-O63AAPIZ.js";
8
8
 
9
9
  // src/persona/loader.ts
10
10
  init_dist();
@@ -0,0 +1,190 @@
1
+ import {
2
+ __esm
3
+ } from "./chunk-KFQGP6VL.js";
4
+
5
+ // ../types/dist/index.mjs
6
+ import { z } from "zod";
7
+ import { z as z2 } from "zod";
8
+ import { z as z3 } from "zod";
9
+ function Ok(value) {
10
+ return { ok: true, value };
11
+ }
12
+ function Err(error) {
13
+ return { ok: false, error };
14
+ }
15
+ function isOk(result) {
16
+ return result.ok === true;
17
+ }
18
+ function isErr(result) {
19
+ return result.ok === false;
20
+ }
21
+ var STANDARD_COGNITIVE_MODES, DEFAULT_SKILL_CONTEXT_BUDGET, SESSION_SECTION_NAMES, TrajectoryMetadataSchema, PromptCacheStatsSchema, OTLPKeyValueSchema, OTLPSpanSchema, TokenScopeSchema, BridgeKindSchema, AuthTokenSchema, AuthTokenPublicSchema, AuthAuditEntrySchema, WebhookSubscriptionSchema, WebhookSubscriptionPublicSchema, GatewayEventSchema, WebhookDeliveryStatusSchema, WebhookDeliverySchema;
22
+ var init_dist = __esm({
23
+ "../types/dist/index.mjs"() {
24
+ STANDARD_COGNITIVE_MODES = [
25
+ "adversarial-reviewer",
26
+ "constructive-architect",
27
+ "meticulous-implementer",
28
+ "diagnostic-investigator",
29
+ "advisory-guide",
30
+ "meticulous-verifier"
31
+ ];
32
+ DEFAULT_SKILL_CONTEXT_BUDGET = {
33
+ max_tokens: 4e3,
34
+ priority: 3
35
+ };
36
+ SESSION_SECTION_NAMES = [
37
+ "terminology",
38
+ "decisions",
39
+ "constraints",
40
+ "risks",
41
+ "openQuestions",
42
+ "evidence"
43
+ ];
44
+ TrajectoryMetadataSchema = z.object({
45
+ turnsCount: z.number().int().nonnegative(),
46
+ toolCallCount: z.number().int().nonnegative(),
47
+ modelTokenSpend: z.object({
48
+ input: z.number().int().nonnegative(),
49
+ output: z.number().int().nonnegative(),
50
+ cacheRead: z.number().int().nonnegative(),
51
+ cacheCreation: z.number().int().nonnegative()
52
+ }),
53
+ promptCacheHit: z.number().int().nonnegative(),
54
+ promptCacheMiss: z.number().int().nonnegative(),
55
+ totalDurationMs: z.number().int().nonnegative(),
56
+ phasesReached: z.array(z.string())
57
+ });
58
+ PromptCacheStatsSchema = z.object({
59
+ totalRequests: z.number().int().nonnegative(),
60
+ hits: z.number().int().nonnegative(),
61
+ misses: z.number().int().nonnegative(),
62
+ hitRate: z.number().min(0).max(1),
63
+ byBackend: z.record(
64
+ z.string(),
65
+ z.object({
66
+ hits: z.number().int().nonnegative(),
67
+ misses: z.number().int().nonnegative()
68
+ })
69
+ ),
70
+ windowStartedAt: z.number().int()
71
+ });
72
+ OTLPKeyValueSchema = z.object({
73
+ key: z.string(),
74
+ value: z.object({
75
+ stringValue: z.string().optional(),
76
+ intValue: z.string().optional(),
77
+ doubleValue: z.number().optional(),
78
+ boolValue: z.boolean().optional()
79
+ })
80
+ });
81
+ OTLPSpanSchema = z.object({
82
+ traceId: z.string().length(32),
83
+ // 16-byte hex
84
+ spanId: z.string().length(16),
85
+ // 8-byte hex
86
+ parentSpanId: z.string().length(16).optional(),
87
+ name: z.string(),
88
+ kind: z.number().int(),
89
+ // SpanKind enum (1=INTERNAL, 2=SERVER, 3=CLIENT, 4=PRODUCER, 5=CONSUMER)
90
+ startTimeUnixNano: z.string(),
91
+ // decimal nanoseconds as string (int64 unsafe in JSON)
92
+ endTimeUnixNano: z.string(),
93
+ attributes: z.array(OTLPKeyValueSchema),
94
+ status: z.object({ code: z.number().int() }).optional()
95
+ });
96
+ TokenScopeSchema = z2.enum([
97
+ "admin",
98
+ "trigger-job",
99
+ "read-status",
100
+ "resolve-interaction",
101
+ "subscribe-webhook",
102
+ "modify-roadmap",
103
+ "read-telemetry"
104
+ ]);
105
+ BridgeKindSchema = z2.enum(["slack", "discord", "github-app", "custom"]);
106
+ AuthTokenSchema = z2.object({
107
+ id: z2.string().regex(/^tok_[a-f0-9]{16}$/),
108
+ name: z2.string().min(1).max(100),
109
+ scopes: z2.array(TokenScopeSchema).min(1),
110
+ bridgeKind: BridgeKindSchema.optional(),
111
+ tenantId: z2.string().optional(),
112
+ hashedSecret: z2.string().min(1),
113
+ createdAt: z2.string().datetime(),
114
+ lastUsedAt: z2.string().datetime().optional(),
115
+ expiresAt: z2.string().datetime().optional()
116
+ });
117
+ AuthTokenPublicSchema = AuthTokenSchema.omit({ hashedSecret: true });
118
+ AuthAuditEntrySchema = z2.object({
119
+ timestamp: z2.string().datetime(),
120
+ tokenId: z2.string(),
121
+ tenantId: z2.string().optional(),
122
+ route: z2.string(),
123
+ method: z2.string(),
124
+ status: z2.number().int()
125
+ });
126
+ WebhookSubscriptionSchema = z3.object({
127
+ id: z3.string().regex(/^whk_[a-f0-9]{16}$/),
128
+ tokenId: z3.string(),
129
+ // owning auth token (audit / revocation chain)
130
+ url: z3.string().url().startsWith("https://"),
131
+ // https-only at registration
132
+ events: z3.array(z3.string().min(1)).min(1),
133
+ // glob patterns: "maintenance.completed", "interaction.*"
134
+ secret: z3.string().min(32),
135
+ // 32-byte base64url (44 chars)
136
+ createdAt: z3.string().datetime()
137
+ });
138
+ WebhookSubscriptionPublicSchema = WebhookSubscriptionSchema.omit({ secret: true });
139
+ GatewayEventSchema = z3.object({
140
+ id: z3.string().regex(/^evt_[a-f0-9]+$/),
141
+ type: z3.string().min(1),
142
+ timestamp: z3.string().datetime(),
143
+ data: z3.unknown(),
144
+ correlationId: z3.string().optional()
145
+ });
146
+ WebhookDeliveryStatusSchema = z3.enum([
147
+ "pending",
148
+ "in_flight",
149
+ "failed",
150
+ "delivered",
151
+ "dead"
152
+ ]);
153
+ WebhookDeliverySchema = z3.object({
154
+ id: z3.string().regex(/^dlv_[a-f0-9]{16}$/),
155
+ subscriptionId: z3.string(),
156
+ eventType: z3.string(),
157
+ payload: z3.string(),
158
+ attempt: z3.number().int().min(0).max(5),
159
+ status: WebhookDeliveryStatusSchema,
160
+ nextAttemptAt: z3.number().int().nullable(),
161
+ lastError: z3.string().nullable().optional(),
162
+ deliveredAt: z3.number().int().nullable().optional()
163
+ });
164
+ }
165
+ });
166
+
167
+ export {
168
+ Ok,
169
+ Err,
170
+ isOk,
171
+ isErr,
172
+ STANDARD_COGNITIVE_MODES,
173
+ DEFAULT_SKILL_CONTEXT_BUDGET,
174
+ SESSION_SECTION_NAMES,
175
+ TrajectoryMetadataSchema,
176
+ PromptCacheStatsSchema,
177
+ OTLPKeyValueSchema,
178
+ OTLPSpanSchema,
179
+ TokenScopeSchema,
180
+ BridgeKindSchema,
181
+ AuthTokenSchema,
182
+ AuthTokenPublicSchema,
183
+ AuthAuditEntrySchema,
184
+ WebhookSubscriptionSchema,
185
+ WebhookSubscriptionPublicSchema,
186
+ GatewayEventSchema,
187
+ WebhookDeliveryStatusSchema,
188
+ WebhookDeliverySchema,
189
+ init_dist
190
+ };
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-KET4QQZB.js";
4
4
  import {
5
5
  init_dist
6
- } from "./chunk-GDJ2MRYH.js";
6
+ } from "./chunk-2TGCYJMT.js";
7
7
  import {
8
8
  Err,
9
9
  Ok
10
- } from "./chunk-RL4VMEXL.js";
10
+ } from "./chunk-O63AAPIZ.js";
11
11
 
12
12
  // src/persona/generators/runtime.ts
13
13
  init_dist();
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  init_dist
3
- } from "./chunk-GDJ2MRYH.js";
3
+ } from "./chunk-2TGCYJMT.js";
4
4
  import {
5
5
  Ok
6
- } from "./chunk-RL4VMEXL.js";
6
+ } from "./chunk-O63AAPIZ.js";
7
7
 
8
8
  // src/commands/validate-cross-check.ts
9
9
  init_dist();
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  listPersonas,
6
6
  loadPersona
7
- } from "./chunk-JGPOQJ73.js";
7
+ } from "./chunk-NTOKQJOX.js";
8
8
  import {
9
9
  GENERATED_HEADER_AGENT,
10
10
  VALID_PLATFORMS,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  init_dist
3
- } from "./chunk-GDJ2MRYH.js";
3
+ } from "./chunk-2TGCYJMT.js";
4
4
  import {
5
5
  Err,
6
6
  Ok
7
- } from "./chunk-RL4VMEXL.js";
7
+ } from "./chunk-O63AAPIZ.js";
8
8
 
9
9
  // src/persona/generators/agents-md.ts
10
10
  init_dist();