import { z } from "zod"; export declare const PROTOCOL_VERSION = 1; export declare const LIMITS: { /** Events per sync request. */ readonly max_events_per_sync: 200; /** Bytes per sync request body. */ readonly max_sync_bytes: number; readonly max_command_results: 50; readonly max_commands: 50; /** Hosted-ingress deliveries per sync response. */ readonly max_ingress_items: 20; /** One hosted-ingress request body (what `POST /hooks/` accepts by default). */ readonly max_ingress_body_bytes: number; /** A webhook payload uploaded with `delivery.received`. */ readonly max_payload_upload_bytes: number; /** A job result inlined in `job.finished` (the rest stays in the job directory). */ readonly max_result_inline_bytes: number; /** One artifact uploaded through `PUT /api/agent/artifacts//`, in chunks. */ readonly max_artifact_bytes: number; readonly artifact_chunk_bytes: number; readonly max_watched_jobs: 5; /** How long the cloud may hold an idle sync request. */ readonly long_poll_seconds: 25; /** One `POST /api/agent/issues` body (a problem report from `skillhook cloud report`). */ readonly max_issue_report_bytes: number; /** A skill definition (src/definitions.ts): files listed, one file's text, all its text; definitions per `definitions.get`. */ readonly max_definition_files: 200; readonly max_definition_file_bytes: number; readonly max_definition_bytes: number; readonly max_definitions_per_command: 20; }; export declare const RUNNER_NAMES: readonly ["claude", "codex", "shell"]; export declare const JOB_STATUSES: readonly ["queued", "running", "succeeded", "failed", "timed_out", "cancelled", "interrupted"]; export declare const JOB_OUTCOMES: readonly ["completed", "partial", "needs_human", "nothing_to_do", "failed", "unknown"]; export declare const TRIGGERS: readonly ["webhook", "cli", "mcp", "api", "schedule", "replay", "test", "resume"]; export declare const DELIVERY_OUTCOMES: readonly ["accepted", "duplicate", "in_flight", "skipped", "rejected", "challenge", "error"]; export declare const FAILURE_KINDS: readonly ["auth", "usage_limit", "rate_limit", "budget", "max_turns", "not_found", "timeout", "crash", "unknown"]; export declare const CHECK_STATUSES: readonly ["ok", "warn", "fail", "skip"]; export declare const PROGRESS_STATES: readonly ["working", "blocked", "waiting_human", "done"]; /** What a link in a job's response points at (`response.links[].kind`); the records stay loose, so a newer kind reads as unknown, not as an error. */ export declare const LINK_KINDS: readonly ["source", "pull_request", "commit", "issue", "message", "document", "deploy", "test", "log", "result", "other"]; export type LinkKind = (typeof LINK_KINDS)[number]; /** Most links a response keeps, and the longest job title and one-line headline. */ export declare const REPORT_LIMITS: { readonly max_links: 50; readonly max_title: 200; readonly max_headline: 280; readonly max_options: 20; readonly max_option: 200; }; export declare const MACHINE_MODES: readonly ["observe", "control"]; export type MachineMode = (typeof MACHINE_MODES)[number]; export declare const LINK_STATES: readonly ["disabled", "connecting", "connected", "degraded", "disconnected"]; export type LinkState = (typeof LINK_STATES)[number]; export declare const LINK_REASONS: readonly ["token_missing", "token_revoked", "machine_disabled", "insecure_url", "upgrade_required", "network", "server_error", "protocol_error", "env_disabled"]; export type LinkReason = (typeof LINK_REASONS)[number]; /** Event types a machine uploads (the `EventMap` of skillhook plus the link's own and `job.output`). */ export declare const CLOUD_EVENT_TYPES: readonly ["link.started", "link.stopped", "delivery.received", "job.queued", "job.started", "job.updated", "job.finished", "job.cancelled", "job.progress", "job.waiting_human", "job.answered", "job.output", "schedule.registered", "schedule.fired", "schedule.skipped", "skill.changed", "skills.synced", "config.changed", "health.changed", "health.report", "runners.changed", "account.changed", "account.updated"]; export type CloudEventType = (typeof CLOUD_EVENT_TYPES)[number]; export declare const COMMAND_TYPES: readonly ["ping", "health.get", "snapshot.get", "runners.get", "accounts.get", "skills.list", "skill.get", "definitions.get", "skill.put", "skill.delete", "skills.sync", "skill.adopt", "skill.run", "skill.test", "delivery.list", "delivery.get", "delivery.replay", "job.list", "job.get", "job.artifact", "job.watch", "job.unwatch", "job.cancel", "job.replay", "job.answer", "job.close", "job.progress.get", "stats.get", "config.get", "config.patch", "secret.list", "secret.generate", "secret.set", "service.status", "service.restart", "logs.tail", "schedules.list", "schedule.run", "schedule.pause", "schedule.resume", "update.check", "update.install", "expose.status"]; export type CommandType = (typeof COMMAND_TYPES)[number]; /** `read`: allowed in both modes. `control`: needs `cloud.mode: control` or an allow-list entry. `allow_list`: only with an explicit allow-list entry. */ export type CommandClass = "read" | "control" | "allow_list"; export declare const COMMAND_CLASS: Record; /** What each command's `args` must look like (validated on the machine before anything runs). */ export declare const COMMAND_ARGS: { ping: z.ZodObject<{}, z.core.$strict>; "health.get": z.ZodObject<{ deep: z.ZodOptional; refresh: z.ZodOptional; }, z.core.$strict>; "snapshot.get": z.ZodObject<{}, z.core.$strict>; "runners.get": z.ZodObject<{ refresh: z.ZodOptional; }, z.core.$strict>; "accounts.get": z.ZodObject<{ account: z.ZodOptional; refresh: z.ZodOptional; usage: z.ZodOptional; }, z.core.$strict>; "skills.list": z.ZodObject<{}, z.core.$strict>; "skill.get": z.ZodObject<{ name: z.ZodString; }, z.core.$strict>; "definitions.get": z.ZodObject<{ sha256: z.ZodArray; }, z.core.$strict>; "skill.put": z.ZodObject<{ name: z.ZodString; content: z.ZodString; allow_unauthenticated: z.ZodOptional; }, z.core.$strict>; "skill.delete": z.ZodObject<{ name: z.ZodString; }, z.core.$strict>; "skills.sync": z.ZodObject<{}, z.core.$strict>; "skill.adopt": z.ZodObject<{ name: z.ZodString; sha256: z.ZodString; }, z.core.$strict>; "skill.run": z.ZodObject<{ runner: z.ZodOptional>; model: z.ZodOptional; effort: z.ZodOptional; name: z.ZodString; payload: z.ZodOptional; headers: z.ZodOptional>; }, z.core.$strict>; "skill.test": z.ZodObject<{ runner: z.ZodOptional>; model: z.ZodOptional; effort: z.ZodOptional; skill_md: z.ZodString; payload: z.ZodOptional; headers: z.ZodOptional>; cwd: z.ZodOptional; }, z.core.$strict>; "delivery.list": z.ZodObject<{ since: z.ZodOptional; after: z.ZodOptional; limit: z.ZodOptional; skill: z.ZodOptional; outcome: z.ZodOptional>; }, z.core.$strict>; "delivery.get": z.ZodObject<{ id: z.ZodString; include_body: z.ZodOptional; }, z.core.$strict>; "delivery.replay": z.ZodObject<{ runner: z.ZodOptional>; model: z.ZodOptional; effort: z.ZodOptional; id: z.ZodString; skip_filters: z.ZodOptional; force: z.ZodOptional; }, z.core.$strict>; "job.list": z.ZodObject<{ since: z.ZodOptional; after: z.ZodOptional; limit: z.ZodOptional; skill: z.ZodOptional; status: z.ZodOptional>; outcome: z.ZodOptional>; failure: z.ZodOptional>; trigger: z.ZodOptional>; waiting: z.ZodOptional; }, z.core.$strict>; "job.get": z.ZodObject<{ id: z.ZodString; include: z.ZodOptional>>; }, z.core.$strict>; "job.artifact": z.ZodObject<{ id: z.ZodString; name: z.ZodEnum<{ event: "event"; payload: "payload"; prompt: "prompt"; response: "response"; result: "result"; stderr: "stderr"; stdout: "stdout"; }>; max_inline_bytes: z.ZodOptional; }, z.core.$strict>; "job.watch": z.ZodObject<{ id: z.ZodString; ttl_s: z.ZodOptional; stream: z.ZodOptional>; }, z.core.$strict>; "job.unwatch": z.ZodObject<{ id: z.ZodString; }, z.core.$strict>; "job.cancel": z.ZodObject<{ id: z.ZodString; }, z.core.$strict>; "job.replay": z.ZodObject<{ runner: z.ZodOptional>; model: z.ZodOptional; effort: z.ZodOptional; id: z.ZodString; skip_filters: z.ZodOptional; }, z.core.$strict>; "job.answer": z.ZodObject<{ id: z.ZodString; answer: z.ZodString; option: z.ZodOptional; by: z.ZodOptional; resume: z.ZodOptional>; }, z.core.$strict>; "job.close": z.ZodObject<{ id: z.ZodString; reason: z.ZodOptional; by: z.ZodOptional; }, z.core.$strict>; "job.progress.get": z.ZodObject<{ id: z.ZodString; }, z.core.$strict>; "stats.get": z.ZodObject<{ since: z.ZodOptional; until: z.ZodOptional; skill: z.ZodOptional; }, z.core.$strict>; "config.get": z.ZodObject<{}, z.core.$strict>; "config.patch": z.ZodObject<{ set: z.ZodOptional>; unset: z.ZodOptional>; }, z.core.$strict>; "secret.list": z.ZodObject<{}, z.core.$strict>; "secret.generate": z.ZodObject<{ name: z.ZodString; force: z.ZodOptional; recipient_key: z.ZodOptional; }, z.core.$strict>; "secret.set": z.ZodObject<{ name: z.ZodString; sealed: z.ZodObject<{ recipient_key: z.ZodOptional; ephemeral_public_key: z.ZodString; nonce: z.ZodString; ciphertext: z.ZodString; }, z.core.$strict>; }, z.core.$strict>; "service.status": z.ZodObject<{}, z.core.$strict>; "service.restart": z.ZodObject<{ when: z.ZodOptional>; wait_seconds: z.ZodOptional; }, z.core.$strict>; "logs.tail": z.ZodObject<{ lines: z.ZodOptional; }, z.core.$strict>; "schedules.list": z.ZodObject<{}, z.core.$strict>; "schedule.run": z.ZodObject<{ name: z.ZodString; }, z.core.$strict>; "schedule.pause": z.ZodObject<{ name: z.ZodString; reason: z.ZodOptional; until: z.ZodOptional; }, z.core.$strict>; "schedule.resume": z.ZodObject<{ name: z.ZodString; }, z.core.$strict>; "update.check": z.ZodObject<{}, z.core.$strict>; "update.install": z.ZodObject<{}, z.core.$strict>; "expose.status": z.ZodObject<{}, z.core.$strict>; }; export declare const COMMAND_ERROR_CODES: readonly ["unsupported_command", "denied_by_policy", "invalid_args", "not_found", "conflict", "timeout", "expired", "duplicate", "too_large", "unavailable", "internal"]; export type CommandErrorCode = (typeof COMMAND_ERROR_CODES)[number]; export declare const CommandSchema: z.ZodObject<{ id: z.ZodString; type: z.ZodEnum<{ "accounts.get": "accounts.get"; "config.get": "config.get"; "config.patch": "config.patch"; "definitions.get": "definitions.get"; "delivery.get": "delivery.get"; "delivery.list": "delivery.list"; "delivery.replay": "delivery.replay"; "expose.status": "expose.status"; "health.get": "health.get"; "job.answer": "job.answer"; "job.artifact": "job.artifact"; "job.cancel": "job.cancel"; "job.close": "job.close"; "job.get": "job.get"; "job.list": "job.list"; "job.progress.get": "job.progress.get"; "job.replay": "job.replay"; "job.unwatch": "job.unwatch"; "job.watch": "job.watch"; "logs.tail": "logs.tail"; ping: "ping"; "runners.get": "runners.get"; "schedule.pause": "schedule.pause"; "schedule.resume": "schedule.resume"; "schedule.run": "schedule.run"; "schedules.list": "schedules.list"; "secret.generate": "secret.generate"; "secret.list": "secret.list"; "secret.set": "secret.set"; "service.restart": "service.restart"; "service.status": "service.status"; "skill.adopt": "skill.adopt"; "skill.delete": "skill.delete"; "skill.get": "skill.get"; "skill.put": "skill.put"; "skill.run": "skill.run"; "skill.test": "skill.test"; "skills.list": "skills.list"; "skills.sync": "skills.sync"; "snapshot.get": "snapshot.get"; "stats.get": "stats.get"; "update.check": "update.check"; "update.install": "update.install"; }>; args: z.ZodOptional; issued_at: z.ZodString; expires_at: z.ZodOptional; timeout_ms: z.ZodOptional; requested_by: z.ZodOptional; id: z.ZodOptional; name: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>; export type Command = z.infer; export declare const CommandErrorSchema: z.ZodObject<{ code: z.ZodEnum<{ conflict: "conflict"; denied_by_policy: "denied_by_policy"; duplicate: "duplicate"; expired: "expired"; internal: "internal"; invalid_args: "invalid_args"; not_found: "not_found"; timeout: "timeout"; too_large: "too_large"; unavailable: "unavailable"; unsupported_command: "unsupported_command"; }>; message: z.ZodString; hint: z.ZodOptional; }, z.core.$strict>; /** A value only the requester can read: X25519 + HKDF-SHA256 + AES-256-GCM to `recipient_key` (see docs/cloud-protocol.md). */ export declare const SealedSchema: z.ZodObject<{ recipient_key: z.ZodString; ephemeral_public_key: z.ZodString; nonce: z.ZodString; ciphertext: z.ZodString; }, z.core.$strict>; export type Sealed = z.infer; export declare const CommandResultSchema: z.ZodObject<{ command_id: z.ZodString; ok: z.ZodBoolean; result: z.ZodOptional; error: z.ZodOptional; message: z.ZodString; hint: z.ZodOptional; }, z.core.$strict>>; sensitive: z.ZodOptional; sealed: z.ZodOptional>; started_at: z.ZodString; finished_at: z.ZodString; duration_ms: z.ZodNumber; }, z.core.$strict>; export type CommandResult = z.infer; export declare const MachineInfoSchema: z.ZodObject<{ id: z.ZodString; hostname: z.ZodString; os: z.ZodString; arch: z.ZodString; skillhook_version: z.ZodString; node_version: z.ZodString; started_at: z.ZodString; public_url: z.ZodOptional; }, z.core.$strict>; export type MachineInfo = z.infer; export declare const LinkStatusSchema: z.ZodObject<{ state: z.ZodEnum<{ connected: "connected"; connecting: "connecting"; degraded: "degraded"; disabled: "disabled"; disconnected: "disconnected"; }>; reason: z.ZodOptional>; mode: z.ZodEnum<{ control: "control"; observe: "observe"; }>; outbox_depth: z.ZodNumber; dropped_total: z.ZodNumber; watched_jobs: z.ZodNumber; }, z.core.$strict>; export type LinkStatus = z.infer; export declare const StatusSchema: z.ZodObject<{ queue: z.ZodObject<{ running: z.ZodNumber; queued: z.ZodNumber; }, z.core.$strict>; running_jobs: z.ZodArray; link: z.ZodObject<{ state: z.ZodEnum<{ connected: "connected"; connecting: "connecting"; degraded: "degraded"; disabled: "disabled"; disconnected: "disconnected"; }>; reason: z.ZodOptional>; mode: z.ZodEnum<{ control: "control"; observe: "observe"; }>; outbox_depth: z.ZodNumber; dropped_total: z.ZodNumber; watched_jobs: z.ZodNumber; }, z.core.$strict>; }, z.core.$strict>; export type Status = z.infer; /** Records the cloud stores as JSON keep unknown fields (a newer machine may say more): `.loose()`. */ export declare const SkillSummarySchema: z.ZodObject<{ name: z.ZodString; description: z.ZodOptional; enabled: z.ZodBoolean; runner: z.ZodEnum<{ claude: "claude"; codex: "codex"; shell: "shell"; }>; source: z.ZodObject<{ type: z.ZodString; }, z.core.$loose>; }, z.core.$loose>; export declare const DEFINITION_KINDS: readonly ["skill", "hook"]; export type DefinitionKind = (typeof DEFINITION_KINDS)[number]; /** A path inside a definition: relative, `/`-separated segments of letters, digits, `.`, `_` and `-`, none of them `.` or `..` (the same rule as `isDefinitionPath` in src/definitions.ts). */ export declare function isDefinitionPath(value: string): boolean; export declare const DefinitionFileSchema: z.ZodObject<{ path: z.ZodString; sha256: z.ZodString; bytes: z.ZodNumber; text: z.ZodOptional; text_omitted: z.ZodOptional>; }, z.core.$strict>; export type DefinitionFile = z.infer; /** * A skill's definition: `sha256` over the kind, the name and the sorted `(path, sha256)` pairs of its files. `skill`: a * SKILL.md directory (`SKILL.md` at the root); `hook`: a `skillhook.yaml` hook (`hook.yaml` carries its block) and, for a * `skill:` hook, the SKILL.md directory it names at its path in the repository. */ export declare const DefinitionSchema: z.ZodObject<{ sha256: z.ZodString; kind: z.ZodEnum<{ hook: "hook"; skill: "skill"; }>; name: z.ZodString; files: z.ZodArray; text_omitted: z.ZodOptional>; }, z.core.$strict>>; bytes: z.ZodNumber; files_omitted: z.ZodOptional; }, z.core.$strict>; export type Definition = z.infer; /** One skill the cloud assigns to a machine (`GET /api/agent/skills`): the definition it should serve, by hash. */ export declare const AssignedSkillSchema: z.ZodObject<{ name: z.ZodString; sha256: z.ZodString; allow_unauthenticated: z.ZodOptional; }, z.core.$loose>; export type AssignedSkill = z.infer; export declare const AssignedSkillsResponseSchema: z.ZodObject<{ ok: z.ZodLiteral; skills: z.ZodArray; }, z.core.$loose>>; }, z.core.$loose>; /** `GET /api/agent/skills/`: the assignment and its definition (`304` when `If-None-Match` named the current hash, `404 not_assigned` otherwise). */ export declare const AssignedSkillResponseSchema: z.ZodObject<{ ok: z.ZodLiteral; skill: z.ZodObject<{ name: z.ZodString; sha256: z.ZodString; allow_unauthenticated: z.ZodOptional; }, z.core.$loose>; definition: z.ZodObject<{ sha256: z.ZodString; kind: z.ZodEnum<{ hook: "hook"; skill: "skill"; }>; name: z.ZodString; files: z.ZodArray; text_omitted: z.ZodOptional>; }, z.core.$strict>>; bytes: z.ZodNumber; files_omitted: z.ZodOptional; }, z.core.$strict>; }, z.core.$loose>; /** What a machine says about its cloud-managed skills in the snapshot. */ export declare const ManagedSkillsStateSchema: z.ZodObject<{ enabled: z.ZodBoolean; allowed: z.ZodBoolean; last_sync_at: z.ZodOptional>; skills: z.ZodArray>; }, z.core.$loose>; export declare const SnapshotSchema: z.ZodObject<{ server: z.ZodOptional; }, z.core.$loose>>; skills: z.ZodArray; enabled: z.ZodBoolean; runner: z.ZodEnum<{ claude: "claude"; codex: "codex"; shell: "shell"; }>; source: z.ZodObject<{ type: z.ZodString; }, z.core.$loose>; }, z.core.$loose>>; skill_errors: z.ZodArray>; projects: z.ZodArray; hooks: z.ZodArray; }, z.core.$loose>>; schedules: z.ZodArray>; config: z.ZodRecord; health: z.ZodOptional; generated_at: z.ZodString; deep: z.ZodBoolean; }, z.core.$loose>>; runners: z.ZodOptional; ready: z.ZodBoolean; }, z.core.$loose>>>; stats: z.ZodOptional>; managed: z.ZodOptional>; skills: z.ZodArray>; }, z.core.$loose>>; }, z.core.$loose>; export type Snapshot = z.infer; export declare const EventEnvelopeSchema: z.ZodObject<{ id: z.ZodString; seq: z.ZodNullable; ts: z.ZodString; machine_id: z.ZodString; type: z.ZodEnum<{ "account.changed": "account.changed"; "account.updated": "account.updated"; "config.changed": "config.changed"; "delivery.received": "delivery.received"; "health.changed": "health.changed"; "health.report": "health.report"; "job.answered": "job.answered"; "job.cancelled": "job.cancelled"; "job.finished": "job.finished"; "job.output": "job.output"; "job.progress": "job.progress"; "job.queued": "job.queued"; "job.started": "job.started"; "job.updated": "job.updated"; "job.waiting_human": "job.waiting_human"; "link.started": "link.started"; "link.stopped": "link.stopped"; "runners.changed": "runners.changed"; "schedule.fired": "schedule.fired"; "schedule.registered": "schedule.registered"; "schedule.skipped": "schedule.skipped"; "skill.changed": "skill.changed"; "skills.synced": "skills.synced"; }>; data: z.ZodUnknown; }, z.core.$strict>; export type EventEnvelope = z.infer; export declare const IngressItemSchema: z.ZodObject<{ id: z.ZodString; skill: z.ZodString; received_at: z.ZodString; method: z.ZodEnum<{ POST: "POST"; PUT: "PUT"; }>; path: z.ZodString; query: z.ZodRecord; headers: z.ZodRecord; body_base64: z.ZodString; content_type: z.ZodNullable; source_ip: z.ZodString; }, z.core.$strict>; export type IngressItem = z.infer; export declare const IngressAckSchema: z.ZodObject<{ id: z.ZodString; outcome: z.ZodEnum<{ accepted: "accepted"; challenge: "challenge"; duplicate: "duplicate"; error: "error"; in_flight: "in_flight"; rejected: "rejected"; skipped: "skipped"; }>; http_status: z.ZodNumber; job_id: z.ZodOptional; code: z.ZodOptional; reason: z.ZodOptional; }, z.core.$strict>; export type IngressAck = z.infer; export declare const SyncRequestSchema: z.ZodObject<{ protocol_version: z.ZodLiteral<1>; sent_at: z.ZodString; wait: z.ZodBoolean; machine: z.ZodObject<{ id: z.ZodString; hostname: z.ZodString; os: z.ZodString; arch: z.ZodString; skillhook_version: z.ZodString; node_version: z.ZodString; started_at: z.ZodString; public_url: z.ZodOptional; }, z.core.$strict>; status: z.ZodObject<{ queue: z.ZodObject<{ running: z.ZodNumber; queued: z.ZodNumber; }, z.core.$strict>; running_jobs: z.ZodArray; link: z.ZodObject<{ state: z.ZodEnum<{ connected: "connected"; connecting: "connecting"; degraded: "degraded"; disabled: "disabled"; disconnected: "disconnected"; }>; reason: z.ZodOptional>; mode: z.ZodEnum<{ control: "control"; observe: "observe"; }>; outbox_depth: z.ZodNumber; dropped_total: z.ZodNumber; watched_jobs: z.ZodNumber; }, z.core.$strict>; }, z.core.$strict>; snapshot: z.ZodOptional; }, z.core.$loose>>; skills: z.ZodArray; enabled: z.ZodBoolean; runner: z.ZodEnum<{ claude: "claude"; codex: "codex"; shell: "shell"; }>; source: z.ZodObject<{ type: z.ZodString; }, z.core.$loose>; }, z.core.$loose>>; skill_errors: z.ZodArray>; projects: z.ZodArray; hooks: z.ZodArray; }, z.core.$loose>>; schedules: z.ZodArray>; config: z.ZodRecord; health: z.ZodOptional; generated_at: z.ZodString; deep: z.ZodBoolean; }, z.core.$loose>>; runners: z.ZodOptional; ready: z.ZodBoolean; }, z.core.$loose>>>; stats: z.ZodOptional>; managed: z.ZodOptional>; skills: z.ZodArray>; }, z.core.$loose>>; }, z.core.$loose>>; events: z.ZodArray; ts: z.ZodString; machine_id: z.ZodString; type: z.ZodEnum<{ "account.changed": "account.changed"; "account.updated": "account.updated"; "config.changed": "config.changed"; "delivery.received": "delivery.received"; "health.changed": "health.changed"; "health.report": "health.report"; "job.answered": "job.answered"; "job.cancelled": "job.cancelled"; "job.finished": "job.finished"; "job.output": "job.output"; "job.progress": "job.progress"; "job.queued": "job.queued"; "job.started": "job.started"; "job.updated": "job.updated"; "job.waiting_human": "job.waiting_human"; "link.started": "link.started"; "link.stopped": "link.stopped"; "runners.changed": "runners.changed"; "schedule.fired": "schedule.fired"; "schedule.registered": "schedule.registered"; "schedule.skipped": "schedule.skipped"; "skill.changed": "skill.changed"; "skills.synced": "skills.synced"; }>; data: z.ZodUnknown; }, z.core.$strict>>; command_results: z.ZodArray; error: z.ZodOptional; message: z.ZodString; hint: z.ZodOptional; }, z.core.$strict>>; sensitive: z.ZodOptional; sealed: z.ZodOptional>; started_at: z.ZodString; finished_at: z.ZodString; duration_ms: z.ZodNumber; }, z.core.$strict>>; ingress_acks: z.ZodArray; http_status: z.ZodNumber; job_id: z.ZodOptional; code: z.ZodOptional; reason: z.ZodOptional; }, z.core.$strict>>; ack: z.ZodObject<{ commands_received: z.ZodArray; }, z.core.$strict>; }, z.core.$strict>; export type SyncRequest = z.infer; /** Hints only ever make the machine do less, or tell it where its hosted URLs are. */ export declare const HintsSchema: z.ZodObject<{ snapshot_interval_s: z.ZodOptional; health_interval_s: z.ZodOptional; upload_payloads: z.ZodOptional>; upload_artifacts: z.ZodOptional>; max_event_bytes: z.ZodOptional; max_batch_events: z.ZodOptional; mode: z.ZodOptional>; ingress_urls: z.ZodOptional>; }, z.core.$strict>; export type Hints = z.infer; export declare const SyncResponseSchema: z.ZodObject<{ ok: z.ZodLiteral; protocol_version: z.ZodNumber; min_protocol_version: z.ZodNumber; server_time: z.ZodString; ack: z.ZodObject<{ events_through: z.ZodNumber; command_results: z.ZodArray; }, z.core.$strict>; commands: z.ZodArray; args: z.ZodOptional; issued_at: z.ZodString; expires_at: z.ZodOptional; timeout_ms: z.ZodOptional; requested_by: z.ZodOptional; id: z.ZodOptional; name: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>>; ingress: z.ZodArray; path: z.ZodString; query: z.ZodRecord; headers: z.ZodRecord; body_base64: z.ZodString; content_type: z.ZodNullable; source_ip: z.ZodString; }, z.core.$strict>>; next_poll_ms: z.ZodNumber; hints: z.ZodOptional; health_interval_s: z.ZodOptional; upload_payloads: z.ZodOptional>; upload_artifacts: z.ZodOptional>; max_event_bytes: z.ZodOptional; max_batch_events: z.ZodOptional; mode: z.ZodOptional>; ingress_urls: z.ZodOptional>; }, z.core.$strict>>; rotate: z.ZodOptional>; notice: z.ZodOptional; }, z.core.$strict>; export type SyncResponse = z.infer; export declare const SYNC_ERROR_CODES: readonly ["invalid_token", "machine_disabled", "upgrade_required", "rate_limited", "payload_too_large", "invalid_request", "server_error"]; export declare const SyncErrorSchema: z.ZodObject<{ ok: z.ZodLiteral; error: z.ZodEnum<{ invalid_request: "invalid_request"; invalid_token: "invalid_token"; machine_disabled: "machine_disabled"; payload_too_large: "payload_too_large"; rate_limited: "rate_limited"; server_error: "server_error"; upgrade_required: "upgrade_required"; }>; message: z.ZodOptional; retry_after_ms: z.ZodOptional; min_protocol_version: z.ZodOptional; }, z.core.$strict>; export type SyncError = z.infer; export declare const PAIRING_CODE_RE: RegExp; export declare const PairRequestSchema: z.ZodObject<{ protocol_version: z.ZodLiteral<1>; code: z.ZodOptional; token: z.ZodOptional; machine: z.ZodObject<{ hostname: z.ZodString; os: z.ZodString; arch: z.ZodString; skillhook_version: z.ZodString; node_version: z.ZodString; started_at: z.ZodString; public_url: z.ZodOptional; previous_machine_id: z.ZodOptional; }, z.core.$strict>; requested_mode: z.ZodEnum<{ control: "control"; observe: "observe"; }>; public_key: z.ZodOptional; }, z.core.$strict>; export type PairRequest = z.infer; export declare const PairResponseSchema: z.ZodObject<{ ok: z.ZodLiteral; machine_id: z.ZodString; machine_token: z.ZodString; mode: z.ZodEnum<{ control: "control"; observe: "observe"; }>; account: z.ZodObject<{ org: z.ZodString; org_slug: z.ZodOptional; user: z.ZodOptional; }, z.core.$loose>; dashboard_url: z.ZodString; protocol_version: z.ZodNumber; min_protocol_version: z.ZodNumber; }, z.core.$strict>; export type PairResponse = z.infer; export declare const ISSUE_KINDS: readonly ["bug", "question", "feature", "other"]; export type IssueKind = (typeof ISSUE_KINDS)[number]; export declare const ISSUE_SEVERITIES: readonly ["low", "normal", "high", "urgent"]; export type IssueSeverity = (typeof ISSUE_SEVERITIES)[number]; /** Facts the machine already has, attached to a report unless the person says no; scrubbed of every `.env` value. Never payloads, logs, prompts or job output. */ export declare const IssueDiagnosticsSchema: z.ZodObject<{ skillhook_version: z.ZodOptional; node_version: z.ZodOptional; os: z.ZodOptional; arch: z.ZodOptional; mode: z.ZodOptional>; link: z.ZodOptional; reason: z.ZodOptional>; last_error: z.ZodOptional; }, z.core.$loose>>; runners: z.ZodOptional; ready: z.ZodBoolean; }, z.core.$loose>>>; health: z.ZodOptional; failing: z.ZodOptional; message: z.ZodOptional; }, z.core.$loose>>>; }, z.core.$loose>>; }, z.core.$loose>; export type IssueDiagnostics = z.infer; /** `POST /api/agent/issues` with the machine token: a person on a paired machine reports a problem to the Skillhook team. */ export declare const IssueReportRequestSchema: z.ZodObject<{ title: z.ZodString; body: z.ZodOptional; kind: z.ZodOptional>; severity: z.ZodOptional>; contact_email: z.ZodOptional; job_id: z.ZodOptional; delivery_id: z.ZodOptional; skill: z.ZodOptional; diagnostics: z.ZodOptional; node_version: z.ZodOptional; os: z.ZodOptional; arch: z.ZodOptional; mode: z.ZodOptional>; link: z.ZodOptional; reason: z.ZodOptional>; last_error: z.ZodOptional; }, z.core.$loose>>; runners: z.ZodOptional; ready: z.ZodBoolean; }, z.core.$loose>>>; health: z.ZodOptional; failing: z.ZodOptional; message: z.ZodOptional; }, z.core.$loose>>>; }, z.core.$loose>>; }, z.core.$loose>>; report_id: z.ZodOptional; }, z.core.$strict>; export type IssueReportRequest = z.infer; /** The same answer for a new report and for a retry of one (the same `report_id`). */ export declare const IssueReportResponseSchema: z.ZodObject<{ ok: z.ZodLiteral; issue_id: z.ZodString; number: z.ZodNumber; url: z.ZodString; acknowledged: z.ZodBoolean; }, z.core.$strict>; export type IssueReportResponse = z.infer; /** Parses `args` for a command type; `undefined` for an unknown type. */ export declare function parseCommandArgs(type: string, args: unknown): { ok: true; args: unknown; } | { ok: false; message: string; } | undefined;