@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,217 @@
|
|
|
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
|
+
* Identifier of a {@link WebSearchInput} backend.
|
|
32
|
+
*
|
|
33
|
+
* - `duckduckgo` — DuckDuckGo's keyless HTML endpoint (no API key required).
|
|
34
|
+
* - `searxng` — a self-hosted / public SearXNG JSON instance (URL via config/env).
|
|
35
|
+
* - `auto` — try each configured backend in priority order, first success wins.
|
|
36
|
+
*
|
|
37
|
+
* NONE require a paid API key; the set is open by design so a deployment can
|
|
38
|
+
* register its own backend. The string union here is the canonical builtin set.
|
|
39
|
+
*/
|
|
40
|
+
export type WebSearchBackendId = 'duckduckgo' | 'searxng' | 'auto';
|
|
41
|
+
/** Input for the `web_search` tool. */
|
|
42
|
+
export interface WebSearchInput {
|
|
43
|
+
/** Free-text search query. */
|
|
44
|
+
readonly query: string;
|
|
45
|
+
/** Maximum number of results to return. Defaults to 10. */
|
|
46
|
+
readonly maxResults?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Preferred backend. Defaults to `auto` — the first configured/reachable
|
|
49
|
+
* backend answers. An explicit id pins a single backend.
|
|
50
|
+
*/
|
|
51
|
+
readonly backend?: WebSearchBackendId;
|
|
52
|
+
}
|
|
53
|
+
/** A single web-search hit. */
|
|
54
|
+
export interface WebSearchHit {
|
|
55
|
+
/** Result title. */
|
|
56
|
+
readonly title: string;
|
|
57
|
+
/** Absolute result URL. */
|
|
58
|
+
readonly url: string;
|
|
59
|
+
/** Snippet / description (may be empty). */
|
|
60
|
+
readonly snippet: string;
|
|
61
|
+
}
|
|
62
|
+
/** Result of `web_search`. */
|
|
63
|
+
export interface WebSearchResult {
|
|
64
|
+
/** The originating query (echoed for traceability). */
|
|
65
|
+
readonly query: string;
|
|
66
|
+
/** Hits in backend-ranked order (empty when none / unavailable). */
|
|
67
|
+
readonly results: readonly WebSearchHit[];
|
|
68
|
+
/** The backend that actually answered, or `null` when none was available. */
|
|
69
|
+
readonly backend: WebSearchBackendId | null;
|
|
70
|
+
/**
|
|
71
|
+
* `true` when NO backend could answer (none configured, network egress
|
|
72
|
+
* denied, or every backend failed). Callers MUST treat this as a soft
|
|
73
|
+
* "no search capability" signal — it is NOT an error.
|
|
74
|
+
*/
|
|
75
|
+
readonly unavailable: boolean;
|
|
76
|
+
/** Human-readable reason when {@link WebSearchResult.unavailable} is `true`. */
|
|
77
|
+
readonly reason?: string;
|
|
78
|
+
}
|
|
79
|
+
/** Input for the `web_extract` tool. */
|
|
80
|
+
export interface WebExtractInput {
|
|
81
|
+
/** Absolute URL to fetch and convert. */
|
|
82
|
+
readonly url: string;
|
|
83
|
+
/** Hard timeout in milliseconds. Defaults to 30000. */
|
|
84
|
+
readonly timeoutMs?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Cap on the markdown length (characters). Output beyond this is truncated
|
|
87
|
+
* and {@link WebExtractResult.truncated} set. Defaults to 100000.
|
|
88
|
+
*/
|
|
89
|
+
readonly maxChars?: number;
|
|
90
|
+
}
|
|
91
|
+
/** Result of `web_extract`. */
|
|
92
|
+
export interface WebExtractResult {
|
|
93
|
+
/** The fetched URL. */
|
|
94
|
+
readonly url: string;
|
|
95
|
+
/** HTTP status code of the fetch. */
|
|
96
|
+
readonly status: number;
|
|
97
|
+
/** Document `<title>`, when present. */
|
|
98
|
+
readonly title: string;
|
|
99
|
+
/** The page body converted to markdown. */
|
|
100
|
+
readonly markdown: string;
|
|
101
|
+
/** Whether {@link WebExtractInput.maxChars} truncated the markdown. */
|
|
102
|
+
readonly truncated: boolean;
|
|
103
|
+
}
|
|
104
|
+
/** Input for `browser_navigate`. */
|
|
105
|
+
export interface BrowserNavigateInput {
|
|
106
|
+
/** Absolute URL to navigate the browser to. */
|
|
107
|
+
readonly url: string;
|
|
108
|
+
/**
|
|
109
|
+
* When to consider navigation complete. Defaults to `load`.
|
|
110
|
+
* Mirrors Playwright's `waitUntil` states.
|
|
111
|
+
*/
|
|
112
|
+
readonly waitUntil?: 'load' | 'domcontentloaded' | 'networkidle';
|
|
113
|
+
/** Per-navigation timeout in milliseconds. Defaults to 30000. */
|
|
114
|
+
readonly timeoutMs?: number;
|
|
115
|
+
}
|
|
116
|
+
/** Result common to navigation / interaction browser tools. */
|
|
117
|
+
export interface BrowserPageState {
|
|
118
|
+
/** The page's current URL after the operation. */
|
|
119
|
+
readonly url: string;
|
|
120
|
+
/** The page's `document.title` after the operation. */
|
|
121
|
+
readonly title: string;
|
|
122
|
+
}
|
|
123
|
+
/** Input for `browser_click`. */
|
|
124
|
+
export interface BrowserClickInput {
|
|
125
|
+
/** A CSS / Playwright selector for the element to click. */
|
|
126
|
+
readonly selector: string;
|
|
127
|
+
/** Per-action timeout in milliseconds. Defaults to 15000. */
|
|
128
|
+
readonly timeoutMs?: number;
|
|
129
|
+
}
|
|
130
|
+
/** Input for `browser_type`. */
|
|
131
|
+
export interface BrowserTypeInput {
|
|
132
|
+
/** A CSS / Playwright selector for the input element. */
|
|
133
|
+
readonly selector: string;
|
|
134
|
+
/** The text to type into the element. */
|
|
135
|
+
readonly text: string;
|
|
136
|
+
/** Clear the field before typing. Defaults to `true`. */
|
|
137
|
+
readonly clear?: boolean;
|
|
138
|
+
/** Per-action timeout in milliseconds. Defaults to 15000. */
|
|
139
|
+
readonly timeoutMs?: number;
|
|
140
|
+
}
|
|
141
|
+
/** Input for `browser_press` (a single key / chord). */
|
|
142
|
+
export interface BrowserPressInput {
|
|
143
|
+
/**
|
|
144
|
+
* The key (or `Modifier+Key` chord) to press, in Playwright key syntax
|
|
145
|
+
* (e.g. `Enter`, `Tab`, `Control+A`, `ArrowDown`).
|
|
146
|
+
*/
|
|
147
|
+
readonly key: string;
|
|
148
|
+
/** Optional selector to focus before pressing. */
|
|
149
|
+
readonly selector?: string;
|
|
150
|
+
/** Per-action timeout in milliseconds. Defaults to 15000. */
|
|
151
|
+
readonly timeoutMs?: number;
|
|
152
|
+
}
|
|
153
|
+
/** Result of a `browser_click` / `browser_type` / `browser_press` action. */
|
|
154
|
+
export interface BrowserActionResult extends BrowserPageState {
|
|
155
|
+
/** The action that was performed. */
|
|
156
|
+
readonly action: 'click' | 'type' | 'press';
|
|
157
|
+
}
|
|
158
|
+
/** A single node in the {@link BrowserSnapshotResult} accessibility tree. */
|
|
159
|
+
export interface AccessibilityNode {
|
|
160
|
+
/** ARIA role (e.g. `button`, `link`, `textbox`). */
|
|
161
|
+
readonly role: string;
|
|
162
|
+
/** Accessible name, when present. */
|
|
163
|
+
readonly name?: string;
|
|
164
|
+
/** Current value (form controls). */
|
|
165
|
+
readonly value?: string;
|
|
166
|
+
/** Child nodes (depth-first). */
|
|
167
|
+
readonly children?: readonly AccessibilityNode[];
|
|
168
|
+
}
|
|
169
|
+
/** Result of `browser_snapshot` — the page accessibility tree. */
|
|
170
|
+
export interface BrowserSnapshotResult extends BrowserPageState {
|
|
171
|
+
/** The root of the accessibility tree, or `null` when none is available. */
|
|
172
|
+
readonly tree: AccessibilityNode | null;
|
|
173
|
+
}
|
|
174
|
+
/** Scroll direction for `browser_scroll`. */
|
|
175
|
+
export type BrowserScrollDirection = 'up' | 'down';
|
|
176
|
+
/** Input for `browser_scroll`. */
|
|
177
|
+
export interface BrowserScrollInput {
|
|
178
|
+
/** Direction to scroll. */
|
|
179
|
+
readonly direction: BrowserScrollDirection;
|
|
180
|
+
/**
|
|
181
|
+
* Pixels to scroll by. Defaults to roughly one viewport height (800px).
|
|
182
|
+
*/
|
|
183
|
+
readonly amountPx?: number;
|
|
184
|
+
}
|
|
185
|
+
/** Result of `browser_scroll`. */
|
|
186
|
+
export interface BrowserScrollResult extends BrowserPageState {
|
|
187
|
+
/** The direction that was scrolled. */
|
|
188
|
+
readonly direction: BrowserScrollDirection;
|
|
189
|
+
/** The vertical scroll position (pixels from top) after scrolling. */
|
|
190
|
+
readonly scrollY: number;
|
|
191
|
+
}
|
|
192
|
+
/** Input for `browser_vision` (screenshot + AI analysis). */
|
|
193
|
+
export interface BrowserVisionInput {
|
|
194
|
+
/**
|
|
195
|
+
* The question / instruction the vision model should answer about the current
|
|
196
|
+
* page screenshot (e.g. "What is the primary call-to-action on this page?").
|
|
197
|
+
*/
|
|
198
|
+
readonly prompt: string;
|
|
199
|
+
/** Capture the full scrollable page rather than just the viewport. Defaults to `false`. */
|
|
200
|
+
readonly fullPage?: boolean;
|
|
201
|
+
}
|
|
202
|
+
/** Result of `browser_vision`. */
|
|
203
|
+
export interface BrowserVisionResult extends BrowserPageState {
|
|
204
|
+
/**
|
|
205
|
+
* The vision model's textual analysis of the screenshot, or `null` when no
|
|
206
|
+
* LLM credential was reachable (graceful degradation — NOT an error).
|
|
207
|
+
*/
|
|
208
|
+
readonly analysis: string | null;
|
|
209
|
+
/** The model id that produced {@link BrowserVisionResult.analysis}, when available. */
|
|
210
|
+
readonly model?: string;
|
|
211
|
+
/**
|
|
212
|
+
* `true` when the AI call was skipped because no LLM credential resolved
|
|
213
|
+
* through the E9 chokepoint. The screenshot was still captured.
|
|
214
|
+
*/
|
|
215
|
+
readonly aiUnavailable: boolean;
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=web-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-tools.d.ts","sourceRoot":"","sources":["../../src/tools/web-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAMH;;;;;;;;;GASG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,SAAS,GAAG,MAAM,CAAC;AAEnE,uCAAuC;AACvC,MAAM,WAAW,cAAc;IAC7B,8BAA8B;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,2DAA2D;IAC3D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAA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;IACjC,uFAAuF;IACvF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACjC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=web-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-tools.js","sourceRoot":"","sources":["../../src/tools/web-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleocode/contracts",
|
|
3
|
-
"version": "2026.6.
|
|
3
|
+
"version": "2026.6.13",
|
|
4
4
|
"description": "Domain types, interfaces, and contracts for the CLEO ecosystem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
"types": "./dist/tools/atomic.d.ts",
|
|
23
23
|
"import": "./dist/tools/atomic.js"
|
|
24
24
|
},
|
|
25
|
+
"./tools/agent-tools": {
|
|
26
|
+
"types": "./dist/tools/agent-tools.d.ts",
|
|
27
|
+
"import": "./dist/tools/agent-tools.js"
|
|
28
|
+
},
|
|
25
29
|
"./tools/composite": {
|
|
26
30
|
"types": "./dist/tools/composite.d.ts",
|
|
27
31
|
"import": "./dist/tools/composite.js"
|
|
@@ -182,7 +186,7 @@
|
|
|
182
186
|
"dependencies": {
|
|
183
187
|
"zod": "^4.3.6",
|
|
184
188
|
"zod-to-json-schema": "^3.25.2",
|
|
185
|
-
"@cleocode/lafs": "2026.6.
|
|
189
|
+
"@cleocode/lafs": "2026.6.13"
|
|
186
190
|
},
|
|
187
191
|
"scripts": {
|
|
188
192
|
"build": "tsc -b --force && node scripts/copy-assets.mjs && node scripts/emit-schemas.mjs",
|