@nettee/beacon 0.4.1 → 0.4.3

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.
@@ -1,5 +1,5 @@
1
1
  import { createHash } from "node:crypto";
2
- import { feedbackContractInstructions, finalOutcomeContractInstructions, } from "../outcome/instructions.js";
2
+ import { feedbackContractInstructions, finalOutcomeContractInstructions, observabilityFeedbackContractInstructions, } from "../outcome/instructions.js";
3
3
  export function agentSystemPromptTrigger(input, notifyTarget) {
4
4
  const notify = notifyTarget !== undefined;
5
5
  if (input?.kind === "event") {
@@ -30,6 +30,8 @@ export function buildAgentSystemPrompt(profile, trigger) {
30
30
  "",
31
31
  ...feedbackContractInstructions,
32
32
  "",
33
+ ...observabilityFeedbackContractInstructions,
34
+ "",
33
35
  profile.persona,
34
36
  "",
35
37
  profile.task,
@@ -4,7 +4,7 @@ import { basename, dirname, isAbsolute, join } from "node:path";
4
4
  import { z } from "zod";
5
5
  import { failureCodes, } from "../domain/types.js";
6
6
  import { cloudEventSchema } from "../events/cloudevent.js";
7
- import { feedbackRecordSchema, finalOutcomeContentSchema, parseFinalOutcomeContent, } from "../outcome/content.js";
7
+ import { feedbackRecordSchema, finalOutcomeContentSchema, observabilityFeedbackRecordSchema, parseFinalOutcomeContent, } from "../outcome/content.js";
8
8
  const timestamp = z.string().datetime({ offset: true });
9
9
  const failureSchema = z
10
10
  .object({ code: z.enum(failureCodes), summary: z.string().min(1).max(4096) })
@@ -122,6 +122,7 @@ const triggerRecordSchema = z
122
122
  run: runSchema.optional(),
123
123
  finalOutcome: outcomeSchema.optional(),
124
124
  feedback: feedbackRecordSchema.optional(),
125
+ observabilityFeedback: observabilityFeedbackRecordSchema.optional(),
125
126
  delivery: deliverySchema.optional(),
126
127
  notifyDelivery: deliverySchema.optional(),
127
128
  })