@cleocode/contracts 2026.6.11 → 2026.6.13
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/dist/__tests__/operation-def.test.js +2 -1
- package/dist/__tests__/operation-def.test.js.map +1 -1
- package/dist/__tests__/sealed-credential.test.d.ts +19 -0
- package/dist/__tests__/sealed-credential.test.d.ts.map +1 -0
- package/dist/__tests__/sealed-credential.test.js +74 -0
- package/dist/__tests__/sealed-credential.test.js.map +1 -0
- package/dist/__tests__/skill-executor-contract.test.js +3 -0
- package/dist/__tests__/skill-executor-contract.test.js.map +1 -1
- package/dist/acceptance-gate.d.ts +2 -3
- package/dist/acceptance-gate.d.ts.map +1 -1
- package/dist/boundary.d.ts.map +1 -1
- package/dist/boundary.js +1 -19
- package/dist/boundary.js.map +1 -1
- package/dist/config.d.ts +102 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/data-accessor.d.ts +21 -1
- package/dist/data-accessor.d.ts.map +1 -1
- package/dist/data-accessor.js.map +1 -1
- package/dist/dispatch/identity.d.ts +1 -1
- package/dist/dispatch/identity.d.ts.map +1 -1
- package/dist/dispatch/identity.js +5 -0
- package/dist/dispatch/identity.js.map +1 -1
- package/dist/dispatch/operations-registry.d.ts.map +1 -1
- package/dist/dispatch/operations-registry.js +46 -168
- package/dist/dispatch/operations-registry.js.map +1 -1
- package/dist/docs/read.d.ts +2 -2
- package/dist/index.d.ts +12 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/lease-ipc/__tests__/freeze.test.d.ts +15 -0
- package/dist/lease-ipc/__tests__/freeze.test.d.ts.map +1 -0
- package/dist/lease-ipc/__tests__/freeze.test.js +221 -0
- package/dist/lease-ipc/__tests__/freeze.test.js.map +1 -0
- package/dist/lease-ipc/index.d.ts +17 -0
- package/dist/lease-ipc/index.d.ts.map +1 -0
- package/dist/lease-ipc/index.js +16 -0
- package/dist/lease-ipc/index.js.map +1 -0
- package/dist/lease-ipc/messages.d.ts +754 -0
- package/dist/lease-ipc/messages.d.ts.map +1 -0
- package/dist/lease-ipc/messages.js +383 -0
- package/dist/lease-ipc/messages.js.map +1 -0
- package/dist/lease-ipc/version.d.ts +41 -0
- package/dist/lease-ipc/version.d.ts.map +1 -0
- package/dist/lease-ipc/version.js +43 -0
- package/dist/lease-ipc/version.js.map +1 -0
- package/dist/llm/interfaces.d.ts +23 -0
- package/dist/llm/interfaces.d.ts.map +1 -1
- package/dist/llm/sealed-credential.d.ts +164 -0
- package/dist/llm/sealed-credential.d.ts.map +1 -0
- package/dist/llm/sealed-credential.js +43 -0
- package/dist/llm/sealed-credential.js.map +1 -0
- package/dist/llm/system-of-use.d.ts +383 -0
- package/dist/llm/system-of-use.d.ts.map +1 -0
- package/dist/llm/system-of-use.js +238 -0
- package/dist/llm/system-of-use.js.map +1 -0
- package/dist/llm/system-resolver.d.ts +45 -11
- package/dist/llm/system-resolver.d.ts.map +1 -1
- package/dist/llm/system-resolver.js +14 -7
- package/dist/llm/system-resolver.js.map +1 -1
- package/dist/operations/__tests__/ensures-schema-registry.test.d.ts +17 -0
- package/dist/operations/__tests__/ensures-schema-registry.test.d.ts.map +1 -0
- package/dist/operations/__tests__/ensures-schema-registry.test.js +113 -0
- package/dist/operations/__tests__/ensures-schema-registry.test.js.map +1 -0
- package/dist/operations/ensures-schema-registry.d.ts +172 -0
- package/dist/operations/ensures-schema-registry.d.ts.map +1 -0
- package/dist/operations/ensures-schema-registry.js +226 -0
- package/dist/operations/ensures-schema-registry.js.map +1 -0
- package/dist/operations/llm.d.ts +101 -9
- package/dist/operations/llm.d.ts.map +1 -1
- package/dist/operations/validate.d.ts +1 -12
- package/dist/operations/validate.d.ts.map +1 -1
- package/dist/operations/validate.js +1 -1
- package/dist/playbook.d.ts +60 -0
- package/dist/playbook.d.ts.map +1 -1
- package/dist/session.d.ts +11 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js.map +1 -1
- package/dist/templates/manifest.d.ts +1 -1
- package/dist/tools/agent-tools.d.ts +231 -0
- package/dist/tools/agent-tools.d.ts.map +1 -0
- package/dist/tools/agent-tools.js +25 -0
- package/dist/tools/agent-tools.js.map +1 -0
- package/dist/tools/atomic.d.ts +19 -0
- package/dist/tools/atomic.d.ts.map +1 -1
- package/dist/tools/atomic.js +17 -0
- package/dist/tools/atomic.js.map +1 -1
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/skill-executor.d.ts +7 -0
- package/dist/tools/skill-executor.d.ts.map +1 -1
- package/dist/tools/web-tools.d.ts +217 -0
- package/dist/tools/web-tools.d.ts.map +1 -0
- package/dist/tools/web-tools.js +31 -0
- package/dist/tools/web-tools.js.map +1 -0
- package/package.json +6 -2
- package/src/__tests__/__snapshots__/operations-registry.test.ts.snap +1 -1
- package/src/__tests__/operation-def.test.ts +2 -1
- package/src/__tests__/sealed-credential.test.ts +100 -0
- package/src/__tests__/skill-executor-contract.test.ts +3 -0
- package/src/acceptance-gate.ts +2 -3
- package/src/boundary.ts +1 -20
- package/src/config.ts +104 -0
- package/src/data-accessor.ts +22 -1
- package/src/dispatch/identity.ts +5 -0
- package/src/dispatch/operations-registry.ts +51 -170
- package/src/index.ts +103 -24
- package/src/lease-ipc/__tests__/freeze.test.ts +246 -0
- package/src/lease-ipc/index.ts +63 -0
- package/src/lease-ipc/messages.ts +471 -0
- package/src/lease-ipc/version.ts +46 -0
- package/src/llm/interfaces.ts +23 -0
- package/src/llm/sealed-credential.ts +166 -0
- package/src/llm/system-of-use.ts +503 -0
- package/src/llm/system-resolver.ts +46 -11
- package/src/operations/__tests__/ensures-schema-registry.test.ts +169 -0
- package/src/operations/ensures-schema-registry.ts +260 -0
- package/src/operations/llm.ts +105 -8
- package/src/operations/validate.ts +1 -14
- package/src/playbook.ts +61 -0
- package/src/session.ts +11 -0
- package/src/tools/agent-tools.ts +270 -0
- package/src/tools/atomic.ts +21 -0
- package/src/tools/index.ts +46 -0
- package/src/tools/skill-executor.ts +7 -0
- package/src/tools/web-tools.ts +247 -0
- package/dist/tessera.d.ts +0 -32
- package/dist/tessera.d.ts.map +0 -1
- package/dist/tessera.js +0 -11
- package/dist/tessera.js.map +0 -1
- package/dist/warp-chain.d.ts +0 -129
- package/dist/warp-chain.d.ts.map +0 -1
- package/dist/warp-chain.js +0 -13
- package/dist/warp-chain.js.map +0 -1
- package/src/tessera.ts +0 -35
- package/src/warp-chain.ts +0 -185
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Web + browser agent-tool I/O contracts (T1742 · epic T11456 · SG-TOOLS).
|
|
3
|
+
*
|
|
4
|
+
* The shared, types-only I/O shapes for the `web` toolset surfaced through the
|
|
5
|
+
* `AgentToolRegistry` (`packages/core/src/tools/agent-registry.ts`), on top of
|
|
6
|
+
* the terminal/file/search/git families ({@link ./agent-tools.js}):
|
|
7
|
+
*
|
|
8
|
+
* - **web_search** — pluggable, backend-agnostic web search
|
|
9
|
+
* ({@link WebSearchInput} / {@link WebSearchResult}). NO hard paid-API dep:
|
|
10
|
+
* a backend is resolved at call time and the tool degrades gracefully to an
|
|
11
|
+
* `unavailable` result when none is configured.
|
|
12
|
+
* - **web_extract** — fetch a URL and convert its HTML body to markdown
|
|
13
|
+
* ({@link WebExtractInput} / {@link WebExtractResult}).
|
|
14
|
+
* - **browser_*** — Playwright-driven browser automation
|
|
15
|
+
* ({@link BrowserNavigateInput} … {@link BrowserVisionResult}). Playwright is
|
|
16
|
+
* an OPTIONAL, lazily-loaded dependency — these tools' `available()` predicate
|
|
17
|
+
* returns `false` (with an install hint) when it is absent.
|
|
18
|
+
*
|
|
19
|
+
* The web tools compose over the `net` side-effect surface; the browser tools
|
|
20
|
+
* over a Playwright-managed `shell`-class process. Like every agent tool, their
|
|
21
|
+
* executables perform side effects through the injected `GuardedToolSurface` (or,
|
|
22
|
+
* for the AI call in {@link BrowserVisionResult}, through the E9
|
|
23
|
+
* `resolveLLMForSystem` chokepoint) — never a raw provider/network bypass.
|
|
24
|
+
* Types-only — no runtime logic (Gate 10 `contracts-purity`).
|
|
25
|
+
*
|
|
26
|
+
* @epic T11456
|
|
27
|
+
* @task T1742
|
|
28
|
+
* @see ./agent-tools.js — the terminal/file/search/git family I/O shapes
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
// web_search — pluggable, backend-agnostic
|
|
33
|
+
// ---------------------------------------------------------------------------
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Identifier of a {@link WebSearchInput} backend.
|
|
37
|
+
*
|
|
38
|
+
* - `duckduckgo` — DuckDuckGo's keyless HTML endpoint (no API key required).
|
|
39
|
+
* - `searxng` — a self-hosted / public SearXNG JSON instance (URL via config/env).
|
|
40
|
+
* - `auto` — try each configured backend in priority order, first success wins.
|
|
41
|
+
*
|
|
42
|
+
* NONE require a paid API key; the set is open by design so a deployment can
|
|
43
|
+
* register its own backend. The string union here is the canonical builtin set.
|
|
44
|
+
*/
|
|
45
|
+
export type WebSearchBackendId = 'duckduckgo' | 'searxng' | 'auto';
|
|
46
|
+
|
|
47
|
+
/** Input for the `web_search` tool. */
|
|
48
|
+
export interface WebSearchInput {
|
|
49
|
+
/** Free-text search query. */
|
|
50
|
+
readonly query: string;
|
|
51
|
+
/** Maximum number of results to return. Defaults to 10. */
|
|
52
|
+
readonly maxResults?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Preferred backend. Defaults to `auto` — the first configured/reachable
|
|
55
|
+
* backend answers. An explicit id pins a single backend.
|
|
56
|
+
*/
|
|
57
|
+
readonly backend?: WebSearchBackendId;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** A single web-search hit. */
|
|
61
|
+
export interface WebSearchHit {
|
|
62
|
+
/** Result title. */
|
|
63
|
+
readonly title: string;
|
|
64
|
+
/** Absolute result URL. */
|
|
65
|
+
readonly url: string;
|
|
66
|
+
/** Snippet / description (may be empty). */
|
|
67
|
+
readonly snippet: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** Result of `web_search`. */
|
|
71
|
+
export interface WebSearchResult {
|
|
72
|
+
/** The originating query (echoed for traceability). */
|
|
73
|
+
readonly query: string;
|
|
74
|
+
/** Hits in backend-ranked order (empty when none / unavailable). */
|
|
75
|
+
readonly results: readonly WebSearchHit[];
|
|
76
|
+
/** The backend that actually answered, or `null` when none was available. */
|
|
77
|
+
readonly backend: WebSearchBackendId | null;
|
|
78
|
+
/**
|
|
79
|
+
* `true` when NO backend could answer (none configured, network egress
|
|
80
|
+
* denied, or every backend failed). Callers MUST treat this as a soft
|
|
81
|
+
* "no search capability" signal — it is NOT an error.
|
|
82
|
+
*/
|
|
83
|
+
readonly unavailable: boolean;
|
|
84
|
+
/** Human-readable reason when {@link WebSearchResult.unavailable} is `true`. */
|
|
85
|
+
readonly reason?: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// ---------------------------------------------------------------------------
|
|
89
|
+
// web_extract — URL → markdown
|
|
90
|
+
// ---------------------------------------------------------------------------
|
|
91
|
+
|
|
92
|
+
/** Input for the `web_extract` tool. */
|
|
93
|
+
export interface WebExtractInput {
|
|
94
|
+
/** Absolute URL to fetch and convert. */
|
|
95
|
+
readonly url: string;
|
|
96
|
+
/** Hard timeout in milliseconds. Defaults to 30000. */
|
|
97
|
+
readonly timeoutMs?: number;
|
|
98
|
+
/**
|
|
99
|
+
* Cap on the markdown length (characters). Output beyond this is truncated
|
|
100
|
+
* and {@link WebExtractResult.truncated} set. Defaults to 100000.
|
|
101
|
+
*/
|
|
102
|
+
readonly maxChars?: number;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** Result of `web_extract`. */
|
|
106
|
+
export interface WebExtractResult {
|
|
107
|
+
/** The fetched URL. */
|
|
108
|
+
readonly url: string;
|
|
109
|
+
/** HTTP status code of the fetch. */
|
|
110
|
+
readonly status: number;
|
|
111
|
+
/** Document `<title>`, when present. */
|
|
112
|
+
readonly title: string;
|
|
113
|
+
/** The page body converted to markdown. */
|
|
114
|
+
readonly markdown: string;
|
|
115
|
+
/** Whether {@link WebExtractInput.maxChars} truncated the markdown. */
|
|
116
|
+
readonly truncated: boolean;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// ---------------------------------------------------------------------------
|
|
120
|
+
// browser_* — Playwright-driven automation
|
|
121
|
+
// ---------------------------------------------------------------------------
|
|
122
|
+
|
|
123
|
+
/** Input for `browser_navigate`. */
|
|
124
|
+
export interface BrowserNavigateInput {
|
|
125
|
+
/** Absolute URL to navigate the browser to. */
|
|
126
|
+
readonly url: string;
|
|
127
|
+
/**
|
|
128
|
+
* When to consider navigation complete. Defaults to `load`.
|
|
129
|
+
* Mirrors Playwright's `waitUntil` states.
|
|
130
|
+
*/
|
|
131
|
+
readonly waitUntil?: 'load' | 'domcontentloaded' | 'networkidle';
|
|
132
|
+
/** Per-navigation timeout in milliseconds. Defaults to 30000. */
|
|
133
|
+
readonly timeoutMs?: number;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** Result common to navigation / interaction browser tools. */
|
|
137
|
+
export interface BrowserPageState {
|
|
138
|
+
/** The page's current URL after the operation. */
|
|
139
|
+
readonly url: string;
|
|
140
|
+
/** The page's `document.title` after the operation. */
|
|
141
|
+
readonly title: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** Input for `browser_click`. */
|
|
145
|
+
export interface BrowserClickInput {
|
|
146
|
+
/** A CSS / Playwright selector for the element to click. */
|
|
147
|
+
readonly selector: string;
|
|
148
|
+
/** Per-action timeout in milliseconds. Defaults to 15000. */
|
|
149
|
+
readonly timeoutMs?: number;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** Input for `browser_type`. */
|
|
153
|
+
export interface BrowserTypeInput {
|
|
154
|
+
/** A CSS / Playwright selector for the input element. */
|
|
155
|
+
readonly selector: string;
|
|
156
|
+
/** The text to type into the element. */
|
|
157
|
+
readonly text: string;
|
|
158
|
+
/** Clear the field before typing. Defaults to `true`. */
|
|
159
|
+
readonly clear?: boolean;
|
|
160
|
+
/** Per-action timeout in milliseconds. Defaults to 15000. */
|
|
161
|
+
readonly timeoutMs?: number;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** Input for `browser_press` (a single key / chord). */
|
|
165
|
+
export interface BrowserPressInput {
|
|
166
|
+
/**
|
|
167
|
+
* The key (or `Modifier+Key` chord) to press, in Playwright key syntax
|
|
168
|
+
* (e.g. `Enter`, `Tab`, `Control+A`, `ArrowDown`).
|
|
169
|
+
*/
|
|
170
|
+
readonly key: string;
|
|
171
|
+
/** Optional selector to focus before pressing. */
|
|
172
|
+
readonly selector?: string;
|
|
173
|
+
/** Per-action timeout in milliseconds. Defaults to 15000. */
|
|
174
|
+
readonly timeoutMs?: number;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** Result of a `browser_click` / `browser_type` / `browser_press` action. */
|
|
178
|
+
export interface BrowserActionResult extends BrowserPageState {
|
|
179
|
+
/** The action that was performed. */
|
|
180
|
+
readonly action: 'click' | 'type' | 'press';
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/** A single node in the {@link BrowserSnapshotResult} accessibility tree. */
|
|
184
|
+
export interface AccessibilityNode {
|
|
185
|
+
/** ARIA role (e.g. `button`, `link`, `textbox`). */
|
|
186
|
+
readonly role: string;
|
|
187
|
+
/** Accessible name, when present. */
|
|
188
|
+
readonly name?: string;
|
|
189
|
+
/** Current value (form controls). */
|
|
190
|
+
readonly value?: string;
|
|
191
|
+
/** Child nodes (depth-first). */
|
|
192
|
+
readonly children?: readonly AccessibilityNode[];
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** Result of `browser_snapshot` — the page accessibility tree. */
|
|
196
|
+
export interface BrowserSnapshotResult extends BrowserPageState {
|
|
197
|
+
/** The root of the accessibility tree, or `null` when none is available. */
|
|
198
|
+
readonly tree: AccessibilityNode | null;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** Scroll direction for `browser_scroll`. */
|
|
202
|
+
export type BrowserScrollDirection = 'up' | 'down';
|
|
203
|
+
|
|
204
|
+
/** Input for `browser_scroll`. */
|
|
205
|
+
export interface BrowserScrollInput {
|
|
206
|
+
/** Direction to scroll. */
|
|
207
|
+
readonly direction: BrowserScrollDirection;
|
|
208
|
+
/**
|
|
209
|
+
* Pixels to scroll by. Defaults to roughly one viewport height (800px).
|
|
210
|
+
*/
|
|
211
|
+
readonly amountPx?: number;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** Result of `browser_scroll`. */
|
|
215
|
+
export interface BrowserScrollResult extends BrowserPageState {
|
|
216
|
+
/** The direction that was scrolled. */
|
|
217
|
+
readonly direction: BrowserScrollDirection;
|
|
218
|
+
/** The vertical scroll position (pixels from top) after scrolling. */
|
|
219
|
+
readonly scrollY: number;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** Input for `browser_vision` (screenshot + AI analysis). */
|
|
223
|
+
export interface BrowserVisionInput {
|
|
224
|
+
/**
|
|
225
|
+
* The question / instruction the vision model should answer about the current
|
|
226
|
+
* page screenshot (e.g. "What is the primary call-to-action on this page?").
|
|
227
|
+
*/
|
|
228
|
+
readonly prompt: string;
|
|
229
|
+
/** Capture the full scrollable page rather than just the viewport. Defaults to `false`. */
|
|
230
|
+
readonly fullPage?: boolean;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/** Result of `browser_vision`. */
|
|
234
|
+
export interface BrowserVisionResult extends BrowserPageState {
|
|
235
|
+
/**
|
|
236
|
+
* The vision model's textual analysis of the screenshot, or `null` when no
|
|
237
|
+
* LLM credential was reachable (graceful degradation — NOT an error).
|
|
238
|
+
*/
|
|
239
|
+
readonly analysis: string | null;
|
|
240
|
+
/** The model id that produced {@link BrowserVisionResult.analysis}, when available. */
|
|
241
|
+
readonly model?: string;
|
|
242
|
+
/**
|
|
243
|
+
* `true` when the AI call was skipped because no LLM credential resolved
|
|
244
|
+
* through the E9 chokepoint. The screenshot was still captured.
|
|
245
|
+
*/
|
|
246
|
+
readonly aiUnavailable: boolean;
|
|
247
|
+
}
|
package/dist/tessera.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tessera Type Definitions
|
|
3
|
-
*
|
|
4
|
-
* Tessera templates extend WarpChain with variable bindings,
|
|
5
|
-
* archetype classification, and instantiation inputs for
|
|
6
|
-
* parameterized pipeline creation.
|
|
7
|
-
*
|
|
8
|
-
* @task T5408
|
|
9
|
-
*/
|
|
10
|
-
import type { WarpChain } from './warp-chain.js';
|
|
11
|
-
/** A variable declaration within a Tessera template. */
|
|
12
|
-
export interface TesseraVariable {
|
|
13
|
-
name: string;
|
|
14
|
-
type: 'string' | 'number' | 'boolean' | 'taskId' | 'epicId';
|
|
15
|
-
description: string;
|
|
16
|
-
required: boolean;
|
|
17
|
-
default?: unknown;
|
|
18
|
-
}
|
|
19
|
-
/** A parameterized WarpChain template with variable bindings. */
|
|
20
|
-
export interface TesseraTemplate extends WarpChain {
|
|
21
|
-
variables: Record<string, TesseraVariable>;
|
|
22
|
-
archetypes: string[];
|
|
23
|
-
defaultValues: Record<string, unknown>;
|
|
24
|
-
category: 'lifecycle' | 'hotfix' | 'research' | 'security-audit' | 'custom';
|
|
25
|
-
}
|
|
26
|
-
/** Input for instantiating a Tessera template into a concrete chain. */
|
|
27
|
-
export interface TesseraInstantiationInput {
|
|
28
|
-
templateId: string;
|
|
29
|
-
epicId: string;
|
|
30
|
-
variables: Record<string, unknown>;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=tessera.d.ts.map
|
package/dist/tessera.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tessera.d.ts","sourceRoot":"","sources":["../src/tessera.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,wDAAwD;AACxD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC5D,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iEAAiE;AACjE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC3C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,QAAQ,EAAE,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,gBAAgB,GAAG,QAAQ,CAAC;CAC7E;AAED,wEAAwE;AACxE,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC"}
|
package/dist/tessera.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tessera Type Definitions
|
|
3
|
-
*
|
|
4
|
-
* Tessera templates extend WarpChain with variable bindings,
|
|
5
|
-
* archetype classification, and instantiation inputs for
|
|
6
|
-
* parameterized pipeline creation.
|
|
7
|
-
*
|
|
8
|
-
* @task T5408
|
|
9
|
-
*/
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=tessera.js.map
|
package/dist/tessera.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tessera.js","sourceRoot":"","sources":["../src/tessera.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
package/dist/warp-chain.d.ts
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WarpChain Type System
|
|
3
|
-
*
|
|
4
|
-
* Defines the complete type system for WarpChain workflow definitions.
|
|
5
|
-
* Warp is the unyielding protocol chain: the synthesis of composable workflow
|
|
6
|
-
* shape (topology) and LOOM quality gates into a unified chain model.
|
|
7
|
-
*
|
|
8
|
-
* ProtocolType and GateName are inlined here (contracts has zero external deps).
|
|
9
|
-
*
|
|
10
|
-
* @task T5407
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* All supported protocol types.
|
|
14
|
-
*
|
|
15
|
-
* Covers the 9 RCASD-IVTR pipeline stages plus the 3 cross-cutting protocols
|
|
16
|
-
* (contribution, artifact-publish, provenance). Must stay in sync with
|
|
17
|
-
* `packages/core/src/orchestration/protocol-validators.ts#PROTOCOL_TYPES`.
|
|
18
|
-
*
|
|
19
|
-
* @task T260 — add architecture-decision, validation, testing
|
|
20
|
-
*/
|
|
21
|
-
export type ProtocolType = 'research' | 'consensus' | 'architecture-decision' | 'specification' | 'decomposition' | 'implementation' | 'contribution' | 'validation' | 'testing' | 'release' | 'artifact-publish' | 'provenance';
|
|
22
|
-
/** Verification gate names (ordered dependency chain). */
|
|
23
|
-
export type GateName = 'implemented' | 'testsPassed' | 'qaPassed' | 'cleanupDone' | 'securityPassed' | 'documented';
|
|
24
|
-
/**
|
|
25
|
-
* A single stage in the warp chain.
|
|
26
|
-
*
|
|
27
|
-
* The category union includes all canonical CLEO pipeline stages
|
|
28
|
-
* plus 'custom' for user-defined stages.
|
|
29
|
-
*/
|
|
30
|
-
export interface WarpStage {
|
|
31
|
-
id: string;
|
|
32
|
-
name: string;
|
|
33
|
-
category: 'research' | 'consensus' | 'architecture' | 'specification' | 'decomposition' | 'implementation' | 'validation' | 'testing' | 'release' | 'contribution' | 'custom';
|
|
34
|
-
skippable: boolean;
|
|
35
|
-
description?: string;
|
|
36
|
-
}
|
|
37
|
-
/** Connection between two stages in the chain. */
|
|
38
|
-
export interface WarpLink {
|
|
39
|
-
from: string;
|
|
40
|
-
to: string;
|
|
41
|
-
type: 'linear' | 'fork' | 'branch';
|
|
42
|
-
condition?: string;
|
|
43
|
-
}
|
|
44
|
-
/** The topology/DAG of a workflow. */
|
|
45
|
-
export interface ChainShape {
|
|
46
|
-
stages: WarpStage[];
|
|
47
|
-
links: WarpLink[];
|
|
48
|
-
entryPoint: string;
|
|
49
|
-
exitPoints: string[];
|
|
50
|
-
}
|
|
51
|
-
/** Discriminated union for gate check types. */
|
|
52
|
-
export type GateCheck = {
|
|
53
|
-
type: 'stage_complete';
|
|
54
|
-
stageId: string;
|
|
55
|
-
} | {
|
|
56
|
-
type: 'artifact_exists';
|
|
57
|
-
artifactType: string;
|
|
58
|
-
path?: string;
|
|
59
|
-
} | {
|
|
60
|
-
type: 'protocol_valid';
|
|
61
|
-
protocolType: ProtocolType;
|
|
62
|
-
} | {
|
|
63
|
-
type: 'verification_gate';
|
|
64
|
-
gateName: GateName;
|
|
65
|
-
} | {
|
|
66
|
-
type: 'custom';
|
|
67
|
-
validator: string;
|
|
68
|
-
params?: Record<string, unknown>;
|
|
69
|
-
};
|
|
70
|
-
/** A quality gate embedded in the chain. */
|
|
71
|
-
export interface GateContract {
|
|
72
|
-
id: string;
|
|
73
|
-
name: string;
|
|
74
|
-
type: 'entry' | 'exit' | 'checkpoint';
|
|
75
|
-
stageId: string;
|
|
76
|
-
position: 'before' | 'after';
|
|
77
|
-
check: GateCheck;
|
|
78
|
-
severity: 'blocking' | 'warning' | 'info';
|
|
79
|
-
canForce: boolean;
|
|
80
|
-
}
|
|
81
|
-
/** Complete chain definition combining shape and gates. */
|
|
82
|
-
export interface WarpChain {
|
|
83
|
-
id: string;
|
|
84
|
-
name: string;
|
|
85
|
-
version: string;
|
|
86
|
-
description: string;
|
|
87
|
-
shape: ChainShape;
|
|
88
|
-
gates: GateContract[];
|
|
89
|
-
tessera?: string;
|
|
90
|
-
metadata?: Record<string, unknown>;
|
|
91
|
-
}
|
|
92
|
-
/** Result of validating a chain definition. */
|
|
93
|
-
export interface ChainValidation {
|
|
94
|
-
wellFormed: boolean;
|
|
95
|
-
gateSatisfiable: boolean;
|
|
96
|
-
artifactComplete: boolean;
|
|
97
|
-
errors: string[];
|
|
98
|
-
warnings: string[];
|
|
99
|
-
}
|
|
100
|
-
/** A chain bound to a specific epic. */
|
|
101
|
-
export interface WarpChainInstance {
|
|
102
|
-
id: string;
|
|
103
|
-
chainId: string;
|
|
104
|
-
epicId: string;
|
|
105
|
-
variables: Record<string, unknown>;
|
|
106
|
-
stageToTask: Record<string, string>;
|
|
107
|
-
status: 'pending' | 'active' | 'completed' | 'failed' | 'cancelled';
|
|
108
|
-
currentStage: string;
|
|
109
|
-
createdAt: string;
|
|
110
|
-
createdBy: string;
|
|
111
|
-
}
|
|
112
|
-
/** Result of evaluating a single gate. */
|
|
113
|
-
export interface GateResult {
|
|
114
|
-
gateId: string;
|
|
115
|
-
passed: boolean;
|
|
116
|
-
forced: boolean;
|
|
117
|
-
message?: string;
|
|
118
|
-
evaluatedAt: string;
|
|
119
|
-
}
|
|
120
|
-
/** Runtime state of a chain instance execution. */
|
|
121
|
-
export interface WarpChainExecution {
|
|
122
|
-
instanceId: string;
|
|
123
|
-
currentStage: string;
|
|
124
|
-
gateResults: GateResult[];
|
|
125
|
-
status: 'running' | 'paused' | 'completed' | 'failed';
|
|
126
|
-
startedAt: string;
|
|
127
|
-
completedAt?: string;
|
|
128
|
-
}
|
|
129
|
-
//# sourceMappingURL=warp-chain.d.ts.map
|
package/dist/warp-chain.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"warp-chain.d.ts","sourceRoot":"","sources":["../src/warp-chain.ts"],"names":[],"mappings":"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"}
|
package/dist/warp-chain.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WarpChain Type System
|
|
3
|
-
*
|
|
4
|
-
* Defines the complete type system for WarpChain workflow definitions.
|
|
5
|
-
* Warp is the unyielding protocol chain: the synthesis of composable workflow
|
|
6
|
-
* shape (topology) and LOOM quality gates into a unified chain model.
|
|
7
|
-
*
|
|
8
|
-
* ProtocolType and GateName are inlined here (contracts has zero external deps).
|
|
9
|
-
*
|
|
10
|
-
* @task T5407
|
|
11
|
-
*/
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=warp-chain.js.map
|
package/dist/warp-chain.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"warp-chain.js","sourceRoot":"","sources":["../src/warp-chain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
package/src/tessera.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tessera Type Definitions
|
|
3
|
-
*
|
|
4
|
-
* Tessera templates extend WarpChain with variable bindings,
|
|
5
|
-
* archetype classification, and instantiation inputs for
|
|
6
|
-
* parameterized pipeline creation.
|
|
7
|
-
*
|
|
8
|
-
* @task T5408
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import type { WarpChain } from './warp-chain.js';
|
|
12
|
-
|
|
13
|
-
/** A variable declaration within a Tessera template. */
|
|
14
|
-
export interface TesseraVariable {
|
|
15
|
-
name: string;
|
|
16
|
-
type: 'string' | 'number' | 'boolean' | 'taskId' | 'epicId';
|
|
17
|
-
description: string;
|
|
18
|
-
required: boolean;
|
|
19
|
-
default?: unknown;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** A parameterized WarpChain template with variable bindings. */
|
|
23
|
-
export interface TesseraTemplate extends WarpChain {
|
|
24
|
-
variables: Record<string, TesseraVariable>;
|
|
25
|
-
archetypes: string[];
|
|
26
|
-
defaultValues: Record<string, unknown>;
|
|
27
|
-
category: 'lifecycle' | 'hotfix' | 'research' | 'security-audit' | 'custom';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/** Input for instantiating a Tessera template into a concrete chain. */
|
|
31
|
-
export interface TesseraInstantiationInput {
|
|
32
|
-
templateId: string;
|
|
33
|
-
epicId: string;
|
|
34
|
-
variables: Record<string, unknown>;
|
|
35
|
-
}
|
package/src/warp-chain.ts
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WarpChain Type System
|
|
3
|
-
*
|
|
4
|
-
* Defines the complete type system for WarpChain workflow definitions.
|
|
5
|
-
* Warp is the unyielding protocol chain: the synthesis of composable workflow
|
|
6
|
-
* shape (topology) and LOOM quality gates into a unified chain model.
|
|
7
|
-
*
|
|
8
|
-
* ProtocolType and GateName are inlined here (contracts has zero external deps).
|
|
9
|
-
*
|
|
10
|
-
* @task T5407
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
// =============================================================================
|
|
14
|
-
// INLINED TYPES (from core/orchestration and core/validation)
|
|
15
|
-
// =============================================================================
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* All supported protocol types.
|
|
19
|
-
*
|
|
20
|
-
* Covers the 9 RCASD-IVTR pipeline stages plus the 3 cross-cutting protocols
|
|
21
|
-
* (contribution, artifact-publish, provenance). Must stay in sync with
|
|
22
|
-
* `packages/core/src/orchestration/protocol-validators.ts#PROTOCOL_TYPES`.
|
|
23
|
-
*
|
|
24
|
-
* @task T260 — add architecture-decision, validation, testing
|
|
25
|
-
*/
|
|
26
|
-
export type ProtocolType =
|
|
27
|
-
| 'research'
|
|
28
|
-
| 'consensus'
|
|
29
|
-
| 'architecture-decision'
|
|
30
|
-
| 'specification'
|
|
31
|
-
| 'decomposition'
|
|
32
|
-
| 'implementation'
|
|
33
|
-
| 'contribution'
|
|
34
|
-
| 'validation'
|
|
35
|
-
| 'testing'
|
|
36
|
-
| 'release'
|
|
37
|
-
| 'artifact-publish'
|
|
38
|
-
| 'provenance';
|
|
39
|
-
|
|
40
|
-
/** Verification gate names (ordered dependency chain). */
|
|
41
|
-
export type GateName =
|
|
42
|
-
| 'implemented'
|
|
43
|
-
| 'testsPassed'
|
|
44
|
-
| 'qaPassed'
|
|
45
|
-
| 'cleanupDone'
|
|
46
|
-
| 'securityPassed'
|
|
47
|
-
| 'documented';
|
|
48
|
-
|
|
49
|
-
// =============================================================================
|
|
50
|
-
// CHAIN SHAPE (Warp topology)
|
|
51
|
-
// =============================================================================
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* A single stage in the warp chain.
|
|
55
|
-
*
|
|
56
|
-
* The category union includes all canonical CLEO pipeline stages
|
|
57
|
-
* plus 'custom' for user-defined stages.
|
|
58
|
-
*/
|
|
59
|
-
export interface WarpStage {
|
|
60
|
-
id: string;
|
|
61
|
-
name: string;
|
|
62
|
-
category:
|
|
63
|
-
| 'research'
|
|
64
|
-
| 'consensus'
|
|
65
|
-
| 'architecture'
|
|
66
|
-
| 'specification'
|
|
67
|
-
| 'decomposition'
|
|
68
|
-
| 'implementation'
|
|
69
|
-
| 'validation'
|
|
70
|
-
| 'testing'
|
|
71
|
-
| 'release'
|
|
72
|
-
| 'contribution'
|
|
73
|
-
| 'custom';
|
|
74
|
-
skippable: boolean;
|
|
75
|
-
description?: string;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/** Connection between two stages in the chain. */
|
|
79
|
-
export interface WarpLink {
|
|
80
|
-
from: string;
|
|
81
|
-
to: string;
|
|
82
|
-
type: 'linear' | 'fork' | 'branch';
|
|
83
|
-
condition?: string;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/** The topology/DAG of a workflow. */
|
|
87
|
-
export interface ChainShape {
|
|
88
|
-
stages: WarpStage[];
|
|
89
|
-
links: WarpLink[];
|
|
90
|
-
entryPoint: string;
|
|
91
|
-
exitPoints: string[];
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// =============================================================================
|
|
95
|
-
// GATE SYSTEM (LOOM quality gates)
|
|
96
|
-
// =============================================================================
|
|
97
|
-
|
|
98
|
-
/** Discriminated union for gate check types. */
|
|
99
|
-
export type GateCheck =
|
|
100
|
-
| { type: 'stage_complete'; stageId: string }
|
|
101
|
-
| { type: 'artifact_exists'; artifactType: string; path?: string }
|
|
102
|
-
| { type: 'protocol_valid'; protocolType: ProtocolType }
|
|
103
|
-
| { type: 'verification_gate'; gateName: GateName }
|
|
104
|
-
| { type: 'custom'; validator: string; params?: Record<string, unknown> };
|
|
105
|
-
|
|
106
|
-
/** A quality gate embedded in the chain. */
|
|
107
|
-
export interface GateContract {
|
|
108
|
-
id: string;
|
|
109
|
-
name: string;
|
|
110
|
-
type: 'entry' | 'exit' | 'checkpoint';
|
|
111
|
-
stageId: string;
|
|
112
|
-
position: 'before' | 'after';
|
|
113
|
-
check: GateCheck;
|
|
114
|
-
severity: 'blocking' | 'warning' | 'info';
|
|
115
|
-
canForce: boolean;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// =============================================================================
|
|
119
|
-
// CHAIN DEFINITION
|
|
120
|
-
// =============================================================================
|
|
121
|
-
|
|
122
|
-
/** Complete chain definition combining shape and gates. */
|
|
123
|
-
export interface WarpChain {
|
|
124
|
-
id: string;
|
|
125
|
-
name: string;
|
|
126
|
-
version: string;
|
|
127
|
-
description: string;
|
|
128
|
-
shape: ChainShape;
|
|
129
|
-
gates: GateContract[];
|
|
130
|
-
tessera?: string;
|
|
131
|
-
metadata?: Record<string, unknown>;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// =============================================================================
|
|
135
|
-
// CHAIN VALIDATION
|
|
136
|
-
// =============================================================================
|
|
137
|
-
|
|
138
|
-
/** Result of validating a chain definition. */
|
|
139
|
-
export interface ChainValidation {
|
|
140
|
-
wellFormed: boolean;
|
|
141
|
-
gateSatisfiable: boolean;
|
|
142
|
-
artifactComplete: boolean;
|
|
143
|
-
errors: string[];
|
|
144
|
-
warnings: string[];
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// =============================================================================
|
|
148
|
-
// CHAIN INSTANCE (runtime binding)
|
|
149
|
-
// =============================================================================
|
|
150
|
-
|
|
151
|
-
/** A chain bound to a specific epic. */
|
|
152
|
-
export interface WarpChainInstance {
|
|
153
|
-
id: string;
|
|
154
|
-
chainId: string;
|
|
155
|
-
epicId: string;
|
|
156
|
-
variables: Record<string, unknown>;
|
|
157
|
-
stageToTask: Record<string, string>;
|
|
158
|
-
status: 'pending' | 'active' | 'completed' | 'failed' | 'cancelled';
|
|
159
|
-
currentStage: string;
|
|
160
|
-
createdAt: string;
|
|
161
|
-
createdBy: string;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// =============================================================================
|
|
165
|
-
// CHAIN EXECUTION (runtime state)
|
|
166
|
-
// =============================================================================
|
|
167
|
-
|
|
168
|
-
/** Result of evaluating a single gate. */
|
|
169
|
-
export interface GateResult {
|
|
170
|
-
gateId: string;
|
|
171
|
-
passed: boolean;
|
|
172
|
-
forced: boolean;
|
|
173
|
-
message?: string;
|
|
174
|
-
evaluatedAt: string;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/** Runtime state of a chain instance execution. */
|
|
178
|
-
export interface WarpChainExecution {
|
|
179
|
-
instanceId: string;
|
|
180
|
-
currentStage: string;
|
|
181
|
-
gateResults: GateResult[];
|
|
182
|
-
status: 'running' | 'paused' | 'completed' | 'failed';
|
|
183
|
-
startedAt: string;
|
|
184
|
-
completedAt?: string;
|
|
185
|
-
}
|