@ai-sdk/harness-acp 1.0.24 → 1.0.25
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 +11 -0
- package/dist/bridge/host-tool-mcp.mjs +1 -1
- package/dist/bridge/index.mjs +93 -11
- package/dist/bridge/index.mjs.map +1 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +119 -23
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/src/acp-harness.ts +6 -0
- package/src/v1/acp-bootstrap.ts +12 -0
- package/src/v1/acp-v1-bridge-protocol.ts +14 -0
- package/src/v1/acp-v1-harness.ts +148 -31
- package/src/v1/acp-v1-settings.ts +9 -0
- package/src/v1/bridge/index.ts +44 -18
- package/src/v1/bridge/refresh-host-tool-catalog.ts +28 -0
- package/src/v1/bridge/stream-translator.ts +65 -0
- package/src/v1/implementation.ts +13 -0
package/src/v1/implementation.ts
CHANGED
|
@@ -60,6 +60,9 @@ export function validateACPV1Implementation(
|
|
|
60
60
|
if (source.pnpmLockYaml.length === 0) {
|
|
61
61
|
throw new Error('ACP source.pnpmLockYaml must not be empty.');
|
|
62
62
|
}
|
|
63
|
+
if (source.pnpmWorkspaceYaml?.length === 0) {
|
|
64
|
+
throw new Error('ACP source.pnpmWorkspaceYaml must not be empty.');
|
|
65
|
+
}
|
|
63
66
|
} else if (source.type === 'npm-simple') {
|
|
64
67
|
validateNpmSimpleSource({ source });
|
|
65
68
|
} else if (source.command.trim().length === 0) {
|
|
@@ -133,6 +136,15 @@ export function getImplementationLockfile({
|
|
|
133
136
|
return source.type === 'npm-locked' ? source.pnpmLockYaml : undefined;
|
|
134
137
|
}
|
|
135
138
|
|
|
139
|
+
export function getImplementationWorkspaceFile({
|
|
140
|
+
implementation,
|
|
141
|
+
}: {
|
|
142
|
+
implementation: ACPImplementation;
|
|
143
|
+
}): string | undefined {
|
|
144
|
+
const { source } = implementation;
|
|
145
|
+
return source.type === 'npm-locked' ? source.pnpmWorkspaceYaml : undefined;
|
|
146
|
+
}
|
|
147
|
+
|
|
136
148
|
export function createImplementationDescriptor({
|
|
137
149
|
implementation,
|
|
138
150
|
}: {
|
|
@@ -177,6 +189,7 @@ export function createImplementationIdentity({
|
|
|
177
189
|
type: source.type,
|
|
178
190
|
packageJson: source.packageJson,
|
|
179
191
|
pnpmLockYaml: source.pnpmLockYaml,
|
|
192
|
+
pnpmWorkspaceYaml: source.pnpmWorkspaceYaml,
|
|
180
193
|
}
|
|
181
194
|
: source.type === 'npm-simple'
|
|
182
195
|
? {
|