@opencode/ai 0.0.0-dev-1338 → 0.0.0-dev-1343

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.
@@ -1,5 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
  import { Protocol } from "../route/protocol.js";
3
+ import type { CompactOperation } from "../route/client.js";
3
4
  import { OpenResponses } from "./open-responses.js";
4
5
  declare const Options: Schema.Struct<{
5
6
  readonly minP: Schema.optional<Schema.Number>;
@@ -289,5 +290,5 @@ export declare const protocol: Protocol<{
289
290
  readonly status?: unknown;
290
291
  readonly status_code?: unknown;
291
292
  }, OpenResponses.ParserState>;
292
- export declare const compact: import("../route/client.js").CompactOperation;
293
+ export declare const compact: CompactOperation;
293
294
  export * as XAIResponses from "./xai-responses.js";
@@ -78,5 +78,8 @@ export const protocol = Protocol.make({
78
78
  },
79
79
  stream: ResponsesHostedTools.stream(adapter, HOSTED_TOOLS),
80
80
  });
81
- export const compact = ResponsesCompaction.make(adapter, (request) => OpenResponses.lowerTools(ProviderShared.flattenTools(request.tools), adapter, OpenAIFreeform.tools(request)));
81
+ const compactFlat = ResponsesCompaction.make(adapter, (request) => OpenResponses.lowerTools(ProviderShared.flattenTools(request.tools), adapter, OpenAIFreeform.tools(request)));
82
+ // /compact lowers the history itself, so flatten the whole request as `Protocol.make` does before every step's body:
83
+ // past calls to namespaced tools then carry the same names as on those steps, and /compact reads the prefix they cached.
84
+ export const compact = (request, executor, options) => compactFlat(ProviderShared.flattenRequest(request), executor, options);
82
85
  export * as XAIResponses from "./xai-responses.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "0.0.0-dev-1338",
3
+ "version": "0.0.0-dev-1343",
4
4
  "name": "@opencode/ai",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -624,7 +624,7 @@
624
624
  "devDependencies": {
625
625
  "@clack/prompts": "1.0.0-alpha.1",
626
626
  "@effect/platform-node": "4.1.0",
627
- "@opencode/http-recorder": "0.0.0-dev-1338",
627
+ "@opencode/http-recorder": "0.0.0-dev-1343",
628
628
  "@tsconfig/bun": "1.0.9",
629
629
  "@types/bun": "1.4.3",
630
630
  "@typescript/native": "npm:typescript@7.1.0-beta",
@@ -634,7 +634,7 @@
634
634
  "@aws-sdk/credential-providers": "3.1057.0",
635
635
  "@smithy/eventstream-codec": "4.2.14",
636
636
  "@smithy/util-utf8": "4.2.2",
637
- "@opencode/schema": "0.0.0-dev-1338",
637
+ "@opencode/schema": "0.0.0-dev-1343",
638
638
  "aws4fetch": "1.0.20",
639
639
  "effect": "4.1.0",
640
640
  "google-auth-library": "10.5.0"