popost 4.6.8 → 4.6.10

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.
@@ -0,0 +1,2 @@
1
+ import type { Runtime } from '../runtime';
2
+ export declare const linkPlatforms: (rt: Runtime, config?: string) => Promise<number>;
@@ -3,6 +3,8 @@ import type { Project } from '../core/project';
3
3
  import type { Runtime } from '../runtime';
4
4
  /** The editor build's version (`packages/canvas-editor/src/version.ts`); a service of another version is not reused. */
5
5
  export declare const EDITOR_VERSION = "4.1.3";
6
+ /** Written by `serve` itself (so a service the host started is found) and again by `present` with the pid it spawned. */
7
+ export declare const recordService: (rt: Runtime, root: string, url: string, pid?: number) => Promise<void>;
6
8
  export declare const editorInfo: (project: Project) => {
7
9
  schema: string;
8
10
  version: string;
@@ -1,24 +1,49 @@
1
1
  /**
2
- * The coding agents `popost install` knows, and where each reads user-level skills. A path is listed only when an
3
- * official document or a real install on a developer machine confirms it; for any other agent use `--dir`.
2
+ * The coding agents `popost install` knows, and where each reads user-level skills. A path is listed only when the
3
+ * vendor's own document or source confirms it, or a real install on a user's machine does; for any other agent use
4
+ * `--dir`. Checked 2026-12-02.
4
5
  *
5
- * - Claude Code: `~/.claude/skills/<name>/SKILL.md`. https://code.claude.com/docs/en/skills ("Personal: ~/.claude/skills").
6
- * - Codex: `$HOME/.agents/skills` (USER scope). https://developers.openai.com/codex/skills (now served at
7
- * learn.chatgpt.com/docs/build-skills): "REPO: $CWD/.agents/skills … USER: $HOME/.agents/skills"; vercel-labs/skills
8
- * docs/agents.md lists the same global path for Codex. Codex keeps its own home in `$CODEX_HOME` (default `~/.codex`),
9
- * which only tells us Codex is installed; `~/.codex/skills` holds Codex's bundled `.system` skills, not the user's.
6
+ * Most agents read the shared directory of the Agent Skills convention, `~/.agents/skills`, so one copy there serves
7
+ * all of them; an agent gets a directory of its own only when it does not read the shared one.
10
8
  *
11
- * Not covered, no authoritative path found (2026-11-14): WorkBuddy (official docs say only "the user config directory";
12
- * `~/.workbuddy/skills` appears in community articles only) and Doubao (no documented skills directory).
9
+ * Shared `~/.agents/skills`:
10
+ * - Codex: developers.openai.com/codex/skills ("USER: $HOME/.agents/skills"); its home `$CODEX_HOME` (default
11
+ * `~/.codex`) only tells us Codex is installed, `~/.codex/skills` holds Codex's bundled `.system` skills.
12
+ * - Gemini CLI: geminicli.com/docs/cli/skills; `GEMINI_CLI_HOME` moves the base of `~/.gemini` and `~/.agents`.
13
+ * - OpenCode: opencode.ai/docs/skills. Cursor: cursor.com/docs/context/skills. Grok: docs.grok.com/build (skills).
14
+ * - Kimi Code: MoonshotAI/kimi-code docs/en/customization/skills.md. Qwen Code: qwen-code-docs features/skills.
15
+ * - Mistral Vibe: mistralai/mistral-vibe `vibe/core/config/harness_files/_paths.py`. Kilo Code: kilo.ai/docs/customize/skills.
16
+ * - Copilot CLI: docs.github.com about-agent-skills; with `COPILOT_HOME` set it reads `$COPILOT_HOME/skills` instead.
17
+ * - Pi: earendil-works/pi docs/skills.md. Devin: docs.devin.ai/cli/extensibility/skills/overview.
18
+ * - DeepSeek Harness: deepseek-ai/deepseek-harness packages/skill/skill-filesystem (`$DSH_AGENTS_HOME/skills`).
19
+ * - Reasonix: esengine/DeepSeek-Reasonix docs/SKILLS.md.
20
+ *
21
+ * A directory of their own:
22
+ * - Claude Code: `~/.claude/skills`, code.claude.com/docs/en/skills ("Personal: ~/.claude/skills").
23
+ * - WorkBuddy: `~/.workbuddy/skills`: a user's install there was found and used by WorkBuddy 5.11 (2026-12-02), and
24
+ * Tencent/teamai-cli `src/known-agents.ts` lists the same directory.
25
+ * - Antigravity: `~/.gemini/config/skills`, antigravity.google/docs/skills.
26
+ * - Hermes: `$HERMES_HOME/skills`, hermes-agent.nousresearch.com/docs/user-guide/features/skills.
27
+ * - Trae: `~/.trae/skills` (the China edition `~/.trae-cn/skills`), docs.trae.ai/ide/skills.
28
+ * - Qoder: `~/.qoder/skills`, docs.qoder.com/cli/Skills. Kiro: `~/.kiro/skills`, kiro.dev/docs/skills.
29
+ *
30
+ * Not covered: Aider (does not load skills), Doubao and the DeepSeek app (skills are added inside the app), Trae CLI
31
+ * (no documented directory). The Windows-only locations of Hermes, Devin and Reasonix are not detected.
13
32
  */
14
33
  import type { Runtime } from '../runtime';
15
34
  export interface AgentTarget {
16
35
  readonly id: string;
17
36
  readonly label: string;
18
- /** The agent's own home: its presence means the agent is installed. */
19
- readonly home: (rt: Runtime, homeDir: string) => string;
37
+ /** The agent's own directories: one of them existing means the agent is installed. */
38
+ readonly homes: (rt: Runtime, homeDir: string) => readonly string[];
20
39
  /** The directory whose sub-directories are skills. */
21
40
  readonly skillsDir: (rt: Runtime, homeDir: string) => string;
41
+ /** Variables the agent sets in the shells it runs: one of them set means the command runs inside it. */
42
+ readonly env?: readonly string[];
22
43
  }
44
+ /** `~/.agents/skills`, the directory most agents share. */
45
+ export declare const sharedSkillsDir: (rt: Runtime, home: string) => string;
23
46
  export declare const AGENTS: readonly AgentTarget[];
24
47
  export declare const AGENT_IDS: readonly string[];
48
+ /** The name an agent id is shown by (a connection label, a message); an unknown id is shown as it is. */
49
+ export declare const agentLabel: (id: string) => string;
@@ -33,6 +33,8 @@ export interface RequestOptions {
33
33
  timeoutSec?: number;
34
34
  ambiguous?: boolean;
35
35
  hint?: string;
36
+ /** A public endpoint: sent without a credential, so it works before an account is connected. */
37
+ anonymous?: boolean;
36
38
  }
37
39
  /** The popost.ai OpenAPI client. Construction does not touch the network or read the key. */
38
40
  export declare class PopostClient {
@@ -1,6 +1,7 @@
1
1
  import type { Runtime } from '../runtime';
2
2
  import { type JsonRecord } from './base';
3
3
  import { PopostApiError } from './errors';
4
+ import type { SavedVideo } from './link-video';
4
5
  export interface RemoteImage {
5
6
  readonly url: string;
6
7
  readonly mimeType?: string;
@@ -10,6 +11,8 @@ export interface RemoteImage {
10
11
  }
11
12
  export interface PostPlan {
12
13
  readonly platform: string;
14
+ /** `video`: the pictures are the cover only, the file is fetched separately (link-video.ts); null when the server did not say */
15
+ readonly kind: 'images' | 'video' | null;
13
16
  readonly sourceUrl: string;
14
17
  readonly title: string;
15
18
  readonly text: string;
@@ -49,5 +52,8 @@ export interface Downloaded {
49
52
  * ones before it. `retry` is what the user is told to do about a failure.
50
53
  */
51
54
  export declare const downloadPictures: (rt: Runtime, images: readonly RemoteImage[], outDir: string, retry: string) => Promise<Downloaded>;
52
- /** The PostBundle for a downloaded post; its resources are the files in `saved`, as paths relative to the bundle file. */
53
- export declare const buildBundle: (rt: Runtime, plan: PostPlan, saved: readonly SavedImage[]) => JsonRecord;
55
+ /**
56
+ * The PostBundle for a downloaded post; its resources are the files in `saved` and the post's `video`, as paths relative
57
+ * to the bundle file. Pages (`pageOrder`) are the pictures only: a video post's one picture is its cover.
58
+ */
59
+ export declare const buildBundle: (rt: Runtime, plan: PostPlan, saved: readonly SavedImage[], video?: SavedVideo) => JsonRecord;
@@ -0,0 +1,27 @@
1
+ import type { Runtime } from '../runtime';
2
+ import { type PopostClient } from './api';
3
+ /** The server keeps source videos up to this size. */
4
+ export declare const MAX_VIDEO_BYTES: number;
5
+ export interface SavedVideo {
6
+ readonly file: string;
7
+ readonly path: string;
8
+ readonly mimeType: string;
9
+ readonly sha256: string;
10
+ readonly bytes: number;
11
+ }
12
+ export type VideoOutcome = {
13
+ readonly saved: SavedVideo;
14
+ } | {
15
+ readonly missing: {
16
+ readonly code: string;
17
+ readonly error: string;
18
+ };
19
+ }
20
+ /** the caller may not fetch videos (the web Agent): nothing to report */
21
+ | {
22
+ readonly skipped: true;
23
+ };
24
+ /** MP4 / QuickTime / WebM from the first bytes; `claimed` only decides between MP4 and QuickTime without an `ftyp` box. */
25
+ export declare const sniffVideoMime: (head: Uint8Array, claimed: string) => string | null;
26
+ /** Downloads the video of a parsed video post into `outDir`. `retry` is what the user is told to do about a failed download. */
27
+ export declare const downloadVideo: (rt: Runtime, client: PopostClient, inspirationId: string, outDir: string, retry: string) => Promise<VideoOutcome>;
@@ -5,6 +5,8 @@ export interface LinkOptions {
5
5
  readonly out?: string;
6
6
  readonly timeoutSec: number;
7
7
  readonly noDownload: boolean;
8
+ /** keep a video post to its cover and text: do not fetch the original video */
9
+ readonly noVideo?: boolean;
8
10
  readonly libraryOnly?: boolean;
9
11
  readonly config?: string;
10
12
  }
@@ -4,3 +4,14 @@ import { PopostClient } from './api';
4
4
  import { type JsonRecord } from './base';
5
5
  export declare const pricingClient: (rt: Runtime, config?: string) => Promise<PopostClient>;
6
6
  export declare const queryLinkPrice: (client: PopostClient) => Promise<JsonRecord>;
7
+ export interface LinkPlatform {
8
+ readonly id: string;
9
+ readonly name: string;
10
+ /** false: a video post gives its cover and text only, not the video file */
11
+ readonly video: boolean;
12
+ }
13
+ /**
14
+ * The platforms whose links popost.ai parses now, from popost.ai itself: platforms are added and taken off there, so a
15
+ * list kept in the Skill goes out of date. Public: works before an account is connected and never charges.
16
+ */
17
+ export declare const queryLinkPlatforms: (client: PopostClient) => Promise<readonly LinkPlatform[]>;
@@ -1,2 +1,2 @@
1
1
  /** The CLI version; equals `metadata.version` in SKILL.md and is sent to popost.ai as `x-popost-client-version`. */
2
- export declare const VERSION = "4.6.8";
2
+ export declare const VERSION = "4.6.10";
@@ -1,6 +1,7 @@
1
1
  import type { Resolved } from '../../types';
2
2
  /** Native decoding belongs to the interactive preview; export still uses deterministic extracted frames. */
3
- export declare const nativeFootage: (doc: Document, r: Resolved) => {
3
+ /** onFailed(file): a native-only source (no frame pictures to fall back on) could not be loaded or decoded. */
4
+ export declare const nativeFootage: (doc: Document, r: Resolved, onFailed?: (file: string) => void) => {
4
5
  sync: (frame: number, playing: boolean, speed: number) => void;
5
6
  needsPictures: () => boolean;
6
7
  dispose: () => void;
@@ -13,7 +13,7 @@ declare const EN: {
13
13
  readonly seekNote: "A browser video seek is near, not frame-exact.";
14
14
  readonly noReference: "No reference video. Start with --reference <video> to show one here.";
15
15
  readonly errorsOnStage: "The project has errors; the stage lists them.";
16
- readonly imageFailed: "A picture failed to load";
16
+ readonly imageFailed: "A picture or video failed to load";
17
17
  readonly first: "First frame (Home)";
18
18
  readonly last: "Last frame (End)";
19
19
  readonly back10: "Back 10 frames (Shift+Left)";