@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
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gate Catalog.
|
|
3
|
+
*
|
|
4
|
+
* Decision points: what happens on what the Guards found.
|
|
5
|
+
* Guards check; Gates decide.
|
|
6
|
+
*
|
|
7
|
+
* This file is AUTO-GENERATED from YAML specifications.
|
|
8
|
+
* DO NOT EDIT MANUALLY - run 'make specs' to regenerate.
|
|
9
|
+
*/
|
|
10
|
+
import type { GateSpec } from '../types/agentspecs';
|
|
11
|
+
export declare const CONFIGURATION_CHECK_GATE_0_0_1: GateSpec;
|
|
12
|
+
export declare const CONSENSUS_DISAGREEMENT_REVIEW_GATE_0_0_1: GateSpec;
|
|
13
|
+
export declare const LOW_CONFIDENCE_REVIEW_GATE_0_0_1: GateSpec;
|
|
14
|
+
export declare const QUALITY_DRIFT_REVIEW_GATE_0_0_1: GateSpec;
|
|
15
|
+
export declare const RELEASE_APPROVAL_GATE_0_0_1: GateSpec;
|
|
16
|
+
export declare const SENSITIVE_DATA_STOP_GATE_0_0_1: GateSpec;
|
|
17
|
+
export declare const TOOL_VIOLATION_RETRY_GATE_0_0_1: GateSpec;
|
|
18
|
+
export declare const UNSUPPORTED_CLAIMS_REVISION_GATE_0_0_1: GateSpec;
|
|
19
|
+
export declare const GATE_CATALOGUE: Record<string, GateSpec>;
|
|
20
|
+
/** A Gate, by `id` or `id:version`, or undefined. */
|
|
21
|
+
export declare function getGate(ref: string): GateSpec | undefined;
|
|
22
|
+
export declare function listGates(): GateSpec[];
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
export const CONFIGURATION_CHECK_GATE_0_0_1 = {
|
|
6
|
+
id: 'configuration-check',
|
|
7
|
+
version: '0.0.1',
|
|
8
|
+
name: 'Configuration Check',
|
|
9
|
+
description: 'Stops an Op before it starts when a Frame it requires is missing, a permission is not granted or a data source is not authorized.',
|
|
10
|
+
stage: 'preflight',
|
|
11
|
+
guards: [
|
|
12
|
+
'required-frame-guard:0.0.1',
|
|
13
|
+
'permission-guard:0.0.1',
|
|
14
|
+
'data-source-authorization-guard:0.0.1',
|
|
15
|
+
],
|
|
16
|
+
when: 'frames_missing or permission_denied or unauthorized_source',
|
|
17
|
+
then: 'stop_and_escalate',
|
|
18
|
+
otherwise: 'proceed',
|
|
19
|
+
reviewers: ['op-owner'],
|
|
20
|
+
maxRetries: 0,
|
|
21
|
+
enabled: true,
|
|
22
|
+
tags: ['preflight'],
|
|
23
|
+
icon: 'git-branch',
|
|
24
|
+
emoji: '🚦',
|
|
25
|
+
signals: ['frames_missing', 'permission_denied', 'unauthorized_source'],
|
|
26
|
+
};
|
|
27
|
+
export const CONSENSUS_DISAGREEMENT_REVIEW_GATE_0_0_1 = {
|
|
28
|
+
id: 'consensus-disagreement-review',
|
|
29
|
+
version: '0.0.1',
|
|
30
|
+
name: 'Consensus Disagreement Review',
|
|
31
|
+
description: 'Escalates to an expert when independent recomputations disagree on more than a quarter of the key figures.',
|
|
32
|
+
stage: 'post_run',
|
|
33
|
+
guards: ['consensus-guard:0.0.1'],
|
|
34
|
+
when: 'consensus_disagreement > 0.25',
|
|
35
|
+
then: 'expert_review_required',
|
|
36
|
+
otherwise: 'proceed',
|
|
37
|
+
reviewers: ['subject-matter-expert'],
|
|
38
|
+
maxRetries: 0,
|
|
39
|
+
enabled: true,
|
|
40
|
+
tags: ['consensus'],
|
|
41
|
+
icon: 'git-branch',
|
|
42
|
+
emoji: '🚦',
|
|
43
|
+
signals: ['consensus_disagreement'],
|
|
44
|
+
};
|
|
45
|
+
export const LOW_CONFIDENCE_REVIEW_GATE_0_0_1 = {
|
|
46
|
+
id: 'low-confidence-review',
|
|
47
|
+
version: '0.0.1',
|
|
48
|
+
name: 'Low Confidence Review',
|
|
49
|
+
description: 'Routes the output to human review when the lowest confidence a Cog reported is under 0.80. Low confidence is not a failure: it is where the autonomy granted to the Op ends.',
|
|
50
|
+
stage: 'post_run',
|
|
51
|
+
guards: ['confidence-guard:0.0.1'],
|
|
52
|
+
when: 'confidence < 0.80',
|
|
53
|
+
then: 'human_review_required',
|
|
54
|
+
otherwise: 'proceed',
|
|
55
|
+
reviewers: ['op-owner'],
|
|
56
|
+
maxRetries: 0,
|
|
57
|
+
enabled: true,
|
|
58
|
+
tags: ['confidence', 'human-in-the-loop'],
|
|
59
|
+
icon: 'git-branch',
|
|
60
|
+
emoji: '🚦',
|
|
61
|
+
signals: ['confidence'],
|
|
62
|
+
};
|
|
63
|
+
export const QUALITY_DRIFT_REVIEW_GATE_0_0_1 = {
|
|
64
|
+
id: 'quality-drift-review',
|
|
65
|
+
version: '0.0.1',
|
|
66
|
+
name: 'Quality Drift Review',
|
|
67
|
+
description: 'Puts the Op before an expert when more than one golden run in ten changed after an update, or when the Op missed its outcome goal over the review period.',
|
|
68
|
+
stage: 'continuous',
|
|
69
|
+
guards: ['regression-guard:0.0.1', 'outcome-guard:0.0.1'],
|
|
70
|
+
when: 'regression_rate > 0.10 or outcome_met == false',
|
|
71
|
+
then: 'expert_review_required',
|
|
72
|
+
otherwise: 'proceed',
|
|
73
|
+
reviewers: ['op-owner', 'subject-matter-expert'],
|
|
74
|
+
maxRetries: 0,
|
|
75
|
+
enabled: true,
|
|
76
|
+
tags: ['drift', 'outcome'],
|
|
77
|
+
icon: 'git-branch',
|
|
78
|
+
emoji: '🚦',
|
|
79
|
+
signals: ['regression_rate', 'outcome_met'],
|
|
80
|
+
};
|
|
81
|
+
export const RELEASE_APPROVAL_GATE_0_0_1 = {
|
|
82
|
+
id: 'release-approval',
|
|
83
|
+
version: '0.0.1',
|
|
84
|
+
name: 'Release Approval',
|
|
85
|
+
description: "Requires a person to approve the output before it is released to its audience, whatever the Guards found. The expert's review is recorded beside the approval.",
|
|
86
|
+
stage: 'post_run',
|
|
87
|
+
guards: ['expert-sampling-guard:0.0.1'],
|
|
88
|
+
when: 'always',
|
|
89
|
+
then: 'human_approval_required',
|
|
90
|
+
otherwise: 'stop',
|
|
91
|
+
reviewers: ['op-owner', 'finance'],
|
|
92
|
+
maxRetries: 0,
|
|
93
|
+
enabled: true,
|
|
94
|
+
tags: ['approval', 'human-in-the-loop'],
|
|
95
|
+
icon: 'git-branch',
|
|
96
|
+
emoji: '🚦',
|
|
97
|
+
signals: [],
|
|
98
|
+
};
|
|
99
|
+
export const SENSITIVE_DATA_STOP_GATE_0_0_1 = {
|
|
100
|
+
id: 'sensitive-data-stop',
|
|
101
|
+
version: '0.0.1',
|
|
102
|
+
name: 'Sensitive Data Stop',
|
|
103
|
+
description: 'Stops the Op and tells the data protection officer when sensitive data is detected in what a Cog is about to send out, or in the output.',
|
|
104
|
+
stage: 'in_flight',
|
|
105
|
+
guards: ['sensitive-data-guard:0.0.1'],
|
|
106
|
+
when: 'sensitive_data_detected',
|
|
107
|
+
then: 'stop_and_escalate',
|
|
108
|
+
otherwise: 'proceed',
|
|
109
|
+
reviewers: ['data-protection-officer'],
|
|
110
|
+
maxRetries: 0,
|
|
111
|
+
enabled: true,
|
|
112
|
+
tags: ['privacy'],
|
|
113
|
+
icon: 'git-branch',
|
|
114
|
+
emoji: '🚦',
|
|
115
|
+
signals: ['sensitive_data_detected'],
|
|
116
|
+
};
|
|
117
|
+
export const TOOL_VIOLATION_RETRY_GATE_0_0_1 = {
|
|
118
|
+
id: 'tool-violation-retry',
|
|
119
|
+
version: '0.0.1',
|
|
120
|
+
name: 'Tool Violation Retry',
|
|
121
|
+
description: 'Sends a step back to its Cog when it called a tool it does not declare or exceeded a tool limit; after the retries are used up the Op stops.',
|
|
122
|
+
stage: 'in_flight',
|
|
123
|
+
guards: ['tool-use-policy-guard:0.0.1'],
|
|
124
|
+
when: 'tool_violation',
|
|
125
|
+
then: 'retry',
|
|
126
|
+
otherwise: 'proceed',
|
|
127
|
+
reviewers: [],
|
|
128
|
+
maxRetries: 2,
|
|
129
|
+
enabled: true,
|
|
130
|
+
tags: ['tools'],
|
|
131
|
+
icon: 'git-branch',
|
|
132
|
+
emoji: '🚦',
|
|
133
|
+
signals: ['tool_violation'],
|
|
134
|
+
};
|
|
135
|
+
export const UNSUPPORTED_CLAIMS_REVISION_GATE_0_0_1 = {
|
|
136
|
+
id: 'unsupported-claims-revision',
|
|
137
|
+
version: '0.0.1',
|
|
138
|
+
name: 'Unsupported Claims Revision',
|
|
139
|
+
description: 'Pauses the Op and asks for a revision when the output is not valid against its schema or carries a claim or a figure its sources do not support.',
|
|
140
|
+
stage: 'post_run',
|
|
141
|
+
guards: ['schema-guard:0.0.1', 'source-grounding-guard:0.0.1'],
|
|
142
|
+
when: 'schema_valid == false or unsupported_claims > 0',
|
|
143
|
+
then: 'pause',
|
|
144
|
+
otherwise: 'proceed',
|
|
145
|
+
reviewers: [],
|
|
146
|
+
maxRetries: 0,
|
|
147
|
+
enabled: true,
|
|
148
|
+
tags: ['evidence'],
|
|
149
|
+
icon: 'git-branch',
|
|
150
|
+
emoji: '🚦',
|
|
151
|
+
signals: ['schema_valid', 'unsupported_claims'],
|
|
152
|
+
};
|
|
153
|
+
export const GATE_CATALOGUE = {
|
|
154
|
+
'configuration-check': CONFIGURATION_CHECK_GATE_0_0_1,
|
|
155
|
+
'consensus-disagreement-review': CONSENSUS_DISAGREEMENT_REVIEW_GATE_0_0_1,
|
|
156
|
+
'low-confidence-review': LOW_CONFIDENCE_REVIEW_GATE_0_0_1,
|
|
157
|
+
'quality-drift-review': QUALITY_DRIFT_REVIEW_GATE_0_0_1,
|
|
158
|
+
'release-approval': RELEASE_APPROVAL_GATE_0_0_1,
|
|
159
|
+
'sensitive-data-stop': SENSITIVE_DATA_STOP_GATE_0_0_1,
|
|
160
|
+
'tool-violation-retry': TOOL_VIOLATION_RETRY_GATE_0_0_1,
|
|
161
|
+
'unsupported-claims-revision': UNSUPPORTED_CLAIMS_REVISION_GATE_0_0_1,
|
|
162
|
+
};
|
|
163
|
+
/** A Gate, by `id` or `id:version`, or undefined. */
|
|
164
|
+
export function getGate(ref) {
|
|
165
|
+
// Own entries only: `constructor` and `toString` are not Gates.
|
|
166
|
+
const own = (id) => Object.prototype.hasOwnProperty.call(GATE_CATALOGUE, id)
|
|
167
|
+
? GATE_CATALOGUE[id]
|
|
168
|
+
: undefined;
|
|
169
|
+
const at = ref.lastIndexOf(':');
|
|
170
|
+
return (own(ref) ??
|
|
171
|
+
(at > 0 && ref.slice(at + 1).includes('.')
|
|
172
|
+
? own(ref.slice(0, at))
|
|
173
|
+
: undefined));
|
|
174
|
+
}
|
|
175
|
+
export function listGates() {
|
|
176
|
+
return Object.values(GATE_CATALOGUE);
|
|
177
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Guard Catalog.
|
|
3
|
+
*
|
|
4
|
+
* Reusable checks: a Guard extends a guardrail — the policy it verifies.
|
|
5
|
+
* Every Guard is resolved: it carries that guardrail's policy.
|
|
6
|
+
*
|
|
7
|
+
* This file is AUTO-GENERATED from YAML specifications.
|
|
8
|
+
* DO NOT EDIT MANUALLY - run 'make specs' to regenerate.
|
|
9
|
+
*/
|
|
10
|
+
import type { GuardSpec } from '../types/agentspecs';
|
|
11
|
+
export declare const CONFIDENCE_GUARD_0_0_1: GuardSpec;
|
|
12
|
+
export declare const CONSENSUS_GUARD_0_0_1: GuardSpec;
|
|
13
|
+
export declare const DATA_SOURCE_AUTHORIZATION_GUARD_0_0_1: GuardSpec;
|
|
14
|
+
export declare const EXPERT_SAMPLING_GUARD_0_0_1: GuardSpec;
|
|
15
|
+
export declare const OUTCOME_GUARD_0_0_1: GuardSpec;
|
|
16
|
+
export declare const PERMISSION_GUARD_0_0_1: GuardSpec;
|
|
17
|
+
export declare const REGRESSION_GUARD_0_0_1: GuardSpec;
|
|
18
|
+
export declare const REQUIRED_FRAME_GUARD_0_0_1: GuardSpec;
|
|
19
|
+
export declare const SCHEMA_GUARD_0_0_1: GuardSpec;
|
|
20
|
+
export declare const SENSITIVE_DATA_GUARD_0_0_1: GuardSpec;
|
|
21
|
+
export declare const SOURCE_GROUNDING_GUARD_0_0_1: GuardSpec;
|
|
22
|
+
export declare const TOOL_USE_POLICY_GUARD_0_0_1: GuardSpec;
|
|
23
|
+
export declare const GUARD_CATALOGUE: Record<string, GuardSpec>;
|
|
24
|
+
/** A Guard, by `id` or `id:version`, or undefined. */
|
|
25
|
+
export declare function getGuard(ref: string): GuardSpec | undefined;
|
|
26
|
+
export declare function listGuards(): GuardSpec[];
|