praxis-agent 0.41.0 → 0.42.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/README.md CHANGED
@@ -198,9 +198,12 @@ troubleshooting. Run `praxis --help` for the authoritative command surface.
198
198
  validation for unsupported payloads.
199
199
  - **Native resource ecosystem** — shared Praxis instructions with recursive `@`
200
200
  imports, memory, skills, commands, agents, hooks, settings, MCP servers,
201
- plugins, and append-only `praxis.transcript` JSONL sessions under `~/.praxis`.
201
+ plugins, and append-only `praxis.transcript` JSONL sessions under `~/.praxis`,
202
+ with bounded MCP connection, discovery, and tool operations plus safe
203
+ disconnect recovery that never replays an already-dispatched call.
202
204
  - **Provider-neutral models** — native Anthropic Messages and OpenAI-compatible
203
- streaming adapters with explicit capability checks and metering controls.
205
+ streaming adapters with explicit capability checks, metering controls, and
206
+ a bounded absolute deadline for every provider attempt.
204
207
 
205
208
  Detailed feature status and executable evidence live in the
206
209
  [parity matrix](https://github.com/Forest-Isle/Praxis/blob/main/docs/PARITY_MATRIX.md),
@@ -47,6 +47,7 @@ import { redactSensitiveText, sensitiveEnvironmentValues, } from './platform/sen
47
47
  import { AnthropicCompatibleProvider } from './providers/anthropic-compatible.js';
48
48
  import { createAnthropicPromptCachePolicyResolver } from './providers/anthropic-prompt-cache.js';
49
49
  import { FallbackModelProvider } from './providers/fallback-provider.js';
50
+ import { DeadlineModelProvider } from './providers/deadline-provider.js';
50
51
  import { OpenAICompatibleProvider } from './providers/openai-compatible.js';
51
52
  import { parseContextEnvironment, parseProviderEnvironment, } from './providers/environment.js';
52
53
  import { ModelPricingRegistry, usageCostUsd } from './core/usage.js';
@@ -107,7 +108,7 @@ function createProviderForModel({ apiKey, environment, provider, context, contro
107
108
  ? { contextWindowTokens: context.contextWindowTokens }
108
109
  : {}),
109
110
  };
110
- return provider.provider === 'anthropic'
111
+ const concrete = provider.provider === 'anthropic'
111
112
  ? new AnthropicCompatibleProvider({
112
113
  ...providerOptions,
113
114
  promptCaching: resolvePromptCachePolicy({
@@ -126,7 +127,9 @@ function createProviderForModel({ apiKey, environment, provider, context, contro
126
127
  ...('anthropicVersion' in provider
127
128
  ? { anthropicVersion: provider.anthropicVersion }
128
129
  : {}),
129
- ...('webSearch' in provider ? { webSearch: provider.webSearch } : {}),
130
+ ...('webSearch' in provider
131
+ ? { webSearch: provider.webSearch }
132
+ : {}),
130
133
  })
131
134
  : new OpenAICompatibleProvider({
132
135
  ...providerOptions,
@@ -142,6 +145,10 @@ function createProviderForModel({ apiKey, environment, provider, context, contro
142
145
  },
143
146
  }),
144
147
  });
148
+ return new DeadlineModelProvider({
149
+ provider: concrete,
150
+ deadlineMs: provider.deadlineMs,
151
+ });
145
152
  };
146
153
  }
147
154
  const HELP = `Praxis — local-first general agent
@@ -1374,6 +1381,7 @@ const createDefaultService = async ({ eventSink, requireProvider, hooksOnly = fa
1374
1381
  provider: hostedToolProvider,
1375
1382
  }),
1376
1383
  resources: await runtimeMcpResources(resources.mcp),
1384
+ environment: runtimeEnvironment,
1377
1385
  reloadResources: async () => {
1378
1386
  if (cli.strictMcpConfig)
1379
1387
  return runtimeMcpResources(cli.mcpResources);
@@ -70,6 +70,7 @@ export interface ClaudeMcpToolRegistryOptions {
70
70
  configRoot?: string;
71
71
  onWarning?: (message: string) => void;
72
72
  signal?: AbortSignal;
73
+ environment?: NodeJS.ProcessEnv;
73
74
  eventSink?: RuntimeEventSink;
74
75
  onPromptsChanged?: (prompts: readonly ClaudeMcpPromptDefinition[]) => void;
75
76
  onInstructionsChanged?: (instructions: readonly ClaudeMcpServerInstruction[]) => void;
@@ -91,21 +92,22 @@ export declare function validateClaudeMcpConfiguration(resources: readonly JsonR
91
92
  export declare class ClaudeMcpToolRegistry implements ToolRegistry, ClaudeMcpRuntime {
92
93
  private readonly options;
93
94
  private readonly connectedTools;
95
+ private readonly toolRoutes;
94
96
  private readonly reservedTools;
95
97
  private readonly resourceServers;
98
+ private readonly resourceRoutes;
96
99
  private readonly promptServers;
97
100
  private readonly statuses;
98
- private readonly clients;
99
- private readonly serverClients;
100
- private readonly reconnectableServers;
101
+ private readonly sessions;
102
+ private readonly serverSensitiveValues;
101
103
  private readonly serverCapabilities;
102
104
  private readonly serverInstructions;
103
- private readonly reconnectingServers;
104
105
  private readonly promptOperations;
105
106
  private promptResultDirectoryPromise;
106
107
  private closePromise;
107
108
  private generation;
108
109
  private closed;
110
+ private readonly timeouts;
109
111
  private constructor();
110
112
  static connect(options: ClaudeMcpToolRegistryOptions): Promise<ClaudeMcpToolRegistry>;
111
113
  definitions(): readonly ModelToolDefinition[];
@@ -134,16 +136,17 @@ export declare class ClaudeMcpToolRegistry implements ToolRegistry, ClaudeMcpRun
134
136
  execute(call: ModelToolCall, context: ToolExecutionContext): Promise<ToolExecutionResult>;
135
137
  close(): Promise<void>;
136
138
  private finishClose;
139
+ private awaitPromptOperationsBounded;
137
140
  private listResources;
138
141
  private readResource;
139
142
  private resourceServer;
140
143
  private connectServer;
141
- private discoverTools;
142
- private discoverResources;
143
- private discoverPrompts;
144
144
  private invokePrompt;
145
145
  private ensurePromptConnected;
146
146
  private reconnectServer;
147
+ private removeServerPublication;
148
+ private removeServerRoutes;
149
+ private publishCatalog;
147
150
  private publishPrompts;
148
151
  private publishInstructions;
149
152
  private assertOpenGeneration;