mirror of
https://github.com/harivansh-afk/clanker-agent.git
synced 2026-04-19 08:01:19 +00:00
fix(companion-os): address grind mode review feedback
Restore the bedrock provider import through an explicit workspace path mapping, align pi-grind package metadata with the existing package manifests, remove the unused controller-failure state path, and parse bare ISO dates in local time. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
parent
8c92f479d6
commit
48fa514e7e
7 changed files with 38 additions and 19 deletions
|
|
@ -52,7 +52,6 @@ export function createRunState(input: {
|
|||
lastNextAction: null,
|
||||
pendingRepair: false,
|
||||
consecutiveParseFailures: 0,
|
||||
consecutiveControllerFailures: 0,
|
||||
updatedAt: now,
|
||||
};
|
||||
}
|
||||
|
|
@ -75,7 +74,6 @@ export function isValidRunState(value: unknown): value is GrindRunState {
|
|||
isNullableString(value.lastNextAction) &&
|
||||
typeof value.pendingRepair === "boolean" &&
|
||||
typeof value.consecutiveParseFailures === "number" &&
|
||||
typeof value.consecutiveControllerFailures === "number" &&
|
||||
typeof value.updatedAt === "string"
|
||||
);
|
||||
}
|
||||
|
|
@ -114,19 +112,6 @@ export function withLoopStatus(state: GrindRunState, payload: GrindStatusPayload
|
|||
lastNextAction: payload.nextAction ?? null,
|
||||
pendingRepair: false,
|
||||
consecutiveParseFailures: 0,
|
||||
consecutiveControllerFailures: 0,
|
||||
updatedAt: new Date().toISOString(),
|
||||
};
|
||||
}
|
||||
|
||||
export function withControllerFailure(state: GrindRunState, note: string): GrindRunState {
|
||||
return {
|
||||
...state,
|
||||
status: "blocked",
|
||||
lastCheckpoint: note,
|
||||
lastNextAction: null,
|
||||
pendingRepair: false,
|
||||
consecutiveControllerFailures: state.consecutiveControllerFailures + 1,
|
||||
updatedAt: new Date().toISOString(),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue