@promptdriven/runtime-client
v1.2.2
Published
PDD Runtime Client (@promptdriven/runtime-client)
Readme
@promptdriven/runtime-client
@promptdriven/runtime-client is the standalone JavaScript client package for the PDD Runtime service. It powers prompt checking, linting, interactive simulation, shared contract checks, and MCP tools for the PDD CLI and other Node.js hosts.
Requirements
- Node.js
>=22.16.0 - Zero runtime npm dependencies (pure Node.js built-ins)
Installation
npm install @promptdriven/runtime-clientPackage Exports
- Root entry (
@promptdriven/runtime-client->./src/index.mjs):- Commands:
check,lint,read,retry,local,simulate,jobs,health,mcp,contracts - Readers & Utilities:
format,source,saved,workspace,render,exactValue,causeText,cleanText,observeTryCall,failedCheckCount,providerText,evaluateCheckBudget,estimateCheckCalls,parsePromptFrontmatter,promptMarkdownTargets,version - Scoped Slice Loaders:
runtimeAgentPacketSlice,runtimeCheckPlanSlice,runtimeClientSlice,runtimeOutcomeSlice,runtimeOutputSlice,runtimePreflightSlice,runtimeScenarioJsonSlice,runtimeWorkspaceSlice
- Commands:
- Subpath exports (
@promptdriven/runtime-client/*->./src/runtime/*):- All 31 Runtime client modules (
./*->./src/runtime/*) are exported directly as subpaths.
- All 31 Runtime client modules (
Host ports Contract
@promptdriven/runtime-client imports zero files outside src/runtime/. Host applications pass environment streams and host-specific capabilities through input and ports:
- Streams & Environment:
stdout,stderr,env,fetch,gh,now,sleep - Caller Metadata:
client.version,client.commands({ test, lint, simulate }),workflow.base_sha - Selection & Exit Codes:
isStoryPath,hasAcceptance,expectedTestPath,matchTests,orphanSummary,selectTests,whyNoTests,exitFor,exitCodeFor - Secret Redaction:
redaction({ remember, redact, known }) - Host Extensions (when applicable):
- Ownership & hygiene:
headerPrompts,isTestOwnedPath,promptClaims,resolveOwners - Workflow & native evidence:
evidenceEligibility,allRuns,workflowBaseSha,assessNativeEvidence,usableResult,resultLines - Interactive simulation & approvals:
loadAgentDefinitions,discoverAgents,runAgentProcess,askAgent,lineReader,askApproval,approvePromptText,readApprovalPolicy,readPromptApprovals,recordPromptApproval - Visual & product checks:
lintSvgLayouts,compareScreen,formatScreenComparison,parseProductDocuments,parseProductWorldWriters
- Ownership & hygiene:
Environment Variables & Local State
PDD_RUNTIME_URL: Runtime server origin (defaults toDEFAULT_RUNTIME_URLinsrc/runtime/runtime-client.mjs).PDD_STATE_DIR: Local state directory for batches, active slots, and cached login metadata..pdd/cache/test/: Per-repository Story check cache (stories.jsonandlastfailed.json).
