@norskvideo/norsk-studio-alpha 1.27.0-2026-01-26-4bc5078b → 1.27.0-2026-01-31-e37a5429
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/client/info.js +1626 -1313
- package/client/style.css +6 -598
- package/lib/info.js +6 -4
- package/lib/info.js.map +1 -1
- package/lib/processor.objectDetect/_gen/schema.d.ts +12 -0
- package/lib/processor.objectDetect/_gen/schema.js +16 -0
- package/lib/processor.objectDetect/_gen/schema.js.map +1 -0
- package/lib/processor.objectDetect/_gen/types.d.ts +49 -0
- package/lib/processor.objectDetect/_gen/types.js.map +1 -0
- package/lib/processor.objectDetect/_gen/zod.js +60 -0
- package/lib/processor.objectDetect/_gen/zod.js.map +1 -0
- package/lib/processor.objectDetect/info.d.ts +27 -0
- package/lib/processor.objectDetect/info.js +63 -0
- package/lib/processor.objectDetect/info.js.map +1 -0
- package/lib/processor.objectDetect/inline-view.d.ts +6 -0
- package/lib/processor.objectDetect/inline-view.js +41 -0
- package/lib/processor.objectDetect/inline-view.js.map +1 -0
- package/lib/processor.objectDetect/runtime.d.ts +28 -0
- package/lib/processor.objectDetect/runtime.js +112 -0
- package/lib/processor.objectDetect/runtime.js.map +1 -0
- package/lib/processor.objectDetect/types.yaml +78 -0
- package/lib/test/output.tams.js.map +1 -1
- package/lib/util.claudeAgent/_gen/schema.d.ts +17 -0
- package/lib/util.claudeAgent/_gen/schema.js +21 -0
- package/lib/util.claudeAgent/_gen/schema.js.map +1 -0
- package/lib/util.claudeAgent/_gen/types.d.ts +370 -0
- package/lib/util.claudeAgent/_gen/types.js.map +1 -0
- package/lib/util.claudeAgent/_gen/zod.js +147 -0
- package/lib/util.claudeAgent/_gen/zod.js.map +1 -0
- package/lib/util.claudeAgent/info.d.ts +63 -0
- package/lib/util.claudeAgent/info.js +131 -0
- package/lib/util.claudeAgent/info.js.map +1 -0
- package/lib/util.claudeAgent/runtime.d.ts +105 -0
- package/lib/util.claudeAgent/runtime.js +567 -0
- package/lib/util.claudeAgent/runtime.js.map +1 -0
- package/lib/util.claudeAgent/types.yaml +393 -0
- package/lib/util.geminiAgent/_gen/schema.d.ts +17 -0
- package/lib/util.geminiAgent/_gen/schema.js +21 -0
- package/lib/util.geminiAgent/_gen/schema.js.map +1 -0
- package/lib/util.geminiAgent/_gen/types.d.ts +370 -0
- package/lib/util.geminiAgent/_gen/types.js.map +1 -0
- package/lib/util.geminiAgent/_gen/zod.d.ts +2 -0
- package/lib/util.geminiAgent/_gen/zod.js +147 -0
- package/lib/util.geminiAgent/_gen/zod.js.map +1 -0
- package/lib/util.geminiAgent/info.d.ts +63 -0
- package/lib/util.geminiAgent/info.js +131 -0
- package/lib/util.geminiAgent/info.js.map +1 -0
- package/lib/util.geminiAgent/runtime.d.ts +107 -0
- package/lib/util.geminiAgent/runtime.js +621 -0
- package/lib/util.geminiAgent/runtime.js.map +1 -0
- package/lib/util.geminiAgent/types.yaml +392 -0
- package/package.json +24 -5
- package/client/util.aiChat/styles.css +0 -371
- package/lib/util.agent/_gen/schema.d.ts +0 -13
- package/lib/util.agent/_gen/schema.js +0 -17
- package/lib/util.agent/_gen/schema.js.map +0 -1
- package/lib/util.agent/_gen/types.d.ts +0 -343
- package/lib/util.agent/_gen/types.js.map +0 -1
- package/lib/util.agent/_gen/zod.js +0 -206
- package/lib/util.agent/_gen/zod.js.map +0 -1
- package/lib/util.agent/fullscreen-view.d.ts +0 -4
- package/lib/util.agent/fullscreen-view.js +0 -142
- package/lib/util.agent/fullscreen-view.js.map +0 -1
- package/lib/util.agent/info.d.ts +0 -126
- package/lib/util.agent/info.js +0 -141
- package/lib/util.agent/info.js.map +0 -1
- package/lib/util.agent/inline-view.d.ts +0 -6
- package/lib/util.agent/inline-view.js +0 -43
- package/lib/util.agent/inline-view.js.map +0 -1
- package/lib/util.agent/runtime.d.ts +0 -180
- package/lib/util.agent/runtime.js +0 -1254
- package/lib/util.agent/runtime.js.map +0 -1
- package/lib/util.agent/summary-view.d.ts +0 -4
- package/lib/util.agent/summary-view.js +0 -68
- package/lib/util.agent/summary-view.js.map +0 -1
- package/lib/util.agent/types.d.ts +0 -285
- package/lib/util.agent/types.js.map +0 -1
- package/lib/util.agent/types.yaml +0 -440
- package/lib/util.aiChat/_gen/schema.d.ts +0 -12
- package/lib/util.aiChat/_gen/schema.js +0 -16
- package/lib/util.aiChat/_gen/schema.js.map +0 -1
- package/lib/util.aiChat/_gen/types.d.ts +0 -98
- package/lib/util.aiChat/_gen/types.js.map +0 -1
- package/lib/util.aiChat/_gen/zod.js +0 -132
- package/lib/util.aiChat/_gen/zod.js.map +0 -1
- package/lib/util.aiChat/info.d.ts +0 -70
- package/lib/util.aiChat/info.js +0 -92
- package/lib/util.aiChat/info.js.map +0 -1
- package/lib/util.aiChat/runtime.d.ts +0 -32
- package/lib/util.aiChat/runtime.js +0 -304
- package/lib/util.aiChat/runtime.js.map +0 -1
- package/lib/util.aiChat/summary-view.d.ts +0 -7
- package/lib/util.aiChat/summary-view.js +0 -48
- package/lib/util.aiChat/summary-view.js.map +0 -1
- package/lib/util.aiChat/types.d.ts +0 -62
- package/lib/util.aiChat/types.js +0 -3
- package/lib/util.aiChat/types.js.map +0 -1
- package/lib/util.aiChat/types.yaml +0 -148
- /package/lib/{util.agent → processor.objectDetect}/_gen/types.js +0 -0
- /package/lib/{util.agent → processor.objectDetect}/_gen/zod.d.ts +0 -0
- /package/lib/{util.agent → util.claudeAgent/_gen}/types.js +0 -0
- /package/lib/{util.aiChat → util.claudeAgent}/_gen/zod.d.ts +0 -0
- /package/lib/{util.aiChat → util.geminiAgent}/_gen/types.js +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
4
|
+
const agent_1 = require("@norskvideo/norsk-studio-built-ins/lib/shared/agent");
|
|
5
|
+
function default_1({ defineComponent, validation: { Z }, }) {
|
|
6
|
+
return defineComponent({
|
|
7
|
+
identifier: 'util.claudeAgent',
|
|
8
|
+
category: 'processor',
|
|
9
|
+
name: "Claude Agent",
|
|
10
|
+
description: "An autonomous agent powered by Anthropic Claude that can react to events from other components, execute commands, set timers, and maintain working memory. Uses the Anthropic SDK with a manual agentic loop.",
|
|
11
|
+
subscription: {},
|
|
12
|
+
display: (_desc) => { return {}; },
|
|
13
|
+
runtime: {
|
|
14
|
+
initialState: () => ({
|
|
15
|
+
status: 'idle',
|
|
16
|
+
currentTask: undefined,
|
|
17
|
+
activeTimerCount: 0,
|
|
18
|
+
activeSubscriptionCount: 0,
|
|
19
|
+
invocationCount: 0,
|
|
20
|
+
lastActivity: undefined,
|
|
21
|
+
errorMessage: undefined
|
|
22
|
+
}),
|
|
23
|
+
handleEvent(ev, state) {
|
|
24
|
+
const evType = ev.type;
|
|
25
|
+
switch (evType) {
|
|
26
|
+
case 'agent_invoked':
|
|
27
|
+
state.status = 'thinking';
|
|
28
|
+
state.currentTask = ev.prompt;
|
|
29
|
+
break;
|
|
30
|
+
case 'agent_completed':
|
|
31
|
+
state.status = 'idle';
|
|
32
|
+
state.currentTask = undefined;
|
|
33
|
+
state.invocationCount = (state.invocationCount || 0) + 1;
|
|
34
|
+
state.lastActivity = new Date().toISOString();
|
|
35
|
+
break;
|
|
36
|
+
case 'timer_set':
|
|
37
|
+
state.activeTimerCount = (state.activeTimerCount || 0) + 1;
|
|
38
|
+
break;
|
|
39
|
+
case 'timer_cancelled':
|
|
40
|
+
case 'timer_fired':
|
|
41
|
+
state.activeTimerCount = Math.max(0, (state.activeTimerCount || 0) - 1);
|
|
42
|
+
break;
|
|
43
|
+
case 'subscription_added':
|
|
44
|
+
state.activeSubscriptionCount = (state.activeSubscriptionCount || 0) + 1;
|
|
45
|
+
break;
|
|
46
|
+
case 'subscription_removed':
|
|
47
|
+
state.activeSubscriptionCount = Math.max(0, (state.activeSubscriptionCount || 0) - 1);
|
|
48
|
+
break;
|
|
49
|
+
case 'error_occurred':
|
|
50
|
+
state.status = 'error';
|
|
51
|
+
state.errorMessage = ev.error;
|
|
52
|
+
break;
|
|
53
|
+
default:
|
|
54
|
+
assertUnreachable(evType);
|
|
55
|
+
}
|
|
56
|
+
return { ...state };
|
|
57
|
+
},
|
|
58
|
+
summary: agent_1.AgentSummaryView,
|
|
59
|
+
fullscreen: (props) => (0, agent_1.AgentFullscreenView)({ ...props, agentName: "Claude Agent" }),
|
|
60
|
+
},
|
|
61
|
+
configForm: {
|
|
62
|
+
form: {
|
|
63
|
+
mission: {
|
|
64
|
+
help: "The agent's ongoing task/goal for this workflow - what should it accomplish?",
|
|
65
|
+
hint: {
|
|
66
|
+
type: 'text',
|
|
67
|
+
validation: Z.string().min(10).max(2000),
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
systemPrompt: {
|
|
71
|
+
help: "Base instruction defining the agent's capabilities and how it should behave",
|
|
72
|
+
hint: {
|
|
73
|
+
type: 'text',
|
|
74
|
+
validation: Z.string().min(10).max(4000),
|
|
75
|
+
defaultValue: `You are an autonomous agent monitoring a video processing workflow.
|
|
76
|
+
|
|
77
|
+
You have tools to:
|
|
78
|
+
- Inspect the current workflow and discover component ids/purpose
|
|
79
|
+
- Set timers for periodic checks or delayed actions
|
|
80
|
+
- Subscribe to events from other components
|
|
81
|
+
- Execute commands on components
|
|
82
|
+
- Store information in working memory
|
|
83
|
+
|
|
84
|
+
When you receive events or timer notifications, evaluate them against your mission and take appropriate action.`
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
model: {
|
|
88
|
+
help: "Claude model to use",
|
|
89
|
+
hint: {
|
|
90
|
+
type: 'select',
|
|
91
|
+
options: [
|
|
92
|
+
{ value: 'claude-sonnet-4-20250514', display: 'Claude Sonnet 4 (recommended)' },
|
|
93
|
+
{ value: 'claude-3-5-haiku-20241022', display: 'Claude 3.5 Haiku (fast)' },
|
|
94
|
+
{ value: 'claude-3-5-sonnet-20241022', display: 'Claude 3.5 Sonnet' },
|
|
95
|
+
],
|
|
96
|
+
defaultValue: 'claude-sonnet-4-20250514'
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
initialPrompt: {
|
|
100
|
+
help: "Optional message to send when the agent starts (after mission is set)",
|
|
101
|
+
hint: {
|
|
102
|
+
type: 'text',
|
|
103
|
+
optional: true,
|
|
104
|
+
validation: Z.string().max(2000),
|
|
105
|
+
defaultValue: 'Use the tools provided to discover component ids, and set up events and timers as necessary to complete the user mission'
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
maxStepsPerInvocation: {
|
|
109
|
+
help: "Maximum tool calls per agent invocation (default: 20)",
|
|
110
|
+
advanced: true,
|
|
111
|
+
hint: {
|
|
112
|
+
type: 'numeric',
|
|
113
|
+
validation: Z.number().min(1).max(100),
|
|
114
|
+
defaultValue: 20
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
notes: {
|
|
118
|
+
help: "Notes about this agent",
|
|
119
|
+
hint: {
|
|
120
|
+
type: 'text',
|
|
121
|
+
optional: true
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function assertUnreachable(_) {
|
|
129
|
+
throw new Error("Didn't expect to get here");
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../../src/util.claudeAgent/info.ts"],"names":[],"mappings":";;AAIA,4BA+HC;AAjID,+EAA4G;AAE5G,mBAAwB,EACtB,eAAe,EACf,UAAU,EAAE,EAAE,CAAC,EAAE,GACJ;IAEb,OAAO,eAAe,CAA4E;QAChG,UAAU,EAAE,kBAAkB;QAC9B,QAAQ,EAAE,WAAW;QACrB,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,+MAA+M;QAC5N,YAAY,EAAE,EACb;QACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,G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EAAE,0BAA0B,EAAE,OAAO,EAAE,+BAA+B,EAAE;4BAC/E,EAAE,KAAK,EAAE,2BAA2B,EAAE,OAAO,EAAE,yBAAyB,EAAE;4BAC1E,EAAE,KAAK,EAAE,4BAA4B,EAAE,OAAO,EAAE,mBAAmB,EAAE;yBACtE;wBACD,YAAY,EAAE,0BAA0B;qBACzC;iBACF;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,uEAAuE;oBAC7E,IAAI,EAAE;wBACJ,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,IAAI;wBACd,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC;wBAChC,YAAY,EAAE,0HAA0H;qBACzI;iBACF;gBACD,qBAAqB,EAAE;oBACrB,IAAI,EAAE,uDAAuD;oBAC7D,QAAQ,EAAE,IAAI;oBACd,IAAI,EAAE;wBACJ,IAAI,EAAE,SAAS;wBACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;wBACtC,YAAY,EAAE,EAAE;qBACjB;iBACF;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,wBAAwB;oBAC9B,IAAI,EAAE;wBACJ,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,IAAI;qBACf;iBACF;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAS,iBAAiB,CAAC,CAAQ;IACjC,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { Norsk } from '@norskvideo/norsk-sdk';
|
|
2
|
+
import { CreatedMediaNode, InstanceRouteArgs, OnCreated, RelatedMediaNodes, ServerComponentDefinition, ServerComponentSchemas, StudioRuntime } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
|
|
3
|
+
import { InvocationTracker, TimerManager, MemoryManager, EventSubscriptionManager, TriggerContext } from '@norskvideo/norsk-studio-built-ins/lib/shared/agent';
|
|
4
|
+
import { components } from './_gen/types';
|
|
5
|
+
export type ClaudeAgentConfig = components['schemas']['ClaudeAgentConfig'];
|
|
6
|
+
export type ClaudeAgentState = components['schemas']['State'];
|
|
7
|
+
export type ClaudeAgentCommand = components['schemas']['Commands'];
|
|
8
|
+
export type ClaudeAgentEvent = components['schemas']['Events'];
|
|
9
|
+
export default class ClaudeAgentDefinition implements ServerComponentDefinition<ClaudeAgentConfig, ClaudeAgentNode, ClaudeAgentState, ClaudeAgentCommand, ClaudeAgentEvent> {
|
|
10
|
+
schemas(): Promise<ServerComponentSchemas>;
|
|
11
|
+
create(norsk: Norsk, cfg: ClaudeAgentConfig, cb: OnCreated<ClaudeAgentNode>, runtime: StudioRuntime<ClaudeAgentState, ClaudeAgentCommand, ClaudeAgentEvent>): Promise<void>;
|
|
12
|
+
handleCommand(node: ClaudeAgentNode, command: ClaudeAgentCommand): void;
|
|
13
|
+
instanceRoutes(): Promise<import("@norskvideo/norsk-studio/lib/extension/runtime-types").RouteInfo<InstanceRouteArgs<{
|
|
14
|
+
id: string;
|
|
15
|
+
displayName: string;
|
|
16
|
+
model?: string;
|
|
17
|
+
systemPrompt: string;
|
|
18
|
+
mission: string;
|
|
19
|
+
initialPrompt?: string;
|
|
20
|
+
maxStepsPerInvocation?: number;
|
|
21
|
+
notes?: string;
|
|
22
|
+
}, ClaudeAgentNode, {
|
|
23
|
+
status?: "idle" | "thinking" | "error";
|
|
24
|
+
currentTask?: string;
|
|
25
|
+
activeTimerCount?: number;
|
|
26
|
+
activeSubscriptionCount?: number;
|
|
27
|
+
invocationCount?: number;
|
|
28
|
+
lastActivity?: string;
|
|
29
|
+
errorMessage?: string;
|
|
30
|
+
}, {
|
|
31
|
+
type: "send_prompt";
|
|
32
|
+
prompt: string;
|
|
33
|
+
} | {
|
|
34
|
+
type: "cancel_current";
|
|
35
|
+
} | {
|
|
36
|
+
type: "clear_memory";
|
|
37
|
+
} | {
|
|
38
|
+
type: "clear_timers";
|
|
39
|
+
} | {
|
|
40
|
+
type: "clear_subscriptions";
|
|
41
|
+
}, {
|
|
42
|
+
type: "agent_invoked";
|
|
43
|
+
trigger: string;
|
|
44
|
+
prompt: string;
|
|
45
|
+
} | {
|
|
46
|
+
type: "agent_completed";
|
|
47
|
+
invocationId: string;
|
|
48
|
+
result: string;
|
|
49
|
+
toolsUsed?: string[];
|
|
50
|
+
durationMs?: number;
|
|
51
|
+
} | {
|
|
52
|
+
type: "timer_set";
|
|
53
|
+
timerId: string;
|
|
54
|
+
delayMs: number;
|
|
55
|
+
reason: string;
|
|
56
|
+
intervalMs?: number;
|
|
57
|
+
} | {
|
|
58
|
+
type: "timer_cancelled";
|
|
59
|
+
timerId: string;
|
|
60
|
+
} | {
|
|
61
|
+
type: "timer_fired";
|
|
62
|
+
timerId: string;
|
|
63
|
+
reason: string;
|
|
64
|
+
} | {
|
|
65
|
+
type: "subscription_added";
|
|
66
|
+
subscriptionId: string;
|
|
67
|
+
componentId: string;
|
|
68
|
+
} | {
|
|
69
|
+
type: "subscription_removed";
|
|
70
|
+
subscriptionId: string;
|
|
71
|
+
} | {
|
|
72
|
+
type: "error_occurred";
|
|
73
|
+
error: string;
|
|
74
|
+
}>>[]>;
|
|
75
|
+
}
|
|
76
|
+
declare class ClaudeAgentNode implements CreatedMediaNode {
|
|
77
|
+
id: string;
|
|
78
|
+
relatedMediaNodes: RelatedMediaNodes;
|
|
79
|
+
norsk: Norsk;
|
|
80
|
+
cfg: ClaudeAgentConfig;
|
|
81
|
+
runtime: StudioRuntime<ClaudeAgentState, ClaudeAgentCommand, ClaudeAgentEvent>;
|
|
82
|
+
invocationTracker: InvocationTracker;
|
|
83
|
+
timerManager: TimerManager;
|
|
84
|
+
memoryManager: MemoryManager;
|
|
85
|
+
eventManager: EventSubscriptionManager;
|
|
86
|
+
private client?;
|
|
87
|
+
private conversationHistory;
|
|
88
|
+
private invocationLock;
|
|
89
|
+
private currentTriggerType;
|
|
90
|
+
private currentTriggerSource?;
|
|
91
|
+
private runtimeToolsAdded;
|
|
92
|
+
private cachedTools;
|
|
93
|
+
private constructor();
|
|
94
|
+
static create(norsk: Norsk, cfg: ClaudeAgentConfig, runtime: StudioRuntime<ClaudeAgentState, ClaudeAgentCommand, ClaudeAgentEvent>): Promise<ClaudeAgentNode>;
|
|
95
|
+
private initialise;
|
|
96
|
+
private waitForToolsAndStart;
|
|
97
|
+
private initializeClient;
|
|
98
|
+
private buildTools;
|
|
99
|
+
private executeAgentTool;
|
|
100
|
+
invokeAgent(message: string, trigger: TriggerContext): Promise<string>;
|
|
101
|
+
private sanitizeConversationHistory;
|
|
102
|
+
private getTimersForState;
|
|
103
|
+
handleCommand(command: ClaudeAgentCommand): void;
|
|
104
|
+
}
|
|
105
|
+
export {};
|