@larkup/tool-video-intelligence 0.2.10 → 0.3.0

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.
@@ -127,6 +127,24 @@ export interface TrackEvidence {
127
127
  observations: number;
128
128
  confidence: number;
129
129
  }
130
+ /**
131
+ * Detection-backed presence facts. Track IDs deliberately remain anonymous:
132
+ * an edit, occlusion, or re-entry may create a new track for the same subject.
133
+ */
134
+ export interface AnonymousPresenceLedger {
135
+ method: 'object-detection-anonymous-tracking';
136
+ sampledFrames: number;
137
+ sampleIntervalSecs?: number;
138
+ tracks: Array<TrackEvidence & {
139
+ timestampsMs: number[];
140
+ }>;
141
+ labels: Array<{
142
+ label: string;
143
+ distinctTrackCount: number;
144
+ maximumSimultaneous: number;
145
+ simultaneousTimestampsMs: number[];
146
+ }>;
147
+ }
130
148
  export interface VisualObservation {
131
149
  timeMs: number;
132
150
  objects: Array<{
@@ -165,6 +183,7 @@ export interface VideoEvidenceBundle {
165
183
  detectedLanguage?: string;
166
184
  visualObservations: VisualObservation[];
167
185
  tracks: TrackEvidence[];
186
+ anonymousPresenceLedger?: AnonymousPresenceLedger;
168
187
  recurringOverlayText?: RecurringOverlayText[];
169
188
  entities: Array<{
170
189
  name: string;
@@ -242,6 +261,15 @@ export interface VideoEvidenceBundle {
242
261
  endMs: number;
243
262
  }>;
244
263
  }>;
264
+ visibleSubjects?: Array<{
265
+ identity: string;
266
+ identityBasis: 'source-named' | 'source-described' | 'unresolved';
267
+ appearances: Array<{
268
+ startMs: number;
269
+ endMs: number;
270
+ confidence: 'direct' | 'partial';
271
+ }>;
272
+ }>;
245
273
  stateHistory: Array<{
246
274
  startMs: number;
247
275
  endMs: number;
@@ -268,13 +296,41 @@ export interface VideoEvidenceBundle {
268
296
  }>;
269
297
  }>;
270
298
  sourceItems?: Array<{
271
- kind: 'question' | 'heading' | 'slide-item' | 'board-item' | 'list-item';
299
+ kind: 'question' | 'clue' | 'heading' | 'slide-item' | 'board-item' | 'list-item';
272
300
  channel: 'spoken' | 'visible';
301
+ questionRole?: 'primary' | 'interactional' | 'rhetorical' | 'not-question';
273
302
  text: string;
274
303
  answer: string;
304
+ respondent?: string;
305
+ startMs: number;
306
+ endMs: number;
307
+ }>;
308
+ sourceActivityStructures?: Array<{
309
+ kind: 'grid' | 'sequence' | 'collection';
310
+ label: string;
311
+ dimensions: Array<{
312
+ label: string;
313
+ values: string[];
314
+ }>;
315
+ promptCount?: number;
316
+ startMs: number;
317
+ endMs: number;
318
+ }>;
319
+ sourceTaskInstances?: Array<{
320
+ id: string;
321
+ prompt: string;
322
+ channel: 'spoken' | 'visible';
323
+ answer: string;
324
+ respondent?: string;
275
325
  startMs: number;
276
326
  endMs: number;
277
327
  }>;
328
+ sourceInventoryCoverage?: {
329
+ complete: boolean;
330
+ totalWindows: number;
331
+ processedWindows: number;
332
+ reason?: string;
333
+ };
278
334
  uncertainties: string[];
279
335
  };
280
336
  answeringGuide: {
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ export * from './ui.js';
9
9
  export declare const TOOL_META: {
10
10
  readonly id: "video-intelligence";
11
11
  readonly name: "Video Intelligence";
12
- readonly version: "0.2.9";
12
+ readonly version: "0.3.0";
13
13
  };
14
14
  export declare const TOOL_EXTENSION: {
15
15
  id: "video-intelligence";
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ export * from './ui.js';
11
11
  export const TOOL_META = {
12
12
  id: 'video-intelligence',
13
13
  name: 'Video Intelligence',
14
- version: '0.2.9',
14
+ version: '0.3.0',
15
15
  };
16
16
  /** Managed infrastructure stays an implementation detail of Larkup Cloud. */
17
17
  const MANAGED_CLOUD_ENDPOINT = process.env.LARKUP_VIDEO_INTELLIGENCE_CLOUD_ENDPOINT ??
@@ -287,6 +287,7 @@ function createClientFromContext(context) {
287
287
  const { mode, endpoint, apiKey } = resolveClientOptions(context.config);
288
288
  return attachVideoIntelligenceAgentClient(new VideoIntelligenceClient({ mode, endpoint, apiKey, fetch: context.fetch }), context.fetch);
289
289
  }
290
+ const PROVIDER_VERIFICATION_MAX_TOKENS = 16;
290
291
  async function verifyProviderModel(label, provider, apiKey, model, request = globalThis.fetch) {
291
292
  if (!provider || !apiKey || !model) {
292
293
  throw new Error(`${label} needs a provider, model, and API key before it can be verified.`);
@@ -302,7 +303,7 @@ async function verifyProviderModel(label, provider, apiKey, model, request = glo
302
303
  headers: { 'Content-Type': 'application/json' },
303
304
  body: JSON.stringify({
304
305
  contents: [{ role: 'user', parts: [{ text: 'Reply with OK.' }] }],
305
- generationConfig: { maxOutputTokens: 8 },
306
+ generationConfig: { maxOutputTokens: PROVIDER_VERIFICATION_MAX_TOKENS },
306
307
  }),
307
308
  });
308
309
  }
@@ -317,7 +318,7 @@ async function verifyProviderModel(label, provider, apiKey, model, request = glo
317
318
  body: JSON.stringify({
318
319
  model: normalizedModel,
319
320
  messages: [{ role: 'user', content: 'Reply with OK.' }],
320
- max_tokens: 8,
321
+ max_tokens: PROVIDER_VERIFICATION_MAX_TOKENS,
321
322
  }),
322
323
  });
323
324
  }
@@ -335,7 +336,7 @@ async function verifyProviderModel(label, provider, apiKey, model, request = glo
335
336
  body: JSON.stringify({
336
337
  model: normalizedProvider === 'vercel_ai_gateway' ? model : normalizedModel,
337
338
  messages: [{ role: 'user', content: 'Reply with OK.' }],
338
- max_tokens: 8,
339
+ max_tokens: PROVIDER_VERIFICATION_MAX_TOKENS,
339
340
  }),
340
341
  });
341
342
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@larkup/tool-video-intelligence",
3
- "version": "0.2.10",
3
+ "version": "0.3.0",
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.5"
58
+ "@larkup/core": "0.7.0"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/node": "^26",
62
62
  "typescript": "^7.0.2",
63
63
  "vitest": "^5.0.0",
64
- "@larkup/marketplace": "0.2.6"
64
+ "@larkup/marketplace": "0.3.1"
65
65
  },
66
66
  "publishConfig": {
67
67
  "access": "public"
@@ -53,7 +53,7 @@ class Settings:
53
53
  ),
54
54
  disable_heavy_operators=_bool("LARKUP_VIDEO_DISABLE_HEAVY_OPERATORS", False),
55
55
  semantic_vision_enabled=_bool("LARKUP_VIDEO_SEMANTIC_VISION", True),
56
- # Vercel AI Gateway model ids, not local HuggingFace paths -- both
56
+ # Vercel AI Gateway model ids, not local HuggingFace paths, both
57
57
  # run entirely through gateway_vision.GatewayVisionClient, which
58
58
  # reads these same env vars itself. Kept here too so /v1/health
59
59
  # can report them. The bulk model captions every clip cheaply;
@@ -1,7 +1,3 @@
1
- """FastAPI app entry point: creates the app, wires CORS and exception
2
- handlers, and mounts the v1 API. Run with `uv run larkup-video-runtime`.
3
- """
4
-
5
1
  from __future__ import annotations
6
2
 
7
3
  from fastapi import FastAPI