@orkestrel/agent 0.0.10 → 0.0.11
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/dist/src/core/index.cjs +9 -14
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +31 -20
- package/dist/src/core/index.d.ts +31 -20
- package/dist/src/core/index.js +9 -14
- package/dist/src/core/index.js.map +1 -1
- package/package.json +1 -1
package/dist/src/core/index.cjs
CHANGED
|
@@ -2122,15 +2122,17 @@ var WorkspaceManager = class {
|
|
|
2122
2122
|
* The richer turn context the agent loop assembles a provider request from — the optional
|
|
2123
2123
|
* system prompt, the observable context managers (instructions / workspaces), the
|
|
2124
2124
|
* {@link ConversationManagerInterface} message source (whose active conversation IS `messages`),
|
|
2125
|
-
* the {@link ToolManagerInterface} registry, and
|
|
2125
|
+
* the {@link ToolManagerInterface} registry, and an active {@link ScopeInterface} changed through
|
|
2126
|
+
* {@link AgentContextInterface.apply}.
|
|
2126
2127
|
*
|
|
2127
2128
|
* @remarks
|
|
2128
2129
|
* - **Composition.** `system` is the optional system prompt; `instructions` / `tools` /
|
|
2129
2130
|
* `workspaces` / `conversations` are the registries passed in `options` (bring your own), or
|
|
2130
2131
|
* fresh empty ones when omitted (so `workspaces` is ALWAYS present); `messages` is the ACTIVE
|
|
2131
2132
|
* conversation's live tail (ALWAYS defined — see below). `scope` is the active filter —
|
|
2132
|
-
* `undefined` (the default) ⇒ no filtering;
|
|
2133
|
-
*
|
|
2133
|
+
* `undefined` (the default) ⇒ no filtering; change it through `apply(scope)`. The structural
|
|
2134
|
+
* `workspaces` / `conversations` registries are fixed at construction; switch their active
|
|
2135
|
+
* members through their own `switch(id)` methods.
|
|
2134
2136
|
* - **The message source — the conversation registry's ACTIVE conversation.** `conversations` is a
|
|
2135
2137
|
* {@link ConversationManagerInterface}; the context ENSURES it always has an active conversation
|
|
2136
2138
|
* (at construction it `add`s a default when the manager has none), so the DYNAMIC `messages`
|
|
@@ -2208,27 +2210,20 @@ var AgentContext = class {
|
|
|
2208
2210
|
get workspaces() {
|
|
2209
2211
|
return this.#workspaces;
|
|
2210
2212
|
}
|
|
2211
|
-
set workspaces(value) {
|
|
2212
|
-
this.#workspaces = value;
|
|
2213
|
-
}
|
|
2214
2213
|
get messages() {
|
|
2215
2214
|
return this.#conversations.active ?? this.#ensure();
|
|
2216
2215
|
}
|
|
2217
2216
|
get conversations() {
|
|
2218
2217
|
return this.#conversations;
|
|
2219
2218
|
}
|
|
2220
|
-
set conversations(value) {
|
|
2221
|
-
this.#conversations = value;
|
|
2222
|
-
if (this.#conversations.active === void 0) this.#conversations.add();
|
|
2223
|
-
}
|
|
2224
2219
|
get tools() {
|
|
2225
2220
|
return this.#tools;
|
|
2226
2221
|
}
|
|
2227
2222
|
get scope() {
|
|
2228
2223
|
return this.#scope;
|
|
2229
2224
|
}
|
|
2230
|
-
|
|
2231
|
-
this.#scope =
|
|
2225
|
+
apply(scope) {
|
|
2226
|
+
this.#scope = scope;
|
|
2232
2227
|
}
|
|
2233
2228
|
build(format) {
|
|
2234
2229
|
const scope = this.#scope;
|
|
@@ -3791,8 +3786,8 @@ function createScopeManager(options) {
|
|
|
3791
3786
|
* @remarks
|
|
3792
3787
|
* `system` is the optional system prompt; `tools` / `instructions` / `workspaces` are pre-built
|
|
3793
3788
|
* managers to reuse (empty ones are created when omitted, so `context.workspaces` is ALWAYS
|
|
3794
|
-
* present); `scope` is the initial active filter (`undefined` ⇒ no filtering,
|
|
3795
|
-
* via `context.
|
|
3789
|
+
* present); `scope` is the initial active filter (`undefined` ⇒ no filtering, changeable afterwards
|
|
3790
|
+
* via `context.apply(...)`). The `messages` store is always fresh. `build()` folds the scoped
|
|
3796
3791
|
* instructions — PLUS the ACTIVE workspace's scope-filtered text files (fenced) — into ONE leading
|
|
3797
3792
|
* `system` message and appends the scoped conversation (attaching the active workspace's
|
|
3798
3793
|
* scope-filtered image files' `data` to the last user message), built fresh each call; the active
|