@larkup/marketplace 0.2.8 → 0.3.2
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/.turbo/turbo-test.log +12 -13
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +30 -0
- package/package.json +2 -2
- package/src/db/builtin-tools.ts +2 -2
- package/src/tool-extension.ts +30 -1
- package/src/tool-installer.test.ts +19 -0
- package/src/tool-installer.ts +25 -4
- package/src/tool-registry.test.ts +1 -1
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
> @larkup/marketplace@0.2
|
|
2
|
+
> @larkup/marketplace@0.3.2 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)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
✓ src/
|
|
12
|
-
✓ src/
|
|
13
|
-
✓ src/output-sanitizer.test.ts (2 tests) 24ms
|
|
8
|
+
✓ src/tool-loader.test.ts (3 tests) 105ms
|
|
9
|
+
✓ src/tool-registry.test.ts (2 tests) 7ms
|
|
10
|
+
✓ src/storage-provider-s3.test.ts (8 tests) 9ms
|
|
11
|
+
✓ src/output-sanitizer.test.ts (2 tests) 3ms
|
|
12
|
+
✓ src/tool-installer.test.ts (1 test) 2ms
|
|
14
13
|
|
|
15
|
-
Test Files
|
|
16
|
-
Tests
|
|
17
|
-
Start at
|
|
18
|
-
Duration
|
|
14
|
+
Test Files 5 passed (5)
|
|
15
|
+
Tests 16 passed (16)
|
|
16
|
+
Start at 00:39:59
|
|
17
|
+
Duration 1.73s (transform 47%, tests 23%, import 20%, worker 10%)
|
|
19
18
|
|
|
20
|
-
Isolate
|
|
21
|
-
at least ~
|
|
19
|
+
Isolate 5 workers spawned · ~221ms startup each (spawn + environment, per file)
|
|
20
|
+
at least ~883ms faster with isolate: false — reuses workers across files instead of one per file
|
|
22
21
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @larkup/marketplace
|
|
2
2
|
|
|
3
|
+
## 0.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [d3ead95]
|
|
8
|
+
- @larkup/core@0.7.1
|
|
9
|
+
|
|
10
|
+
## 0.3.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 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.
|
|
15
|
+
|
|
16
|
+
## 0.3.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- 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.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
- @larkup/core@0.7.0
|
|
26
|
+
|
|
27
|
+
## 0.2.9
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- 87a6753: Fix Marketplace tool updates when local npm metadata or installed version records are stale.
|
|
32
|
+
|
|
3
33
|
## 0.2.8
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@larkup/marketplace",
|
|
3
|
-
"version": "0.2
|
|
3
|
+
"version": "0.3.2",
|
|
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.
|
|
29
|
+
"@larkup/core": "0.7.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^26",
|
package/src/db/builtin-tools.ts
CHANGED
|
@@ -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.
|
|
13
|
+
version: '0.3.1',
|
|
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.
|
|
598
|
+
version: '0.2.26',
|
|
599
599
|
pricing: 'free',
|
|
600
600
|
emoji: '📝',
|
|
601
601
|
icon: 'FileEdit',
|
package/src/tool-extension.ts
CHANGED
|
@@ -35,7 +35,16 @@ export interface AgentToolExecutionContext {
|
|
|
35
35
|
}
|
|
36
36
|
| undefined
|
|
37
37
|
>;
|
|
38
|
-
planQuestion: (
|
|
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[];
|
|
40
49
|
route?: 'search' | 'temporal' | 'aggregate' | 'scan' | 'export';
|
|
41
50
|
requiresInspectionWhenInsufficient: boolean;
|
|
@@ -67,6 +76,13 @@ export interface AgentToolExecutionContext {
|
|
|
67
76
|
planInvestigation?: (
|
|
68
77
|
mediaAssetId: string,
|
|
69
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
|
+
},
|
|
70
86
|
) => Promise<
|
|
71
87
|
| {
|
|
72
88
|
candidateRanges: Array<{
|
|
@@ -197,6 +213,17 @@ export interface AgentToolExecutionContext {
|
|
|
197
213
|
description: string;
|
|
198
214
|
timeRange: { startSecs: number; endSecs: number; precision?: string };
|
|
199
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
|
+
}>;
|
|
200
227
|
timeline: Array<{
|
|
201
228
|
text: string;
|
|
202
229
|
timeRange: { startSecs: number; endSecs: number; precision?: string };
|
|
@@ -208,6 +235,8 @@ export interface AgentToolExecutionContext {
|
|
|
208
235
|
questionRole?: 'primary' | 'interactional' | 'rhetorical';
|
|
209
236
|
promptSlots?: number;
|
|
210
237
|
text: string;
|
|
238
|
+
answer?: string;
|
|
239
|
+
respondent?: string;
|
|
211
240
|
timeRange: { startSecs: number; endSecs: number; precision?: string };
|
|
212
241
|
}>;
|
|
213
242
|
coverage: { inventoryComplete: boolean; activeEvidenceRecords: number };
|
|
@@ -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
|
+
});
|
package/src/tool-installer.ts
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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': {
|