mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-19 08:01:17 +00:00
* feat: add downloadFile to CloudRunner + local OpenClaw config merge Add `downloadFile(remotePath, localPath)` to the CloudRunner interface and implement it across all 6 cloud providers (Hetzner, AWS, GCP, DigitalOcean, Sprite, Local) — mirroring the existing `uploadFile` with reversed SCP direction. Replace the OpenClaw config write with a download → deep-merge → upload flow so config merging happens in our own linted TypeScript instead of a remote script. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: move isPlainObject and deepMerge to shared utils Extract `isPlainObject` to `shared/type-guards.ts` and `deepMerge` to `shared/parse.ts` so they're reusable across the codebase. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: promote isPlainObject to shared package, use across codebase Move `isPlainObject` from cli/type-guards.ts into @openrouter/spawn-shared so it can be used everywhere. Replace inline `val !== null && typeof val === "object" && !Array.isArray(val)` checks in: - shared/type-guards.ts (toRecord, toObjectArray) - shared/parse.ts (parseJsonObj) - cli/manifest.ts (isValidManifest) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: remove type-guards re-export, import directly from spawn-shared Delete `packages/cli/src/shared/type-guards.ts` (was just a re-export barrel). All 35 consuming files now import `getErrorMessage`, `isString`, `isNumber`, `isPlainObject`, `toRecord`, etc. directly from `@openrouter/spawn-shared`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
18 lines
445 B
TypeScript
18 lines
445 B
TypeScript
export type { Result } from "./result";
|
|
export type { ValueOf } from "./type-guards";
|
|
|
|
export { parseJsonObj, parseJsonWith } from "./parse";
|
|
export {
|
|
asyncTryCatch,
|
|
asyncTryCatchIf,
|
|
Err,
|
|
isFileError,
|
|
isNetworkError,
|
|
isOperationalError,
|
|
mapResult,
|
|
Ok,
|
|
tryCatch,
|
|
tryCatchIf,
|
|
unwrapOr,
|
|
} from "./result";
|
|
export { getErrorMessage, hasStatus, isNumber, isPlainObject, isString, toObjectArray, toRecord } from "./type-guards";
|