@halonicjs/testing 0.1.0 → 0.1.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.
Files changed (153) hide show
  1. package/NOTICE +4 -0
  2. package/README.md +1 -1
  3. package/dist/adapters/http-kit/src/address-checking.d.ts +19 -0
  4. package/dist/adapters/http-kit/src/address-checking.js +1 -0
  5. package/dist/adapters/http-kit/src/index.d.ts +1 -0
  6. package/dist/adapters/integration-kit/src/auth-placement.d.ts +40 -0
  7. package/dist/adapters/integration-kit/src/auth-placement.js +102 -0
  8. package/dist/adapters/integration-kit/src/current-secret-forms.d.ts +28 -0
  9. package/dist/adapters/integration-kit/src/current-secret-forms.js +60 -0
  10. package/dist/adapters/integration-kit/src/declaration.d.ts +2 -1
  11. package/dist/adapters/integration-kit/src/declaration.js +4 -3
  12. package/dist/adapters/integration-kit/src/host.d.ts +7 -1
  13. package/dist/adapters/integration-kit/src/host.js +1 -0
  14. package/dist/adapters/integration-kit/src/index.d.ts +3 -1
  15. package/dist/adapters/integration-kit/src/index.js +1 -0
  16. package/dist/adapters/integration-kit/src/leak-attempt.d.ts +4 -2
  17. package/dist/adapters/integration-kit/src/leak-attempt.js +5 -2
  18. package/dist/adapters/integration-kit/src/limited-http.d.ts +7 -1
  19. package/dist/adapters/integration-kit/src/limited-http.js +53 -10
  20. package/dist/adapters/integration-kit/src/loader.d.ts +29 -2
  21. package/dist/adapters/integration-kit/src/loader.js +44 -12
  22. package/dist/adapters/integration-kit/src/own-request.d.ts +2 -2
  23. package/dist/adapters/integration-kit/src/own-request.js +1 -1
  24. package/dist/adapters/integration-kit/src/plugin-load.d.ts +3 -3
  25. package/dist/adapters/integration-kit/src/plugin-load.js +5 -5
  26. package/dist/adapters/integration-kit/src/policy.d.ts +28 -0
  27. package/dist/adapters/integration-kit/src/response-body.d.ts +6 -2
  28. package/dist/adapters/integration-kit/src/secret-filter.d.ts +3 -3
  29. package/dist/adapters/integration-kit/src/secret-filter.js +19 -4
  30. package/dist/adapters/integration-kit/src/secret-in-request.d.ts +3 -0
  31. package/dist/adapters/integration-kit/src/secret-in-request.js +8 -2
  32. package/dist/adapters/integration-kit/src/secret-placement.d.ts +35 -25
  33. package/dist/adapters/integration-kit/src/secret-placement.js +65 -95
  34. package/dist/adapters/integration-kit/src/sign-in-placement.d.ts +29 -0
  35. package/dist/adapters/integration-kit/src/sign-in-placement.js +92 -0
  36. package/dist/core/events/src/blocked-sites.d.ts +57 -0
  37. package/dist/core/events/src/blocked-sites.js +89 -0
  38. package/dist/core/events/src/index.d.ts +5 -1
  39. package/dist/core/events/src/index.js +3 -0
  40. package/dist/core/events/src/run-basics.d.ts +30 -7
  41. package/dist/core/events/src/run-event.d.ts +49 -5
  42. package/dist/core/events/src/run-reads.d.ts +25 -0
  43. package/dist/core/events/src/run-reads.js +44 -0
  44. package/dist/core/events/src/run-sends.d.ts +47 -0
  45. package/dist/core/events/src/run-sends.js +68 -0
  46. package/dist/core/events/src/summarize.js +5 -1
  47. package/dist/core/events/src/timeline-entry.js +1 -0
  48. package/dist/core/format/src/index.d.ts +7 -5
  49. package/dist/core/format/src/index.js +5 -3
  50. package/dist/core/format/src/integration/index.d.ts +3 -2
  51. package/dist/core/format/src/integration/index.js +2 -1
  52. package/dist/core/format/src/kinds/agent/sandbox-fields.d.ts +15 -5
  53. package/dist/core/format/src/kinds/agent/sandbox-fields.js +29 -10
  54. package/dist/core/format/src/kinds/agent/schema.js +2 -2
  55. package/dist/core/format/src/kinds/connector/is-local.js +1 -1
  56. package/dist/core/format/src/kinds/connector/kind.js +99 -0
  57. package/dist/core/format/src/kinds/connector/schema.d.ts +24 -0
  58. package/dist/core/format/src/kinds/connector/schema.js +53 -2
  59. package/dist/core/format/src/kinds/deployments/kind.js +25 -1
  60. package/dist/core/format/src/kinds/deployments/schema.d.ts +40 -0
  61. package/dist/core/format/src/kinds/deployments/schema.js +52 -0
  62. package/dist/core/format/src/kinds/integration/approved-sign-ins.d.ts +62 -0
  63. package/dist/core/format/src/kinds/integration/approved-sign-ins.js +125 -0
  64. package/dist/core/format/src/kinds/integration/host-key.d.ts +7 -0
  65. package/dist/core/format/src/kinds/integration/host-key.js +8 -0
  66. package/dist/core/format/src/kinds/integration/kind.d.ts +4 -2
  67. package/dist/core/format/src/kinds/integration/kind.js +49 -12
  68. package/dist/core/format/src/kinds/integration/policy.d.ts +47 -2
  69. package/dist/core/format/src/kinds/integration/policy.js +61 -2
  70. package/dist/core/format/src/kinds/integration/schema.d.ts +180 -3
  71. package/dist/core/format/src/kinds/integration/schema.js +132 -6
  72. package/dist/core/format/src/kinds/integration/sign-in-checks.d.ts +13 -0
  73. package/dist/core/format/src/kinds/integration/sign-in-checks.js +120 -0
  74. package/dist/core/format/src/kinds/integration/sign-in-urls.d.ts +19 -0
  75. package/dist/core/format/src/kinds/integration/sign-in-urls.js +47 -0
  76. package/dist/core/format/src/kinds/plugin/checks.js +7 -1
  77. package/dist/core/format/src/kinds/plugin/schema.d.ts +130 -0
  78. package/dist/core/format/src/kinds/plugin/schema.js +2 -2
  79. package/dist/core/format/src/kinds/plugin/ui-checks.d.ts +1 -1
  80. package/dist/core/format/src/kinds/plugin/ui-checks.js +1 -10
  81. package/dist/core/format/src/kinds/routine/kind.js +38 -1
  82. package/dist/core/format/src/kinds/routine/schema.d.ts +10 -0
  83. package/dist/core/format/src/kinds/routine/schema.js +23 -1
  84. package/dist/core/format/src/kinds/routine/webhook-headers.d.ts +9 -0
  85. package/dist/core/format/src/kinds/routine/webhook-headers.js +26 -0
  86. package/dist/core/format/src/kinds/workflow/schema.js +1 -1
  87. package/dist/core/format/src/kinds/workspace/kind.js +1 -1
  88. package/dist/core/format/src/kinds/workspace/schema.d.ts +2 -2
  89. package/dist/core/format/src/kinds/workspace/schema.js +1 -1
  90. package/dist/core/format/src/shared/fields.d.ts +3 -6
  91. package/dist/core/format/src/shared/fields.js +33 -13
  92. package/dist/core/ports/src/agent-runs-not-available.d.ts +21 -0
  93. package/dist/core/ports/src/agent-runs-not-available.js +25 -0
  94. package/dist/core/ports/src/blob-store.d.ts +12 -0
  95. package/dist/core/ports/src/blob-store.js +22 -0
  96. package/dist/core/ports/src/connector-client.d.ts +48 -4
  97. package/dist/core/ports/src/connector-client.js +17 -0
  98. package/dist/core/ports/src/definition-store.d.ts +23 -2
  99. package/dist/core/ports/src/harness-bridge-server.d.ts +12 -3
  100. package/dist/core/ports/src/harness-sign-in-command.d.ts +27 -0
  101. package/dist/core/ports/src/harness-sign-in-command.js +31 -0
  102. package/dist/core/ports/src/harness.d.ts +46 -13
  103. package/dist/core/ports/src/harness.js +1 -1
  104. package/dist/core/ports/src/host-settings-store.d.ts +116 -0
  105. package/dist/core/ports/src/host-settings-store.js +106 -0
  106. package/dist/core/ports/src/index.d.ts +18 -10
  107. package/dist/core/ports/src/index.js +15 -7
  108. package/dist/core/ports/src/instruction-trust-store.d.ts +81 -0
  109. package/dist/core/ports/src/instruction-trust-store.js +43 -0
  110. package/dist/core/ports/src/integration.d.ts +71 -7
  111. package/dist/core/ports/src/integration.js +22 -4
  112. package/dist/core/ports/src/llm-provider.d.ts +3 -1
  113. package/dist/core/ports/src/llm-provider.js +3 -0
  114. package/dist/core/ports/src/password-hasher.d.ts +36 -20
  115. package/dist/core/ports/src/port-versions.d.ts +7 -4
  116. package/dist/core/ports/src/port-versions.js +6 -0
  117. package/dist/core/ports/src/program-probe.d.ts +25 -2
  118. package/dist/core/ports/src/program-probe.js +1 -1
  119. package/dist/core/ports/src/provider-default-base-url.d.ts +10 -0
  120. package/dist/core/ports/src/provider-default-base-url.js +18 -0
  121. package/dist/core/ports/src/record-store.d.ts +17 -0
  122. package/dist/core/ports/src/record-store.js +70 -0
  123. package/dist/core/ports/src/run-executor.d.ts +5 -4
  124. package/dist/core/ports/src/run-target-not-found.d.ts +34 -0
  125. package/dist/core/ports/src/run-target-not-found.js +41 -0
  126. package/dist/core/ports/src/sandbox-setting-store.d.ts +68 -0
  127. package/dist/core/ports/src/sandbox-setting-store.js +33 -0
  128. package/dist/core/ports/src/sandbox.d.ts +130 -13
  129. package/dist/core/ports/src/sandbox.js +38 -2
  130. package/dist/core/ports/src/secrets.d.ts +73 -0
  131. package/dist/core/ports/src/secrets.js +56 -0
  132. package/dist/core/ports/src/tool-approval-store.d.ts +50 -8
  133. package/dist/core/ports/src/tool-approval-store.js +59 -0
  134. package/dist/core/ports/src/vcs-status.d.ts +8 -0
  135. package/dist/core/ports/src/vcs-status.js +90 -0
  136. package/dist/core/std/src/amount.d.ts +13 -0
  137. package/dist/core/std/src/amount.js +22 -0
  138. package/dist/core/std/src/hidden-characters.d.ts +19 -0
  139. package/dist/core/std/src/hidden-characters.js +54 -0
  140. package/dist/core/std/src/index.d.ts +5 -0
  141. package/dist/core/std/src/index.js +5 -0
  142. package/dist/core/std/src/public-suffixes.generated.d.ts +9 -0
  143. package/dist/core/std/src/public-suffixes.generated.js +10429 -0
  144. package/dist/core/std/src/registrable-domain.d.ts +10 -0
  145. package/dist/core/std/src/registrable-domain.js +62 -0
  146. package/dist/core/std/src/secret-variable-name.d.ts +12 -0
  147. package/dist/core/std/src/secret-variable-name.js +34 -0
  148. package/dist/core/std/src/site-name.d.ts +35 -0
  149. package/dist/core/std/src/site-name.js +111 -0
  150. package/dist/core/std/src/url-host.d.ts +35 -0
  151. package/dist/core/std/src/url-host.js +170 -0
  152. package/dist/testing/integration/src/load.js +3 -1
  153. package/package.json +2 -2
@@ -1,19 +1,23 @@
1
1
  export { type AgentPlacementKey, type AgentPlacementRecord, type AgentPlacementStore, agentPlacementStoreVersion, isAgentPlacementFor, } from "./agent-placement-store.js";
2
- export { type BlobRef, type BlobStore, blobStoreVersion } from "./blob-store.js";
2
+ export { AgentRunsNotAvailable, isAgentRunsNotAvailable } from "./agent-runs-not-available.js";
3
+ export { type BlobRef, type BlobStore, blobStoreVersion, checkBlobMediaType, isBlobHash, } from "./blob-store.js";
3
4
  export { CantTryError, isCantTryError } from "./cant-try-error.js";
4
5
  export type { ChatMessage, ChatParams, ChatRequest, ChatResponse, ChatStreamEvent, ProviderReplay, ToolCall, ToolDefinition, } from "./chat.js";
5
6
  export { type Clock, clockVersion } from "./clock.js";
6
7
  export { type ConnectionKey, type ConnectionSettingsRecord, type ConnectionSettingsStore, connectionSettingsStoreVersion, } from "./connection-settings-store.js";
7
- export { type ConnectorCallOptions, type ConnectorClient, type ConnectorConfig, type ConnectorFactory, type ConnectorFactoryContext, type ConnectorPin, type ConnectorTool, type ConnectorTransport, connectorClientVersion, type ToolRisk, type TrustGrant, } from "./connector-client.js";
8
+ export { type ConnectorCallOptions, type ConnectorClient, type ConnectorConfig, type ConnectorFactory, type ConnectorFactoryContext, type ConnectorPin, type ConnectorTool, type ConnectorTransport, connectorClientVersion, passesNameRule, type ToolRisk, type TrustGrant, } from "./connector-client.js";
8
9
  export { type Coordination, type CounterResult, coordinationVersion, type Lease, type WindowCount, } from "./coordination.js";
9
- export { checkPublicWorkspacePath, checkWorkspacePath, type DefinitionSource, type DefinitionStore, type DefinitionWatch, type DefinitionWatchListener, definitionStoreVersion, type ExpectedContent, isPrivateWorkspacePath, isUnreadableWorkspaceFolderError, segmentAsOpened, UnreadableWorkspaceFolderError, type WorkspaceFileChange, type WriteOptions, type WriteResult, } from "./definition-store.js";
10
+ export { checkPublicWorkspacePath, checkWorkspacePath, type DefinitionSource, type DefinitionStore, type DefinitionWatch, type DefinitionWatchListener, definitionStoreVersion, type ExpectedContent, isPrivateWorkspacePath, isUnreadableWorkspaceFolderError, type RemoveOptions, type RemoveResult, segmentAsOpened, UnreadableWorkspaceFolderError, type WorkspaceFileChange, type WriteOptions, type WriteResult, } from "./definition-store.js";
10
11
  export { type Digest, digestVersion } from "./digest.js";
11
12
  export { type FolderEntriesOptions, type FolderEntry, type FolderReader, folderReaderVersion, } from "./folder-reader.js";
12
- export { addHarnessEnvironment, type Harness, type HarnessBridge, type HarnessDetection, type HarnessEvent, type HarnessInput, type HarnessRun, type HarnessSignIn, type HarnessTask, harnessBridgeTokenHeader, harnessVersion, } from "./harness.js";
13
+ export { addHarnessEnvironment, type Harness, type HarnessBridge, type HarnessDetection, type HarnessDetectOptions, type HarnessEvent, type HarnessInput, type HarnessRun, type HarnessSignIn, type HarnessTask, harnessBridgeTokenHeader, harnessVersion, } from "./harness.js";
13
14
  export { type BridgeApprovalDecision, type BridgeApprovalRequest, type BridgeApprovals, type BridgeCallCharge, type BridgeEvent, type BridgeProvider, type BridgeProviderAccess, type BridgeRecorder, type BridgeToolCheck, type BridgeToolResult, type BridgeTools, bridgeCallCharge, bridgeCallCost, type HarnessBridgeOptions, type HarnessBridgeServer, harnessBridgeServerVersion, type OpenHarnessBridge, } from "./harness-bridge-server.js";
15
+ export { type SignInShell, signInCommandText } from "./harness-sign-in-command.js";
16
+ export { changeSavedHostSettings, type HostSettingsStore, type HostSettingValue, type HostSettingValues, hostSettingsMaxBytes, hostSettingsStoreVersion, isHostSettingKey, readSavedHostSettings, type SavedHostSettingsChange, } from "./host-settings-store.js";
14
17
  export { type HttpClient, httpClientVersion } from "./http-client.js";
15
18
  export { type IdGenerator, idGeneratorVersion } from "./id-generator.js";
16
- export { type Integration, type IntegrationConnection, type IntegrationHost, type IntegrationHttpClient, type IntegrationRequestInit, type IntegrationTool, integrationVersion, maxIntegrationWaitMs, type SecretPlacement, } from "./integration.js";
19
+ export { type InstructionChanges, type InstructionPin, type InstructionTrustKey, type InstructionTrustRecord, type InstructionTrustStore, instructionTrustStoreVersion, isInstructionTrustFor, } from "./instruction-trust-store.js";
20
+ export { type AuthPlacement, type Integration, type IntegrationConnection, type IntegrationHost, type IntegrationHttpClient, type IntegrationRequestInit, type IntegrationTool, integrationVersion, maxIntegrationWaitMs, type SecretPlacement, SignInNeededError, type SignInPlacement, type SignInTokens, } from "./integration.js";
17
21
  export { type KnowledgeCapabilities, type KnowledgeDoc, type KnowledgeHit, type KnowledgeProvider, type KnowledgeProviderContext, type KnowledgeProviderFactory, knowledgeProviderVersion, } from "./knowledge-provider.js";
18
22
  export { type LlmCache, llmCacheVersion } from "./llm-cache.js";
19
23
  export { isModelCallError, isModelOutOfMemory, isVendorErrorText, type LlmCapabilities, type LlmProvider, type LlmProviderFactory, llmProviderVersion, ModelCallError, type ModelCallErrorReason, modelCallErrorReasons, type ProviderConfig, type ProviderFactoryContext, VendorErrorText, } from "./llm-provider.js";
@@ -21,17 +25,21 @@ export { type ModelPrice, priceOf } from "./model-price.js";
21
25
  export { type PasswordHasher, passwordHasherVersion } from "./password-hasher.js";
22
26
  export { checkPluginFiles, checkPluginId, type PlacePluginOptions, type PluginFolderWriter, type PluginPlacement, pluginFolderWriterVersion, } from "./plugin-folder-writer.js";
23
27
  export { type PortName, portVersions } from "./port-versions.js";
24
- export { type ProgramProbe, type ProgramProbeResult, programProbeVersion, } from "./program-probe.js";
25
- export { type CurrentRecord, compactedChanges, foldRecords, type RecordChange, type RecordStore, recordStoreVersion, } from "./record-store.js";
28
+ export { type ProgramProbe, type ProgramProbeResult, type ProgramQuestion, type ProgramSettingsFolder, programProbeVersion, } from "./program-probe.js";
29
+ export { defaultBaseUrl } from "./provider-default-base-url.js";
30
+ export { type CurrentRecord, compactedChanges, foldRecords, formatRecordLines, parseRecordLines, type RecordChange, type RecordStore, recordStoreVersion, } from "./record-store.js";
26
31
  export { type FolderSize, type ProcessUsage, type ResourceProbe, resourceProbeVersion, } from "./resource-probe.js";
27
32
  export { type ChatAgentSettings, type ChatTurnRefusal, type ChatTurnRequest, type ChatTurnResponse, type ChatTurnSkip, type EngineConnection, type EngineConnectionState, type RunEventListener, type RunExecutor, type RunSubscription, runExecutorVersion, type SendOptions, type StartAgentRequest, type StartRunRequest, } from "./run-executor.js";
28
33
  export { type AdapterFailure, adapterFailures, isRunFailureError, RunFailureError, } from "./run-failure-error.js";
29
34
  export { type AppendOptions, type AppendResult, checkRunAppend, checkRunId, compareRunSummaries, formatLogLines, isRunId, matchesRunFilter, parseLogLines, type RunFilter, type RunLockRecord, type RunSnapshot, type RunStore, runLockFormat, runLockStaleAfterMs, runLockTakeoverStaleAfterMs, runStoreVersion, startedAtOrAfter, } from "./run-store.js";
30
- export { type Sandbox, type SandboxBlock, type SandboxBlockListener, type SandboxCapabilities, type SandboxCheck, type SandboxCommand, type SandboxExit, type SandboxFence, type SandboxFileAccess, type SandboxNetwork, type SandboxProcess, type SandboxProfile, type SandboxSession, type SandboxStrength, type SandboxUnavailableReason, sandboxUnavailableReasons, sandboxVersion, } from "./sandbox.js";
35
+ export { isRunTargetNotFound, type RunTargetKind, RunTargetNotFound, } from "./run-target-not-found.js";
36
+ export { type Sandbox, type SandboxBlock, type SandboxBlockListener, type SandboxBridge, type SandboxCapabilities, type SandboxCheck, type SandboxCommand, type SandboxExit, type SandboxFence, type SandboxFileAccess, type SandboxFix, type SandboxNetwork, type SandboxPackageManager, type SandboxProcess, type SandboxProfile, type SandboxSession, type SandboxStrength, type SandboxUnavailableReason, sandboxPackageManagers, sandboxUnavailableReasons, sandboxVersion, } from "./sandbox.js";
37
+ export { isSandboxSetting, type SandboxBackendId, type SandboxSetting, type SandboxSettingStore, sandboxBackendIds, sandboxSettingStoreVersion, } from "./sandbox-setting-store.js";
31
38
  export { type ScheduledTimer, type Scheduler, type SchedulerFactory, type SchedulerListener, schedulerVersion, } from "./scheduler.js";
32
- export { describeSecretName, halonicSecretNames, isHalonicSecretName, isPluginSecretName, isQuotableSecretName, isSecretName, maxSecretNameLength, pluginSecretNamePrefix, type Secrets, secretKey, secretsVersion, tokenNamePrefix, workspaceSecrets, } from "./secrets.js";
39
+ export { checkSecretValue, describeSecretName, halonicSecretNames, isHalonicSecretName, isPluginSecretName, isQuotableSecretName, isSecretName, maxSecretNameLength, maxSecretValueLength, pluginSecretNamePrefix, pluginSecretSeparator, pluginSecrets, type SecretStore, type Secrets, secretKey, secretsVersion, tokenNamePrefix, workspaceSecrets, } from "./secrets.js";
33
40
  export { type TokenStore, tokenStoreVersion } from "./token-store.js";
34
- export { isUnreadableToolApprovalError, type ListedToolFingerprint, type ListedToolText, maxWaitingVersions, type ToolApproval, type ToolApprovalKey, type ToolApprovalStore, type ToolServer, toolApprovalStoreVersion, UnreadableToolApprovalError, type WaitingVersion, type WrittenDigest, } from "./tool-approval-store.js";
41
+ export { isUnreadableToolApprovalError, keptWaitingVersions, type ListedToolFingerprint, type ListedToolText, listedToolFingerprintPattern, maxWaitingTools, maxWaitingVersions, type ToolApproval, type ToolApprovalKey, type ToolApprovalStore, type ToolServer, toolApprovalStoreVersion, UnreadableToolApprovalError, type WaitingVersion, type WrittenDigest, waitingVersionKeptMs, } from "./tool-approval-store.js";
35
42
  export { type TrustOrigin, type TrustRecord, type TrustStore, trustStoreVersion, } from "./trust-store.js";
36
43
  export { type UnfencedRunConsent, type UnfencedRunConsentStore, unfencedRunConsentStoreVersion, } from "./unfenced-run-consent-store.js";
37
44
  export { checkCommitId, checkProposalRef, unversionedFolders, type Vcs, type VcsApplyOptions, type VcsChange, type VcsCommit, type VcsCommitVersionOptions, type VcsCommitWorktreeOptions, type VcsDiffStatus, type VcsFileDiff, type VcsFileStatus, type VcsStatus, type VcsWorktree, vcsVersion, } from "./vcs.js";
45
+ export { parseStatus } from "./vcs-status.js";
@@ -1,18 +1,22 @@
1
1
  export { agentPlacementStoreVersion, isAgentPlacementFor, } from "./agent-placement-store.js";
2
- export { blobStoreVersion } from "./blob-store.js";
2
+ export { AgentRunsNotAvailable, isAgentRunsNotAvailable } from "./agent-runs-not-available.js";
3
+ export { blobStoreVersion, checkBlobMediaType, isBlobHash, } from "./blob-store.js";
3
4
  export { CantTryError, isCantTryError } from "./cant-try-error.js";
4
5
  export { clockVersion } from "./clock.js";
5
6
  export { connectionSettingsStoreVersion, } from "./connection-settings-store.js";
6
- export { connectorClientVersion, } from "./connector-client.js";
7
+ export { connectorClientVersion, passesNameRule, } from "./connector-client.js";
7
8
  export { coordinationVersion, } from "./coordination.js";
8
9
  export { checkPublicWorkspacePath, checkWorkspacePath, definitionStoreVersion, isPrivateWorkspacePath, isUnreadableWorkspaceFolderError, segmentAsOpened, UnreadableWorkspaceFolderError, } from "./definition-store.js";
9
10
  export { digestVersion } from "./digest.js";
10
11
  export { folderReaderVersion, } from "./folder-reader.js";
11
12
  export { addHarnessEnvironment, harnessBridgeTokenHeader, harnessVersion, } from "./harness.js";
12
13
  export { bridgeCallCharge, bridgeCallCost, harnessBridgeServerVersion, } from "./harness-bridge-server.js";
14
+ export { signInCommandText } from "./harness-sign-in-command.js";
15
+ export { changeSavedHostSettings, hostSettingsMaxBytes, hostSettingsStoreVersion, isHostSettingKey, readSavedHostSettings, } from "./host-settings-store.js";
13
16
  export { httpClientVersion } from "./http-client.js";
14
17
  export { idGeneratorVersion } from "./id-generator.js";
15
- export { integrationVersion, maxIntegrationWaitMs, } from "./integration.js";
18
+ export { instructionTrustStoreVersion, isInstructionTrustFor, } from "./instruction-trust-store.js";
19
+ export { integrationVersion, maxIntegrationWaitMs, SignInNeededError, } from "./integration.js";
16
20
  export { knowledgeProviderVersion, } from "./knowledge-provider.js";
17
21
  export { llmCacheVersion } from "./llm-cache.js";
18
22
  export { isModelCallError, isModelOutOfMemory, isVendorErrorText, llmProviderVersion, ModelCallError, modelCallErrorReasons, VendorErrorText, } from "./llm-provider.js";
@@ -21,16 +25,20 @@ export { passwordHasherVersion } from "./password-hasher.js";
21
25
  export { checkPluginFiles, checkPluginId, pluginFolderWriterVersion, } from "./plugin-folder-writer.js";
22
26
  export { portVersions } from "./port-versions.js";
23
27
  export { programProbeVersion, } from "./program-probe.js";
24
- export { compactedChanges, foldRecords, recordStoreVersion, } from "./record-store.js";
28
+ export { defaultBaseUrl } from "./provider-default-base-url.js";
29
+ export { compactedChanges, foldRecords, formatRecordLines, parseRecordLines, recordStoreVersion, } from "./record-store.js";
25
30
  export { resourceProbeVersion, } from "./resource-probe.js";
26
31
  export { runExecutorVersion, } from "./run-executor.js";
27
32
  export { adapterFailures, isRunFailureError, RunFailureError, } from "./run-failure-error.js";
28
33
  export { checkRunAppend, checkRunId, compareRunSummaries, formatLogLines, isRunId, matchesRunFilter, parseLogLines, runLockFormat, runLockStaleAfterMs, runLockTakeoverStaleAfterMs, runStoreVersion, startedAtOrAfter, } from "./run-store.js";
29
- export { sandboxUnavailableReasons, sandboxVersion, } from "./sandbox.js";
34
+ export { isRunTargetNotFound, RunTargetNotFound, } from "./run-target-not-found.js";
35
+ export { sandboxPackageManagers, sandboxUnavailableReasons, sandboxVersion, } from "./sandbox.js";
36
+ export { isSandboxSetting, sandboxBackendIds, sandboxSettingStoreVersion, } from "./sandbox-setting-store.js";
30
37
  export { schedulerVersion, } from "./scheduler.js";
31
- export { describeSecretName, halonicSecretNames, isHalonicSecretName, isPluginSecretName, isQuotableSecretName, isSecretName, maxSecretNameLength, pluginSecretNamePrefix, secretKey, secretsVersion, tokenNamePrefix, workspaceSecrets, } from "./secrets.js";
38
+ export { checkSecretValue, describeSecretName, halonicSecretNames, isHalonicSecretName, isPluginSecretName, isQuotableSecretName, isSecretName, maxSecretNameLength, maxSecretValueLength, pluginSecretNamePrefix, pluginSecretSeparator, pluginSecrets, secretKey, secretsVersion, tokenNamePrefix, workspaceSecrets, } from "./secrets.js";
32
39
  export { tokenStoreVersion } from "./token-store.js";
33
- export { isUnreadableToolApprovalError, maxWaitingVersions, toolApprovalStoreVersion, UnreadableToolApprovalError, } from "./tool-approval-store.js";
40
+ export { isUnreadableToolApprovalError, keptWaitingVersions, listedToolFingerprintPattern, maxWaitingTools, maxWaitingVersions, toolApprovalStoreVersion, UnreadableToolApprovalError, waitingVersionKeptMs, } from "./tool-approval-store.js";
34
41
  export { trustStoreVersion, } from "./trust-store.js";
35
42
  export { unfencedRunConsentStoreVersion, } from "./unfenced-run-consent-store.js";
36
43
  export { checkCommitId, checkProposalRef, unversionedFolders, vcsVersion, } from "./vcs.js";
44
+ export { parseStatus } from "./vcs-status.js";
@@ -0,0 +1,81 @@
1
+ /** Version of the {@link InstructionTrustStore} port. A breaking change bumps it and comes with an ADR. */
2
+ export declare const instructionTrustStoreVersion = 1;
3
+ /** What a run's instructions were: a digest per file, and one digest for all of them. */
4
+ export interface InstructionPin {
5
+ /** The digest of the whole set, so two runs with the same instructions share it. */
6
+ readonly digest: string;
7
+ /** Each file's `sha256:` digest, by file name. */
8
+ readonly files: Readonly<Record<string, string>>;
9
+ }
10
+ /** How a set of instructions differs from a trusted pin. */
11
+ export interface InstructionChanges {
12
+ readonly added: readonly string[];
13
+ readonly removed: readonly string[];
14
+ readonly changed: readonly string[];
15
+ }
16
+ /** Which agent's instructions a trusted pin is for. */
17
+ export interface InstructionTrustKey {
18
+ /** The workspace's resolved real path, as in a `TrustRecord`. */
19
+ location: string;
20
+ /** The agent's id in the workspace. */
21
+ agent: string;
22
+ }
23
+ /**
24
+ * The instructions a person trusted for one agent (requirement
25
+ * `ports.instruction-trust-store`): the pin of its `AGENTS.md` and skills as
26
+ * they were when the person said yes. Without a record, nothing is trusted
27
+ * and a person is asked.
28
+ *
29
+ * @example
30
+ * const trusted: InstructionTrustRecord = {
31
+ * location: "/workspaces/acme",
32
+ * agent: "coder",
33
+ * pin: { digest: "sha256:9f86d0…", files: { "AGENTS.md": "sha256:2c26b4…" } },
34
+ * grantedAt: "2026-11-15T10:00:00.000Z",
35
+ * };
36
+ */
37
+ export interface InstructionTrustRecord extends InstructionTrustKey {
38
+ /** The instructions the person trusted. */
39
+ pin: InstructionPin;
40
+ /** When the person trusted them, as ISO text. */
41
+ grantedAt: string;
42
+ }
43
+ /**
44
+ * Each agent's trusted instructions, in the user's profile next to the trust
45
+ * records: the profile folder for the CLI and `serve`, the app data folder
46
+ * for the desktop app, memory for tests and the browser demo. **Never inside
47
+ * a workspace**, so an agent that edits its own instructions can't also trust
48
+ * them.
49
+ *
50
+ * The port only stores pins. `instructionTrust` in `core/app` compares one
51
+ * with the instructions a run has, and the engine asks. Only a person trusts
52
+ * instructions: no tool the model can call reaches this store.
53
+ *
54
+ * A record that exists but can't be read makes `get` throw, never return
55
+ * `null`: the caller then asks the person, never trusts, and says why. The
56
+ * error names the record's key, and `remove` still deletes it.
57
+ */
58
+ export interface InstructionTrustStore {
59
+ /** The trusted instructions for one agent, or `null` when there are none. */
60
+ get(key: InstructionTrustKey): Promise<InstructionTrustRecord | null>;
61
+ /** Saves trusted instructions, replacing any with the same key. */
62
+ save(record: InstructionTrustRecord): Promise<void>;
63
+ /**
64
+ * Deletes the trusted instructions for one agent, even a record that can't
65
+ * be read. Removing a record that isn't there is not an error.
66
+ */
67
+ remove(key: InstructionTrustKey): Promise<void>;
68
+ }
69
+ /**
70
+ * Whether `value`, as read back from a store, is valid trusted instructions
71
+ * for `key`: exactly the fields of an {@link InstructionTrustRecord}, the key
72
+ * asked for, a pin whose `digest` and every file digest are in `sha256:` form,
73
+ * and a time that is text. Anything else is a damaged or borrowed record, such
74
+ * as a hand edit or a file copied from another agent, and must never count as
75
+ * trust. Every adapter checks what it reads with this, and the service in
76
+ * `core/app` checks what an adapter gives back with it again.
77
+ *
78
+ * @example
79
+ * isInstructionTrustFor(key, JSON.parse(text)); // false for `{ ...record, trusted: true }`
80
+ */
81
+ export declare function isInstructionTrustFor(key: InstructionTrustKey, value: unknown): value is InstructionTrustRecord;
@@ -0,0 +1,43 @@
1
+ /** Version of the {@link InstructionTrustStore} port. A breaking change bumps it and comes with an ADR. */
2
+ export const instructionTrustStoreVersion = 1;
3
+ const recordFields = ["location", "agent", "pin", "grantedAt"];
4
+ const pinFields = ["digest", "files"];
5
+ const digestPattern = /^sha256:[0-9a-f]{64}$/u;
6
+ /** Whether `value` is a plain object with exactly `fields`, each its own property. */
7
+ function hasExactlyFields(value, fields) {
8
+ if (typeof value !== "object" || value === null || Array.isArray(value))
9
+ return false;
10
+ return (Object.keys(value).length === fields.length &&
11
+ fields.every((field) => Object.hasOwn(value, field)));
12
+ }
13
+ function isPin(value) {
14
+ if (!hasExactlyFields(value, pinFields))
15
+ return false;
16
+ const digest = value["digest"];
17
+ const files = value["files"];
18
+ if (typeof digest !== "string" || !digestPattern.test(digest))
19
+ return false;
20
+ if (typeof files !== "object" || files === null || Array.isArray(files))
21
+ return false;
22
+ return Object.values(files).every((fileDigest) => typeof fileDigest === "string" && digestPattern.test(fileDigest));
23
+ }
24
+ /**
25
+ * Whether `value`, as read back from a store, is valid trusted instructions
26
+ * for `key`: exactly the fields of an {@link InstructionTrustRecord}, the key
27
+ * asked for, a pin whose `digest` and every file digest are in `sha256:` form,
28
+ * and a time that is text. Anything else is a damaged or borrowed record, such
29
+ * as a hand edit or a file copied from another agent, and must never count as
30
+ * trust. Every adapter checks what it reads with this, and the service in
31
+ * `core/app` checks what an adapter gives back with it again.
32
+ *
33
+ * @example
34
+ * isInstructionTrustFor(key, JSON.parse(text)); // false for `{ ...record, trusted: true }`
35
+ */
36
+ export function isInstructionTrustFor(key, value) {
37
+ if (!hasExactlyFields(value, recordFields))
38
+ return false;
39
+ return (value["location"] === key.location &&
40
+ value["agent"] === key.agent &&
41
+ typeof value["grantedAt"] === "string" &&
42
+ isPin(value["pin"]));
43
+ }
@@ -5,11 +5,13 @@ import type { LlmProvider, ProviderConfig } from "./llm-provider.js";
5
5
  import type { TokenStore } from "./token-store.js";
6
6
  /**
7
7
  * Version of the {@link Integration} and {@link IntegrationHost} ports. A
8
- * breaking change bumps it and comes with an ADR. An integration's permission
9
- * sheet names the version it was built against (`kit`), and the loader
10
- * refuses one built against another version.
8
+ * change bumps it and comes with an ADR. An integration's permission sheet
9
+ * names the version it was built against (`kit`), and the loader refuses one
10
+ * built against a newer version than this. Version 2 adds the sheet's
11
+ * `signIns` and {@link SignInPlacement}; an integration built for version 1
12
+ * runs unchanged.
11
13
  */
12
- export declare const integrationVersion = 1;
14
+ export declare const integrationVersion = 2;
13
15
  /**
14
16
  * The longest {@link IntegrationHost.wait} waits, in milliseconds (30 s). The
15
17
  * host enforces it; it is exported so an integration can tell in advance
@@ -50,10 +52,72 @@ export type SecretPlacement =
50
52
  as: "form";
51
53
  field: string;
52
54
  };
53
- /** A request as an integration sends it: a Web `RequestInit`, plus where to put a secret. */
55
+ /**
56
+ * Puts the access token of one sign-in the permission sheet declares into a
57
+ * request. Like a secret, the integration names the sign-in and the host
58
+ * places the token, only on the hosts the sheet lists for that sign-in. The
59
+ * integration can use the token but never read it. Only the access token can
60
+ * be placed: there is no `form` form.
61
+ */
62
+ export type SignInPlacement =
63
+ /** `Authorization: Bearer <value>`. */
64
+ {
65
+ signIn: string;
66
+ as: "bearer";
67
+ }
68
+ /** `<header>: <prefix><value>`. */
69
+ | {
70
+ signIn: string;
71
+ as: "header";
72
+ header: string;
73
+ prefix?: string;
74
+ };
75
+ /** A secret or a sign-in's access token, placed by the host. `secret` and `signIn` never appear together. */
76
+ export type AuthPlacement = SecretPlacement | SignInPlacement;
77
+ /** A request as an integration sends it: a Web `RequestInit`, plus where to put a secret or token. */
54
78
  export interface IntegrationRequestInit extends RequestInit {
55
- /** The secrets to place in this request. Each must be declared and allowed for the host. */
56
- auth?: SecretPlacement | readonly SecretPlacement[];
79
+ /** The secrets and sign-in tokens to place in this request. Each must be declared and allowed for the host. */
80
+ auth?: AuthPlacement | readonly AuthPlacement[];
81
+ }
82
+ /**
83
+ * Fresh access tokens for one integration's sign-ins, on Halonic's side of
84
+ * the line. The kit asks it for a token to place; it is never given to an
85
+ * integration, so a token can't be read, only used.
86
+ */
87
+ export interface SignInTokens {
88
+ /**
89
+ * A token valid for at least 60 more seconds, refreshed if needed.
90
+ *
91
+ * @throws {SignInNeededError} when the sign-in isn't signed in, or the
92
+ * server no longer accepts its refresh token, so the user must sign in
93
+ * again. Any other failure, such as a network error, is thrown as it is.
94
+ */
95
+ access(signIn: string, signal?: AbortSignal): Promise<string>;
96
+ /**
97
+ * The server answered 401 to `value`. Counts only if `value` is the
98
+ * current token of that sign-in.
99
+ */
100
+ rejected(signIn: string, value: string): void;
101
+ /**
102
+ * Every value the secret filter must remove: access tokens not yet
103
+ * expired, the refresh token and the client secret. Synchronous, so it
104
+ * holds only what has been loaded: before the first `access` for a
105
+ * sign-in it holds nothing for it, and nothing has been placed yet.
106
+ */
107
+ filterValues(): readonly string[];
108
+ }
109
+ /**
110
+ * The user has to sign in (again) before the sign-in's token can be used.
111
+ * {@link SignInTokens.access} throws it when there is no sign-in yet or the
112
+ * server answered `invalid_grant` to the refresh token. The kit turns it into
113
+ * the refusal `sign-in-needed`; a failure that signing in wouldn't fix, such
114
+ * as a network error, is not this error.
115
+ */
116
+ export declare class SignInNeededError extends Error {
117
+ readonly name = "SignInNeededError";
118
+ /** The sign-in, as the sheet names it. */
119
+ readonly signIn: string;
120
+ constructor(signIn: string, options?: ErrorOptions);
57
121
  }
58
122
  /**
59
123
  * The only way an integration reaches the network. It sends only to the
@@ -1,13 +1,31 @@
1
1
  /**
2
2
  * Version of the {@link Integration} and {@link IntegrationHost} ports. A
3
- * breaking change bumps it and comes with an ADR. An integration's permission
4
- * sheet names the version it was built against (`kit`), and the loader
5
- * refuses one built against another version.
3
+ * change bumps it and comes with an ADR. An integration's permission sheet
4
+ * names the version it was built against (`kit`), and the loader refuses one
5
+ * built against a newer version than this. Version 2 adds the sheet's
6
+ * `signIns` and {@link SignInPlacement}; an integration built for version 1
7
+ * runs unchanged.
6
8
  */
7
- export const integrationVersion = 1;
9
+ export const integrationVersion = 2;
8
10
  /**
9
11
  * The longest {@link IntegrationHost.wait} waits, in milliseconds (30 s). The
10
12
  * host enforces it; it is exported so an integration can tell in advance
11
13
  * that a server asks for a longer pause and give up instead.
12
14
  */
13
15
  export const maxIntegrationWaitMs = 30_000;
16
+ /**
17
+ * The user has to sign in (again) before the sign-in's token can be used.
18
+ * {@link SignInTokens.access} throws it when there is no sign-in yet or the
19
+ * server answered `invalid_grant` to the refresh token. The kit turns it into
20
+ * the refusal `sign-in-needed`; a failure that signing in wouldn't fix, such
21
+ * as a network error, is not this error.
22
+ */
23
+ export class SignInNeededError extends Error {
24
+ name = "SignInNeededError";
25
+ /** The sign-in, as the sheet names it. */
26
+ signIn;
27
+ constructor(signIn, options) {
28
+ super(`The sign-in "${signIn}" needs the user to sign in again.`, options);
29
+ this.signIn = signIn;
30
+ }
31
+ }
@@ -46,7 +46,7 @@ export interface LlmProvider {
46
46
  stream?(request: ChatRequest): AsyncIterable<ChatStreamEvent>;
47
47
  }
48
48
  /** Every reason a model call can fail with, in {@link ModelCallErrorReason} order. */
49
- export declare const modelCallErrorReasons: readonly ["no-key", "offline", "model-missing", "model-no-tools", "out-of-memory", "key-refused", "out-of-credit", "provider-busy", "refused"];
49
+ export declare const modelCallErrorReasons: readonly ["no-key", "offline", "model-missing", "model-no-tools", "out-of-memory", "key-refused", "out-of-credit", "provider-busy", "refused", "local-only"];
50
50
  /**
51
51
  * Why a model call failed:
52
52
  * - `no-key`: the provider needs a key and its secret isn't set. A provider
@@ -65,6 +65,8 @@ export declare const modelCallErrorReasons: readonly ["no-key", "offline", "mode
65
65
  * - `provider-busy`: the provider is overloaded or asked the caller to slow
66
66
  * down, such as any other HTTP 429, a 5xx or Anthropic's 529.
67
67
  * - `refused`: anything else the provider turned down or failed on.
68
+ * - `local-only`: the workspace is local only (`privacy.localOnly: true`)
69
+ * and the model's provider isn't local, so the engine never called it.
68
70
  */
69
71
  export type ModelCallErrorReason = (typeof modelCallErrorReasons)[number];
70
72
  /**
@@ -11,6 +11,7 @@ export const modelCallErrorReasons = [
11
11
  "out-of-credit",
12
12
  "provider-busy",
13
13
  "refused",
14
+ "local-only",
14
15
  ];
15
16
  /**
16
17
  * The error an {@link LlmProvider} throws when a model call fails, so the
@@ -114,6 +115,8 @@ export function isVendorErrorText(value) {
114
115
  // messages they pass on. Lower case, matched anywhere in the text.
115
116
  const outOfMemoryPhrases = [
116
117
  "out of memory",
118
+ // Ollama's llama-server loader: "llama-server reported out-of-memory during startup: …".
119
+ "out-of-memory",
117
120
  "requires more system memory",
118
121
  "insufficient memory",
119
122
  "not enough memory",
@@ -1,26 +1,40 @@
1
1
  /** Version of the {@link PasswordHasher} port. A breaking change bumps it and comes with an ADR. */
2
2
  export declare const passwordHasherVersion = 1;
3
3
  /**
4
- * Hashes and checks the sign-in password. Every runtime uses scrypt from
5
- * `core/std`, so a hash made on your machine for a cloud
6
- * deployment verifies there.
4
+ * Hashes and checks the sign-in password.
7
5
  *
8
- * **The hash format** is self-describing text, the same on every adapter
9
- * (requirement `ports.password-hash-format` has a known-answer vector):
6
+ * **Two formats.** Each adapter makes exactly one format, and the target
7
+ * decides which: a hash verifies on any adapter of the same format. The
8
+ * hash is self-describing text, and each format has its own requirement with
9
+ * known-answer vectors:
10
10
  *
11
11
  * ```text
12
- * $scrypt$ln=<log2 N>,r=<r>,p=<p>$<salt>$<key>
12
+ * $scrypt$ln=<log2 N>,r=<r>,p=<p>$<salt>$<key> serve
13
+ * $pbkdf2-sha256-chain$i=<rounds>,n=<runs>$<salt>$<hash> cloud targets
13
14
  * ```
14
15
  *
16
+ * Cloud targets can't use scrypt: WebCrypto has no memory-hard hash, and a
17
+ * Worker has too little memory for scrypt at safe settings. So they chain
18
+ * PBKDF2-SHA256, each run's output being the next run's input, which costs
19
+ * an attacker the same per guess as one run of `i × n` rounds (HAL-136).
20
+ * The hash for a cloud target is made on your machine at deploy time, with
21
+ * the same adapter the Worker checks it with.
22
+ *
23
+ * **What both formats share:**
15
24
  * - The salt is exactly 16 random bytes from `crypto.getRandomValues`, and the
16
- * key exactly 32 bytes. Both are standard base64 without `=` padding; any
17
- * other length, or padding, makes the hash malformed.
18
- * - New hashes use ln=14, r=8, p=5. `verify`
19
- * accepts only ln 14 to 15, r exactly 8 and p 5 to 16. The upper bounds
20
- * keep a configured hash within a Worker's memory (ln=15 needs 32 MiB;
21
- * ln=20 would need 1 GiB).
25
+ * key or hash exactly 32 bytes. Both are standard base64 without `=`
26
+ * padding; any other length, or padding, makes the hash malformed.
22
27
  * - The password is normalised to Unicode NFC and then encoded as UTF-8, so
23
28
  * "é" typed as one character or as "e" plus an accent gives the same hash.
29
+ *
30
+ * **scrypt** (requirement `ports.password-hash-format`): new hashes use
31
+ * ln=14, r=8, p=5. `verify` accepts only ln 14 to 15, r exactly 8 and p 5 to
32
+ * 16. The upper bounds keep a configured hash within a Worker's memory
33
+ * (ln=15 needs 32 MiB; ln=20 would need 1 GiB).
34
+ *
35
+ * **Chained PBKDF2** (requirement `ports.password-hash-format-pbkdf2-chain`):
36
+ * new hashes use i=100000, n=6. `verify` accepts only i exactly 100000 (the
37
+ * most a Worker allows per run) and n 6 to 20.
24
38
  */
25
39
  export interface PasswordHasher {
26
40
  /** A new hash with its own salt and the current settings, safe to store. */
@@ -29,17 +43,19 @@ export interface PasswordHasher {
29
43
  * Whether the password matches the hash. Takes the same time whether it
30
44
  * does or not.
31
45
  *
32
- * @throws RangeError when the hash is malformed, in another format, or uses
33
- * settings outside the allowed range. A broken hash is a configuration
34
- * error, and returning `false` would hide it behind "wrong password".
46
+ * @throws RangeError when the hash is malformed, in another format (the
47
+ * other format above included), or uses settings outside the allowed
48
+ * range. A broken hash is a configuration error, and returning `false`
49
+ * would hide it behind "wrong password".
35
50
  */
36
51
  verify(password: string, hash: string): Promise<boolean>;
37
52
  /**
38
- * Whether the hash uses other settings than new hashes do (anything but
39
- * ln=14, r=8, p=5, above or below). The sign-in password hash is a
40
- * configured, read-only secret, so nothing replaces it automatically: the
41
- * host reports it, and the hash is replaced by setting the password again
42
- * (CLI).
53
+ * Whether the hash uses other settings than new hashes do (for scrypt
54
+ * anything but ln=14, r=8, p=5; for chained PBKDF2 any n but 6). The
55
+ * sign-in password hash is a configured, read-only secret, so nothing
56
+ * replaces it automatically: the host reports it, and the hash is replaced
57
+ * by setting the password again (CLI, or `halonic deploy` for a cloud
58
+ * target).
43
59
  *
44
60
  * @throws RangeError as {@link PasswordHasher.verify} does
45
61
  */
@@ -16,22 +16,25 @@ export declare const portVersions: {
16
16
  readonly DefinitionStore: 2;
17
17
  readonly Digest: 1;
18
18
  readonly FolderReader: 1;
19
- readonly Harness: 2;
19
+ readonly Harness: 3;
20
20
  readonly HarnessBridgeServer: 1;
21
+ readonly HostSettingsStore: 1;
21
22
  readonly HttpClient: 1;
22
23
  readonly IdGenerator: 1;
23
- readonly Integration: 1;
24
+ readonly InstructionTrustStore: 1;
25
+ readonly Integration: 2;
24
26
  readonly KnowledgeProvider: 1;
25
27
  readonly LlmCache: 1;
26
28
  readonly LlmProvider: 1;
27
29
  readonly PasswordHasher: 1;
28
30
  readonly PluginFolderWriter: 1;
29
- readonly ProgramProbe: 1;
31
+ readonly ProgramProbe: 2;
30
32
  readonly RecordStore: 2;
31
33
  readonly ResourceProbe: 1;
32
34
  readonly RunExecutor: 1;
33
35
  readonly RunStore: 1;
34
- readonly Sandbox: 5;
36
+ readonly Sandbox: 7;
37
+ readonly SandboxSettingStore: 1;
35
38
  readonly Scheduler: 1;
36
39
  readonly Secrets: 1;
37
40
  readonly TokenStore: 1;
@@ -9,8 +9,10 @@ import { digestVersion } from "./digest.js";
9
9
  import { folderReaderVersion } from "./folder-reader.js";
10
10
  import { harnessVersion } from "./harness.js";
11
11
  import { harnessBridgeServerVersion } from "./harness-bridge-server.js";
12
+ import { hostSettingsStoreVersion } from "./host-settings-store.js";
12
13
  import { httpClientVersion } from "./http-client.js";
13
14
  import { idGeneratorVersion } from "./id-generator.js";
15
+ import { instructionTrustStoreVersion } from "./instruction-trust-store.js";
14
16
  import { integrationVersion } from "./integration.js";
15
17
  import { knowledgeProviderVersion } from "./knowledge-provider.js";
16
18
  import { llmCacheVersion } from "./llm-cache.js";
@@ -23,6 +25,7 @@ import { resourceProbeVersion } from "./resource-probe.js";
23
25
  import { runExecutorVersion } from "./run-executor.js";
24
26
  import { runStoreVersion } from "./run-store.js";
25
27
  import { sandboxVersion } from "./sandbox.js";
28
+ import { sandboxSettingStoreVersion } from "./sandbox-setting-store.js";
26
29
  import { schedulerVersion } from "./scheduler.js";
27
30
  import { secretsVersion } from "./secrets.js";
28
31
  import { tokenStoreVersion } from "./token-store.js";
@@ -50,8 +53,10 @@ export const portVersions = {
50
53
  FolderReader: folderReaderVersion,
51
54
  Harness: harnessVersion,
52
55
  HarnessBridgeServer: harnessBridgeServerVersion,
56
+ HostSettingsStore: hostSettingsStoreVersion,
53
57
  HttpClient: httpClientVersion,
54
58
  IdGenerator: idGeneratorVersion,
59
+ InstructionTrustStore: instructionTrustStoreVersion,
55
60
  Integration: integrationVersion,
56
61
  KnowledgeProvider: knowledgeProviderVersion,
57
62
  LlmCache: llmCacheVersion,
@@ -64,6 +69,7 @@ export const portVersions = {
64
69
  RunExecutor: runExecutorVersion,
65
70
  RunStore: runStoreVersion,
66
71
  Sandbox: sandboxVersion,
72
+ SandboxSettingStore: sandboxSettingStoreVersion,
67
73
  Scheduler: schedulerVersion,
68
74
  Secrets: secretsVersion,
69
75
  TokenStore: tokenStoreVersion,
@@ -1,5 +1,5 @@
1
1
  /** Version of the {@link ProgramProbe} port. A breaking change bumps it and comes with an ADR. */
2
- export declare const programProbeVersion = 1;
2
+ export declare const programProbeVersion = 2;
3
3
  /**
4
4
  * What asking a program something answered. `missing`: no program of that
5
5
  * name is where Halonic looks for it. `ran`: it ran and ended, with what it
@@ -20,6 +20,26 @@ export type ProgramProbeResult = {
20
20
  path: string;
21
21
  error: string;
22
22
  };
23
+ /**
24
+ * The program's own settings folder, for a question about one agent's
25
+ * settings, such as whether that agent is signed in. `variable` is the
26
+ * environment variable that points the program at the folder, such as
27
+ * "CLAUDE_CONFIG_DIR"; `path` is the folder, an absolute path.
28
+ */
29
+ export interface ProgramSettingsFolder {
30
+ readonly variable: string;
31
+ readonly path: string;
32
+ }
33
+ /** What else a question to a program may say. */
34
+ export interface ProgramQuestion {
35
+ /**
36
+ * Asks the program about this settings folder instead of the person's
37
+ * own. A probe sets only this variable on top of what it always passes,
38
+ * and refuses a variable it doesn't know as `failed`, so this can't pass
39
+ * anything else to the program.
40
+ */
41
+ readonly settingsFolder?: ProgramSettingsFolder;
42
+ }
23
43
  /**
24
44
  * Finds a program on this machine and asks it something short, such as
25
45
  * `claude --version`, the way a harness's `detect()` needs (requirement
@@ -34,6 +54,9 @@ export type ProgramProbeResult = {
34
54
  * @example
35
55
  * const answer = await probe.ask("codex", ["--version"]);
36
56
  * if (answer.status === "missing") return { status: "missing" };
57
+ * const signIn = await probe.ask("codex", ["login", "status"], {
58
+ * settingsFolder: { variable: "CODEX_HOME", path: agentFolder },
59
+ * });
37
60
  */
38
61
  export interface ProgramProbe {
39
62
  /**
@@ -42,5 +65,5 @@ export interface ProgramProbe {
42
65
  *
43
66
  * @param program a bare name, such as "claude". A name with a path separator is `missing`.
44
67
  */
45
- ask(program: string, args: readonly string[]): Promise<ProgramProbeResult>;
68
+ ask(program: string, args: readonly string[], question?: ProgramQuestion): Promise<ProgramProbeResult>;
46
69
  }
@@ -1,2 +1,2 @@
1
1
  /** Version of the {@link ProgramProbe} port. A breaking change bumps it and comes with an ADR. */
2
- export const programProbeVersion = 1;
2
+ export const programProbeVersion = 2;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The address a provider of this type calls when it sets no `baseUrl`, or
3
+ * undefined when the type has no usual address. The adapters' presets and
4
+ * the cost rules both read this one table, so they can't drift apart.
5
+ *
6
+ * @example
7
+ * defaultBaseUrl("ollama"); // "http://localhost:11434/v1"
8
+ * defaultBaseUrl("openai-compatible"); // undefined
9
+ */
10
+ export declare function defaultBaseUrl(type: string): string | undefined;