@omnimedia/omniso 0.1.1-0 → 0.1.1-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.
- package/package.json +3 -7
- package/x/api.d.ts +5 -2
- package/x/assistant/knowledge.d.ts +1 -1
- package/x/assistant/knowledge.js +8 -2
- package/x/mcp/protocol.d.ts +17 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnimedia/omniso",
|
|
3
|
-
"version": "0.1.1-
|
|
3
|
+
"version": "0.1.1-1",
|
|
4
4
|
"description": "Shared contracts, schemas, and utilities for Omniclip and its server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,14 +12,10 @@
|
|
|
12
12
|
"x"
|
|
13
13
|
],
|
|
14
14
|
"exports": {
|
|
15
|
-
"
|
|
16
|
-
"./*": {
|
|
17
|
-
"types": "./x/*.d.ts",
|
|
18
|
-
"import": "./x/*.js"
|
|
19
|
-
}
|
|
15
|
+
"./*": "./x/*.js"
|
|
20
16
|
},
|
|
21
17
|
"scripts": {
|
|
22
|
-
"build": "
|
|
18
|
+
"build": "rm -rf x && tsc",
|
|
23
19
|
"watch": "tsc -p tsconfig.json -w",
|
|
24
20
|
"prepack": "npm run build"
|
|
25
21
|
},
|
package/x/api.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type FileRequest = {
|
|
|
6
6
|
projectId: string;
|
|
7
7
|
path: string;
|
|
8
8
|
};
|
|
9
|
-
export type
|
|
9
|
+
export type MediaRequest = {
|
|
10
10
|
path: string;
|
|
11
11
|
prompt: string;
|
|
12
12
|
reasoningEffort: ReasoningEffort;
|
|
@@ -35,7 +35,10 @@ export type MediaAnalysisApi = {
|
|
|
35
35
|
uploadUrl: string;
|
|
36
36
|
}>;
|
|
37
37
|
getUploadedParts(input: FileRequest): Promise<UploadedPart[] | null | undefined>;
|
|
38
|
-
inspectVideo(input:
|
|
38
|
+
inspectVideo(input: MediaRequest): Promise<{
|
|
39
|
+
analysis: string;
|
|
40
|
+
}>;
|
|
41
|
+
inspectAudio(input: MediaRequest): Promise<{
|
|
39
42
|
analysis: string;
|
|
40
43
|
}>;
|
|
41
44
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { AssistantContext } from "./types.js";
|
|
2
|
-
export declare const assistantKnowledge = "\nOmniclip is a browser video editor.\n\nTimeline model:\n- A Stack plays its children at the same time on separate rows.\n- A Sequence plays its children one after another.\n- Drag clips to rearrange them. Hold Control while dragging to move their container.\n- Double-click a Stack or Sequence to view its contents. Use the breadcrumb above the timeline to leave it.\n- Right-click a clip to wrap it in a Stack or Sequence.\n- Select a clip before editing it in the inspector.\n\nMain areas:\n- Media imports and browses project media.\n- Text adds titles and captions.\n- Transitions are placed between compatible clips in a Sequence.\n- The inspector edits the selected item's transform, crop, effects, text, and keyframes when supported.\n- The Audio panel controls master gain and mute.\n- Export renders and saves the current project.\n- Settings in the top bar edits project resolution, aspect ratio, frame rate, timecode, color space and audio settings. Current values are in context.settings. Use update_settings to change them; supply both resolution and a matching aspectRatio when changing canvas format. This does not resize or reposition clips. Settings changes are saved separately from timeline undo history.\n- Shortcuts in the top bar lists available keyboard controls.\n\
|
|
2
|
+
export declare const assistantKnowledge = "\nOmniclip is a browser video editor.\n\nTimeline model:\n- A Stack plays its children at the same time on separate rows.\n- A Sequence plays its children one after another.\n- Drag clips to rearrange them. Hold Control while dragging to move their container.\n- Double-click a Stack or Sequence to view its contents. Use the breadcrumb above the timeline to leave it.\n- Right-click a clip to wrap it in a Stack or Sequence.\n- Select a clip before editing it in the inspector.\n\nMain areas:\n- Media imports and browses project media.\n- Text adds titles and captions.\n- Transitions are placed between compatible clips in a Sequence.\n- The inspector edits the selected item's transform, crop, effects, text, and keyframes when supported.\n- The Audio panel controls master gain and mute.\n- Export renders and saves the current project.\n- Settings in the top bar edits project resolution, aspect ratio, frame rate, timecode, color space and audio settings. Current values are in context.settings. Use update_settings to change them; supply both resolution and a matching aspectRatio when changing canvas format. This does not resize or reposition clips. Settings changes are saved separately from timeline undo history.\n- Shortcuts in the top bar lists available keyboard controls.\n\nMedia understanding:\n- When source video content determines an answer or edit, call provide_selected_video, then inspect_video for every returned part in order with its path and a focused question. Video inspection includes sound.\n- For an audio-only source, use provide_selected_audio, then inspect_audio for every returned part in order. Use this for speech, music, and sound effects; do not infer audible content from filenames or tags.\n- For questions about the whole edit, use inspect_timeline. It inspects both video and audio sources.\n- These tools analyze original sources, without timeline trims, effects, captions, gain, or the final mix. Part start/end offsets are seconds; map part-local timestamps through those offsets and the current timeline's millisecond trim ranges.\n\nGive short, concrete instructions using the names shown in the interface. Use the current project context when relevant. If the answer is not in this manual, context, or an available skill, say that you are not sure. Only edit the project when the user asks for a change, and only claim success after a tool confirms it.";
|
|
3
3
|
export declare const assistantInstructions: (context: AssistantContext, skills: string) => string;
|
package/x/assistant/knowledge.js
CHANGED
|
@@ -19,11 +19,17 @@ Main areas:
|
|
|
19
19
|
- Settings in the top bar edits project resolution, aspect ratio, frame rate, timecode, color space and audio settings. Current values are in context.settings. Use update_settings to change them; supply both resolution and a matching aspectRatio when changing canvas format. This does not resize or reposition clips. Settings changes are saved separately from timeline undo history.
|
|
20
20
|
- Shortcuts in the top bar lists available keyboard controls.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Media understanding:
|
|
23
|
+
- When source video content determines an answer or edit, call provide_selected_video, then inspect_video for every returned part in order with its path and a focused question. Video inspection includes sound.
|
|
24
|
+
- For an audio-only source, use provide_selected_audio, then inspect_audio for every returned part in order. Use this for speech, music, and sound effects; do not infer audible content from filenames or tags.
|
|
25
|
+
- For questions about the whole edit, use inspect_timeline. It inspects both video and audio sources.
|
|
26
|
+
- These tools analyze original sources, without timeline trims, effects, captions, gain, or the final mix. Part start/end offsets are seconds; map part-local timestamps through those offsets and the current timeline's millisecond trim ranges.
|
|
27
|
+
|
|
28
|
+
Give short, concrete instructions using the names shown in the interface. Use the current project context when relevant. If the answer is not in this manual, context, or an available skill, say that you are not sure. Only edit the project when the user asks for a change, and only claim success after a tool confirms it.`;
|
|
23
29
|
export const assistantInstructions = (context, skills) => `${assistantKnowledge}
|
|
24
30
|
${skills}
|
|
25
31
|
|
|
26
|
-
Fresh project context is supplied with every request, including after tool calls. Use it as authoritative over earlier messages and inspection results. After a revision mismatch, rebuild the patch using its timeline and timelineRevision; never guess or increment a revision.
|
|
32
|
+
Fresh project context is supplied with every request, including after tool calls. Use it as authoritative over earlier messages and inspection results. After a revision mismatch, rebuild the patch using its timeline and timelineRevision; never guess or increment a revision. Media inspection describes original source content, not the current edit. Map source timestamps to the clip ranges in the latest timeline, and only claim an edit succeeded when its editing tool confirms success.
|
|
27
33
|
|
|
28
34
|
Current project context:
|
|
29
35
|
${JSON.stringify(context)}`;
|
package/x/mcp/protocol.d.ts
CHANGED
|
@@ -2,7 +2,24 @@ import type { AssistantContext, MediaInfo } from "../assistant/types.js";
|
|
|
2
2
|
import type { TimelinePatch, TimelinePatchResult } from "../timeline.js";
|
|
3
3
|
import type { ProjectSettingsUpdate } from "../settings.js";
|
|
4
4
|
export declare const bridgePort = 3789;
|
|
5
|
+
export type AudioAnalyzeRequest = {
|
|
6
|
+
itemId: string;
|
|
7
|
+
prompt: string;
|
|
8
|
+
start?: number;
|
|
9
|
+
end?: number;
|
|
10
|
+
};
|
|
11
|
+
export type AudioAnalysis = {
|
|
12
|
+
itemId: string;
|
|
13
|
+
mediaHash: string;
|
|
14
|
+
timingUnit: "seconds";
|
|
15
|
+
analyses: {
|
|
16
|
+
start: number;
|
|
17
|
+
end: number;
|
|
18
|
+
analysis: string;
|
|
19
|
+
}[];
|
|
20
|
+
};
|
|
5
21
|
export type EditorRpc = {
|
|
22
|
+
audio_analyze: (args: AudioAnalyzeRequest, id: string) => Promise<AudioAnalysis>;
|
|
6
23
|
cancel: (id: string) => Promise<void>;
|
|
7
24
|
create_item: () => Promise<{
|
|
8
25
|
id: string;
|