@adonis-agora/agent 0.45.0 → 0.47.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.
- package/CHANGELOG.md +29 -0
- package/dist/assets/spa/assets/{index-7XqfoeQH.js → index-Be6OClIm.js} +1 -1
- package/dist/assets/spa/index.html +1 -1
- package/dist/providers/agent_provider.d.ts +1 -1
- package/dist/providers/agent_provider.d.ts.map +1 -1
- package/dist/providers/agent_provider.js +112 -33
- package/dist/providers/agent_provider.js.map +1 -1
- package/dist/src/agent-service.d.ts +27 -8
- package/dist/src/agent-service.d.ts.map +1 -1
- package/dist/src/agent-service.js +66 -7
- package/dist/src/agent-service.js.map +1 -1
- package/dist/src/ai-sdk/ai-sdk-model.d.ts +30 -13
- package/dist/src/ai-sdk/ai-sdk-model.d.ts.map +1 -1
- package/dist/src/ai-sdk/ai-sdk-model.js +160 -89
- package/dist/src/ai-sdk/ai-sdk-model.js.map +1 -1
- package/dist/src/ai-sdk/index.d.ts +1 -1
- package/dist/src/ai-sdk/index.d.ts.map +1 -1
- package/dist/src/ai-sdk/index.js +1 -1
- package/dist/src/ai-sdk/index.js.map +1 -1
- package/dist/src/ai-tool-ref.d.ts +23 -8
- package/dist/src/ai-tool-ref.d.ts.map +1 -1
- package/dist/src/ai-tool-ref.js +21 -4
- package/dist/src/ai-tool-ref.js.map +1 -1
- package/dist/src/anonymous-actor-resolver.d.ts +38 -0
- package/dist/src/anonymous-actor-resolver.d.ts.map +1 -0
- package/dist/src/anonymous-actor-resolver.js +76 -0
- package/dist/src/anonymous-actor-resolver.js.map +1 -0
- package/dist/src/authorizer.d.ts +4 -3
- package/dist/src/authorizer.d.ts.map +1 -1
- package/dist/src/authorizer.js +5 -4
- package/dist/src/authorizer.js.map +1 -1
- package/dist/src/define_config.d.ts +31 -32
- package/dist/src/define_config.d.ts.map +1 -1
- package/dist/src/define_config.js +2 -2
- package/dist/src/define_config.js.map +1 -1
- package/dist/src/durable/agent-run-workflow.d.ts.map +1 -1
- package/dist/src/durable/agent-run-workflow.js +8 -1
- package/dist/src/durable/agent-run-workflow.js.map +1 -1
- package/dist/src/durable/durable-agent-runner.d.ts.map +1 -1
- package/dist/src/durable/durable-agent-runner.js +3 -0
- package/dist/src/durable/durable-agent-runner.js.map +1 -1
- package/dist/src/index.d.ts +6 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -5
- package/dist/src/index.js.map +1 -1
- package/dist/src/media/index.d.ts +7 -0
- package/dist/src/media/index.d.ts.map +1 -0
- package/dist/src/media/index.js +7 -0
- package/dist/src/media/index.js.map +1 -0
- package/dist/src/media/media-attachment-staging.d.ts +115 -0
- package/dist/src/media/media-attachment-staging.d.ts.map +1 -0
- package/dist/src/media/media-attachment-staging.js +145 -0
- package/dist/src/media/media-attachment-staging.js.map +1 -0
- package/dist/src/runners/inline-agent-runner.d.ts +3 -1
- package/dist/src/runners/inline-agent-runner.d.ts.map +1 -1
- package/dist/src/runners/inline-agent-runner.js +17 -1
- package/dist/src/runners/inline-agent-runner.js.map +1 -1
- package/dist/src/spi/agent-store.d.ts +8 -0
- package/dist/src/spi/agent-store.d.ts.map +1 -1
- package/dist/src/spi/agent-store.js +8 -1
- package/dist/src/spi/agent-store.js.map +1 -1
- package/dist/src/spi/attachment-staging.d.ts +30 -12
- package/dist/src/spi/attachment-staging.d.ts.map +1 -1
- package/dist/src/stores/factory.d.ts +18 -65
- package/dist/src/stores/factory.d.ts.map +1 -1
- package/dist/src/stores/factory.js +24 -56
- package/dist/src/stores/factory.js.map +1 -1
- package/dist/src/stores/lucid.d.ts +1 -0
- package/dist/src/stores/lucid.d.ts.map +1 -1
- package/dist/src/stores/lucid.js +9 -2
- package/dist/src/stores/lucid.js.map +1 -1
- package/dist/src/testing/in-memory-attachment-staging.d.ts +7 -1
- package/dist/src/testing/in-memory-attachment-staging.d.ts.map +1 -1
- package/dist/src/testing/in-memory-attachment-staging.js +22 -2
- package/dist/src/testing/in-memory-attachment-staging.js.map +1 -1
- package/dist/src/testing/in-memory-store.d.ts +1 -0
- package/dist/src/testing/in-memory-store.d.ts.map +1 -1
- package/dist/src/testing/in-memory-store.js +7 -1
- package/dist/src/testing/in-memory-store.js.map +1 -1
- package/dist/src/tool-registry.d.ts +5 -1
- package/dist/src/tool-registry.d.ts.map +1 -1
- package/dist/src/tool-registry.js +8 -2
- package/dist/src/tool-registry.js.map +1 -1
- package/dist/src/types.d.ts +43 -8
- package/dist/src/types.d.ts.map +1 -1
- package/dist/stubs/config/agent.stub +12 -13
- package/package.json +10 -1
- package/skills/agent-governance/SKILL.md +4 -3
- package/skills/agent-personas-agents/SKILL.md +3 -3
- package/skills/agent-setup/SKILL.md +39 -69
- package/skills/agent-tools/SKILL.md +11 -10
- package/dist/src/stores/ledger-quota.d.ts +0 -23
- package/dist/src/stores/ledger-quota.d.ts.map +0 -1
- package/dist/src/stores/ledger-quota.js +0 -32
- package/dist/src/stores/ledger-quota.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @adonis-agora/agent
|
|
2
2
|
|
|
3
|
+
## 0.47.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#218](https://github.com/DavideCarvalho/adonis-agora-agent/pull/218) [`a27f79b`](https://github.com/DavideCarvalho/adonis-agora-agent/commit/a27f79bc2f7a0d5dceb6b1ffa7b857ca467fab25) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Chat attachments by id, media-backed, bring-your-own storage — matching `@dudousxd/nestjs-agent`'s refs-only contract.
|
|
8
|
+
|
|
9
|
+
- **One `attachments` option (BREAKING).** `attachments: attachmentStores.media()` stores uploads through `@adonis-agora/media` (an optional peer; any Drive disk — S3, GCS, R2, the filesystem): a media row per file in its own collection, owned by the actor, with signed short-lived urls by default (`visibility`, `urlExpiresInSeconds`, `resolveUrl`, `canAccess`, `maxBytes`, `allowedContentTypes`, `disk`, `collection`). `attachmentStores.memory({ maxBytes?, allowedContentTypes? })` for tests; or pass your own `AttachmentStagingStore`. Replaces `attachmentStaging`, `attachmentMaxBytes` and `attachmentAllowedContentTypes`; limits now come from the store's `describe()`. `@adonis-agora/agent/media` exports `MediaAttachmentStaging` to wire over a media setup of your own.
|
|
10
|
+
- **Refs only (BREAKING).** `POST /agent/chat` takes `attachments: [{ mediaId }]` — anything else in an entry is `400`, at most 10 — and resolves each through the store for the calling actor (`403` for one it may not use, `501` when attachments are off). The url the model fetches is never taken from the request.
|
|
11
|
+
- **`AttachmentStagingStore.resolve({ mediaId, actor })`** is now required (the store mints the url per request); `describe()` is optional. `GET /agent/threads/:id` re-mints each attachment's url by `mediaId`, so an old turn's signed link has not expired. `GET /agent/config` reports the store's limits.
|
|
12
|
+
|
|
13
|
+
- [#216](https://github.com/DavideCarvalho/adonis-agora-agent/pull/216) [`b032763`](https://github.com/DavideCarvalho/adonis-agora-agent/commit/b03276346c6a7679b795a598da06f49c945a7f57) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - One way each, matching `@dudousxd/nestjs-agent`'s consolidation ([#230](https://github.com/DavideCarvalho/adonis-agora-agent/issues/230)):
|
|
14
|
+
|
|
15
|
+
- **One `quota` option (BREAKING).** `quota: { limits: { day?: { tokens?, usd? }, month?: { tokens?, usd? } } }` or a `QuotaProvider`. The `quotas.*` factories (`ledger`, `memory`, `windows`), `LedgerQuotaStore` and `QuotaStore`-as-`quota` are removed; migrate `quota: quotas.ledger({ limitTokens: N })` to `quota: { limits: { day: { tokens: N } } }`. The check moved to the send (`429 quota_exceeded` before the turn starts). Drain in-flight durable runs started under the old option first — their journals hold the loop's quota checkpoints.
|
|
16
|
+
- **`GET /agent/quota/today` removed** — read the day window of `GET /agent/quota`. The governance dashboard now does.
|
|
17
|
+
- **`activeRunId` only.** Thread summaries and details carry `activeRunId` (the run streaming right now, `null` otherwise) instead of `ThreadDetail.activeStreamId`. The runners set it before a turn starts and clear it when it ends (`clearActiveStream`, optional on `AgentStore`, only clears a pointer still naming that run), so a reloading client resumes only a live run.
|
|
18
|
+
- **`GET /agent/config`** — `{ attachments: { enabled, upload, maxBytes, allowedContentTypes, maxPerMessage }, models: { enabled }, quota: { enforced }, identity: { anonymous } }`, what the React `useAgentConfig` reads.
|
|
19
|
+
|
|
20
|
+
## 0.46.0
|
|
21
|
+
|
|
22
|
+
### Minor Changes
|
|
23
|
+
|
|
24
|
+
- [#215](https://github.com/DavideCarvalho/adonis-agora-agent/pull/215) [`1015903`](https://github.com/DavideCarvalho/adonis-agora-agent/commit/1015903a40d9699a920de5dc85443986cfd9c8ab) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Zero-config by default, matching `@dudousxd/nestjs-agent`'s DX pass: `defineConfig({ model })` is a working public chat.
|
|
25
|
+
|
|
26
|
+
- **Anonymous identity by default (BREAKING).** With no `actorResolver` the routes are public and each browser is its own anonymous actor (`AnonymousActorResolver`): the first response sets `agent_anon=<32 random bytes, base64url>; Path=/; Max-Age=31536000; HttpOnly; SameSite=Lax` (plus `Secure` over HTTPS) and the actor is `anon:` + a SHA-256 of it, so visitors never share threads, quota or attachments. A boot notice says the endpoints are public. One line requires login: `actorResolver: new AuthActorResolver()`. Before, an unset resolver answered `401` everywhere — set one explicitly if you relied on that.
|
|
27
|
+
- **Tools open unless restricted (BREAKING).** `defaultRoles` defaults to `[]` — no restriction — and `DefaultRolesPolicy` / `DefaultToolAuthorizer` treat an empty list as open. `roles` on a tool still restricts it; `action` tools still wait for approval. `defaultRoles: ['ADMIN']` restores the old default. (The MCP server surface keeps its own `['ADMIN']` default.)
|
|
28
|
+
- **`@AiTool` / `static tool` defaults.** `name` defaults to the class name camelCased minus a trailing `Tool` (`toolNameFromClass`), `kind` to `'read'`; `defineTool` still needs a `name`.
|
|
29
|
+
- **`aiSdkModels({ id: model | { model, label, badges, … } }, { default, providerLabels })`** from `@adonis-agora/agent/ai-sdk`: several models behind one provider carrying its own catalog, served by `GET /agent/models` when `models` is not set. `aiSdkModel` now refuses a pick naming a model it does not serve. **`aiSdkModel`'s `resolveModel` option (added in 0.44.0) is removed** — use `aiSdkModels`.
|
|
30
|
+
- The SSE routes now forward headers the request already set (the identity cookie, a session).
|
|
31
|
+
|
|
3
32
|
## 0.45.0
|
|
4
33
|
|
|
5
34
|
### Minor Changes
|