@nocobase/app-plugin-agents 1.0.0-beta.16 → 1.0.0-beta.18
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 +68 -0
- package/README.md +32 -21
- package/dist/client/chat/api.d.ts +1 -1
- package/dist/client/chat/api.d.ts.map +1 -1
- package/dist/client/chat/api.js +2 -2
- package/dist/client/chat/api.js.map +1 -1
- package/dist/client/chat/keys.d.ts +1 -0
- package/dist/client/chat/keys.d.ts.map +1 -1
- package/dist/client/chat/keys.js +1 -0
- package/dist/client/chat/keys.js.map +1 -1
- package/dist/client/chat/provider.d.ts +10 -4
- package/dist/client/chat/provider.d.ts.map +1 -1
- package/dist/client/chat/provider.js +86 -15
- package/dist/client/chat/provider.js.map +1 -1
- package/dist/client/chat/use-chat.d.ts +3 -1
- package/dist/client/chat/use-chat.d.ts.map +1 -1
- package/dist/client/chat/use-chat.js +2 -2
- package/dist/client/chat/use-chat.js.map +1 -1
- package/dist/client/chat/use-conversation-model.d.ts +12 -0
- package/dist/client/chat/use-conversation-model.d.ts.map +1 -0
- package/dist/client/chat/use-conversation-model.js +64 -0
- package/dist/client/chat/use-conversation-model.js.map +1 -0
- package/dist/client/chat.d.ts +1 -0
- package/dist/client/chat.d.ts.map +1 -1
- package/dist/client/chat.js +1 -0
- package/dist/client/chat.js.map +1 -1
- package/dist/client/model-suggestion.d.ts.map +1 -1
- package/dist/client/model-suggestion.js +4 -2
- package/dist/client/model-suggestion.js.map +1 -1
- package/dist/client/pages/usage/index.d.ts.map +1 -1
- package/dist/client/pages/usage/index.js +17 -5
- package/dist/client/pages/usage/index.js.map +1 -1
- package/dist/client/pages/usage/prices/model.d.ts +4 -4
- package/dist/client/pages/usage/prices/model.d.ts.map +1 -1
- package/dist/client/pages/usage/prices/model.js +2 -2
- package/dist/client/pages/usage/prices/model.js.map +1 -1
- package/dist/client/pages/usage/prices/price-cells.js +2 -2
- package/dist/client/pages/usage/prices/price-cells.js.map +1 -1
- package/dist/client/pages/usage/prices/prices-section.d.ts.map +1 -1
- package/dist/client/pages/usage/prices/prices-section.js +13 -13
- package/dist/client/pages/usage/prices/prices-section.js.map +1 -1
- package/dist/package.json +5 -2
- package/dist/server/cli/online-credential.d.ts +16 -0
- package/dist/server/cli/online-credential.d.ts.map +1 -0
- package/dist/server/cli/online-credential.js +51 -0
- package/dist/server/cli/online-credential.js.map +1 -0
- package/dist/server/cli/run-credential.d.ts +2 -0
- package/dist/server/cli/run-credential.d.ts.map +1 -1
- package/dist/server/cli/run-credential.js +12 -1
- package/dist/server/cli/run-credential.js.map +1 -1
- package/dist/server/cli/surface.js +2 -2
- package/dist/server/cli/surface.js.map +1 -1
- package/dist/server/composition.d.ts +2 -0
- package/dist/server/composition.d.ts.map +1 -1
- package/dist/server/composition.js +25 -4
- package/dist/server/composition.js.map +1 -1
- package/dist/server/core/agents/agent.service.d.ts +5 -0
- package/dist/server/core/agents/agent.service.d.ts.map +1 -1
- package/dist/server/core/agents/agent.service.js +6 -1
- package/dist/server/core/agents/agent.service.js.map +1 -1
- package/dist/server/core/agents/agent.views.d.ts +2 -0
- package/dist/server/core/agents/agent.views.d.ts.map +1 -1
- package/dist/server/core/agents/agent.views.js +4 -3
- package/dist/server/core/agents/agent.views.js.map +1 -1
- package/dist/server/core/brief/brief.js +1 -1
- package/dist/server/core/brief/brief.js.map +1 -1
- package/dist/server/core/conversations/chat-settings.d.ts +1 -0
- package/dist/server/core/conversations/chat-settings.d.ts.map +1 -1
- package/dist/server/core/conversations/chat-settings.js +71 -57
- package/dist/server/core/conversations/chat-settings.js.map +1 -1
- package/dist/server/core/conversations/conversation.service.d.ts.map +1 -1
- package/dist/server/core/conversations/conversation.service.js +3 -4
- package/dist/server/core/conversations/conversation.service.js.map +1 -1
- package/dist/server/core/reports/report.service.d.ts +1 -0
- package/dist/server/core/reports/report.service.d.ts.map +1 -1
- package/dist/server/core/reports/report.service.js +5 -2
- package/dist/server/core/reports/report.service.js.map +1 -1
- package/dist/server/core/runs/claim.d.ts +3 -1
- package/dist/server/core/runs/claim.d.ts.map +1 -1
- package/dist/server/core/runs/claim.js +370 -60
- package/dist/server/core/runs/claim.js.map +1 -1
- package/dist/server/core/runs/extensions.d.ts +22 -2
- package/dist/server/core/runs/extensions.d.ts.map +1 -1
- package/dist/server/core/runs/extensions.js +21 -2
- package/dist/server/core/runs/extensions.js.map +1 -1
- package/dist/server/core/runs/git-credentials.d.ts +5 -1
- package/dist/server/core/runs/git-credentials.d.ts.map +1 -1
- package/dist/server/core/runs/git-credentials.js +15 -2
- package/dist/server/core/runs/git-credentials.js.map +1 -1
- package/dist/server/core/runs/lifecycle.d.ts.map +1 -1
- package/dist/server/core/runs/lifecycle.js +9 -5
- package/dist/server/core/runs/lifecycle.js.map +1 -1
- package/dist/server/core/runs/runner-affinity.d.ts +6 -0
- package/dist/server/core/runs/runner-affinity.d.ts.map +1 -0
- package/dist/server/core/runs/runner-affinity.js +16 -0
- package/dist/server/core/runs/runner-affinity.js.map +1 -0
- package/dist/server/core/skills/skill.service.d.ts +2 -0
- package/dist/server/core/skills/skill.service.d.ts.map +1 -1
- package/dist/server/core/skills/skill.service.js +1 -0
- package/dist/server/core/skills/skill.service.js.map +1 -1
- package/dist/server/jobs/job.service.d.ts.map +1 -1
- package/dist/server/jobs/job.service.js +7 -4
- package/dist/server/jobs/job.service.js.map +1 -1
- package/dist/server/kernel/values.d.ts +5 -0
- package/dist/server/kernel/values.d.ts.map +1 -1
- package/dist/server/kernel/values.js +19 -0
- package/dist/server/kernel/values.js.map +1 -1
- package/dist/server/online/agent/configuration.d.ts +2 -2
- package/dist/server/online/agent/configuration.d.ts.map +1 -1
- package/dist/server/online/agent/configuration.js +21 -7
- package/dist/server/online/agent/configuration.js.map +1 -1
- package/dist/server/online/agent/index.d.ts +2 -1
- package/dist/server/online/agent/index.d.ts.map +1 -1
- package/dist/server/online/agent/index.js.map +1 -1
- package/dist/server/online/agent/native/backend.d.ts +2 -0
- package/dist/server/online/agent/native/backend.d.ts.map +1 -1
- package/dist/server/online/agent/native/backend.js +14 -12
- package/dist/server/online/agent/native/backend.js.map +1 -1
- package/dist/server/online/agent/native/execution.d.ts +2 -0
- package/dist/server/online/agent/native/execution.d.ts.map +1 -1
- package/dist/server/online/agent/native/execution.js +51 -22
- package/dist/server/online/agent/native/execution.js.map +1 -1
- package/dist/server/online/agent/native/types.d.ts +6 -0
- package/dist/server/online/agent/native/types.d.ts.map +1 -1
- package/dist/server/online/agent/runner/backend.d.ts.map +1 -1
- package/dist/server/online/agent/runner/backend.js +4 -3
- package/dist/server/online/agent/runner/backend.js.map +1 -1
- package/dist/server/online/agent/service.d.ts +2 -0
- package/dist/server/online/agent/service.d.ts.map +1 -1
- package/dist/server/online/agent/service.js +3 -1
- package/dist/server/online/agent/service.js.map +1 -1
- package/dist/server/online/agent/types.d.ts +15 -1
- package/dist/server/online/agent/types.d.ts.map +1 -1
- package/dist/server/online/sandbox/cli-command.d.ts +6 -0
- package/dist/server/online/sandbox/cli-command.d.ts.map +1 -0
- package/dist/server/online/sandbox/cli-command.js +370 -0
- package/dist/server/online/sandbox/cli-command.js.map +1 -0
- package/dist/server/online/sandbox/execution.d.ts +25 -0
- package/dist/server/online/sandbox/execution.d.ts.map +1 -0
- package/dist/server/online/sandbox/execution.js +63 -0
- package/dist/server/online/sandbox/execution.js.map +1 -0
- package/dist/server/online/sandbox/filesystem.d.ts +8 -0
- package/dist/server/online/sandbox/filesystem.d.ts.map +1 -0
- package/dist/server/online/sandbox/filesystem.js +72 -0
- package/dist/server/online/sandbox/filesystem.js.map +1 -0
- package/dist/server/online/sandbox/limits.d.ts +4 -0
- package/dist/server/online/sandbox/limits.d.ts.map +1 -0
- package/dist/server/online/sandbox/limits.js +46 -0
- package/dist/server/online/sandbox/limits.js.map +1 -0
- package/dist/server/online/sandbox/provider.d.ts +9 -0
- package/dist/server/online/sandbox/provider.d.ts.map +1 -0
- package/dist/server/online/sandbox/provider.js +237 -0
- package/dist/server/online/sandbox/provider.js.map +1 -0
- package/dist/server/online/sandbox/skills.d.ts +14 -0
- package/dist/server/online/sandbox/skills.d.ts.map +1 -0
- package/dist/server/online/sandbox/skills.js +56 -0
- package/dist/server/online/sandbox/skills.js.map +1 -0
- package/dist/server/online/sandbox/tools.d.ts +3 -0
- package/dist/server/online/sandbox/tools.d.ts.map +1 -0
- package/dist/server/online/sandbox/tools.js +35 -0
- package/dist/server/online/sandbox/tools.js.map +1 -0
- package/dist/server/online/sandbox/types.d.ts +72 -0
- package/dist/server/online/sandbox/types.d.ts.map +1 -0
- package/dist/server/online/sandbox/types.js +2 -0
- package/dist/server/online/sandbox/types.js.map +1 -0
- package/dist/server/providers/agents.d.ts +5 -2
- package/dist/server/providers/agents.d.ts.map +1 -1
- package/dist/server/providers/agents.js +63 -2
- package/dist/server/providers/agents.js.map +1 -1
- package/dist/server/routes/admin.d.ts.map +1 -1
- package/dist/server/routes/admin.js +1 -0
- package/dist/server/routes/admin.js.map +1 -1
- package/dist/server/routes/chat.d.ts +1 -1
- package/dist/server/routes/chat.d.ts.map +1 -1
- package/dist/server/routes/chat.js +15 -6
- package/dist/server/routes/chat.js.map +1 -1
- package/dist/server/routes/index.d.ts.map +1 -1
- package/dist/server/routes/index.js +17 -2
- package/dist/server/routes/index.js.map +1 -1
- package/dist/server/routes/openapi.js +1 -1
- package/dist/server/routes/openapi.js.map +1 -1
- package/dist/server/routes/schemas.js +1 -1
- package/dist/server/routes/schemas.js.map +1 -1
- package/dist/server/runners/runner.service.d.ts +1 -1
- package/dist/server/runners/runner.service.d.ts.map +1 -1
- package/dist/server/runners/runner.service.js +5 -1
- package/dist/server/runners/runner.service.js.map +1 -1
- package/dist/server/runners/runner.store.d.ts.map +1 -1
- package/dist/server/runners/runner.store.js +3 -1
- package/dist/server/runners/runner.store.js.map +1 -1
- package/dist/server/vendor/THIRD_PARTY_LICENSES.txt +782 -0
- package/dist/server/vendor/just-bash.d.ts +137 -0
- package/dist/server/vendor/just-bash.js +2102 -0
- package/dist/shared/conversations.d.ts +2 -1
- package/dist/shared/conversations.d.ts.map +1 -1
- package/dist/shared/conversations.js.map +1 -1
- package/dist/shared/runners.d.ts +1 -1
- package/dist/shared/runners.d.ts.map +1 -1
- package/dist/shared/runners.js +2 -0
- package/dist/shared/runners.js.map +1 -1
- package/docs/native-sandbox.md +55 -0
- package/docs/runner-agents.md +2 -0
- package/docs/ui-message-clients.md +10 -0
- package/package.json +11 -8
- package/skills/nocobase-app-plugin-agents/SKILL.md +1 -0
- package/skills/nocobase-app-plugin-agents/references/extension-points.md +21 -19
- package/skills/nocobase-app-plugin-agents/references/online-agent.md +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,73 @@
|
|
|
1
1
|
# @nocobase/app-plugin-agents
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.18
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f2712b9: Make run git credentials independent of the code host. Protocol 12 adds `RunGit.tools` and the `gitTools` runner feature: the runner wraps the code host CLIs a run names (such as `gh` or `glab`) so every call runs with the current credential of one of the run's repositories, fetched through the run's credential broker, and fails with the reason instead of falling back to the machine's login. A credential's username is now the only one git uses (`oauth2` for GitLab, `x-access-token` for a GitHub App); the runner no longer defaults it for runs (a build job's token without a username keeps the old default).
|
|
8
|
+
|
|
9
|
+
Every run's agent now gets `git`, `gh` and `glab` wrappers that refuse `gh`/`glab` logins and token output, `credential.*` set with `git -c`/`--config-env` or written outside the repository's own config, `http.*.extraHeader` in any git configuration, and git URLs with a user in them.
|
|
10
|
+
|
|
11
|
+
Repository access providers are told whether the runner wraps CLIs (`tools`) and who answers for the run's subject now (`responsibleUserId`), at the claim, in `prepare` and on every `issue`, so an application can issue credentials for a task's owner. `RunGit.tools` is dropped for runners without the feature and for repositories without a credential in the payload.
|
|
12
|
+
|
|
13
|
+
The runner's workspace notes now tell the agent to open and update change requests with the code host's command line rather than an application `pr open` command.
|
|
14
|
+
|
|
15
|
+
Update the application before its runners: a server speaking protocol 11 refuses a runner speaking 12.
|
|
16
|
+
|
|
17
|
+
- fb3b3c5: Allow applications to supply bilingual description suggestions by tool and model through agent defaults, with model catalog fallback and existing descriptions preserved.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- 5d49614: Strip NUL characters from what runners report — run events, summaries, failure details and job events — before storing it. PostgreSQL refuses NUL in text and JSON columns, so one event carrying a NUL byte in tool output failed every later events upload of its run.
|
|
22
|
+
- Updated dependencies [ab68344]
|
|
23
|
+
- Updated dependencies [f2712b9]
|
|
24
|
+
- Updated dependencies [f8f64ad]
|
|
25
|
+
- @nocobase/app-cli-client@0.1.0-beta.13
|
|
26
|
+
- @nocobase/agent-protocol@0.1.0-beta.12
|
|
27
|
+
- @nocobase/app-server@3.0.0-beta.2
|
|
28
|
+
- @nocobase/app-plugin-authentication@2.0.0-beta.12
|
|
29
|
+
- @nocobase/app-plugin-file@1.0.0-beta.26
|
|
30
|
+
|
|
31
|
+
## 1.0.0-beta.17
|
|
32
|
+
|
|
33
|
+
### Minor Changes
|
|
34
|
+
|
|
35
|
+
- 4f0d96e: Add opt-in native OnlineAgent Skills and application-branded CLI execution using an isolated, lazily created just-bash environment. Load current Skill support trees, support virtual parameter files and read bindings, retain existing business authorization, and release execution resources across stop, approval and retryable finalization without replaying writes.
|
|
36
|
+
|
|
37
|
+
Redact execution credentials and declare intentionally disabled optional archive-native build scripts in workspace, generated-application and deployment installation policies.
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- b805e54: Reset chat drafts and unsent attachments on every explicit new conversation, apply business-entry prefill atomically, and ignore stale uploads, context snapshots and conversation-creation callbacks while preserving drafts on ordinary close/reopen and first-send promotion.
|
|
42
|
+
- b805e54: Clear carried work context when starting a fresh chat, while preserving page registrations and atomically including explicitly requested business context.
|
|
43
|
+
- 301d309: Reuse a fixed task worktree across runs and tools, preserve dependencies and sessions, isolate per-run files and cancellation, and protect cleanup with nonexclusive usage records covering worker startup. Reclaim sessions only with their owning directory. Leave commits and pushes to agents, give them an explicit HEAD-to-branch refspec for detached workspaces, refresh initialization after lockfile changes or artifact cleanup, and default idle artifact retention to 24 hours. Prefer an immediately available previous runner under the same ordered-model admission rules, aggregate affinity location and occupancy reads, and reserve actual upgrade interruptions for that runner for five minutes.
|
|
44
|
+
|
|
45
|
+
Separate ordered-model claim eligibility from full waiting diagnostics, evaluate affinity in queue order, and reuse batched resource metadata without repeating capacity reads for every candidate and machine.
|
|
46
|
+
|
|
47
|
+
Serialize cache fetch and worktree creation through a short cache mutex, retry transient Git lock conflicts, fall back to a detached remote branch when another directory owns it, and avoid optional index locks and per-remote-branch reporting commands. Both workspace-cleanup and repository-cache lock waits now time out after two minutes as retryable workspace-busy failures. Report disk pauses as unavailable capacity while continuing claims during periodic workspace collection.
|
|
48
|
+
|
|
49
|
+
- 1fcc7a8: Hide the built-in online agent and online usage and prices when no chat model is enabled. Reject new online defaults and conversations with a clear error while preserving saved preferences, historical conversations, usage and prices.
|
|
50
|
+
- 4f0d96e: Keep native Sandbox construction internal to Agents composition and unify authentication, preparation, execution, and retryable cleanup ownership.
|
|
51
|
+
- 4f0d96e: Restore detailed bash and skill tool guidance while describing the native Sandbox's current capabilities and limits accurately.
|
|
52
|
+
- 4f0d96e: Bundle a lightweight just-bash runtime with self-contained declarations and third-party licenses instead of installing the full runtime dependency tree.
|
|
53
|
+
- b805e54: Allow idle OnlineAgent conversations to switch models without starting a new conversation. Show a model-only picker for existing native chats, preserve conversation configuration and drafts, and prevent sends while a model change is being saved or reconciled.
|
|
54
|
+
|
|
55
|
+
Keep unspecified model restrictions absent instead of replacing them with a default-model allowlist. Treat omitted and explicit empty lists as unrestricted while preserving their distinct stored shapes, and retain nonempty business restrictions when switching models.
|
|
56
|
+
|
|
57
|
+
- 0b5a9c1: Preserve saved model price precision when editing another price, reopening the editor, or reloading prices.
|
|
58
|
+
- Updated dependencies [62da032]
|
|
59
|
+
- Updated dependencies [8b30952]
|
|
60
|
+
- Updated dependencies [301d309]
|
|
61
|
+
- Updated dependencies [4f0d96e]
|
|
62
|
+
- @nocobase/app-client@4.0.0-beta.1
|
|
63
|
+
- @nocobase/app-server@3.0.0-beta.1
|
|
64
|
+
- @nocobase/app-cli@1.0.0-beta.26
|
|
65
|
+
- @nocobase/agent-protocol@0.1.0-beta.11
|
|
66
|
+
- @nocobase/app-plugin-authentication@2.0.0-beta.12
|
|
67
|
+
- @nocobase/app-plugin-file@1.0.0-beta.26
|
|
68
|
+
- @nocobase/app-plugin-authorization@1.0.0-beta.30
|
|
69
|
+
- @nocobase/app-cli-client@0.1.0-beta.12
|
|
70
|
+
|
|
3
71
|
## 1.0.0-beta.16
|
|
4
72
|
|
|
5
73
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -37,14 +37,21 @@ Repository access providers that mint credentials in `prepare` implement the ide
|
|
|
37
37
|
- **Chat defaults**: the system default chat agent (`agSettings`, `PATCH /api/agents/chatSettings` by who manages `agents.agents`, or the application), each person's default chat agent (`agChatPreferences`), and each agent's "confirm before changing data" (`confirmChanges`: `always` or only `larger` changes).
|
|
38
38
|
- **No setup scripts.** Preparing a working directory is the agent's job: its brief tells it to follow each directory's own instructions (AGENTS.md, CLAUDE.md, README), to install what is missing inside the directory, and to say so (the way the subject's guidance tells it) when it cannot. A working directory's optional initialization prompt reaches the agent only when the runner prepared that directory fresh. "Clean working directory" (`POST /api/agents/workspaces/:subjectKind/:subjectId/reset`) makes the next run start from a fresh checkout.
|
|
39
39
|
|
|
40
|
+
## Runner affinity and ordered models
|
|
41
|
+
|
|
42
|
+
Runner affinity uses the same ordered-model admission decision as actual claims, without loading the full waiting diagnostic. Queue traversal evaluates only candidates it reaches before a successful claim. Capacity comes from the existing batch, while resource metadata is cached by scope within the poll and loaded in batches across relevant machines; known agent scopes share the first metadata read. Preferred-model admission needs a compatible or unknown first choice, even when busy, so it does not read per-machine slot counts. The broader machine inventory is read at most once for this affinity pass. Full diagnostics remain available through the waiting projection. Application context assembly and policy providers may issue their own reads; visiting new subject scopes adds metadata batches, and returned-row budgets do not bound the database's internal scans.
|
|
43
|
+
|
|
40
44
|
## Chat integration documentation
|
|
41
45
|
|
|
42
46
|
- [OnlineAgent service and business tools](skills/nocobase-app-plugin-agents/references/online-agent.md): trusted server configuration, Native/Runner sessions, public browser transport and lifecycle boundaries.
|
|
47
|
+
- [Native Skills and application CLI](docs/native-sandbox.md): explicit scopes, current support trees, lazy per-execution resources, VFS parameter files, authenticated business commands and approval/stop boundaries.
|
|
43
48
|
- [UI messages](docs/ui-messages.md) and [client coordination](docs/ui-message-clients.md): SDK message ownership, safe projections, streaming, persistence and recovery.
|
|
44
49
|
- [UI context, tool cards and AI form adapters](docs/ai-forms.md): open `context.ui.items`, exact-name `AIToolRendererProvider` registration, `useAIForm` ref callbacks, explicit async context selection and guarded browser-draft application, with integrated Examples wiring. The plugin provides no built-in form-filling business tool/card and never submits or saves a form or continues a server tool when a user applies a local proposal.
|
|
45
50
|
|
|
46
51
|
## Model services
|
|
47
52
|
|
|
53
|
+
The built-in Online agent is offered only while an enabled service provides a chat model. With none, new online conversations and online default writes are refused before saving; existing conversations and saved defaults remain readable. An unavailable online default is ignored when selecting a new conversation's agent, without rewriting it or choosing the first Runner. The Usage page also hides online usage before aggregation and hides online prices, preserving the stored history and prices for when chat models are enabled again.
|
|
54
|
+
|
|
48
55
|
The plugin keeps model services (`agModelServices`, `server/online/services.ts`) for the application's own model calls, such as a knowledge base's embeddings; agents do not use them. A service has a provider type, a name model prices store (made from the title, never changed), a title, a base URL (the provider's default when empty), an API key sealed with the secrets service as variables are, bound to the service's name, an on/off switch, and the models it offers. A provider may have any number of services. The key is write-only: the API answers `apiKeySet`, never the key. Every request to a provider names the plugin first in its user agent (`nocobase-agents/<version>`); a call to an OpenCode base URL (Zen or Go) additionally carries `x-opencode-session`, a new session id for each call. Deleting a service deletes its model prices. A model's kind (chat, embedding or rerank) is guessed from its id only as a default and can always be changed; checking a model checks it as its kind, and when it fails that way but answers as another kind its provider serves, the check says so (`ModelCheck.looksLike`).
|
|
49
56
|
|
|
50
57
|
The providers (`MODEL_PROVIDERS` in `shared/models.ts`, `server/online/providers.ts`) are Vercel AI SDK provider packages: `@ai-sdk/openai`, `@ai-sdk/anthropic`, `@ai-sdk/google`, `@ai-sdk/deepseek`, `@ai-sdk/alibaba` (Qwen), `@ai-sdk/moonshotai` (Kimi), `@ai-sdk/cohere`, `ollama-ai-provider-v2`, and `@ai-sdk/openai-compatible` for every other endpoint that speaks OpenAI's chat completions. A provider's models are read from its own list-models endpoint (`GET /models`; Anthropic's with its version header, Google's `models` that generate content, Cohere's v1 `models`, Ollama's `/tags`); a model can also be added by id.
|
|
@@ -105,26 +112,26 @@ Realtime announcements carry no content: `agents:runs:<runId>` when a run's stat
|
|
|
105
112
|
|
|
106
113
|
Everything the application contributes goes through `agentsToken` (`server/tokens.ts`) at boot. Text people read is an `I18nText` (`{ key, ns }`, `shared/i18n`) in the contributor's own namespace.
|
|
107
114
|
|
|
108
|
-
| Extension point | What the application gives
|
|
109
|
-
| --------------------------------------------------------------------- |
|
|
110
|
-
| `subjects.register(binding)` | A kind of subject runs work on: `kind`, `title`, `triggers` (what `input.payload.trigger` values mean, for the run panel), `preview` (a `SubjectSample`: the assembly of a made-up subject of the kind, its values marked with `sampleValue`, offered as a scenario of "Preview full prompt"), `context.assemble` (the brief's task and context, the turn, the working directories, the scopes, and `guidance`: the subject's own lines of the rules and of the environment check), `sink.onRunFinished`, `queuedExpiryMs` (how long a run may wait for a runner; forever without it), `reports.describe` (a subject's label, whether the person may see it, and its `group`). Name the commands `assemble` mentions with `commandRef(cli, id, flag?)` (`acme issue get`).
|
|
111
|
-
| `scopes.register(kind)` | A scope of variables and default skills (`key`, `title`, `description`, `access(scopeId, userId)`). `agent` is reserved; `workdir` is a core key the application registers to decide who may see and change a working directory's.
|
|
112
|
-
| `actions.provide(source)` | The business actions an agent may be configured with (`key`, `group`, `title`, `groupTitle`, `description`, `defaultOn` for the ones every discovered agent gets unless `agents.setDefaults` says otherwise), and those never granted to an agent, listed only to show the boundary (`grantable: false` with a `reason`).
|
|
113
|
-
| `agents.setDefaults(provider)` | The instructions and business actions every agent discovered from runners gets (`AgentDefaults`), asked whenever one is written; `agents.applyDefaults()` writes them to every one that differs. Returns what removes the provider.
|
|
114
|
-
| `agents.ensureSystem(input)` | An agent of the application's own (`SystemAgentInput`: its fixed id, name, description, instructions, business actions and the tools and models it runs with, none until it is configured), created the first time, kept as given and enabled; people do not change it.
|
|
115
|
-
| `gate.set(gate)` | Who holds which business actions: an `ActionGate` answering `allowed(identity)` for a person or a run, and optionally `consultable(action)` for what a consultation may keep besides reading. `gate.allowed` and `gate.reach` answer for a caller; the gate also bounds what a run may do over the API.
|
|
116
|
-
| `conversations.sources.register(source)` | A place conversations start from besides the panel (`POST /conversations` takes `source`, then `POST /conversations/:id/messages` the first message as the agent should read it).
|
|
117
|
-
| `conversations.contextKinds.register(kind, resolver)` | A kind of object a page context may reference, resolved for the message's owner.
|
|
118
|
-
| `conversations.rules.provide(rules)` | Rules and sections added to the system layer of conversation runs.
|
|
119
|
-
| `conversations.deliver(tx, id, news)`, `conversations.lock(conn, id)` | A `news` notice (`type`, English `title`, `params`) saved in the caller's transaction. Native and Runner OnlineAgent bindings ignore wake-up input and return null; unbound conversations retain the existing wake-up path.
|
|
120
|
-
| `people.provide(source)` | The application's directory: names, whom to pick from, and who can no longer act (`inactive`: their runners stop).
|
|
121
|
-
| `events.on('agent.removed', listener)` | An agent was disabled (`agentId`, `name` then, `reason` `disabled`, `byUserId`), after the transaction that withdrew its queued runs commits: the application lets go of the work it gave the agent. The assembling application clears it as executor of unfinished issues (`server/agents/removal.ts`).
|
|
122
|
-
| `events.on('notice', listener)` | People the plugin wants told (`AgentsNotice`: `key`, `type`, `userIds`, `subject`, English `title` and `body`, `params`): runner notices to their owner, `run_secrets_not_allowed` to a run's actor and owner, and `run_request_expired` to its requester. Subjects are `runner`, `run` or `runRequest`; `notice.cleared` names one that no longer holds.
|
|
123
|
-
| `jobs.register(kind, registration)` | A kind of build job, for the off-by-default runner build method (see Jobs above).
|
|
124
|
-
| `reporting.usage`, `reporting.runFigures`, `reporting.range` | What runs used and cost, grouped by agent, person, `group`, `subject`, day, model, tool or agent `type`, and how the runs of a range went with their usage by type (`usageByType`) and day by day (`daily`: runs by outcome, cost by type), for the application's report pages. The plugin serves usage over HTTP for its usage page (`GET /api/agents/usage`, behind the `usage` page grant; every run for a reader of agents, else the caller's own; `series=true` breaks each day of `daily` down by the grouping).
|
|
125
|
-
| `briefs.sections.register(provider)` | Sections added to every brief's context layer after the subject's own context (`key`, `order`, `section(conn, claim, assembly)` answering Markdown or null), in claims and in brief previews. The context layer is outside the session fingerprint, so a section that changes does not end a resumable session. Database reads only.
|
|
126
|
-
| `mounts.register(provider)` | Directories of files placed beside the agent (`name`, `forRun(conn, { claim, assembly, session, sessionKey })` answering `{ hash, target, note?, resumeNote? }` or null, and `bundle(conn, { runId })`). Offered at claim only to runners announcing the `mounts` feature, never required, so an older runner runs without them; served at `GET /api/agents/runners/runs/:runId/mounts/:name` while the runner holds the run. A mount's hash stays out of the session fingerprint: a resumed run gets its `resumeNote` in the turn instead.
|
|
127
|
-
| `repoAccess.register(provider)` | Per run, in the claim's transaction: who the run's commits name and the short-lived credentials its checkouts push with (`forRun(conn, { claim, repos, onDemand })` answering `RunGit` or null). It may read from elsewhere in an optional `prepare(run, { onDemand })` before the transaction. For a runner with the `gitCredentials` feature (`onDemand`), a provider that implements `issue(request)` lists its repositories in `RunGit.onDemand` instead of minting credentials at the claim: the runner then asks `POST /api/agents/runners/runs/:runId/gitCredentials` whenever git needs one, and the plugin calls `issue` outside any transaction (15 s at most) only while that runner holds that attempt of the run under a live lease, for a URL the claim listed, compared exactly. `issue` answers `{ username, password, expiresAt }
|
|
115
|
+
| Extension point | What the application gives |
|
|
116
|
+
| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
117
|
+
| `subjects.register(binding)` | A kind of subject runs work on: `kind`, `title`, `triggers` (what `input.payload.trigger` values mean, for the run panel), `preview` (a `SubjectSample`: the assembly of a made-up subject of the kind, its values marked with `sampleValue`, offered as a scenario of "Preview full prompt"), `context.assemble` (the brief's task and context, the turn, the working directories, the scopes, and `guidance`: the subject's own lines of the rules and of the environment check), `sink.onRunFinished`, `queuedExpiryMs` (how long a run may wait for a runner; forever without it), `reports.describe` (a subject's label, whether the person may see it, and its `group`). Name the commands `assemble` mentions with `commandRef(cli, id, flag?)` (`acme issue get`). |
|
|
118
|
+
| `scopes.register(kind)` | A scope of variables and default skills (`key`, `title`, `description`, `access(scopeId, userId)`). `agent` is reserved; `workdir` is a core key the application registers to decide who may see and change a working directory's. |
|
|
119
|
+
| `actions.provide(source)` | The business actions an agent may be configured with (`key`, `group`, `title`, `groupTitle`, `description`, `defaultOn` for the ones every discovered agent gets unless `agents.setDefaults` says otherwise), and those never granted to an agent, listed only to show the boundary (`grantable: false` with a `reason`). |
|
|
120
|
+
| `agents.setDefaults(provider)` | The instructions and business actions every agent discovered from runners gets (`AgentDefaults`), asked whenever one is written; `agents.applyDefaults()` writes them to every one that differs. Optional `modelDescriptions` maps tools and normalized model ids to `{ en, zh }` enable-dialog suggestions, falling back to the catalog without changing saved descriptions. Returns what removes the provider. |
|
|
121
|
+
| `agents.ensureSystem(input)` | An agent of the application's own (`SystemAgentInput`: its fixed id, name, description, instructions, business actions and the tools and models it runs with, none until it is configured), created the first time, kept as given and enabled; people do not change it. |
|
|
122
|
+
| `gate.set(gate)` | Who holds which business actions: an `ActionGate` answering `allowed(identity)` for a person or a run, and optionally `consultable(action)` for what a consultation may keep besides reading. `gate.allowed` and `gate.reach` answer for a caller; the gate also bounds what a run may do over the API. |
|
|
123
|
+
| `conversations.sources.register(source)` | A place conversations start from besides the panel (`POST /conversations` takes `source`, then `POST /conversations/:id/messages` the first message as the agent should read it). |
|
|
124
|
+
| `conversations.contextKinds.register(kind, resolver)` | A kind of object a page context may reference, resolved for the message's owner. |
|
|
125
|
+
| `conversations.rules.provide(rules)` | Rules and sections added to the system layer of conversation runs. |
|
|
126
|
+
| `conversations.deliver(tx, id, news)`, `conversations.lock(conn, id)` | A `news` notice (`type`, English `title`, `params`) saved in the caller's transaction. Native and Runner OnlineAgent bindings ignore wake-up input and return null; unbound conversations retain the existing wake-up path. |
|
|
127
|
+
| `people.provide(source)` | The application's directory: names, whom to pick from, and who can no longer act (`inactive`: their runners stop). |
|
|
128
|
+
| `events.on('agent.removed', listener)` | An agent was disabled (`agentId`, `name` then, `reason` `disabled`, `byUserId`), after the transaction that withdrew its queued runs commits: the application lets go of the work it gave the agent. The assembling application clears it as executor of unfinished issues (`server/agents/removal.ts`). |
|
|
129
|
+
| `events.on('notice', listener)` | People the plugin wants told (`AgentsNotice`: `key`, `type`, `userIds`, `subject`, English `title` and `body`, `params`): runner notices to their owner, `run_secrets_not_allowed` to a run's actor and owner, and `run_request_expired` to its requester. Subjects are `runner`, `run` or `runRequest`; `notice.cleared` names one that no longer holds. |
|
|
130
|
+
| `jobs.register(kind, registration)` | A kind of build job, for the off-by-default runner build method (see Jobs above). |
|
|
131
|
+
| `reporting.usage`, `reporting.runFigures`, `reporting.range` | What runs used and cost, grouped by agent, person, `group`, `subject`, day, model, tool or agent `type`, and how the runs of a range went with their usage by type (`usageByType`) and day by day (`daily`: runs by outcome, cost by type), for the application's report pages. The plugin serves usage over HTTP for its usage page (`GET /api/agents/usage`, behind the `usage` page grant; every run for a reader of agents, else the caller's own; `series=true` breaks each day of `daily` down by the grouping). |
|
|
132
|
+
| `briefs.sections.register(provider)` | Sections added to every brief's context layer after the subject's own context (`key`, `order`, `section(conn, claim, assembly)` answering Markdown or null), in claims and in brief previews. The context layer is outside the session fingerprint, so a section that changes does not end a resumable session. Database reads only. |
|
|
133
|
+
| `mounts.register(provider)` | Directories of files placed beside the agent (`name`, `forRun(conn, { claim, assembly, session, sessionKey })` answering `{ hash, target, note?, resumeNote? }` or null, and `bundle(conn, { runId })`). Offered at claim only to runners announcing the `mounts` feature, never required, so an older runner runs without them; served at `GET /api/agents/runners/runs/:runId/mounts/:name` while the runner holds the run. A mount's hash stays out of the session fingerprint: a resumed run gets its `resumeNote` in the turn instead. |
|
|
134
|
+
| `repoAccess.register(provider)` | Per run, in the claim's transaction: who the run's commits name and the short-lived credentials its checkouts push with (`forRun(conn, { claim, repos, onDemand, tools, responsibleUserId })` answering `RunGit` or null). It may read from elsewhere in an optional `prepare(run, { onDemand, tools, responsibleUserId })` before the transaction. `responsibleUserId` is who answers for the subject now (`SubjectBinding.responsibleUserId`), passed to `issue` too; whose credential the run gets is the provider's decision. With `tools` (a `gitTools` runner) it may name code host CLIs in `RunGit.tools`, kept only for repositories with a credential in the payload. For a runner with the `gitCredentials` feature (`onDemand`), a provider that implements `issue(request)` lists its repositories in `RunGit.onDemand` instead of minting credentials at the claim: the runner then asks `POST /api/agents/runners/runs/:runId/gitCredentials` whenever git needs one, and the plugin calls `issue` outside any transaction (15 s at most) only while that runner holds that attempt of the run under a live lease, for a URL the claim listed, compared exactly. `issue` answers `{ username, password, expiresAt }` (the username is the one git uses, such as `oauth2`), null when the repository is not its own, or throws `RepoAccessError('unavailable' \| 'denied', message)` with a message safe to show; with `refresh` it issues a new credential rather than a cached one. Issued credentials are never stored and are redacted from what the run reports. |
|
|
128
135
|
|
|
129
136
|
`GET /api/agents/vocabulary` hands the browser what the application contributed: subjects (title, triggers, preview), conversation sources, and scopes (title, description).
|
|
130
137
|
|
|
@@ -189,7 +196,7 @@ The plugin's own commands are its routes. A run uses `run self`, `run context` a
|
|
|
189
196
|
|
|
190
197
|
## Workspace
|
|
191
198
|
|
|
192
|
-
A run's working directories (`SubjectDir`) are a generic capability: a git repository the runner checks out on a branch the subject's domain names (`kind: 'repo'`: `url`, `branch`, `defaultBranch`), or a directory already on one runner, used in place (`kind: 'directory'`). The runner reports
|
|
199
|
+
A run's working directories (`SubjectDir`) are a generic capability: a git repository the runner checks out on a branch the subject's domain names (`kind: 'repo'`: `url`, `branch`, `defaultBranch`), or a directory already on one runner, used in place (`kind: 'directory'`). Runs on one machine share a fixed task directory without a directory lock. The runner reports the current checkout state (`agRunRepos`: branch, head commit, whether all current work is published); agents commit and push explicitly, and "Clean working directory" refuses live usage and otherwise starts the next run from a fresh checkout. Nothing here knows of pull requests, merges, previews or deployments: those belong to whatever the application builds on top.
|
|
193
200
|
|
|
194
201
|
## The CLI runs get
|
|
195
202
|
|
|
@@ -245,6 +252,8 @@ The plugin registers no routes of its own: an application mounts its pages and j
|
|
|
245
252
|
- `@nocobase/app-plugin-agents/client/runs` exports the headless parts of a subject's runs, for the application to present (the assembling application uses the UI Library's `agent-run-history`): `useSubjectRuns` and `useAgentNames`, `useRunWithTranscript` (a run and its transcript, fetched after the last `seq` seen when the run's realtime topic announces events, and polled every five seconds while the run is open), `useStopRun`, `useRetryRun`, `useRunBrief` and `useWorkspaceReset`. Each reads and writes the plugin's shared query cache.
|
|
246
253
|
- `@nocobase/app-plugin-agents/client/chat` is the agents' chat without its UI. The UI — the panel beside the content area, one conversation as a page, the history and the header, floating and "Ask agent" launchers — is the UI Library's `agent-chat` block (`@nocobase/agent-chat`, installed with `shadcn add @nocobase/agent-chat` into `client/extensions/nocobase-agent-chat/`; its README is `ui-library/registry/agents/agent-chat/README.md` in the NocoBase repository), which the application owns and builds on this entry. What stays here is what has to stay consistent across upgrades: `ChatProvider` around the application's routes (panel state, ⌘J / Ctrl+J, `?chat=<id|new|history>` links, page context, the one subscription to the per-user conversations topic while the chat is available, and optionally `conversationPath`, the application's full-page route of a conversation), `useChatPanel()` (`available` is false without the provider), `chatLinkRoutes(base)` (links under a path the application chooses that open the panel), `useChatContextSource` / `useChatFilterSource` for pages to say what they show, and `ChatExtensionsContext`, with which the application adds items among a conversation's messages (`useTimelineItems`), renders under a message (`renderMessageExtra`), words the news it delivers (`newsText`) and shows a news notice as a card of its own (`renderNews`).
|
|
247
254
|
- The data hooks `useChatAgents`, `useConversation`, `useConversationMessages` (the newest page first, `loadOlder`, newer messages with `messages?after=<lastSeq>` on each announcement and polled while a run is open, optimistic messages through `dispatch`), `useConversationList(query)` (an infinite query over the viewer's conversations), `useSendMessage`, `useConversationActions` and `useChatApi`, keyed by `chatKeys`; `useLiveRunEvents(runId)` (a run's transcript kept current while it runs) and `useConversationSources()` (where a conversation can start from, translated); the pure models `timelineOrder`, `newConversationAgent`, `noticeText`, `liveStepsView` and `stepLineText`, and `contextChips`, `buildPageContext`, `itemKey`, `selectionPreview`, `filterText` and `SOURCE_ATTRIBUTE` for the context chips; the panel's state helpers (`CHAT_PANEL_STORAGE_KEY`, `CHAT_PARAM`, `CHAT_DOCK_QUERY`, `CHAT_MOBILE_QUERY`, `readPanelState`, `isChatShortcut`, `modifierKeyLabel`); `ChatPanelScope`, `useChatPageTracking`, `CHAT_PANEL_ID` and `CHAT_PANEL_ATTRIBUTE` for a full-page view; and the kit's `AgentAvatar`, `useAgentText` and `useFormatters`. The data hooks read and write this plugin's cache (`agentsQueryClient()`) and word their toasts in its namespace whatever is above them, so a chat UI needs only `ChatProvider` and no `withAgents` wrapper. `client/runs` also exports `useRunEvents`, `useRealtimeTopic` and `useAgentsApi`, and `client/kit` exports `useFormatters`.
|
|
255
|
+
- `useConversationModel(id, enabled)` reads the saved native model configuration and exposes `select.mutate(model)` for an explicit idle model change through the existing configuration API. Its `changing` flag is shared across mounted views of that conversation. It sends empty configuration overrides to preserve the rest of the snapshot, updates the cache only for the active authenticated controller, and reconciles failed responses by reading rather than retrying the write. Pass `null` outside native conversations; consumers render configuration and mutation errors and block sending while changes are pending or unresolved.
|
|
256
|
+
- Native `config.model` is an optional business restriction, not the selected model: omitted and explicitly empty lists currently impose no restriction, but keep their distinct shapes through resolution, persistence and HTTP reads. A nonempty list restricts selection to its entries. Resolving a default or changing `selectedModel` updates only the conversation's selected model columns, never populates or rewrites the restriction; configuration updates that omit `model` preserve the previous value.
|
|
248
257
|
- `@nocobase/app-plugin-agents/client/profile` exports `DefaultAgentPreference`: the person's default chat agent, for the application's preferences page. The system default chat agent is the application's to set (`PATCH /api/agents/chatSettings`).
|
|
249
258
|
- `@nocobase/app-plugin-agents/client/config` exports `AgentActionCatalogContext`: the business actions an agent can be given, from the server (`GET /api/agents/actions`: what the application offers, none without it) unless an application gives another catalog. No page of the plugin edits an agent's actions any more; they are the application's defaults.
|
|
250
259
|
|
|
@@ -285,3 +294,5 @@ The runtime list omits model catalogs, policy, variables, quota details and load
|
|
|
285
294
|
`POST /agents/runners/:runnerId/quota/clear` takes structured `tool`, `scope`, `target` and `window` fields, without a client revision. The server rereads state transactionally and removes only that target, idempotently. A known reset returns `409 CONFLICT`; a concurrent conditional-write race returns `409 REVISION_CONFLICT`. Only revision races are retryable. Clear checks ownership or `agents.runners/manage` independently of edit permission. Owner notices include the triggering run and issue identifiers; `notice.cleared` names the selected quota key so applications settle only that notice group.
|
|
286
295
|
|
|
287
296
|
Applications can call `useAgentOption(id)` from the client kit for a system executor's viewer-scoped availability, rather than listing only discovered runner agents. The shared cache refreshes at quota reset or runtime changes.
|
|
297
|
+
|
|
298
|
+
Ordinary dispatch prefers the previous task runner only when it can accept the run immediately, including available slots, tools, permissions and variables. Otherwise another eligible machine may take it. A run actually interrupted for `runnerUpgrade` is reserved for its original runner for five minutes from the execution snapshot's `finishedAt`, even while that machine restarts offline. Only that run is reserved; other runs of the task dispatch normally. Revocation, deletion or expiry releases it. A separate recovery candidate scan lets the restored machine take its interrupted runs before ordinary queued work. The implementation reuses existing execution, session and machine records without new database fields or protocol fields.
|
|
@@ -11,7 +11,7 @@ import type { ModelService } from '../../shared/models.js';
|
|
|
11
11
|
export declare class ChatApi {
|
|
12
12
|
private readonly api;
|
|
13
13
|
constructor(api: ApiClient);
|
|
14
|
-
configuration(id: string): Promise<OnlineChatConfigSnapshot>;
|
|
14
|
+
configuration(id: string, signal?: AbortSignal): Promise<OnlineChatConfigSnapshot>;
|
|
15
15
|
configure(id: string, config: NonNullable<CreateConversationRequest['config']>, selectedModel?: CreateConversationRequest['selectedModel']): Promise<OnlineChatConfigSnapshot>;
|
|
16
16
|
/** Use the host's authenticated HTTP boundary; framing, parsing and replay remain the SDK's. */
|
|
17
17
|
transport(id: string, accepted: (clientId: string) => void): DefaultChatTransport<AppUIMessage>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../client/chat/api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,oBAAoB,EAA6B,MAAM,IAAI,CAAC;AACrE,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,wBAAwB,EAC7B,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EAErB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAiB3D,qBAAa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAY;gBAE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AAI;YAUE,GAAG;IAQjB,OAAO,CAAC,IAAI;YAaE,IAAI;CAYnB"}
|
package/dist/client/chat/api.js
CHANGED
|
@@ -16,8 +16,8 @@ export class ChatApi {
|
|
|
16
16
|
constructor(api) {
|
|
17
17
|
this.api = api;
|
|
18
18
|
}
|
|
19
|
-
configuration(id) {
|
|
20
|
-
return this.get(chatPath('config', id));
|
|
19
|
+
configuration(id, signal) {
|
|
20
|
+
return this.get(chatPath('config', id), undefined, signal);
|
|
21
21
|
}
|
|
22
22
|
configure(id, config, selectedModel) {
|
|
23
23
|
return this.send(chatPath('config', id), 'PATCH', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../client/chat/api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,IAAI,CAAC;AAMrE,OAAO,EAAE,cAAc,EAAkB,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EACL,QAAQ,GAeT,MAAM,+BAA+B,CAAC;AAMvC,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAClE,CAAC;AAED,SAAS,KAAK,CAAC,KAAY;IACzB,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAC1B,CAAC,KAAK,EAAgD,EAAE,CACtD,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAC5C,CACF,CAAC;AACJ,CAAC;AAED,MAAM,OAAO,OAAO;IACD,GAAG,CAAY;IAEhC,YAAmB,GAAc;QAC/B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAEM,aAAa,
|
|
1
|
+
{"version":3,"file":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K,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAI;YACzB,IAAI;YACJ,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC5D,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC9B,CAAC,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,IAAI,CAChB,IAAY,EACZ,MAAgC,EAChC,IAAc;QAEd,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAuB;YAC5D,IAAI;YACJ,MAAM;YACN,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;SACxC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -5,6 +5,7 @@ export declare const chatKeys: {
|
|
|
5
5
|
readonly lists: readonly ['agents', 'chat', 'conversations'];
|
|
6
6
|
readonly list: (query: ConversationListQuery) => readonly ['agents', 'chat', 'conversations', ConversationListQuery];
|
|
7
7
|
readonly conversation: (id: string) => readonly ['agents', 'chat', 'conversation', string];
|
|
8
|
+
readonly configuration: (id: string) => readonly ['agents', 'chat', 'configuration', string];
|
|
8
9
|
readonly agents: readonly ['agents', 'chat', 'agents'];
|
|
9
10
|
readonly models: readonly ['agents', 'chat', 'models'];
|
|
10
11
|
readonly preferences: readonly ['agents', 'chat', 'preferences'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../../client/chat/keys.ts"],"names":[],"mappings":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AC1C,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;IAC7D,QAAQ,CAAC,IAAI,EAAE,CACb,KAAK,EAAE,qBAAqB,KACzB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,qBAAqB,CAAC,CAAC;IACzE,QAAQ,CAAC,YAAY,EAAE,CACrB,EAAE,EAAE,MAAM,KACP,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;IACzD,QAAQ,CAAC,aAAa,EAAE,CACtB,EAAE,EAAE,MAAM,KACP,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;IAC1D,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IACvD,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IACvD,QAAQ,CAAC,WAAW,EAAE,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;IACjE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;IAC3D,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;CAY1D,CAAC"}
|
package/dist/client/chat/keys.js
CHANGED
|
@@ -5,6 +5,7 @@ export const chatKeys = {
|
|
|
5
5
|
lists: ['agents', 'chat', 'conversations'],
|
|
6
6
|
list: (query) => ['agents', 'chat', 'conversations', query],
|
|
7
7
|
conversation: (id) => ['agents', 'chat', 'conversation', id],
|
|
8
|
+
configuration: (id) => ['agents', 'chat', 'configuration', id],
|
|
8
9
|
agents: agentsKeys.chatAgents,
|
|
9
10
|
models: ['agents', 'chat', 'models'],
|
|
10
11
|
preferences: ['agents', 'chat', 'preferences'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../client/chat/keys.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,oHAAoH;AACpH,MAAM,CAAC,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../client/chat/keys.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,oHAAoH;AACpH,MAAM,CAAC,MAAM,QAAQ,GAiBjB;IACF,GAAG,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,CAAC;IAC1C,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,CAAC;IAC3D,YAAY,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,CAAC;IAC5D,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,EAAE,CAAC;IAC9D,MAAM,EAAE,UAAU,CAAC,UAAU;IAC7B,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;IACpC,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC;IAC9C,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC;IACxC,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC;CACvC,CAAC"}
|
|
@@ -14,9 +14,11 @@ export declare const CHAT_PANEL_ATTRIBUTE = "data-agents-chat";
|
|
|
14
14
|
export interface OpenChatOptions {
|
|
15
15
|
/** An object kept in the context until the next message is sent ("Ask agent"). */
|
|
16
16
|
readonly pin?: ChatContextItem;
|
|
17
|
-
/**
|
|
17
|
+
/** Registered browser UI sources included atomically with opening this chat; never read until send. */
|
|
18
|
+
readonly uiSources?: readonly PageContextRef[];
|
|
19
|
+
/** Text put into the composer; never sent on its own. An explicit empty string is retained. */
|
|
18
20
|
readonly draft?: string;
|
|
19
|
-
/** Open this conversation; null
|
|
21
|
+
/** Open this conversation; null always resets to a fresh composer; left out keeps the current one. */
|
|
20
22
|
readonly conversationId?: string | null;
|
|
21
23
|
/** The agent a new conversation goes to. */
|
|
22
24
|
readonly agentId?: string | null;
|
|
@@ -36,11 +38,15 @@ export interface ChatPanelValue extends ChatPanelState {
|
|
|
36
38
|
readonly toggleChat: () => void;
|
|
37
39
|
readonly setMode: (mode: ChatPanelMode) => void;
|
|
38
40
|
readonly setView: (view: ChatPanelView) => void;
|
|
39
|
-
/** Shows a conversation; null starts a
|
|
40
|
-
readonly selectConversation: (conversationId: string | null, agentId?: string | null
|
|
41
|
+
/** Shows a conversation; null starts a fresh one. Preserve the composer only for executor changes or first-send promotion. */
|
|
42
|
+
readonly selectConversation: (conversationId: string | null, agentId?: string | null, options?: {
|
|
43
|
+
readonly preserveComposer?: boolean;
|
|
44
|
+
}) => void;
|
|
41
45
|
readonly pinned: readonly ChatContextItem[];
|
|
42
46
|
readonly clearPinned: () => void;
|
|
43
47
|
readonly draft: ChatDraft | null;
|
|
48
|
+
/** Changes only when a fresh composer is requested, not on close/reopen or first-send promotion. */
|
|
49
|
+
readonly composerRevision: number;
|
|
44
50
|
/** Where the next new conversation comes from; back to `panel` once it is created. */
|
|
45
51
|
readonly source: ConversationSource;
|
|
46
52
|
readonly resetSource: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../client/chat/provider.tsx"],"names":[],"mappings":"AACA;;;;;GAKG;AACH,OAAO,EASL,KAAK,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