@jini-ai/agent-runtime 0.4.0 → 0.4.1

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 CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.4.1 — 2026-10-06
2
+
3
+ - Tool turns accept message `images` (`{ mimeType, data }`) and deliver them to providers as image content.
4
+ - Runtime `@jini-ai/*` deps are `workspace:^` (pack as caret ranges).
5
+
1
6
  # @jini-ai/agent-runtime
2
7
 
3
8
  ## 0.4.0 — 2026-10-02
@@ -19,6 +19,11 @@ export type ProviderProtocol = "anthropic" | "openai" | "azure" | "google";
19
19
  export interface ProviderChatMessage {
20
20
  readonly role: "user" | "assistant";
21
21
  readonly content: string;
22
+ /** Shared attachment pixels, translated only at the existing wire adapter seam. */
23
+ readonly images?: readonly {
24
+ readonly mimeType: string;
25
+ readonly data: string;
26
+ }[];
22
27
  }
23
28
  export type ProviderTurnEvent = {
24
29
  readonly type: "status";
@@ -69,7 +69,9 @@ async function runAnthropicTurn(input) {
69
69
  ...(d.description !== undefined ? { description: d.description } : {}),
70
70
  input_schema: inputSchemaOf(d),
71
71
  }));
72
- const messages = input.messages.map((m) => ({ role: m.role, content: m.content }));
72
+ const messages = input.messages.map((m) => ({ role: m.role, content: m.images?.length ? toAnthropicToolContent([
73
+ { type: 'text', text: m.content }, ...m.images.map(image => ({ type: 'image', ...image })),
74
+ ]) : m.content }));
73
75
  const executeTool = async (call) => {
74
76
  const result = await input.executeTool({ id: call.id, name: call.name, input: call.input });
75
77
  return { content: toAnthropicToolContent(result.content), ...(result.isError !== undefined ? { isError: result.isError } : {}) };
@@ -112,7 +114,9 @@ async function runOpenAiTurn(input) {
112
114
  }));
113
115
  const messages = [
114
116
  { role: "system", content: input.system },
115
- ...input.messages.map((m) => ({ role: m.role, content: m.content })),
117
+ ...input.messages.map((m) => ({ role: m.role, content: m.images?.length ? toOpenAiToolContent([
118
+ { type: 'text', text: m.content }, ...m.images.map(image => ({ type: 'image', ...image })),
119
+ ]) : m.content })),
116
120
  ];
117
121
  const executeTool = async (call) => {
118
122
  const result = await input.executeTool({ id: call.id, name: call.name, input: call.input });
@@ -156,7 +160,9 @@ async function runAzureTurn(input) {
156
160
  }));
157
161
  const messages = [
158
162
  { role: "system", content: input.system },
159
- ...input.messages.map((m) => ({ role: m.role, content: m.content })),
163
+ ...input.messages.map((m) => ({ role: m.role, content: m.images?.length ? toOpenAiToolContent([
164
+ { type: 'text', text: m.content }, ...m.images.map(image => ({ type: 'image', ...image })),
165
+ ]) : m.content })),
160
166
  ];
161
167
  const executeTool = async (call) => {
162
168
  const result = await input.executeTool({ id: call.id, name: call.name, input: call.input });
@@ -195,7 +201,7 @@ async function runGoogleTurn(input) {
195
201
  const numericEnumPathsByToolName = new Map(input.tools.map((d) => [d.id, findNumericEnumPaths({ schema: inputSchemaOf(d) })]));
196
202
  const contents = input.messages.map((m) => ({
197
203
  role: m.role === "assistant" ? "model" : "user",
198
- parts: [{ text: m.content }],
204
+ parts: [{ text: m.content }, ...(m.images ?? []).map(image => ({ inlineData: image }))],
199
205
  }));
200
206
  const executeTool = async (call) => {
201
207
  const coercedInput = coerceNumericEnumStringsToNumbers({ input: call.input, paths: numericEnumPathsByToolName.get(call.name) ?? [] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jini-ai/agent-runtime",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Coding-agent runtime adapters: runtime registry, detection, launch, stream parsers, and the ACP/pi-rpc subprocess transport.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -76,9 +76,9 @@
76
76
  },
77
77
  "dependencies": {
78
78
  "@jini-ai/core": "^0.4.0",
79
- "@jini-ai/platform": "0.5.0",
80
- "@jini-ai/oauth": "0.2.0",
81
- "@jini-ai/protocol": "0.4.0"
79
+ "@jini-ai/protocol": "^0.4.1",
80
+ "@jini-ai/platform": "^0.5.1",
81
+ "@jini-ai/oauth": "^0.2.0"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@vitest/coverage-v8": "^2.1.9"