praxis-agent 0.52.0 → 0.53.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/README.md
CHANGED
|
@@ -220,8 +220,13 @@ troubleshooting. Run `praxis --help` for the authoritative command surface.
|
|
|
220
220
|
into mode-`0600` `.txt` files under the session-scoped `tool-results`
|
|
221
221
|
directory; providers and transcripts receive only a bounded instruction with
|
|
222
222
|
the absolute file path. Results at or below the limit remain inline, while
|
|
223
|
-
structured, mixed-media, and binary-resource handling is unchanged.
|
|
224
|
-
|
|
223
|
+
structured, mixed-media, and binary-resource handling is unchanged. MCP
|
|
224
|
+
tools that declare `readOnlyHint: true` default to allow through
|
|
225
|
+
provider-neutral permission metadata; explicit PreToolUse and permission
|
|
226
|
+
ask/deny decisions retain precedence, and missing or false hints retain the
|
|
227
|
+
existing default behavior. This is a Praxis permission contract, not a claim
|
|
228
|
+
of verified Claude Code 2.1.208 parity. Explicit concrete `--tools`
|
|
229
|
+
selections load selected tools directly, while
|
|
225
230
|
`--disallowedTools ToolSearch` restores the complete tool list.
|
|
226
231
|
- **Provider-neutral models** — native Provider Registry/Vault routing, API
|
|
227
232
|
adapters, an experimental Codex OAuth adapter, explicit capability checks,
|
package/dist/core/runtime.d.ts
CHANGED
|
@@ -342,6 +342,7 @@ export interface ToolExecutionContext {
|
|
|
342
342
|
toolResultDirectory?: string;
|
|
343
343
|
originalCall?: ModelToolCall;
|
|
344
344
|
permissionUpdates?: readonly PermissionUpdate[];
|
|
345
|
+
toolPermission?: ToolPermissionMetadata;
|
|
345
346
|
permissionPhase?: 'request' | 'execute';
|
|
346
347
|
permissionApproved?: boolean;
|
|
347
348
|
/** Internal marker for an explicit PreToolUse allow decision. */
|
|
@@ -405,6 +406,9 @@ export type PermissionApproval = boolean | {
|
|
|
405
406
|
message: string;
|
|
406
407
|
interrupt?: boolean;
|
|
407
408
|
};
|
|
409
|
+
export interface ToolPermissionMetadata {
|
|
410
|
+
readonly readOnly: true;
|
|
411
|
+
}
|
|
408
412
|
export interface PermissionResolutionContext {
|
|
409
413
|
cwd: string;
|
|
410
414
|
messages?: readonly ModelMessage[];
|
|
@@ -412,6 +416,7 @@ export interface PermissionResolutionContext {
|
|
|
412
416
|
toolResultDirectory?: string;
|
|
413
417
|
originalCall?: ModelToolCall;
|
|
414
418
|
permissionUpdates?: readonly PermissionUpdate[];
|
|
419
|
+
toolPermission?: ToolPermissionMetadata;
|
|
415
420
|
}
|
|
416
421
|
export type PermissionDecisionSource = 'auto-classifier' | 'rule' | 'mode' | 'default';
|
|
417
422
|
export type AutoModePermissionOutcome = 'blocked' | 'unavailable';
|
|
@@ -944,7 +944,10 @@ export class ClaudeMcpToolRegistry {
|
|
|
944
944
|
};
|
|
945
945
|
}
|
|
946
946
|
async prepare(call, context) {
|
|
947
|
-
|
|
947
|
+
const tool = this.connectedTools.get(call.name);
|
|
948
|
+
if (tool?.readOnly === true)
|
|
949
|
+
context.toolPermission = { readOnly: true };
|
|
950
|
+
return tool ||
|
|
948
951
|
MCP_RESOURCE_TOOL_DEFINITIONS.some((definition) => definition.name === call.name)
|
|
949
952
|
? call
|
|
950
953
|
: this.options.base.prepare(call, context);
|
|
@@ -613,7 +613,9 @@ export class ClaudePermissionResolver {
|
|
|
613
613
|
if (permissionMode === 'auto' && call.name === 'Bash') {
|
|
614
614
|
return annotatePermissionDecision({ behavior: 'allow' }, 'default');
|
|
615
615
|
}
|
|
616
|
-
const defaultBehavior =
|
|
616
|
+
const defaultBehavior = context?.toolPermission?.readOnly === true
|
|
617
|
+
? 'allow'
|
|
618
|
+
: DEFAULT_BEHAVIOR[call.name];
|
|
617
619
|
return defaultBehavior === 'ask'
|
|
618
620
|
? this.askDecision(call, cwd, permissionMode, context, 'default', command
|
|
619
621
|
? (subcommand) => matchingRule('allow', subcommandCall(subcommand)) === undefined
|