@opengeni/runtime 0.7.0 → 0.11.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.
Files changed (49) hide show
  1. package/THIRD_PARTY_NOTICES +32 -0
  2. package/dist/agent-UMUIWWD2.js +8 -0
  3. package/dist/agent-UMUIWWD2.js.map +1 -0
  4. package/dist/chunk-4YJ5Z52Z.js +1789 -0
  5. package/dist/chunk-4YJ5Z52Z.js.map +1 -0
  6. package/dist/chunk-DPULLAJG.js +215 -0
  7. package/dist/chunk-DPULLAJG.js.map +1 -0
  8. package/dist/chunk-K4V4QYCL.js +37683 -0
  9. package/dist/chunk-K4V4QYCL.js.map +1 -0
  10. package/dist/chunk-PZ5AY32C.js +10 -0
  11. package/dist/chunk-PZ5AY32C.js.map +1 -0
  12. package/dist/chunk-YUAFQEFY.js +21522 -0
  13. package/dist/chunk-YUAFQEFY.js.map +1 -0
  14. package/dist/{index-DIiiwQY2.d.ts → index-D6yi-JcU.d.ts} +138 -15
  15. package/dist/index.d.ts +333 -122
  16. package/dist/index.js +8260 -349
  17. package/dist/index.js.map +1 -1
  18. package/dist/localSources-T3HZ6KY4.js +15 -0
  19. package/dist/localSources-T3HZ6KY4.js.map +1 -0
  20. package/dist/sandbox/index.d.ts +1 -1
  21. package/dist/sandbox/index.js +42 -5
  22. package/dist/skill-library.d.ts +74 -0
  23. package/dist/skill-library.js +18 -0
  24. package/dist/skill-library.js.map +1 -0
  25. package/package.json +13 -5
  26. package/src/bundled_hashicorp_terraform_skills/README.md +3 -3
  27. package/src/bundled_hashicorp_terraform_skills/checkov/SKILL.md +1 -1
  28. package/src/context-compaction.ts +421 -24
  29. package/src/history-sanitizer.ts +14 -5
  30. package/src/index.ts +1451 -304
  31. package/src/sandbox/channel-a.ts +535 -97
  32. package/src/sandbox/index.ts +36 -2
  33. package/src/sandbox/routing/routing-session.ts +10 -2
  34. package/src/sandbox/run-credentials.ts +818 -0
  35. package/src/sandbox/select.ts +3 -3
  36. package/src/sandbox/selfhosted/capabilities.ts +1 -1
  37. package/src/sandbox/selfhosted/op-stream.ts +40 -0
  38. package/src/sandbox/selfhosted/op-testing.ts +50 -3
  39. package/src/sandbox/selfhosted/session.ts +17 -4
  40. package/src/sandbox/selfhosted/testing.ts +1 -1
  41. package/src/sandbox/stream-port.ts +1 -1
  42. package/src/sandbox/stream-token.ts +1 -1
  43. package/src/sandbox/terminal-server.ts +6 -2
  44. package/src/sandbox/toolspace-token.ts +147 -0
  45. package/src/sandbox/turn-tool-cancellation.ts +940 -0
  46. package/src/skill-library.ts +323 -0
  47. package/dist/chunk-RYDCVTMW.js +0 -5531
  48. package/dist/chunk-RYDCVTMW.js.map +0 -1
  49. /package/src/{bundled_hashicorp_terraform_skills → bundled_skill_library}/azure-verified-modules/SKILL.md +0 -0
@@ -0,0 +1,15 @@
1
+ import {
2
+ applyLocalSourceManifestEntryToState,
3
+ applyLocalSourceManifestToState,
4
+ materializeLocalSourceManifest,
5
+ materializeLocalSourceManifestEntry
6
+ } from "./chunk-4YJ5Z52Z.js";
7
+ import "./chunk-K4V4QYCL.js";
8
+ import "./chunk-PZ5AY32C.js";
9
+ export {
10
+ applyLocalSourceManifestEntryToState,
11
+ applyLocalSourceManifestToState,
12
+ materializeLocalSourceManifest,
13
+ materializeLocalSourceManifestEntry
14
+ };
15
+ //# sourceMappingURL=localSources-T3HZ6KY4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,6 +1,6 @@
1
1
  export { collectSandboxEnvironment, parseExposedPorts } from '@opengeni/config';
2
2
  export { CAPABILITY_DESCRIPTORS, CapabilityDescriptor, DESKTOP_STREAM_PORT, StreamTokenPayload, StreamTokenPayload as StreamTokenPayloadType, TERMINAL_STREAM_PORT } from '@opengeni/contracts';
3
3
  import '@openai/agents/sandbox';
4
- export { A as ActiveBackendResolverDeps, a as ActiveBackendUnresolvableError, b as ActivePointer, B as BackendUnresolvableCode, C as ChannelAConflictError, c as ChannelAEmitter, d as ChannelAExecArgs, e as ChannelAExecResult, f as ChannelANotFoundError, g as ChannelASession, h as ChannelAUnsupportedError, i as ChannelAValidationError, j as ControlRpc, D as DEFAULT_DESKTOP_GEOMETRY, k as DISPLAY_STACK_TIMEOUT_MS, l as DesktopGeometry, m as DisplayStackError, n as DisplayStackUnsupportedError, E as EnsureDisplayStackOptions, o as EnsureDisplayStackResult, p as EnsureTerminalServerOptions, q as EnsureTerminalServerResult, r as EstablishedSandboxSession, s as ExposeStreamPortInput, t as ExposeStreamPortResult, u as ExposedPortEndpoint, F as FAULT_FIELD_WHAT_HAPPENED, v as FAULT_FIELD_WHAT_PRESERVED, w as FAULT_FIELD_WHAT_TO_TRY, x as FAULT_FIELD_WHICH_LAYER, L as LiveModalSandboxLeaseAttribution, M as MintStreamTokenInput, y as MockAgentResponder, z as MockAgentResponderOptions, G as MockExecHandler, H as ModalModuleLoader, I as ModalOrphanSweepResult, J as ModalSandboxAttribution, N as NEVER_SENT_DETAIL_KEY, K as NatsControlRpc, O as NatsOpStreamConnection, P as NatsOpStreamTransport, Q as NatsRequestConnection, S as NegotiationContext, T as NumstatEntry, U as OP_STREAM_ACK_INTERVAL_MS, V as OP_STREAM_DEFAULT_WINDOW_BYTES, W as OP_STREAM_RECONNECT_HOLD_MS, X as OP_STREAM_SILENCE_TIMEOUT_MS, Y as OpStreamExecOutcome, Z as OpStreamJournal, _ as OpStreamSubscription, $ as OpStreamTransport, a0 as OpStreamUnavailableError, a1 as PROVIDER_REGISTRY, a2 as ProviderConstructionContext, a3 as ProviderRegistration, a4 as REPOSITORY_DISCOVERY_LIMIT, a5 as RecordingArtifactMetadata, a6 as RecordingCodec, a7 as RecordingContentType, a8 as RecordingError, a9 as RecordingProcess, aa as RecordingUnavailableError, ab as RepositoryDiscoveryDegradedReason, ac as RepositoryDiscoveryResult, ad as ResolvedActiveBackend, ae as RoutableBackendSession, af as RoutableSandbox, ag as RoutingSandboxSession, ah as RoutingSandboxSessionDeps, ai as RoutingTransitionEvent, aj as RoutingUnsupportedError, ak as SELFHOSTED_DEFAULT_TIMEOUT_MS, al as SELFHOSTED_DRAINING_MAX_RETRIES, am as SELFHOSTED_EXEC_DRAINING_MAX_RETRIES, an as SELFHOSTED_IDEMPOTENT_READONLY_OPS, ao as SELFHOSTED_INFRASTRUCTURE_FAULT_CLASSES, ap as SELFHOSTED_NEVER_SENT_MAX_RETRIES, aq as SELFHOSTED_RECONNECT_WINDOW_MS, ar as SELFHOSTED_RELAY_STREAM_PATH, as as SELFHOSTED_RETRY_BACKOFF_BASE_MS, at as SELFHOSTED_RETRY_BACKOFF_CAP_MS, au as SELFHOSTED_RETRY_BACKOFF_FACTOR, av as SELFHOSTED_TIMEOUT_MAX_RETRIES, aw as STREAM_PORT, ax as STREAM_TOKEN_DEFAULT_TTL_SECONDS, ay as SandboxChannelAService, az as SandboxChannelAServiceOptions, aA as SandboxConfigError, aB as SandboxCreatedCallback, aC as SandboxProviderUnavailableError, aD as SandboxResumeStateUnavailableError, aE as SelfhostedApplyDiff, aF as SelfhostedControlError, aG as SelfhostedEditor, aH as SelfhostedEnrollment, aI as SelfhostedExecArgs, aJ as SelfhostedExecResult, aK as SelfhostedImageOutput, aL as SelfhostedLivenessState, aM as SelfhostedNegotiationInput, aN as SelfhostedOpObservation, aO as SelfhostedOpObserver, aP as SelfhostedOpStreamDeps, aQ as SelfhostedRelayConfig, aR as SelfhostedRetryClock, aS as SelfhostedRetryDecision, aT as SelfhostedSandboxClient, aU as SelfhostedSession, aV as SelfhostedSessionBuild, aW as SelfhostedSessionDeps, aX as SelfhostedSessionState, aY as SelfhostedUnavailableReason, aZ as StartRecordingInput, a_ as StreamPortUnavailableError, a$ as SwapTargetEstablishability, b0 as TERMINAL_SERVER_TIMEOUT_MS, b1 as TerminalServerError, b2 as TerminalServerUnsupportedError, b3 as agentErrorToControlError, b4 as assertDescriptorRegistryInvariants, b5 as assertProviderRegistryInvariants, b6 as assertSafeRelPath, b7 as backendSupportsOs, b8 as buildDisplayStackScript, b9 as buildSelfhostedBackendSession, ba as buildStreamUrl, bb as buildTerminalServerScript, bc as contentTypeForCodec, bd as createSandboxClient, be as createSandboxClientForBackend, bf as decideSelfhostedRetry, bg as decodeModalSnapshotId, bh as defaultSelfhostedRetryClock, bi as deletePriorPersistedSnapshot, bj as deleteRecordingArtifacts, bk as deserializeSandboxSessionStateEnvelope, bl as desktopCapableBackend, bm as drainingExhaustedError, bn as drainingMessage, bo as ensureDisplayStack, bp as ensureModalRegistryImage, bq as ensureTerminalServer, br as establishSandboxSessionFromEnvelope, bs as execDeadlineHint, bt as exposeStreamPort, bu as extForCodec, bv as inspectRecordingArtifact, bw as isExecSessionLostBanner, bx as isProviderSandboxNotFoundError, by as isSelfhostedProviderNotFoundError, bz as isWorkspaceEscapeError, bA as makeActiveBackendResolver, bB as mintStreamToken, bC as modalSandboxAttributionEnvironment, bD as modalSandboxAttributionTags, bE as negotiateCapabilities, bF as negotiateSelfhostedCapabilities, bG as nextDurableOpId, bH as offlineAgentError, bI as offlineControlResponse, bJ as opAckSubject, bK as opFrameSubject, bL as parseExecBannerSessionId, bM as parseNumstatZ, bN as parsePorcelainV2, bO as parseUnifiedPatch, bP as payloadTooLargeMessage, bQ as readWorkspaceArchiveFromEnvelopeSessionState, bR as recordingStorageKey, bS as renderSelfhostedFault, bT as restoredSandboxSessionStateFromEntry, bU as runWithToolCallCorrelation, bV as sandboxStateEntryFromRunState, bW as sanitizeOpIdToken, bX as selectBackend, bY as selfhostedFaultClass, bZ as selfhostedLiveness, b_ as selfhostedRetryBackoffMs, b$ as serializeEstablishedSandboxEnvelope, c0 as setSelfhostedApplyDiff, c1 as startRecording, c2 as stopRecording, c3 as stripExecBanner, c4 as subjectFor, c5 as swapTargetEstablishability, c6 as sweepModalOrphanSandboxes, c7 as tagModalSandbox, c8 as tearDownDisplayStack, c9 as tearDownTerminalServer, ca as terminateModalSandboxById, cb as timeoutAgentError, cc as timeoutControlResponse, cd as uploadRecordingArtifact, ce as verifyStreamToken } from '../index-DIiiwQY2.js';
4
+ export { A as ActiveBackendResolverDeps, b as ActiveBackendUnresolvableError, c as ActivePointer, B as BackendUnresolvableCode, C as ChannelAConflictError, d as ChannelAEmitter, e as ChannelAExecArgs, f as ChannelAExecResult, g as ChannelANotFoundError, h as ChannelASession, i as ChannelAUnavailableError, j as ChannelAUnsupportedError, k as ChannelAValidationError, l as ControlRpc, D as DEFAULT_DESKTOP_GEOMETRY, m as DISPLAY_STACK_TIMEOUT_MS, n as DesktopGeometry, o as DisplayStackError, p as DisplayStackUnsupportedError, E as EnsureDisplayStackOptions, q as EnsureDisplayStackResult, r as EnsureTerminalServerOptions, s as EnsureTerminalServerResult, t as EstablishedSandboxSession, u as ExposeStreamPortInput, v as ExposeStreamPortResult, w as ExposedPortEndpoint, F as FAULT_FIELD_WHAT_HAPPENED, x as FAULT_FIELD_WHAT_PRESERVED, y as FAULT_FIELD_WHAT_TO_TRY, z as FAULT_FIELD_WHICH_LAYER, L as LiveModalSandboxLeaseAttribution, M as MaterializeRunCredentialsOptions, G as MintStreamTokenInput, H as MockAgentResponder, I as MockAgentResponderOptions, J as MockExecHandler, K as ModalModuleLoader, N as ModalOrphanSweepResult, O as ModalSandboxAttribution, P as NEVER_SENT_DETAIL_KEY, Q as NatsControlRpc, S as NatsOpStreamConnection, T as NatsOpStreamTransport, U as NatsRequestConnection, V as NegotiationContext, W as NormalizedRunCredentialMaterial, X as NumstatEntry, Y as OP_STREAM_ACK_INTERVAL_MS, Z as OP_STREAM_DEFAULT_WINDOW_BYTES, _ as OP_STREAM_RECONNECT_HOLD_MS, $ as OP_STREAM_SILENCE_TIMEOUT_MS, a0 as OpStreamExecOutcome, a1 as OpStreamJournal, a2 as OpStreamSubscription, a3 as OpStreamTransport, a4 as OpStreamUnavailableError, a5 as PROVIDER_REGISTRY, a6 as ProviderConstructionContext, a7 as ProviderRegistration, a8 as REPOSITORY_DISCOVERY_LIMIT, a9 as RecordingArtifactMetadata, aa as RecordingCodec, ab as RecordingContentType, ac as RecordingError, ad as RecordingProcess, ae as RecordingUnavailableError, af as RepositoryDiscoveryDegradedReason, ag as RepositoryDiscoveryResult, ah as ResolvedActiveBackend, ai as RoutableBackendSession, aj as RoutableSandbox, ak as RoutingSandboxSession, al as RoutingSandboxSessionDeps, am as RoutingTransitionEvent, an as RoutingUnsupportedError, ao as RunCredentialCommandRunner, ap as RunCredentialCommandSession, aq as RunCredentialExpectedScope, R as RunCredentialSessionReady, ar as RunCredentialValidationError, as as SELFHOSTED_DEFAULT_TIMEOUT_MS, at as SELFHOSTED_DRAINING_MAX_RETRIES, au as SELFHOSTED_EXEC_DRAINING_MAX_RETRIES, av as SELFHOSTED_IDEMPOTENT_READONLY_OPS, aw as SELFHOSTED_INFRASTRUCTURE_FAULT_CLASSES, ax as SELFHOSTED_NEVER_SENT_MAX_RETRIES, ay as SELFHOSTED_RECONNECT_WINDOW_MS, az as SELFHOSTED_RELAY_STREAM_PATH, aA as SELFHOSTED_RETRY_BACKOFF_BASE_MS, aB as SELFHOSTED_RETRY_BACKOFF_CAP_MS, aC as SELFHOSTED_RETRY_BACKOFF_FACTOR, aD as SELFHOSTED_TIMEOUT_MAX_RETRIES, aE as STREAM_PORT, aF as STREAM_TOKEN_DEFAULT_TTL_SECONDS, aG as SandboxChannelAService, aH as SandboxChannelAServiceOptions, aI as SandboxConfigError, aJ as SandboxCreatedCallback, aK as SandboxProviderUnavailableError, aL as SandboxResumeStateUnavailableError, aM as SelfhostedApplyDiff, aN as SelfhostedControlError, aO as SelfhostedEditor, aP as SelfhostedEnrollment, aQ as SelfhostedExecArgs, aR as SelfhostedExecResult, aS as SelfhostedImageOutput, aT as SelfhostedLivenessState, aU as SelfhostedNegotiationInput, aV as SelfhostedOpObservation, aW as SelfhostedOpObserver, aX as SelfhostedOpStreamDeps, aY as SelfhostedRelayConfig, aZ as SelfhostedRetryClock, a_ as SelfhostedRetryDecision, a$ as SelfhostedSandboxClient, b0 as SelfhostedSession, b1 as SelfhostedSessionBuild, b2 as SelfhostedSessionDeps, b3 as SelfhostedSessionState, b4 as SelfhostedUnavailableReason, b5 as StartRecordingInput, b6 as StreamPortUnavailableError, b7 as SwapTargetEstablishability, b8 as TERMINAL_SERVER_TIMEOUT_MS, b9 as TerminalServerError, ba as TerminalServerUnsupportedError, bb as ToolspaceTokenPathError, bc as agentErrorToControlError, bd as assertDescriptorRegistryInvariants, be as assertProviderRegistryInvariants, bf as assertSafeRelPath, bg as backendSupportsOs, bh as buildDisplayStackScript, bi as buildSelfhostedBackendSession, bj as buildStreamUrl, bk as buildTerminalServerScript, bl as clearRunCredentials, bm as clearRunCredentialsForAttempt, bn as contentTypeForCodec, bo as createSandboxClient, bp as createSandboxClientForBackend, bq as decideSelfhostedRetry, br as decodeModalSnapshotId, bs as defaultSelfhostedRetryClock, bt as deletePriorPersistedSnapshot, bu as deleteRecordingArtifacts, bv as deserializeSandboxSessionStateEnvelope, bw as desktopCapableBackend, bx as drainingExhaustedError, by as drainingMessage, bz as ensureDisplayStack, bA as ensureModalRegistryImage, bB as ensureTerminalServer, bC as establishSandboxSessionFromEnvelope, bD as execDeadlineHint, bE as exposeStreamPort, bF as extForCodec, bG as inspectRecordingArtifact, bH as isExecSessionLostBanner, bI as isProviderSandboxNotFoundError, bJ as isSelfhostedProviderNotFoundError, bK as makeActiveBackendResolver, bL as materializeRunCredentials, bM as mintStreamToken, bN as modalSandboxAttributionEnvironment, bO as modalSandboxAttributionTags, bP as negotiateCapabilities, bQ as negotiateSelfhostedCapabilities, bR as nextDurableOpId, bS as normalizeRunCredentialsResolution, bT as offlineAgentError, bU as offlineControlResponse, bV as opAckSubject, bW as opFrameSubject, bX as parseExecBannerExitCode, bY as parseExecBannerSessionId, bZ as parseNumstatZ, b_ as parsePorcelainV2, b$ as parseUnifiedPatch, c0 as payloadTooLargeMessage, c1 as readWorkspaceArchiveFromEnvelopeSessionState, c2 as recordingStorageKey, c3 as renderSelfhostedFault, c4 as restoredSandboxSessionStateFromEntry, c5 as runCredentialPointerFile, c6 as runCredentialRoot, c7 as runWithToolCallCorrelation, c8 as sandboxStateEntryFromRunState, c9 as sanitizeOpIdToken, ca as selectBackend, cb as selfhostedFaultClass, cc as selfhostedLiveness, cd as selfhostedRetryBackoffMs, ce as serializeEstablishedSandboxEnvelope, cf as setSelfhostedApplyDiff, cg as startRecording, ch as stopRecording, ci as stripExecBanner, cj as subjectFor, ck as swapTargetEstablishability, cl as sweepModalOrphanSandboxes, cm as tagModalSandbox, cn as tearDownDisplayStack, co as tearDownTerminalServer, cp as terminateModalSandboxById, cq as timeoutAgentError, cr as timeoutControlResponse, cs as toolspaceTokenFileForSession, ct as toolspaceTokenFileFromEnvironment, cu as uploadRecordingArtifact, cv as verifyStreamToken, cw as withRunCredentialEnvironment, cx as withRunCredentialsClient, cy as withRunCredentialsSession, cz as withToolspaceTokenClient, cA as withToolspaceTokenEnvironment, cB as withToolspaceTokenSession } from '../index-D6yi-JcU.js';
5
5
  import 'modal';
6
6
  import '@opengeni/agent-proto';
@@ -3,6 +3,7 @@ import {
3
3
  CAPABILITY_DESCRIPTORS,
4
4
  ChannelAConflictError,
5
5
  ChannelANotFoundError,
6
+ ChannelAUnavailableError,
6
7
  ChannelAUnsupportedError,
7
8
  ChannelAValidationError,
8
9
  DEFAULT_DESKTOP_GEOMETRY,
@@ -29,6 +30,7 @@ import {
29
30
  RecordingUnavailableError,
30
31
  RoutingSandboxSession,
31
32
  RoutingUnsupportedError,
33
+ RunCredentialValidationError,
32
34
  SELFHOSTED_DEFAULT_TIMEOUT_MS,
33
35
  SELFHOSTED_DRAINING_MAX_RETRIES,
34
36
  SELFHOSTED_EXEC_DRAINING_MAX_RETRIES,
@@ -56,6 +58,7 @@ import {
56
58
  TERMINAL_STREAM_PORT,
57
59
  TerminalServerError,
58
60
  TerminalServerUnsupportedError,
61
+ ToolspaceTokenPathError,
59
62
  agentErrorToControlError,
60
63
  assertDescriptorRegistryInvariants,
61
64
  assertProviderRegistryInvariants,
@@ -65,6 +68,8 @@ import {
65
68
  buildSelfhostedBackendSession,
66
69
  buildStreamUrl,
67
70
  buildTerminalServerScript,
71
+ clearRunCredentials,
72
+ clearRunCredentialsForAttempt,
68
73
  collectSandboxEnvironment,
69
74
  contentTypeForCodec,
70
75
  createSandboxClient,
@@ -89,18 +94,20 @@ import {
89
94
  isExecSessionLostBanner,
90
95
  isProviderSandboxNotFoundError,
91
96
  isSelfhostedProviderNotFoundError,
92
- isWorkspaceEscapeError,
93
97
  makeActiveBackendResolver,
98
+ materializeRunCredentials,
94
99
  mintStreamToken,
95
100
  modalSandboxAttributionEnvironment,
96
101
  modalSandboxAttributionTags,
97
102
  negotiateCapabilities,
98
103
  negotiateSelfhostedCapabilities,
99
104
  nextDurableOpId,
105
+ normalizeRunCredentialsResolution,
100
106
  offlineAgentError,
101
107
  offlineControlResponse,
102
108
  opAckSubject,
103
109
  opFrameSubject,
110
+ parseExecBannerExitCode,
104
111
  parseExecBannerSessionId,
105
112
  parseExposedPorts,
106
113
  parseNumstatZ,
@@ -111,6 +118,8 @@ import {
111
118
  recordingStorageKey,
112
119
  renderSelfhostedFault,
113
120
  restoredSandboxSessionStateFromEntry,
121
+ runCredentialPointerFile,
122
+ runCredentialRoot,
114
123
  runWithToolCallCorrelation,
115
124
  sandboxStateEntryFromRunState,
116
125
  sanitizeOpIdToken,
@@ -132,14 +141,26 @@ import {
132
141
  terminateModalSandboxById,
133
142
  timeoutAgentError,
134
143
  timeoutControlResponse,
144
+ toolspaceTokenFileForSession,
145
+ toolspaceTokenFileFromEnvironment,
135
146
  uploadRecordingArtifact,
136
- verifyStreamToken
137
- } from "../chunk-RYDCVTMW.js";
147
+ verifyStreamToken,
148
+ withRunCredentialEnvironment,
149
+ withRunCredentialsClient,
150
+ withRunCredentialsSession,
151
+ withToolspaceTokenClient,
152
+ withToolspaceTokenEnvironment,
153
+ withToolspaceTokenSession
154
+ } from "../chunk-YUAFQEFY.js";
155
+ import "../chunk-4YJ5Z52Z.js";
156
+ import "../chunk-K4V4QYCL.js";
157
+ import "../chunk-PZ5AY32C.js";
138
158
  export {
139
159
  ActiveBackendUnresolvableError,
140
160
  CAPABILITY_DESCRIPTORS,
141
161
  ChannelAConflictError,
142
162
  ChannelANotFoundError,
163
+ ChannelAUnavailableError,
143
164
  ChannelAUnsupportedError,
144
165
  ChannelAValidationError,
145
166
  DEFAULT_DESKTOP_GEOMETRY,
@@ -166,6 +187,7 @@ export {
166
187
  RecordingUnavailableError,
167
188
  RoutingSandboxSession,
168
189
  RoutingUnsupportedError,
190
+ RunCredentialValidationError,
169
191
  SELFHOSTED_DEFAULT_TIMEOUT_MS,
170
192
  SELFHOSTED_DRAINING_MAX_RETRIES,
171
193
  SELFHOSTED_EXEC_DRAINING_MAX_RETRIES,
@@ -193,6 +215,7 @@ export {
193
215
  TERMINAL_STREAM_PORT,
194
216
  TerminalServerError,
195
217
  TerminalServerUnsupportedError,
218
+ ToolspaceTokenPathError,
196
219
  agentErrorToControlError,
197
220
  assertDescriptorRegistryInvariants,
198
221
  assertProviderRegistryInvariants,
@@ -202,6 +225,8 @@ export {
202
225
  buildSelfhostedBackendSession,
203
226
  buildStreamUrl,
204
227
  buildTerminalServerScript,
228
+ clearRunCredentials,
229
+ clearRunCredentialsForAttempt,
205
230
  collectSandboxEnvironment,
206
231
  contentTypeForCodec,
207
232
  createSandboxClient,
@@ -226,18 +251,20 @@ export {
226
251
  isExecSessionLostBanner,
227
252
  isProviderSandboxNotFoundError,
228
253
  isSelfhostedProviderNotFoundError,
229
- isWorkspaceEscapeError,
230
254
  makeActiveBackendResolver,
255
+ materializeRunCredentials,
231
256
  mintStreamToken,
232
257
  modalSandboxAttributionEnvironment,
233
258
  modalSandboxAttributionTags,
234
259
  negotiateCapabilities,
235
260
  negotiateSelfhostedCapabilities,
236
261
  nextDurableOpId,
262
+ normalizeRunCredentialsResolution,
237
263
  offlineAgentError,
238
264
  offlineControlResponse,
239
265
  opAckSubject,
240
266
  opFrameSubject,
267
+ parseExecBannerExitCode,
241
268
  parseExecBannerSessionId,
242
269
  parseExposedPorts,
243
270
  parseNumstatZ,
@@ -248,6 +275,8 @@ export {
248
275
  recordingStorageKey,
249
276
  renderSelfhostedFault,
250
277
  restoredSandboxSessionStateFromEntry,
278
+ runCredentialPointerFile,
279
+ runCredentialRoot,
251
280
  runWithToolCallCorrelation,
252
281
  sandboxStateEntryFromRunState,
253
282
  sanitizeOpIdToken,
@@ -269,7 +298,15 @@ export {
269
298
  terminateModalSandboxById,
270
299
  timeoutAgentError,
271
300
  timeoutControlResponse,
301
+ toolspaceTokenFileForSession,
302
+ toolspaceTokenFileFromEnvironment,
272
303
  uploadRecordingArtifact,
273
- verifyStreamToken
304
+ verifyStreamToken,
305
+ withRunCredentialEnvironment,
306
+ withRunCredentialsClient,
307
+ withRunCredentialsSession,
308
+ withToolspaceTokenClient,
309
+ withToolspaceTokenEnvironment,
310
+ withToolspaceTokenSession
274
311
  };
275
312
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Metadata for a platform-curated skill. The metadata is deliberately
3
+ * provider-neutral: it describes guidance provenance and compatibility, not
4
+ * credentials, tools, permissions, or a model route.
5
+ *
6
+ * Entries are immutable in the runtime. A new artifact gets a new version and
7
+ * content hash; callers must not mutate the returned records.
8
+ */
9
+ type SkillLibraryEntry = Readonly<{
10
+ id: string;
11
+ name: string;
12
+ version: string;
13
+ description: string;
14
+ category: string;
15
+ tags: readonly string[];
16
+ /** SHA-256 over the complete canonical artifact manifest, not just SKILL.md. */
17
+ contentSha256: string;
18
+ sourceCommit: string;
19
+ sourceUrl: string;
20
+ provenance: string;
21
+ license: string;
22
+ documentationUrl: string;
23
+ compatibility: Readonly<{
24
+ runtime: string;
25
+ minimumSkillCapabilityVersion: string;
26
+ }>;
27
+ upgrade: Readonly<{
28
+ policy: "immutable-replacement";
29
+ supersedes: string | null;
30
+ }>;
31
+ relativePath: string;
32
+ }>;
33
+ type SkillLibraryFile = Readonly<{
34
+ path: string;
35
+ content: string;
36
+ }>;
37
+ type SkillLibraryArtifact = Readonly<{
38
+ files: readonly SkillLibraryFile[];
39
+ /** SHA-256 over the complete canonical artifact manifest, not just SKILL.md. */
40
+ contentSha256: string;
41
+ }>;
42
+ type SkillLibrarySkill = Readonly<{
43
+ name: string;
44
+ description: string;
45
+ files: readonly SkillLibraryFile[];
46
+ }>;
47
+ /** Return only entries whose reviewed artifact is present in this deployment. */
48
+ declare function listSkillLibraryEntries(): readonly SkillLibraryEntry[];
49
+ /** Return whether an id belongs to the immutable library, even if its artifact is unavailable. */
50
+ declare function isSkillLibraryEntryId(id: string): boolean;
51
+ /** Resolve an exact immutable library entry by id and version. */
52
+ declare function getSkillLibraryEntry(id: string, version?: string): SkillLibraryEntry | null;
53
+ /**
54
+ * Load a selected curated entry into the SDK's in-memory skill shape.
55
+ * Selection is guidance-only: this function has no access to settings,
56
+ * credentials, MCP declarations, or model-provider configuration.
57
+ */
58
+ declare function loadSkillLibrarySkill(id: string, version?: string): {
59
+ entry: SkillLibraryEntry;
60
+ skill: SkillLibrarySkill;
61
+ };
62
+ /**
63
+ * Read a curated artifact and calculate its canonical whole-artifact digest.
64
+ *
65
+ * The manifest is JSON encoded as sorted `[normalizedRelativePath, base64Bytes]`
66
+ * tuples. Base64 preserves every byte, including bytes that would not survive
67
+ * a lossy UTF-8 string round-trip. Files are decoded only after the digest
68
+ * input has been captured because the SDK skill surface is text-based.
69
+ */
70
+ declare function readSkillLibraryArtifact(root: string): SkillLibraryArtifact;
71
+ /** Verify a reviewed artifact against its immutable catalog digest. */
72
+ declare function verifySkillLibraryArtifact(root: string, expectedSha256: string, entry?: Pick<SkillLibraryEntry, "id" | "version">): SkillLibraryArtifact;
73
+
74
+ export { type SkillLibraryArtifact, type SkillLibraryEntry, type SkillLibraryFile, type SkillLibrarySkill, getSkillLibraryEntry, isSkillLibraryEntryId, listSkillLibraryEntries, loadSkillLibrarySkill, readSkillLibraryArtifact, verifySkillLibraryArtifact };
@@ -0,0 +1,18 @@
1
+ import {
2
+ getSkillLibraryEntry,
3
+ isSkillLibraryEntryId,
4
+ listSkillLibraryEntries,
5
+ loadSkillLibrarySkill,
6
+ readSkillLibraryArtifact,
7
+ verifySkillLibraryArtifact
8
+ } from "./chunk-DPULLAJG.js";
9
+ import "./chunk-PZ5AY32C.js";
10
+ export {
11
+ getSkillLibraryEntry,
12
+ isSkillLibraryEntryId,
13
+ listSkillLibraryEntries,
14
+ loadSkillLibrarySkill,
15
+ readSkillLibraryArtifact,
16
+ verifySkillLibraryArtifact
17
+ };
18
+ //# sourceMappingURL=skill-library.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/runtime",
3
- "version": "0.7.0",
3
+ "version": "0.11.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,6 +8,7 @@
8
8
  "directory": "packages/runtime"
9
9
  },
10
10
  "files": [
11
+ "THIRD_PARTY_NOTICES",
11
12
  "dist",
12
13
  "src"
13
14
  ],
@@ -23,6 +24,10 @@
23
24
  "./sandbox": {
24
25
  "types": "./dist/sandbox/index.d.ts",
25
26
  "import": "./dist/sandbox/index.js"
27
+ },
28
+ "./skill-library": {
29
+ "types": "./dist/skill-library.d.ts",
30
+ "import": "./dist/skill-library.js"
26
31
  }
27
32
  },
28
33
  "publishConfig": {
@@ -35,14 +40,17 @@
35
40
  "prepublishOnly": "bash ../../scripts/prepublish-guard"
36
41
  },
37
42
  "dependencies": {
43
+ "@modelcontextprotocol/sdk": "1.29.0",
38
44
  "@noble/hashes": "^1.8.0",
39
45
  "@openai/agents": "0.13.3",
40
46
  "@openai/agents-extensions": "0.13.3",
41
47
  "@opengeni/agent-proto": "^0.3.0",
42
- "@opengeni/codex": "^0.2.2",
43
- "@opengeni/config": "^0.5.0",
44
- "@opengeni/contracts": "^0.10.0",
48
+ "@opengeni/codex": "^0.2.5",
49
+ "@opengeni/config": "^0.6.2",
50
+ "@opengeni/contracts": "^0.15.0",
51
+ "debug": "4.4.3",
45
52
  "modal": "0.7.6",
46
- "openai": "6.47.0"
53
+ "openai": "6.47.0",
54
+ "ws": "8.21.1"
47
55
  }
48
56
  }
@@ -1,11 +1,11 @@
1
1
  # Bundled infrastructure agent skills
2
2
 
3
- Vendored from [github.com/hashicorp/agent-skills](https://github.com/hashicorp/agent-skills): a flat merge of
3
+ The deployment-default bundle is vendored from [github.com/hashicorp/agent-skills](https://github.com/hashicorp/agent-skills): a flat merge of
4
4
 
5
5
  - `terraform/code-generation/skills/`
6
6
  - `terraform/module-generation/skills/`
7
7
 
8
- plus repo-local infrastructure skills, so the OpenAI Agents SDK `Skills` capability can mount one `LocalDir` at the workspace `.agents` root. Each immediate subdirectory is a skill (contains `SKILL.md`).
8
+ plus repo-local infrastructure skills, so the OpenAI Agents SDK `Skills` capability can mount one `LocalDir` at the workspace `.agents` root. Each immediate subdirectory is a skill (contains `SKILL.md`). The Azure Verified Modules guidance is intentionally excluded from this always-enabled bundle; it is maintained as the immutable opt-in entry in `../bundled_skill_library/azure-verified-modules/`.
9
9
 
10
10
  Repo-local skills:
11
11
 
@@ -15,4 +15,4 @@ Repo-local skills:
15
15
  - `UPSTREAM_GIT_SHA` — commit the tree was copied from
16
16
  - `LICENSE` — upstream MPL-2.0
17
17
 
18
- **To refresh upstream Terraform skills:** fetch `hashicorp/agent-skills`, copy those two `skills/` directory contents into this folder (sibling skill dirs), and update `UPSTREAM_GIT_SHA`. Do not remove repo-local skills such as `checkov` during refresh.
18
+ **To refresh upstream Terraform skills:** fetch `hashicorp/agent-skills`, copy those two `skills/` directory contents into this folder (sibling skill dirs), omit `azure-verified-modules` from this default bundle, and update `UPSTREAM_GIT_SHA`. Do not remove repo-local skills such as `checkov` during refresh. Update the curated library entry separately and immutably when its reviewed version changes.
@@ -9,7 +9,7 @@ Use this skill when the user asks to scan Terraform or infrastructure-as-code fo
9
9
 
10
10
  ## Workflow
11
11
 
12
- 1. Confirm the repository path before scanning. Repository resources are usually mounted under `/workspace/repos/<owner>/<repo>`.
12
+ 1. Confirm the repository path before scanning. Repository resources are usually mounted under `/workspace/repos/<host>/<owner>/<repo>`; use the session's resolved resource path instead of guessing.
13
13
  2. Run Checkov from the repository root or the relevant Terraform subdirectory:
14
14
 
15
15
  ```bash