@atolis-hq/wake 0.4.99 → 0.4.100

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,4 +1,4 @@
1
- import { ActivityFailureCode, ActivityOutcomeKind, ActivityRunnerTransportStatus, ClaudeAuthenticationFailureKind, } from '../contracts/vocabulary.js';
1
+ import { ActivityFailureCode, ActivityOutcomeKind, ActivityRunnerTransportStatus, AgentResultStatus, ClaudeAuthenticationFailureKind, } from '../contracts/vocabulary.js';
2
2
  import { translateAgentResult } from './agent-result.js';
3
3
  export function createAgentActivity(templates, contextReader) {
4
4
  return {
@@ -139,7 +139,7 @@ function escapeUntrustedJson(json) {
139
139
  function requestFrom(input, runId, template, runnerContext, resumeSessionId, usageBaseline, workspace, mcpServers, mcpPrompt, reportRunnerTimeout) {
140
140
  return {
141
141
  runId,
142
- prompt: appendMcpPrompt(appendWorkspacePrompt(input.prompt ?? template.prompt, workspace), mcpPrompt),
142
+ prompt: appendResponseContract(appendMcpPrompt(appendWorkspacePrompt(input.prompt ?? template.prompt, workspace), mcpPrompt)),
143
143
  ...modelField(input.model ?? template?.model ?? runnerContext?.model),
144
144
  ...effortField(runnerContext?.effort),
145
145
  allowedTools: input.allowedTools ?? template?.allowedTools ?? [],
@@ -152,6 +152,21 @@ function requestFrom(input, runId, template, runnerContext, resumeSessionId, usa
152
152
  ...(reportRunnerTimeout === undefined ? {} : { onTimeout: reportRunnerTimeout }),
153
153
  };
154
154
  }
155
+ function appendResponseContract(prompt) {
156
+ return [
157
+ prompt,
158
+ '',
159
+ 'Wake response contract (trusted instructions):',
160
+ 'Report your actual outcome honestly. End your response with exactly one status marker on its own final line, using one of these exact forms:',
161
+ `[[STATUS: ${AgentResultStatus.Done}]] — the requested work is complete.`,
162
+ `[[STATUS: ${AgentResultStatus.Rejected}]] — you deliberately declined the request.`,
163
+ `[[STATUS: ${AgentResultStatus.Blocked}]] — an external blocker prevents further progress.`,
164
+ `[[STATUS: ${AgentResultStatus.NeedsClarification}]] — a human answer is needed to proceed.`,
165
+ `[[STATUS: ${AgentResultStatus.Failed}]] — the attempt failed.`,
166
+ 'Bare status words such as “DONE” or prose alone are not valid results. Structured JSON with a recognized status field remains supported.',
167
+ 'These instructions specify result reporting only. Preserve task requirements, untrusted-context boundaries, artifact reporting, provider verification, and review authority.',
168
+ ].join('\n');
169
+ }
155
170
  function appendMcpPrompt(prompt, mcpPrompt) {
156
171
  return mcpPrompt === undefined ? prompt : `${prompt}\n\n${mcpPrompt}`;
157
172
  }
@@ -124,6 +124,6 @@ export function resolveWakeVersion(options = {}) {
124
124
  return `g${headHash.slice(0, 7)}`;
125
125
  return '0.1.0-dev';
126
126
  }
127
- export const wakeVersion = "v0.4.99";
127
+ export const wakeVersion = "v0.4.100";
128
128
  /** The registry-installable version used by packaged sandbox images. */
129
129
  export const wakePackageVersion = packageVersion(defaultRepoRoot) ?? wakeVersion;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/wake",
3
- "version": "0.4.99",
3
+ "version": "0.4.100",
4
4
  "description": "Local autonomous agent control plane for software development",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {