@myagentroam/agent 0.9.138 → 0.9.140
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/host/local-agent-host.d.ts +3 -1
- package/dist/host/local-agent-host.js +29 -3
- package/dist/prompts/resources.js +4 -2
- package/dist/prompts/workflow.js +2 -0
- package/dist/runtime/context-gc.js +25 -8
- package/dist/sdk/agent.js +40 -38
- package/dist/session/context-gc-checkpoint.d.ts +1 -1
- package/dist/session/context-gc-checkpoint.js +8 -5
- package/dist/session/context-gc-replacements.d.ts +1 -1
- package/dist/session/context-gc-replacements.js +5 -3
- package/dist/tools/agent-wait.js +1 -1
- package/dist/tools/apply-patch.js +1 -1
- package/dist/tools/callers.js +1 -1
- package/dist/tools/code-mode/cells.d.ts +7 -1
- package/dist/tools/code-mode/cells.js +32 -8
- package/dist/tools/code-mode/engine.d.ts +5 -2
- package/dist/tools/code-mode/quickjs-engine.js +106 -18
- package/dist/tools/code-mode/text-output.d.ts +21 -0
- package/dist/tools/code-mode/text-output.js +75 -0
- package/dist/tools/code-mode/worker.js +1 -1
- package/dist/tools/code-mode.js +36 -18
- package/dist/tools/exec.d.ts +3 -0
- package/dist/tools/exec.js +56 -15
- package/dist/tools/execution-limits.d.ts +4 -1
- package/dist/tools/execution-limits.js +4 -1
- package/dist/tools/local-registry.js +5 -5
- package/dist/tools/registry.js +2 -1
- package/dist/tools/skill.js +1 -1
- package/dist/tools/tool-search.js +5 -3
- package/package.json +1 -1
package/dist/tools/skill.js
CHANGED
|
@@ -2,7 +2,7 @@ import { MarAgentError } from '../error.js';
|
|
|
2
2
|
import { agentSkillSource, loadAgentSkill } from '../runtime/instructions.js';
|
|
3
3
|
export const skillToolDefinition = {
|
|
4
4
|
name: 'skill',
|
|
5
|
-
allowedCallers: ['direct'
|
|
5
|
+
allowedCallers: ['direct'],
|
|
6
6
|
parallelSafety: 'safe',
|
|
7
7
|
description: 'Load a specialized Skill when the task matches one listed in the system prompt. Returns its instructions and source; file-based Skills also include a base directory and resource-path sample. Host-provided skills have no filesystem base. The name must exactly match the advertised catalog.',
|
|
8
8
|
inputSchema: {
|
|
@@ -59,7 +59,9 @@ export class DeferredMcpRegistry {
|
|
|
59
59
|
.filter((tool) => tool.lifetime === 'session' && tool.exposure === 'deferred')
|
|
60
60
|
.map((tool) => tool.definition.name));
|
|
61
61
|
this.#selected = stableUnique(discoveredNames).filter((name) => valid.has(name));
|
|
62
|
-
|
|
62
|
+
const surviving = new Set(discoveredNames);
|
|
63
|
+
// GC may remove evidence, but cannot grant a capability from another Execution.
|
|
64
|
+
this.#executionSelected = new Set([...this.#executionSelected].filter((name) => surviving.has(name)));
|
|
63
65
|
}
|
|
64
66
|
update(catalog, eligible) {
|
|
65
67
|
assertMcpToolCatalog(catalog);
|
|
@@ -117,12 +119,12 @@ export class DeferredMcpRegistry {
|
|
|
117
119
|
return (tool && { sourceIdentity: tool.sourceIdentity, definitionRevision: tool.definitionRevision });
|
|
118
120
|
}
|
|
119
121
|
restoredDefinitions(names) {
|
|
120
|
-
const selected = new Set(this.#selected);
|
|
122
|
+
const selected = new Set([...this.#selected, ...this.#executionSelected]);
|
|
121
123
|
return names.flatMap((name) => {
|
|
122
124
|
if (!selected.has(name))
|
|
123
125
|
return [];
|
|
124
126
|
const tool = this.#catalog.tools.find((item) => item.definition.name === name);
|
|
125
|
-
return tool?.
|
|
127
|
+
return tool?.exposure === 'deferred' ? [tool.definition] : [];
|
|
126
128
|
});
|
|
127
129
|
}
|
|
128
130
|
projectDirect(base) {
|