@caupulican/pi-adaptative 0.80.89 → 0.80.90
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 +10 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +17 -0
- package/dist/core/agent-session.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +4 -4
|
@@ -3859,6 +3859,23 @@ export class AgentSession {
|
|
|
3859
3859
|
}
|
|
3860
3860
|
}
|
|
3861
3861
|
}
|
|
3862
|
+
// Strict UAC: the active profile is the COMPLETE grant, so a tool the profile names
|
|
3863
|
+
// explicitly is itself a request for that tool — it must ACTIVATE from the registry even
|
|
3864
|
+
// if the session never requested it. Without this, activation is only ever the requested
|
|
3865
|
+
// defaults ∩ allow-list, and a profile granting non-default tools (a search-only profile's
|
|
3866
|
+
// grep/find) yields an empty or truncated tool set on load and /reload. A blanket "*"
|
|
3867
|
+
// stays grant-only: activation then still derives from the request/defaults above.
|
|
3868
|
+
const explicitAllowPatterns = toolProfileFilter?.allow.filter((pattern) => pattern !== "*") ?? [];
|
|
3869
|
+
if (explicitAllowPatterns.length > 0) {
|
|
3870
|
+
for (const toolName of this._toolRegistry.keys()) {
|
|
3871
|
+
if (!isAllowedTool(toolName))
|
|
3872
|
+
continue;
|
|
3873
|
+
if (matchesResourceProfilePattern(toolName, explicitAllowPatterns)) {
|
|
3874
|
+
nextActiveToolNames.push(toolName);
|
|
3875
|
+
autoActivated.push(toolName);
|
|
3876
|
+
}
|
|
3877
|
+
}
|
|
3878
|
+
}
|
|
3862
3879
|
// artifact_retrieve companion auto-activation is enforced inside
|
|
3863
3880
|
// setActiveToolsByName() itself (not duplicated here), so every activation path --
|
|
3864
3881
|
// including the public, extension-exposed setActiveTools() -- gets the same
|