mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-21 14:05:18 +00:00
Rename Foundry handoffs to tasks (#239)
* Restore foundry onboarding stack * Consolidate foundry rename * Create foundry tasks without prompts * Rename Foundry handoffs to tasks
This commit is contained in:
parent
d30cc0bcc8
commit
d75e8c31d1
281 changed files with 9242 additions and 4356 deletions
27
foundry/packages/backend/src/actors/logging.ts
Normal file
27
foundry/packages/backend/src/actors/logging.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
export function resolveErrorMessage(error: unknown): string {
|
||||
if (error instanceof Error) {
|
||||
return error.message;
|
||||
}
|
||||
return String(error);
|
||||
}
|
||||
|
||||
export function isActorNotFoundError(error: unknown): boolean {
|
||||
return resolveErrorMessage(error).includes("Actor not found:");
|
||||
}
|
||||
|
||||
export function resolveErrorStack(error: unknown): string | undefined {
|
||||
if (error instanceof Error && typeof error.stack === "string") {
|
||||
return error.stack;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export function logActorWarning(scope: string, message: string, context?: Record<string, unknown>): void {
|
||||
const payload = {
|
||||
scope,
|
||||
message,
|
||||
...(context ?? {}),
|
||||
};
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn("[foundry][actor:warn]", payload);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue