imprint-mcp 0.7.0 → 0.7.2
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 +66 -2
- package/package.json +1 -1
- package/prompts/auth-compile-agent.md +173 -22
- package/prompts/compile-agent.md +45 -8
- package/prompts/component-recovery.md +40 -0
- package/prompts/master-teach-decision.md +28 -3
- package/prompts/master-teach-focused-planner.md +18 -5
- package/src/cli.ts +26 -18
- package/src/imprint/agent-tool.ts +15 -0
- package/src/imprint/agent.ts +2 -11
- package/src/imprint/audit.ts +35 -13
- package/src/imprint/auth-browser-discovery.ts +276 -0
- package/src/imprint/auth-compile-agent.ts +513 -224
- package/src/imprint/auth-compile-tools.ts +213 -25
- package/src/imprint/auth-discovery-evidence.ts +81 -0
- package/src/imprint/auth-plan.ts +28 -0
- package/src/imprint/auth-verifier.ts +234 -20
- package/src/imprint/authentication-interaction.ts +137 -0
- package/src/imprint/backend-ladder.ts +271 -43
- package/src/imprint/build-plan.ts +2 -22
- package/src/imprint/cdp-browser-fetch.ts +242 -60
- package/src/imprint/chromium.ts +93 -29
- package/src/imprint/claude-cli-compile.ts +2 -0
- package/src/imprint/codex-cli-compile.ts +99 -46
- package/src/imprint/compile-agent-types.ts +9 -5
- package/src/imprint/compile-agent.ts +33 -0
- package/src/imprint/compile-tool-executor.ts +783 -0
- package/src/imprint/compile-tools.ts +42 -9
- package/src/imprint/compile-verification.ts +2 -0
- package/src/imprint/compile.ts +3 -0
- package/src/imprint/compiler-log.ts +16 -0
- package/src/imprint/component-recovery.ts +120 -0
- package/src/imprint/cookie-jar.ts +117 -7
- package/src/imprint/credential-extract.ts +9 -2
- package/src/imprint/credential-lock.ts +147 -0
- package/src/imprint/credential-observation.ts +261 -0
- package/src/imprint/credential-store.ts +284 -44
- package/src/imprint/live-component-recovery.ts +73 -0
- package/src/imprint/llm.ts +4 -3
- package/src/imprint/log.ts +16 -1
- package/src/imprint/login.ts +9 -0
- package/src/imprint/master-teach-agent-contracts.ts +40 -3
- package/src/imprint/master-teach-agents.ts +229 -14
- package/src/imprint/master-teach-checks.ts +8 -1
- package/src/imprint/master-teach-controller.ts +681 -138
- package/src/imprint/master-teach-prompt-projections.ts +2 -0
- package/src/imprint/mcp-cdp-sessions.ts +7 -2
- package/src/imprint/mcp-compile-server.ts +62 -850
- package/src/imprint/mcp-server.ts +667 -91
- package/src/imprint/mcp-session-recovery.ts +167 -0
- package/src/imprint/native-teach-agents.ts +232 -108
- package/src/imprint/runtime.ts +416 -47
- package/src/imprint/stealth-chromium.ts +67 -7
- package/src/imprint/teach-browser-resources.ts +88 -0
- package/src/imprint/teach-stage-progress.ts +38 -0
- package/src/imprint/terminal-user-prompt.ts +42 -0
- package/src/imprint/types.ts +51 -18
- package/src/imprint/user-interaction.ts +836 -0
|
@@ -85,6 +85,8 @@ export const ReceiptFactSchema = z
|
|
|
85
85
|
invocationIndex: z.number().int().nonnegative(),
|
|
86
86
|
durationMs: z.number().nonnegative().optional(),
|
|
87
87
|
executionMechanism: PromptMechanismSchema.optional(),
|
|
88
|
+
errorCode: z.string().min(1).max(128).optional(),
|
|
89
|
+
httpStatus: z.number().int().optional(),
|
|
88
90
|
}),
|
|
89
91
|
fact({ kind: z.literal('result'), resultCount: z.number().int().nonnegative() }),
|
|
90
92
|
fact({
|
|
@@ -19,7 +19,11 @@ export class McpCdpSessions {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
finishCall(
|
|
22
|
+
finishCall(
|
|
23
|
+
site: string,
|
|
24
|
+
toolName: string,
|
|
25
|
+
onIdle?: (browser: CdpBrowserFetch, closing: Promise<void>) => void,
|
|
26
|
+
): void {
|
|
23
27
|
this.beginCall(site, toolName);
|
|
24
28
|
const prefix = cdpReplayPoolKey(site, toolName, '');
|
|
25
29
|
for (const [key, session] of this.pool) {
|
|
@@ -29,7 +33,8 @@ export class McpCdpSessions {
|
|
|
29
33
|
if (this.pool.get(key) !== session) return;
|
|
30
34
|
this.pool.delete(key);
|
|
31
35
|
this.winners.delete(`${site}:${toolName}`);
|
|
32
|
-
|
|
36
|
+
const closing = session.close().catch(() => {});
|
|
37
|
+
onIdle?.(session, closing);
|
|
33
38
|
}, this.idleMs);
|
|
34
39
|
timer.unref();
|
|
35
40
|
this.timers.set(key, timer);
|