mesedi 0.7.0 → 0.7.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 (62) hide show
  1. package/README.md +114 -24
  2. package/dist/anthropic_integration.js +1 -1
  3. package/dist/anthropic_integration.js.map +1 -1
  4. package/dist/client.d.ts +1 -1
  5. package/dist/client.js +1 -1
  6. package/dist/client.js.map +1 -1
  7. package/dist/cohere_integration.d.ts +1 -1
  8. package/dist/cohere_integration.js +3 -3
  9. package/dist/cohere_integration.js.map +1 -1
  10. package/dist/errors.d.ts +27 -3
  11. package/dist/errors.d.ts.map +1 -1
  12. package/dist/errors.js +68 -7
  13. package/dist/errors.js.map +1 -1
  14. package/dist/events.d.ts +1 -1
  15. package/dist/events.js +10 -10
  16. package/dist/events.js.map +1 -1
  17. package/dist/gemini_integration.d.ts +2 -2
  18. package/dist/gemini_integration.js +3 -3
  19. package/dist/gemini_integration.js.map +1 -1
  20. package/dist/halt_stream.js +1 -1
  21. package/dist/halt_stream.js.map +1 -1
  22. package/dist/integrations/_integration_helpers.d.ts +98 -0
  23. package/dist/integrations/_integration_helpers.d.ts.map +1 -0
  24. package/dist/integrations/_integration_helpers.js +149 -0
  25. package/dist/integrations/_integration_helpers.js.map +1 -0
  26. package/dist/integrations/langchain.d.ts +4 -4
  27. package/dist/integrations/langchain.d.ts.map +1 -1
  28. package/dist/integrations/langchain.js +239 -13
  29. package/dist/integrations/langchain.js.map +1 -1
  30. package/dist/integrations/langgraph.d.ts +6 -6
  31. package/dist/integrations/langgraph.js +6 -6
  32. package/dist/integrations/mastra.d.ts +13 -7
  33. package/dist/integrations/mastra.d.ts.map +1 -1
  34. package/dist/integrations/mastra.js +237 -23
  35. package/dist/integrations/mastra.js.map +1 -1
  36. package/dist/integrations/openai_agents.d.ts +3 -3
  37. package/dist/integrations/openai_agents.js +3 -3
  38. package/dist/integrations/promptfoo.d.ts +1 -1
  39. package/dist/integrations/promptfoo.js +1 -1
  40. package/dist/integrations/ragas.d.ts +1 -1
  41. package/dist/integrations/ragas.js +1 -1
  42. package/dist/integrations/vectara.d.ts +3 -3
  43. package/dist/integrations/vectara.js +3 -3
  44. package/dist/observe.d.ts +16 -16
  45. package/dist/observe.js +8 -8
  46. package/dist/ollama_integration.d.ts +5 -5
  47. package/dist/ollama_integration.js +10 -10
  48. package/dist/ollama_integration.js.map +1 -1
  49. package/dist/openai_integration.d.ts +3 -3
  50. package/dist/openai_integration.js +6 -6
  51. package/dist/openai_integration.js.map +1 -1
  52. package/dist/tool.d.ts +34 -0
  53. package/dist/tool.d.ts.map +1 -1
  54. package/dist/tool.js +46 -4
  55. package/dist/tool.js.map +1 -1
  56. package/dist/truncate.d.ts +4 -4
  57. package/dist/truncate.js +4 -4
  58. package/dist/vertex_gemini_integration.d.ts +2 -2
  59. package/dist/vertex_gemini_integration.js +2 -2
  60. package/dist/wrap.d.ts +3 -3
  61. package/dist/wrap.js +1 -1
  62. package/package.json +19 -7
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Mastra integration for Mesedi (Wave 4.B).
2
+ * Mastra integration for Mesedi (.B).
3
3
  *
4
4
  * Ships as a Mastra Observability exporter. Consumes Mastra's built-in
5
5
  * tracing events and translates them into Mesedi's execution / event
@@ -15,11 +15,17 @@
15
15
  * // Once, on Mesedi setup.
16
16
  * configure({ apiKey: process.env.MESEDI_API_KEY });
17
17
  *
18
- * // Then wire the exporter into Mastra.
18
+ * // Then wire the exporter into Mastra. Mastra 1.x requires the
19
+ * // `configs` shape below: the `exporters: {...}` root shape from
20
+ * // pre-1.x is silently ignored and no spans reach the exporter.
19
21
  * const mastra = new Mastra({
20
22
  * observability: new Observability({
21
- * exporters: {
22
- * mesedi: new MesediExporter(),
23
+ * configs: {
24
+ * mesedi: {
25
+ * serviceName: "my-app",
26
+ * exporters: [new MesediExporter()],
27
+ * sampling: { type: "always" },
28
+ * },
23
29
  * },
24
30
  * }),
25
31
  * // ...your agents / workflows
@@ -32,7 +38,7 @@
32
38
  * observability integration is to implement an Observability exporter
33
39
  * that consumes those spans. Unlike the other Mesedi integrations
34
40
  * (LangGraph, OpenAI Agents, Vercel AI SDK), the customer does NOT
35
- * need to wrap their entry function with `mesedi.wrap()` — Mastra's
41
+ * need to wrap their entry function with `mesedi.wrap()`: Mastra's
36
42
  * AGENT_RUN / WORKFLOW_RUN root span is the execution boundary. The
37
43
  * exporter opens a Mesedi execution on root-span-start and closes it
38
44
  * on root-span-end. All descendant spans on the same trace flow into
@@ -48,7 +54,7 @@
48
54
  * - Other span types (RAG_*, MEMORY_OPERATION, WORKSPACE_ACTION,
49
55
  * SCORER_*, MAPPING, PROCESSOR_RUN, MODEL_STEP / MODEL_INFERENCE /
50
56
  * MODEL_CHUNK) are silently ignored in v1. MODEL_GENERATION is
51
- * the aggregating span for a full model call — the finer-grained
57
+ * the aggregating span for a full model call: the finer-grained
52
58
  * step / inference / chunk spans are noise for Mesedi's detectors
53
59
  * and are already rolled up by Mastra.
54
60
  *
@@ -58,6 +64,7 @@
58
64
  */
59
65
  import { getClient } from "../client.js";
60
66
  import { newEventId, newExecutionId } from "../context.js";
67
+ import { classifyByProviderName, ErrorClass, } from "../errors.js";
61
68
  import { EventType, Status, utcNowRfc3339, } from "../events.js";
62
69
  // ── Peer-dep imports ─────────────────────────────────────────────────
63
70
  //
@@ -87,6 +94,15 @@ const SPAN_WORKFLOW_STEP = "workflow_step";
87
94
  const MAX_STATE_REPR = 1000;
88
95
  const MAX_TOOL_INPUT_REPR = 200;
89
96
  const MAX_TOOL_OUTPUT_REPR = 500;
97
+ const MAX_EXC_MSG = 500;
98
+ // user_message needs a taller cap than other state
99
+ // fields because backend detectors (token_waste requires 2048+ char
100
+ // shared prefix, drift lexical uses the full text for similarity
101
+ // scoring) score on the raw user_message content. Wire payload size
102
+ // is bounded elsewhere (payload truncation applies on the
103
+ // outer envelope). 8 KB comfortably clears the 2 KB token_waste
104
+ // threshold while staying well under the wire cap.
105
+ const MAX_USER_MSG = 8192;
90
106
  /**
91
107
  * Mesedi observability exporter for Mastra. Attach an instance via
92
108
  * `Observability({ exporters: { mesedi: new MesediExporter() } })` on
@@ -187,15 +203,28 @@ export class MesediExporter extends BaseExporter {
187
203
  return;
188
204
  switch (span.type) {
189
205
  case SPAN_AGENT_RUN:
190
- case SPAN_WORKFLOW_RUN:
206
+ case SPAN_WORKFLOW_RUN: {
207
+ // only the ROOT agent_run / workflow_run closes the
208
+ // Mesedi execution. Nested agent_runs (e.g. a workflow step
209
+ // that calls `agent.generate()`) are legitimate customer
210
+ // patterns for looping / cost-accumulating scenarios, and
211
+ // must NOT prematurely close the outer execution — the
212
+ // identical_call / cost_velocity detectors group per-execution,
213
+ // so an early close would split the signal across two
214
+ // executions and silence the detector. We still emit the
215
+ // exit checkpoint so semantic_loop and drift can see the
216
+ // inner-agent-run boundary.
191
217
  this.emitEvent(executionId, EventType.CHECKPOINT, {
192
218
  name: `mastra.${span.type}.exit`,
193
219
  agent: extractAgentName(span),
194
220
  agent_event: "exit",
195
221
  state_repr: summarize(outputRepr(span)),
196
222
  });
197
- this.closeExecution(traceId, executionId, span);
223
+ if (isRootSpan(span)) {
224
+ this.closeExecution(traceId, executionId, span);
225
+ }
198
226
  break;
227
+ }
199
228
  case SPAN_MODEL_GENERATION:
200
229
  this.emitEvent(executionId, EventType.LLM_CALL, modelPayload(span));
201
230
  break;
@@ -206,12 +235,26 @@ export class MesediExporter extends BaseExporter {
206
235
  ? EventType.MCP_CALL
207
236
  : EventType.TOOL_CALL, toolPayload(span));
208
237
  break;
209
- case SPAN_WORKFLOW_STEP:
210
- this.emitEvent(executionId, EventType.CHECKPOINT, {
238
+ case SPAN_WORKFLOW_STEP: {
239
+ // backend semantic_loop.G3 detector groups
240
+ // checkpoints by canonical hash of `payload.metadata`
241
+ // (semantic_loop.go extractState reads `metadata`, not
242
+ // `state_repr`). Direct SDK's checkpoint() ships {name,
243
+ // metadata} too — matching that shape unblocks Mastra
244
+ // customers using workflows with 3+ identical-return steps.
245
+ // state_repr stays for dashboard display but the detector-
246
+ // relevant field is metadata (raw structured object).
247
+ const rawOutput = outputRepr(span);
248
+ const payload = {
211
249
  name: `mastra.workflow_step.${extractName(span) ?? "unknown"}`,
212
- state_repr: summarize(outputRepr(span)),
213
- });
250
+ state_repr: summarize(rawOutput),
251
+ };
252
+ if (rawOutput && typeof rawOutput === "object") {
253
+ payload["metadata"] = rawOutput;
254
+ }
255
+ this.emitEvent(executionId, EventType.CHECKPOINT, payload);
214
256
  break;
257
+ }
215
258
  // All other span types are ignored in v1. See the file header
216
259
  // comment for rationale.
217
260
  default:
@@ -300,39 +343,210 @@ function outputRepr(span) {
300
343
  const s = span;
301
344
  return s.attributes?.output ?? s.attributes?.result ?? s.output ?? "";
302
345
  }
346
+ /**
347
+ * extract the last user-role message's text from a
348
+ * Mastra MODEL_GENERATION span's `input`, unwrapping the ai-sdk
349
+ * message-array + content-parts + providerOptions timestamp
350
+ * envelope. Falls back to the raw input for non-Mastra shapes so
351
+ * existing tests keep working.
352
+ *
353
+ * Mastra shape observed live (probe):
354
+ * input = {
355
+ * messages: [
356
+ * {role: "system", content: "..."},
357
+ * {role: "user", content: [
358
+ * {type: "text", text: "actual prompt",
359
+ * providerOptions: {mastra: {createdAt: 1783...}}}
360
+ * ]}
361
+ * ]
362
+ * }
363
+ *
364
+ * The `providerOptions.mastra.createdAt` differs per call and, when
365
+ * we ship the whole envelope as user_message, defeats
366
+ * identical_call / drift lexical / token_waste signature equality.
367
+ * Extracting just the human-visible text is what those detectors
368
+ * need.
369
+ */
370
+ function extractUserMessage(span) {
371
+ const s = span;
372
+ const raw = s.attributes?.prompt ?? s.attributes?.input ?? s.input ?? "";
373
+ if (typeof raw === "string")
374
+ return raw;
375
+ const messages = raw?.messages;
376
+ if (!Array.isArray(messages))
377
+ return raw;
378
+ // Walk backwards; use the last user-role message.
379
+ for (let i = messages.length - 1; i >= 0; i--) {
380
+ const m = messages[i];
381
+ if (m?.role !== "user")
382
+ continue;
383
+ if (typeof m.content === "string")
384
+ return m.content;
385
+ if (Array.isArray(m.content)) {
386
+ const parts = [];
387
+ for (const p of m.content) {
388
+ if (typeof p === "string") {
389
+ parts.push(p);
390
+ }
391
+ else if (p && typeof p === "object") {
392
+ const pt = p;
393
+ if (pt.type === "text" && typeof pt.text === "string") {
394
+ parts.push(pt.text);
395
+ }
396
+ }
397
+ }
398
+ return parts.join(" ");
399
+ }
400
+ return m.content ?? "";
401
+ }
402
+ return raw;
403
+ }
404
+ /**
405
+ * extract the response text from a Mastra
406
+ * MODEL_GENERATION span's `output`, unwrapping the
407
+ * `{files, reasoning, sources, text, warnings}` envelope. Falls
408
+ * back to the raw output for non-Mastra shapes so existing tests
409
+ * keep working.
410
+ */
411
+ function extractResponseText(span) {
412
+ const s = span;
413
+ const raw = s.attributes?.output ?? s.attributes?.result ?? s.output ?? "";
414
+ if (typeof raw === "string")
415
+ return raw;
416
+ const text = raw?.text;
417
+ if (typeof text === "string")
418
+ return text;
419
+ return raw;
420
+ }
303
421
  function modelPayload(span) {
304
422
  const s = span;
305
423
  const model = s.attributes?.model ?? "unknown";
306
424
  const provider = s.attributes?.provider ?? "unknown";
307
- const tokensIn = s.attributes?.internalUsage?.inputTokens;
308
- const tokensOut = s.attributes?.internalUsage?.outputTokens;
425
+ const errorInfo = s.errorInfo;
426
+ const hasError = !!errorInfo && (!!errorInfo.name || !!errorInfo.message);
427
+ // Success path stays byte-identical with the pre-shape
428
+ // to avoid churning consumers that already handle Mastra llm_calls.
429
+ // Mastra 1.x model_generation spans populate
430
+ // `span.input` with the full ai-sdk messages array (system + user
431
+ // messages, with `providerOptions.mastra.createdAt` timestamps
432
+ // baked in) and `span.output` with `{files, reasoning, sources,
433
+ // text, warnings}` where `text` is the response. Extracting the
434
+ // last user message's text (not JSON-stringifying the whole
435
+ // envelope) is what identical_call / drift lexical / token_waste
436
+ // need — the raw envelope's per-call timestamp noise defeats
437
+ // signature equality.
309
438
  const payload = {
310
439
  model,
311
440
  provider,
312
- user_message: summarize(inputRepr(span), MAX_STATE_REPR),
313
- response_text: summarize(outputRepr(span), MAX_STATE_REPR),
441
+ user_message: summarize(extractUserMessage(span), MAX_USER_MSG),
442
+ response_text: summarize(extractResponseText(span), MAX_STATE_REPR),
443
+ status: hasError ? "failed" : "ok",
314
444
  };
315
- if (tokensIn !== undefined)
316
- payload["input_tokens"] = tokensIn;
317
- if (tokensOut !== undefined)
318
- payload["output_tokens"] = tokensOut;
445
+ if (!hasError) {
446
+ // prefer per-call `usage` over ancestor-rollup
447
+ // `internalUsage` — see attribute-shape comment above.
448
+ const tokensIn = s.attributes?.usage?.inputTokens ??
449
+ s.attributes?.internalUsage?.inputTokens;
450
+ const tokensOut = s.attributes?.usage?.outputTokens ??
451
+ s.attributes?.internalUsage?.outputTokens;
452
+ if (tokensIn !== undefined)
453
+ payload["input_tokens"] = tokensIn;
454
+ if (tokensOut !== undefined)
455
+ payload["output_tokens"] = tokensOut;
456
+ return payload;
457
+ }
458
+ // failed-path fields matching the LangChain adapter's
459
+ // contract so the provider_incident detector's canonical
460
+ // (provider, error_class) clustering works cross-adapter. Mastra
461
+ // gives us SpanErrorInfo.name (exception class name as a bare
462
+ // string, not an Error object) — classifyByProviderName wraps it in
463
+ // a shim so the per-provider classifiers score it correctly.
464
+ const excType = errorInfo?.name;
465
+ const excMessage = errorInfo?.message;
466
+ payload["error_class"] = classifyByProviderName(provider, excType) ?? ErrorClass.UNKNOWN;
467
+ if (excType)
468
+ payload["exception_type"] = excType;
469
+ if (excMessage) {
470
+ payload["exception_message"] = summarize(excMessage, MAX_EXC_MSG);
471
+ }
472
+ const httpStatus = extractStatusCode(errorInfo?.details);
473
+ if (httpStatus !== undefined)
474
+ payload["http_status"] = httpStatus;
475
+ const retryAfter = extractRetryAfterSeconds(errorInfo?.details);
476
+ if (retryAfter !== undefined)
477
+ payload["retry_after"] = retryAfter;
319
478
  return payload;
320
479
  }
480
+ /** Read an HTTP status code from SpanErrorInfo.details, tolerating
481
+ * the common variants (status, statusCode, http_status). Returns
482
+ * undefined when absent or not a finite integer. */
483
+ function extractStatusCode(details) {
484
+ if (!details)
485
+ return undefined;
486
+ for (const key of ["status", "statusCode", "http_status"]) {
487
+ const v = details[key];
488
+ if (typeof v === "number" && Number.isFinite(v) && Number.isInteger(v)) {
489
+ return v;
490
+ }
491
+ }
492
+ return undefined;
493
+ }
494
+ /** Read a retry_after (seconds) from SpanErrorInfo.details, tolerating
495
+ * the common variants (retryAfter, retry_after). Returns undefined
496
+ * when absent or not a finite non-negative number. */
497
+ function extractRetryAfterSeconds(details) {
498
+ if (!details)
499
+ return undefined;
500
+ for (const key of ["retryAfter", "retry_after"]) {
501
+ const v = details[key];
502
+ if (typeof v === "number" && Number.isFinite(v) && v >= 0) {
503
+ return Math.floor(v);
504
+ }
505
+ }
506
+ return undefined;
507
+ }
321
508
  function toolPayload(span) {
322
509
  const name = extractName(span) ?? "unknown";
323
510
  const s = span;
324
- const status = s.attributes?.error ? "error" : "ok";
325
- return {
511
+ // read span.errorInfo (Mastra 1.x's canonical error info
512
+ // container on failed spans) — same class of bug modelPayload had
513
+ // pre-. Backend tool_failures detector groups on
514
+ // `status: "failed"`; the pre-Sprint-A `status: "error"` on
515
+ // attributes.error was never populated by real Mastra (only by
516
+ // hand-rolled test mocks) so every real Mastra tool crash was
517
+ // silently classified as `status: "ok"`.
518
+ const errorInfo = s.errorInfo;
519
+ const hasError = !!errorInfo && (!!errorInfo.name || !!errorInfo.message);
520
+ const payload = {
326
521
  tool_name: name,
327
522
  arguments: summarize(s.attributes?.input, MAX_TOOL_INPUT_REPR),
328
523
  return_value: summarize(s.attributes?.output, MAX_TOOL_OUTPUT_REPR),
329
- status,
524
+ status: hasError ? "failed" : "ok",
330
525
  };
526
+ if (hasError) {
527
+ if (errorInfo?.name)
528
+ payload["exception_type"] = errorInfo.name;
529
+ if (errorInfo?.message) {
530
+ payload["exception_message"] = summarize(errorInfo.message, MAX_EXC_MSG);
531
+ }
532
+ }
533
+ return payload;
331
534
  }
332
535
  function mapStatus(span) {
536
+ // Mastra 1.x surfaces provider-level exceptions as
537
+ // top-level `span.errorInfo` (name + message + details), NOT as
538
+ // `attributes.error`. Missing this mapping leaves crashed executions
539
+ // marked COMPLETED, silencing the `crashes` detector. Same class of
540
+ // bug fixed for toolPayload/modelPayload. We still read
541
+ // `attributes.error` as a compat fallback in case Mastra ever
542
+ // surfaces it there for a non-provider-side path.
333
543
  const s = span;
334
544
  if (s.attributes?.tripwireAbort)
335
545
  return Status.HALTED;
546
+ const ei = s.errorInfo;
547
+ const hasErrorInfo = !!ei && (!!ei.name || !!ei.message);
548
+ if (hasErrorInfo)
549
+ return Status.CRASHED;
336
550
  if (s.attributes?.error)
337
551
  return Status.CRASHED;
338
552
  return Status.COMPLETED;
@@ -1 +1 @@
1
- {"version":3,"file":"mastra.js","sourceRoot":"","sources":["../../src/integrations/mastra.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAEL,SAAS,EAET,MAAM,EACN,aAAa,GACd,MAAM,cAAc,CAAC;AAEtB,wEAAwE;AACxE,EAAE;AACF,gEAAgE;AAChE,oEAAoE;AACpE,4DAA4D;AAC5D,iEAAiE;AACjE,qCAAqC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAMrD,wEAAwE;AACxE,EAAE;AACF,oEAAoE;AACpE,kEAAkE;AAClE,iEAAiE;AACjE,oEAAoE;AACpE,mEAAmE;AACnE,mEAAmE;AACnE,kEAAkE;AAElE,MAAM,cAAc,GAAG,WAAW,CAAC;AACnC,MAAM,iBAAiB,GAAG,cAAc,CAAC;AACzC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AACjD,MAAM,cAAc,GAAG,W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C,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;IACzD,IAAI,YAAY;QAAE,OAAO,MAAM,CAAC,OAAO,CAAC;IACxC,IAAI,CAAC,CAAC,UAAU,EAAE,KAAK;QAAE,OAAO,MAAM,CAAC,OAAO,CAAC;IAC/C,OAAO,MAAM,CAAC,SAAS,CAAC;AAC1B,CAAC;AAED,SAAS,SAAS,CAAC,KAAc,EAAE,SAAiB,cAAc;IAChE,IAAI,KAAK,IAAI,IAAI;QAAE,OAAO,EAAE,CAAC;IAC7B,IAAI,CAAS,CAAC;IACd,IAAI,CAAC;QACH,CAAC,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;IAAC,MAAM,CAAC;QACP,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IACD,IAAI,CAAC,CAAC,MAAM,GAAG,MAAM;QAAE,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IAC1D,OAAO,CAAC,CAAC;AACX,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * OpenAI Agents SDK integration for Mesedi (Mesedi #28).
2
+ * OpenAI Agents SDK integration for Mesedi.
3
3
  *
4
4
  * Usage:
5
5
  *
@@ -23,11 +23,11 @@
23
23
  *
24
24
  * - `checkpoint` events at every agent start AND end with the
25
25
  * agent name and a truncated input/output repr. Feeds the
26
- * semantic_loop detector (#6).
26
+ * semantic_loop detector.
27
27
  * - `agent_handoff` events on every handoff between agents.
28
28
  * from_agent / to_agent come straight from the hook arguments,
29
29
  * handoff_kind defaults to `"transfer"`. Feeds cascading_failure
30
- * (#12) and coordination_deadlock (#13).
30
+ * and coordination_deadlock.
31
31
  * - `tool_call` events for every tool invocation, mirroring
32
32
  * `mesedi.tool()` wire format.
33
33
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * OpenAI Agents SDK integration for Mesedi (Mesedi #28).
2
+ * OpenAI Agents SDK integration for Mesedi.
3
3
  *
4
4
  * Usage:
5
5
  *
@@ -23,11 +23,11 @@
23
23
  *
24
24
  * - `checkpoint` events at every agent start AND end with the
25
25
  * agent name and a truncated input/output repr. Feeds the
26
- * semantic_loop detector (#6).
26
+ * semantic_loop detector.
27
27
  * - `agent_handoff` events on every handoff between agents.
28
28
  * from_agent / to_agent come straight from the hook arguments,
29
29
  * handoff_kind defaults to `"transfer"`. Feeds cascading_failure
30
- * (#12) and coordination_deadlock (#13).
30
+ * and coordination_deadlock.
31
31
  * - `tool_call` events for every tool invocation, mirroring
32
32
  * `mesedi.tool()` wire format.
33
33
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Promptfoo evaluator one-liner helpers (Mesedi #14, Wave 1.3).
2
+ * Promptfoo evaluator one-liner helpers (, ).
3
3
  *
4
4
  * Promptfoo (https://www.promptfoo.dev) is a CLI + library for
5
5
  * prompt evaluation. Customers using its assertion types
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Promptfoo evaluator one-liner helpers (Mesedi #14, Wave 1.3).
2
+ * Promptfoo evaluator one-liner helpers (, ).
3
3
  *
4
4
  * Promptfoo (https://www.promptfoo.dev) is a CLI + library for
5
5
  * prompt evaluation. Customers using its assertion types
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Ragas grounding-evaluator one-liner helpers (Mesedi #14, Wave 1.3).
2
+ * Ragas grounding-evaluator one-liner helpers (, ).
3
3
  *
4
4
  * Ragas (https://docs.ragas.io) is a popular RAG evaluation library.
5
5
  * Customers running Ragas against their agent outputs can use these
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Ragas grounding-evaluator one-liner helpers (Mesedi #14, Wave 1.3).
2
+ * Ragas grounding-evaluator one-liner helpers (, ).
3
3
  *
4
4
  * Ragas (https://docs.ragas.io) is a popular RAG evaluation library.
5
5
  * Customers running Ragas against their agent outputs can use these
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Vectara HHEM (Hughes Hallucination Evaluation Model) helper
3
- * (Mesedi #14, Wave 1.3).
3
+ * (, ).
4
4
  *
5
5
  * Vectara HHEM
6
6
  * (https://huggingface.co/vectara/hallucination_evaluation_model)
@@ -9,13 +9,13 @@
9
9
  * use this helper to report scores into Mesedi without hand-writing
10
10
  * the boilerplate around {@link emitEvalScore}.
11
11
  *
12
- * IMPORTANT — direction note. HHEM scores have INVERTED semantics
12
+ * IMPORTANT: direction note. HHEM scores have INVERTED semantics
13
13
  * compared to Ragas / Promptfoo metrics: HIGHER means MORE faithful
14
14
  * to context (less hallucination). The helper passes
15
15
  * `higherIsBetter: true` to the backend and the parameter is named
16
16
  * `faithfulnessScore` to mirror HHEM's documented output. Some HHEM
17
17
  * consumers transform the output into a "hallucination_score" where
18
- * LOWER is better — if your pipeline does that transformation,
18
+ * LOWER is better: if your pipeline does that transformation,
19
19
  * invert your value before calling this helper (i.e. pass
20
20
  * `1 - hallucinationScore`).
21
21
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Vectara HHEM (Hughes Hallucination Evaluation Model) helper
3
- * (Mesedi #14, Wave 1.3).
3
+ * (, ).
4
4
  *
5
5
  * Vectara HHEM
6
6
  * (https://huggingface.co/vectara/hallucination_evaluation_model)
@@ -9,13 +9,13 @@
9
9
  * use this helper to report scores into Mesedi without hand-writing
10
10
  * the boilerplate around {@link emitEvalScore}.
11
11
  *
12
- * IMPORTANT — direction note. HHEM scores have INVERTED semantics
12
+ * IMPORTANT: direction note. HHEM scores have INVERTED semantics
13
13
  * compared to Ragas / Promptfoo metrics: HIGHER means MORE faithful
14
14
  * to context (less hallucination). The helper passes
15
15
  * `higherIsBetter: true` to the backend and the parameter is named
16
16
  * `faithfulnessScore` to mirror HHEM's documented output. Some HHEM
17
17
  * consumers transform the output into a "hallucination_score" where
18
- * LOWER is better — if your pipeline does that transformation,
18
+ * LOWER is better: if your pipeline does that transformation,
19
19
  * invert your value before calling this helper (i.e. pass
20
20
  * `1 - hallucinationScore`).
21
21
  *
package/dist/observe.d.ts CHANGED
@@ -210,7 +210,7 @@ export interface EvalScoreOptions {
210
210
  *
211
211
  * Use this when you run Ragas, Promptfoo, Vectara HHEM, or a custom
212
212
  * judge against an execution's output and want Mesedi to track the
213
- * score over time. Mesedi #14 aggregates these into
213
+ * score over time. aggregates these into
214
214
  * grounding_failure clusters when scores trend below threshold.
215
215
  *
216
216
  * Outside `wrap()`: silent no-op.
@@ -237,10 +237,10 @@ export declare function emitMemoryOperation(operation: "read" | "write" | "searc
237
237
  /**
238
238
  * Options for {@link emitAgentHandoff}.
239
239
  *
240
- * Mesedi #11. Use this at the moment one agent invokes another
240
+ * . Use this at the moment one agent invokes another
241
241
  * (supervisor/worker, plan/execute, role-based router). The
242
- * downstream cascading_failure detector (#12) joins this event
243
- * back to the topology graph (#10) so that a handoff whose child
242
+ * downstream cascading_failure detector joins this event
243
+ * back to the topology graph so that a handoff whose child
244
244
  * execution crashes within a short window can be surfaced as
245
245
  * one logical failure rather than two unrelated ones.
246
246
  *
@@ -261,8 +261,8 @@ export interface AgentHandoffOptions {
261
261
  }
262
262
  /**
263
263
  * Object-form options for the new {@link emitAgentHandoff} overload
264
- * (Wave 1.2.b). Use this when calling inside a `wrap()` whose
265
- * `agentName` option supplies the source agent — the `fromAgent`
264
+ * (). Use this when calling inside a `wrap()` whose
265
+ * `agentName` option supplies the source agent: the `fromAgent`
266
266
  * field becomes optional and falls back to the wrapped execution's
267
267
  * agent name.
268
268
  */
@@ -274,7 +274,7 @@ export interface EmitAgentHandoffArgs extends AgentHandoffOptions {
274
274
  * Emit an `agent_handoff` event marking that the current agent
275
275
  * delegated work to another agent.
276
276
  *
277
- * Two call shapes (Wave 1.2.b):
277
+ * Two call shapes:
278
278
  *
279
279
  * Positional (original, fully backward-compatible):
280
280
  *
@@ -293,7 +293,7 @@ export interface EmitAgentHandoffArgs extends AgentHandoffOptions {
293
293
  * `wrap({ agentName: ... }, fn)` is used.
294
294
  * 3. If neither is supplied while inside `wrap()`, this function
295
295
  * throws Error rather than silently emitting an `unknown` source
296
- * agent — polluting the topology graph would degrade
296
+ * agent: polluting the topology graph would degrade
297
297
  * cascading_failure / coordination_deadlock clustering at scale.
298
298
  *
299
299
  * Outside `wrap()` / `runInExecutionContext`: no-op (matches the
@@ -303,7 +303,7 @@ export declare function emitAgentHandoff(args: EmitAgentHandoffArgs): void;
303
303
  export declare function emitAgentHandoff(fromAgent: string, toAgent: string, opts?: AgentHandoffOptions): void;
304
304
  /**
305
305
  * Synchronously transition the current execution to
306
- * `awaiting_human` (Mesedi #18).
306
+ * `awaiting_human` ().
307
307
  *
308
308
  * Call this from inside a `wrap()`-ed function at the moment the
309
309
  * agent reaches a decision that requires a human in the loop. The
@@ -328,7 +328,7 @@ export declare function emitAgentHandoff(fromAgent: string, toAgent: string, opt
328
328
  export declare function pauseForHuman(): Promise<void>;
329
329
  /**
330
330
  * Synchronously transition the current execution from
331
- * `awaiting_human` back to `started` (Mesedi #18).
331
+ * `awaiting_human` back to `started` ().
332
332
  *
333
333
  * Call this from the host application's HITL response handler the
334
334
  * moment the human's decision lands and the agent is about to be
@@ -340,7 +340,7 @@ export declare function pauseForHuman(): Promise<void>;
340
340
  */
341
341
  export declare function resumeForAgent(): Promise<void>;
342
342
  /**
343
- * Serializable handle to an in-flight HITL request (Mesedi #19).
343
+ * Serializable handle to an in-flight HITL request.
344
344
  *
345
345
  * Returned by {@link requestHumanIntervention}. The shape is plain
346
346
  * JSON so the host application can stash it in Redis, a database
@@ -362,7 +362,7 @@ export interface HumanInterventionHandleData {
362
362
  *
363
363
  * Well-known {@link responseKind} values: `"approved"`, `"rejected"`,
364
364
  * `"edited"`, `"timeout"`, `"cancelled"`. Custom strings are
365
- * accepted but downstream HITL detectors (#20, #21) only recognize
365
+ * accepted but downstream HITL detectors (, ) only recognize
366
366
  * the five well-known values.
367
367
  */
368
368
  export interface CompleteHumanInterventionOptions {
@@ -371,7 +371,7 @@ export interface CompleteHumanInterventionOptions {
371
371
  decidedBy?: string;
372
372
  }
373
373
  /**
374
- * Pause the current execution and return a handle (Mesedi #19).
374
+ * Pause the current execution and return a handle.
375
375
  *
376
376
  * Synchronously transitions the execution into `awaiting_human`
377
377
  * and returns a {@link HumanInterventionHandleData} carrying the
@@ -383,9 +383,9 @@ export interface CompleteHumanInterventionOptions {
383
383
  * Outside `wrap()`: no-op, returns `null`.
384
384
  *
385
385
  * `slaSeconds` is optional metadata describing the customer's own
386
- * SLA expectation. The hitl_timeout detector (#20) reads this to
386
+ * SLA expectation. The hitl_timeout detector reads this to
387
387
  * fire when the actual wait exceeds the configured SLA. Customers
388
- * without an explicit SLA can omit it and #20 will fall back to a
388
+ * without an explicit SLA can omit it and will fall back to a
389
389
  * project-level default.
390
390
  */
391
391
  export declare function requestHumanIntervention(question: string, options?: {
@@ -393,7 +393,7 @@ export declare function requestHumanIntervention(question: string, options?: {
393
393
  metadata?: Record<string, unknown>;
394
394
  }): Promise<HumanInterventionHandleData | null>;
395
395
  /**
396
- * Complete a HITL request (Mesedi #19).
396
+ * Complete a HITL request.
397
397
  *
398
398
  * Emits the `human_intervention` event with the full ask/answer
399
399
  * payload, then synchronously transitions the execution from