@notic/agent-engine 1.2.0 → 2.0.0

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +46 -26
  2. package/README.md +434 -409
  3. package/dist/adapter/AnthropicAdapter.js +2 -2
  4. package/dist/adapter/GeminiAdapter.js +2 -2
  5. package/dist/adapter/OpenAIAdapter.js +2 -2
  6. package/dist/adapter/OpenAIResponsesAdapter.js +2 -2
  7. package/dist/agent/Agent.d.ts +12 -0
  8. package/dist/agent/Agent.d.ts.map +1 -1
  9. package/dist/agent/Agent.js +43 -3
  10. package/dist/agent/Agent.js.map +1 -1
  11. package/dist/index.d.ts +3 -3
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +3 -3
  14. package/dist/index.js.map +1 -1
  15. package/dist/media/BrowserMediaResolver.d.ts +14 -0
  16. package/dist/media/BrowserMediaResolver.d.ts.map +1 -0
  17. package/dist/media/BrowserMediaResolver.js +52 -0
  18. package/dist/media/BrowserMediaResolver.js.map +1 -0
  19. package/dist/media/index.d.ts +1 -0
  20. package/dist/media/index.d.ts.map +1 -1
  21. package/dist/media/index.js +3 -1
  22. package/dist/media/index.js.map +1 -1
  23. package/dist/message/Message.d.ts +7 -0
  24. package/dist/message/Message.d.ts.map +1 -1
  25. package/dist/message/Message.js +32 -0
  26. package/dist/message/Message.js.map +1 -1
  27. package/dist/node.d.ts +3 -0
  28. package/dist/node.d.ts.map +1 -0
  29. package/dist/node.js +6 -0
  30. package/dist/node.js.map +1 -0
  31. package/dist/stream/StreamEvent.d.ts +13 -1
  32. package/dist/stream/StreamEvent.d.ts.map +1 -1
  33. package/dist/stream/StreamEvent.js +2 -0
  34. package/dist/stream/StreamEvent.js.map +1 -1
  35. package/dist/stream/index.d.ts +1 -1
  36. package/dist/stream/index.d.ts.map +1 -1
  37. package/dist/stream/index.js.map +1 -1
  38. package/docs/API.md +1676 -1642
  39. package/package.json +37 -30
package/CHANGELOG.md CHANGED
@@ -1,26 +1,46 @@
1
- # Changelog
2
-
3
- ## 1.2.0 - 2026-06-11
4
-
5
- ### Added
6
-
7
- - Low-coupling Provider architecture composed from `ModelClient`, `MessageAdapter`, and `MessageStreamParser`.
8
- - Native presets for OpenAI Responses, Anthropic Messages, and Gemini, alongside OpenAI-compatible Chat Completions.
9
- - Non-streaming Agent requests through `agent.run(..., { stream: false })` and `runRaw()`.
10
- - Complete-response transport support through optional `ModelClient.complete()`.
11
- - Provider capability inspection through `provider.supportsComplete`.
12
- - Native stream parsers for OpenAI Responses, Anthropic, and Gemini.
13
- - Protocol-preserving reasoning and function-call state for multi-turn tool execution.
14
-
15
- ### Improved
16
-
17
- - Tool approval, interruption, recovery, parser errors, and partial-message handling.
18
- - Provider-specific request option mapping, usage parsing, thinking signatures, and multimodal serialization.
19
- - Session and Message mutation consistency, tool error handling, exports, tests, and package subpaths.
20
- - README and API documentation for Provider configuration and streaming modes.
21
-
22
- ### Compatibility
23
-
24
- - Existing OpenAI-compatible `client` initialization remains supported.
25
- - Existing custom `ModelClient` implementations that only provide `stream()` remain valid.
26
- - Streaming remains the default behavior.
1
+ # Changelog
2
+
3
+ ## 2.0.0 - 2026-06-11
4
+
5
+ ### Added
6
+
7
+ - `agent.generate()` for generating from the current Session without appending a User message.
8
+ - Awaitable `BEFORE_ASSISTANT_COMMIT` lifecycle handlers before Session persistence.
9
+ - `agent.emitAsync()` for ordered, error-propagating asynchronous events.
10
+ - Safe `Message.setText()` and `Message.setParts()` mutation APIs.
11
+ - Browser-safe `BrowserMediaResolver` and an explicit `@notic/agent-engine/node` media subpath.
12
+ - Browser bundling and package export smoke tests.
13
+
14
+ ### Changed
15
+
16
+ - Built-in adapters now default to `BrowserMediaResolver` so the package root contains no Node.js builtin imports.
17
+ - Local file media resolution now requires `DefaultMediaResolver` from `@notic/agent-engine/node` or a custom resolver.
18
+
19
+ ### Breaking
20
+
21
+ - `DefaultMediaResolver` is no longer exported from the package root. Import it from `@notic/agent-engine/node` in Node.js applications.
22
+
23
+ ## 1.2.0 - 2026-06-11
24
+
25
+ ### Added
26
+
27
+ - Low-coupling Provider architecture composed from `ModelClient`, `MessageAdapter`, and `MessageStreamParser`.
28
+ - Native presets for OpenAI Responses, Anthropic Messages, and Gemini, alongside OpenAI-compatible Chat Completions.
29
+ - Non-streaming Agent requests through `agent.run(..., { stream: false })` and `runRaw()`.
30
+ - Complete-response transport support through optional `ModelClient.complete()`.
31
+ - Provider capability inspection through `provider.supportsComplete`.
32
+ - Native stream parsers for OpenAI Responses, Anthropic, and Gemini.
33
+ - Protocol-preserving reasoning and function-call state for multi-turn tool execution.
34
+
35
+ ### Improved
36
+
37
+ - Tool approval, interruption, recovery, parser errors, and partial-message handling.
38
+ - Provider-specific request option mapping, usage parsing, thinking signatures, and multimodal serialization.
39
+ - Session and Message mutation consistency, tool error handling, exports, tests, and package subpaths.
40
+ - README and API documentation for Provider configuration and streaming modes.
41
+
42
+ ### Compatibility
43
+
44
+ - Existing OpenAI-compatible `client` initialization remains supported.
45
+ - Existing custom `ModelClient` implementations that only provide `stream()` remain valid.
46
+ - Streaming remains the default behavior.