praxis-agent 0.20.4 → 0.20.7
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/application/background-agent-manager.js +3 -14
- package/dist/cli/tui/claude-style.d.ts +2 -1
- package/dist/cli/tui/claude-style.js +226 -44
- package/dist/cli/tui/git-diff.js +67 -0
- package/dist/cli-runtime.d.ts +172 -0
- package/dist/cli-runtime.js +4434 -0
- package/dist/cli.d.ts +5 -164
- package/dist/cli.js +17 -4418
- package/dist/compatibility/claude/file-resources.js +6 -2
- package/dist/permissions/bash-path-safety.d.ts +1 -0
- package/dist/permissions/bash-path-safety.js +14 -0
- package/dist/permissions/bypass-immune-paths.d.ts +11 -0
- package/dist/permissions/bypass-immune-paths.js +86 -0
- package/dist/tools/local-tools.d.ts +7 -0
- package/dist/tools/local-tools.js +42 -1
- package/package.json +1 -1
package/dist/cli.d.ts
CHANGED
|
@@ -1,169 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import type { InteractiveResumeOptions, InteractiveServiceFactory } from './cli/interactive.js';
|
|
8
|
-
import type { TuiSlashCommand } from './cli/tui/slash-commands.js';
|
|
9
|
-
import { type TuiHookConfiguration } from './cli/tui/hook-settings.js';
|
|
10
|
-
import { type ClaudePermissionMode } from './permissions/claude-permission-resolver.js';
|
|
11
|
-
import { type ClaudeMcpServerStatus, type ClaudeMcpToolInspection } from './mcp/claude-mcp-tools.js';
|
|
12
|
-
import { authenticateMcpServer } from './mcp/claude-mcp-oauth.js';
|
|
13
|
-
import { servePraxisMcpStdio } from './mcp/praxis-mcp-server.js';
|
|
14
|
-
import { parseContextEnvironment, parseProviderEnvironment } from './providers/environment.js';
|
|
15
|
-
import { type ClaudeInteractiveToolCallbacks } from './tools/claude-interactive-tools.js';
|
|
16
|
-
import { type TopLevelAgentSummary } from './application/top-level-agent-manager.js';
|
|
17
|
-
import { launchTmuxWorktree } from './platform/tmux-worktree.js';
|
|
18
|
-
import { type CliControls, type CliRuntimeInfo, type CliElicitationRequest, type CliElicitationResult } from './cli/protocol.js';
|
|
19
|
-
import { type PluginEvalDependencies } from './plugins/claude-plugin-eval.js';
|
|
20
|
-
import { type SelfUpdateResult } from './maintenance/self-update.js';
|
|
21
|
-
export { parseContextEnvironment, parseProviderEnvironment };
|
|
22
|
-
export interface CliIO {
|
|
23
|
-
stdout(message: string | Uint8Array): void;
|
|
24
|
-
stderr(message: string): void;
|
|
25
|
-
isTTY?: boolean;
|
|
26
|
-
readStdinLines?: () => AsyncIterable<string | Uint8Array>;
|
|
27
|
-
}
|
|
28
|
-
interface SessionCommands {
|
|
29
|
-
toolRegistry?: ToolRegistry;
|
|
30
|
-
run(prompt: string, signal?: AbortSignal, sessionId?: string, name?: string, images?: readonly ModelImage[], documents?: readonly ModelDocument[]): Promise<SessionRunResult>;
|
|
31
|
-
resume(sessionId: string, prompt: string, signal?: AbortSignal, name?: string, images?: readonly ModelImage[], documents?: readonly ModelDocument[]): Promise<SessionRunResult>;
|
|
32
|
-
runShell?(command: string, signal?: AbortSignal, sessionId?: string, name?: string): Promise<SessionRunResult>;
|
|
33
|
-
resumeShell?(sessionId: string, command: string, signal?: AbortSignal, name?: string): Promise<SessionRunResult>;
|
|
34
|
-
fork(sessionId: string, targetSessionId?: string, resumeSessionAt?: string): Promise<ForkResult>;
|
|
35
|
-
ensureFork?(sessionId: string, targetSessionId: string, checkpoint?: SessionForkCheckpoint): Promise<ForkResult>;
|
|
36
|
-
setPermissionMode?(sessionId: string, mode: ClaudePermissionMode): Promise<void>;
|
|
37
|
-
rewindFiles?(sessionId: string, userMessageId: string): Promise<void>;
|
|
38
|
-
rewindPoints?(sessionId: string): Promise<RewindPoint[]>;
|
|
39
|
-
changeCwd?(sessionId: string | undefined, cwd: string): Promise<string>;
|
|
40
|
-
recordCdUsage?(sessionId: string): Promise<void>;
|
|
41
|
-
approveRecentlyDenied?(sessionId: string, display: string): Promise<void>;
|
|
42
|
-
retryRecentlyDenied?(sessionId: string, display: string, signal?: AbortSignal): Promise<SessionRunResult>;
|
|
43
|
-
answerSideQuestion?(sessionId: string | undefined, question: string, signal?: AbortSignal, onDelta?: (delta: string) => void, permissionMode?: ClaudePermissionMode): Promise<SideQuestionResult>;
|
|
44
|
-
recordBtwUsage?(sessionId: string | undefined, permissionMode?: ClaudePermissionMode): Promise<string>;
|
|
45
|
-
recordColorUsage?(sessionId: string | undefined, selection: AgentColorSelection, display: string, permissionMode?: ClaudePermissionMode, options?: {
|
|
46
|
-
createSession?: boolean;
|
|
47
|
-
}): Promise<string>;
|
|
48
|
-
agentColor?(sessionId: string): Promise<AgentColorName | undefined>;
|
|
49
|
-
recordBackgroundUsage?(sessionId: string | undefined, permissionMode?: ClaudePermissionMode): Promise<string>;
|
|
50
|
-
recordBackgroundLaunch?(sessionId: string): Promise<SessionForkCheckpoint>;
|
|
51
|
-
forkSideQuestion?(sessionId: string, question: string, signal?: AbortSignal): Promise<SideQuestionForkResult>;
|
|
52
|
-
lifecycle?(trigger: 'init' | 'maintenance', options?: {
|
|
53
|
-
sessionStart?: boolean;
|
|
54
|
-
sessionId?: string;
|
|
55
|
-
}): Promise<void>;
|
|
56
|
-
sessions(): Promise<SessionSummary[]>;
|
|
57
|
-
inspect(sessionId: string): Promise<SessionInspection>;
|
|
58
|
-
export(sessionId: string): Promise<Buffer>;
|
|
59
|
-
transcript?(sessionId: string): Promise<ClaudeDisplayTranscriptItem[]>;
|
|
60
|
-
costSnapshot?(sessionId: string): Promise<ClaudeSessionCostSnapshot>;
|
|
61
|
-
compact?(sessionId: string, signal?: AbortSignal, selection?: ManualCompactSelection): Promise<ManualCompactResult>;
|
|
62
|
-
rename?(sessionId: string, name: string): Promise<void>;
|
|
63
|
-
sessionNameSuggestion?(sessionId: string, signal?: AbortSignal): Promise<string | null>;
|
|
64
|
-
nextScheduledPrompt?(signal?: AbortSignal): Promise<{
|
|
65
|
-
id: string;
|
|
66
|
-
prompt: string;
|
|
67
|
-
} | null>;
|
|
68
|
-
slashCommands?(): readonly TuiSlashCommand[];
|
|
69
|
-
hookConfiguration?(): Promise<TuiHookConfiguration>;
|
|
70
|
-
mcpInspect?(): Promise<readonly ClaudeMcpServerStatus[]>;
|
|
71
|
-
mcpReconnect?(name: string): Promise<void>;
|
|
72
|
-
mcpAuthenticate?(name: string): Promise<void>;
|
|
73
|
-
mcpReload?(): Promise<void>;
|
|
74
|
-
mcpTools?(name: string): Promise<readonly ClaudeMcpToolInspection[]>;
|
|
75
|
-
close?(): Promise<void>;
|
|
76
|
-
runtimeInfo?(): CliRuntimeInfo;
|
|
77
|
-
initialAgentPrompt?(): string | undefined;
|
|
78
|
-
agentDefinitions?(): readonly {
|
|
79
|
-
name: string;
|
|
80
|
-
description: string;
|
|
81
|
-
}[];
|
|
82
|
-
promptSuggestion?(sessionId: string, signal?: AbortSignal): Promise<string | null>;
|
|
83
|
-
}
|
|
84
|
-
interface TopLevelAgentCommands {
|
|
85
|
-
launch(options: {
|
|
86
|
-
prompt: string;
|
|
87
|
-
argv: string[];
|
|
88
|
-
resumeSessionId?: string;
|
|
89
|
-
cwd?: string;
|
|
90
|
-
deferInitialTurn?: boolean;
|
|
91
|
-
sourceSessionId?: string;
|
|
92
|
-
sourceCheckpoint?: SessionForkCheckpoint;
|
|
93
|
-
initialDetail?: string;
|
|
94
|
-
}): Promise<{
|
|
95
|
-
id: string;
|
|
96
|
-
sessionId: string;
|
|
97
|
-
}>;
|
|
98
|
-
list(options: {
|
|
99
|
-
cwd?: string;
|
|
100
|
-
all: boolean;
|
|
101
|
-
}): Promise<TopLevelAgentSummary[]>;
|
|
102
|
-
logs(id: string): Promise<string>;
|
|
103
|
-
stop(id: string): Promise<void>;
|
|
104
|
-
attach(id: string, input: AsyncIterable<string | Uint8Array>, output: (text: string) => void, signal?: AbortSignal): Promise<void>;
|
|
105
|
-
}
|
|
106
|
-
export interface CliDependencies extends InteractiveServiceFactory {
|
|
107
|
-
loadReleaseNotes?(configRoot: string): Promise<string>;
|
|
108
|
-
createService(options: {
|
|
109
|
-
eventSink: RuntimeEventSink;
|
|
110
|
-
requireProvider: boolean;
|
|
111
|
-
hooksOnly?: boolean;
|
|
112
|
-
approveRecovery?: (call: ModelToolCall) => boolean | Promise<boolean>;
|
|
113
|
-
approveTool?: (call: ModelToolCall, originalCall?: ModelToolCall, decision?: PermissionDecision) => PermissionApproval | Promise<PermissionApproval>;
|
|
114
|
-
agent?: string;
|
|
115
|
-
model?: string;
|
|
116
|
-
effort?: CliControls['effort'];
|
|
117
|
-
permissionMode?: ClaudePermissionMode;
|
|
118
|
-
isSessionActionApproved?: (call: ModelToolCall) => boolean;
|
|
119
|
-
controls?: CliControls;
|
|
120
|
-
interactive?: boolean;
|
|
121
|
-
sessionKind?: 'bg';
|
|
122
|
-
signal?: AbortSignal;
|
|
123
|
-
exposeToolRegistry?: boolean;
|
|
124
|
-
emitToolUseSummaries?: boolean;
|
|
125
|
-
cwd?: string;
|
|
126
|
-
sandboxOriginalCwd?: string;
|
|
127
|
-
configRoot?: string;
|
|
128
|
-
environment?: Readonly<Record<string, string>>;
|
|
129
|
-
providerEnvironment?: NodeJS.ProcessEnv;
|
|
130
|
-
onElicitation?: (request: CliElicitationRequest) => Promise<CliElicitationResult>;
|
|
131
|
-
askUser?: ClaudeInteractiveToolCallbacks['askUser'];
|
|
132
|
-
approvePlan?: ClaudeInteractiveToolCallbacks['approvePlan'];
|
|
133
|
-
}): Promise<SessionCommands>;
|
|
134
|
-
createAutoModeCritic?(options: {
|
|
135
|
-
model?: string;
|
|
136
|
-
}): Promise<ModelProvider>;
|
|
137
|
-
pluginEval?: PluginEvalDependencies;
|
|
138
|
-
runInteractive?(options: {
|
|
139
|
-
agent?: string;
|
|
140
|
-
controls?: CliControls;
|
|
141
|
-
initialPrompt?: string;
|
|
142
|
-
resume?: InteractiveResumeOptions & {
|
|
143
|
-
fromPr?: string | true;
|
|
144
|
-
};
|
|
145
|
-
signal?: AbortSignal;
|
|
146
|
-
}): Promise<number>;
|
|
147
|
-
runAgentsDashboard?(options: {
|
|
148
|
-
manager: TopLevelAgentCommands;
|
|
149
|
-
defaults: {
|
|
150
|
-
argv: readonly string[];
|
|
151
|
-
cwd?: string;
|
|
152
|
-
};
|
|
153
|
-
signal?: AbortSignal;
|
|
154
|
-
}): Promise<number>;
|
|
155
|
-
topLevelAgents?: TopLevelAgentCommands;
|
|
156
|
-
launchTmux?: typeof launchTmuxWorktree;
|
|
157
|
-
mcpAuthenticate?: typeof authenticateMcpServer;
|
|
158
|
-
mcpServe?: typeof servePraxisMcpStdio;
|
|
159
|
-
selfUpdate?: (options: {
|
|
160
|
-
operation: 'install' | 'update';
|
|
161
|
-
target?: string;
|
|
162
|
-
force?: boolean;
|
|
163
|
-
}) => Promise<SelfUpdateResult>;
|
|
164
|
-
}
|
|
2
|
+
import type { RuntimeEventSink } from './core/runtime.js';
|
|
3
|
+
import type { CliDependencies, CliIO } from './cli-runtime.js';
|
|
4
|
+
export { parseContextEnvironment, parseProviderEnvironment, } from './providers/environment.js';
|
|
5
|
+
export type { CliDependencies, CliIO } from './cli-runtime.js';
|
|
6
|
+
export declare function run(argv: readonly string[], io?: CliIO, dependencies?: CliDependencies, signal?: AbortSignal): Promise<number>;
|
|
165
7
|
export declare function createBackgroundWorkerRuntime(workerSink: RuntimeEventSink, dispatch: {
|
|
166
8
|
argv: string[];
|
|
167
9
|
}, createService?: CliDependencies['createService']): Promise<Awaited<ReturnType<CliDependencies['createService']>>>;
|
|
168
|
-
export declare function run(argv: readonly string[], io?: CliIO, dependencies?: CliDependencies, signal?: AbortSignal): Promise<number>;
|
|
169
10
|
//# sourceMappingURL=cli.d.ts.map
|