Skip to content

Agent Messages and Packets

kadubon edited this page Jun 21, 2026 · 1 revision

Agent Messages And Packets

The npm package includes local JSON sidecars for agent messages and packet exchange.

These sidecars are useful when one agent wants to pass candidate work to another agent, or when a runtime report should be exported as a file.

Agent Messages

Agent message helpers create local JSON envelopes.

import { createAgentMessage } from "percolation-inversion-compiler-ts/agent/messages";

const message = createAgentMessage({
  sender: "agent-a",
  text: "Candidate packet: preserve residuals.",
});

Message envelopes can be appended, exported, inspected, and verified by local tools. They do not send external messages by themselves.

Packet Export

Export a runtime report:

npx pic-ts packet export \
  --report .pic-demo/runtime_step_report.generated.json \
  --output .pic-demo/packet.json

Inspect the packet:

npx pic-ts packet inspect --packet .pic-demo/packet.json

Command-Like Text Detection

Packet inspection can detect command-like strings such as:

  • npm install
  • npx
  • node
  • docker run
  • kubectl
  • ssh
  • Invoke-WebRequest

Detection is report-only. The package does not execute detected text. executed_command_count should remain 0.

Non-Promotion Rule

Packet exchange is sidecar data. It does not make content settled.

Read:

  • candidate_only_reasons
  • missing_obligations
  • residual_carry_forward
  • settled_blockers
  • settled

Packet inspection is useful because it keeps risky or incomplete content visible.

Clone this wiki locally