stitchkit 0.90.4 → 0.90.5
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/CHANGELOG.md +68 -0
- package/dist/agent-runtime-coding-tools.js +3 -3
- package/dist/agent-runtime-harness.js +4 -4
- package/dist/agent-runtime-sandbox.js +3 -3
- package/dist/agent-runtime.js +7 -7
- package/dist/cli.js +60 -17
- package/dist/{index-32vjke6q.js → index-1bnkzq95.js} +1 -1
- package/dist/{index-19ryv24q.js → index-83fafqw8.js} +3 -3
- package/dist/{index-y47z614h.js → index-fqg5mfk7.js} +145 -32
- package/dist/{index-6atvfjc1.js → index-s208wab5.js} +1 -1
- package/dist/{index-7t0wq6j5.js → index-tgh3ksfh.js} +5 -5
- package/dist/{index-kzxpsf8y.js → index-zsdgd1tz.js} +1 -1
- package/dist/index.js +7 -7
- package/dist/node.js +2 -2
- package/dist/observability/index.js +1 -1
- package/dist/remote.js +1 -1
- package/dist/server/index.js +6 -6
- package/dist/testing.js +2 -2
- package/dist/tool-invoker.js +5 -5
- package/dist/tools/cli-args.d.ts +10 -8
- package/dist/tools/cli-args.d.ts.map +1 -1
- package/dist/tools/cli-installer.d.ts +7 -2
- package/dist/tools/cli-installer.d.ts.map +1 -1
- package/dist/tools/cli-view.d.ts.map +1 -1
- package/dist/tools/cli.d.ts.map +1 -1
- package/dist/tools/connections/index.js +37 -4
- package/dist/tools/connections/mcp-envelope.d.ts +44 -0
- package/dist/tools/connections/mcp-envelope.d.ts.map +1 -0
- package/dist/tools/connections/mcp.d.ts.map +1 -1
- package/dist/tools.js +11 -11
- package/dist/tracking.js +1 -1
- package/llms-full.txt +78 -8
- package/package.json +1 -1
- package/dist/{index-8crm1srv.js → index-3yqgj323.js} +3 -3
- package/dist/{index-vcnfwrtr.js → index-8pjqv3zh.js} +6 -6
- package/dist/{index-db51n3xr.js → index-ra6txecz.js} +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,74 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
|
|
|
15
15
|
|
|
16
16
|
## [Unreleased]
|
|
17
17
|
|
|
18
|
+
## [0.90.5] — 2026-09-16
|
|
19
|
+
|
|
20
|
+
Three gaps a consuming project found on the first live surface after adopting
|
|
21
|
+
0.90.4 — each one a place where the framework handed over parts of the job and
|
|
22
|
+
kept the composition for itself.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- **A connection-mounted command on the CLI prints the answer, not the MCP
|
|
27
|
+
envelope.** `tools/call` returns `{ content: [...], structuredContent? }`, and
|
|
28
|
+
an agent mount needs exactly that — the parts are what a model is shown. The
|
|
29
|
+
CLI is different in kind, because the handler's value is what gets printed,
|
|
30
|
+
piped and aggregated. Handed the envelope, the first real command answered
|
|
31
|
+
`no record carries the field "status" — available: text, type`: it was
|
|
32
|
+
grouping the content parts. `--json` had the same defect one layer down, with
|
|
33
|
+
the answer a JSON *string* inside `content[0].text`, so every consumer
|
|
34
|
+
unwrapped before anything else worked. The CLI transport now unwraps, and only
|
|
35
|
+
it: `structuredContent` when the server sent one, a lone text part when it
|
|
36
|
+
parses as JSON, its text when it does not. Several parts, an image or audio
|
|
37
|
+
pass through whole — picking one of many would be inventing an answer.
|
|
38
|
+
|
|
39
|
+
- **A remote tool's refusal keeps its code and details.** `mountConnections` ended
|
|
40
|
+
a failed `tools/call` by throwing a one-sentence `Error` and discarding the
|
|
41
|
+
result. Three things went with it: the code, so `exitCodes` had nothing to map
|
|
42
|
+
and "not found" and "no rights" both exited `1` — the per-class exit codes the
|
|
43
|
+
CLI surface exists to provide could not work over a connection at all; the
|
|
44
|
+
message the operator needed; and the error's own class, because a plain `Error`
|
|
45
|
+
is an *unexpected* error to the runner, which printed a code frame of the
|
|
46
|
+
minified framework bundle before the JSON failure and then scrubbed the whole
|
|
47
|
+
thing to `INTERNAL_SERVER_ERROR`. A structured `{ error, details }` body is now
|
|
48
|
+
relayed as the contract error it is, on every transport — losing a code is
|
|
49
|
+
missing information, not a presentation choice. A refusal without one fails as
|
|
50
|
+
`UPSTREAM_TOOL_ERROR` carrying what the server did send; the status is 502
|
|
51
|
+
either way, because whatever the code says the failure happened upstream.
|
|
52
|
+
|
|
53
|
+
### Added
|
|
54
|
+
|
|
55
|
+
- **`--sort <field>` and `--ascending` — the n largest *records*.** 0.90.4 gave
|
|
56
|
+
`--top` to groups and left "the five biggest, as a table" with no expression,
|
|
57
|
+
because `--table` took neither `--by` nor `--top`. Two readings of `--top`
|
|
58
|
+
would have been exactly the ambiguity that release removed from `--by`, so
|
|
59
|
+
ordering gets its own word: **`--by` groups, `--sort` orders**, and `--top`
|
|
60
|
+
keeps one meaning throughout — the n leading entries of the view that was
|
|
61
|
+
asked for. `--table` and `--sort` describe the same view and therefore
|
|
62
|
+
compose: `--top 5 --sort messages --table id,messages`. `--sort` without
|
|
63
|
+
`--table` returns the ordered records as JSON. A record carrying no value for
|
|
64
|
+
the sort field stays **last in both directions**: it is not the smallest, it
|
|
65
|
+
is not on the scale. `--sort` together with `--by`, `--count-by` or `--sum` is
|
|
66
|
+
refused rather than given a second meaning.
|
|
67
|
+
- **`--help <substring>` — a narrower question than "all of them".** On a
|
|
68
|
+
discovered surface `--help` is the only way to learn what exists, and that can
|
|
69
|
+
be two hundred commands and 230 lines: at that size the list stops being an
|
|
70
|
+
answer, scrolling past a person and costing an agent the same context an
|
|
71
|
+
unfiltered result would. The filter matches a command's name *or* its
|
|
72
|
+
description — the word someone knows is often in the sentence rather than the
|
|
73
|
+
name — and the heading says how many of the total matched. No match exits with
|
|
74
|
+
whatever `NOT_FOUND` maps to rather than succeeding over an empty list, because
|
|
75
|
+
`0` there reads as "there are none", a different statement from "none of
|
|
76
|
+
these". `-h <text>`, `help <text>` and `--help=<text>` are the same question;
|
|
77
|
+
bare `--help` is byte-for-byte unchanged, and `--help=false` keeps its meaning
|
|
78
|
+
as the reserved boolean's negation.
|
|
79
|
+
- **`renderCliInstaller` renders every published target in one script.** Omit
|
|
80
|
+
`asset` and the script selects by `uname` at run time, mapping `x86_64` →
|
|
81
|
+
`x64` and `aarch64` → `arm64` itself, and naming an unpublished combination
|
|
82
|
+
with what *is* published beside it. Passing one `asset` still pins one target.
|
|
83
|
+
That dispatch was the last hand-written piece of the install path, and it is
|
|
84
|
+
the same table every publisher writes from memory. It still parses no JSON.
|
|
85
|
+
|
|
18
86
|
## [0.90.4] — 2026-09-16
|
|
19
87
|
|
|
20
88
|
### Added
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
AgentCodingToolLimitsSchema,
|
|
4
4
|
AgentCodingToolPathAuthorizationSchema,
|
|
5
5
|
createAgentCodingTools
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-3yqgj323.js";
|
|
7
7
|
import"./index-bn2cjajt.js";
|
|
8
8
|
import"./index-gte38nbm.js";
|
|
9
9
|
import"./index-kazec06k.js";
|
|
10
10
|
import"./index-6k1937bx.js";
|
|
11
|
-
import"./index-scs3f1eg.js";
|
|
12
|
-
import"./index-kzfs85xp.js";
|
|
13
11
|
import"./index-8z9we758.js";
|
|
14
12
|
import"./index-fenaekmk.js";
|
|
15
13
|
import"./index-cby4ar3v.js";
|
|
14
|
+
import"./index-scs3f1eg.js";
|
|
15
|
+
import"./index-kzfs85xp.js";
|
|
16
16
|
import"./index-77fekveh.js";
|
|
17
17
|
export {
|
|
18
18
|
createAgentCodingTools,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
composeAgentPrompt,
|
|
7
7
|
createAgentRuntime,
|
|
8
8
|
createAgentRuntimeEventSink
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-s208wab5.js";
|
|
10
10
|
import"./index-p13mwz16.js";
|
|
11
11
|
import"./index-y64k3s0h.js";
|
|
12
12
|
import {
|
|
@@ -19,21 +19,21 @@ import {
|
|
|
19
19
|
walkContainedFiles
|
|
20
20
|
} from "./index-bn2cjajt.js";
|
|
21
21
|
import"./index-7rkhw9ec.js";
|
|
22
|
-
import"./index-
|
|
22
|
+
import"./index-8pjqv3zh.js";
|
|
23
23
|
import"./index-vsbzgd7b.js";
|
|
24
24
|
import"./index-f9mb610r.js";
|
|
25
25
|
import"./index-2hryh65w.js";
|
|
26
26
|
import"./index-kazec06k.js";
|
|
27
27
|
import"./index-6k1937bx.js";
|
|
28
|
-
import"./index-scs3f1eg.js";
|
|
29
28
|
import"./index-zcgf3gqf.js";
|
|
30
29
|
import"./index-7zbps32p.js";
|
|
31
|
-
import"./index-kzfs85xp.js";
|
|
32
30
|
import {
|
|
33
31
|
defineRuntimeTool
|
|
34
32
|
} from "./index-8z9we758.js";
|
|
35
33
|
import"./index-fenaekmk.js";
|
|
36
34
|
import"./index-cby4ar3v.js";
|
|
35
|
+
import"./index-scs3f1eg.js";
|
|
36
|
+
import"./index-kzfs85xp.js";
|
|
37
37
|
import"./index-77fekveh.js";
|
|
38
38
|
|
|
39
39
|
// src/agent-runtime/harness-contract.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAgentCodingTools
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-3yqgj323.js";
|
|
4
4
|
import"./index-bn2cjajt.js";
|
|
5
5
|
import {
|
|
6
6
|
codingRefusal,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./index-gte38nbm.js";
|
|
10
10
|
import"./index-kazec06k.js";
|
|
11
11
|
import"./index-6k1937bx.js";
|
|
12
|
-
import"./index-scs3f1eg.js";
|
|
13
|
-
import"./index-kzfs85xp.js";
|
|
14
12
|
import"./index-8z9we758.js";
|
|
15
13
|
import"./index-fenaekmk.js";
|
|
16
14
|
import"./index-cby4ar3v.js";
|
|
15
|
+
import"./index-scs3f1eg.js";
|
|
16
|
+
import"./index-kzfs85xp.js";
|
|
17
17
|
import"./index-77fekveh.js";
|
|
18
18
|
|
|
19
19
|
// src/agent-runtime/sandbox-bubblewrap.ts
|
package/dist/agent-runtime.js
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
renderAgentStateSlots,
|
|
32
32
|
repairedSearchCall,
|
|
33
33
|
selectAgentHistory
|
|
34
|
-
} from "./index-
|
|
34
|
+
} from "./index-s208wab5.js";
|
|
35
35
|
import"./index-p13mwz16.js";
|
|
36
36
|
import {
|
|
37
37
|
AgentAdmissionEventSchema,
|
|
@@ -169,28 +169,28 @@ import {
|
|
|
169
169
|
import {
|
|
170
170
|
buildToolManifest,
|
|
171
171
|
mountAgent
|
|
172
|
-
} from "./index-
|
|
172
|
+
} from "./index-83fafqw8.js";
|
|
173
173
|
import"./index-7rkhw9ec.js";
|
|
174
|
-
import"./index-
|
|
175
|
-
import"./index-
|
|
176
|
-
import"./index-
|
|
174
|
+
import"./index-zsdgd1tz.js";
|
|
175
|
+
import"./index-1bnkzq95.js";
|
|
176
|
+
import"./index-8pjqv3zh.js";
|
|
177
177
|
import"./index-vsbzgd7b.js";
|
|
178
178
|
import"./index-f9mb610r.js";
|
|
179
179
|
import"./index-2hryh65w.js";
|
|
180
180
|
import"./index-kazec06k.js";
|
|
181
181
|
import"./index-6k1937bx.js";
|
|
182
|
-
import"./index-scs3f1eg.js";
|
|
183
182
|
import {
|
|
184
183
|
childSpan,
|
|
185
184
|
createTraceContext
|
|
186
185
|
} from "./index-zcgf3gqf.js";
|
|
187
186
|
import"./index-7zbps32p.js";
|
|
188
|
-
import"./index-kzfs85xp.js";
|
|
189
187
|
import {
|
|
190
188
|
defineRuntimeTool
|
|
191
189
|
} from "./index-8z9we758.js";
|
|
192
190
|
import"./index-fenaekmk.js";
|
|
193
191
|
import"./index-cby4ar3v.js";
|
|
192
|
+
import"./index-scs3f1eg.js";
|
|
193
|
+
import"./index-kzfs85xp.js";
|
|
194
194
|
import {
|
|
195
195
|
executableAgentRuntimeTools
|
|
196
196
|
} from "./index-77fekveh.js";
|
package/dist/cli.js
CHANGED
|
@@ -11,29 +11,29 @@ import {
|
|
|
11
11
|
readCapped,
|
|
12
12
|
renderCliView,
|
|
13
13
|
routeCliArgv
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-fqg5mfk7.js";
|
|
15
15
|
import"./index-sbdmyz75.js";
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
16
|
+
import"./index-zsdgd1tz.js";
|
|
17
|
+
import"./index-1bnkzq95.js";
|
|
18
|
+
import"./index-8pjqv3zh.js";
|
|
19
19
|
import"./index-vsbzgd7b.js";
|
|
20
20
|
import"./index-f9mb610r.js";
|
|
21
21
|
import"./index-2hryh65w.js";
|
|
22
22
|
import"./index-kazec06k.js";
|
|
23
23
|
import"./index-6k1937bx.js";
|
|
24
|
-
import {
|
|
25
|
-
AppError
|
|
26
|
-
} from "./index-scs3f1eg.js";
|
|
27
24
|
import"./index-zcgf3gqf.js";
|
|
28
25
|
import {
|
|
29
26
|
coerceJsonArgs
|
|
30
27
|
} from "./index-7zbps32p.js";
|
|
31
|
-
import {
|
|
32
|
-
safeJsonParse
|
|
33
|
-
} from "./index-kzfs85xp.js";
|
|
34
28
|
import"./index-8z9we758.js";
|
|
35
29
|
import"./index-fenaekmk.js";
|
|
36
30
|
import"./index-cby4ar3v.js";
|
|
31
|
+
import {
|
|
32
|
+
AppError
|
|
33
|
+
} from "./index-scs3f1eg.js";
|
|
34
|
+
import {
|
|
35
|
+
safeJsonParse
|
|
36
|
+
} from "./index-kzfs85xp.js";
|
|
37
37
|
import"./index-77fekveh.js";
|
|
38
38
|
// src/tools/cli-installer.ts
|
|
39
39
|
function shellQuote(value) {
|
|
@@ -42,20 +42,21 @@ function shellQuote(value) {
|
|
|
42
42
|
function renderCliInstaller(config) {
|
|
43
43
|
const binary = config.binaryName ?? config.manifest.name;
|
|
44
44
|
const installDir = config.installDir ?? "$HOME/.local/bin";
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
const assets = config.asset ? [config.asset] : config.manifest.assets;
|
|
46
|
+
if (assets.length === 0) {
|
|
47
|
+
throw new Error("[stitchkit] a build manifest with no assets installs nothing");
|
|
48
|
+
}
|
|
49
|
+
const selection = assets.length === 1 && assets[0] !== undefined ? singleTarget(assets[0]) : unameDispatch(assets);
|
|
48
50
|
return `#!/bin/sh
|
|
49
51
|
# ${binary} ${config.manifest.version} (${config.manifest.commit})
|
|
50
52
|
# Generated from the build manifest — it parses no JSON and needs no jq.
|
|
51
53
|
set -eu
|
|
52
54
|
|
|
53
|
-
url=${shellQuote(config.asset.url)}
|
|
54
|
-
sha256=${shellQuote(config.asset.sha256)}
|
|
55
|
-
size=${shellQuote(String(config.asset.size))}
|
|
56
55
|
binary=${shellQuote(binary)}
|
|
57
56
|
dir="\${INSTALL_DIR:-${installDir}}"
|
|
58
57
|
|
|
58
|
+
${selection}
|
|
59
|
+
|
|
59
60
|
fetch() {
|
|
60
61
|
if command -v curl >/dev/null 2>&1; then
|
|
61
62
|
curl -fsSL "$1" -o "$2"
|
|
@@ -84,7 +85,12 @@ tmp="$(mktemp -d)"
|
|
|
84
85
|
trap 'rm -rf "$tmp"' EXIT
|
|
85
86
|
|
|
86
87
|
fetch "$url" "$tmp/download"
|
|
87
|
-
$
|
|
88
|
+
if [ "$compression" = "gzip" ]; then
|
|
89
|
+
gzip -dc "$tmp/download" > "$tmp/binary"
|
|
90
|
+
else
|
|
91
|
+
mv "$tmp/download" "$tmp/binary"
|
|
92
|
+
fi
|
|
93
|
+
|
|
88
94
|
actual="$(digest "$tmp/binary")"
|
|
89
95
|
if [ "$actual" != "$sha256" ]; then
|
|
90
96
|
echo "checksum mismatch: expected $sha256, got $actual" >&2
|
|
@@ -110,6 +116,43 @@ case ":$PATH:" in
|
|
|
110
116
|
esac
|
|
111
117
|
`;
|
|
112
118
|
}
|
|
119
|
+
function singleTarget(asset) {
|
|
120
|
+
return [
|
|
121
|
+
`url=${shellQuote(asset.url)}`,
|
|
122
|
+
`sha256=${shellQuote(asset.sha256)}`,
|
|
123
|
+
`size=${shellQuote(String(asset.size))}`,
|
|
124
|
+
`compression=${shellQuote(asset.compression)}`
|
|
125
|
+
].join(`
|
|
126
|
+
`);
|
|
127
|
+
}
|
|
128
|
+
function unameDispatch(assets) {
|
|
129
|
+
const cases = assets.map((asset) => ` ${asset.platform}/${asset.arch})
|
|
130
|
+
url=${shellQuote(asset.url)}
|
|
131
|
+
sha256=${shellQuote(asset.sha256)}
|
|
132
|
+
size=${shellQuote(String(asset.size))}
|
|
133
|
+
compression=${shellQuote(asset.compression)}
|
|
134
|
+
;;`).join(`
|
|
135
|
+
`);
|
|
136
|
+
const published = assets.map((asset) => `${asset.platform}/${asset.arch}`).join(", ");
|
|
137
|
+
return `case "$(uname -s)" in
|
|
138
|
+
Darwin) platform=darwin ;;
|
|
139
|
+
Linux) platform=linux ;;
|
|
140
|
+
*) platform="$(uname -s)" ;;
|
|
141
|
+
esac
|
|
142
|
+
case "$(uname -m)" in
|
|
143
|
+
x86_64|amd64) arch=x64 ;;
|
|
144
|
+
aarch64|arm64) arch=arm64 ;;
|
|
145
|
+
*) arch="$(uname -m)" ;;
|
|
146
|
+
esac
|
|
147
|
+
|
|
148
|
+
case "$platform/$arch" in
|
|
149
|
+
${cases}
|
|
150
|
+
*)
|
|
151
|
+
echo "no published build for $platform/$arch — published: ${published}" >&2
|
|
152
|
+
exit 1
|
|
153
|
+
;;
|
|
154
|
+
esac`;
|
|
155
|
+
}
|
|
113
156
|
// src/tools/cli-manifest.ts
|
|
114
157
|
import { z } from "zod";
|
|
115
158
|
var CliBuildTargetSchema = z.object({
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
} from "./index-7rkhw9ec.js";
|
|
5
5
|
import {
|
|
6
6
|
collectToolSurface
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-zsdgd1tz.js";
|
|
8
8
|
import {
|
|
9
9
|
createToolRunner,
|
|
10
10
|
formatToolError
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-1bnkzq95.js";
|
|
12
12
|
import {
|
|
13
13
|
isToolExecutionControlError,
|
|
14
14
|
toolCauseFromResult,
|
|
15
15
|
toolResultFromError
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-8pjqv3zh.js";
|
|
17
17
|
import {
|
|
18
18
|
isRecord
|
|
19
19
|
} from "./index-77fekveh.js";
|