@larkup/marketplace 0.2.7 → 0.3.1

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,20 +1,21 @@
1
1
 
2
- > @larkup/marketplace@0.2.7 test /Users/abdelrahmanabounida/Desktop/my-ai-startup/larkup/larkup/packages/marketplace
2
+ > @larkup/marketplace@0.3.1 test /Users/abdelrahmanabounida/Desktop/my-ai-startup/larkup/larkup/packages/marketplace
3
3
  > vitest run
4
4
 
5
5
 
6
6
  RUN v5.0.0 /Users/abdelrahmanabounida/Desktop/my-ai-startup/larkup/larkup/packages/marketplace
7
7
 
8
- ✓ src/tool-loader.test.ts (3 tests) 214ms
9
- ✓ src/storage-provider-s3.test.ts (8 tests) 16ms
10
- ✓ src/tool-registry.test.ts (2 tests) 35ms
11
- ✓ src/output-sanitizer.test.ts (2 tests) 9ms
8
+ ✓ src/tool-loader.test.ts (3 tests) 158ms
9
+ ✓ src/storage-provider-s3.test.ts (8 tests) 13ms
10
+ ✓ src/tool-registry.test.ts (2 tests) 23ms
11
+ ✓ src/output-sanitizer.test.ts (2 tests) 5ms
12
+ ✓ src/tool-installer.test.ts (1 test) 4ms
12
13
 
13
- Test Files 4 passed (4)
14
- Tests 15 passed (15)
15
- Start at 10:26:02
16
- Duration 3.16s (transform 36%, tests 34%, import 23%, worker 7%)
14
+ Test Files 5 passed (5)
15
+ Tests 16 passed (16)
16
+ Start at 13:21:42
17
+ Duration 2.98s (transform 55%, import 22%, tests 20%, worker 3%)
17
18
 
18
- Isolate 4 workers spawned · ~517ms startup each (spawn + environment, per file)
19
- at least ~1.55s faster with isolate: false — reuses workers across files instead of one per file
19
+ Isolate 5 workers spawned · ~375ms startup each (spawn + environment, per file)
20
+ at least ~1.50s faster with isolate: false — reuses workers across files instead of one per file
20
21
 
@@ -1,4 +1,4 @@
1
1
 
2
- > @larkup/marketplace@0.2.7 type-check /Users/abdelrahmanabounida/Desktop/my-ai-startup/larkup/larkup/packages/marketplace
2
+ > @larkup/marketplace@0.3.1 type-check /Users/abdelrahmanabounida/Desktop/my-ai-startup/larkup/larkup/packages/marketplace
3
3
  > tsc --noEmit
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @larkup/marketplace
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Keep Marketplace update actions accurate after a successful install, and do not offer an npm update for a workspace-linked development tool that cannot be replaced by the installer.
8
+
9
+ ## 0.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - Add language-neutral, model-issued video investigation directives, source-grounded chronological continuity, and an anonymous detection presence ledger for broad video investigation. Preserve the Media Panel indexing focus across local and remote imports, add source-wide coverage retrieval outside the model context, and make Marketplace tool updates settle to the verified installed version.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+ - @larkup/core@0.7.0
19
+
20
+ ## 0.2.9
21
+
22
+ ### Patch Changes
23
+
24
+ - 87a6753: Fix Marketplace tool updates when local npm metadata or installed version records are stale.
25
+
26
+ ## 0.2.8
27
+
28
+ ### Patch Changes
29
+
30
+ - 211071c: Improve deterministic video evidence routing and complete-source retrieval.
31
+ - Updated dependencies [211071c]
32
+ - @larkup/core@0.6.0
33
+
3
34
  ## 0.2.7
4
35
 
5
36
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@larkup/marketplace",
3
- "version": "0.2.7",
3
+ "version": "0.3.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -26,7 +26,7 @@
26
26
  "drizzle-orm": "^0.45.2",
27
27
  "postgres": "^3.4.9",
28
28
  "tsx": "^4.23.5",
29
- "@larkup/core": "0.5.5"
29
+ "@larkup/core": "0.7.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^26",
@@ -10,7 +10,7 @@ export const BUILTIN_TOOLS: Record<string, unknown>[] = [
10
10
  longDescription:
11
11
  '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.',
12
12
  category: 'media',
13
- version: '0.2.10',
13
+ version: '0.3.0',
14
14
  pricing: 'free',
15
15
  emoji: '🎬',
16
16
  icon: 'Film',
@@ -595,7 +595,7 @@ export const BUILTIN_TOOLS: Record<string, unknown>[] = [
595
595
  'Supports PDF form fields (AcroForm), DOCX paragraphs/tables, PPTX slide text, and plain text editing. ' +
596
596
  'Uses pdf-lib (native) for PDF and the Docker sandbox for DOCX/PPTX via python-docx/python-pptx.',
597
597
  category: 'utility',
598
- version: '0.2.3',
598
+ version: '0.2.25',
599
599
  pricing: 'free',
600
600
  emoji: '📝',
601
601
  icon: 'FileEdit',
@@ -35,8 +35,18 @@ export interface AgentToolExecutionContext {
35
35
  }
36
36
  | undefined
37
37
  >;
38
- planQuestion: (question: string) => {
38
+ planQuestion: (
39
+ question: string,
40
+ directive: {
41
+ scope: 'focused' | 'temporal' | 'source';
42
+ goal: 'answer' | 'compare' | 'trace' | 'enumerate' | 'synthesize';
43
+ evidence?: Array<'speech' | 'visible-text' | 'visual' | 'computed'>;
44
+ recordSet?: 'all' | 'source-authored' | 'source-questions' | 'observed';
45
+ timeRange?: { startSecs: number; endSecs: number };
46
+ },
47
+ ) => {
39
48
  kinds: string[];
49
+ route?: 'search' | 'temporal' | 'aggregate' | 'scan' | 'export';
40
50
  requiresInspectionWhenInsufficient: boolean;
41
51
  requiresBothRanges?: boolean;
42
52
  requiresBroadCoverage?: boolean;
@@ -66,6 +76,13 @@ export interface AgentToolExecutionContext {
66
76
  planInvestigation?: (
67
77
  mediaAssetId: string,
68
78
  question: string,
79
+ directive: {
80
+ scope: 'focused' | 'temporal' | 'source';
81
+ goal: 'answer' | 'compare' | 'trace' | 'enumerate' | 'synthesize';
82
+ evidence?: Array<'speech' | 'visible-text' | 'visual' | 'computed'>;
83
+ recordSet?: 'all' | 'source-authored' | 'source-questions' | 'observed';
84
+ timeRange?: { startSecs: number; endSecs: number };
85
+ },
69
86
  ) => Promise<
70
87
  | {
71
88
  candidateRanges: Array<{
@@ -147,6 +164,85 @@ export interface AgentToolExecutionContext {
147
164
  };
148
165
  }>
149
166
  >;
167
+ /**
168
+ * Reads the active source in chronological pages. Unlike `search`, this
169
+ * operation has no relevance ranking and is used for complete inventories.
170
+ */
171
+ scan?: (
172
+ mediaAssetId: string,
173
+ input: { kind: 'source-inventory' | 'all-evidence'; cursor?: number; limit?: number },
174
+ ) => Promise<
175
+ | {
176
+ resultHandle: string;
177
+ records: Array<{
178
+ id: string;
179
+ sourceEvidenceId: string;
180
+ kind: string;
181
+ channel?: string;
182
+ questionRole?: 'primary' | 'interactional' | 'rhetorical';
183
+ taskId?: string;
184
+ text: string;
185
+ answer?: string;
186
+ respondent?: string;
187
+ timeRange: { startSecs: number; endSecs: number; precision?: string };
188
+ modality: string;
189
+ confidence: unknown;
190
+ }>;
191
+ continuation: {
192
+ cursor: number;
193
+ nextCursor?: number;
194
+ hasMore: boolean;
195
+ totalRecords: number;
196
+ };
197
+ coverage: {
198
+ complete: boolean;
199
+ scannedRecords: number;
200
+ totalRecords: number;
201
+ reason?: string;
202
+ };
203
+ }
204
+ | undefined
205
+ >;
206
+ /** A compact, durable navigation map built from all active source evidence. */
207
+ aggregate?: (mediaAssetId: string) => Promise<
208
+ | {
209
+ resultHandle: string;
210
+ cached: boolean;
211
+ participants: Array<{
212
+ name: string;
213
+ description: string;
214
+ timeRange: { startSecs: number; endSecs: number; precision?: string };
215
+ }>;
216
+ visibleSubjects: Array<{
217
+ identity: string;
218
+ identityBasis: 'source-named' | 'source-described' | 'unresolved';
219
+ appearances: Array<{
220
+ startSecs: number;
221
+ endSecs: number;
222
+ precision?: string;
223
+ }>;
224
+ observedDurationSecs: number;
225
+ observationCount: number;
226
+ }>;
227
+ timeline: Array<{
228
+ text: string;
229
+ timeRange: { startSecs: number; endSecs: number; precision?: string };
230
+ }>;
231
+ sourceItems: Array<{
232
+ id: string;
233
+ kind: string;
234
+ channel?: string;
235
+ questionRole?: 'primary' | 'interactional' | 'rhetorical';
236
+ promptSlots?: number;
237
+ text: string;
238
+ answer?: string;
239
+ respondent?: string;
240
+ timeRange: { startSecs: number; endSecs: number; precision?: string };
241
+ }>;
242
+ coverage: { inventoryComplete: boolean; activeEvidenceRecords: number };
243
+ }
244
+ | undefined
245
+ >;
150
246
  };
151
247
  }
152
248
 
@@ -0,0 +1,19 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { buildNpmInstallArgs } from './tool-installer';
3
+
4
+ describe('buildNpmInstallArgs', () => {
5
+ it('refreshes registry metadata and preserves scoped package specifiers', () => {
6
+ expect(
7
+ buildNpmInstallArgs('@larkup/tool-video-intelligence@latest', '/tmp/larkup-tools'),
8
+ ).toEqual([
9
+ 'install',
10
+ '@larkup/tool-video-intelligence@latest',
11
+ '--prefix',
12
+ '/tmp/larkup-tools',
13
+ '--save',
14
+ '--no-audit',
15
+ '--no-fund',
16
+ '--prefer-online',
17
+ ]);
18
+ });
19
+ });
@@ -1,7 +1,7 @@
1
1
  import { promises as fs } from 'node:fs';
2
2
  import type { Dirent } from 'node:fs';
3
3
  import path from 'node:path';
4
- import { exec as execCb } from 'node:child_process';
4
+ import { exec as execCb, execFile as execFileCb } from 'node:child_process';
5
5
  import { promisify } from 'node:util';
6
6
  import type {
7
7
  InstalledTool,
@@ -24,6 +24,7 @@ export function getOngoingOperations() {
24
24
  }
25
25
 
26
26
  const execAsync = promisify(execCb);
27
+ const execFileAsync = promisify(execFileCb);
27
28
 
28
29
  // npm mutates a shared node_modules tree.
29
30
  let packageMutationChain: Promise<unknown> = Promise.resolve();
@@ -292,6 +293,19 @@ async function ensureToolsPackageJson(): Promise<void> {
292
293
  }
293
294
  }
294
295
 
296
+ export function buildNpmInstallArgs(specifier: string, toolsDir: string): string[] {
297
+ return [
298
+ 'install',
299
+ specifier,
300
+ '--prefix',
301
+ toolsDir,
302
+ '--save',
303
+ '--no-audit',
304
+ '--no-fund',
305
+ '--prefer-online',
306
+ ];
307
+ }
308
+
295
309
  /**
296
310
  * Execute the actual package install into the isolated tools directory.
297
311
  */
@@ -321,9 +335,8 @@ async function execInstallUnlocked(
321
335
  await ensureToolsPackageJson();
322
336
 
323
337
  const install = async (specifier: string) => {
324
- const installCmd = `npm install ${specifier} --prefix "${toolsDir}" --save --no-audit --no-fund --prefer-offline`;
325
338
  onProgress?.(`Running: npm install ${specifier}`);
326
- const { stderr } = await execAsync(installCmd, {
339
+ const { stderr } = await execFileAsync('npm', buildNpmInstallArgs(specifier, toolsDir), {
327
340
  cwd: toolsDir,
328
341
  // Native tool dependencies can take longer under Docker Desktop's
329
342
  // amd64 emulation. Let the request finish instead of reporting a
@@ -382,7 +395,15 @@ async function execInstallUnlocked(
382
395
  const packageJson = JSON.parse(
383
396
  await fs.readFile(path.join(resolvedPath, 'package.json'), 'utf8'),
384
397
  ) as { version?: string };
385
- return { resolvedPath, version: packageJson.version ?? version };
398
+
399
+ const resolvedVersion = packageJson.version ?? version;
400
+ const { compareToolVersions } = await import('./tool-registry');
401
+
402
+ if (compareToolVersions(version, resolvedVersion) > 0) {
403
+ throw new Error(`Version ${version} is not yet available. Please try again later.`);
404
+ }
405
+
406
+ return { resolvedPath, version: resolvedVersion };
386
407
  }
387
408
 
388
409
  case 'serverless': {
@@ -9,7 +9,7 @@ describe('tool registry fallback catalog', () => {
9
9
  expect(registry['video-intelligence']).toMatchObject({
10
10
  id: 'video-intelligence',
11
11
  packageName: '@larkup/tool-video-intelligence',
12
- version: '0.2.10',
12
+ version: '0.3.0',
13
13
  });
14
14
  });
15
15
  });