humanish 0.0.1 → 0.15.0
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/AGENTS.md +77 -0
- package/CONTRIBUTING.md +39 -0
- package/LICENSE +21 -0
- package/README.md +435 -8
- package/SECURITY.md +34 -0
- package/dist/actor-contract.d.ts +107 -0
- package/dist/actor-contract.js +286 -0
- package/dist/actor-contract.js.map +1 -0
- package/dist/actor-registry.d.ts +73 -0
- package/dist/actor-registry.js +93 -0
- package/dist/actor-registry.js.map +1 -0
- package/dist/adapter-extension.d.ts +54 -0
- package/dist/adapter-extension.js +214 -0
- package/dist/adapter-extension.js.map +1 -0
- package/dist/argv.d.ts +1 -0
- package/dist/argv.js +8 -0
- package/dist/argv.js.map +1 -0
- package/dist/artifact-reference.d.ts +22 -0
- package/dist/artifact-reference.js +47 -0
- package/dist/artifact-reference.js.map +1 -0
- package/dist/browser-evidence-hygiene.d.ts +7 -0
- package/dist/browser-evidence-hygiene.js +40 -0
- package/dist/browser-evidence-hygiene.js.map +1 -0
- package/dist/claude-agent-sdk.d.ts +94 -0
- package/dist/claude-agent-sdk.js +356 -0
- package/dist/claude-agent-sdk.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +5 -0
- package/dist/cli.js.map +1 -0
- package/dist/codex-app-server-ui.d.ts +39 -0
- package/dist/codex-app-server-ui.js +327 -0
- package/dist/codex-app-server-ui.js.map +1 -0
- package/dist/codex-app-server.d.ts +141 -0
- package/dist/codex-app-server.js +747 -0
- package/dist/codex-app-server.js.map +1 -0
- package/dist/command-failure.d.ts +29 -0
- package/dist/command-failure.js +54 -0
- package/dist/command-failure.js.map +1 -0
- package/dist/computer-use-actor.d.ts +52 -0
- package/dist/computer-use-actor.js +48 -0
- package/dist/computer-use-actor.js.map +1 -0
- package/dist/computer-use.d.ts +232 -0
- package/dist/computer-use.js +615 -0
- package/dist/computer-use.js.map +1 -0
- package/dist/concurrency.d.ts +1 -0
- package/dist/concurrency.js +27 -0
- package/dist/concurrency.js.map +1 -0
- package/dist/concurrent-shared-world-lab.d.ts +115 -0
- package/dist/concurrent-shared-world-lab.js +1092 -0
- package/dist/concurrent-shared-world-lab.js.map +1 -0
- package/dist/core/git-state.d.ts +31 -0
- package/dist/core/git-state.js +142 -0
- package/dist/core/git-state.js.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +3 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/run-primitives.d.ts +66 -0
- package/dist/core/run-primitives.js +120 -0
- package/dist/core/run-primitives.js.map +1 -0
- package/dist/cua-actor-lab.d.ts +620 -0
- package/dist/cua-actor-lab.js +2834 -0
- package/dist/cua-actor-lab.js.map +1 -0
- package/dist/device-presets.d.ts +67 -0
- package/dist/device-presets.js +50 -0
- package/dist/device-presets.js.map +1 -0
- package/dist/e2b-desktop-executor.d.ts +101 -0
- package/dist/e2b-desktop-executor.js +309 -0
- package/dist/e2b-desktop-executor.js.map +1 -0
- package/dist/e2b-desktop-launch.d.ts +144 -0
- package/dist/e2b-desktop-launch.js +59 -0
- package/dist/e2b-desktop-launch.js.map +1 -0
- package/dist/e2b-detached.d.ts +53 -0
- package/dist/e2b-detached.js +130 -0
- package/dist/e2b-detached.js.map +1 -0
- package/dist/e2b-terminal-lab.d.ts +345 -0
- package/dist/e2b-terminal-lab.js +1467 -0
- package/dist/e2b-terminal-lab.js.map +1 -0
- package/dist/env-file.d.ts +14 -0
- package/dist/env-file.js +108 -0
- package/dist/env-file.js.map +1 -0
- package/dist/feedback.d.ts +51 -0
- package/dist/feedback.js +313 -0
- package/dist/feedback.js.map +1 -0
- package/dist/image-evidence.d.ts +2 -0
- package/dist/image-evidence.js +33 -0
- package/dist/image-evidence.js.map +1 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/init-templates.d.ts +12 -0
- package/dist/init-templates.js +369 -0
- package/dist/init-templates.js.map +1 -0
- package/dist/init.d.ts +26 -0
- package/dist/init.js +343 -0
- package/dist/init.js.map +1 -0
- package/dist/lab-app-runner.d.ts +78 -0
- package/dist/lab-app-runner.js +403 -0
- package/dist/lab-app-runner.js.map +1 -0
- package/dist/lab-config.d.ts +578 -0
- package/dist/lab-config.js +1751 -0
- package/dist/lab-config.js.map +1 -0
- package/dist/lab-engine.d.ts +77 -0
- package/dist/lab-engine.js +216 -0
- package/dist/lab-engine.js.map +1 -0
- package/dist/lab-preflight.d.ts +67 -0
- package/dist/lab-preflight.js +385 -0
- package/dist/lab-preflight.js.map +1 -0
- package/dist/labs.d.ts +53 -0
- package/dist/labs.js +176 -0
- package/dist/labs.js.map +1 -0
- package/dist/observer-assets.d.ts +2 -0
- package/dist/observer-assets.js +2630 -0
- package/dist/observer-assets.js.map +1 -0
- package/dist/observer-data.d.ts +63 -0
- package/dist/observer-data.js +145 -0
- package/dist/observer-data.js.map +1 -0
- package/dist/observer-static.d.ts +39 -0
- package/dist/observer-static.js +192 -0
- package/dist/observer-static.js.map +1 -0
- package/dist/observer.d.ts +46 -0
- package/dist/observer.js +353 -0
- package/dist/observer.js.map +1 -0
- package/dist/openai-responses-cu.d.ts +113 -0
- package/dist/openai-responses-cu.js +531 -0
- package/dist/openai-responses-cu.js.map +1 -0
- package/dist/oss-lab.d.ts +52 -0
- package/dist/oss-lab.js +299 -0
- package/dist/oss-lab.js.map +1 -0
- package/dist/oss-meta-lab-scoring.d.ts +15 -0
- package/dist/oss-meta-lab-scoring.js +145 -0
- package/dist/oss-meta-lab-scoring.js.map +1 -0
- package/dist/oss-meta-lab.d.ts +279 -0
- package/dist/oss-meta-lab.js +4889 -0
- package/dist/oss-meta-lab.js.map +1 -0
- package/dist/oss-remote-telemetry.d.ts +77 -0
- package/dist/oss-remote-telemetry.js +403 -0
- package/dist/oss-remote-telemetry.js.map +1 -0
- package/dist/persona.d.ts +35 -0
- package/dist/persona.js +133 -0
- package/dist/persona.js.map +1 -0
- package/dist/pi-agent-core.d.ts +77 -0
- package/dist/pi-agent-core.js +203 -0
- package/dist/pi-agent-core.js.map +1 -0
- package/dist/program.d.ts +54 -0
- package/dist/program.js +2347 -0
- package/dist/program.js.map +1 -0
- package/dist/redaction.d.ts +90 -0
- package/dist/redaction.js +292 -0
- package/dist/redaction.js.map +1 -0
- package/dist/run.d.ts +784 -0
- package/dist/run.js +4555 -0
- package/dist/run.js.map +1 -0
- package/dist/scripted-browser-actor.d.ts +294 -0
- package/dist/scripted-browser-actor.js +1286 -0
- package/dist/scripted-browser-actor.js.map +1 -0
- package/dist/scripted-browser-lab.d.ts +107 -0
- package/dist/scripted-browser-lab.js +738 -0
- package/dist/scripted-browser-lab.js.map +1 -0
- package/dist/shared-world-lab.d.ts +208 -0
- package/dist/shared-world-lab.js +1048 -0
- package/dist/shared-world-lab.js.map +1 -0
- package/dist/source-archive.d.ts +82 -0
- package/dist/source-archive.js +365 -0
- package/dist/source-archive.js.map +1 -0
- package/dist/stop-conditions.d.ts +26 -0
- package/dist/stop-conditions.js +66 -0
- package/dist/stop-conditions.js.map +1 -0
- package/dist/terminal-agent-actor.d.ts +36 -0
- package/dist/terminal-agent-actor.js +23 -0
- package/dist/terminal-agent-actor.js.map +1 -0
- package/docs/architecture/actor-contract.md +431 -0
- package/docs/architecture/github-feedback-loop.md +189 -0
- package/docs/architecture/local-codex-tui-actor.md +213 -0
- package/docs/architecture/observer.md +118 -0
- package/docs/architecture/oss-lab-poc.md +242 -0
- package/docs/architecture/project-layout.md +166 -0
- package/docs/architecture/state-driven-executor.md +203 -0
- package/docs/architecture/terminal-product-lane.md +148 -0
- package/docs/contracts/adapter-fixtures.md +80 -0
- package/docs/contracts/core.md +71 -0
- package/docs/contracts/feedback.md +145 -0
- package/docs/contracts/policy.md +305 -0
- package/docs/contracts/run-bundle.md +358 -0
- package/docs/contracts/schemas.md +984 -0
- package/docs/goals/current.md +409 -0
- package/docs/principles/invariants-and-defaults.md +135 -0
- package/docs/principles/self-driving-harness.md +129 -0
- package/docs/product/open-source-install-experience.md +229 -0
- package/docs/ramp/README.md +200 -0
- package/docs/release/open-source-readiness.md +208 -0
- package/docs/release/public-readiness-standard.md +205 -0
- package/docs/roadmap/world-class-open-source-v0.md +311 -0
- package/package.json +102 -8
- package/skills/humanish/SKILL.md +244 -0
- package/skills/humanish/agents/openai.yaml +7 -0
- package/index.js +0 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export function screenshotEvidenceError(relativePath, bytes) {
|
|
2
|
+
const extension = relativePath.toLowerCase().split(".").pop() ?? "";
|
|
3
|
+
if (extension === "png") {
|
|
4
|
+
return hasPrefix(bytes, [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a])
|
|
5
|
+
? null
|
|
6
|
+
: "expected PNG signature";
|
|
7
|
+
}
|
|
8
|
+
if (extension === "jpg" || extension === "jpeg") {
|
|
9
|
+
return hasPrefix(bytes, [0xff, 0xd8, 0xff]) ? null : "expected JPEG signature";
|
|
10
|
+
}
|
|
11
|
+
if (extension === "webp") {
|
|
12
|
+
return bytes.length >= 12
|
|
13
|
+
&& bytes.subarray(0, 4).toString("ascii") === "RIFF"
|
|
14
|
+
&& bytes.subarray(8, 12).toString("ascii") === "WEBP"
|
|
15
|
+
? null
|
|
16
|
+
: "expected WEBP signature";
|
|
17
|
+
}
|
|
18
|
+
if (extension === "gif") {
|
|
19
|
+
const signature = bytes.subarray(0, 6).toString("ascii");
|
|
20
|
+
return signature === "GIF87a" || signature === "GIF89a" ? null : "expected GIF signature";
|
|
21
|
+
}
|
|
22
|
+
return `unsupported screenshot extension .${extension || "unknown"}`;
|
|
23
|
+
}
|
|
24
|
+
export function assertScreenshotEvidence(relativePath, bytes) {
|
|
25
|
+
const error = screenshotEvidenceError(relativePath, bytes);
|
|
26
|
+
if (error) {
|
|
27
|
+
throw new Error(`Invalid screenshot evidence ${relativePath}: ${error}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function hasPrefix(bytes, prefix) {
|
|
31
|
+
return bytes.length >= prefix.length && prefix.every((value, index) => bytes[index] === value);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=image-evidence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-evidence.js","sourceRoot":"","sources":["../src/image-evidence.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,uBAAuB,CAAC,YAAoB,EAAE,KAAa;IACzE,MAAM,SAAS,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;IAEpE,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;QACxB,OAAO,SAAS,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YACvE,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,wBAAwB,CAAC;IAC/B,CAAC;IAED,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;QAChD,OAAO,SAAS,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,yBAAyB,CAAC;IACjF,CAAC;IAED,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,MAAM,IAAI,EAAE;eACpB,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,MAAM;eACjD,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,MAAM;YACrD,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,yBAAyB,CAAC;IAChC,CAAC;IAED,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;QACxB,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACzD,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,wBAAwB,CAAC;IAC5F,CAAC;IAED,OAAO,qCAAqC,SAAS,IAAI,SAAS,EAAE,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,YAAoB,EAAE,KAAa;IAC1E,MAAM,KAAK,GAAG,uBAAuB,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IAC3D,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,+BAA+B,YAAY,KAAK,KAAK,EAAE,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,KAAa,EAAE,MAAgB;IAChD,OAAO,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,CAAC;AACjG,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export { ACTOR_TRACE_SCHEMA, CODEX_APP_SERVER_CAPABILITIES, SCRIPTED_BROWSER_CAPABILITIES, TERMINAL_AGENT_CAPABILITIES, codexResultToActorTrace, codexStatusToCompletionReason } from "./actor-contract.js";
|
|
2
|
+
export type { ActorCapabilities, ActorCompletionReason, ActorLane, ActorPersonaRef, ActorProtocol, ActorStatus, ActorTokenUsage, ActorTrace, ActorTraceItem, ActorTraceItemKind } from "./actor-contract.js";
|
|
3
|
+
export { actorRegistry, getActor, isCuaActorDescriptor, isScriptedBrowserActorDescriptor, isTerminalActorDescriptor } from "./actor-registry.js";
|
|
4
|
+
export type { ActorDescriptor, ActorId, CuaActorDescriptor, ScriptedBrowserActorDescriptor, TerminalActorDescriptor } from "./actor-registry.js";
|
|
5
|
+
export { TERMINAL_AGENT_NOT_IMPLEMENTED_CODE, runTerminalAgentSession } from "./terminal-agent-actor.js";
|
|
6
|
+
export type { TerminalAgentSessionOptions, TerminalAgentSessionResult } from "./terminal-agent-actor.js";
|
|
7
|
+
export { describeCuaAction, runComputerUseLoop } from "./computer-use.js";
|
|
8
|
+
export type { CuaAction, CuaExecutor, CuaLoopOptions, CuaLoopResult, CuaObservation, CuaProvider, CuaSafetyCheck, CuaTurn, CuaTurnRequest } from "./computer-use.js";
|
|
9
|
+
export { runCuaActorSession } from "./computer-use-actor.js";
|
|
10
|
+
export type { CuaActorSessionOptions } from "./computer-use-actor.js";
|
|
11
|
+
export { createE2BDesktopExecutor } from "./e2b-desktop-executor.js";
|
|
12
|
+
export type { E2BDesktopExecutorOptions, E2BDesktopLike } from "./e2b-desktop-executor.js";
|
|
13
|
+
export { loadE2BDesktopModule } from "./e2b-desktop-launch.js";
|
|
14
|
+
export type { E2BDesktopModule, E2BDesktopSandbox } from "./e2b-desktop-launch.js";
|
|
15
|
+
export { DEFAULT_OPENAI_CU_MODEL, OPENAI_RESPONSES_CU_CAPABILITIES, createOpenAiResponsesProvider } from "./openai-responses-cu.js";
|
|
16
|
+
export type { FetchLike, OpenAiResponsesProviderOptions } from "./openai-responses-cu.js";
|
|
17
|
+
export { adapterScoreFailureMessage, applyAdapterScoreFailureToReview, applyBrowserAdapterHooks } from "./adapter-extension.js";
|
|
18
|
+
export type { BrowserAdapterBackend, BrowserLabAdapterHooks, BrowserLabScoringContext } from "./adapter-extension.js";
|
|
19
|
+
export type { RedactionHooks } from "./redaction.js";
|
|
20
|
+
export { normalizeCliArgv } from "./argv.js";
|
|
21
|
+
export { CODEX_APP_SERVER_UI_SCHEMA, startCodexAppServerUi } from "./codex-app-server-ui.js";
|
|
22
|
+
export type { CodexAppServerUiController, CodexAppServerUiOptions, CodexAppServerUiState } from "./codex-app-server-ui.js";
|
|
23
|
+
export { CODEX_APP_SERVER_TRACE_SCHEMA, runCodexAppServerSession } from "./codex-app-server.js";
|
|
24
|
+
export type { CodexAppServerRunOptions, CodexAppServerRunResult, CodexAppServerTrace } from "./codex-app-server.js";
|
|
25
|
+
export { FEEDBACK_RESULT_SCHEMA, FEEDBACK_SCHEMA, draftFeedback, listFeedback, renderIssueMarkdown, renderIssueUrl, verifyFeedback } from "./feedback.js";
|
|
26
|
+
export type { FeedbackDraft, FeedbackResult } from "./feedback.js";
|
|
27
|
+
export { INIT_RESPONSE_SCHEMA, runInit } from "./init.js";
|
|
28
|
+
export type { InitChange, InitMode, InitOptions, InitResult } from "./init.js";
|
|
29
|
+
export { OBSERVER_DATA_SCHEMA, buildObserverData, stripAnsi } from "./observer-data.js";
|
|
30
|
+
export type { ObserverData, ObserverStream } from "./observer-data.js";
|
|
31
|
+
export { OBSERVER_SCHEMA, openTarget, renderObserver, serveObserver } from "./observer.js";
|
|
32
|
+
export type { ObserverOptions, ObserverResult, ObserverServeOptions, ObserverServer } from "./observer.js";
|
|
33
|
+
export { OBSERVER_STATIC_HOST, createObserverStaticHandler, observerStaticContentType, respondToObserverStaticRequest, serveObserverStatic } from "./observer-static.js";
|
|
34
|
+
export type { ObserverStaticHandlerOptions, ObserverStaticServeOptions, ObserverStaticServer } from "./observer-static.js";
|
|
35
|
+
export { DEFAULT_OSS_REPOS, OSS_LAB_SCHEMA, normalizeOssRepoSlugs, runOssLab, validateOssRepoSlug } from "./oss-lab.js";
|
|
36
|
+
export type { OssLabOptions, OssLabRepoResult, OssLabResult, OssLabStep } from "./oss-lab.js";
|
|
37
|
+
export { CLEANUP_SCHEMA, DOCTOR_SCHEMA, REVIEW_SCHEMA, RUNS_SCHEMA, RUN_BUNDLE_SCHEMA, VERIFY_SCHEMA, cleanupRun, doctor, extractLocalActorVerdict, listRuns, normalizeLocalActorTranscript, readReview, runDryRun, verifyRun } from "./run.js";
|
|
38
|
+
export { SHARED_WORLD_SCHEMA } from "./run.js";
|
|
39
|
+
export type { CleanupAdapterResult, CleanupResourceResult, CleanupResult, DoctorResult, ReviewSummary, RunAdapterArtifact, RunAdapterScore, RunAttributionClass, RunBundle, RunEvent, RunFeedbackCandidate, RunMeaningfulUseComponentId, RunMeaningfulUseScore, RunCleanupHooks, RunOptions, RunProviderResource, RunResult, RunSimulation, RunStream, RunStreamKind, RunSubjectProvenance, RunSubjectStateStepRecord, RunsResult, SharedWorldCheckpoint, SharedWorldEvidence, SharedWorldLaneWindow, SharedWorldOutcome, SharedWorldPlane, SharedWorldStateSnapshot, SharedWorldTimelineEntry, SharedWorldTurn, VerifyResult } from "./run.js";
|
|
40
|
+
export { CUA_ACTOR_LAB_PROVIDER_METADATA, CUA_ACTOR_LAB_SCHEMA, CUA_FANOUT_STRATEGY, buildCuaBundle, buildCuaFanoutBundle, resolveCuaLanePlan, runCuaActorLab } from "./cua-actor-lab.js";
|
|
41
|
+
export type { CuaActorLabErrorCode, CuaActorLabHooks, CuaActorLabResult, CuaLanePlan, CuaLanePlanEntry, CuaLaneResult, CuaLaneSummary, CuaSubjectProjection, RunCuaActorLabOptions, SubjectPhaseEvent } from "./cua-actor-lab.js";
|
|
42
|
+
export { SCRIPTED_BROWSER_PROVIDER, runScriptedBrowserSession } from "./scripted-browser-actor.js";
|
|
43
|
+
export type { BrowserPersonaJourney, BrowserSurface, ScriptedBrowserLaunchArgs, ScriptedBrowserLike, ScriptedBrowserSessionOptions, ScriptedBrowserSessionResult, ScriptedLocatorLike, ScriptedPageLike } from "./scripted-browser-actor.js";
|
|
44
|
+
export { SCRIPTED_BROWSER_LAB_SCHEMA, buildScriptedLabBundle, runScriptedBrowserLab } from "./scripted-browser-lab.js";
|
|
45
|
+
export type { RunScriptedBrowserLabOptions, ScriptedBrowserLabHooks, ScriptedBrowserLabResult, ScriptedBrowserLabSession } from "./scripted-browser-lab.js";
|
|
46
|
+
export { TERMINAL_PRODUCT_LAB_SCHEMA, buildTerminalProductBundle, runTerminalProductLab } from "./e2b-terminal-lab.js";
|
|
47
|
+
export type { CommandLogRecord, CostCategory, CostLine, InterventionRecord, LifecycleRecord, NoSpendProof, RunTerminalProductLabOptions, TerminalCostLedger, TerminalLedgers, TerminalProductLabHooks, TerminalProductLabResult, TerminalProductScoringContext } from "./e2b-terminal-lab.js";
|
|
48
|
+
export { SHARED_WORLD_LAB_PROVIDER_METADATA, SHARED_WORLD_LAB_SCHEMA, buildSharedWorldBundle, runSharedWorldLab } from "./shared-world-lab.js";
|
|
49
|
+
export type { RunSharedWorldLabOptions, SharedWorldLabErrorCode, SharedWorldLabHooks, SharedWorldLabResult, SharedWorldRoleResult } from "./shared-world-lab.js";
|
|
50
|
+
export { CONCURRENT_ATTRIBUTION_LIMITS, CONCURRENT_SHARED_WORLD_LAB_SCHEMA, CONCURRENT_SHARED_WORLD_PROVIDER_METADATA, buildConcurrentSharedWorldBundle, runConcurrentSharedWorld } from "./concurrent-shared-world-lab.js";
|
|
51
|
+
export type { ConcurrentSharedWorldLabErrorCode, ConcurrentSharedWorldLabResult, ConcurrentSharedWorldRoleResult, RunConcurrentSharedWorldLabOptions } from "./concurrent-shared-world-lab.js";
|
|
52
|
+
export { probeUrl, readDetachedLog, runDetachedStep, startDetachedProcess } from "./e2b-detached.js";
|
|
53
|
+
export type { DetachedStepOptions, DetachedStepResult, DetachedTimers } from "./e2b-detached.js";
|
|
54
|
+
export { DEFAULT_DEVICE_PRESET, DEVICE_PRESETS, DEVICE_PRESET_NAMES, isDevicePresetName, resolveDevicePreset } from "./device-presets.js";
|
|
55
|
+
export type { DevicePreset, DevicePresetName } from "./device-presets.js";
|
|
56
|
+
export { actorResolvesToTerminal, cuaLaneCount, cuaLaneValidationReason, isHttpUrl, isLoopbackUrl, LAB_CONFIG_SCHEMA, MAX_CUA_LANES, concurrentSharedWorldValidationReason, parseLabConfig, resolveSeatUrl, routesToComputerUse, routesToConcurrentSharedWorld, routesToScriptedBrowser, routesToSharedWorld, routesToTerminalProduct, sharedWorldValidationReason, subjectStateInvalidReason } from "./lab-config.js";
|
|
57
|
+
export type { LabActor, LabActorLane, LabConfig, LabConfigParseResult, LabExecutionTerminal, LabRuntimeAuth, LabScenarioCaps, LabStateStepWhen, LabSubject, LabSubjectProduct, LabSubjectServe, LabSubjectSource, LabSubjectState, LabSubjectStateCheckpoint, LabSubjectStateStep, LabSubjectTopology, LabTerminalStdin, LabTerminalTransport } from "./lab-config.js";
|
|
58
|
+
export { resolveLabDryRun, runLab, selectLabBackend } from "./lab-engine.js";
|
|
59
|
+
export type { LabBackend, LabOutcome, RunLabOptions } from "./lab-engine.js";
|
|
60
|
+
export { LAB_PREFLIGHT_SCHEMA, runLabPreflight } from "./lab-preflight.js";
|
|
61
|
+
export type { LabPreflightCheck, LabPreflightReachabilityMode, LabPreflightResult, LabPreflightSandbox, LabPreflightSpend, LabPreflightTarget, RunLabPreflightOptions } from "./lab-preflight.js";
|
|
62
|
+
export { CLI_RESPONSE_SCHEMA, createProgram } from "./program.js";
|
|
63
|
+
export type { CliIo, UnexpectedErrorEnvelope } from "./program.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export { ACTOR_TRACE_SCHEMA, CODEX_APP_SERVER_CAPABILITIES, SCRIPTED_BROWSER_CAPABILITIES, TERMINAL_AGENT_CAPABILITIES, codexResultToActorTrace, codexStatusToCompletionReason } from "./actor-contract.js";
|
|
2
|
+
export { actorRegistry, getActor, isCuaActorDescriptor, isScriptedBrowserActorDescriptor, isTerminalActorDescriptor } from "./actor-registry.js";
|
|
3
|
+
export { TERMINAL_AGENT_NOT_IMPLEMENTED_CODE, runTerminalAgentSession } from "./terminal-agent-actor.js";
|
|
4
|
+
export { describeCuaAction, runComputerUseLoop } from "./computer-use.js";
|
|
5
|
+
export { runCuaActorSession } from "./computer-use-actor.js";
|
|
6
|
+
export { createE2BDesktopExecutor } from "./e2b-desktop-executor.js";
|
|
7
|
+
export { loadE2BDesktopModule } from "./e2b-desktop-launch.js";
|
|
8
|
+
export { DEFAULT_OPENAI_CU_MODEL, OPENAI_RESPONSES_CU_CAPABILITIES, createOpenAiResponsesProvider } from "./openai-responses-cu.js";
|
|
9
|
+
export { adapterScoreFailureMessage, applyAdapterScoreFailureToReview, applyBrowserAdapterHooks } from "./adapter-extension.js";
|
|
10
|
+
export { normalizeCliArgv } from "./argv.js";
|
|
11
|
+
export { CODEX_APP_SERVER_UI_SCHEMA, startCodexAppServerUi } from "./codex-app-server-ui.js";
|
|
12
|
+
export { CODEX_APP_SERVER_TRACE_SCHEMA, runCodexAppServerSession } from "./codex-app-server.js";
|
|
13
|
+
export { FEEDBACK_RESULT_SCHEMA, FEEDBACK_SCHEMA, draftFeedback, listFeedback, renderIssueMarkdown, renderIssueUrl, verifyFeedback } from "./feedback.js";
|
|
14
|
+
export { INIT_RESPONSE_SCHEMA, runInit } from "./init.js";
|
|
15
|
+
export { OBSERVER_DATA_SCHEMA, buildObserverData, stripAnsi } from "./observer-data.js";
|
|
16
|
+
export { OBSERVER_SCHEMA, openTarget, renderObserver, serveObserver } from "./observer.js";
|
|
17
|
+
export { OBSERVER_STATIC_HOST, createObserverStaticHandler, observerStaticContentType, respondToObserverStaticRequest, serveObserverStatic } from "./observer-static.js";
|
|
18
|
+
export { DEFAULT_OSS_REPOS, OSS_LAB_SCHEMA, normalizeOssRepoSlugs, runOssLab, validateOssRepoSlug } from "./oss-lab.js";
|
|
19
|
+
export { CLEANUP_SCHEMA, DOCTOR_SCHEMA, REVIEW_SCHEMA, RUNS_SCHEMA, RUN_BUNDLE_SCHEMA, VERIFY_SCHEMA, cleanupRun, doctor, extractLocalActorVerdict, listRuns, normalizeLocalActorTranscript, readReview, runDryRun, verifyRun } from "./run.js";
|
|
20
|
+
export { SHARED_WORLD_SCHEMA } from "./run.js";
|
|
21
|
+
export { CUA_ACTOR_LAB_PROVIDER_METADATA, CUA_ACTOR_LAB_SCHEMA, CUA_FANOUT_STRATEGY, buildCuaBundle, buildCuaFanoutBundle, resolveCuaLanePlan, runCuaActorLab } from "./cua-actor-lab.js";
|
|
22
|
+
export { SCRIPTED_BROWSER_PROVIDER, runScriptedBrowserSession } from "./scripted-browser-actor.js";
|
|
23
|
+
export { SCRIPTED_BROWSER_LAB_SCHEMA, buildScriptedLabBundle, runScriptedBrowserLab } from "./scripted-browser-lab.js";
|
|
24
|
+
export { TERMINAL_PRODUCT_LAB_SCHEMA, buildTerminalProductBundle, runTerminalProductLab } from "./e2b-terminal-lab.js";
|
|
25
|
+
export { SHARED_WORLD_LAB_PROVIDER_METADATA, SHARED_WORLD_LAB_SCHEMA, buildSharedWorldBundle, runSharedWorldLab } from "./shared-world-lab.js";
|
|
26
|
+
export { CONCURRENT_ATTRIBUTION_LIMITS, CONCURRENT_SHARED_WORLD_LAB_SCHEMA, CONCURRENT_SHARED_WORLD_PROVIDER_METADATA, buildConcurrentSharedWorldBundle, runConcurrentSharedWorld } from "./concurrent-shared-world-lab.js";
|
|
27
|
+
export { probeUrl, readDetachedLog, runDetachedStep, startDetachedProcess } from "./e2b-detached.js";
|
|
28
|
+
export { DEFAULT_DEVICE_PRESET, DEVICE_PRESETS, DEVICE_PRESET_NAMES, isDevicePresetName, resolveDevicePreset } from "./device-presets.js";
|
|
29
|
+
export { actorResolvesToTerminal, cuaLaneCount, cuaLaneValidationReason, isHttpUrl, isLoopbackUrl, LAB_CONFIG_SCHEMA, MAX_CUA_LANES, concurrentSharedWorldValidationReason, parseLabConfig, resolveSeatUrl, routesToComputerUse, routesToConcurrentSharedWorld, routesToScriptedBrowser, routesToSharedWorld, routesToTerminalProduct, sharedWorldValidationReason, subjectStateInvalidReason } from "./lab-config.js";
|
|
30
|
+
export { resolveLabDryRun, runLab, selectLabBackend } from "./lab-engine.js";
|
|
31
|
+
export { LAB_PREFLIGHT_SCHEMA, runLabPreflight } from "./lab-preflight.js";
|
|
32
|
+
export { CLI_RESPONSE_SCHEMA, createProgram } from "./program.js";
|
|
33
|
+
//# sourceMapping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AAmB,CAAC;AAErG,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,uBAAuB,EACvB,YAAY,EACZ,uBAAuB,EACvB,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,qCAAqC,EACrC,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,6BAA6B,EAC7B,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,2BAA2B,EAC3B,yBAAyB,EAC1B,MAAM,iBAAiB,CAAC;AAqBzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE7E,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAU3E,OAAO,EACL,mBAAmB,EACnB,aAAa,EACd,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface StarterFile {
|
|
2
|
+
path: string;
|
|
3
|
+
contents: string;
|
|
4
|
+
plane: "source";
|
|
5
|
+
}
|
|
6
|
+
export interface RuntimeDirectory {
|
|
7
|
+
path: string;
|
|
8
|
+
plane: "runtime";
|
|
9
|
+
}
|
|
10
|
+
export declare const starterFiles: StarterFile[];
|
|
11
|
+
export declare const runtimeDirectories: RuntimeDirectory[];
|
|
12
|
+
export declare const humanishScripts: Record<string, string>;
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
export const starterFiles = [
|
|
2
|
+
{
|
|
3
|
+
path: "humanish/README.md",
|
|
4
|
+
plane: "source",
|
|
5
|
+
contents: `# Humanish
|
|
6
|
+
|
|
7
|
+
This directory is the committed source of persona simulation intent for this app.
|
|
8
|
+
|
|
9
|
+
Keep this directory public-safe:
|
|
10
|
+
|
|
11
|
+
- synthetic personas only;
|
|
12
|
+
- synthetic fixtures only;
|
|
13
|
+
- env var names only, never values;
|
|
14
|
+
- no PII, PHI, secrets, raw private transcripts, private screenshots, customer data, or patient data.
|
|
15
|
+
|
|
16
|
+
Generated run bundles, screenshots, traces, logs, and local overrides belong in ignored \`.humanish/\`.
|
|
17
|
+
|
|
18
|
+
Labs:
|
|
19
|
+
|
|
20
|
+
- committed reusable labs live in humanish/labs/*.yaml;
|
|
21
|
+
- private or machine-local labs live in ignored .humanish/labs/*.yaml or .humanish/local/labs/*.yaml;
|
|
22
|
+
- run a lab with \`humanish watch <lab>\` or \`humanish lab run <lab>\`.
|
|
23
|
+
|
|
24
|
+
Format standard:
|
|
25
|
+
|
|
26
|
+
- human-authored Humanish source uses .yaml;
|
|
27
|
+
- executable integration uses .ts;
|
|
28
|
+
- generated artifacts, synthetic fixtures, and event streams use .json or .ndjson;
|
|
29
|
+
- .yml is reserved for outside ecosystem files such as GitHub Actions, not Humanish source.
|
|
30
|
+
`
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
path: "humanish/config.ts",
|
|
34
|
+
plane: "source",
|
|
35
|
+
contents: `export default {
|
|
36
|
+
schema: "humanish.config.v1",
|
|
37
|
+
app: {
|
|
38
|
+
name: "synthetic-app",
|
|
39
|
+
baseUrl: "http://localhost:3000",
|
|
40
|
+
startCommand: "npm run dev"
|
|
41
|
+
},
|
|
42
|
+
personasDir: "humanish/personas",
|
|
43
|
+
scenariosDir: "humanish/scenarios",
|
|
44
|
+
policiesDir: "humanish/policies",
|
|
45
|
+
artifactsDir: ".humanish/runs"
|
|
46
|
+
};
|
|
47
|
+
`
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
path: "humanish/personas/synthetic-new-user.yaml",
|
|
51
|
+
plane: "source",
|
|
52
|
+
contents: `schema: humanish.persona.v1
|
|
53
|
+
id: synthetic-new-user
|
|
54
|
+
name: Synthetic New User
|
|
55
|
+
summary: A privacy-safe first-time user evaluating the app with realistic but synthetic needs.
|
|
56
|
+
traits:
|
|
57
|
+
patience: medium
|
|
58
|
+
technical_confidence: medium
|
|
59
|
+
accessibility_needs: none_declared
|
|
60
|
+
constraints:
|
|
61
|
+
- Do not use real personal data.
|
|
62
|
+
- Do not use production accounts.
|
|
63
|
+
- Treat all credentials as env var names only.
|
|
64
|
+
`
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
path: "humanish/personas/skeptical-power-user.yaml",
|
|
68
|
+
plane: "source",
|
|
69
|
+
contents: `schema: humanish.persona.v1
|
|
70
|
+
id: skeptical-power-user
|
|
71
|
+
name: Skeptical Power User
|
|
72
|
+
summary: A privacy-safe experienced user looking for speed, reversibility, and clear proof.
|
|
73
|
+
traits:
|
|
74
|
+
patience: low
|
|
75
|
+
technical_confidence: high
|
|
76
|
+
accessibility_needs: keyboard_first
|
|
77
|
+
constraints:
|
|
78
|
+
- Do not use real personal data.
|
|
79
|
+
- Prefer synthetic fixture inputs.
|
|
80
|
+
- Flag unclear recovery paths.
|
|
81
|
+
`
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
path: "humanish/scenarios/first-run-smoke.yaml",
|
|
85
|
+
plane: "source",
|
|
86
|
+
contents: `schema: humanish.scenario.v1
|
|
87
|
+
id: first-run-smoke
|
|
88
|
+
title: First-run smoke
|
|
89
|
+
persona: synthetic-new-user
|
|
90
|
+
goal: Reach the first meaningful product state without using private data.
|
|
91
|
+
mode: dry-run
|
|
92
|
+
steps:
|
|
93
|
+
- name: Open the app
|
|
94
|
+
expectation: The app shell is reachable.
|
|
95
|
+
- name: Complete the first synthetic action
|
|
96
|
+
expectation: The user sees a clear next state.
|
|
97
|
+
- name: Capture review notes
|
|
98
|
+
expectation: Notes are public-safe and evidence-backed.
|
|
99
|
+
`
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
path: "humanish/scenarios/onboarding-regression.yaml",
|
|
103
|
+
plane: "source",
|
|
104
|
+
contents: `schema: humanish.scenario.v1
|
|
105
|
+
id: onboarding-regression
|
|
106
|
+
title: Onboarding regression
|
|
107
|
+
persona: skeptical-power-user
|
|
108
|
+
goal: Exercise onboarding friction using synthetic inputs and explicit recovery checks.
|
|
109
|
+
mode: dry-run
|
|
110
|
+
steps:
|
|
111
|
+
- name: Start onboarding
|
|
112
|
+
expectation: Required information is clear.
|
|
113
|
+
- name: Use synthetic fixture data
|
|
114
|
+
expectation: No real user data is entered.
|
|
115
|
+
- name: Check recovery path
|
|
116
|
+
expectation: The user can back out or retry safely.
|
|
117
|
+
`
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
path: "humanish/labs/first-run.yaml",
|
|
121
|
+
plane: "source",
|
|
122
|
+
contents: `schema: humanish.lab.v2
|
|
123
|
+
id: first-run
|
|
124
|
+
title: First-run synthetic Observer
|
|
125
|
+
description: Public-safe starter lab that generates a synthetic run bundle and Observer without provider spend.
|
|
126
|
+
subject:
|
|
127
|
+
source: this-repo
|
|
128
|
+
actors:
|
|
129
|
+
- type: synthetic-persona
|
|
130
|
+
count: 4
|
|
131
|
+
scenario:
|
|
132
|
+
mode: dry-run
|
|
133
|
+
defaults:
|
|
134
|
+
open: true
|
|
135
|
+
`
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
path: "humanish/labs/cua-browser.yaml",
|
|
139
|
+
plane: "source",
|
|
140
|
+
contents: `schema: humanish.lab.v2
|
|
141
|
+
id: cua-browser
|
|
142
|
+
title: Computer-use browser lab
|
|
143
|
+
description: >-
|
|
144
|
+
A registered computer-use actor drives your app in a hosted desktop browser and emits an
|
|
145
|
+
evidence bundle into gitignored .humanish/. Screenshots are full-fidelity (raw) by default;
|
|
146
|
+
set policies.redactScreenshots: true to blur at capture for a share-as-is bundle. Typed
|
|
147
|
+
text is recorded as length only. Dry-run by default; switch scenario.mode to live (with
|
|
148
|
+
OPENAI_API_KEY + E2B_API_KEY via --env-file) for a real session. The clone subject below
|
|
149
|
+
serves your repo INSIDE the sandbox; declared subject env NAMES are provisioned from
|
|
150
|
+
--env-file (values are never persisted).
|
|
151
|
+
subject:
|
|
152
|
+
source: clone
|
|
153
|
+
repos: [your-org/your-app]
|
|
154
|
+
serve:
|
|
155
|
+
install: pnpm install --frozen-lockfile
|
|
156
|
+
build: pnpm build
|
|
157
|
+
start: pnpm start
|
|
158
|
+
url: http://127.0.0.1:3000/
|
|
159
|
+
# installTimeoutMs: 1200000 # bump for monorepo-scale installs/builds (default 600000)
|
|
160
|
+
# buildTimeoutMs: 1800000
|
|
161
|
+
# env: [DATABASE_URL]
|
|
162
|
+
# state: # the subject's STATE story (recorded as provenance):
|
|
163
|
+
# seed: # ordered, bounded seed/migration/fixture steps (commands are
|
|
164
|
+
# - name: db-up # author-trusted; evidence records sha256 digests, never text)
|
|
165
|
+
# command: sudo service postgresql start && pg_isready -t 30
|
|
166
|
+
# when: before-start # before-build | before-start (default) | after-ready
|
|
167
|
+
# - name: db-migrate
|
|
168
|
+
# command: pnpm prisma migrate deploy
|
|
169
|
+
# timeoutMs: 300000 # per-step budget (default 300000)
|
|
170
|
+
# - name: admin-user # after-ready steps run against the RUNNING app
|
|
171
|
+
# command: curl -sf -X POST http://127.0.0.1:3000/api/test/bootstrap-admin
|
|
172
|
+
# when: after-ready
|
|
173
|
+
# # Or point at a shared DB you do NOT control — recorded as UNPINNED in provenance;
|
|
174
|
+
# # each name must also be declared in subject.env:
|
|
175
|
+
# # external: [DATABASE_URL]
|
|
176
|
+
# clone:
|
|
177
|
+
# keep: true # leave the sandbox up on FAILURE so you can debug install/boot
|
|
178
|
+
# Alternative: drive a deployment you own (Vercel preview, staging) instead of a clone:
|
|
179
|
+
# source: app-url
|
|
180
|
+
# appUrl: https://your-preview.vercel.app/
|
|
181
|
+
actors:
|
|
182
|
+
- type: openai-computer-use
|
|
183
|
+
persona: first-time-visitor
|
|
184
|
+
mission: >-
|
|
185
|
+
Explore the app as a brand-new user trying to complete its primary flow. Note anything
|
|
186
|
+
confusing. Stop when the flow completes or you are stuck.
|
|
187
|
+
execution:
|
|
188
|
+
target: e2b-desktop
|
|
189
|
+
timeoutMs: 300000
|
|
190
|
+
desktop:
|
|
191
|
+
device: desktop # mobile | small-mobile | narrow-mobile | tablet | desktop | wide
|
|
192
|
+
# browser: chrome # default | chrome | chromium | firefox; concrete values fail closed
|
|
193
|
+
# On this route only width/height render (real mobile LAYOUT); the model is told its device.
|
|
194
|
+
# True touch/DPR/UA emulation comes with the deterministic CDP actor (a later slice).
|
|
195
|
+
scenario:
|
|
196
|
+
mode: dry-run
|
|
197
|
+
# policies:
|
|
198
|
+
# redactScreenshots: true # blur persisted frames (default off — full fidelity for local use)
|
|
199
|
+
# allowPublicTargets: true # required to drive a non-loopback app-url (a deployment you own)
|
|
200
|
+
defaults:
|
|
201
|
+
open: true
|
|
202
|
+
`
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
path: "humanish/policies/redaction.yaml",
|
|
206
|
+
plane: "source",
|
|
207
|
+
contents: `schema: humanish.redaction-policy.v1
|
|
208
|
+
# Public-safety policy of intent for this project.
|
|
209
|
+
#
|
|
210
|
+
# Enforcement scope: \`humanish verify\` detects the classes under \`enforced\`
|
|
211
|
+
# (secret/key/token shapes and known local-path shapes) and fails closed on a
|
|
212
|
+
# match. It does NOT detect free-form PII/PHI (names, emails, DOBs, MRNs). The
|
|
213
|
+
# classes under \`author_responsibility\` are forbidden in public output but rely
|
|
214
|
+
# on using synthetic data and on review, not automated detection. So
|
|
215
|
+
# \`redaction: passed\` means the secret/path scan found no matches, not that the
|
|
216
|
+
# artifact was certified free of PII/PHI.
|
|
217
|
+
deny:
|
|
218
|
+
- pii
|
|
219
|
+
- phi
|
|
220
|
+
- secrets
|
|
221
|
+
- tokens
|
|
222
|
+
- raw_private_transcripts
|
|
223
|
+
- private_screenshots
|
|
224
|
+
- customer_data
|
|
225
|
+
- patient_data
|
|
226
|
+
enforced:
|
|
227
|
+
- secret_key_token_shapes
|
|
228
|
+
- known_local_path_shapes
|
|
229
|
+
author_responsibility:
|
|
230
|
+
- pii
|
|
231
|
+
- phi
|
|
232
|
+
- patient_data
|
|
233
|
+
- customer_data
|
|
234
|
+
- names_emails_and_other_identifiers
|
|
235
|
+
allow:
|
|
236
|
+
- synthetic_personas
|
|
237
|
+
- synthetic_fixtures
|
|
238
|
+
- env_var_names
|
|
239
|
+
`
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
path: "humanish/policies/network.yaml",
|
|
243
|
+
plane: "source",
|
|
244
|
+
contents: `schema: humanish.network-policy.v1
|
|
245
|
+
default: local_only
|
|
246
|
+
allowed_hosts:
|
|
247
|
+
- localhost
|
|
248
|
+
- 127.0.0.1
|
|
249
|
+
notes:
|
|
250
|
+
- Add external hosts only after confirming they are safe for public proof artifacts.
|
|
251
|
+
`
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
path: "humanish/policies/credentials.example.yaml",
|
|
255
|
+
plane: "source",
|
|
256
|
+
contents: `schema: humanish.credentials-policy.v1
|
|
257
|
+
env_names:
|
|
258
|
+
openai: OPENAI_API_KEY
|
|
259
|
+
e2b: E2B_API_KEY
|
|
260
|
+
rules:
|
|
261
|
+
- Store values outside the repository.
|
|
262
|
+
- Commit env var names only.
|
|
263
|
+
- Do not paste keys into personas, scenarios, issue drafts, or run bundles.
|
|
264
|
+
`
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
path: "humanish/adapters/app.ts",
|
|
268
|
+
plane: "source",
|
|
269
|
+
contents: `export const appAdapter = {
|
|
270
|
+
schema: "humanish.adapter.v1",
|
|
271
|
+
id: "synthetic-app",
|
|
272
|
+
name: "Synthetic App",
|
|
273
|
+
routes: [
|
|
274
|
+
{
|
|
275
|
+
id: "home",
|
|
276
|
+
path: "/",
|
|
277
|
+
description: "Synthetic app entry point"
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
};
|
|
281
|
+
`
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
path: "humanish/review/vocabulary.yaml",
|
|
285
|
+
plane: "source",
|
|
286
|
+
contents: `schema: humanish.review-vocabulary.v1
|
|
287
|
+
verdicts:
|
|
288
|
+
- pass
|
|
289
|
+
- fail
|
|
290
|
+
- blocked
|
|
291
|
+
- needs_evidence
|
|
292
|
+
labels:
|
|
293
|
+
friction: User-visible friction.
|
|
294
|
+
gap: Missing evidence or missing coverage.
|
|
295
|
+
public_safety: Potential privacy, secret, or public-boundary issue.
|
|
296
|
+
`
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
path: "humanish/review/milestones.yaml",
|
|
300
|
+
plane: "source",
|
|
301
|
+
contents: `schema: humanish.milestones.v1
|
|
302
|
+
milestones:
|
|
303
|
+
- id: first-visible-state
|
|
304
|
+
description: The first meaningful app state is visible.
|
|
305
|
+
- id: synthetic-action-complete
|
|
306
|
+
description: A synthetic user action reaches an expected state.
|
|
307
|
+
- id: review-ready
|
|
308
|
+
description: Public-safe evidence is ready for review.
|
|
309
|
+
`
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
path: "humanish/coverage-map.md",
|
|
313
|
+
plane: "source",
|
|
314
|
+
contents: `# Coverage Map
|
|
315
|
+
|
|
316
|
+
This file should enumerate screens, roles, states, and paths before scenarios are treated as complete.
|
|
317
|
+
|
|
318
|
+
Current starter coverage is intentionally minimal and synthetic.
|
|
319
|
+
`
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
path: "humanish/coverage-matrix.md",
|
|
323
|
+
plane: "source",
|
|
324
|
+
contents: `# Coverage Matrix
|
|
325
|
+
|
|
326
|
+
| Area | Persona | Happy Path | Sad Path | Status |
|
|
327
|
+
| --- | --- | --- | --- | --- |
|
|
328
|
+
| First run | synthetic-new-user | planned | planned | starter |
|
|
329
|
+
| Onboarding | skeptical-power-user | planned | planned | starter |
|
|
330
|
+
`
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
path: "humanish/fixtures/synthetic-login-state.json",
|
|
334
|
+
plane: "source",
|
|
335
|
+
contents: `{
|
|
336
|
+
"schema": "humanish.synthetic-fixture.v1",
|
|
337
|
+
"kind": "login-state",
|
|
338
|
+
"user": {
|
|
339
|
+
"id": "synthetic-user-001",
|
|
340
|
+
"email": "synthetic.user@example.test"
|
|
341
|
+
},
|
|
342
|
+
"notes": [
|
|
343
|
+
"Synthetic fixture only.",
|
|
344
|
+
"Do not replace with real user data."
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
`
|
|
348
|
+
}
|
|
349
|
+
];
|
|
350
|
+
export const runtimeDirectories = [
|
|
351
|
+
{ path: ".humanish/runs", plane: "runtime" },
|
|
352
|
+
{ path: ".humanish/cache", plane: "runtime" },
|
|
353
|
+
{ path: ".humanish/tmp", plane: "runtime" },
|
|
354
|
+
{ path: ".humanish/logs", plane: "runtime" },
|
|
355
|
+
{ path: ".humanish/labs", plane: "runtime" },
|
|
356
|
+
{ path: ".humanish/local/labs", plane: "runtime" },
|
|
357
|
+
{ path: ".humanish/local/personas", plane: "runtime" },
|
|
358
|
+
{ path: ".humanish/local/policies", plane: "runtime" },
|
|
359
|
+
{ path: ".humanish/secrets", plane: "runtime" }
|
|
360
|
+
];
|
|
361
|
+
export const humanishScripts = {
|
|
362
|
+
humanish: "humanish",
|
|
363
|
+
"humanish:doctor": "humanish doctor",
|
|
364
|
+
"humanish:run": "humanish run --dry-run",
|
|
365
|
+
"humanish:watch": "humanish watch",
|
|
366
|
+
"humanish:watch:ci": "humanish watch --json --no-open",
|
|
367
|
+
"humanish:verify": "humanish verify"
|
|
368
|
+
};
|
|
369
|
+
//# sourceMappingURL=init-templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-templates.js","sourceRoot":"","sources":["../src/init-templates.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,YAAY,GAAkB;IACzC;QACE,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;CAyBb;KACE;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,QAAQ;QACf,QAAQ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RESPONSE_SCHEMA = "humanish.init-result.v1";
|
|
2
|
+
export interface InitOptions {
|
|
3
|
+
cwd: string;
|
|
4
|
+
dryRun?: boolean;
|
|
5
|
+
yes?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export type InitMode = "dry-run" | "applied" | "needs-confirmation";
|
|
8
|
+
export interface InitChange {
|
|
9
|
+
path: string;
|
|
10
|
+
action: "create" | "mkdir" | "update" | "skip";
|
|
11
|
+
target: "source" | "runtime" | "gitignore" | "package-json";
|
|
12
|
+
reason: string;
|
|
13
|
+
}
|
|
14
|
+
export interface InitResult {
|
|
15
|
+
schema: typeof INIT_RESPONSE_SCHEMA;
|
|
16
|
+
ok: boolean;
|
|
17
|
+
mode: InitMode;
|
|
18
|
+
cwd: string;
|
|
19
|
+
changes: InitChange[];
|
|
20
|
+
warnings: string[];
|
|
21
|
+
error?: {
|
|
22
|
+
code: "HUMANISH_CONFIRMATION_REQUIRED" | "HUMANISH_INVALID_CWD" | "HUMANISH_INVALID_PACKAGE_JSON";
|
|
23
|
+
message: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export declare function runInit(options: InitOptions): Promise<InitResult>;
|