@amistio/cli 0.1.59 → 0.1.60
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 +2 -0
- package/dist/index.js +28 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -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
|
-
|
|
15160
|
-
|
|
15161
|
-
|
|
15162
|
-
|
|
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)],
|