praxis-agent 0.20.0 → 0.20.1
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/cli.js
CHANGED
|
@@ -31,6 +31,7 @@ import { ClaudeMcpToolRegistry, } from './mcp/claude-mcp-tools.js';
|
|
|
31
31
|
import { ClaudeMcpManagement, filterDisabledMcpResources, mcpScope, } from './mcp/claude-mcp-management.js';
|
|
32
32
|
import { authenticateMcpServer, ClaudeMcpOAuthStore, mcpOAuthServerIdentity, readMcpClientSecret, } from './mcp/claude-mcp-oauth.js';
|
|
33
33
|
import { servePraxisMcpStdio } from './mcp/praxis-mcp-server.js';
|
|
34
|
+
import { VERIFIED_CLAUDE_SCHEMA_VERSION } from './compatibility/claude/schema.js';
|
|
34
35
|
import { detectInstalledClaudeVersion } from './platform/claude-version.js';
|
|
35
36
|
import { redactSensitiveText, sensitiveEnvironmentValues, } from './platform/sensitive-data.js';
|
|
36
37
|
import { AnthropicCompatibleProvider } from './providers/anthropic-compatible.js';
|
|
@@ -697,7 +698,7 @@ const consoleIO = {
|
|
|
697
698
|
const createDefaultService = async ({ eventSink, requireProvider, hooksOnly = false, approveRecovery, approveTool, agent, model: interactiveModel, effort: interactiveEffort, permissionMode: interactivePermissionMode, isSessionActionApproved, controls = DEFAULT_CLI_CONTROLS, interactive = false, sessionKind, signal, exposeToolRegistry = false, onElicitation, askUser, approvePlan, emitToolUseSummaries = false, cwd: requestedCwd, sandboxOriginalCwd, configRoot: requestedConfigRoot, environment, providerEnvironment: requestedProviderEnvironment, }) => {
|
|
698
699
|
const runtimeEnvironment = requestedProviderEnvironment ?? process.env;
|
|
699
700
|
const sandboxEnvironment = { ...runtimeEnvironment, ...environment };
|
|
700
|
-
const claudeVersion =
|
|
701
|
+
const claudeVersion = VERIFIED_CLAUDE_SCHEMA_VERSION;
|
|
701
702
|
const cwd = requestedCwd ?? process.cwd();
|
|
702
703
|
const workspace = new WorkspaceContext(cwd);
|
|
703
704
|
const configuredRoot = runtimeEnvironment.CLAUDE_CONFIG_DIR || undefined;
|
|
@@ -4436,8 +4437,14 @@ function isDirectExecution(moduleUrl, argvPath) {
|
|
|
4436
4437
|
if (isDirectExecution(import.meta.url, process.argv[1])) {
|
|
4437
4438
|
const controller = new AbortController();
|
|
4438
4439
|
const cancel = () => controller.abort();
|
|
4439
|
-
process.
|
|
4440
|
-
process.
|
|
4441
|
-
|
|
4440
|
+
process.on('SIGINT', cancel);
|
|
4441
|
+
process.on('SIGTERM', cancel);
|
|
4442
|
+
try {
|
|
4443
|
+
process.exitCode = await run(process.argv.slice(2), consoleIO, defaultDependencies, controller.signal);
|
|
4444
|
+
}
|
|
4445
|
+
finally {
|
|
4446
|
+
process.removeListener('SIGINT', cancel);
|
|
4447
|
+
process.removeListener('SIGTERM', cancel);
|
|
4448
|
+
}
|
|
4442
4449
|
}
|
|
4443
4450
|
//# sourceMappingURL=cli.js.map
|
|
@@ -11,6 +11,7 @@ export interface ClaudeSchemaAdapter {
|
|
|
11
11
|
serializeForSidechainAppend(entry: ClaudeTranscriptEntry): string;
|
|
12
12
|
serializeForFork(entry: ClaudeTranscriptEntry): string;
|
|
13
13
|
}
|
|
14
|
+
export declare const VERIFIED_CLAUDE_SCHEMA_VERSION = "2.1.208";
|
|
14
15
|
export declare function isClaudeForkableEntryType(type: string): boolean;
|
|
15
16
|
export declare function copyClaudeEntryWithSessionId(entry: ClaudeTranscriptEntry, sessionId: string): ClaudeTranscriptEntry;
|
|
16
17
|
export declare function selectClaudeSchemaAdapter(version: string): ClaudeSchemaAdapter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isAgentColorValue } from './agent-color.js';
|
|
2
|
-
const
|
|
2
|
+
export const VERIFIED_CLAUDE_SCHEMA_VERSION = '2.1.208';
|
|
3
3
|
const APPENDABLE_ENTRY_TYPES = new Set([
|
|
4
4
|
'agent-color',
|
|
5
5
|
'agent-name',
|
|
@@ -775,8 +775,8 @@ function validateAppendableEntry(entry) {
|
|
|
775
775
|
throw new Error(`Claude transcript entry is missing ${field}`);
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
|
-
if (entry.version !==
|
|
779
|
-
throw new Error(`Claude transcript append must target Claude Code ${
|
|
778
|
+
if (entry.version !== VERIFIED_CLAUDE_SCHEMA_VERSION) {
|
|
779
|
+
throw new Error(`Claude transcript append must target Claude Code ${VERIFIED_CLAUDE_SCHEMA_VERSION}`);
|
|
780
780
|
}
|
|
781
781
|
if (!('parentUuid' in entry) ||
|
|
782
782
|
(entry.parentUuid !== null && !isNonEmptyString(entry.parentUuid))) {
|
|
@@ -836,8 +836,8 @@ function validateSidechainEntry(entry) {
|
|
|
836
836
|
throw new Error(`Claude sidechain entry is missing ${field}`);
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
|
-
if (entry.version !==
|
|
840
|
-
throw new Error(`Claude sidechain append must target Claude Code ${
|
|
839
|
+
if (entry.version !== VERIFIED_CLAUDE_SCHEMA_VERSION) {
|
|
840
|
+
throw new Error(`Claude sidechain append must target Claude Code ${VERIFIED_CLAUDE_SCHEMA_VERSION}`);
|
|
841
841
|
}
|
|
842
842
|
if (!('parentUuid' in entry) ||
|
|
843
843
|
(entry.parentUuid !== null && !isNonEmptyString(entry.parentUuid))) {
|
|
@@ -925,8 +925,8 @@ function validateForkableEntry(entry) {
|
|
|
925
925
|
throw new Error(`Claude transcript entry is missing ${field}`);
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
|
-
if (entry.version !==
|
|
929
|
-
throw new Error(`Claude transcript fork must target Claude Code ${
|
|
928
|
+
if (entry.version !== VERIFIED_CLAUDE_SCHEMA_VERSION) {
|
|
929
|
+
throw new Error(`Claude transcript fork must target Claude Code ${VERIFIED_CLAUDE_SCHEMA_VERSION}`);
|
|
930
930
|
}
|
|
931
931
|
if (!('parentUuid' in entry) ||
|
|
932
932
|
(entry.parentUuid !== null && !isNonEmptyString(entry.parentUuid))) {
|
|
@@ -969,7 +969,7 @@ function validateForkableEntry(entry) {
|
|
|
969
969
|
validateForkAssistantMessage(entry.message);
|
|
970
970
|
}
|
|
971
971
|
class ClaudeCode21208Adapter {
|
|
972
|
-
version =
|
|
972
|
+
version = VERIFIED_CLAUDE_SCHEMA_VERSION;
|
|
973
973
|
writeMode = 'read-write';
|
|
974
974
|
parse(line) {
|
|
975
975
|
return parseEntry(line);
|
|
@@ -1019,7 +1019,7 @@ class ReadOnlyClaudeAdapter {
|
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
1021
1021
|
export function selectClaudeSchemaAdapter(version) {
|
|
1022
|
-
if (version ===
|
|
1022
|
+
if (version === VERIFIED_CLAUDE_SCHEMA_VERSION) {
|
|
1023
1023
|
return new ClaudeCode21208Adapter();
|
|
1024
1024
|
}
|
|
1025
1025
|
return new ReadOnlyClaudeAdapter(version);
|