@larkup/tool-video-intelligence 0.2.2 → 0.2.3

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/dist/runtime.js CHANGED
@@ -99,7 +99,7 @@ export async function removeVideoRuntime(kind) {
99
99
  const packageDirectory = resolvePackageDirectory();
100
100
  if (kind === 'local-process') {
101
101
  stopNativeVideoRuntime(nativePidPath(packageDirectory));
102
- rmSync(path.join(process.cwd(), '.larkup', 'video-intelligence'), {
102
+ rmSync(videoRuntimeDataDir(), {
103
103
  recursive: true,
104
104
  force: true,
105
105
  });
@@ -406,7 +406,11 @@ function resolvePackageDirectory() {
406
406
  return path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
407
407
  }
408
408
  function nativePidPath(packageDirectory) {
409
- return path.join(process.cwd(), '.larkup', 'video-intelligence', 'runtime.pid');
409
+ return path.join(videoRuntimeDataDir(), 'runtime.pid');
410
+ }
411
+ function videoRuntimeDataDir() {
412
+ const root = process.env.LARKUP_DATA_DIR?.trim();
413
+ return path.join(root ? path.resolve(root) : path.join(process.cwd(), '.larkup'), 'video-intelligence');
410
414
  }
411
415
  export function stopNativeVideoRuntime(pidFile) {
412
416
  if (!existsSync(pidFile))
@@ -446,7 +450,7 @@ function localRuntimeEnvironment(localApiKey, localRuntimeUrl, understanding, ac
446
450
  function nativeRuntimeEnvironment(packageDirectory, localApiKey, localRuntimeUrl, understanding, acceleration) {
447
451
  const port = portFromUrl(localRuntimeUrl) ?? '8787';
448
452
  const hostname = hostnameFromUrl(localRuntimeUrl);
449
- const dataDirectory = path.join(process.cwd(), '.larkup', 'video-intelligence');
453
+ const dataDirectory = videoRuntimeDataDir();
450
454
  return withUvPath({
451
455
  ...process.env,
452
456
  LARKUP_VIDEO_PORT: port,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@larkup/tool-video-intelligence",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "type": "module",
5
5
  "description": "Installable local and cloud video intelligence with evidence-first indexing.",
6
6
  "main": "./dist/index.js",
@@ -55,13 +55,13 @@
55
55
  }
56
56
  },
57
57
  "dependencies": {
58
- "@larkup/core": "0.5.1"
58
+ "@larkup/core": "0.5.2"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/node": "^26",
62
62
  "typescript": "^7.0.2",
63
63
  "vitest": "^4.1.10",
64
- "@larkup/marketplace": "0.2.1"
64
+ "@larkup/marketplace": "0.2.2"
65
65
  },
66
66
  "publishConfig": {
67
67
  "access": "public"
@@ -61,7 +61,11 @@ function runtimeEnvironment() {
61
61
  }
62
62
 
63
63
  function nativeRuntimeEnvironment() {
64
- const dataDir = path.join(process.cwd(), '.larkup', 'video-intelligence');
64
+ const root = process.env.LARKUP_DATA_DIR?.trim();
65
+ const dataDir = path.join(
66
+ root ? path.resolve(root) : path.join(process.cwd(), '.larkup'),
67
+ 'video-intelligence',
68
+ );
65
69
  return {
66
70
  ...runtimeEnvironment(),
67
71
  LARKUP_VIDEO_RUNTIME_KIND: 'local-process',
@@ -7,7 +7,7 @@
7
7
  "description": "Help your AI understand your videos, so you can ask questions and get answers from the right moments.",
8
8
  "longDescription": "Turn videos into knowledge your AI can understand. It listens to what is said, reads what appears on screen, and helps you find the moments that matter.",
9
9
  "category": "media",
10
- "version": "0.2.2",
10
+ "version": "0.2.3",
11
11
  "pricing": "free",
12
12
  "emoji": "🎥",
13
13
  "icon": "Film",