@amistio/cli 0.1.59 → 0.1.61

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
@@ -89,7 +89,7 @@ Current runners can also claim read-only issue diagnosis jobs from the web Issue
89
89
 
90
90
  Current runners can claim manual read-only `testQualityScan` jobs from the workspace Test panel and create one due daily Test scan per repository when Test quality is enabled. Under a repository autonomy contract, `testQualityScan` and `implementationTestGate` are delegated evidence work instead of another approval interruption. Test scans run only existing lint, typecheck, test, coverage, build, or verify commands and submit bounded command summaries, coverage summaries, safe findings, blocked reasons, warnings, and repo-relative paths. Missing tests, missing coverage, low coverage, failing checks, flaky tests, and test gaps create autonomous repair work when delegated or reviewable plan-backed findings when not. Current runners also claim `implementationTestGate` jobs before implementation completion, PR handoff, or runner-managed push; a passing gate is required unless the web Test panel records an audited override. Blocked implementation Test gates submit structured Test findings, such as `blockedEnvironment`, with safe evidence, a suggested action, and a verification plan. Current runners can claim read-only `implementationVerification` jobs from Tasks to prove whether completed implementation work actually landed; verification submits bounded acceptance-criteria evidence, checks, gaps, outcome, and recommendation without mutating source. Source, secrets, environment variables, command lines, process lists, credentials, provider sessions, and arbitrary local paths stay local. Implementation or cleanup is queued separately only when a repository autonomy contract or explicit approval authorizes it.
91
91
 
92
- Runner-driven app evaluation, Test quality, and Security posture signals skip fresh clean evidence when no active finding, failed/blocked gate, or exception needs action. If an implementation Test gate fails or blocks under an enabled repository autonomy contract, Amistio queues one deduped low-risk test-repair implementation work item so the runner can continue from validation failure into repair instead of waiting for another approval.
92
+ Runner-driven app evaluation, Test quality, and Security posture signals skip fresh clean evidence when no active finding, failed/blocked gate, or exception needs action. If an implementation Test gate fails or blocks under an enabled repository autonomy contract, Amistio queues one deduped low-risk test-repair implementation work item so the runner can continue from validation failure into repair instead of waiting for another approval. Project Home groups that work under persistent agent ownership with safe requester, runner, repository, existing-system reference, PR/no-op lineage, team ledger metrics, and human-interruption rate so enterprise teams can audit who did what without reading local agent logs.
93
93
 
94
94
  Approved implementation work uses Git as the handoff boundary. During worktree preflight, the runner locally copies eligible ignored root dotenv files such as `.env.local` or `.env.test.local` from the paired checkout into the implementation worktree when the target is missing and ignored, so local tests can use the same machine configuration. Dotenv values, variable names, file contents, and local paths are not uploaded to Amistio, and copied dotenv files stay ignored so PR handoff does not commit them. Before local AI/tool execution starts, implementation work checks PR handoff readiness: GitHub remote support, default-branch fetch, Git commit identity, local `gh` authentication, and repository visibility. After the local tool completes successfully, the runner materializes approved Markdown, MDX, and HTML project-brain artifacts for the same work scope into the isolated worktree before final Git status, then classifies the final diff. Source-implementation work must include source, config, test, or other implementation-affecting changes before the runner opens or reuses a PR. If only project-brain or documentation artifacts changed, Amistio completes the work as no implementation produced instead of opening a misleading implementation PR. App-evaluation proof and lifecycle-cleanup actions are queued with explicit docs-only expected outcomes, so safe proof notes and plan metadata updates can create docs-only PRs without being mislabeled as source implementation. Other explicit docs-only work can also create docs-only PRs. No-change completion requires no source changes and no approved artifact changes, and runner-created no-change worktrees are removed after final clean checks. Prepare the runner machine with Git commit identity, fetch/push permission to the linked remote, and `gh auth status`. If artifact materialization, commit, fetch/rebase, push, or PR creation fails, the work item is blocked with safe recovery choices; source files and patches are not uploaded to Amistio. The Work panel can queue scoped Retry handoff or Retry cleanup commands only to the runner that owns the preserved worktree for the same work item, branch, and worktree key. Retry handoff can publish a clean preserved local-only implementation commit without rerunning the implementation prompt. Rebase conflicts capture bounded repo-relative conflict files and try `git rebase --abort` so the implementation branch can be retried or manually reviewed without leaving an active rebase. Dirty, unmerged, or ambiguous worktrees are preserved rather than discarded.
95
95
 
@@ -107,6 +107,8 @@ Current runners recover abandoned server claims without impersonating the old ow
107
107
 
108
108
  Watch mode prints a completed-work success once per work item, keeps fresh completion visible briefly, and returns old completed work to the ready state when no queued, running, blocked, failed, review, or runner-readiness action needs attention. Unchanged idle-ready status is printed once and then stays quiet until the next action changes.
109
109
 
110
+ If no work is claimed but a retryable project-status read fails, watch mode prints `Status unavailable` and retries on the next poll. This status is about the idle next-action summary, not the claimed work or finalization path.
111
+
110
112
  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.
111
113
 
112
114
  If watch mode reports that the runner was forgotten by the server, run `amistio runner repair` from the paired checkout, then start `amistio run --watch` again. The repair command stores a fresh local runner ID because the default ID for a machine/project/repository is stable and can remain tombstoned. Use `--clear-credential` only when the Runner panel tells you to create a fresh pairing code.
package/dist/index.js CHANGED
@@ -5857,6 +5857,18 @@ function formatWatchStartupContext(input) {
5857
5857
  function formatWatchIdleLine(action, intervalSeconds) {
5858
5858
  return `${formatProjectNextAction(action)} Checking again in ${intervalSeconds}s.`;
5859
5859
  }
5860
+ function projectStatusUnavailableActionForError(error) {
5861
+ if (!isRetryableApiError(error)) {
5862
+ return void 0;
5863
+ }
5864
+ return {
5865
+ kind: "idle",
5866
+ actor: "system",
5867
+ tone: "warning",
5868
+ title: "Status unavailable",
5869
+ message: "No work was claimed, but Amistio could not load the latest project status. The runner will retry on the next poll."
5870
+ };
5871
+ }
5860
5872
  function shouldPrintWatchState(action, previous, nowMs, reminderMs = watchStateReminderMs) {
5861
5873
  const key = watchStateKey(action);
5862
5874
  if (!previous || previous.key !== key) {
@@ -15156,11 +15168,22 @@ function runnerIdentityScope(metadata) {
15156
15168
  };
15157
15169
  }
15158
15170
  async function loadProjectNextAction(apiClient, projectId, repositoryLinkId, root) {
15159
- const [{ workItems }, { documents }, { runners }] = await Promise.all([
15160
- apiClient.listWorkItems(projectId),
15161
- apiClient.listBrainDocuments(projectId),
15162
- apiClient.listRunners(projectId).catch(() => ({ runners: [] }))
15163
- ]);
15171
+ let workItems;
15172
+ let documents;
15173
+ let runners;
15174
+ try {
15175
+ [{ workItems }, { documents }, { runners }] = await Promise.all([
15176
+ apiClient.listWorkItems(projectId),
15177
+ apiClient.listBrainDocuments(projectId),
15178
+ apiClient.listRunners(projectId).catch(() => ({ runners: [] }))
15179
+ ]);
15180
+ } catch (error) {
15181
+ const fallback = projectStatusUnavailableActionForError(error);
15182
+ if (fallback) {
15183
+ return fallback;
15184
+ }
15185
+ throw error;
15186
+ }
15164
15187
  return computeProjectNextAction({
15165
15188
  projectId,
15166
15189
  repositoryLinks: [createCliRepositoryLink({ amistioAccountId: "local_runner", amistioProjectId: projectId, repositoryLinkId, defaultBranch: "main", lastSyncedRevision: 0 }, root)],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amistio/cli",
3
- "version": "0.1.59",
3
+ "version": "0.1.61",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",