@nettee/beacon 0.4.4 → 0.4.6

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 CHANGED
@@ -68,8 +68,7 @@ and lists the missing paths. Both pairs may exist; the workspace pair wins.
68
68
 
69
69
  Beacon prepends an English platform template for this Run: workspace limit,
70
70
  inbound vs Schedule vs event vs manual capabilities, the `reply_text` / `reply_card` /
71
- `no_reply` / `notify_card` contract, optional `submit_feedback` (instruction gaps),
72
- and optional `submit_observability_feedback` (RCA observability gaps).
71
+ `no_reply` / `notify_card` contract, and optional `submit_feedback` (instruction gaps).
73
72
 
74
73
  Protect the home and secret file before running Beacon:
75
74
 
@@ -146,7 +146,7 @@ export type TriggerRecord = {
146
146
  finalOutcome?: FinalOutcomeRecord | undefined;
147
147
  /** Present only when the Agent called `submit_feedback`. */
148
148
  feedback?: FeedbackRecord | undefined;
149
- /** Present only when the Agent called `submit_observability_feedback`. */
149
+ /** Legacy field retained for old records; Agents no longer submit this. */
150
150
  observabilityFeedback?: ObservabilityFeedbackRecord | undefined;
151
151
  delivery?: DeliveryRecord | undefined;
152
152
  notifyDelivery?: DeliveryRecord | undefined;
@@ -1,4 +1,3 @@
1
1
  export declare const inboundOutOfRoleReply = "\u8FD9\u6761\u6D88\u606F\u4E0D\u5728\u6211\u7684\u804C\u8D23\u8303\u56F4\u5185\u3002";
2
2
  export declare const finalOutcomeContractInstructions: readonly ["`reply_text` sends plain text. For an inbound Feishu message, quote-reply that message. For a Schedule, message the Profile admin. For a manual Run, print to the operator. Do not fill `chat_id`.", "`reply_card` sends a titled Markdown card on the conversational channel (inbound quote-reply, or Schedule admin chat). It closes that channel by itself. Do not also call `reply_text` or `no_reply` on the same Run. Do not fill `chat_id`.", "`no_reply` finishes a Run without messaging the conversational channel. Its reason is stored for audit and is never sent. Do not use it on inbound Feishu messages.", "`notify_card` posts a titled Markdown card to this Run's configured notify group. Call it only when this Run has a notify target. Do not fill `chat_id`.", "Which tool to use for a given business result is decided by the Profile persona/task (or the situation), not by these platform lines alone.", "Beacon ignores ordinary assistant final text for Delivery."];
3
- export declare const feedbackContractInstructions: readonly ["If this Run had a real high or medium problem with instructions, Skills, dependencies, or tools, you may call `submit_feedback` once with one to three items.", "If there are none, do not call it. Do not invent items. Do not report low-priority issues, taste, or problems you already worked around without needing a platform change.", "Do not put observability gaps in `submit_feedback`. Use `submit_observability_feedback` for those."];
4
- export declare const observabilityFeedbackContractInstructions: readonly ["If root-cause analysis on this Run was held back by missing observability (logs, metrics, traces, event correlation, or similar signals), you may call `submit_observability_feedback` once with one to three items at high, medium, or low priority.", "Say what signal is missing and how adding it would make RCA more useful or more certain. If there are none, do not call it. Do not invent items.", "Do not put instruction, Skill, dependency, or tool problems in `submit_observability_feedback`. Use `submit_feedback` for those."];
3
+ export declare const feedbackContractInstructions: readonly ["If this Run had a real high or medium problem with instructions, Skills, dependencies, or tools, you may call `submit_feedback` once with one to three items.", "If there are none, do not call it. Do not invent items. Do not report low-priority issues, taste, or problems you already worked around without needing a platform change."];
@@ -10,10 +10,4 @@ export const finalOutcomeContractInstructions = [
10
10
  export const feedbackContractInstructions = [
11
11
  "If this Run had a real high or medium problem with instructions, Skills, dependencies, or tools, you may call `submit_feedback` once with one to three items.",
12
12
  "If there are none, do not call it. Do not invent items. Do not report low-priority issues, taste, or problems you already worked around without needing a platform change.",
13
- "Do not put observability gaps in `submit_feedback`. Use `submit_observability_feedback` for those.",
14
- ];
15
- export const observabilityFeedbackContractInstructions = [
16
- "If root-cause analysis on this Run was held back by missing observability (logs, metrics, traces, event correlation, or similar signals), you may call `submit_observability_feedback` once with one to three items at high, medium, or low priority.",
17
- "Say what signal is missing and how adding it would make RCA more useful or more certain. If there are none, do not call it. Do not invent items.",
18
- "Do not put instruction, Skill, dependency, or tool problems in `submit_observability_feedback`. Use `submit_feedback` for those.",
19
13
  ];
@@ -218,7 +218,7 @@ export default function registerOutcomeTools(pi) {
218
218
  pi.registerTool({
219
219
  name: "submit_feedback",
220
220
  label: "Submit Feedback",
221
- description: "Optionally report one to three high or medium problems with instructions, Skills, dependencies, or tools on this Run. Call at most once, and only when such a problem actually existed. Do not use this for missing observability — use submit_observability_feedback instead. Do not call this tool when there is nothing to report.",
221
+ description: "Optionally report one to three high or medium problems with instructions, Skills, dependencies, or tools on this Run. Call at most once, and only when such a problem actually existed. Do not call this tool when there is nothing to report.",
222
222
  parameters: {
223
223
  type: "object",
224
224
  properties: {
@@ -258,52 +258,4 @@ export default function registerOutcomeTools(pi) {
258
258
  };
259
259
  },
260
260
  });
261
- pi.registerTool({
262
- name: "submit_observability_feedback",
263
- label: "Submit Observability Feedback",
264
- description: "Optionally report one to three observability gaps (missing logs, metrics, traces, or correlation signals) that held back root-cause analysis on this Run. Priority may be high, medium, or low. Call at most once, and only when such a gap actually existed. Do not use this for instruction/Skill/dependency/tool problems — use submit_feedback instead. Do not call this tool when there is nothing to report.",
265
- parameters: {
266
- type: "object",
267
- properties: {
268
- items: {
269
- type: "array",
270
- minItems: 1,
271
- maxItems: 3,
272
- description: "One to three observability findings. Omit the tool call entirely when there are none.",
273
- items: {
274
- type: "object",
275
- properties: {
276
- priority: {
277
- type: "string",
278
- enum: ["high", "medium", "low"],
279
- description: "high, medium, or low — how much the missing signal limited RCA confidence.",
280
- },
281
- summary: {
282
- type: "string",
283
- minLength: 1,
284
- maxLength: 1024,
285
- description: "One or two sentences naming the missing signal and how adding it would help RCA.",
286
- },
287
- },
288
- required: ["priority", "summary"],
289
- additionalProperties: false,
290
- },
291
- },
292
- },
293
- required: ["items"],
294
- additionalProperties: false,
295
- },
296
- async execute(_toolCallId, params, signal) {
297
- await invokeBeaconCli({ observabilityFeedback: { items: params.items } }, signal);
298
- return {
299
- content: [
300
- {
301
- type: "text",
302
- text: "Observability feedback accepted by Beacon.",
303
- },
304
- ],
305
- details: { submitted: true },
306
- };
307
- },
308
- });
309
261
  }
@@ -1,5 +1,5 @@
1
1
  import { createHash } from "node:crypto";
2
- import { feedbackContractInstructions, finalOutcomeContractInstructions, observabilityFeedbackContractInstructions, } from "../outcome/instructions.js";
2
+ import { feedbackContractInstructions, finalOutcomeContractInstructions, } from "../outcome/instructions.js";
3
3
  export function agentSystemPromptTrigger(input, notifyTarget) {
4
4
  const notify = notifyTarget !== undefined;
5
5
  if (input?.kind === "event") {
@@ -30,8 +30,6 @@ export function buildAgentSystemPrompt(profile, trigger) {
30
30
  "",
31
31
  ...feedbackContractInstructions,
32
32
  "",
33
- ...observabilityFeedbackContractInstructions,
34
- "",
35
33
  profile.persona,
36
34
  "",
37
35
  profile.task,