@datalayer/agent-runtimes 1.3.15 → 1.3.17
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/README.md +1 -1
- package/lib/chat/base/ChatBase.js +3 -2
- package/lib/config/AgentConfiguration.d.ts +1 -1
- package/lib/loop/apps/AppRenderer.d.ts +24 -0
- package/lib/loop/apps/AppRenderer.js +101 -0
- package/lib/loop/apps/appspec.d.ts +69 -0
- package/lib/loop/apps/appspec.js +566 -0
- package/lib/loop/apps/checks.d.ts +21 -0
- package/lib/loop/apps/checks.js +556 -0
- package/lib/loop/apps/index.d.ts +10 -0
- package/lib/loop/apps/index.js +14 -0
- package/lib/loop/apps/rules.d.ts +64 -0
- package/lib/loop/apps/rules.js +289 -0
- package/lib/loop/apps/yaml.d.ts +17 -0
- package/lib/loop/apps/yaml.js +185 -0
- package/lib/loop/embed/LoopEmbed.d.ts +6 -1
- package/lib/loop/embed/LoopEmbed.js +3 -2
- package/lib/loop/index.d.ts +1 -0
- package/lib/loop/index.js +3 -0
- package/lib/loop/plugins/chat/ChatView.js +9 -4
- package/lib/loop/plugins/chat/index.d.ts +10 -0
- package/lib/loop/plugins/chat/index.js +1 -0
- package/lib/loop/presets.d.ts +6 -0
- package/lib/loop/presets.js +2 -1
- package/lib/loop/shell/LoopWorkspace.d.ts +14 -0
- package/lib/loop/shell/LoopWorkspace.js +20 -6
- package/lib/loop/shell/index.d.ts +1 -1
- package/lib/loop/shell/index.js +1 -1
- package/lib/loop/shell/useWorkspaceFullScreen.d.ts +17 -4
- package/lib/loop/shell/useWorkspaceFullScreen.js +23 -6
- package/lib/specs/actions.d.ts +30 -0
- package/lib/specs/actions.js +616 -0
- package/lib/specs/agents/agents.d.ts +1 -0
- package/lib/specs/agents/agents.js +338 -284
- package/lib/specs/apps.d.ts +25 -0
- package/lib/specs/apps.js +1064 -0
- package/lib/specs/cogs.d.ts +19 -0
- package/lib/specs/cogs.js +736 -0
- package/lib/specs/events.d.ts +6 -1
- package/lib/specs/events.js +144 -1
- package/lib/specs/frames.d.ts +19 -0
- package/lib/specs/frames.js +444 -0
- package/lib/specs/gates.d.ts +22 -0
- package/lib/specs/gates.js +177 -0
- package/lib/specs/guards.d.ts +26 -0
- package/lib/specs/guards.js +930 -0
- package/lib/specs/index.d.ts +10 -0
- package/lib/specs/index.js +10 -0
- package/lib/specs/mcpServers.js +2 -2
- package/lib/specs/memory.js +4 -0
- package/lib/specs/modelProviders.d.ts +22 -0
- package/lib/specs/modelProviders.js +102 -0
- package/lib/specs/models.d.ts +31 -0
- package/lib/specs/models.js +215 -0
- package/lib/specs/ops.d.ts +15 -0
- package/lib/specs/ops.js +1272 -0
- package/lib/specs/outputs.js +2 -2
- package/lib/specs/skills.js +1 -1
- package/lib/specs/teams/teams.js +18 -18
- package/lib/specs/tracks.d.ts +15 -0
- package/lib/specs/tracks.js +87 -0
- package/lib/specs/uiPlugins.d.ts +16 -0
- package/lib/specs/uiPlugins.js +40 -0
- package/lib/types/agentspecs.d.ts +453 -2
- package/lib/types/memory.d.ts +2 -0
- package/lib/types/models.d.ts +52 -0
- package/package.json +2 -1
- package/scripts/check-cloudflare-models.py +122 -0
- package/scripts/codegen/agentspecs_clone.py +53 -0
- package/scripts/codegen/compose.py +65 -0
- package/scripts/codegen/generate_agents.py +14 -4
- package/scripts/codegen/generate_apps.py +454 -0
- package/scripts/codegen/generate_cogs.py +308 -0
- package/scripts/codegen/generate_frames.py +278 -0
- package/scripts/codegen/generate_memory.py +2 -0
- package/scripts/codegen/generate_model_providers.py +246 -0
- package/scripts/codegen/generate_models.py +135 -4
- package/scripts/codegen/generate_ops.py +388 -0
- package/scripts/codegen/generate_sandbox_agents.py +1 -1
- package/scripts/codegen/generate_ui_plugins.py +226 -0
- package/scripts/gen_workers.py +2 -2
package/lib/specs/events.d.ts
CHANGED
|
@@ -7,13 +7,18 @@
|
|
|
7
7
|
* DO NOT EDIT MANUALLY - run 'make specs' to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
import type { EventSpec } from '../types';
|
|
10
|
+
export declare const AGENT_ASSIGNED_EVENT_SPEC_0_0_1: EventSpec;
|
|
10
11
|
export declare const AGENT_ENDED_EVENT_SPEC_0_0_1: EventSpec;
|
|
12
|
+
export declare const AGENT_OUTPUT_EVENT_SPEC_0_0_1: EventSpec;
|
|
11
13
|
export declare const AGENT_STARTED_EVENT_SPEC_0_0_1: EventSpec;
|
|
14
|
+
export declare const GENERIC_EVENT_SPEC_0_0_1: EventSpec;
|
|
12
15
|
export declare const TOOL_APPROVAL_REQUESTED_EVENT_SPEC_0_0_1: EventSpec;
|
|
16
|
+
export declare const EVENT_KIND_AGENT_ASSIGNED = "agent-assigned";
|
|
13
17
|
export declare const EVENT_KIND_AGENT_ENDED = "agent-ended";
|
|
18
|
+
export declare const EVENT_KIND_AGENT_OUTPUT = "agent-output";
|
|
14
19
|
export declare const EVENT_KIND_AGENT_STARTED = "agent-started";
|
|
20
|
+
export declare const EVENT_KIND_GENERIC = "generic";
|
|
15
21
|
export declare const EVENT_KIND_TOOL_APPROVAL_REQUESTED = "tool-approval-requested";
|
|
16
|
-
export declare const EVENT_KIND_AGENT_ASSIGNED = "agent-assigned";
|
|
17
22
|
export declare const EVENT_CATALOG: Record<string, EventSpec>;
|
|
18
23
|
export declare function getEventSpecs(): EventSpec[];
|
|
19
24
|
export declare function getEventSpec(eventId: string): EventSpec | undefined;
|
package/lib/specs/events.js
CHANGED
|
@@ -5,6 +5,64 @@
|
|
|
5
5
|
// ============================================================================
|
|
6
6
|
// Event Definitions
|
|
7
7
|
// ============================================================================
|
|
8
|
+
export const AGENT_ASSIGNED_EVENT_SPEC_0_0_1 = {
|
|
9
|
+
id: 'agent-assigned',
|
|
10
|
+
version: '0.0.1',
|
|
11
|
+
name: 'Agent Assigned',
|
|
12
|
+
description: 'Emitted when a running runtime is given its agent: the agent is created in the runtime, its MCP servers started and its environment set.',
|
|
13
|
+
kind: 'agent-assigned',
|
|
14
|
+
fields: [
|
|
15
|
+
{
|
|
16
|
+
name: 'agent_runtime_id',
|
|
17
|
+
label: 'Agent Runtime ID',
|
|
18
|
+
type: 'string',
|
|
19
|
+
required: true,
|
|
20
|
+
description: 'Runtime pod or instance identifier.',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'agent_name',
|
|
24
|
+
label: 'Agent Name',
|
|
25
|
+
type: 'string',
|
|
26
|
+
required: true,
|
|
27
|
+
description: 'Name of the agent assigned to the runtime.',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'assignment_source',
|
|
31
|
+
label: 'Assignment Source',
|
|
32
|
+
type: 'string',
|
|
33
|
+
required: true,
|
|
34
|
+
description: 'What assigned the agent (e.g. the launch request, the pool).',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'assigned_at',
|
|
38
|
+
label: 'Assigned At',
|
|
39
|
+
type: 'string',
|
|
40
|
+
required: true,
|
|
41
|
+
description: 'ISO 8601 timestamp when the agent was assigned.',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'sandbox_variant',
|
|
45
|
+
label: 'Sandbox Variant',
|
|
46
|
+
type: 'string',
|
|
47
|
+
required: false,
|
|
48
|
+
description: 'The sandbox the agent executes code in.',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'mcp_proxy_url',
|
|
52
|
+
label: 'MCP Proxy URL',
|
|
53
|
+
type: 'string',
|
|
54
|
+
required: false,
|
|
55
|
+
description: 'Address of the MCP proxy the agent reaches its tools through.',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'env_vars_set',
|
|
59
|
+
label: 'Env Vars Set',
|
|
60
|
+
type: 'number',
|
|
61
|
+
required: false,
|
|
62
|
+
description: 'How many environment variables were set for the agent.',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
};
|
|
8
66
|
export const AGENT_ENDED_EVENT_SPEC_0_0_1 = {
|
|
9
67
|
id: 'agent-ended',
|
|
10
68
|
version: '0.0.1',
|
|
@@ -70,6 +128,78 @@ export const AGENT_ENDED_EVENT_SPEC_0_0_1 = {
|
|
|
70
128
|
},
|
|
71
129
|
],
|
|
72
130
|
};
|
|
131
|
+
export const AGENT_OUTPUT_EVENT_SPEC_0_0_1 = {
|
|
132
|
+
id: 'agent-output',
|
|
133
|
+
version: '0.0.1',
|
|
134
|
+
name: 'Agent Output',
|
|
135
|
+
description: "Emitted when an agent run produces its output: a triggered run that finished (with its timing and exit status) or a chat turn that completed. The event's status is the run's exit status.",
|
|
136
|
+
kind: 'agent-output',
|
|
137
|
+
fields: [
|
|
138
|
+
{
|
|
139
|
+
name: 'outputs',
|
|
140
|
+
label: 'Outputs',
|
|
141
|
+
type: 'string',
|
|
142
|
+
required: false,
|
|
143
|
+
description: 'The text the agent produced, or a summary of the artifacts it generated.',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: 'exit_status',
|
|
147
|
+
label: 'Exit Status',
|
|
148
|
+
type: 'string',
|
|
149
|
+
required: true,
|
|
150
|
+
description: 'Final status of the run (e.g. completed, error).',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: 'duration_ms',
|
|
154
|
+
label: 'Duration (ms)',
|
|
155
|
+
type: 'number',
|
|
156
|
+
required: true,
|
|
157
|
+
description: 'Execution time of the run or the turn, in milliseconds.',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: 'agent_runtime_id',
|
|
161
|
+
label: 'Agent Runtime ID',
|
|
162
|
+
type: 'string',
|
|
163
|
+
required: false,
|
|
164
|
+
description: 'Runtime pod or instance identifier; set by a triggered run.',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: 'agent_spec_id',
|
|
168
|
+
label: 'Agent Spec ID',
|
|
169
|
+
type: 'string',
|
|
170
|
+
required: false,
|
|
171
|
+
description: 'Identifier of the agent specification that ran; set by a triggered run.',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: 'agent_id',
|
|
175
|
+
label: 'Agent ID',
|
|
176
|
+
type: 'string',
|
|
177
|
+
required: false,
|
|
178
|
+
description: 'Identifier of the agent in the runtime; set by a chat turn.',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: 'started_at',
|
|
182
|
+
label: 'Started At',
|
|
183
|
+
type: 'string',
|
|
184
|
+
required: false,
|
|
185
|
+
description: 'ISO 8601 timestamp when the run started; set by a triggered run.',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: 'ended_at',
|
|
189
|
+
label: 'Ended At',
|
|
190
|
+
type: 'string',
|
|
191
|
+
required: false,
|
|
192
|
+
description: 'ISO 8601 timestamp when the run ended; set by a triggered run.',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: 'error_message',
|
|
196
|
+
label: 'Error Message',
|
|
197
|
+
type: 'string',
|
|
198
|
+
required: false,
|
|
199
|
+
description: 'Error description if the run failed.',
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
};
|
|
73
203
|
export const AGENT_STARTED_EVENT_SPEC_0_0_1 = {
|
|
74
204
|
id: 'agent-started',
|
|
75
205
|
version: '0.0.1',
|
|
@@ -114,6 +244,14 @@ export const AGENT_STARTED_EVENT_SPEC_0_0_1 = {
|
|
|
114
244
|
},
|
|
115
245
|
],
|
|
116
246
|
};
|
|
247
|
+
export const GENERIC_EVENT_SPEC_0_0_1 = {
|
|
248
|
+
id: 'generic',
|
|
249
|
+
version: '0.0.1',
|
|
250
|
+
name: 'Generic',
|
|
251
|
+
description: 'An event with no kind of its own: what the events client and the CLI create when none is named. It carries a title and a status, and no typed payload.',
|
|
252
|
+
kind: 'generic',
|
|
253
|
+
fields: [],
|
|
254
|
+
};
|
|
117
255
|
export const TOOL_APPROVAL_REQUESTED_EVENT_SPEC_0_0_1 = {
|
|
118
256
|
id: 'tool-approval-requested',
|
|
119
257
|
version: '0.0.1',
|
|
@@ -152,16 +290,21 @@ export const TOOL_APPROVAL_REQUESTED_EVENT_SPEC_0_0_1 = {
|
|
|
152
290
|
],
|
|
153
291
|
};
|
|
154
292
|
// Event kind constants for programmatic use
|
|
293
|
+
export const EVENT_KIND_AGENT_ASSIGNED = 'agent-assigned';
|
|
155
294
|
export const EVENT_KIND_AGENT_ENDED = 'agent-ended';
|
|
295
|
+
export const EVENT_KIND_AGENT_OUTPUT = 'agent-output';
|
|
156
296
|
export const EVENT_KIND_AGENT_STARTED = 'agent-started';
|
|
297
|
+
export const EVENT_KIND_GENERIC = 'generic';
|
|
157
298
|
export const EVENT_KIND_TOOL_APPROVAL_REQUESTED = 'tool-approval-requested';
|
|
158
|
-
export const EVENT_KIND_AGENT_ASSIGNED = 'agent-assigned';
|
|
159
299
|
// ============================================================================
|
|
160
300
|
// Event Catalog
|
|
161
301
|
// ============================================================================
|
|
162
302
|
export const EVENT_CATALOG = {
|
|
303
|
+
'agent-assigned': AGENT_ASSIGNED_EVENT_SPEC_0_0_1,
|
|
163
304
|
'agent-ended': AGENT_ENDED_EVENT_SPEC_0_0_1,
|
|
305
|
+
'agent-output': AGENT_OUTPUT_EVENT_SPEC_0_0_1,
|
|
164
306
|
'agent-started': AGENT_STARTED_EVENT_SPEC_0_0_1,
|
|
307
|
+
generic: GENERIC_EVENT_SPEC_0_0_1,
|
|
165
308
|
'tool-approval-requested': TOOL_APPROVAL_REQUESTED_EVENT_SPEC_0_0_1,
|
|
166
309
|
};
|
|
167
310
|
export function getEventSpecs() {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frame Catalog.
|
|
3
|
+
*
|
|
4
|
+
* The context work happens in, written down: owned, scoped and inherited.
|
|
5
|
+
* Every Frame is resolved — what it inherits is already in it.
|
|
6
|
+
*
|
|
7
|
+
* This file is AUTO-GENERATED from YAML specifications.
|
|
8
|
+
* DO NOT EDIT MANUALLY - run 'make specs' to regenerate.
|
|
9
|
+
*/
|
|
10
|
+
import type { FrameSpec } from '../types/agentspecs';
|
|
11
|
+
export declare const BOARD_REPORTING_FRAME_0_0_1: FrameSpec;
|
|
12
|
+
export declare const CUSTOMER_RESEARCH_FRAME_0_0_1: FrameSpec;
|
|
13
|
+
export declare const DATALAYER_FRAME_0_0_1: FrameSpec;
|
|
14
|
+
export declare const SALES_PIPELINE_FRAME_0_0_1: FrameSpec;
|
|
15
|
+
export declare const WEB_RESEARCH_FRAME_0_0_1: FrameSpec;
|
|
16
|
+
export declare const FRAME_CATALOGUE: Record<string, FrameSpec>;
|
|
17
|
+
/** The Frame a Cog names, by `id` or `id:version`, or undefined. */
|
|
18
|
+
export declare function getFrame(frameId: string): FrameSpec | undefined;
|
|
19
|
+
export declare function listFrames(): FrameSpec[];
|
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
export const BOARD_REPORTING_FRAME_0_0_1 = {
|
|
6
|
+
id: 'board-reporting',
|
|
7
|
+
version: '0.0.1',
|
|
8
|
+
name: 'Board Reporting Frame',
|
|
9
|
+
description: 'The voice, the structure and the standard of evidence of a document written for the board of directors. Composes with the Frame of the subject reported on.',
|
|
10
|
+
scope: 'relationship',
|
|
11
|
+
owner: 'Datalayer Finance <info@datalayer.io>',
|
|
12
|
+
extends: 'datalayer:0.0.1',
|
|
13
|
+
lineage: ['datalayer'],
|
|
14
|
+
tags: ['board', 'reporting', 'executive'],
|
|
15
|
+
enabled: true,
|
|
16
|
+
icon: 'project-roadmap',
|
|
17
|
+
emoji: '🏛️',
|
|
18
|
+
rules: [
|
|
19
|
+
'Never claim a capability, a tool or a result you have not verified.',
|
|
20
|
+
'Never put a secret, a credential or a token in an output.',
|
|
21
|
+
'Say what you did not do and what you could not check, as plainly as what you did.',
|
|
22
|
+
'Keep personal data out of an output unless the task is about that person and they are its audience.',
|
|
23
|
+
'State a risk as plainly as a result; never soften a miss.',
|
|
24
|
+
'Present a forecast as a forecast, with the assumption it rests on.',
|
|
25
|
+
'Keep individual employees and named customers out of the report unless the board asked for them.',
|
|
26
|
+
],
|
|
27
|
+
terminology: {
|
|
28
|
+
Agentspec: 'The declarative YAML specification of an agent.',
|
|
29
|
+
Frame: 'The context work happens in, written down, owned, versioned and inherited.',
|
|
30
|
+
Cog: 'An AI worker you can hold to account — an agent equipped with Frames.',
|
|
31
|
+
Guard: 'A check the output of a piece of work has to pass.',
|
|
32
|
+
Sandbox: 'The isolated environment an agent runs code in, beside the data.',
|
|
33
|
+
},
|
|
34
|
+
goals: [
|
|
35
|
+
'The reader can act on the output without asking what it means.',
|
|
36
|
+
'Every number can be traced to the code and the source it came from.',
|
|
37
|
+
'A director who reads only the first page knows the state, the risks and the decision asked for.',
|
|
38
|
+
],
|
|
39
|
+
style: [
|
|
40
|
+
'Plain, direct sentences; the conclusion first.',
|
|
41
|
+
'Name things by what they are; no marketing adjectives.',
|
|
42
|
+
'Structured output — headings, short lists, tables for figures — over long prose.',
|
|
43
|
+
'One page of summary first — the state, three to five key figures, the risks, the asks.',
|
|
44
|
+
'Figures in tables, with the period and the comparison beside each.',
|
|
45
|
+
'No jargon a director outside the function would not know; define a term at its first use.',
|
|
46
|
+
'Neutral and factual; no superlatives.',
|
|
47
|
+
],
|
|
48
|
+
norms: [
|
|
49
|
+
'Run the analysis in the sandbox and report the result, not the raw data.',
|
|
50
|
+
'Cite the source of every factual claim.',
|
|
51
|
+
'Prefer the smallest change, and the simplest explanation, that is correct.',
|
|
52
|
+
'Round to what the decision needs, and keep the units and the currency on every figure.',
|
|
53
|
+
'Compare each key figure with the target and with the previous period.',
|
|
54
|
+
'End with what is asked of the board, or say that nothing is.',
|
|
55
|
+
],
|
|
56
|
+
process: [],
|
|
57
|
+
architecture: '',
|
|
58
|
+
prompts: [],
|
|
59
|
+
skills: [],
|
|
60
|
+
tools: [],
|
|
61
|
+
mcpServers: [],
|
|
62
|
+
guards: [
|
|
63
|
+
{
|
|
64
|
+
id: 'no-secrets',
|
|
65
|
+
category: 'policy-safety',
|
|
66
|
+
description: 'The output contains no credential, token, API key or password.',
|
|
67
|
+
required: true,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'summary-first',
|
|
71
|
+
category: 'algorithmic',
|
|
72
|
+
description: 'The report opens with a summary of at most one page, with the key figures, the risks and the asks.',
|
|
73
|
+
required: true,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: 'forecast-labelled',
|
|
77
|
+
category: 'policy-safety',
|
|
78
|
+
description: 'Every forward-looking figure is labelled as a forecast and carries its assumption.',
|
|
79
|
+
required: true,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: 'finance-review',
|
|
83
|
+
category: 'expert',
|
|
84
|
+
description: 'A person from Finance reviews the figures before the report is sent to the board.',
|
|
85
|
+
required: true,
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
};
|
|
89
|
+
export const CUSTOMER_RESEARCH_FRAME_0_0_1 = {
|
|
90
|
+
id: 'customer-research',
|
|
91
|
+
version: '0.0.1',
|
|
92
|
+
name: 'Customer Research Frame',
|
|
93
|
+
description: 'The ethics, the method and the vocabulary of qualitative customer research: how an interview is conducted, what consent covers, and how what was said becomes insight without being bent.',
|
|
94
|
+
scope: 'team',
|
|
95
|
+
owner: 'Datalayer Product Research <info@datalayer.io>',
|
|
96
|
+
extends: 'datalayer:0.0.1',
|
|
97
|
+
lineage: ['datalayer'],
|
|
98
|
+
tags: ['research', 'customer', 'interview'],
|
|
99
|
+
enabled: true,
|
|
100
|
+
icon: 'comment-discussion',
|
|
101
|
+
emoji: '🎙️',
|
|
102
|
+
rules: [
|
|
103
|
+
'Never claim a capability, a tool or a result you have not verified.',
|
|
104
|
+
'Never put a secret, a credential or a token in an output.',
|
|
105
|
+
'Say what you did not do and what you could not check, as plainly as what you did.',
|
|
106
|
+
'Keep personal data out of an output unless the task is about that person and they are its audience.',
|
|
107
|
+
'Tell the interviewee at the start what the interview is for and how what they say will be used.',
|
|
108
|
+
"Never ask a leading question, and never put words in the interviewee's mouth.",
|
|
109
|
+
'Stop, or move on, when the interviewee declines to answer.',
|
|
110
|
+
'Report a quote verbatim, and never attribute one to a named person without their consent.',
|
|
111
|
+
'Keep personal data — names, employers, contact details — out of the insights unless consent covers it.',
|
|
112
|
+
],
|
|
113
|
+
terminology: {
|
|
114
|
+
Agentspec: 'The declarative YAML specification of an agent.',
|
|
115
|
+
Frame: 'The context work happens in, written down, owned, versioned and inherited.',
|
|
116
|
+
Cog: 'An AI worker you can hold to account — an agent equipped with Frames.',
|
|
117
|
+
Guard: 'A check the output of a piece of work has to pass.',
|
|
118
|
+
Sandbox: 'The isolated environment an agent runs code in, beside the data.',
|
|
119
|
+
Insight: 'A pattern in what interviewees said that explains a behavior or a decision, with its evidence.',
|
|
120
|
+
Motivation: 'Why the interviewee does what they do; what an answer is probed for.',
|
|
121
|
+
'Decision driver': 'A criterion the interviewee weighed when choosing.',
|
|
122
|
+
Objection: 'A reason the interviewee gave against choosing, or for hesitating.',
|
|
123
|
+
Verbatim: "The interviewee's own words, quoted exactly.",
|
|
124
|
+
},
|
|
125
|
+
goals: [
|
|
126
|
+
'The reader can act on the output without asking what it means.',
|
|
127
|
+
'Every number can be traced to the code and the source it came from.',
|
|
128
|
+
'Understand the why behind each answer, not only the what.',
|
|
129
|
+
'Every insight can be traced to what an interviewee actually said.',
|
|
130
|
+
],
|
|
131
|
+
style: [
|
|
132
|
+
'Plain, direct sentences; the conclusion first.',
|
|
133
|
+
'Name things by what they are; no marketing adjectives.',
|
|
134
|
+
'Structured output — headings, short lists, tables for figures — over long prose.',
|
|
135
|
+
'Warm, brief and neutral with the interviewee; one question at a time.',
|
|
136
|
+
'Insights as short statements, each with the verbatims that support it.',
|
|
137
|
+
],
|
|
138
|
+
norms: [
|
|
139
|
+
'Run the analysis in the sandbox and report the result, not the raw data.',
|
|
140
|
+
'Cite the source of every factual claim.',
|
|
141
|
+
'Prefer the smallest change, and the simplest explanation, that is correct.',
|
|
142
|
+
'Open-ended questions first; follow up on what was just said.',
|
|
143
|
+
'Separate what was said from what is inferred, and mark the inference.',
|
|
144
|
+
'Note what the interview did not cover.',
|
|
145
|
+
],
|
|
146
|
+
process: [
|
|
147
|
+
'Introduce the interview, its purpose and how the answers are used; ask for consent.',
|
|
148
|
+
'Open with one broad question; follow each answer with a question on its why.',
|
|
149
|
+
'Close when the planned ground is covered or the interviewee wants to stop.',
|
|
150
|
+
'Turn the conversation into insights — motivations, decision drivers, objections, verbatims, next steps.',
|
|
151
|
+
],
|
|
152
|
+
architecture: '',
|
|
153
|
+
prompts: [],
|
|
154
|
+
skills: ['text-summarizer:0.0.1'],
|
|
155
|
+
tools: [],
|
|
156
|
+
mcpServers: [],
|
|
157
|
+
guards: [
|
|
158
|
+
{
|
|
159
|
+
id: 'no-secrets',
|
|
160
|
+
category: 'policy-safety',
|
|
161
|
+
description: 'The output contains no credential, token, API key or password.',
|
|
162
|
+
required: true,
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
id: 'no-leading-questions',
|
|
166
|
+
category: 'policy-safety',
|
|
167
|
+
description: 'No question in the interview suggests its own answer.',
|
|
168
|
+
required: true,
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
id: 'insights-grounded',
|
|
172
|
+
category: 'source-grounding',
|
|
173
|
+
description: 'Every insight cites at least one verbatim from the interview that supports it.',
|
|
174
|
+
required: true,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
id: 'personal-data-removed',
|
|
178
|
+
category: 'policy-safety',
|
|
179
|
+
description: 'The insights name no person, employer or contact detail that consent does not cover.',
|
|
180
|
+
required: true,
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
};
|
|
184
|
+
export const DATALAYER_FRAME_0_0_1 = {
|
|
185
|
+
id: 'datalayer',
|
|
186
|
+
version: '0.0.1',
|
|
187
|
+
name: 'Datalayer Company Frame',
|
|
188
|
+
description: 'The vocabulary, the voice and the working rules of Datalayer. The root of the catalogue: department, team, role and relationship Frames extend it.',
|
|
189
|
+
scope: 'organization',
|
|
190
|
+
owner: 'Datalayer, Inc. <info@datalayer.io>',
|
|
191
|
+
lineage: [],
|
|
192
|
+
tags: ['company', 'baseline'],
|
|
193
|
+
enabled: true,
|
|
194
|
+
icon: 'organization',
|
|
195
|
+
emoji: '🏢',
|
|
196
|
+
rules: [
|
|
197
|
+
'Never claim a capability, a tool or a result you have not verified.',
|
|
198
|
+
'Never put a secret, a credential or a token in an output.',
|
|
199
|
+
'Say what you did not do and what you could not check, as plainly as what you did.',
|
|
200
|
+
'Keep personal data out of an output unless the task is about that person and they are its audience.',
|
|
201
|
+
],
|
|
202
|
+
terminology: {
|
|
203
|
+
Agentspec: 'The declarative YAML specification of an agent.',
|
|
204
|
+
Frame: 'The context work happens in, written down, owned, versioned and inherited.',
|
|
205
|
+
Cog: 'An AI worker you can hold to account — an agent equipped with Frames.',
|
|
206
|
+
Guard: 'A check the output of a piece of work has to pass.',
|
|
207
|
+
Sandbox: 'The isolated environment an agent runs code in, beside the data.',
|
|
208
|
+
},
|
|
209
|
+
goals: [
|
|
210
|
+
'The reader can act on the output without asking what it means.',
|
|
211
|
+
'Every number can be traced to the code and the source it came from.',
|
|
212
|
+
],
|
|
213
|
+
style: [
|
|
214
|
+
'Plain, direct sentences; the conclusion first.',
|
|
215
|
+
'Name things by what they are; no marketing adjectives.',
|
|
216
|
+
'Structured output — headings, short lists, tables for figures — over long prose.',
|
|
217
|
+
],
|
|
218
|
+
norms: [
|
|
219
|
+
'Run the analysis in the sandbox and report the result, not the raw data.',
|
|
220
|
+
'Cite the source of every factual claim.',
|
|
221
|
+
'Prefer the smallest change, and the simplest explanation, that is correct.',
|
|
222
|
+
],
|
|
223
|
+
process: [],
|
|
224
|
+
architecture: '',
|
|
225
|
+
prompts: [],
|
|
226
|
+
skills: [],
|
|
227
|
+
tools: [],
|
|
228
|
+
mcpServers: [],
|
|
229
|
+
guards: [
|
|
230
|
+
{
|
|
231
|
+
id: 'no-secrets',
|
|
232
|
+
category: 'policy-safety',
|
|
233
|
+
description: 'The output contains no credential, token, API key or password.',
|
|
234
|
+
required: true,
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
};
|
|
238
|
+
export const SALES_PIPELINE_FRAME_0_0_1 = {
|
|
239
|
+
id: 'sales-pipeline',
|
|
240
|
+
version: '0.0.1',
|
|
241
|
+
name: 'Sales Pipeline Frame',
|
|
242
|
+
description: 'How the sales organization names, measures and reports its pipeline: the stages, the definitions of conversion and weighted forecast, and the checks a pipeline figure has to pass.',
|
|
243
|
+
scope: 'department',
|
|
244
|
+
owner: 'Datalayer Sales <info@datalayer.io>',
|
|
245
|
+
extends: 'datalayer:0.0.1',
|
|
246
|
+
lineage: ['datalayer'],
|
|
247
|
+
tags: ['sales', 'pipeline', 'forecast'],
|
|
248
|
+
enabled: true,
|
|
249
|
+
icon: 'graph',
|
|
250
|
+
emoji: '📈',
|
|
251
|
+
rules: [
|
|
252
|
+
'Never claim a capability, a tool or a result you have not verified.',
|
|
253
|
+
'Never put a secret, a credential or a token in an output.',
|
|
254
|
+
'Say what you did not do and what you could not check, as plainly as what you did.',
|
|
255
|
+
'Keep personal data out of an output unless the task is about that person and they are its audience.',
|
|
256
|
+
'Compute every figure from the pipeline data in the sandbox; never estimate one.',
|
|
257
|
+
'Never change, drop or impute a deal to make totals agree; report the discrepancy.',
|
|
258
|
+
'Name a customer or a deal owner only when the audience of the report is internal.',
|
|
259
|
+
],
|
|
260
|
+
terminology: {
|
|
261
|
+
Agentspec: 'The declarative YAML specification of an agent.',
|
|
262
|
+
Frame: 'The context work happens in, written down, owned, versioned and inherited.',
|
|
263
|
+
Cog: 'An AI worker you can hold to account — an agent equipped with Frames.',
|
|
264
|
+
Guard: 'A check the output of a piece of work has to pass.',
|
|
265
|
+
Sandbox: 'The isolated environment an agent runs code in, beside the data.',
|
|
266
|
+
Pipeline: 'The open opportunities, each at a stage, with an amount and an expected close date.',
|
|
267
|
+
Stage: 'Where an opportunity stands, from first qualification to closed won or closed lost.',
|
|
268
|
+
'Stage conversion': 'The share of opportunities that entered a stage and moved on to the next.',
|
|
269
|
+
'Weighted pipeline': "The sum of each open opportunity's amount multiplied by its stage's probability of closing.",
|
|
270
|
+
Coverage: 'Weighted or total open pipeline divided by the target of the period.',
|
|
271
|
+
Slippage: 'Opportunities whose expected close date moved out of the period.',
|
|
272
|
+
},
|
|
273
|
+
goals: [
|
|
274
|
+
'The reader can act on the output without asking what it means.',
|
|
275
|
+
'Every number can be traced to the code and the source it came from.',
|
|
276
|
+
'Stage health and the risk to the forecast are visible at a glance.',
|
|
277
|
+
'A figure in the report is the same figure whoever computes it.',
|
|
278
|
+
],
|
|
279
|
+
style: [
|
|
280
|
+
'Plain, direct sentences; the conclusion first.',
|
|
281
|
+
'Name things by what they are; no marketing adjectives.',
|
|
282
|
+
'Structured output — headings, short lists, tables for figures — over long prose.',
|
|
283
|
+
],
|
|
284
|
+
norms: [
|
|
285
|
+
'Run the analysis in the sandbox and report the result, not the raw data.',
|
|
286
|
+
'Cite the source of every factual claim.',
|
|
287
|
+
'Prefer the smallest change, and the simplest explanation, that is correct.',
|
|
288
|
+
'State the period, the currency and the date of the data on every report.',
|
|
289
|
+
'Give a rate with its numerator and its denominator.',
|
|
290
|
+
'Break a total down by region and by segment when the data carries them.',
|
|
291
|
+
],
|
|
292
|
+
process: [
|
|
293
|
+
'Load the pipeline data and check it — stages known, amounts positive, dates valid, no duplicate opportunity.',
|
|
294
|
+
'Compute the totals by stage, the stage conversions and the weighted pipeline.',
|
|
295
|
+
'Compare with the target and with the previous period, where the data has them.',
|
|
296
|
+
'Identify the risks — stalled stages, slippage, concentration on a few deals.',
|
|
297
|
+
],
|
|
298
|
+
architecture: '',
|
|
299
|
+
prompts: [],
|
|
300
|
+
skills: ['events:0.0.1'],
|
|
301
|
+
tools: [],
|
|
302
|
+
mcpServers: [],
|
|
303
|
+
guards: [
|
|
304
|
+
{
|
|
305
|
+
id: 'no-secrets',
|
|
306
|
+
category: 'policy-safety',
|
|
307
|
+
description: 'The output contains no credential, token, API key or password.',
|
|
308
|
+
required: true,
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
id: 'totals-reconcile',
|
|
312
|
+
category: 'algorithmic',
|
|
313
|
+
description: 'The totals by stage, by region and by segment each add up to the total pipeline.',
|
|
314
|
+
required: true,
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
id: 'definitions-applied',
|
|
318
|
+
category: 'policy-safety',
|
|
319
|
+
description: 'Conversion, weighted pipeline and coverage are computed as this Frame defines them.',
|
|
320
|
+
required: true,
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
id: 'data-quality-reported',
|
|
324
|
+
category: 'algorithmic',
|
|
325
|
+
description: 'Rows excluded from a figure, and why, are counted and reported.',
|
|
326
|
+
required: true,
|
|
327
|
+
},
|
|
328
|
+
],
|
|
329
|
+
};
|
|
330
|
+
export const WEB_RESEARCH_FRAME_0_0_1 = {
|
|
331
|
+
id: 'web-research',
|
|
332
|
+
version: '0.0.1',
|
|
333
|
+
name: 'Web Research Frame',
|
|
334
|
+
description: 'The methodology of research on the open web and on public repositories: which sources count, how recent they have to be, how they are cited, and what a finding has to pass before it is reported.',
|
|
335
|
+
scope: 'role',
|
|
336
|
+
owner: 'Datalayer Research <info@datalayer.io>',
|
|
337
|
+
extends: 'datalayer:0.0.1',
|
|
338
|
+
lineage: ['datalayer'],
|
|
339
|
+
tags: ['research', 'web', 'sources'],
|
|
340
|
+
enabled: true,
|
|
341
|
+
icon: 'globe',
|
|
342
|
+
emoji: '🌐',
|
|
343
|
+
rules: [
|
|
344
|
+
'Never claim a capability, a tool or a result you have not verified.',
|
|
345
|
+
'Never put a secret, a credential or a token in an output.',
|
|
346
|
+
'Say what you did not do and what you could not check, as plainly as what you did.',
|
|
347
|
+
'Keep personal data out of an output unless the task is about that person and they are its audience.',
|
|
348
|
+
'Report a claim only with the address of the page or the repository it was read on.',
|
|
349
|
+
'Never present a search-result snippet as the content of the page; open the page.',
|
|
350
|
+
"Respect a site's terms and its robots policy; do not go around a paywall or a login.",
|
|
351
|
+
'Say when sources disagree, and report both sides rather than choosing silently.',
|
|
352
|
+
],
|
|
353
|
+
terminology: {
|
|
354
|
+
Agentspec: 'The declarative YAML specification of an agent.',
|
|
355
|
+
Frame: 'The context work happens in, written down, owned, versioned and inherited.',
|
|
356
|
+
Cog: 'An AI worker you can hold to account — an agent equipped with Frames.',
|
|
357
|
+
Guard: 'A check the output of a piece of work has to pass.',
|
|
358
|
+
Sandbox: 'The isolated environment an agent runs code in, beside the data.',
|
|
359
|
+
'Primary source': "The party a fact originates from — the vendor's own page, the repository itself, the paper.",
|
|
360
|
+
'Secondary source': 'A party reporting a primary source — a news article, a blog post, an aggregator.',
|
|
361
|
+
'Recency window': 'How old a source may be for the question asked; twelve months unless the task says otherwise.',
|
|
362
|
+
},
|
|
363
|
+
goals: [
|
|
364
|
+
'The reader can act on the output without asking what it means.',
|
|
365
|
+
'Every number can be traced to the code and the source it came from.',
|
|
366
|
+
'Each finding rests on at least one primary source.',
|
|
367
|
+
'The reader can open every source and find the claim there.',
|
|
368
|
+
],
|
|
369
|
+
style: [
|
|
370
|
+
'Plain, direct sentences; the conclusion first.',
|
|
371
|
+
'Name things by what they are; no marketing adjectives.',
|
|
372
|
+
'Structured output — headings, short lists, tables for figures — over long prose.',
|
|
373
|
+
'A short summary first, then findings, each with its sources as links.',
|
|
374
|
+
'Give the date of a source beside it when recency matters.',
|
|
375
|
+
],
|
|
376
|
+
norms: [
|
|
377
|
+
'Run the analysis in the sandbox and report the result, not the raw data.',
|
|
378
|
+
'Cite the source of every factual claim.',
|
|
379
|
+
'Prefer the smallest change, and the simplest explanation, that is correct.',
|
|
380
|
+
'Prefer a primary source to a secondary one, and say which a claim rests on.',
|
|
381
|
+
'Search more than one way before concluding that something does not exist.',
|
|
382
|
+
'Note the date the research was done.',
|
|
383
|
+
],
|
|
384
|
+
process: [
|
|
385
|
+
'Restate the question and what would count as an answer.',
|
|
386
|
+
'Search, then open and read the most relevant pages and repositories.',
|
|
387
|
+
'Extract the claims, each with its source and its date.',
|
|
388
|
+
'Cross-check each important claim against a second, independent source.',
|
|
389
|
+
'Summarize, with sources cited and disagreements said.',
|
|
390
|
+
],
|
|
391
|
+
architecture: '',
|
|
392
|
+
prompts: [],
|
|
393
|
+
skills: ['crawl:0.0.1', 'github:0.0.1'],
|
|
394
|
+
tools: [],
|
|
395
|
+
mcpServers: ['tavily:0.0.1'],
|
|
396
|
+
guards: [
|
|
397
|
+
{
|
|
398
|
+
id: 'no-secrets',
|
|
399
|
+
category: 'policy-safety',
|
|
400
|
+
description: 'The output contains no credential, token, API key or password.',
|
|
401
|
+
required: true,
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
id: 'sources-cited',
|
|
405
|
+
category: 'source-grounding',
|
|
406
|
+
description: 'Every factual claim in the output carries a link to the page or repository it was read on.',
|
|
407
|
+
required: true,
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
id: 'source-supports-claim',
|
|
411
|
+
category: 'source-grounding',
|
|
412
|
+
description: 'Each cited page was opened, and what it says supports the claim made from it.',
|
|
413
|
+
required: true,
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
id: 'recency-stated',
|
|
417
|
+
category: 'algorithmic',
|
|
418
|
+
description: 'Every source older than the recency window is marked with its date.',
|
|
419
|
+
required: false,
|
|
420
|
+
},
|
|
421
|
+
],
|
|
422
|
+
};
|
|
423
|
+
export const FRAME_CATALOGUE = {
|
|
424
|
+
'board-reporting': BOARD_REPORTING_FRAME_0_0_1,
|
|
425
|
+
'customer-research': CUSTOMER_RESEARCH_FRAME_0_0_1,
|
|
426
|
+
datalayer: DATALAYER_FRAME_0_0_1,
|
|
427
|
+
'sales-pipeline': SALES_PIPELINE_FRAME_0_0_1,
|
|
428
|
+
'web-research': WEB_RESEARCH_FRAME_0_0_1,
|
|
429
|
+
};
|
|
430
|
+
/** The Frame a Cog names, by `id` or `id:version`, or undefined. */
|
|
431
|
+
export function getFrame(frameId) {
|
|
432
|
+
// Own entries only: `constructor` and `toString` are not Frames.
|
|
433
|
+
const own = (id) => Object.prototype.hasOwnProperty.call(FRAME_CATALOGUE, id)
|
|
434
|
+
? FRAME_CATALOGUE[id]
|
|
435
|
+
: undefined;
|
|
436
|
+
const at = frameId.lastIndexOf(':');
|
|
437
|
+
return (own(frameId) ??
|
|
438
|
+
(at > 0 && frameId.slice(at + 1).includes('.')
|
|
439
|
+
? own(frameId.slice(0, at))
|
|
440
|
+
: undefined));
|
|
441
|
+
}
|
|
442
|
+
export function listFrames() {
|
|
443
|
+
return Object.values(FRAME_CATALOGUE);
|
|
444
|
+
}
|