@zhivex-ai/harness 0.11.0 → 1.0.0-rc.7

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +129 -0
  2. package/README.md +9 -8
  3. package/ROADMAP.md +31 -8
  4. package/SECURITY.md +4 -2
  5. package/SUPPORT.md +4 -2
  6. package/contracts/public-api.json +1359 -0
  7. package/contracts/security-controls.json +15 -0
  8. package/contracts/stable-api-signatures.json +490 -0
  9. package/dist/cli-options.d.ts +40 -0
  10. package/dist/cli-stream.d.ts +15 -15
  11. package/dist/cli.d.ts +20 -6
  12. package/dist/cli.js +2103 -496
  13. package/dist/config.d.ts +14 -0
  14. package/dist/errors.d.ts +68 -0
  15. package/dist/file-security.d.ts +29 -0
  16. package/dist/hostile-repository-demo.js +793 -329
  17. package/dist/index.d.ts +12 -4
  18. package/dist/index.js +7392 -5216
  19. package/dist/json-contracts.d.ts +1707 -0
  20. package/dist/operations.d.ts +1 -1
  21. package/dist/providers.d.ts +5 -0
  22. package/dist/state-backup.d.ts +148 -0
  23. package/dist/time-to-safe-fix.d.ts +43 -2
  24. package/dist/verify-historical-migrations.js +7667 -0
  25. package/dist/zhx.js +2103 -496
  26. package/docs/CLI.md +21 -4
  27. package/docs/DEPRECATIONS.md +9 -0
  28. package/docs/DURABLE_OPERATIONS.md +18 -1
  29. package/docs/EXTENSIBILITY.md +3 -3
  30. package/docs/GA_READINESS.md +23 -0
  31. package/docs/GEMINI_1_0_DECISION.md +9 -0
  32. package/docs/LIVE_CERTIFICATION.md +22 -2
  33. package/docs/PUBLIC_SECURITY.md +39 -0
  34. package/docs/RELEASE.md +17 -10
  35. package/docs/ROLLBACK.md +9 -0
  36. package/docs/SECURITY_REVIEW_EVIDENCE.md +15 -0
  37. package/docs/STABILITY.md +13 -0
  38. package/docs/SUPPORT_MATRIX.md +17 -0
  39. package/docs/THREAT_MODEL.md +28 -0
  40. package/docs/TIME_TO_SAFE_FIX.md +2 -2
  41. package/docs/ga-readiness.json +235 -0
  42. package/docs/support-matrix.json +29 -0
  43. package/evaluations/representative-assembly-matrix.json +138 -0
  44. package/evaluations/representative-matrix.json +179 -0
  45. package/evaluations/representative-repositories.jsonl +7 -0
  46. package/examples/mcp-config.json +1 -1
  47. package/fixtures/contracts/v1/doctor.json +45 -0
  48. package/fixtures/contracts/v1/error.json +9 -0
  49. package/fixtures/contracts/v1/observational-documents.json +34 -0
  50. package/fixtures/contracts/v1/providers.json +17 -0
  51. package/fixtures/contracts/v1/run-result-forward.json +37 -0
  52. package/fixtures/contracts/v1/run-result.json +34 -0
  53. package/fixtures/contracts/v1/run-stream-result.jsonl +1 -0
  54. package/fixtures/migrations/0.10.0.json +315 -0
  55. package/fixtures/migrations/0.10.0.sqlite +0 -0
  56. package/fixtures/migrations/0.11.1.json +319 -0
  57. package/fixtures/migrations/0.11.1.sqlite +0 -0
  58. package/fixtures/migrations/README.md +20 -0
  59. package/package.json +16 -9
package/dist/index.d.ts CHANGED
@@ -1,12 +1,18 @@
1
- export { DEFAULT_ALLOWED_CHECKS, DEFAULT_OCI_EXECUTION, DEFAULT_SUBAGENT_BUDGET, HARNESS_CONFIG_SCHEMA_VERSION, HARNESS_EXECUTION_BACKENDS, HARNESS_EXECUTION_POLICY_VERSION, HARNESS_OCI_RUNTIMES, HARNESS_OCI_SHELL_MODES, HARNESS_REQUIRED_CAPABILITIES, HARNESS_SUBAGENT_PROFILES, BUILTIN_PROVIDER_REGISTRATIONS, DEFAULT_PROVIDER_REGISTRY, PROVIDERS, PROVIDER_DESCRIPTORS, createProviderModel, createProviderRegistry, defaultHarnessNamespace, parseProvider, providerAvailability, providerDescriptor, resolveHarnessConfig } from "./config.js";
2
- export type { BuiltInHarnessProvider, HarnessBudget, HarnessCompactionConfig, HarnessContextConfig, HarnessConfig, HarnessConfigInput, HarnessCostBudget, HarnessExecutionBackend, HarnessExecutionConfig, HarnessOciRuntime, HarnessOciShellMode, HarnessOrchestrationConfig, HarnessProvider, HarnessProviderRegistry, HarnessRequiredCapability, HarnessStoreBackend, HarnessSubagentProfile, ProviderCapability, ProviderAvailability, ProviderCredentials, ProviderDescriptor, ProviderDiagnosticsDescriptor, ProviderEnumDiagnostic, ProviderModelFactory, ProviderModelFactoryContext, ProviderPresenceDiagnostic, ProviderRegistration, ProviderSupport } from "./config.js";
1
+ export { DEFAULT_ALLOWED_CHECKS, DEFAULT_OCI_EXECUTION, DEFAULT_SUBAGENT_BUDGET, HARNESS_CONFIG_MIGRATABLE_SCHEMA_VERSIONS, HARNESS_CONFIG_SCHEMA_VERSION, HARNESS_EXECUTION_BACKENDS, HARNESS_EXECUTION_POLICY_VERSION, HARNESS_OCI_RUNTIMES, HARNESS_OCI_SHELL_MODES, HARNESS_REQUIRED_CAPABILITIES, HARNESS_SUBAGENT_PROFILES, BUILTIN_PROVIDER_REGISTRATIONS, DEFAULT_PROVIDER_REGISTRY, PROVIDERS, PROVIDER_DESCRIPTORS, createProviderModel, createProviderRegistry, defaultHarnessNamespace, migrateHarnessConfigInput, parseProvider, providerAvailability, providerDescriptor, resolveHarnessConfig } from "./config.js";
2
+ export type { BuiltInHarnessProvider, HarnessBudget, HarnessCompactionConfig, HarnessContextConfig, HarnessConfig, HarnessConfigInput, HarnessConfigMigrationResult, HarnessCostBudget, HarnessExecutionBackend, HarnessExecutionConfig, HarnessOciRuntime, HarnessOciShellMode, HarnessOrchestrationConfig, HarnessProvider, HarnessProviderRegistry, HarnessRequiredCapability, HarnessStoreBackend, HarnessSubagentProfile, ProviderCapability, ProviderAvailability, ProviderCredentials, ProviderDescriptor, ProviderDiagnosticsDescriptor, ProviderEnumDiagnostic, ProviderModelFactory, ProviderModelFactoryContext, ProviderPresenceDiagnostic, ProviderRegistration, ProviderSupport } from "./config.js";
3
3
  export { createHarnessRouteModels, parseHarnessModelRoute, resolveHarnessModelRoutes, serializeHarnessModelRoutes } from "./routing.js";
4
4
  export type { HarnessModelRoute } from "./routing.js";
5
5
  export { CLI_EVENT_SCHEMA_VERSION, CLI_JSON_SCHEMA_VERSION, serializeStreamEvent, serializeStreamResult, streamEventDocument, streamResultDocument } from "./cli-stream.js";
6
6
  export type { StreamRunResultSource } from "./cli-stream.js";
7
+ export { CLI_COMMAND_OPTION_CONTRACTS, CLI_OPTION_DEFINITIONS, CLI_OPTION_NAMES, validateCliCommandOptions } from "./cli-options.js";
8
+ export type { CliCommandOptionContract, CliCommandOptionContractKey, CliOptionDefinition, CliOptionName } from "./cli-options.js";
9
+ export { cliChangeEnvelopeVerificationDocumentSchema, cliDoctorDocumentSchema, cliErrorDocumentSchema, cliJsonDocumentSchema, cliJsonLineDocumentSchema, cliProviderDocumentSchema, cliReviewGroupDocumentSchema, cliRunCancellationDocumentSchema, cliRunCleanupDocumentSchema, cliRunEventDocumentSchema, cliRunExportDocumentSchema, cliRunInspectionDocumentSchema, cliRunListDocumentSchema, cliRunResultDocumentSchema, cliSessionDocumentSchema, cliSessionListDocumentSchema, cliStateExportDocumentSchema, cliStateImportDocumentSchema, cliStateStatusDocumentSchema, cliStreamErrorDocumentSchema, cliStreamResultDocumentSchema, parseCliJsonDocument, parseCliJsonLineDocument } from "./json-contracts.js";
10
+ export type { CliChangeEnvelopeVerificationDocument, CliJsonDocument, CliJsonLineDocument, CliReviewGroupDocument, CliRunEventDocument, CliRunInspectionDocument, CliRunListDocument, CliRunResultDocument, CliSessionDocument, CliStreamErrorDocument, CliStreamResultDocument } from "./json-contracts.js";
7
11
  export { DEFAULT_APPROVAL_SUMMARY_CHARACTERS, formatApproval, formatTerminalEvent, formatTerminalHeader, resolveTerminalApprovals, sanitizeTerminalText, terminalSupportsColor } from "./terminal-ui.js";
8
12
  export type { ApprovalFormatOptions, TerminalAppearanceOptions, TerminalApprovalResolverOptions, TerminalHeaderInput } from "./terminal-ui.js";
9
13
  export { HARNESS_SESSION_INDEX_FILE, HARNESS_SESSION_SCHEMA_VERSION, SESSION_RUN_STATUSES, TERMINAL_SESSION_RUN_STATUSES, openCliSessionStore, openSessionStore } from "./sessions.js";
14
+ export { HARNESS_STATE_BACKUP_MAX_BYTES, HARNESS_STATE_BACKUP_SCHEMA_VERSION, createHarnessStateBackup, exportHarnessStateBackup, importHarnessStateBackup, importHarnessStateBackupFile, inspectHarnessState, readHarnessStateBackup, stateBackupBundleSchema } from "./state-backup.js";
15
+ export type { HarnessStateBackupBundle, HarnessStateImportOptions } from "./state-backup.js";
10
16
  export type { AppendSessionRunInput, CliSession, CliSessionStore, CliSessionSummary, CreateSessionInput, ForkSessionInput, ListSessionsQuery, OpenSessionStoreOptions, SessionRetentionResult, SessionRunReference, SessionRunStatus, UpdateSessionInput, UpdateSessionRunInput } from "./sessions.js";
11
17
  export { CliOciRuntimeAdapter, HARNESS_EXECUTION_ARTIFACT_SCHEMA_VERSION, HARNESS_OCI_LABEL, HARNESS_OCI_LABEL_VALUE, cleanupHarnessExecutionArtifacts, createHarnessOciExecutionEnvironment, describeOciCommand, executionFingerprintInput, harnessExecutionSession } from "./execution-environment.js";
12
18
  export type { CreateHarnessOciEnvironmentOptions, EnvironmentPatchImportResult, EnvironmentPatchInspection, ExecutionArtifactCleanupResult, HarnessCommandResult, HarnessEnvironmentStatus, HarnessExecutionIoMetrics, HarnessExecutionSession, HarnessOciExecutionEnvironment, HarnessOciRuntimeAdapter, OciCommandBatchResult, OciImageInspection, OciCommandResult, OciPhaseLatencies, OciRunBatchRequest, OciRunRequest } from "./execution-environment.js";
@@ -17,6 +23,8 @@ export type { HarnessMcpClients, HarnessMcpConfiguration, HarnessMcpPermission,
17
23
  export { HARNESS_SUBAGENT_PROFILE_DESCRIPTORS, createHarnessSubagents, runHarnessReviewGroup } from "./orchestration.js";
18
24
  export type { HarnessReviewGroupResult, HarnessSubagentProfileDescriptor, HarnessSubagentRuntime } from "./orchestration.js";
19
25
  export { BUN_ENGINE_RANGE, HARNESS_VERSION, NODE_ENGINE_RANGE } from "./version.js";
26
+ export { HARNESS_ERROR_SCHEMA_VERSION, HARNESS_ERROR_CODES, HarnessApprovalError, HarnessConfigError, HarnessError, HarnessExecutionError, HarnessProviderError, HarnessStateConflictError, HarnessWorkspaceError, harnessErrorDocument, normalizeHarnessError } from "./errors.js";
27
+ export type { HarnessErrorCategory, HarnessErrorCode, HarnessErrorDocument, HarnessErrorOptions } from "./errors.js";
20
28
  export { CHANGE_ENVELOPE_DIGEST_ALGORITHM, CHANGE_ENVELOPE_SCHEMA_VERSION, MAX_CHANGE_ENVELOPE_APPROVALS, MAX_CHANGE_ENVELOPE_APPROVAL_SCOPES, MAX_CHANGE_ENVELOPE_ATTESTATIONS, MAX_CHANGE_ENVELOPE_CHECKS, canonicalizeChangeEnvelope, changeEnvelopeApprovalSchema, changeEnvelopeBaseSchema, changeEnvelopeCheckSchema, changeEnvelopeEvidenceSchema, changeEnvelopeFingerprintsSchema, changeEnvelopeInputSchema, changeEnvelopePatchSchema, changeEnvelopePreconditionsSchema, changeEnvelopeSchema, computeChangeEnvelopeDigest, computeChangeEnvelopeEvidenceDigest, createChangeEnvelope, digestChangeEnvelopeArtifact, externalAttestationReferenceSchema, verifyChangeEnvelope } from "./change-envelope.js";
21
29
  export type { ChangeEnvelope, ChangeEnvelopeApproval, ChangeEnvelopeCheck, ChangeEnvelopeEvidence, ChangeEnvelopePreconditions, ChangeEnvelopeVerificationIssue, ChangeEnvelopeVerificationIssueCode, ChangeEnvelopeVerificationOptions, ChangeEnvelopeVerificationResult, CreateChangeEnvelopeInput, ExternalAttestationReference } from "./change-envelope.js";
22
30
  export { EDIT_CONTRACT_SCHEMA_VERSION, EDIT_DIGEST_ALGORITHM, MAX_EDIT_CHANGES, MAX_EDIT_FILE_BYTES, MAX_EDIT_PROPOSAL_BYTES, applyEditProposalInputSchema, createEditProposal, editContractDocument, editChangeSchema, editChangesSchema, editProposalInputSchema, editProposalChangeSchema, editProposalSchema, fileDigestSchema, moveFileInputSchema, mutationAuditEntrySchema, mutationOperationSchema, quarantineFileInputSchema, restoreFileInputSchema, validateEditProposal, workspaceFilePathSchema } from "./edit-contracts.js";
@@ -30,5 +38,5 @@ export { DEFAULT_HARNESS_CONTEXT_MANIFEST, DEFAULT_HARNESS_PROJECT_INSTRUCTIONS,
30
38
  export type { HarnessContextBundle, HarnessContextConfiguration, HarnessContextManifestIdentity, HarnessContextSource, HarnessLifecycleEvent, HarnessLifecycleEventName, HarnessLifecycleHookFailure, HarnessLifecycleHookRegistration, HarnessLoadedSkill, HarnessSkillIndexEntry, LoadHarnessProjectContextOptions } from "./context-engineering.js";
31
39
  export { Workspace } from "./workspace.js";
32
40
  export type { CommandResult, HarnessCheck, ListFilesOptions, ListFilesResult, ReadFilesRequest, SearchFilesOptions, SearchManyOptions, SearchManyQuery, SearchMatch, WorkspaceFile, WorkspaceTopologyFile, WorkspaceIndexDiagnostics } from "./workspace.js";
33
- export { DEFAULT_TIME_TO_SAFE_FIX_GOAL, TIME_TO_SAFE_FIX_CARRIERS, TIME_TO_SAFE_FIX_FAILURE_STAGES, TIME_TO_SAFE_FIX_GOALS, TIME_TO_SAFE_FIX_PROFILES, TIME_TO_SAFE_FIX_SCHEMA_VERSION, classifyTimeToSafeFixFailure, createTimeToSafeFixCases, createTimeToSafeFixReport, createTimeToSafeFixSample, injectTimeToSafeFixAttack, timeToSafeFixDriverResultSchema, timeToSafeFixLatencyStatistics, timeToSafeFixTaskSchema } from "./time-to-safe-fix.js";
34
- export type { TimeToSafeFixAggregate, TimeToSafeFixCarrier, TimeToSafeFixCase, TimeToSafeFixDriverResult, TimeToSafeFixFailureStage, TimeToSafeFixGoal, TimeToSafeFixLatencyStatistics, TimeToSafeFixProfile, TimeToSafeFixRate, TimeToSafeFixRatioStatistics, TimeToSafeFixReport, TimeToSafeFixSample, TimeToSafeFixTask } from "./time-to-safe-fix.js";
41
+ export { DEFAULT_TIME_TO_SAFE_FIX_GOAL, TIME_TO_SAFE_FIX_CARRIERS, TIME_TO_SAFE_FIX_DIAGNOSTIC_CODES, TIME_TO_SAFE_FIX_FAILURE_ORIGINS, TIME_TO_SAFE_FIX_FAILURE_STAGES, TIME_TO_SAFE_FIX_GOALS, TIME_TO_SAFE_FIX_PROFILES, TIME_TO_SAFE_FIX_SCHEMA_VERSION, classifyTimeToSafeFixFailure, createTimeToSafeFixCases, createTimeToSafeFixReport, createTimeToSafeFixSample, injectTimeToSafeFixAttack, timeToSafeFixDriverResultSchema, timeToSafeFixLatencyStatistics, timeToSafeFixTaskSchema } from "./time-to-safe-fix.js";
42
+ export type { TimeToSafeFixAggregate, TimeToSafeFixCarrier, TimeToSafeFixCase, TimeToSafeFixDriverResult, TimeToSafeFixDiagnosticCode, TimeToSafeFixFailureOrigin, TimeToSafeFixFailureStage, TimeToSafeFixGoal, TimeToSafeFixLatencyStatistics, TimeToSafeFixProfile, TimeToSafeFixRate, TimeToSafeFixRatioStatistics, TimeToSafeFixReport, TimeToSafeFixSample, TimeToSafeFixTask } from "./time-to-safe-fix.js";