@ai-sdk/harness-acp 1.0.62 → 1.0.64
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 +20 -0
- package/README.md +8 -6
- package/dist/bridge/host-tool-mcp.mjs +1 -1
- package/dist/bridge/index.mjs +8 -5
- package/dist/bridge/index.mjs.map +1 -1
- package/dist/bridge/package.json +1 -1
- package/dist/bridge/pnpm-lock.yaml +5 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/package.json +4 -4
- package/src/acp-tool-call.ts +1 -0
- package/src/v1/bridge/host-tool-correlation.ts +6 -0
- package/src/v1/bridge/package.json +1 -1
- package/src/v1/bridge/pnpm-lock.yaml +5 -5
- package/src/v1/bridge/stream-translator.ts +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @ai-sdk/harness-acp
|
|
2
2
|
|
|
3
|
+
## 1.0.64
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- af9597b: Compile packages for ES2022 runtime target
|
|
8
|
+
- be13602: feat(harness-acp): update to latest ACP SDK and use new `tool.name` field when present to determine tool identity
|
|
9
|
+
- Updated dependencies [af9597b]
|
|
10
|
+
- Updated dependencies [31742b9]
|
|
11
|
+
- Updated dependencies [bc49f78]
|
|
12
|
+
- @ai-sdk/harness@1.0.126
|
|
13
|
+
- @ai-sdk/provider-utils@5.0.49
|
|
14
|
+
|
|
15
|
+
## 1.0.63
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [be877ff]
|
|
20
|
+
- @ai-sdk/provider-utils@5.0.48
|
|
21
|
+
- @ai-sdk/harness@1.0.125
|
|
22
|
+
|
|
3
23
|
## 1.0.62
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ authentication:
|
|
|
24
24
|
import { HarnessAgent } from '@ai-sdk/harness/agent';
|
|
25
25
|
import { createACP } from '@ai-sdk/harness-acp';
|
|
26
26
|
import { createCredentialRequestTransformation } from '@ai-sdk/harness/utils';
|
|
27
|
-
import {
|
|
27
|
+
import { createVercelNetworkSandboxSession } from '@ai-sdk/sandbox-vercel';
|
|
28
28
|
|
|
29
29
|
const codexACP = createACP({
|
|
30
30
|
harnessId: 'acp-codex',
|
|
@@ -73,13 +73,14 @@ const codexACP = createACP({
|
|
|
73
73
|
|
|
74
74
|
const agent = new HarnessAgent({
|
|
75
75
|
harness: codexACP,
|
|
76
|
-
sandbox: createVercelSandbox({
|
|
77
|
-
runtime: 'node24',
|
|
78
|
-
ports: [4000],
|
|
79
|
-
}),
|
|
80
76
|
});
|
|
81
77
|
|
|
82
|
-
const
|
|
78
|
+
const sandboxSession = await createVercelNetworkSandboxSession({
|
|
79
|
+
runtime: 'node24',
|
|
80
|
+
ports: [4000],
|
|
81
|
+
template: await agent.getSandboxTemplate(),
|
|
82
|
+
});
|
|
83
|
+
const session = await agent.createSession({ sandboxSession });
|
|
83
84
|
try {
|
|
84
85
|
const result = await agent.generate({
|
|
85
86
|
session,
|
|
@@ -88,6 +89,7 @@ try {
|
|
|
88
89
|
console.log(result.text);
|
|
89
90
|
} finally {
|
|
90
91
|
await session.destroy();
|
|
92
|
+
await sandboxSession.destroy();
|
|
91
93
|
}
|
|
92
94
|
```
|
|
93
95
|
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
ListToolsRequestSchema,
|
|
13
13
|
McpError
|
|
14
14
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
15
|
-
var VERSION = true ? "1.0.
|
|
15
|
+
var VERSION = true ? "1.0.64" : "0.0.0-test";
|
|
16
16
|
function createHostToolMCPServer({
|
|
17
17
|
tools: tools2,
|
|
18
18
|
revision = 1,
|
package/dist/bridge/index.mjs
CHANGED
|
@@ -1589,13 +1589,11 @@ function mergeToolUpdate({
|
|
|
1589
1589
|
state.values[property] = parsed[property];
|
|
1590
1590
|
}
|
|
1591
1591
|
}
|
|
1592
|
-
const programmaticName = getStringProperty2({
|
|
1593
|
-
value: rawUpdate,
|
|
1594
|
-
property: "name"
|
|
1595
|
-
});
|
|
1592
|
+
const programmaticName = getStringProperty2({ value: update, property: "name" }) ?? getStringProperty2({ value: rawUpdate, property: "name" });
|
|
1596
1593
|
if (programmaticName != null) state.values.name = programmaticName;
|
|
1597
1594
|
}
|
|
1598
1595
|
function createACPToolCall({ state }) {
|
|
1596
|
+
const name2 = getStringProperty2({ value: state.values, property: "name" });
|
|
1599
1597
|
const title = getStringProperty2({
|
|
1600
1598
|
value: state.values,
|
|
1601
1599
|
property: "title"
|
|
@@ -1604,6 +1602,7 @@ function createACPToolCall({ state }) {
|
|
|
1604
1602
|
const status = state.values.status;
|
|
1605
1603
|
return {
|
|
1606
1604
|
toolCallId: state.toolCallId,
|
|
1605
|
+
...name2 == null ? {} : { name: name2 },
|
|
1607
1606
|
title: title ?? state.toolName ?? `Tool ${state.toolCallId}`,
|
|
1608
1607
|
...isACPToolKind(kind) ? { kind } : {},
|
|
1609
1608
|
...isACPToolCallStatus(status) ? { status } : {},
|
|
@@ -1979,6 +1978,7 @@ function mergeObservedToolCall({
|
|
|
1979
1978
|
}) {
|
|
1980
1979
|
return {
|
|
1981
1980
|
toolCallId: update.toolCallId,
|
|
1981
|
+
...(update.name ?? previous?.name) == null ? {} : { name: update.name ?? previous?.name },
|
|
1982
1982
|
title: update.title ?? previous?.title ?? `Tool ${update.toolCallId}`,
|
|
1983
1983
|
...update.kind == null ? {} : { kind: update.kind },
|
|
1984
1984
|
...update.status == null ? {} : { status: update.status },
|
|
@@ -2003,6 +2003,9 @@ function hasPortableEvidence({
|
|
|
2003
2003
|
value: evidence,
|
|
2004
2004
|
property: "name"
|
|
2005
2005
|
});
|
|
2006
|
+
if (programmaticName === invocation.toolName) {
|
|
2007
|
+
hasToolName = true;
|
|
2008
|
+
}
|
|
2006
2009
|
const deferredToolName = getProperty({
|
|
2007
2010
|
value: rawInput,
|
|
2008
2011
|
property: "tool_name"
|
|
@@ -2413,7 +2416,7 @@ import {
|
|
|
2413
2416
|
ListToolsRequestSchema,
|
|
2414
2417
|
McpError
|
|
2415
2418
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
2416
|
-
var VERSION = true ? "1.0.
|
|
2419
|
+
var VERSION = true ? "1.0.64" : "0.0.0-test";
|
|
2417
2420
|
function createHostToolMCPServer({
|
|
2418
2421
|
tools,
|
|
2419
2422
|
revision = 1,
|