@nettee/beacon 0.1.7 → 0.1.8

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,7 +1,7 @@
1
1
  import { createHash, randomUUID } from "node:crypto";
2
2
  import { isAbsolute, join } from "node:path";
3
- import { finalOutcomeSystemInstructions } from "../outcome/instructions.js";
4
3
  import { PiRuntimeError } from "../runtime/pi-rpc.js";
4
+ import { buildAgentSystemPrompt } from "../runtime/system-prompt.js";
5
5
  function promptFor(input) {
6
6
  if (input.kind === "manual") {
7
7
  return ["An operator manually triggered this Run.", "", input.text].join("\n");
@@ -181,11 +181,7 @@ export class RunOrchestrator {
181
181
  workspace: this.options.profile.workspace,
182
182
  provider: this.options.profile.model.provider,
183
183
  model: this.options.profile.model.id,
184
- systemPrompt: [
185
- this.options.profile.prompt,
186
- "",
187
- ...finalOutcomeSystemInstructions,
188
- ].join("\n"),
184
+ systemPrompt: buildAgentSystemPrompt(this.options.profile),
189
185
  outcome: { ...submission.binding, cliPath: this.options.beaconCliPath },
190
186
  session: {
191
187
  id: record.run.sessionId,
@@ -1,5 +1,5 @@
1
- import { finalOutcomeSystemInstructions } from "../outcome/instructions.js";
2
1
  import { runPiAgent, } from "../runtime/pi-rpc.js";
2
+ import { buildAgentSystemPrompt } from "../runtime/system-prompt.js";
3
3
  function messageForPrompt(message) {
4
4
  return {
5
5
  sender_type: message.senderType,
@@ -27,11 +27,7 @@ export function createProfileRunner(profile, outcomes, beaconCliPath, runAgent =
27
27
  workspace: profile.workspace,
28
28
  provider: profile.model.provider,
29
29
  model: profile.model.id,
30
- systemPrompt: [
31
- profile.prompt,
32
- "",
33
- ...finalOutcomeSystemInstructions,
34
- ].join("\n"),
30
+ systemPrompt: buildAgentSystemPrompt(profile),
35
31
  outcome: { ...submission.binding, cliPath: beaconCliPath },
36
32
  });
37
33
  return submission.take();
@@ -0,0 +1,10 @@
1
+ import { finalOutcomeSystemInstructions } from "../outcome/instructions.js";
2
+ export function buildAgentSystemPrompt(profile) {
3
+ return [
4
+ profile.prompt,
5
+ "",
6
+ `All local file reads, searches, and modifications must stay within the workspace directory and its descendants: ${profile.workspace}`,
7
+ "",
8
+ ...finalOutcomeSystemInstructions,
9
+ ].join("\n");
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nettee/beacon",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "A single-host bridge from messaging and schedules to isolated agent runs",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {