flypod 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import type { DeploySource } from "../deploy-source";
1
2
  import type { CliSession } from "./session";
2
3
  type FetchLike = typeof fetch;
3
4
  /** Per-call-site credential overrides — `--token`/`--site` flags, or a
@@ -18,6 +19,8 @@ interface RequestInit {
18
19
  export interface FlypodClient {
19
20
  readonly baseUrl: string;
20
21
  readonly token: string | undefined;
22
+ /** Surface reported to the server on every request (`x-flypod-source`). */
23
+ readonly source: DeploySource;
21
24
  /** Low-level escape hatch: `path` is resolved against `baseUrl`; the auth
22
25
  * header is added when a token resolved. */
23
26
  request(method: string, path: string, init?: RequestInit): Promise<Response>;
@@ -72,16 +75,25 @@ export declare function resolveCredentials(env: NodeJS.ProcessEnv, session: CliS
72
75
  * that a *published library call* never has a side channel to a session
73
76
  * file or ambient env vars it didn't ask for.
74
77
  */
75
- export declare function buildClient(token: string | undefined, baseUrl: string, fetchImpl: FetchLike): FlypodClient;
78
+ export declare function buildClient(token: string | undefined, baseUrl: string, fetchImpl: FetchLike,
79
+ /** Deploy attribution. Defaults to `library`: the only callers that build a
80
+ * client without saying so are library embedders (see src/cli.ts). */
81
+ source?: DeploySource): FlypodClient;
76
82
  /**
77
83
  * Build a client with credentials resolved once (a saved session is loaded
78
84
  * from disk, so this is async). `opts.fetch`/`opts.env` are the same
79
85
  * injection seam `CommandIO` already offers commands, so tests keep working
80
86
  * hermetically end to end.
87
+ *
88
+ * The deploy source is resolved here too (see ./source.ts) so that every
89
+ * command routed through the CLI — not just `deploy` — reports the surface it
90
+ * came from without each one having to remember.
81
91
  */
82
92
  export declare function createClient(opts: {
83
93
  env?: NodeJS.ProcessEnv;
84
94
  fetch?: FetchLike;
85
95
  overrides?: ClientOverrides;
96
+ /** Project root used for skill detection. Defaults to cwd; tests inject. */
97
+ cwd?: string;
86
98
  }): Promise<FlypodClient>;
87
99
  export {};
@@ -0,0 +1,76 @@
1
+ import { type TailStyle } from "./receipt";
2
+ type FetchLike = typeof fetch;
3
+ export interface CommandIO {
4
+ /** Write a line to stdout (the scriptable surface). */
5
+ out(line: string): void;
6
+ /** Write a line to stderr (humans and errors). */
7
+ err(line: string): void;
8
+ /** Network call. Default is the global fetch; tests inject. */
9
+ fetch?: FetchLike;
10
+ /** Override the process env (tests). */
11
+ env?: NodeJS.ProcessEnv;
12
+ /** Working directory used for folder->site lookup + deploy-dir resolution. */
13
+ cwd?: string;
14
+ /** Open a URL in the default browser. Tests inject a no-op. */
15
+ openUrl?: (url: string) => Promise<void>;
16
+ /**
17
+ * How to paint the human-facing lines. Injected by the bin entrypoint so
18
+ * `update`/`rollback` accent their URL exactly as a first deploy does;
19
+ * omitted everywhere else, which renders plain text (and keeps the suite
20
+ * asserting on strings rather than on escape sequences).
21
+ */
22
+ style?: TailStyle;
23
+ }
24
+ export declare function login(args: {
25
+ token?: string;
26
+ help?: boolean;
27
+ }, io: CommandIO): Promise<number>;
28
+ export declare function logout(_args: Record<string, never>, io: CommandIO): Promise<number>;
29
+ export declare function list(_args: Record<string, never>, io: CommandIO): Promise<number>;
30
+ export declare function claim(args: {
31
+ site_id?: string;
32
+ token?: string;
33
+ }, io: CommandIO): Promise<number>;
34
+ export declare function update(args: {
35
+ path?: string;
36
+ site?: string;
37
+ token?: string;
38
+ json?: boolean;
39
+ quiet?: boolean;
40
+ help?: boolean;
41
+ }, io: CommandIO): Promise<number>;
42
+ export declare function versions(args: {
43
+ site?: string;
44
+ token?: string;
45
+ json?: boolean;
46
+ help?: boolean;
47
+ }, io: CommandIO): Promise<number>;
48
+ export declare function rollback(args: {
49
+ version?: string;
50
+ site?: string;
51
+ token?: string;
52
+ json?: boolean;
53
+ help?: boolean;
54
+ }, io: CommandIO): Promise<number>;
55
+ /**
56
+ * Reveal a site's manage token on demand.
57
+ *
58
+ * Deploy output redacts the token, because the moment it is printed it is in a
59
+ * scrollback buffer, a screen recording, or a pasted support thread — and the
60
+ * server only ever stored its hash, so it cannot be rotated, only outlived.
61
+ * Redacting costs nothing: the token is already saved for the folder, so the
62
+ * commands that need it read it from there.
63
+ *
64
+ * This is the escape hatch for the one case that genuinely needs the plaintext
65
+ * — acting on the site from somewhere that doesn't remember it. The token goes
66
+ * to stdout so it pipes; everything else goes to stderr.
67
+ */
68
+ export declare function token(args: {
69
+ site?: string;
70
+ help?: boolean;
71
+ }, io: CommandIO): Promise<number>;
72
+ export declare function forget(args: {
73
+ site?: string;
74
+ help?: boolean;
75
+ }, io: CommandIO): Promise<number>;
76
+ export {};
@@ -0,0 +1,35 @@
1
+ export { projectsFilePath } from "./paths";
2
+ /** One linked project — keyed in the file by its absolute directory. */
3
+ export interface ProjectRecord {
4
+ /** The site this folder deploys to. */
5
+ site_id: string;
6
+ /** The live URL (for display + convenience). */
7
+ url: string;
8
+ /** Host the site lives on, so commands hit the right server. */
9
+ base_url: string;
10
+ /** Per-site secret for anonymous sites. Omitted for account-owned sites. */
11
+ manage_token?: string;
12
+ /** Epoch ms the site expires (anonymous), or null when owned/permanent. */
13
+ expires_at: number | null;
14
+ /** Epoch ms of the last command that touched this entry (drives LRU). */
15
+ last_used: number;
16
+ /** Last version we know is live here — lets `update` detect a no-op. */
17
+ version_id?: string;
18
+ }
19
+ /** Hard cap on remembered projects — keeps projects.json bounded forever. */
20
+ export declare const MAX_PROJECTS = 64;
21
+ /**
22
+ * Load the registry, pruning expired entries. A missing or corrupt file is
23
+ * treated as an empty registry — this never throws.
24
+ */
25
+ export declare function loadProjects(env?: NodeJS.ProcessEnv): Promise<Record<string, ProjectRecord>>;
26
+ /** Persist the registry, pruning expired entries and LRU-capping the size. */
27
+ export declare function saveProjects(projects: Record<string, ProjectRecord>, env?: NodeJS.ProcessEnv): Promise<string>;
28
+ /** Link (or repoint) a directory to a site. */
29
+ export declare function linkProject(dir: string, rec: ProjectRecord, env?: NodeJS.ProcessEnv): Promise<void>;
30
+ /** The site linked to a directory, or null. */
31
+ export declare function projectForDir(dir: string, env?: NodeJS.ProcessEnv): Promise<ProjectRecord | null>;
32
+ /** Forget the link for a directory. Returns whether anything was removed. */
33
+ export declare function forgetDir(dir: string, env?: NodeJS.ProcessEnv): Promise<boolean>;
34
+ /** Forget every link pointing at a site id. Returns how many were removed. */
35
+ export declare function forgetSite(site_id: string, env?: NodeJS.ProcessEnv): Promise<number>;
@@ -0,0 +1,155 @@
1
+ export declare const DAY_MS = 86400000;
2
+ /**
3
+ * The column budget every line printed by this module lives inside.
4
+ *
5
+ * Not a style preference. Every launch asset is a terminal recording rendered
6
+ * at a fixed frame size (`docs/growth/assets/README.md`), and a line that wraps
7
+ * mid-word directly under the URL wrecks the hero frame the whole campaign is
8
+ * built on — that README documents two renders where it already happened. 66
9
+ * columns is the width that buys back a 16:9 frame at a legible glyph size.
10
+ *
11
+ * `test/cli-tail-width.test.ts` fails the build when a line outgrows it, which
12
+ * is the point of doing this in code rather than by eye.
13
+ */
14
+ export declare const TAIL_WIDTH = 66;
15
+ /**
16
+ * Rows `deployTail` may occupy. The surrounding deploy screen (banner, account,
17
+ * source, the ✓ line, and the rule/URL block) is twelve more, which puts the
18
+ * whole thing at nineteen — one 16:9 frame, no scroll.
19
+ */
20
+ export declare const TAIL_ROWS = 7;
21
+ /** What the terminal actually shows, with color escapes discounted. */
22
+ export declare function visibleWidth(line: string): number;
23
+ /** Whole days from `now` until `expiresAt`, floored at 0. */
24
+ export declare function daysUntil(expiresAt: number, now: number): number;
25
+ /**
26
+ * A date a human can put in a calendar: `27 Sep 2026`. Deliberately not
27
+ * locale-formatted — the string is also read by agents and copied into issues,
28
+ * and an unambiguous day-month-year beats a locale-correct 09/27 vs 27/09
29
+ * coin flip.
30
+ */
31
+ export declare function expiryDate(expiresAt: number): string;
32
+ /**
33
+ * A version's timestamp, for the `flypod versions` table: `27 Sep 2026 14:03
34
+ * UTC`. Same day-month-year as `expiryDate` plus the clock, because two
35
+ * versions of the same site are usually minutes apart and a date alone cannot
36
+ * tell them apart.
37
+ *
38
+ * Zoned explicitly. A bare `14:03` next to a wall clock showing something else
39
+ * is the kind of small wrongness that makes someone distrust the whole table,
40
+ * and `--json` still carries the raw epoch for anything that needs to compute.
41
+ */
42
+ export declare function timestamp(ms: number): string;
43
+ /**
44
+ * The version loop, in the order it is used. This is the thing campaigns.md
45
+ * says actually earns retention and it is currently something you "discover
46
+ * later" — so it goes directly under the URL, above the ownership story.
47
+ */
48
+ export declare const LOOP: Array<{
49
+ label: string;
50
+ command: string;
51
+ effect: string;
52
+ }>;
53
+ export interface TailStyle {
54
+ dim(s: string): string;
55
+ bold(s: string): string;
56
+ muted(s: string): string;
57
+ accent(s: string): string;
58
+ ok(s: string): string;
59
+ }
60
+ /**
61
+ * The TTL, and the one command that removes it. Shared by the deploy tail,
62
+ * `flypod update` and `flypod versions` so there is exactly one wording and one
63
+ * width budget to keep, rather than three that drift apart (they had: 82, 118
64
+ * and 63 columns for the same sentence).
65
+ *
66
+ * Empty for a site that doesn't expire — an owned site gets no nag anywhere.
67
+ */
68
+ export declare function expiryLines(opts: {
69
+ expiresAt: number | null;
70
+ now?: number;
71
+ style?: TailStyle;
72
+ /**
73
+ * Name `flypod versions` as the way to see this date again. Off inside
74
+ * `flypod versions` itself, which would be telling someone to run the command
75
+ * they are already looking at the output of.
76
+ */
77
+ check?: boolean;
78
+ }): string[];
79
+ export interface TailOptions {
80
+ /** Epoch ms the site expires, or null when it is owned/permanent. */
81
+ expiresAt: number | null;
82
+ /** Set when the deploy was attributed to an account. */
83
+ owned: boolean;
84
+ now?: number;
85
+ style?: TailStyle;
86
+ }
87
+ /**
88
+ * The lines printed under the live URL, in order. Returned as an array so the
89
+ * test suite asserts on content rather than on one giant template string.
90
+ *
91
+ * Ordering is the argument: the second deploy is the north star, so the loop
92
+ * comes first. Ownership is the safety valve (campaigns.md message hierarchy
93
+ * step 4) and comes after it — an upgrade offered at the end, never a gate at
94
+ * the start.
95
+ */
96
+ export declare function deployTail(opts: TailOptions): string[];
97
+ /**
98
+ * What `flypod update` says after the second deploy — the moment someone
99
+ * stopped trying flypod and started using it.
100
+ *
101
+ * Same rows as the deploy tail, minus the one they just ran. `flypod versions`
102
+ * is named on the expiry line rather than given a row of its own: it does
103
+ * double duty there as both the history command and the way to re-check the
104
+ * date, which is a row saved and nothing lost.
105
+ */
106
+ export declare function updateTail(opts: {
107
+ versionId: string;
108
+ url: string;
109
+ expiresAt: number | null;
110
+ /** Whatever survived the deploy, as the server reported it. */
111
+ warnings?: Array<{
112
+ code: string;
113
+ fix_recipe: string;
114
+ }>;
115
+ now?: number;
116
+ style?: TailStyle;
117
+ }): string[];
118
+ /** What `flypod rollback` says. Lean on purpose: this is a recovery action, not
119
+ * a place to sell anything. The URL is accented, as everywhere else. */
120
+ export declare function rollbackTail(opts: {
121
+ versionId: string;
122
+ url: string;
123
+ style?: TailStyle;
124
+ }): string[];
125
+ /**
126
+ * What to say when `flypod` is run in a folder that already deploys somewhere.
127
+ *
128
+ * This is the single most expensive misunderstanding in the product: re-running
129
+ * `flypod` makes a *new* site at a *new* URL and silently repoints the folder,
130
+ * orphaning the old one. Every such run is a fresh anonymous id server-side, so
131
+ * it reads as another one-and-done first-deployer rather than a second deploy
132
+ * by the same person.
133
+ *
134
+ * It is a notice, never a prompt — the deploy proceeds exactly as before.
135
+ */
136
+ export declare function relinkNotice(prev: {
137
+ site_id: string;
138
+ url: string;
139
+ }, style?: TailStyle): string[];
140
+ export interface AgentNextOptions {
141
+ siteId: string;
142
+ expiresAt: number | null;
143
+ owned: boolean;
144
+ now?: number;
145
+ }
146
+ /**
147
+ * The machine-readable half of everything above. Agents do not read stderr, so
148
+ * without this the 43%+ of deploys that come from a library or a skill never
149
+ * learn that `flypod update` exists — they re-run the deploy verb and make a
150
+ * second site, which is precisely the observed failure.
151
+ *
152
+ * Keys are stable and the values are literal commands, not prose: an agent can
153
+ * execute `next.update` verbatim.
154
+ */
155
+ export declare function agentNext(opts: AgentNextOptions): Record<string, unknown>;
@@ -0,0 +1,135 @@
1
+ import type { CommandIO } from "./commands";
2
+ /** Skill name. Doubles as the skill directory name in every target. */
3
+ export declare const SKILL_NAME = "flypod";
4
+ /**
5
+ * The skill's frontmatter description — the single highest-leverage string in
6
+ * the CLI, because it is the *retrieval* surface: what an agent matches against
7
+ * when deciding, mid-turn, whether flypod is the right move.
8
+ *
9
+ * It is a context pointer, so it is priced per turn whether or not it fires,
10
+ * and it earns harder pruning than the body. Two rules govern it:
11
+ *
12
+ * - **One trigger per branch.** Synonyms that rename a single branch are one
13
+ * branch written twice. "deploy, publish, ship, host, preview, share, send
14
+ * a link" is *one* branch — the user asked — and costs seven times its
15
+ * weight. Four branches genuinely differ, because a different run reaches
16
+ * the skill through each: the user asks; a build finished and someone else
17
+ * must see it; Markdown should become a site rather than a file (a distinct
18
+ * code path, and the capability agents are least likely to guess); and a
19
+ * screenshot or dev server will not do because the recipient must open it
20
+ * themselves. That last one does the most work — it names the default
21
+ * behaviour flypod displaces, which is the moment the model is actually
22
+ * reasoning through.
23
+ * - **Cut identity the body carries.** The pointer decides *when* to reach
24
+ * the skill; what flypod is belongs in the skill.
25
+ *
26
+ * The trailing boundary is the exception that earns its tokens: a skill that
27
+ * fires on an app with server routes produces a broken deploy, and one bad
28
+ * selection costs more than ten missed ones.
29
+ *
30
+ * Keep it free of `: ` and quote characters: it is rendered into YAML
31
+ * frontmatter. `yamlScalar` quotes it defensively, but plain text keeps the
32
+ * generated files readable and diff-friendly.
33
+ */
34
+ export declare const SKILL_DESCRIPTION: string;
35
+ /**
36
+ * One reference doc in the skill payload. Every entry is listed in the entry
37
+ * file's table, so adding one here without adding it to `REFERENCES` would
38
+ * strand it — unreachable content the agent never learns exists.
39
+ */
40
+ export interface ReferenceDoc {
41
+ /** Path relative to the skill directory. */
42
+ file: string;
43
+ /** Column 2 of the entry file's table: when to open this. */
44
+ when: string;
45
+ body(): string;
46
+ }
47
+ /**
48
+ * The reference set, in the order they appear in the entry file's table.
49
+ * Ordered by how often a deploy turns into each follow-up: shipping a change is
50
+ * near-universal, Markdown publishing is the most-missed capability, comments
51
+ * are deliberate, troubleshooting is on failure.
52
+ */
53
+ export declare const REFERENCES: ReferenceDoc[];
54
+ /** The entry `SKILL.md`: required frontmatter plus the always-loaded body. */
55
+ export declare function skillEntryFile(): string;
56
+ /**
57
+ * The complete skill directory: entry file plus every reference doc, keyed by
58
+ * path relative to the skill directory. This is the whole payload, and it is
59
+ * identical for every target — SKILL.md is a shared standard now.
60
+ */
61
+ export declare function skillFiles(): Record<string, string>;
62
+ export interface Target {
63
+ id: string;
64
+ /** Human label shown in the picker and reports. */
65
+ label: string;
66
+ /** One-line "what this is" for the picker. */
67
+ detail: string;
68
+ /** The skill directory within the project root. */
69
+ projectDir(root: string): string;
70
+ /** The skill directory under the user's home, for `--global`. */
71
+ globalDir(env: NodeJS.ProcessEnv): string;
72
+ }
73
+ /**
74
+ * Both targets get the same files. They are separate entries only because they
75
+ * are separate directories on disk: Claude Code reads `.claude/skills/`, and
76
+ * everything else has converged on `.agents/skills/`. If Claude Code ever scans
77
+ * `.agents/skills/` too, this collapses to one.
78
+ */
79
+ export declare const TARGETS: Target[];
80
+ export declare function targetById(id: string): Target | undefined;
81
+ /**
82
+ * Legacy flypod instruction files still present in this project. A dedicated
83
+ * file counts on existence; a shared file counts only when it still carries the
84
+ * flypod block marker, so an AGENTS.md that merely mentions flypod is ignored.
85
+ */
86
+ export declare function legacyArtifacts(root: string): Promise<string[]>;
87
+ /**
88
+ * Is this project one where `flypod install skill` has been run? Answered from
89
+ * the only evidence that exists on the user's machine: the skill files the
90
+ * command itself writes.
91
+ *
92
+ * Used for deploy attribution (see ../deploy-source.ts). Deliberately
93
+ * project-scoped: `--global` installs are machine-wide and would label a
94
+ * human's own deploys as agent deploys forever, so they're left to the
95
+ * explicit `FLYPOD_SOURCE` override instead.
96
+ */
97
+ export declare function skillInstalledIn(root: string): Promise<boolean>;
98
+ export type WriteStatus = "created" | "updated" | "unchanged";
99
+ export interface WriteResult {
100
+ target: Target;
101
+ /** Absolute path of the file written. */
102
+ path: string;
103
+ status: WriteStatus;
104
+ }
105
+ export interface PlanEntry {
106
+ target: Target;
107
+ /** The skill directory this target would write. */
108
+ dir: string;
109
+ }
110
+ /**
111
+ * Resolve where each target writes. Both targets are always offered: the cost
112
+ * of an unused skill directory is a few KB, and the cost of guessing wrong is
113
+ * an agent that never learns flypod exists.
114
+ */
115
+ export declare function buildPlan(root: string, env: NodeJS.ProcessEnv, global: boolean): Promise<PlanEntry[]>;
116
+ export interface InstallSkillArgs {
117
+ /** Explicit target ids from flags (e.g. --claude --agents). Empty = all. */
118
+ targets?: string[];
119
+ /** Write every target without prompting, even in a TTY. */
120
+ all?: boolean;
121
+ /** Write to home-dir locations instead of the project. */
122
+ global?: boolean;
123
+ /** Just print where things would go; write nothing. */
124
+ list?: boolean;
125
+ /** Show the planned files (and exit) without writing. */
126
+ dryRun?: boolean;
127
+ /** Project root. Defaults to cwd; tests inject. */
128
+ cwd?: string;
129
+ /**
130
+ * A picker for interactive use. Given the plan, returns the chosen target
131
+ * ids, or null if the user cancelled. Omitted in non-interactive contexts.
132
+ */
133
+ picker?: (plan: PlanEntry[]) => Promise<string[] | null>;
134
+ }
135
+ export declare function installSkill(args: InstallSkillArgs, io: CommandIO): Promise<number>;
@@ -0,0 +1,7 @@
1
+ import { type DeploySource } from "../deploy-source";
2
+ /**
3
+ * Resolve the source for a CLI-originated request. Falls back to `cli`, which
4
+ * is the truth for a plain terminal invocation. Never throws: an unreadable
5
+ * project must not be able to fail a deploy.
6
+ */
7
+ export declare function resolveCliSource(env: NodeJS.ProcessEnv, cwd: string): Promise<DeploySource>;
package/dist/src/cli.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { DeploySource } from "./deploy-source";
1
2
  /**
2
3
  * Build-output folders the common frontend frameworks emit, in priority order.
3
4
  * `public` ranks low because some tools use it for *source* assets (Vite/CRA);
@@ -30,6 +31,17 @@ export interface DeployResult {
30
31
  manage_token: string;
31
32
  /** Set when the deploy was authenticated via Bearer apiKey or cookie session. */
32
33
  owner_account_id?: string;
34
+ /** Problems the deploy pipeline fixed on the caller's behalf, e.g. `spa-fallback`. */
35
+ healed?: string[];
36
+ /**
37
+ * Problems it could *not* fix, each with a `fix_recipe` naming the change to
38
+ * make. A deploy can succeed and still be broken for visitors, so this is the
39
+ * only signal an agent has that the URL it is about to hand over is wrong.
40
+ */
41
+ warnings?: Array<{
42
+ code: string;
43
+ fix_recipe: string;
44
+ }>;
33
45
  next_actions: unknown[];
34
46
  }
35
47
  export interface DeployOptions {
@@ -40,6 +52,12 @@ export interface DeployOptions {
40
52
  handle?: (request: Request) => Promise<Response>;
41
53
  /** When set, sent as `Authorization: Bearer <apiKey>` so the deploy is attributed. */
42
54
  apiKey?: string;
55
+ /**
56
+ * Surface reported to the server as `x-flypod-source`. Defaults to
57
+ * `library`, which is the truth for a direct call to this function; the
58
+ * `flypod` binary passes its own resolved source (`cli` or `skill`).
59
+ */
60
+ source?: DeploySource;
43
61
  }
44
62
  /**
45
63
  * Zip a files map and POST it to the deploy API; returns the parsed result.
package/dist/src/cli.js CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  collectDist,
4
4
  deploySite,
5
5
  resolveDeployDir
6
- } from "../cli-j9rxpfdv.js";
6
+ } from "../cli-db9gcrd0.js";
7
7
  export {
8
- resolveDeployDir,
9
- deploySite,
8
+ BUILD_DIR_CANDIDATES,
10
9
  collectDist,
11
- BUILD_DIR_CANDIDATES
10
+ deploySite,
11
+ resolveDeployDir
12
12
  };
@@ -0,0 +1,28 @@
1
+ /** Request header carrying the deploy surface. */
2
+ export declare const SOURCE_HEADER = "x-flypod-source";
3
+ /**
4
+ * Request header carrying the caller's PostHog device id. Only our own
5
+ * first-party landing page sends it (same-origin `POST /sites`), and it is the
6
+ * one thing that lets a browser deploy be joined to the pageview that caused
7
+ * it. It is a device id we minted, not PII — no IP, no user agent.
8
+ */
9
+ export declare const ANON_ID_HEADER = "x-flypod-anon-id";
10
+ /**
11
+ * `ci` is ours, and it exists so the growth report can subtract us from our own
12
+ * numbers. Set `FLYPOD_SOURCE=ci` in anything that deploys on our behalf — a
13
+ * workflow, a load test, a demo recording — and the weekly report excludes it
14
+ * from the north star and from C1/C3/C5 instead of counting us as builders.
15
+ * Without this value in the allowlist the header coerces to `unknown` and stays
16
+ * in the denominator, which is the silent version of the same mistake.
17
+ */
18
+ export declare const DEPLOY_SOURCES: readonly ["cli", "browser", "library", "skill", "ci", "unknown"];
19
+ export type DeploySource = (typeof DEPLOY_SOURCES)[number];
20
+ /** Validate a client-supplied source header; anything unrecognized is `unknown`. */
21
+ export declare function coerceSource(value: string | null | undefined): DeploySource;
22
+ /**
23
+ * Validate a client-supplied anon id. PostHog device ids are UUID-shaped, so a
24
+ * conservative charset + length cap is enough to keep anything else (a stray
25
+ * cookie, an injected string) out of the property. Returns undefined when the
26
+ * header is absent or implausible, so the caller can simply omit the property.
27
+ */
28
+ export declare function coerceAnonId(value: string | null | undefined): string | undefined;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "flypod",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Zero-auth deploy primitive. Turns any folder into a live URL in one command. For AI agents and humans.",
5
5
  "module": "./dist/src/cli.js",
6
6
  "types": "./dist/src/cli.d.ts",
7
7
  "type": "module",
8
- "license": "MIT",
8
+ "license": "SEE LICENSE IN LICENSE",
9
9
  "exports": {
10
10
  ".": {
11
11
  "types": "./dist/src/cli.d.ts",
@@ -22,11 +22,7 @@
22
22
  "README.md",
23
23
  "LICENSE"
24
24
  ],
25
- "repository": {
26
- "type": "git",
27
- "url": "git+https://github.com/sdserranog/flypod.git",
28
- "directory": "packages/flypod"
29
- },
25
+ "homepage": "https://flypod.dev",
30
26
  "keywords": [
31
27
  "deploy",
32
28
  "agent",
@@ -54,13 +50,13 @@
54
50
  "devDependencies": {
55
51
  "@flypod/comments": "workspace:*",
56
52
  "@libsql/client": "^0.17.3",
57
- "@types/bun": "latest",
53
+ "@types/bun": "^1.4.1",
58
54
  "better-auth": "1.6.14",
59
55
  "drizzle-orm": "^0.45.2",
60
- "hono": "^4.12.25",
56
+ "hono": "^4.12.34",
61
57
  "marked": "^18.0.5",
62
58
  "playwright": "^1.60.0",
63
59
  "typescript": "^6.0.3",
64
- "wrangler": "^4.0.0"
60
+ "wrangler": "^4.36.0"
65
61
  }
66
62
  }