@amistio/cli 0.1.28 → 0.1.29

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
@@ -60,6 +60,8 @@ Watch mode prints a completed-work success once per work item, keeps fresh compl
60
60
 
61
61
  Known validation failures such as `unsafe_context_path` are printed with attention-needed next steps. For project-context refresh path-safety failures, deploy the latest web/API fix, update and restart the runner when applicable, retry the refresh, and capture only bounded non-secret output if it repeats.
62
62
 
63
+ App-evaluation result finalization rejections print safe validation paths and preserve the local finalization evidence without exposing raw source or secrets. If a structured app-evaluation result is rejected, update and restart the runner, confirm the web/API deployment is current, and retry the evaluation before acting on cleanup or implementation recommendations.
64
+
63
65
  When brain generation or plan revision output is parsed but the Amistio API is temporarily unavailable during finalization, the runner keeps a safe pending result envelope in user-level Amistio config and replays it before claiming more work. The envelope uses a stable idempotency key and does not store raw tool stdout, provider sessions, credentials, or arbitrary local paths.
64
66
 
65
67
  For headless startup after login on supported user-level service managers:
package/dist/index.js CHANGED
@@ -2222,9 +2222,11 @@ function computeProjectNextAction(input) {
2222
2222
  if (failedPlanRevision) {
2223
2223
  return failedWorkAction(failedPlanRevision, "planRevisionFailed", "Plan revision failed", failedPlanRevision.lastStatusMessage ?? "Review the conversation and request another revision if needed.");
2224
2224
  }
2225
- const blockedWork = latestWorkItem(input.workItems.filter((item) => item.status === "blocked" || item.status === "changesRequested"));
2225
+ const blockedWorkItems = input.workItems.filter((item) => item.status === "blocked" || item.status === "changesRequested");
2226
+ const blockedWork = latestWorkItem(blockedWorkItems);
2226
2227
  if (blockedWork) {
2227
- return workAction(blockedWork, "workBlocked", "user", "danger", "Work is blocked", blockedWork.lastStatusMessage ?? "Review the blocked work item before the runner can continue.");
2228
+ const message = workStatusReason(blockedWork, "Review the blocked work item before the runner can continue.");
2229
+ return workAction(blockedWork, "workBlocked", "user", "danger", "Work is blocked", blockedWorkItems.length > 1 ? `Latest blocked work ${blockedWork.workItemId}: ${message}` : message);
2228
2230
  }
2229
2231
  const failedWork = latestWorkItem(input.workItems.filter((item) => item.status === "failed"));
2230
2232
  if (failedWork) {
@@ -2337,6 +2339,9 @@ function failedWorkAction(workItem, kind, fallbackTitle, fallbackMessage) {
2337
2339
  }
2338
2340
  return workAction(workItem, kind, "user", "danger", fallbackTitle, fallbackMessage);
2339
2341
  }
2342
+ function workStatusReason(workItem, fallbackMessage) {
2343
+ return workItem.blockerReason ?? workItem.sourceFailureSummary ?? workItem.lastStatusMessage ?? fallbackMessage;
2344
+ }
2340
2345
  function workAction(workItem, kind, actor, tone, title, message, detail) {
2341
2346
  return {
2342
2347
  kind,
@@ -5938,6 +5943,8 @@ function createAppEvaluationScanPrompt(workItem, context) {
5938
5943
  "- When lifecycle metadata disagrees across indexes, frontmatter, feature specs, ADRs, and implementation evidence, cite the conflict and propose a metadata correction or verification step instead of archival/removal.",
5939
5944
  "- Check missing memory or workflow updates when repeated lessons or operational rules are visible.",
5940
5945
  "- Check release readiness, UX, accessibility, performance, reliability, and security-posture follow-through at a summary level.",
5946
+ "- Prefer repository-documented verification commands over ad hoc package-script inference.",
5947
+ "- For this Amistio monorepo, if plain Corepack pnpm fails before scripts with spawnSync pnpm ENOENT, retry the documented command corepack pnpm --config.verify-deps-before-run=false verify before declaring whole-app verification blocked.",
5941
5948
  "",
5942
5949
  "## Data Safety",
5943
5950
  "",
@@ -9154,7 +9161,7 @@ function startWorkLeaseRenewal({ apiClient, projectId, repositoryLinkId, runnerI
9154
9161
  }
9155
9162
  async function recordFinalizationFailure({ apiClient, durationMs, error, isolationTelemetry, projectId, repositoryLinkId, runnerId, sessionContext, toolConfig, toolName, workItem }) {
9156
9163
  const detail = truncateLogExcerpt(errorDetail(error));
9157
- const message = `${toolName} completed, but Amistio could not finalize the result.`;
9164
+ const message = `${toolName} completed, but Amistio could not finalize the result. ${safeFinalizationFailureSummary(error)}`;
9158
9165
  const settlements = await Promise.allSettled([
9159
9166
  apiClient.sendRunnerHeartbeat(projectId, runnerId, repositoryLinkId, "online", runnerHeartbeatMetadata(toolConfig)),
9160
9167
  markToolSessionBlocked(apiClient, projectId, sessionContext.toolSession, errorMessage3(error)),
@@ -9194,6 +9201,12 @@ async function recordFinalizationFailure({ apiClient, durationMs, error, isolati
9194
9201
  console.error(detail);
9195
9202
  return { status: "failed", exitCode: 1, message };
9196
9203
  }
9204
+ function safeFinalizationFailureSummary(error) {
9205
+ if (error instanceof AmistioApiError) {
9206
+ return truncateLogExcerpt(error.message);
9207
+ }
9208
+ return "Review the runner log for the finalization error.";
9209
+ }
9197
9210
  function workItemIsolationTelemetry(workItem, isolation) {
9198
9211
  const implementationScopeId = isolation?.implementationScopeId ?? workItem.implementationScopeId;
9199
9212
  const executionBranch = isolation?.branch ?? workItem.executionBranch;