@hypit/hypit 0.1.12 → 0.1.14
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/README.md +36 -2
- package/bin/hypit.mjs +0 -2
- package/dist/public/model-kit.d.ts +16 -0
- package/package.json +3 -1
- package/packages/cli/README.md +3 -0
- package/packages/cli/package.json +1 -0
- package/packages/cli/src/commands/environment.ts +12 -7
- package/packages/cli/src/commands/results.ts +19 -3
- package/packages/cli/src/main.ts +2 -1
- package/packages/cli/src/oauth.ts +50 -7
- package/packages/cli/src/output.ts +2 -2
- package/packages/cli/src/source-discovery.ts +2 -2
- package/packages/credential-store-file/README.md +60 -0
- package/packages/credential-store-file/package.json +21 -0
- package/packages/credential-store-file/src/activation.ts +29 -0
- package/packages/credential-store-file/src/index.ts +1 -0
- package/packages/credential-store-file/src/store.ts +89 -0
- package/packages/fonts-open/src/surface.ts +8 -2
- package/packages/hyperframes/README.md +16 -2
- package/packages/hyperframes/src/browser-program.ts +6 -1
- package/packages/hyperframes/src/document.ts +31 -21
- package/packages/hyperframes/src/project.ts +11 -20
- package/packages/media-execution/README.md +7 -0
- package/packages/media-execution/src/execute.ts +5 -5
- package/packages/media-execution/src/index.ts +1 -1
- package/packages/media-execution/src/process-env.ts +20 -0
- package/packages/media-execution/src/surface.ts +83 -76
- package/packages/model-kit/README.md +28 -0
- package/packages/model-kit/src/index.ts +58 -19
- package/packages/package-loader-node/README.md +10 -0
- package/packages/package-loader-node/src/index.ts +1 -0
- package/packages/package-loader-node/src/loader.ts +25 -5
- package/packages/package-loader-node/src/location.ts +11 -2
- package/packages/project-context-node/README.md +2 -0
- package/packages/project-context-node/src/project-context.ts +5 -3
- package/packages/provider-hyperframes-local/README.md +95 -13
- package/packages/provider-hyperframes-local/package.json +13 -3
- package/packages/provider-hyperframes-local/src/activation.ts +20 -6
- package/packages/provider-hyperframes-local/src/browser-install.ts +5 -0
- package/packages/provider-hyperframes-local/src/browser.ts +118 -0
- package/packages/provider-hyperframes-local/src/capture-bootstrap.ts +4 -6
- package/packages/provider-hyperframes-local/src/capture-exit.ts +24 -0
- package/packages/provider-hyperframes-local/src/capture-process.ts +54 -59
- package/packages/provider-hyperframes-local/src/capture-worker.ts +28 -7
- package/packages/provider-hyperframes-local/src/capture.ts +12 -5
- package/packages/provider-hyperframes-local/src/opaque-capture.ts +46 -18
- package/packages/provider-hyperframes-local/src/options.ts +2 -2
- package/packages/provider-hyperframes-local/src/process-tree.ts +82 -0
- package/packages/provider-hyperframes-local/src/process.ts +22 -0
- package/packages/provider-hyperframes-local/src/program.ts +25 -33
- package/packages/provider-hyperframes-local/src/provider.ts +4 -7
- package/packages/provider-hyperframes-local/src/render.ts +9 -4
- package/packages/provider-hypihub/README.md +3 -0
- package/packages/runtime-host-node/README.md +5 -0
- package/packages/runtime-host-node/src/index.ts +7 -2
- package/packages/runtime-host-node/src/packages.ts +13 -7
- package/packages/runtime-local/README.md +10 -0
- package/packages/runtime-local/src/config.ts +1 -1
- package/packages/runtime-local/src/credentials.ts +10 -5
- package/packages/runtime-local/src/runtime.ts +1 -1
- package/packages/seedance/README.md +42 -0
- package/packages/seedance/src/index.ts +5 -22
- package/packages/seedance/src/surface.ts +2 -3
- package/packages/seedance/src/validation.ts +16 -0
- package/packages/studio/src/preview/runtime-shim.ts +17 -3
- package/packages/studio/src/server.ts +2 -2
- package/packages/video-cli/README.md +5 -1
- package/packages/video-cli/package.json +1 -0
- package/packages/video-cli/src/distribution.ts +3 -10
- package/packages/video-cli/src/version.ts +1 -1
- package/packages/workspace-fs-node/src/workspace.ts +2 -2
- package/packages/yt-dlp/README.md +3 -2
- package/packages/yt-dlp/package.json +4 -0
- package/packages/yt-dlp/src/download.ts +10 -14
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"@hypit/cli": "workspace:*",
|
|
14
14
|
"@hypit/compiler-markup-node": "workspace:*",
|
|
15
15
|
"@hypit/composition": "workspace:*",
|
|
16
|
+
"@hypit/credential-store-file": "workspace:*",
|
|
16
17
|
"@hypit/credential-store-os": "workspace:*",
|
|
17
18
|
"@hypit/driver-node": "workspace:*",
|
|
18
19
|
"@hypit/estimate": "workspace:*",
|
|
@@ -12,8 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
// The Distribution root is the replaceable Hypit tool checkout, not this
|
|
14
14
|
// package's source directory and never the author's project.
|
|
15
|
-
const packageRoot = resolve(
|
|
16
|
-
const installedLauncher = process.env.HYPIT_CLI_LAUNCHER;
|
|
15
|
+
const packageRoot = resolve(import.meta.dirname, "../../..");
|
|
17
16
|
const defaultBuildResultRepository = {
|
|
18
17
|
use: "@hypit/build-result-fs",
|
|
19
18
|
config: { path: ".hypit/results" },
|
|
@@ -57,14 +56,8 @@ export const videoCliDistribution: CliDistribution = {
|
|
|
57
56
|
: { distributionPackageRoot: options.distributionPackageRoot }),
|
|
58
57
|
workerLaunch: {
|
|
59
58
|
command: process.execPath,
|
|
60
|
-
// The
|
|
61
|
-
|
|
62
|
-
args: installedLauncher === undefined
|
|
63
|
-
? [
|
|
64
|
-
...process.execArgv.filter((item) => !item.startsWith("--test")),
|
|
65
|
-
fileURLToPath(new URL("./cli.ts", import.meta.url)),
|
|
66
|
-
]
|
|
67
|
-
: [installedLauncher],
|
|
59
|
+
// The loaded Distribution owns its Worker entry and TypeScript/package resolution.
|
|
60
|
+
args: [fileURLToPath(new URL("../../../bin/hypit.mjs", import.meta.url))],
|
|
68
61
|
},
|
|
69
62
|
}),
|
|
70
63
|
openProjectResults: async (projectRoot, options) => {
|
|
@@ -20,7 +20,7 @@ export function writeVersionHelp(io: CliIo): void {
|
|
|
20
20
|
/** Installation discovery belongs to the executable, independent of video execution and Skill installers. */
|
|
21
21
|
export async function runVersionCli(argv: readonly string[], io: CliIo, environment: VersionEnvironment = {
|
|
22
22
|
packageRoot: resolve(import.meta.dirname, "../../.."),
|
|
23
|
-
|
|
23
|
+
launcher: resolve(import.meta.dirname, "../../../bin/hypit.mjs"),
|
|
24
24
|
fetch: globalThis.fetch,
|
|
25
25
|
}): Promise<void> {
|
|
26
26
|
let check = false;
|
|
@@ -2,7 +2,7 @@ import { pathToFileURL } from "node:url";
|
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { createReadStream } from "node:fs";
|
|
4
4
|
import { readFile, realpath, stat } from "node:fs/promises";
|
|
5
|
-
import { basename, dirname, isAbsolute, relative, resolve } from "node:path";
|
|
5
|
+
import { basename, dirname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
6
6
|
|
|
7
7
|
import type {
|
|
8
8
|
Awaitable,
|
|
@@ -20,7 +20,7 @@ import type { BlobRef } from "@hypit/protocol";
|
|
|
20
20
|
|
|
21
21
|
function isWithin(root: string, path: string): boolean {
|
|
22
22
|
const relation = relative(root, path);
|
|
23
|
-
return relation === "" || (!relation.startsWith(
|
|
23
|
+
return relation === "" || (relation !== ".." && !relation.startsWith(`..${sep}`) && !isAbsolute(relation));
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export type NodeFilesystemExternalSource = {
|
|
@@ -17,8 +17,9 @@ Runtime Profile and creates no Build.
|
|
|
17
17
|
- `downloadVideo(url, target)` downloads one video to the given path. Its caller owns destination
|
|
18
18
|
preparation and overwrite policy. The target extension must be `.mp4`, `.mkv`, `.webm` or `.mov`.
|
|
19
19
|
|
|
20
|
-
The downloader
|
|
21
|
-
|
|
20
|
+
The downloader locates its declared `@hypit/yt-dlp-service-runtime` package through the active
|
|
21
|
+
Distribution/package resolver and invokes that package's locked Python project through `uv`.
|
|
22
|
+
Ship its `pyproject.toml` and `uv.lock`; the caller's location and a `services/` ancestor are irrelevant.
|
|
22
23
|
`uv` and `ffmpeg` must be available on PATH; the CLI also uses `ffprobe` to report the saved media.
|
|
23
24
|
|
|
24
25
|
The request selects `bv*+ba/b`, with `res:1080,vcodec:h264` format preferences and `--no-playlist`.
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
* the same shape WhisperX and OpenCV already use for their Python programs.
|
|
12
12
|
*/
|
|
13
13
|
import { spawnSync } from "node:child_process";
|
|
14
|
-
import { existsSync } from "node:fs";
|
|
15
14
|
import { copyFile, mkdtemp, readdir, rename, rm } from "node:fs/promises";
|
|
16
15
|
import { tmpdir } from "node:os";
|
|
17
16
|
import { dirname, extname, join } from "node:path";
|
|
18
|
-
|
|
17
|
+
|
|
18
|
+
import { resolveNodePackageResource } from "@hypit/package-loader-node";
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Whether this is a link to fetch rather than a path to open.
|
|
@@ -34,20 +34,16 @@ export function isVideoUrl(value: string): boolean {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* The uv project
|
|
38
|
-
*
|
|
37
|
+
* The locked uv project is a Distribution package asset, the same way WhisperX and
|
|
38
|
+
* OpenCV locate their Python programs. Walking parents of this file only works
|
|
39
|
+
* while the module still sits above `services/` in a contributor checkout.
|
|
39
40
|
*/
|
|
40
41
|
function serviceProject(): string {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (parent === directory) {
|
|
47
|
-
throw new Error("no services/yt-dlp project above this module; the Distribution is incomplete");
|
|
48
|
-
}
|
|
49
|
-
directory = parent;
|
|
50
|
-
}
|
|
42
|
+
return dirname(resolveNodePackageResource(
|
|
43
|
+
"@hypit/yt-dlp-service-runtime",
|
|
44
|
+
"pyproject.toml",
|
|
45
|
+
{ from: import.meta.url },
|
|
46
|
+
));
|
|
51
47
|
}
|
|
52
48
|
|
|
53
49
|
/**
|