imprint-mcp 0.6.6 → 0.7.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/CHANGELOG.md +22 -0
- package/README.md +340 -16
- package/package.json +2 -2
- package/prompts/audit-agent.md +25 -4
- package/prompts/auth-compile-agent.md +195 -34
- package/prompts/build-planning.md +3 -3
- package/prompts/compile-agent.md +932 -180
- package/prompts/component-recovery.md +40 -0
- package/prompts/live-verifier-agent.md +10 -3
- package/prompts/master-teach-api-researcher.md +813 -0
- package/prompts/master-teach-baseline-mvp-review.md +217 -0
- package/prompts/master-teach-completion-review.md +188 -0
- package/prompts/master-teach-decision.md +910 -0
- package/prompts/master-teach-focused-planner.md +777 -0
- package/prompts/master-teach-parameter-advisor.md +58 -0
- package/prompts/master-teach-recording-evidence.md +19 -0
- package/prompts/master-teach-refine-plan.md +7 -0
- package/prompts/master-teach-tool-advisor.md +130 -0
- package/prompts/playbook-compilation.md +45 -54
- package/prompts/prereq-builder.md +28 -6
- package/prompts/prereq-planner.md +2 -2
- package/prompts/tool-candidate-detection.md +70 -39
- package/prompts/tool-planning.md +3 -3
- package/src/cli.ts +212 -164
- package/src/imprint/agent-tool.ts +15 -0
- package/src/imprint/agent.ts +49 -44
- package/src/imprint/api-research-agent.ts +933 -0
- package/src/imprint/audit.ts +84 -15
- package/src/imprint/auth-browser-discovery.ts +276 -0
- package/src/imprint/auth-compile-agent.ts +610 -251
- package/src/imprint/auth-compile-tools.ts +233 -73
- package/src/imprint/auth-discovery-evidence.ts +81 -0
- package/src/imprint/auth-plan.ts +28 -0
- package/src/imprint/auth-verifier.ts +239 -36
- package/src/imprint/authentication-interaction.ts +137 -0
- package/src/imprint/backend-ladder.ts +711 -395
- package/src/imprint/body-structure.ts +656 -0
- package/src/imprint/build-plan.ts +35 -345
- package/src/imprint/cdp-browser-fetch.ts +926 -82
- package/src/imprint/cdp-jar-cache.ts +7 -12
- package/src/imprint/chromium.ts +93 -29
- package/src/imprint/claude-cli-compile.ts +278 -320
- package/src/imprint/codex-cli-compile.ts +529 -350
- package/src/imprint/codex-sdk-turn.ts +102 -0
- package/src/imprint/compile-agent-types.ts +58 -15
- package/src/imprint/compile-agent.ts +222 -274
- package/src/imprint/compile-done-sentinel.ts +211 -0
- package/src/imprint/compile-provider-control.ts +401 -0
- package/src/imprint/compile-provider-recovery.ts +142 -0
- package/src/imprint/compile-strategy.ts +5 -0
- package/src/imprint/compile-tool-executor.ts +783 -0
- package/src/imprint/compile-tools.ts +1727 -3096
- package/src/imprint/compile-verification.ts +11 -1
- package/src/imprint/compile.ts +110 -29
- package/src/imprint/compiler-log.ts +28 -0
- package/src/imprint/compiler-process.ts +440 -0
- package/src/imprint/component-recovery.ts +120 -0
- package/src/imprint/concurrency.ts +43 -58
- package/src/imprint/cookie-jar.ts +117 -7
- package/src/imprint/credential-extract.ts +10 -90
- package/src/imprint/credential-lock.ts +146 -0
- package/src/imprint/credential-observation.ts +261 -0
- package/src/imprint/credential-store.ts +247 -44
- package/src/imprint/emit.ts +18 -2
- package/src/imprint/evidence-inspection.ts +55 -0
- package/src/imprint/freeform-redact.ts +34 -234
- package/src/imprint/import-module-fresh.ts +30 -0
- package/src/imprint/live-component-recovery.ts +73 -0
- package/src/imprint/live-finesse-runner.ts +299 -0
- package/src/imprint/live-verifier.ts +299 -358
- package/src/imprint/llm.ts +467 -422
- package/src/imprint/log.ts +15 -8
- package/src/imprint/login.ts +9 -0
- package/src/imprint/master-teach-agent-contracts.ts +912 -0
- package/src/imprint/master-teach-agents.ts +3065 -0
- package/src/imprint/master-teach-checks.ts +348 -0
- package/src/imprint/master-teach-controller.ts +7702 -0
- package/src/imprint/master-teach-plan.ts +1410 -0
- package/src/imprint/master-teach-prompt-projections.ts +349 -0
- package/src/imprint/master-teach-store.ts +961 -0
- package/src/imprint/mcp-cdp-sessions.ts +60 -0
- package/src/imprint/mcp-compile-server.ts +64 -1001
- package/src/imprint/mcp-live-verifier-server.ts +246 -190
- package/src/imprint/mcp-server.ts +46 -57
- package/src/imprint/native-agent-pass.ts +260 -0
- package/src/imprint/native-agent-usage.ts +141 -0
- package/src/imprint/native-teach-agents.ts +619 -0
- package/src/imprint/param-grounding.ts +488 -347
- package/src/imprint/playbook-runner.ts +254 -63
- package/src/imprint/prereq-builder.ts +55 -543
- package/src/imprint/private-file.ts +18 -0
- package/src/imprint/probe-backends.ts +129 -33
- package/src/imprint/provider-retry.ts +501 -0
- package/src/imprint/provider-terminal.ts +214 -0
- package/src/imprint/recording-request.ts +290 -1
- package/src/imprint/recording-verification.ts +444 -0
- package/src/imprint/redact.ts +33 -749
- package/src/imprint/refine-worker.ts +326 -0
- package/src/imprint/refine.ts +241 -0
- package/src/imprint/replay-capture.ts +41 -12
- package/src/imprint/replay-evidence.ts +1007 -0
- package/src/imprint/research-response-evidence.ts +45 -0
- package/src/imprint/runtime.ts +867 -138
- package/src/imprint/sensitive-keys.ts +0 -6
- package/src/imprint/session-merge.ts +103 -7
- package/src/imprint/stealth-chromium.ts +67 -7
- package/src/imprint/stealth-fetch.ts +25 -8
- package/src/imprint/stealth-token-cache.ts +16 -16
- package/src/imprint/teach-browser-resources.ts +88 -0
- package/src/imprint/teach-plan.ts +0 -242
- package/src/imprint/teach-research-memory.ts +229 -0
- package/src/imprint/teach-stage-progress.ts +38 -0
- package/src/imprint/teach-state.ts +47 -625
- package/src/imprint/teach.ts +12 -3699
- package/src/imprint/terminal-user-prompt.ts +42 -0
- package/src/imprint/tool-candidates.ts +58 -210
- package/src/imprint/tool-loader.ts +3 -0
- package/src/imprint/tool-plan.ts +1 -134
- package/src/imprint/tracing.ts +24 -7
- package/src/imprint/types.ts +113 -21
- package/src/imprint/user-interaction.ts +836 -0
- package/src/imprint/endpoint-key.ts +0 -23
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Recover an owned component before changing a consumer contract
|
|
2
|
+
|
|
3
|
+
You own one focused recovery decision for a failed check. The failure may come
|
|
4
|
+
from authentication, a prerequisite, a shared module, or the caller's own
|
|
5
|
+
artifact. Inspect the supplied facts and declared owners; the error code or a
|
|
6
|
+
filename alone does not establish cause. Site names never select recovery.
|
|
7
|
+
|
|
8
|
+
Return exactly one decision:
|
|
9
|
+
|
|
10
|
+
- `{"action":"authenticate","plan":{...},"reason":"..."}` uses the attached
|
|
11
|
+
recording-grounded auth owner. Choose the appropriate listed context and
|
|
12
|
+
supplied credential/request declarations. The auth owner decides actions and
|
|
13
|
+
first checks or restores usable access in the retained browser before
|
|
14
|
+
restarting login. A recovered session returns to the unchanged consumer check.
|
|
15
|
+
Only observed current login/challenge evidence warrants another credential or
|
|
16
|
+
factor action. Obtain fresh human input when required; never invent or reuse
|
|
17
|
+
approval.
|
|
18
|
+
- `{"action":"recover_component","componentId":"supplied id","reason":"..."}`
|
|
19
|
+
sends the exact failure to that declared component owner. Choose it only when
|
|
20
|
+
the evidence supports a component-local repair without changing the accepted
|
|
21
|
+
consumer contract. A prerequisite owner can rebuild its existing procedure;
|
|
22
|
+
dependent calls then bind fresh producer results. An explicitly registered
|
|
23
|
+
shared-module owner repairs and verifies that module through its normal host.
|
|
24
|
+
- `{"action":"return_failure","reason":"..."}` requests broader master
|
|
25
|
+
investigation when ownership or cause is unclear, or the contract, strategy,
|
|
26
|
+
dependency graph, or scope needs changing.
|
|
27
|
+
|
|
28
|
+
Return the decision directly, without an interaction envelope. Do not edit data
|
|
29
|
+
artifacts yourself, invent owner identifiers, or assign all failures to auth.
|
|
30
|
+
The host preserves each failed attempt and dispatches only to the chosen owner.
|
|
31
|
+
Successful state recovery immediately retries the existing caller. Artifact
|
|
32
|
+
repair preserves the accepted plan and rebuilds only the selected owner, then
|
|
33
|
+
rechecks affected dependencies and consumer calls. Repair completion never
|
|
34
|
+
substitutes for a passing consumer result.
|
|
35
|
+
|
|
36
|
+
Use `previousRecoveries` and prior observations to reconsider repeated rejection;
|
|
37
|
+
do not blindly repeat an unchanged repair. There is no fixed retry cap. Shared
|
|
38
|
+
recovery is scoped to the explicit owner id, not a guessed similarity between
|
|
39
|
+
sites, tool names, messages, cookies, or paths. If a component has no declared
|
|
40
|
+
owner, return the failure rather than guessing who may modify it.
|
|
@@ -9,9 +9,16 @@ tool-level input parameters, parsed ToolResult, backend, and attempt metadata.
|
|
|
9
9
|
Treat those parsed outputs as the primary evidence. Suite and call labels are for
|
|
10
10
|
navigation only; do not manufacture or cite evidence IDs.
|
|
11
11
|
|
|
12
|
-
You also receive read-only artifact context: the generated workflow,
|
|
13
|
-
|
|
14
|
-
tool's build-plan contract.
|
|
12
|
+
You also receive read-only artifact context: the generated workflow, request
|
|
13
|
+
transform and its tests when one exists, parser, parser tests, integration
|
|
14
|
+
suite, current playbook when one exists, and this tool's build-plan contract.
|
|
15
|
+
Workflow request bodies are templates. When `requestTransformModule` exists, the
|
|
16
|
+
transform can replace the final outgoing URL, headers, or body. Never infer the
|
|
17
|
+
emitted request bytes from the workflow template alone: inspect the transform
|
|
18
|
+
and its tests, then use backend-preparation `requestStageFacts` as factual
|
|
19
|
+
execution receipts. A passed send stage proves that request reached transport;
|
|
20
|
+
a later transform failure does not mean earlier requests used their templates.
|
|
21
|
+
Use this context to interpret live results and catch concrete
|
|
15
22
|
contradictions such as a producer/consumer type mismatch, a required recorded
|
|
16
23
|
header omitted from the workflow, a synthetic-only positive parser test, or an
|
|
17
24
|
integration suite that cannot construct its producer inputs. Artifact context
|