/** * `gsk skills save [path]` — client-side directory collector for the backend * `skills_save` action. * * Why client-side: `skills_save` takes `files: [{path, content_base64}]` in * its request body (the inverse of `skills_pull`'s response shape) — an * HTTP/JSON tool has no way to walk a local directory itself, so the CLI * reads the tree and ships the encoded bytes. This is the sentinel-protocol * successor referenced in `gsk_tool_adaptor.py`'s `_action_save`: SAS used to * drop a `.save_to_self` file for the sandbox host to notice and zip * out-of-band; here the CLI does the same walk itself, synchronously, before * the request goes out. */ export interface CollectedFiles { files: Array<{ path: string; content_base64: string; }>; totalBytes: number; sidecarOwner?: string; } /** * Walk `dir` and collect every real file into a `skills_save` payload. * * - Symlinks are never followed (skipped outright) — a save must not escape * `dir` or loop on a cyclic link. * - At the root only, dotfiles are excluded except `.gitignore` (ordinary * authoring content) and the pull provenance sidecar `.genspark-skill.json` * (metadata, not a skill file). Dotfiles in subdirectories are kept as-is. * - Requires a root `SKILL.md`: the server rejects a save without one * anyway (frontmatter validation), so failing fast here saves a round trip. * - Throws once the running byte total exceeds `maxBytes`. * * Returns the sidecar's recorded `owner` (if any) so the caller can warn the * user before saving into someone else's pulled skill forks it into their * own catalog. */ export declare function collectSkillDir(dir: string, maxBytes?: number): CollectedFiles; //# sourceMappingURL=skills-save.d.ts.map