@attest-ai/core 0.5.0 → 0.6.0

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 (121) hide show
  1. package/dist/cjs/index.cjs +113 -2
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs/index.d.cts +33 -7
  4. package/dist/cjs/proto/index.cjs.map +1 -1
  5. package/dist/cjs/proto/index.d.cts +44 -3
  6. package/dist/esm/cli.js +1 -1
  7. package/dist/esm/cli.js.map +1 -1
  8. package/dist/esm/index.d.ts +33 -7
  9. package/dist/esm/index.js +107 -2
  10. package/dist/esm/index.js.map +1 -1
  11. package/dist/esm/proto/index.d.ts +44 -3
  12. package/dist/esm/proto/index.js.map +1 -1
  13. package/package.json +4 -4
  14. package/dist/adapters/anthropic.d.ts +0 -31
  15. package/dist/adapters/anthropic.d.ts.map +0 -1
  16. package/dist/adapters/anthropic.js +0 -42
  17. package/dist/adapters/anthropic.js.map +0 -1
  18. package/dist/adapters/gemini.d.ts +0 -30
  19. package/dist/adapters/gemini.d.ts.map +0 -1
  20. package/dist/adapters/gemini.js +0 -41
  21. package/dist/adapters/gemini.js.map +0 -1
  22. package/dist/adapters/index.d.ts +0 -11
  23. package/dist/adapters/index.d.ts.map +0 -1
  24. package/dist/adapters/index.js +0 -7
  25. package/dist/adapters/index.js.map +0 -1
  26. package/dist/adapters/manual.d.ts +0 -9
  27. package/dist/adapters/manual.d.ts.map +0 -1
  28. package/dist/adapters/manual.js +0 -16
  29. package/dist/adapters/manual.js.map +0 -1
  30. package/dist/adapters/ollama.d.ts +0 -19
  31. package/dist/adapters/ollama.d.ts.map +0 -1
  32. package/dist/adapters/ollama.js +0 -30
  33. package/dist/adapters/ollama.js.map +0 -1
  34. package/dist/adapters/openai.d.ts +0 -34
  35. package/dist/adapters/openai.d.ts.map +0 -1
  36. package/dist/adapters/openai.js +0 -42
  37. package/dist/adapters/openai.js.map +0 -1
  38. package/dist/adapters/otel.d.ts +0 -25
  39. package/dist/adapters/otel.d.ts.map +0 -1
  40. package/dist/adapters/otel.js +0 -133
  41. package/dist/adapters/otel.js.map +0 -1
  42. package/dist/agent.d.ts +0 -14
  43. package/dist/agent.d.ts.map +0 -1
  44. package/dist/agent.js +0 -54
  45. package/dist/agent.js.map +0 -1
  46. package/dist/client.d.ts +0 -23
  47. package/dist/client.d.ts.map +0 -1
  48. package/dist/client.js +0 -171
  49. package/dist/client.js.map +0 -1
  50. package/dist/config.d.ts +0 -21
  51. package/dist/config.d.ts.map +0 -1
  52. package/dist/config.js +0 -31
  53. package/dist/config.js.map +0 -1
  54. package/dist/context.d.ts +0 -4
  55. package/dist/context.d.ts.map +0 -1
  56. package/dist/context.js +0 -3
  57. package/dist/context.js.map +0 -1
  58. package/dist/delegate.d.ts +0 -3
  59. package/dist/delegate.d.ts.map +0 -1
  60. package/dist/delegate.js +0 -24
  61. package/dist/delegate.js.map +0 -1
  62. package/dist/engine-downloader.d.ts +0 -7
  63. package/dist/engine-downloader.d.ts.map +0 -1
  64. package/dist/engine-downloader.js +0 -136
  65. package/dist/engine-downloader.js.map +0 -1
  66. package/dist/engine-manager.d.ts +0 -26
  67. package/dist/engine-manager.d.ts.map +0 -1
  68. package/dist/engine-manager.js +0 -172
  69. package/dist/engine-manager.js.map +0 -1
  70. package/dist/expect.d.ts +0 -133
  71. package/dist/expect.d.ts.map +0 -1
  72. package/dist/expect.js +0 -330
  73. package/dist/expect.js.map +0 -1
  74. package/dist/index.d.ts +0 -16
  75. package/dist/index.d.ts.map +0 -1
  76. package/dist/index.js +0 -15
  77. package/dist/index.js.map +0 -1
  78. package/dist/proto/codec.d.ts +0 -20
  79. package/dist/proto/codec.d.ts.map +0 -1
  80. package/dist/proto/codec.js +0 -71
  81. package/dist/proto/codec.js.map +0 -1
  82. package/dist/proto/constants.d.ts +0 -21
  83. package/dist/proto/constants.d.ts.map +0 -1
  84. package/dist/proto/constants.js +0 -25
  85. package/dist/proto/constants.js.map +0 -1
  86. package/dist/proto/errors.d.ts +0 -13
  87. package/dist/proto/errors.d.ts.map +0 -1
  88. package/dist/proto/errors.js +0 -24
  89. package/dist/proto/errors.js.map +0 -1
  90. package/dist/proto/index.d.ts +0 -5
  91. package/dist/proto/index.d.ts.map +0 -1
  92. package/dist/proto/index.js +0 -5
  93. package/dist/proto/index.js.map +0 -1
  94. package/dist/proto/types.d.ts +0 -104
  95. package/dist/proto/types.d.ts.map +0 -1
  96. package/dist/proto/types.js +0 -2
  97. package/dist/proto/types.js.map +0 -1
  98. package/dist/result.d.ts +0 -15
  99. package/dist/result.d.ts.map +0 -1
  100. package/dist/result.js +0 -32
  101. package/dist/result.js.map +0 -1
  102. package/dist/simulation.d.ts +0 -8
  103. package/dist/simulation.d.ts.map +0 -1
  104. package/dist/simulation.js +0 -21
  105. package/dist/simulation.js.map +0 -1
  106. package/dist/tier.d.ts +0 -5
  107. package/dist/tier.d.ts.map +0 -1
  108. package/dist/tier.js +0 -10
  109. package/dist/tier.js.map +0 -1
  110. package/dist/trace-tree.d.ts +0 -20
  111. package/dist/trace-tree.d.ts.map +0 -1
  112. package/dist/trace-tree.js +0 -92
  113. package/dist/trace-tree.js.map +0 -1
  114. package/dist/trace.d.ts +0 -41
  115. package/dist/trace.d.ts.map +0 -1
  116. package/dist/trace.js +0 -88
  117. package/dist/trace.js.map +0 -1
  118. package/dist/version.d.ts +0 -3
  119. package/dist/version.d.ts.map +0 -1
  120. package/dist/version.js +0 -3
  121. package/dist/version.js.map +0 -1
package/dist/expect.js DELETED
@@ -1,330 +0,0 @@
1
- import { randomUUID } from "node:crypto";
2
- import { TYPE_CONSTRAINT, TYPE_CONTENT, TYPE_EMBEDDING, TYPE_LLM_JUDGE, TYPE_SCHEMA, TYPE_TRACE, TYPE_TRACE_TREE, } from "./proto/constants.js";
3
- import { AgentResult } from "./result.js";
4
- export class ExpectChain {
5
- _result;
6
- _assertions = [];
7
- constructor(result) {
8
- this._result = result;
9
- }
10
- get assertions() {
11
- return [...this._assertions];
12
- }
13
- get trace() {
14
- return this._result.trace;
15
- }
16
- add(assertionType, spec) {
17
- this._assertions.push({
18
- assertion_id: `assert_${randomUUID().replace(/-/g, "").slice(0, 8)}`,
19
- type: assertionType,
20
- spec,
21
- });
22
- return this;
23
- }
24
- // -- Layer 1: Schema --
25
- outputMatchesSchema(schema) {
26
- return this.add(TYPE_SCHEMA, { target: "output.structured", schema });
27
- }
28
- outputFieldMatchesSchema(field, schema) {
29
- return this.add(TYPE_SCHEMA, { target: `output.${field}`, schema });
30
- }
31
- toolArgsMatchSchema(toolName, schema) {
32
- return this.add(TYPE_SCHEMA, {
33
- target: `steps[?name=='${toolName}'].args`,
34
- schema,
35
- });
36
- }
37
- toolResultMatchesSchema(toolName, schema) {
38
- return this.add(TYPE_SCHEMA, {
39
- target: `steps[?name=='${toolName}'].result`,
40
- schema,
41
- });
42
- }
43
- // -- Layer 2: Constraints --
44
- costUnder(maxCost, opts) {
45
- return this.add(TYPE_CONSTRAINT, {
46
- field: "metadata.cost_usd",
47
- operator: "lte",
48
- value: maxCost,
49
- soft: opts?.soft ?? false,
50
- });
51
- }
52
- latencyUnder(maxMs, opts) {
53
- return this.add(TYPE_CONSTRAINT, {
54
- field: "metadata.latency_ms",
55
- operator: "lte",
56
- value: maxMs,
57
- soft: opts?.soft ?? false,
58
- });
59
- }
60
- tokensUnder(maxTokens, opts) {
61
- return this.add(TYPE_CONSTRAINT, {
62
- field: "metadata.total_tokens",
63
- operator: "lte",
64
- value: maxTokens,
65
- soft: opts?.soft ?? false,
66
- });
67
- }
68
- tokensBetween(minTokens, maxTokens, opts) {
69
- return this.add(TYPE_CONSTRAINT, {
70
- field: "metadata.total_tokens",
71
- operator: "between",
72
- min: minTokens,
73
- max: maxTokens,
74
- soft: opts?.soft ?? false,
75
- });
76
- }
77
- stepCount(operator, value, opts) {
78
- return this.add(TYPE_CONSTRAINT, {
79
- field: "steps.length",
80
- operator,
81
- value,
82
- soft: opts?.soft ?? false,
83
- });
84
- }
85
- toolCallCount(operator, value, opts) {
86
- return this.add(TYPE_CONSTRAINT, {
87
- field: "steps[?type=='tool_call'].length",
88
- operator,
89
- value,
90
- soft: opts?.soft ?? false,
91
- });
92
- }
93
- constraint(field, operator, opts) {
94
- const spec = {
95
- field,
96
- operator,
97
- soft: opts?.soft ?? false,
98
- };
99
- if (opts?.value !== undefined)
100
- spec.value = opts.value;
101
- if (opts?.min !== undefined)
102
- spec.min = opts.min;
103
- if (opts?.max !== undefined)
104
- spec.max = opts.max;
105
- return this.add(TYPE_CONSTRAINT, spec);
106
- }
107
- // -- Layer 3: Trace --
108
- toolsCalledInOrder(tools, opts) {
109
- return this.add(TYPE_TRACE, {
110
- check: "contains_in_order",
111
- tools,
112
- soft: opts?.soft ?? false,
113
- });
114
- }
115
- toolsCalledExactly(tools, opts) {
116
- return this.add(TYPE_TRACE, {
117
- check: "exact_order",
118
- tools,
119
- soft: opts?.soft ?? false,
120
- });
121
- }
122
- noToolLoops(tool, maxRepetitions = 1, opts) {
123
- return this.add(TYPE_TRACE, {
124
- check: "loop_detection",
125
- tool,
126
- max_repetitions: maxRepetitions,
127
- soft: opts?.soft ?? false,
128
- });
129
- }
130
- noDuplicateTools(opts) {
131
- return this.add(TYPE_TRACE, { check: "no_duplicates", soft: opts?.soft ?? false });
132
- }
133
- requiredTools(tools, opts) {
134
- return this.add(TYPE_TRACE, {
135
- check: "required_tools",
136
- tools,
137
- soft: opts?.soft ?? false,
138
- });
139
- }
140
- forbiddenTools(tools, opts) {
141
- return this.add(TYPE_TRACE, {
142
- check: "forbidden_tools",
143
- tools,
144
- soft: opts?.soft ?? false,
145
- });
146
- }
147
- // -- Layer 4: Content --
148
- outputContains(value, opts) {
149
- return this.add(TYPE_CONTENT, {
150
- target: "output.message",
151
- check: "contains",
152
- value,
153
- case_sensitive: opts?.caseSensitive ?? false,
154
- soft: opts?.soft ?? false,
155
- });
156
- }
157
- outputNotContains(value, opts) {
158
- return this.add(TYPE_CONTENT, {
159
- target: "output.message",
160
- check: "not_contains",
161
- value,
162
- case_sensitive: opts?.caseSensitive ?? false,
163
- soft: opts?.soft ?? false,
164
- });
165
- }
166
- outputMatchesRegex(pattern, opts) {
167
- return this.add(TYPE_CONTENT, {
168
- target: "output.message",
169
- check: "regex_match",
170
- value: pattern,
171
- soft: opts?.soft ?? false,
172
- });
173
- }
174
- outputHasAllKeywords(keywords, opts) {
175
- return this.add(TYPE_CONTENT, {
176
- target: "output.message",
177
- check: "keyword_all",
178
- values: keywords,
179
- case_sensitive: opts?.caseSensitive ?? false,
180
- soft: opts?.soft ?? false,
181
- });
182
- }
183
- outputHasAnyKeyword(keywords, opts) {
184
- return this.add(TYPE_CONTENT, {
185
- target: "output.message",
186
- check: "keyword_any",
187
- values: keywords,
188
- case_sensitive: opts?.caseSensitive ?? false,
189
- soft: opts?.soft ?? false,
190
- });
191
- }
192
- outputForbids(terms) {
193
- return this.add(TYPE_CONTENT, {
194
- target: "output.message",
195
- check: "forbidden",
196
- values: terms,
197
- });
198
- }
199
- contentContains(target, value, opts) {
200
- return this.add(TYPE_CONTENT, {
201
- target,
202
- check: "contains",
203
- value,
204
- case_sensitive: opts?.caseSensitive ?? false,
205
- soft: opts?.soft ?? false,
206
- });
207
- }
208
- // -- Layer 5: Embedding Similarity --
209
- outputSimilarTo(reference, opts) {
210
- return this.add(TYPE_EMBEDDING, {
211
- target: "output.message",
212
- reference,
213
- threshold: opts?.threshold ?? 0.8,
214
- model: opts?.model,
215
- soft: opts?.soft ?? false,
216
- });
217
- }
218
- // -- Layer 6: LLM Judge --
219
- passesJudge(criteria, opts) {
220
- return this.add(TYPE_LLM_JUDGE, {
221
- target: "output.message",
222
- criteria,
223
- rubric: opts?.rubric ?? "default",
224
- threshold: opts?.threshold ?? 0.8,
225
- model: opts?.model,
226
- soft: opts?.soft ?? false,
227
- });
228
- }
229
- // -- Layer 7: Trace Tree (Multi-Agent) --
230
- agentCalled(agentId, opts) {
231
- return this.add(TYPE_TRACE_TREE, {
232
- check: "agent_called",
233
- agent_id: agentId,
234
- soft: opts?.soft ?? false,
235
- });
236
- }
237
- delegationDepth(maxDepth, opts) {
238
- return this.add(TYPE_TRACE_TREE, {
239
- check: "delegation_depth",
240
- max_depth: maxDepth,
241
- soft: opts?.soft ?? false,
242
- });
243
- }
244
- agentOutputContains(agentId, value, opts) {
245
- return this.add(TYPE_TRACE_TREE, {
246
- check: "agent_output_contains",
247
- agent_id: agentId,
248
- value,
249
- case_sensitive: opts?.caseSensitive ?? false,
250
- soft: opts?.soft ?? false,
251
- });
252
- }
253
- crossAgentDataFlow(fromAgent, toAgent, field, opts) {
254
- return this.add(TYPE_TRACE_TREE, {
255
- check: "cross_agent_data_flow",
256
- from_agent: fromAgent,
257
- to_agent: toAgent,
258
- field,
259
- soft: opts?.soft ?? false,
260
- });
261
- }
262
- followsTransitions(transitions, opts) {
263
- return this.add(TYPE_TRACE_TREE, {
264
- check: "follows_transitions",
265
- transitions,
266
- soft: opts?.soft ?? false,
267
- });
268
- }
269
- aggregateCostUnder(maxCost, opts) {
270
- return this.add(TYPE_TRACE_TREE, {
271
- check: "aggregate_cost",
272
- operator: "lte",
273
- value: maxCost,
274
- soft: opts?.soft ?? false,
275
- });
276
- }
277
- aggregateTokensUnder(maxTokens, opts) {
278
- return this.add(TYPE_TRACE_TREE, {
279
- check: "aggregate_tokens",
280
- operator: "lte",
281
- value: maxTokens,
282
- soft: opts?.soft ?? false,
283
- });
284
- }
285
- agentOrderedBefore(agentA, agentB, opts) {
286
- return this.add(TYPE_TRACE_TREE, {
287
- check: "agent_ordered_before",
288
- agent_a: agentA,
289
- agent_b: agentB,
290
- soft: opts?.soft ?? false,
291
- });
292
- }
293
- agentsOverlap(agentA, agentB, opts) {
294
- return this.add(TYPE_TRACE_TREE, {
295
- check: "agents_overlap",
296
- agent_a: agentA,
297
- agent_b: agentB,
298
- soft: opts?.soft ?? false,
299
- });
300
- }
301
- agentWallTimeUnder(agentId, maxMs, opts) {
302
- return this.add(TYPE_TRACE_TREE, {
303
- check: "agent_wall_time_under",
304
- agent_id: agentId,
305
- max_ms: maxMs,
306
- soft: opts?.soft ?? false,
307
- });
308
- }
309
- orderedAgents(groups, opts) {
310
- return this.add(TYPE_TRACE_TREE, {
311
- check: "ordered_agents",
312
- groups,
313
- soft: opts?.soft ?? false,
314
- });
315
- }
316
- }
317
- /**
318
- * Create an assertion chain for an agent result.
319
- *
320
- * Accepts either an {@link AgentResult} or a raw {@link Trace}. When a
321
- * `Trace` is passed it is automatically wrapped in an `AgentResult`.
322
- */
323
- export function attestExpect(result) {
324
- if (result instanceof AgentResult) {
325
- return new ExpectChain(result);
326
- }
327
- // Treat as Trace — wrap in AgentResult
328
- return new ExpectChain(new AgentResult(result));
329
- }
330
- //# sourceMappingURL=expect.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"expect.js","sourceRoot":"","sources":["../src/expect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EACL,eAAe,EACf,YAAY,EACZ,cAAc,EACd,cAAc,EACd,WAAW,EACX,UAAU,EACV,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,OAAO,WAAW;IACL,OAAO,CAAc;IACrB,WAAW,GAAgB,EAAE,CAAC;IAE/C,YAAY,MAAmB;QAC7B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC;IAC/B,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;IAC5B,CAAC;IAEO,GAAG,CAAC,aAAqB,EAAE,IAA6B;QAC9D,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;YACpB,YAAY,EAAE,UAAU,UAAU,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,C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,MAAM;YACf,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,KAAK;SAC1B,CAAC,CAAC;IACL,CAAC;IAED,kBAAkB,CAAC,OAAe,EAAE,KAAa,EAAE,IAAyB;QAC1E,OAAO,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE;YAC/B,KAAK,EAAE,uBAAuB;YAC9B,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,KAAK;SAC1B,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,MAAkB,EAAE,IAAyB;QACzD,OAAO,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE;YAC/B,KAAK,EAAE,gBAAgB;YACvB,MAAM;YACN,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,KAAK;SAC1B,CAAC,CAAC;IACL,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,MAA2B;IACtD,IAAI,MAAM,YAAY,WAAW,EAAE,CAAC;QAClC,OAAO,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IACD,uCAAuC;IACvC,OAAO,IAAI,WAAW,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AAClD,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,16 +0,0 @@
1
- export * from "./proto/index.js";
2
- export { VERSION, ENGINE_VERSION } from "./version.js";
3
- export { EngineManager } from "./engine-manager.js";
4
- export { AttestClient } from "./client.js";
5
- export { TraceBuilder } from "./trace.js";
6
- export { AgentResult } from "./result.js";
7
- export { TraceTree } from "./trace-tree.js";
8
- export { ExpectChain, attestExpect } from "./expect.js";
9
- export { Agent, agent } from "./agent.js";
10
- export { delegate } from "./delegate.js";
11
- export { activeBuilder } from "./context.js";
12
- export { TIER_1, TIER_2, TIER_3, tier } from "./tier.js";
13
- export { config, isSimulationMode, resetConfig } from "./config.js";
14
- export type { TraceAdapter } from "./adapters/index.js";
15
- export { ManualAdapter, OpenAIAdapter, AnthropicAdapter, GeminiAdapter, OllamaAdapter, OTelAdapter, } from "./adapters/index.js";
16
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACpE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,WAAW,GACZ,MAAM,qBAAqB,CAAC"}
package/dist/index.js DELETED
@@ -1,15 +0,0 @@
1
- export * from "./proto/index.js";
2
- export { VERSION, ENGINE_VERSION } from "./version.js";
3
- export { EngineManager } from "./engine-manager.js";
4
- export { AttestClient } from "./client.js";
5
- export { TraceBuilder } from "./trace.js";
6
- export { AgentResult } from "./result.js";
7
- export { TraceTree } from "./trace-tree.js";
8
- export { ExpectChain, attestExpect } from "./expect.js";
9
- export { Agent, agent } from "./agent.js";
10
- export { delegate } from "./delegate.js";
11
- export { activeBuilder } from "./context.js";
12
- export { TIER_1, TIER_2, TIER_3, tier } from "./tier.js";
13
- export { config, isSimulationMode, resetConfig } from "./config.js";
14
- export { ManualAdapter, OpenAIAdapter, AnthropicAdapter, GeminiAdapter, OllamaAdapter, OTelAdapter, } from "./adapters/index.js";
15
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEpE,OAAO,EACL,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,WAAW,GACZ,MAAM,qBAAqB,CAAC"}
@@ -1,20 +0,0 @@
1
- import type { RPCResponse } from "./types.js";
2
- /**
3
- * Encode a JSON-RPC 2.0 request as an NDJSON line.
4
- */
5
- export declare function encodeRequest(id: number, method: string, params: Record<string, unknown>): string;
6
- /**
7
- * Decode a JSON-RPC 2.0 response from an NDJSON line.
8
- * Throws ProtocolError if the response contains an error.
9
- * Throws Error for malformed JSON or invalid responses.
10
- */
11
- export declare function decodeResponse(line: string): RPCResponse;
12
- /**
13
- * Extract the result field from a decoded response.
14
- */
15
- export declare function extractResult(response: RPCResponse): unknown;
16
- /**
17
- * Extract the request ID from a decoded response.
18
- */
19
- export declare function extractId(response: RPCResponse): number;
20
- //# sourceMappingURL=codec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../src/proto/codec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,YAAY,CAAC;AAGzD;;GAEG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,MAAM,CAQR;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CA4CxD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAK5D;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAKvD"}
@@ -1,71 +0,0 @@
1
- import { ProtocolError } from "./errors.js";
2
- /**
3
- * Encode a JSON-RPC 2.0 request as an NDJSON line.
4
- */
5
- export function encodeRequest(id, method, params) {
6
- const msg = {
7
- jsonrpc: "2.0",
8
- id,
9
- method,
10
- params,
11
- };
12
- return JSON.stringify(msg) + "\n";
13
- }
14
- /**
15
- * Decode a JSON-RPC 2.0 response from an NDJSON line.
16
- * Throws ProtocolError if the response contains an error.
17
- * Throws Error for malformed JSON or invalid responses.
18
- */
19
- export function decodeResponse(line) {
20
- const text = line.trim();
21
- if (!text) {
22
- throw new Error("empty response line");
23
- }
24
- let data;
25
- try {
26
- data = JSON.parse(text);
27
- }
28
- catch (e) {
29
- throw new Error(`malformed JSON response: ${e instanceof Error ? e.message : String(e)}`);
30
- }
31
- if (typeof data !== "object" || data === null || Array.isArray(data)) {
32
- throw new Error(`expected JSON object, got ${Array.isArray(data) ? "array" : typeof data}`);
33
- }
34
- const obj = data;
35
- if (obj.jsonrpc !== "2.0") {
36
- throw new Error(`invalid jsonrpc version: ${String(obj.jsonrpc)}`);
37
- }
38
- if (obj.error != null) {
39
- const err = obj.error;
40
- let errorData;
41
- if (err.data != null) {
42
- const raw = err.data;
43
- errorData = {
44
- error_type: raw.error_type ?? "",
45
- retryable: raw.retryable ?? false,
46
- detail: raw.detail ?? "",
47
- };
48
- }
49
- throw new ProtocolError(err.code ?? -1, err.message ?? "unknown error", errorData);
50
- }
51
- return obj;
52
- }
53
- /**
54
- * Extract the result field from a decoded response.
55
- */
56
- export function extractResult(response) {
57
- if (response.result === undefined) {
58
- throw new Error("response missing 'result' field");
59
- }
60
- return response.result;
61
- }
62
- /**
63
- * Extract the request ID from a decoded response.
64
- */
65
- export function extractId(response) {
66
- if (response.id === undefined) {
67
- throw new Error("response missing 'id' field");
68
- }
69
- return Number(response.id);
70
- }
71
- //# sourceMappingURL=codec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codec.js","sourceRoot":"","sources":["../../src/proto/codec.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;GAEG;AACH,MAAM,UAAU,aAAa,CAC3B,EAAU,EACV,MAAc,EACd,MAA+B;IAE/B,MAAM,GAAG,GAAG;QACV,OAAO,EAAE,KAAc;QACvB,EAAE;QACF,M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AC,IAAI,IAAI,IAAI,EAAE,CAAC;YACrB,MAAM,GAAG,GAAG,GAAG,CAAC,IAA+B,CAAC;YAChD,SAAS,GAAG;gBACV,UAAU,EAAG,GAAG,CAAC,UAAqB,IAAI,EAAE;gBAC5C,SAAS,EAAG,GAAG,CAAC,SAAqB,IAAI,KAAK;gBAC9C,MAAM,EAAG,GAAG,CAAC,MAAiB,IAAI,EAAE;aACrC,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,aAAa,CACpB,GAAG,CAAC,IAAe,IAAI,CAAC,CAAC,EACzB,GAAG,CAAC,OAAkB,IAAI,eAAe,EAC1C,SAAS,CACV,CAAC;IACJ,CAAC;IAED,OAAO,GAA6B,CAAC;AACvC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,QAAqB;IACjD,IAAI,QAAQ,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;IACD,OAAO,QAAQ,CAAC,MAAM,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,QAAqB;IAC7C,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC7B,CAAC"}
@@ -1,21 +0,0 @@
1
- export declare const STEP_LLM_CALL: "llm_call";
2
- export declare const STEP_TOOL_CALL: "tool_call";
3
- export declare const STEP_RETRIEVAL: "retrieval";
4
- export declare const STEP_AGENT_CALL: "agent_call";
5
- export declare const STATUS_PASS: "pass";
6
- export declare const STATUS_SOFT_FAIL: "soft_fail";
7
- export declare const STATUS_HARD_FAIL: "hard_fail";
8
- export declare const TYPE_SCHEMA: "schema";
9
- export declare const TYPE_CONSTRAINT: "constraint";
10
- export declare const TYPE_TRACE: "trace";
11
- export declare const TYPE_CONTENT: "content";
12
- export declare const TYPE_EMBEDDING: "embedding";
13
- export declare const TYPE_LLM_JUDGE: "llm_judge";
14
- export declare const TYPE_TRACE_TREE: "trace_tree";
15
- export declare const ERR_INVALID_TRACE: 1001;
16
- export declare const ERR_ASSERTION_ERROR: 1002;
17
- export declare const ERR_PROVIDER_ERROR: 2001;
18
- export declare const ERR_ENGINE_ERROR: 3001;
19
- export declare const ERR_TIMEOUT: 3002;
20
- export declare const ERR_SESSION_ERROR: 3003;
21
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/proto/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,EAAG,UAAmB,CAAC;AACjD,eAAO,MAAM,cAAc,EAAG,WAAoB,CAAC;AACnD,eAAO,MAAM,cAAc,EAAG,WAAoB,CAAC;AACnD,eAAO,MAAM,eAAe,EAAG,YAAqB,CAAC;AAGrD,eAAO,MAAM,WAAW,EAAG,MAAe,CAAC;AAC3C,eAAO,MAAM,gBAAgB,EAAG,WAAoB,CAAC;AACrD,eAAO,MAAM,gBAAgB,EAAG,WAAoB,CAAC;AAGrD,eAAO,MAAM,WAAW,EAAG,QAAiB,CAAC;AAC7C,eAAO,MAAM,eAAe,EAAG,YAAqB,CAAC;AACrD,eAAO,MAAM,UAAU,EAAG,OAAgB,CAAC;AAC3C,eAAO,MAAM,YAAY,EAAG,SAAkB,CAAC;AAC/C,eAAO,MAAM,cAAc,EAAG,WAAoB,CAAC;AACnD,eAAO,MAAM,cAAc,EAAG,WAAoB,CAAC;AACnD,eAAO,MAAM,eAAe,EAAG,YAAqB,CAAC;AAGrD,eAAO,MAAM,iBAAiB,EAAG,IAAa,CAAC;AAC/C,eAAO,MAAM,mBAAmB,EAAG,IAAa,CAAC;AACjD,eAAO,MAAM,kBAAkB,EAAG,IAAa,CAAC;AAChD,eAAO,MAAM,gBAAgB,EAAG,IAAa,CAAC;AAC9C,eAAO,MAAM,WAAW,EAAG,IAAa,CAAC;AACzC,eAAO,MAAM,iBAAiB,EAAG,IAAa,CAAC"}
@@ -1,25 +0,0 @@
1
- // Step type constants
2
- export const STEP_LLM_CALL = "llm_call";
3
- export const STEP_TOOL_CALL = "tool_call";
4
- export const STEP_RETRIEVAL = "retrieval";
5
- export const STEP_AGENT_CALL = "agent_call";
6
- // Status constants
7
- export const STATUS_PASS = "pass";
8
- export const STATUS_SOFT_FAIL = "soft_fail";
9
- export const STATUS_HARD_FAIL = "hard_fail";
10
- // Assertion type constants
11
- export const TYPE_SCHEMA = "schema";
12
- export const TYPE_CONSTRAINT = "constraint";
13
- export const TYPE_TRACE = "trace";
14
- export const TYPE_CONTENT = "content";
15
- export const TYPE_EMBEDDING = "embedding";
16
- export const TYPE_LLM_JUDGE = "llm_judge";
17
- export const TYPE_TRACE_TREE = "trace_tree";
18
- // Error code constants
19
- export const ERR_INVALID_TRACE = 1001;
20
- export const ERR_ASSERTION_ERROR = 1002;
21
- export const ERR_PROVIDER_ERROR = 2001;
22
- export const ERR_ENGINE_ERROR = 3001;
23
- export const ERR_TIMEOUT = 3002;
24
- export const ERR_SESSION_ERROR = 3003;
25
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/proto/constants.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,MAAM,CAAC,MAAM,aAAa,GAAG,UAAmB,CAAC;AACjD,MAAM,CAAC,MAAM,cAAc,GAAG,WAAoB,CAAC;AACnD,MAAM,CAAC,MAAM,cAAc,GAAG,WAAoB,CAAC;AACnD,MAAM,CAAC,MAAM,eAAe,GAAG,YAAqB,CAAC;AAErD,mBAAmB;AACnB,MAAM,CAAC,MAAM,WAAW,GAAG,MAAe,CAAC;AAC3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAoB,CAAC;AACrD,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAoB,CAAC;AAErD,2BAA2B;AAC3B,MAAM,CAAC,MAAM,WAAW,GAAG,QAAiB,CAAC;AAC7C,MAAM,CAAC,MAAM,eAAe,GAAG,YAAqB,CAAC;AACrD,MAAM,CAAC,MAAM,UAAU,GAAG,OAAgB,CAAC;AAC3C,MAAM,CAAC,MAAM,YAAY,GAAG,SAAkB,CAAC;AAC/C,MAAM,CAAC,MAAM,cAAc,GAAG,WAAoB,CAAC;AACnD,MAAM,CAAC,MAAM,cAAc,GAAG,WAAoB,CAAC;AACnD,MAAM,CAAC,MAAM,eAAe,GAAG,YAAqB,CAAC;AAErD,uBAAuB;AACvB,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAa,CAAC;AAC/C,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAa,CAAC;AACjD,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAa,CAAC;AAChD,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAa,CAAC;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,IAAa,CAAC;AACzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAa,CAAC"}
@@ -1,13 +0,0 @@
1
- import type { ErrorData } from "./types.js";
2
- export declare class ProtocolError extends Error {
3
- readonly code: number;
4
- readonly errorMessage: string;
5
- readonly data: ErrorData | undefined;
6
- constructor(code: number, message: string, data?: ErrorData);
7
- }
8
- export declare class EngineTimeoutError extends Error {
9
- readonly method: string;
10
- readonly timeoutMs: number;
11
- constructor(method: string, timeoutMs: number);
12
- }
13
- //# sourceMappingURL=errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/proto/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;gBAEzB,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS;CAO5D;AAED,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;gBAEf,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAS9C"}
@@ -1,24 +0,0 @@
1
- export class ProtocolError extends Error {
2
- code;
3
- errorMessage;
4
- data;
5
- constructor(code, message, data) {
6
- super(message);
7
- this.name = "ProtocolError";
8
- this.code = code;
9
- this.errorMessage = message;
10
- this.data = data;
11
- }
12
- }
13
- export class EngineTimeoutError extends Error {
14
- method;
15
- timeoutMs;
16
- constructor(method, timeoutMs) {
17
- super(`Engine request '${method}' timed out after ${timeoutMs}ms. ` +
18
- "Set ATTEST_ENGINE_TIMEOUT to increase the limit.");
19
- this.name = "EngineTimeoutError";
20
- this.method = method;
21
- this.timeoutMs = timeoutMs;
22
- }
23
- }
24
- //# sourceMappingURL=errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/proto/errors.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,aAAc,SAAQ,KAAK;IAC7B,IAAI,CAAS;IACb,YAAY,CAAS;IACrB,IAAI,CAAwB;IAErC,YAAY,IAAY,EAAE,OAAe,EAAE,IAAgB;QACzD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAED,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAClC,MAAM,CAAS;IACf,SAAS,CAAS;IAE3B,YAAY,MAAc,EAAE,SAAiB;QAC3C,KAAK,CACH,mBAAmB,MAAM,qBAAqB,SAAS,MAAM;YAC3D,kDAAkD,CACrD,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;CACF"}
@@ -1,5 +0,0 @@
1
- export * from "./constants.js";
2
- export * from "./types.js";
3
- export * from "./errors.js";
4
- export { encodeRequest, decodeResponse, extractResult, extractId } from "./codec.js";
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/proto/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}
@@ -1,5 +0,0 @@
1
- export * from "./constants.js";
2
- export * from "./types.js";
3
- export * from "./errors.js";
4
- export { encodeRequest, decodeResponse, extractResult, extractId } from "./codec.js";
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/proto/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}