@aiden-ade/sandbox-agent 0.1.46 → 0.1.47

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 (2) hide show
  1. package/dist/index.cjs +25 -6
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -20731,6 +20731,14 @@ function handleOpenCodeServeEvent(event, sessionId, context, state, readOnly, ba
20731
20731
  }
20732
20732
  return false;
20733
20733
  }
20734
+ case "session.compacted": {
20735
+ emitSessionNotice(
20736
+ context.presenter,
20737
+ "context_compacted",
20738
+ "Conversation context was compacted \u2014 earlier detail was replaced with a summary."
20739
+ );
20740
+ return false;
20741
+ }
20734
20742
  case "session.status": {
20735
20743
  const status = getRecord(properties.status);
20736
20744
  return getString(status?.type) === "idle";
@@ -21017,10 +21025,9 @@ function buildTaskLifecyclePrompt(config) {
21017
21025
  return [
21018
21026
  "## Task Lifecycle",
21019
21027
  `This session is attached to taskId "${taskId}".`,
21020
- `Do not change the task status on your own. The user manages this task's status. Only change it by calling the Alan MCP update_task tool when the user explicitly asks you to (for example: "move this to review" or "mark it done"). Do not update the status proactively as you move through research, implementation, testing, or review phases.`,
21028
+ "Change task status only when the user explicitly asks. Use the Alan MCP update_task tool with one of the exact status IDs below.",
21021
21029
  ...statusLines,
21022
- "",
21023
- "When the user asks you to change the status, use exact status IDs from the available statuses. Do not invent status IDs. If none of the available statuses clearly matches the request, ask which one they mean instead of guessing."
21030
+ "If the requested status is ambiguous, ask instead of guessing."
21024
21031
  ].join("\n");
21025
21032
  }
21026
21033
  var BaseMachineAgent = class _BaseMachineAgent {
@@ -21223,7 +21230,11 @@ Prefer relative paths and keep your work scoped to this project.`
21223
21230
  }
21224
21231
  const extra = this.buildExtraSystemPromptParts(config);
21225
21232
  systemPromptParts.push(...extra);
21226
- const mergedAppend = [config.systemPromptAppend?.trim(), teamCodeOverlay].filter((value2) => Boolean(value2 && value2.length > 0)).join("\n\n");
21233
+ const mergedAppend = [
21234
+ config.systemPromptAppend?.trim(),
21235
+ config.agentPromptPerTurn ? agentPrompt : void 0,
21236
+ teamCodeOverlay
21237
+ ].filter((value2) => Boolean(value2 && value2.length > 0)).join("\n\n");
21227
21238
  return {
21228
21239
  ...config,
21229
21240
  backendKind,
@@ -24184,7 +24195,7 @@ var RunStartGate = class {
24184
24195
  };
24185
24196
 
24186
24197
  // src/version.ts
24187
- var AGENT_VERSION = "0.1.46";
24198
+ var AGENT_VERSION = "0.1.47";
24188
24199
 
24189
24200
  // src/workspace-relocation.ts
24190
24201
  var import_node_child_process3 = require("child_process");
@@ -27148,6 +27159,7 @@ async function startDaemon(args) {
27148
27159
  runtimeCommand,
27149
27160
  agentId: payload.agentId,
27150
27161
  agentPrompt: payload.agentPrompt,
27162
+ agentPromptPerTurn: payload.agentPromptPerTurn,
27151
27163
  mode: payload.mode ?? "agent",
27152
27164
  selectedModel: payload.model,
27153
27165
  selectedContextWindow: payload.selectedContextWindow ?? null,
@@ -28690,6 +28702,7 @@ async function runSandbox(config) {
28690
28702
  let activeBackendKind = config.backendKind || "claude_cli";
28691
28703
  let activeAgentId = config.agentId;
28692
28704
  let activeAgentPrompt = config.agentPrompt;
28705
+ let activeAgentPromptPerTurn = config.agentPromptPerTurn;
28693
28706
  let activeModel = config.model;
28694
28707
  let activeContextWindow = config.contextWindow;
28695
28708
  let activeEffortLevel = config.effortLevel;
@@ -28765,6 +28778,7 @@ async function runSandbox(config) {
28765
28778
  backendKind: activeBackendKind,
28766
28779
  agentId: activeAgentId,
28767
28780
  agentPrompt: activeAgentPrompt,
28781
+ agentPromptPerTurn: activeAgentPromptPerTurn,
28768
28782
  mode: activeMode,
28769
28783
  selectedModel: activeModel,
28770
28784
  selectedContextWindow: activeContextWindow ?? null,
@@ -28859,7 +28873,10 @@ async function runSandbox(config) {
28859
28873
  activeAgentId = nextPayload.agentId;
28860
28874
  }
28861
28875
  if (nextPayload.agentPrompt !== void 0) {
28862
- activeAgentPrompt = nextPayload.agentPrompt;
28876
+ activeAgentPrompt = nextPayload.agentPrompt ?? void 0;
28877
+ }
28878
+ if (nextPayload.agentPromptPerTurn !== void 0) {
28879
+ activeAgentPromptPerTurn = nextPayload.agentPromptPerTurn;
28863
28880
  }
28864
28881
  if (nextPayload.selectedModel !== void 0) {
28865
28882
  activeModel = nextPayload.selectedModel.trim() || void 0;
@@ -29184,6 +29201,7 @@ async function runSessionFromEnv() {
29184
29201
  const backendKind = process.env.ALAN_BACKEND_KIND || "codex_app_server";
29185
29202
  const agentId = process.env.ALAN_AGENT_ID || void 0;
29186
29203
  const agentPrompt = process.env.ALAN_AGENT_PROMPT || void 0;
29204
+ const agentPromptPerTurn = process.env.ALAN_AGENT_PROMPT_PER_TURN === "true";
29187
29205
  const mode = process.env.ALAN_MODE || "agent";
29188
29206
  const model = process.env.ALAN_MODEL;
29189
29207
  const contextWindow = process.env.ALAN_CONTEXT_WINDOW || void 0;
@@ -29228,6 +29246,7 @@ async function runSessionFromEnv() {
29228
29246
  backendKind,
29229
29247
  agentId,
29230
29248
  agentPrompt,
29249
+ agentPromptPerTurn,
29231
29250
  mode,
29232
29251
  model,
29233
29252
  contextWindow,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiden-ade/sandbox-agent",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "type": "module",
5
5
  "description": "Alan agent runtime — cloud sandbox and local daemon (alan-agent CLI)",
6
6
  "bin": {