@remixmate/cli 0.9.71 → 0.9.73
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.
- package/LICENSE +45 -21
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/argv.js +1 -51
- package/dist/auth/auth-lock.js +1 -100
- package/dist/auth/auto-login.js +7 -75
- package/dist/auth/commands.js +40 -290
- package/dist/auth/credential-store.js +1 -143
- package/dist/auth/device-flow-runner.js +13 -110
- package/dist/auth/device-flow.js +1 -132
- package/dist/auth/ensure.js +1 -62
- package/dist/auth/environment.js +1 -69
- package/dist/auth/pending-store.js +1 -45
- package/dist/auth/resolve.js +1 -44
- package/dist/billing.js +3 -76
- package/dist/capabilities.js +1 -75
- package/dist/cli.js +39 -211
- package/dist/diagnostics.js +2 -70
- package/dist/doctor.js +9 -188
- package/dist/errors.js +1 -33
- package/dist/exec.js +4 -47
- package/dist/handlers/gen-digital-human.js +33 -264
- package/dist/handlers/gen-image.js +9 -113
- package/dist/handlers/gen-post.js +15 -188
- package/dist/handlers/gen-video.js +7 -185
- package/dist/handlers/gen-voice.js +19 -133
- package/dist/handlers/index.js +1 -20
- package/dist/handlers/shared.js +1 -66
- package/dist/handlers/template-init.js +1 -21
- package/dist/http.js +3 -155
- package/dist/index.js +1 -8
- package/dist/install.js +40 -448
- package/dist/manifest.json +53 -13
- package/dist/progress.js +2 -15
- package/dist/project/commands.js +34 -156
- package/dist/project/host.js +1 -151
- package/dist/project/resolve.js +1 -65
- package/dist/project/store.js +2 -97
- package/dist/project/take.js +1 -106
- package/dist/project/trace.js +5 -278
- package/dist/registry.js +3 -70
- package/dist/runner.js +7 -225
- package/dist/skill-schema.js +1 -194
- package/dist/template/args.js +1 -69
- package/dist/template/check.js +2 -30
- package/dist/template/commands.js +34 -163
- package/dist/template/constants.js +1 -46
- package/dist/template/init.js +5 -133
- package/dist/template/list.js +1 -46
- package/dist/template/preview.js +7 -318
- package/dist/template/proc.js +1 -43
- package/dist/template/project.js +6 -161
- package/dist/template/publish.js +5 -185
- package/dist/template/render-client.js +2 -79
- package/dist/template/upgrade.js +4 -123
- package/dist/text.js +1 -15
- package/package.json +2 -35
- package/skills/doc-parse/scripts/extract_via_render.py +32 -32
- package/skills/export-jianying/scripts/gen_jianying_draft.py +188 -188
- package/skills/gen-post/SKILL.md +23 -13
- package/skills/gen-post/skill.json +9 -10
- package/skills/gen-script/SKILL.md +23 -1
- package/skills/gen-script/scripts/gen_script.py +644 -551
- package/skills/gen-script/skill.json +12 -0
- package/skills/gen-script/version.json +1 -1
- package/skills/prepare-video-assets/scripts/prepare_video_assets.py +21 -21
- package/skills/render-video/scripts/_chrome_vendor.py +17 -17
- package/skills/render-video/scripts/_digital_human_segments.py +34 -34
- package/skills/render-video/scripts/_video_probe.py +33 -33
- package/skills/render-video/scripts/_vod_polling.py +13 -13
- package/skills/render-video/scripts/remote_renderer_client.py +42 -42
- package/skills/render-video/scripts/render_video.py +639 -639
- package/skills/render-video/scripts/required_props.py +37 -37
- package/skills/render-video/scripts/upload_video.py +35 -35
- package/skills/render-video/version.json +1 -1
- package/skills/template-registry/SKILL.md +16 -0
- package/skills/template-registry/scripts/countdown_spec.py +92 -92
- package/skills/template-registry/scripts/doc_extract.py +40 -40
- package/skills/template-registry/scripts/list_templates.py +303 -191
- package/skills/template-registry/scripts/log_diagnostics.py +1 -1
- package/skills/template-registry/scripts/match_template.py +87 -87
- package/skills/template-registry/scripts/payload_hydrator.py +89 -89
- package/skills/template-registry/scripts/registry_loader.py +159 -159
- package/skills/template-registry/scripts/render_job_client.py +75 -75
- package/skills/template-registry/scripts/showcase_loader.py +44 -44
- package/skills/template-registry/skill.json +4 -1
- package/skills/template-registry/version.json +1 -1
- package/skills/template-registry/video_dsl/runtime/__init__.py +8 -8
- package/skills/template-registry/video_dsl/runtime/dsl_validator.py +329 -329
- package/skills/template-registry/video_dsl/runtime/narration_budget.py +36 -36
- package/skills/template-registry/video_dsl/runtime/payload_contract.py +7 -7
- package/skills/template-registry/video_dsl/runtime/prompt_enhancer.py +98 -98
- package/skills/template-registry/video_dsl/runtime/timeline_compiler.py +127 -127
- package/skills/template-registry/video_dsl/schema/video-dsl-v1alpha1.json +14 -1
- package/skills/video-parser/scripts/analyze_video.py +173 -173
- package/skills/video-parser/scripts/deconstruct_video.py +91 -91
- package/skills/video-parser/scripts/parse_via_render.py +21 -21
- package/skills/web-screenshot/scripts/_media_screenshot/__init__.py +4 -4
- package/skills/web-screenshot/scripts/_media_screenshot/bootstrap.py +7 -7
- package/skills/web-screenshot/scripts/_media_screenshot/browser.py +4 -4
- package/skills/web-screenshot/scripts/_media_screenshot/cli_args.py +4 -4
- package/skills/web-screenshot/scripts/_media_screenshot/js_loader.py +2 -2
- package/skills/web-screenshot/scripts/_media_screenshot/overlay.py +1 -1
- package/skills/web-screenshot/scripts/_media_screenshot/reader.py +40 -40
- package/skills/web-screenshot/scripts/_media_screenshot/recording.py +11 -11
- package/skills/web-screenshot/scripts/_media_screenshot/scenes/__init__.py +8 -8
- package/skills/web-screenshot/scripts/_media_screenshot/scenes/arrow.py +2 -2
- package/skills/web-screenshot/scripts/_media_screenshot/scenes/caption.py +1 -1
- package/skills/web-screenshot/scripts/_media_screenshot/scenes/click.py +1 -1
- package/skills/web-screenshot/scripts/_media_screenshot/scenes/code_lines.py +5 -5
- package/skills/web-screenshot/scripts/_media_screenshot/scenes/focus.py +1 -1
- package/skills/web-screenshot/scripts/_media_screenshot/scenes/highlight.py +3 -3
- package/skills/web-screenshot/scripts/_media_screenshot/scenes/hover.py +1 -1
- package/skills/web-screenshot/scripts/_media_screenshot/scenes/redact.py +1 -1
- package/skills/web-screenshot/scripts/_media_screenshot/scenes/scroll.py +1 -1
- package/skills/web-screenshot/scripts/_media_screenshot/scenes/sequence.py +1 -1
- package/skills/web-screenshot/scripts/_media_screenshot/scenes/title_card.py +1 -1
- package/skills/web-screenshot/scripts/_media_screenshot/scenes/type.py +1 -1
- package/skills/web-screenshot/scripts/_media_screenshot/scenes/wait.py +1 -1
- package/skills/web-screenshot/scripts/_media_screenshot/scenes/zoom.py +2 -2
- package/skills/web-screenshot/scripts/_media_screenshot/screenshot.py +15 -15
- package/skills/web-screenshot/scripts/_media_screenshot/storyboard.py +2 -2
- package/skills/web-screenshot/scripts/_media_screenshot/template.py +11 -11
- package/skills/web-screenshot/scripts/_media_screenshot/trim.py +10 -10
- package/skills/web-screenshot/scripts/_media_screenshot/urlguard.py +22 -22
- package/skills/web-screenshot/scripts/_media_upload.py +33 -33
- package/skills/web-screenshot/scripts/read_page.py +15 -15
- package/skills/web-screenshot/scripts/record.py +26 -26
- package/skills/web-screenshot/scripts/screenshot.py +5 -5
- package/dist/argv.d.ts +0 -15
- package/dist/auth/auth-lock.d.ts +0 -26
- package/dist/auth/auto-login.d.ts +0 -20
- package/dist/auth/commands.d.ts +0 -8
- package/dist/auth/credential-store.d.ts +0 -60
- package/dist/auth/device-flow-runner.d.ts +0 -58
- package/dist/auth/device-flow.d.ts +0 -52
- package/dist/auth/ensure.d.ts +0 -55
- package/dist/auth/environment.d.ts +0 -38
- package/dist/auth/pending-store.d.ts +0 -33
- package/dist/auth/resolve.d.ts +0 -30
- package/dist/billing.d.ts +0 -44
- package/dist/capabilities.d.ts +0 -63
- package/dist/cli.d.ts +0 -13
- package/dist/diagnostics.d.ts +0 -24
- package/dist/doctor.d.ts +0 -22
- package/dist/errors.d.ts +0 -29
- package/dist/exec.d.ts +0 -18
- package/dist/handlers/gen-digital-human.d.ts +0 -17
- package/dist/handlers/gen-image.d.ts +0 -20
- package/dist/handlers/gen-post.d.ts +0 -21
- package/dist/handlers/gen-video.d.ts +0 -19
- package/dist/handlers/gen-voice.d.ts +0 -26
- package/dist/handlers/index.d.ts +0 -20
- package/dist/handlers/shared.d.ts +0 -26
- package/dist/handlers/template-init.d.ts +0 -10
- package/dist/http.d.ts +0 -72
- package/dist/index.d.ts +0 -9
- package/dist/install.d.ts +0 -71
- package/dist/progress.d.ts +0 -23
- package/dist/project/commands.d.ts +0 -19
- package/dist/project/host.d.ts +0 -91
- package/dist/project/resolve.d.ts +0 -43
- package/dist/project/store.d.ts +0 -31
- package/dist/project/take.d.ts +0 -50
- package/dist/project/trace.d.ts +0 -98
- package/dist/registry.d.ts +0 -30
- package/dist/runner.d.ts +0 -39
- package/dist/skill-schema.d.ts +0 -138
- package/dist/template/args.d.ts +0 -25
- package/dist/template/check.d.ts +0 -23
- package/dist/template/commands.d.ts +0 -25
- package/dist/template/constants.d.ts +0 -39
- package/dist/template/init.d.ts +0 -28
- package/dist/template/list.d.ts +0 -23
- package/dist/template/preview.d.ts +0 -60
- package/dist/template/proc.d.ts +0 -26
- package/dist/template/project.d.ts +0 -47
- package/dist/template/publish.d.ts +0 -43
- package/dist/template/render-client.d.ts +0 -39
- package/dist/template/upgrade.d.ts +0 -44
- package/dist/text.d.ts +0 -8
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Contract constants for `remixmate template` (design §11 K1 / K5 / K6).
|
|
3
|
-
*
|
|
4
|
-
* STARTER_VERSION pins the exact starter release this cli was tested against.
|
|
5
|
-
* Bumping it is a deliberate cli release, never a range — `init` must produce
|
|
6
|
-
* the same project on every machine for a given cli version.
|
|
7
|
-
*/
|
|
8
|
-
export declare const STARTER_PACKAGE = "@remixmate/template-starter";
|
|
9
|
-
/**
|
|
10
|
-
* 一个 starter 版本 = 一套本地校验规则版本(.remixmate/)。规则更新的发布顺序:
|
|
11
|
-
* template-library `pnpm publish:sdk --publish` 发新 starter → 改这里 → cli 发版。
|
|
12
|
-
* publish:sdk 会比对这个常量,对不上就拒发。
|
|
13
|
-
*/
|
|
14
|
-
export declare const STARTER_VERSION = "0.2.0";
|
|
15
|
-
/**
|
|
16
|
-
* 工程里记录规则版本的文件(starter ≥0.2.0 构建时写入;`template upgrade` 也会写)。
|
|
17
|
-
* 0.1.0 工程没有它,回落读 package.json 的 version(init 时整份复制自 starter)。
|
|
18
|
-
*/
|
|
19
|
-
export declare const RULES_VERSION_FILE = ".remixmate/version.json";
|
|
20
|
-
/** `template upgrade` 只替换这个目录;用户的 templates/、src/ 等一律不动。 */
|
|
21
|
-
export declare const RULES_DIR = ".remixmate";
|
|
22
|
-
/** `template upgrade --with-docs` 额外刷新的 agent 指南(旧文件备份为 *.orig)。 */
|
|
23
|
-
export declare const DOC_FILES: readonly string[];
|
|
24
|
-
/** Local tarball override (testing a starter before it is published). */
|
|
25
|
-
export declare const STARTER_TARBALL_ENV = "REMIXMATE_STARTER_TARBALL";
|
|
26
|
-
/** Marker file that identifies a starter project root (K3). */
|
|
27
|
-
export declare const CHECK_ENTRY = ".remixmate/check/index.mjs";
|
|
28
|
-
/** Per-template identity file written by publish (K4). */
|
|
29
|
-
export declare const IDENTITY_FILE = ".remixmate.json";
|
|
30
|
-
export declare const DEFAULT_RENDER_BASE_URL = "https://api-render.remixmate.ai";
|
|
31
|
-
/** Draft preview limits enforced by ab-render /renderDraft (K5). */
|
|
32
|
-
export declare const PREVIEW_MAX_LONG_EDGE = 1280;
|
|
33
|
-
export declare const PREVIEW_MAX_SHORT_EDGE = 720;
|
|
34
|
-
export declare const PREVIEW_MAX_SECONDS = 60;
|
|
35
|
-
/**
|
|
36
|
-
* Same list as template-library `publish-private.mjs` TAR_EXCLUDES. `dsl-example.json`
|
|
37
|
-
* is deliberately kept: it is the reference DSL the registry ships with the template.
|
|
38
|
-
*/
|
|
39
|
-
export declare const TAR_EXCLUDES: readonly string[];
|
package/dist/template/init.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `remixmate template init <dir> [--force]` — scaffold a starter project.
|
|
3
|
-
*
|
|
4
|
-
* Only Node + npm are required (requirement 3.1): the starter is fetched with
|
|
5
|
-
* `npm pack` (works with whatever registry/proxy npm is configured for), unpacked
|
|
6
|
-
* with the system `tar` (bsdtar ships with Windows 10+), then `npm install`ed.
|
|
7
|
-
* No login is needed (requirement 3.5).
|
|
8
|
-
*/
|
|
9
|
-
import { Output } from './project.js';
|
|
10
|
-
export interface InitOptions {
|
|
11
|
-
dir: string;
|
|
12
|
-
force?: boolean;
|
|
13
|
-
json?: boolean;
|
|
14
|
-
/** Skip `npm install` (offline tests, or users who want to pick their own installer). */
|
|
15
|
-
skipInstall?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export interface InitResult {
|
|
18
|
-
ok: true;
|
|
19
|
-
dir: string;
|
|
20
|
-
starter: string;
|
|
21
|
-
installed: boolean;
|
|
22
|
-
}
|
|
23
|
-
/** Obtain the starter tarball: local override, else `npm pack` into `tmp`. Shared with `upgrade`. */
|
|
24
|
-
export declare function obtainStarterTarball(tmp: string, out: Output): Promise<{
|
|
25
|
-
file: string;
|
|
26
|
-
label: string;
|
|
27
|
-
}>;
|
|
28
|
-
export declare function runInit(opts: InitOptions): Promise<InitResult>;
|
package/dist/template/list.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `remixmate template list` — the caller's own (non-builtin) templates.
|
|
3
|
-
*
|
|
4
|
-
* Uses ab-api `/remotionTemplate/myPage` (the "mine" view: user_id = caller,
|
|
5
|
-
* is_builtin = 0, not deleted). The builtin filter is re-applied client side
|
|
6
|
-
* so a backend change can never make this list show platform templates.
|
|
7
|
-
*/
|
|
8
|
-
export interface ListOptions {
|
|
9
|
-
json?: boolean;
|
|
10
|
-
token?: string;
|
|
11
|
-
apiBaseUrl?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface PrivateTemplate {
|
|
14
|
-
templateKey: string;
|
|
15
|
-
name: string;
|
|
16
|
-
lifecycleStatus?: string;
|
|
17
|
-
coreVersion?: string;
|
|
18
|
-
updateTime?: string;
|
|
19
|
-
}
|
|
20
|
-
export declare function runList(opts: ListOptions): Promise<{
|
|
21
|
-
ok: true;
|
|
22
|
-
templates: PrivateTemplate[];
|
|
23
|
-
}>;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `remixmate template preview <name>` — render a draft mp4 on the real ab-render.
|
|
3
|
-
*
|
|
4
|
-
* Ported from template-library `scripts/preview-remote.mjs` (same HTTP contract,
|
|
5
|
-
* same file-enumeration and sample-props rules). It deliberately does NOT
|
|
6
|
-
* reimplement the DSL → TemplateBinding pipeline: preview answers "does this
|
|
7
|
-
* code run in the real renderer"; binding correctness is `render-video`'s job.
|
|
8
|
-
*
|
|
9
|
-
* Sample props are contract-driven: they come from the template's own
|
|
10
|
-
* `dsl-example.json` through the `slotMapping[slot].propExtractors` it declares,
|
|
11
|
-
* plus two global conventions (scene.customPayload → props.templateData,
|
|
12
|
-
* dsl.assets → resolvedAssets). Nothing here knows any specific template.
|
|
13
|
-
*/
|
|
14
|
-
export declare const PREVIEW_LIMIT_MESSAGE: string;
|
|
15
|
-
export interface PreviewOptions {
|
|
16
|
-
name: string;
|
|
17
|
-
propsJson?: string;
|
|
18
|
-
durationSec?: number;
|
|
19
|
-
compositionId?: string;
|
|
20
|
-
timeoutSec?: number;
|
|
21
|
-
json?: boolean;
|
|
22
|
-
token?: string;
|
|
23
|
-
apiBaseUrl?: string;
|
|
24
|
-
cwd?: string;
|
|
25
|
-
/** Poll interval override (tests). */
|
|
26
|
-
pollIntervalMs?: number;
|
|
27
|
-
}
|
|
28
|
-
type Json = Record<string, any>;
|
|
29
|
-
export declare function collectFiles(root: string, warn?: (m: string) => void): {
|
|
30
|
-
files: Record<string, string>;
|
|
31
|
-
bytes: number;
|
|
32
|
-
};
|
|
33
|
-
export interface SampleProps {
|
|
34
|
-
props: Json | Json[];
|
|
35
|
-
assets: unknown[];
|
|
36
|
-
durationSec: number | null;
|
|
37
|
-
scene?: Json;
|
|
38
|
-
}
|
|
39
|
-
export declare function buildSampleProps(tplDir: string, tpl: Json, compositionId: string, propsJson: string | undefined, warn?: (m: string) => void): SampleProps;
|
|
40
|
-
/** Narration → subtitle segments (exact from items[].atSec, else proportional by sentence). */
|
|
41
|
-
export declare function buildSubtitleSegments(scene: Json | undefined, totalFrames: number): Json[];
|
|
42
|
-
/** Largest even-pixel frame of the given aspect that fits the draft preview limits. */
|
|
43
|
-
export declare function previewDimensions(aspect: string): [number, number];
|
|
44
|
-
export interface PreviewPlan {
|
|
45
|
-
files: Record<string, string>;
|
|
46
|
-
inputProps: Json;
|
|
47
|
-
compositionId: string;
|
|
48
|
-
totalSeconds: number;
|
|
49
|
-
}
|
|
50
|
-
export declare function buildPreviewPlan(tplDir: string, opts: Pick<PreviewOptions, 'propsJson' | 'durationSec' | 'compositionId'>, warn?: (m: string) => void): PreviewPlan;
|
|
51
|
-
export interface PreviewResult {
|
|
52
|
-
ok: true;
|
|
53
|
-
name: string;
|
|
54
|
-
taskId: string;
|
|
55
|
-
url: string;
|
|
56
|
-
compositionId: string;
|
|
57
|
-
durationSec: number;
|
|
58
|
-
}
|
|
59
|
-
export declare function runPreview(opts: PreviewOptions): Promise<PreviewResult>;
|
|
60
|
-
export {};
|
package/dist/template/proc.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Child-process helpers for `remixmate template`.
|
|
3
|
-
*
|
|
4
|
-
* Every command is spawned with an argv array — never a shell string — so a
|
|
5
|
-
* directory or package spec can't be interpreted by a shell. The one exception
|
|
6
|
-
* is npm on Windows: `npm` is `npm.cmd` there, and since Node's CVE-2024-27980
|
|
7
|
-
* fix a .cmd can only be spawned with `shell: true`. For that path we only ever
|
|
8
|
-
* pass fixed tokens or validated package specs (paths travel via `cwd`), and
|
|
9
|
-
* refuse anything containing shell metacharacters.
|
|
10
|
-
*/
|
|
11
|
-
export interface ProcResult {
|
|
12
|
-
code: number;
|
|
13
|
-
/** Captured stdout — only populated when stdout is piped. */
|
|
14
|
-
stdout: string;
|
|
15
|
-
stderr: string;
|
|
16
|
-
}
|
|
17
|
-
export interface ProcOptions {
|
|
18
|
-
cwd?: string;
|
|
19
|
-
/** 'inherit' streams to the terminal; 'pipe' captures. Default: inherit. */
|
|
20
|
-
stdio?: 'inherit' | 'pipe' | 'stderr';
|
|
21
|
-
env?: NodeJS.ProcessEnv;
|
|
22
|
-
shell?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export declare function runProcess(command: string, args: string[], opts?: ProcOptions): Promise<ProcResult>;
|
|
25
|
-
/** Run npm portably. `args` must be plain tokens; paths go through `cwd`. */
|
|
26
|
-
export declare function runNpm(args: string[], opts?: Omit<ProcOptions, 'shell'>): Promise<ProcResult>;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Starter-project discovery, template identity (K4) and the shared output helper.
|
|
3
|
-
*/
|
|
4
|
-
/** Walk up from `start` to the directory holding `.remixmate/check/index.mjs`. */
|
|
5
|
-
export declare function findProjectRoot(start?: string): string | null;
|
|
6
|
-
export declare function requireProjectRoot(start?: string): string;
|
|
7
|
-
/** A template name is a single directory under templates/ — never a path. */
|
|
8
|
-
export declare function validateTemplateName(name: string | undefined): string;
|
|
9
|
-
export declare function requireTemplateDir(root: string, name: string): string;
|
|
10
|
-
export declare function readJsonFile<T = Record<string, unknown>>(file: string): T;
|
|
11
|
-
export interface TemplateIdentity {
|
|
12
|
-
templateKey: string;
|
|
13
|
-
version: number;
|
|
14
|
-
}
|
|
15
|
-
/** kebab-case slug of a directory name; falls back to `template` when nothing survives. */
|
|
16
|
-
export declare function kebabSlug(input: string): string;
|
|
17
|
-
/** First-publish key: `my-<slug>-<6 hex>`. */
|
|
18
|
-
export declare function generateTemplateKey(dirName: string, hex?: string): string;
|
|
19
|
-
export declare function readIdentity(templateDir: string): TemplateIdentity | null;
|
|
20
|
-
/** Stable key: the identity file wins, so renaming the directory never forks a template. */
|
|
21
|
-
export declare function resolveTemplateKey(templateDir: string): {
|
|
22
|
-
templateKey: string;
|
|
23
|
-
existing: boolean;
|
|
24
|
-
};
|
|
25
|
-
export declare function writeIdentity(templateDir: string, identity: TemplateIdentity): void;
|
|
26
|
-
/** Numeric dotted compare (prerelease tags ignored): <0 / 0 / >0. */
|
|
27
|
-
export declare function compareVersions(a: string, b: string): number;
|
|
28
|
-
/**
|
|
29
|
-
* The starter version whose rules this project's `.remixmate/` holds.
|
|
30
|
-
* `.remixmate/version.json` wins; 0.1.0 projects fall back to package.json
|
|
31
|
-
* (copied verbatim from the starter at init). null = unknown.
|
|
32
|
-
*/
|
|
33
|
-
export declare function readRulesVersion(root: string): string | null;
|
|
34
|
-
/** Hint line when the project's rules are older than what this cli ships with, else null. */
|
|
35
|
-
export declare function staleRulesHint(root: string): string | null;
|
|
36
|
-
/**
|
|
37
|
-
* Human text goes to stdout by default. With --json it moves to stderr so the
|
|
38
|
-
* last stdout line is the JSON result (progress lines still go to stdout —
|
|
39
|
-
* hosts parse them by their `__progress__` marker).
|
|
40
|
-
*/
|
|
41
|
-
export declare class Output {
|
|
42
|
-
readonly json: boolean;
|
|
43
|
-
constructor(json: boolean);
|
|
44
|
-
info(line?: string): void;
|
|
45
|
-
warn(line: string): void;
|
|
46
|
-
result(obj: Record<string, unknown>): void;
|
|
47
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `remixmate template publish <name> [--name <displayName>] [--dry-run]`
|
|
3
|
-
*
|
|
4
|
-
* Ported from template-library `scripts/publish-private.mjs` — same ab-api
|
|
5
|
-
* contract (prepareSave → presignUpload → PUT → save, isBuiltin=false), same
|
|
6
|
-
* tar excludes. Differences, all from the spec:
|
|
7
|
-
* - the key is stable per template directory (K4 `.remixmate.json`), so a
|
|
8
|
-
* re-publish updates instead of forking, and renaming the dir is harmless;
|
|
9
|
-
* - the starter's own `check` runs first (requirement 6.2);
|
|
10
|
-
* - the project files stay read-only except for `.remixmate.json` — server
|
|
11
|
-
* normalization only touches a staging copy.
|
|
12
|
-
*
|
|
13
|
-
* Never printed: the token and the presigned upload URL.
|
|
14
|
-
*/
|
|
15
|
-
import { type CoreSurface } from './render-client.js';
|
|
16
|
-
export interface PublishOptions {
|
|
17
|
-
name: string;
|
|
18
|
-
displayName?: string;
|
|
19
|
-
dryRun?: boolean;
|
|
20
|
-
json?: boolean;
|
|
21
|
-
token?: string;
|
|
22
|
-
apiBaseUrl?: string;
|
|
23
|
-
cwd?: string;
|
|
24
|
-
}
|
|
25
|
-
export interface PublishResult {
|
|
26
|
-
ok: true;
|
|
27
|
-
name: string;
|
|
28
|
-
templateKey: string;
|
|
29
|
-
version: number | null;
|
|
30
|
-
dryRun: boolean;
|
|
31
|
-
created: boolean;
|
|
32
|
-
}
|
|
33
|
-
type Json = Record<string, any>;
|
|
34
|
-
/** tar argv with the shared exclude list — exported for tests. */
|
|
35
|
-
export declare function tarArgs(srcDir: string, outFile: string): string[];
|
|
36
|
-
/**
|
|
37
|
-
* Core preflight: the template's declared coreExports must all exist on the
|
|
38
|
-
* target ab-render (the tar never carries core). Returns a block reason or null.
|
|
39
|
-
* "Couldn't check" is a block, not a pass.
|
|
40
|
-
*/
|
|
41
|
-
export declare function evaluateCoreSurface(manifest: Json, surface: CoreSurface | null, warn?: (m: string) => void): string | null;
|
|
42
|
-
export declare function runPublish(opts: PublishOptions): Promise<PublishResult>;
|
|
43
|
-
export {};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal ab-render client for preview (/renderDraft) and publish preflight (/health).
|
|
3
|
-
*
|
|
4
|
-
* ab-render is a different origin from ab-api but verifies the same PrivToken,
|
|
5
|
-
* so the token is resolved against the ab-api base (where `remixmate login`
|
|
6
|
-
* stored it) and sent to ab-render as X-Priv-Token. All routes are POST.
|
|
7
|
-
*/
|
|
8
|
-
import { SkillError } from '../errors.js';
|
|
9
|
-
export declare function resolveRenderBaseUrl(): string;
|
|
10
|
-
/** Business error from ab-render (`code != 0`), payload kept for issue rendering. */
|
|
11
|
-
export declare class RenderBusinessError extends SkillError {
|
|
12
|
-
readonly code: number;
|
|
13
|
-
readonly payload: {
|
|
14
|
-
code?: number;
|
|
15
|
-
msg?: string;
|
|
16
|
-
data?: unknown;
|
|
17
|
-
};
|
|
18
|
-
constructor(message: string, code: number, payload: {
|
|
19
|
-
code?: number;
|
|
20
|
-
msg?: string;
|
|
21
|
-
data?: unknown;
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
export declare function renderPost<T = Record<string, unknown>>(base: string, route: string, body: unknown, opts: {
|
|
25
|
-
token?: string;
|
|
26
|
-
skillName: string;
|
|
27
|
-
timeoutMs?: number;
|
|
28
|
-
}): Promise<T>;
|
|
29
|
-
export interface CoreSurface {
|
|
30
|
-
available: boolean;
|
|
31
|
-
exports: string[];
|
|
32
|
-
digest?: string;
|
|
33
|
-
packageVersion?: string | null;
|
|
34
|
-
/** K5 addition; older ab-render instances omit it. */
|
|
35
|
-
versions?: string[];
|
|
36
|
-
error?: string | null;
|
|
37
|
-
}
|
|
38
|
-
/** /health → coreSurface, or null when the instance predates the core contract. */
|
|
39
|
-
export declare function fetchCoreSurface(base: string): Promise<CoreSurface | null>;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `remixmate template upgrade [--dry-run] [--with-docs] [--force] [--json]`
|
|
3
|
-
*
|
|
4
|
-
* 只更新工程里的本地校验规则(`.remixmate/`:check 脚本、template.schema.json、
|
|
5
|
-
* template-security-policy.json),来源是本 cli 钉死的 starter 版本(STARTER_VERSION)。
|
|
6
|
-
*
|
|
7
|
-
* 为什么需要:starter 在 init 时整份复制进用户工程,之后平台收紧规则,老工程的
|
|
8
|
-
* 本地 check 还是旧规则 —— 本地通过、服务端拒绝。一个 starter 版本 = 一套规则版本,
|
|
9
|
-
* 所以升级 cli 后跑一次 upgrade 就能对齐。
|
|
10
|
-
*
|
|
11
|
-
* 刻意不动的东西:templates/(用户的模板)、src/、package.json 与依赖、examples/。
|
|
12
|
-
* core 版本变化只提示不自动改 —— 升 core 可能影响模板渲染,必须是用户的决定。
|
|
13
|
-
* `--with-docs` 额外刷新 AGENTS.md / CLAUDE.md(内容不同时旧文件备份为 *.orig)。
|
|
14
|
-
*/
|
|
15
|
-
export interface UpgradeOptions {
|
|
16
|
-
dryRun?: boolean;
|
|
17
|
-
withDocs?: boolean;
|
|
18
|
-
/** Re-apply even when the project is already at (or above) this cli's starter version. */
|
|
19
|
-
force?: boolean;
|
|
20
|
-
json?: boolean;
|
|
21
|
-
cwd?: string;
|
|
22
|
-
}
|
|
23
|
-
export interface UpgradeResult {
|
|
24
|
-
ok: true;
|
|
25
|
-
from: string | null;
|
|
26
|
-
to: string;
|
|
27
|
-
upgraded: boolean;
|
|
28
|
-
dryRun: boolean;
|
|
29
|
-
docs: string[];
|
|
30
|
-
/** Dependency versions the new starter pins that differ from the project's (hint only). */
|
|
31
|
-
dependencyHints: Array<{
|
|
32
|
-
name: string;
|
|
33
|
-
project: string | null;
|
|
34
|
-
starter: string;
|
|
35
|
-
}>;
|
|
36
|
-
}
|
|
37
|
-
type Pkg = {
|
|
38
|
-
dependencies?: Record<string, string>;
|
|
39
|
-
devDependencies?: Record<string, string>;
|
|
40
|
-
};
|
|
41
|
-
/** Dependencies whose pinned version the starter changed — reported, never auto-applied. */
|
|
42
|
-
export declare function diffDependencies(project: Pkg, starter: Pkg): UpgradeResult['dependencyHints'];
|
|
43
|
-
export declare function runUpgrade(opts?: UpgradeOptions): Promise<UpgradeResult>;
|
|
44
|
-
export {};
|
package/dist/text.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Terminal text helpers shared by the human-facing commands.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Pad to a target terminal width. CJK characters occupy two columns but count as
|
|
6
|
-
* one code unit, so String.padEnd misaligns any column that contains them.
|
|
7
|
-
*/
|
|
8
|
-
export declare function padDisplay(text: string, width: number): string;
|