@adonis-agora/agent 0.46.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 +17 -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 +82 -30
- 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/define_config.d.ts +22 -29
- 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 +4 -5
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -4
- 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/types.d.ts +36 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/stubs/config/agent.stub +3 -6
- package/package.json +10 -1
- package/skills/agent-setup/SKILL.md +27 -60
- 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,22 @@
|
|
|
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
|
+
|
|
3
20
|
## 0.46.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|