@opengeni/runtime 2.4.3-canary.0 → 2.5.1-canary.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 (36) hide show
  1. package/dist/{agent-UA75SUZ7.js → agent-Q2VNH5FV.js} +2 -2
  2. package/dist/{chunk-ORKCCH5X.js → chunk-25B3EQRW.js} +3 -398
  3. package/dist/{chunk-ORKCCH5X.js.map → chunk-25B3EQRW.js.map} +1 -1
  4. package/dist/{chunk-P5AEIDAS.js → chunk-26GUTY32.js} +267 -181
  5. package/dist/chunk-26GUTY32.js.map +1 -0
  6. package/dist/{chunk-YRKIQK25.js → chunk-CD22I76N.js} +2 -2
  7. package/dist/{chunk-7K6WOXFS.js → chunk-GB763TSV.js} +17 -1
  8. package/dist/chunk-GB763TSV.js.map +1 -0
  9. package/dist/{chunk-WATBACLT.js → chunk-LGLJ5PVD.js} +5 -88
  10. package/dist/chunk-LGLJ5PVD.js.map +1 -0
  11. package/dist/index.d.ts +12 -5
  12. package/dist/index.js +11 -5
  13. package/dist/{localSources-GDQRRHT3.js → localSources-Z5IJIIRV.js} +3 -3
  14. package/dist/model-input.d.ts +2 -1
  15. package/dist/runtime-skills.d.ts +28 -5
  16. package/dist/sandbox/index.js +3 -3
  17. package/dist/skill-files.d.ts +4 -0
  18. package/dist/skill-library.d.ts +1 -1
  19. package/dist/skill-library.js +3 -1
  20. package/dist/workspace-tool-gateway.js +5 -5
  21. package/package.json +11 -11
  22. package/src/bundled_management_skills/opengeni-skills/SKILL.md +3 -1
  23. package/src/index.ts +184 -33
  24. package/src/lazy-tool-transport.ts +0 -3
  25. package/src/model-input.ts +1 -1
  26. package/src/run-events.ts +23 -0
  27. package/src/runtime-skills.ts +122 -161
  28. package/src/sandbox/routing/routing-session.ts +1 -1
  29. package/src/skill-files.ts +20 -0
  30. package/src/skill-library.ts +1 -0
  31. package/dist/chunk-7K6WOXFS.js.map +0 -1
  32. package/dist/chunk-P5AEIDAS.js.map +0 -1
  33. package/dist/chunk-WATBACLT.js.map +0 -1
  34. /package/dist/{agent-UA75SUZ7.js.map → agent-Q2VNH5FV.js.map} +0 -0
  35. /package/dist/{chunk-YRKIQK25.js.map → chunk-CD22I76N.js.map} +0 -0
  36. /package/dist/{localSources-GDQRRHT3.js.map → localSources-Z5IJIIRV.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -26,8 +26,8 @@ import type { ComputerToolMode } from "./legacy-computer-compat.js";
26
26
  import type { RuntimeMetricsHooks } from "./metrics.js";
27
27
  import { resolveTurnModel } from "./model-provider.js";
28
28
  import { type WorkspaceSkillSearchPath } from "./workspace-skills.js";
29
- import { type EffectiveSkillSelection, type RuntimeSkillActivation } from "./runtime-skills.js";
30
- export { composeRuntimeSkills, loadNativeToolSkillArtifacts, type EffectiveSkillSelection, type InstalledSkillActivation, type NativeToolSkillSet, type PackSkillActivation, type RuntimeSkillActivation, type RuntimeSkillArtifact, type RuntimeSkillArtifactFile, type RuntimeSkillComposition, type RuntimeSkillDescriptor, type SessionSkillActivation, } from "./runtime-skills.js";
29
+ import { type EffectiveSkillSelection, type RuntimeSkillActivation, type RuntimeSkillIndexEntry } from "./runtime-skills.js";
30
+ export { composeRuntimeSkills, loadNativeToolSkillArtifacts, readRuntimeSkill, skillCatalogFromComposition, type EffectiveSkillSelection, type InstalledSkillActivation, type NativeToolSkillSet, type PackSkillActivation, type RuntimeSkillActivation, type RuntimeSkillArtifact, type RuntimeSkillArtifactFile, type RuntimeSkillComposition, type RuntimeSkillDescriptor, type RuntimeSkillIndexEntry, type SessionSkillActivation, } from "./runtime-skills.js";
31
31
  import { type PersistentAgentInstructionInspection } from "./model-context-inspector.js";
32
32
  import { type ModelPreparationMeasurement } from "./model-preparation-diagnostics.js";
33
33
  import type { ModelResponseUsage, NormalizedRuntimeEvent, SerializedHumanInputInterruption, SerializedInteractionInterventionInterruption } from "./run-events.js";
@@ -301,6 +301,8 @@ export type CodemodeTokenWriterSession = SandboxSessionLike;
301
301
  * turn skill activation into an authorization change.
302
302
  */
303
303
  export declare function effectiveSkillSelectionsForAgent(agent: object): readonly EffectiveSkillSelection[];
304
+ /** Sandbox-independent Skill index admitted for this agent. */
305
+ export declare function runtimeSkillIndexForAgent(agent: object): readonly RuntimeSkillIndexEntry[];
304
306
  export declare function persistentAgentInstructionInspectionFor(agent: object): PersistentAgentInstructionInspection;
305
307
  export type ConnectorActionToolCall = {
306
308
  approvalId: string;
@@ -359,6 +361,8 @@ export type AttemptConnectorActionBinding = {
359
361
  resultOutcome?: (output: unknown) => "not_executed" | "uncertain" | null;
360
362
  };
361
363
  export type BuildAgentOptions = {
364
+ /** Live authority fence for intrinsic sandbox tools outside the MCP gateway. */
365
+ authorizeAttemptExecution?: () => Promise<void> | void;
362
366
  /** Trusted attempt-local wait receipt shared with prepared tools. */
363
367
  inputWaitYield?: InputWaitYield;
364
368
  model?: Model;
@@ -478,10 +482,8 @@ export type BuildAgentOptions = {
478
482
  * executable tool catalog.
479
483
  */
480
484
  skillActivations?: readonly RuntimeSkillActivation[];
481
- /** Server-backed Skill descriptors, independent of sandbox capabilities. */
485
+ /** Host-owned descriptors and reader; mutually exclusive with skillActivations. */
482
486
  skillCatalog?: readonly SkillCatalogDescriptor[];
483
- /** Shared reader serves configured Skills; filesystem discovery remains for repo Skills only. */
484
- serverSkillReading?: boolean;
485
487
  /**
486
488
  * Internal per-attempt cancellation boundary. The worker supplies Temporal's
487
489
  * signal so an in-flight shell process is interrupted immediately instead of
@@ -640,6 +642,7 @@ export declare function buildOpenGeniAgent(settings: Settings, resources: Resour
640
642
  */
641
643
  export declare function withStructuredViewImageFunctionResults(tools: Tool<unknown>[]): Tool<unknown>[];
642
644
  export declare function buildAgentCapabilities(settings: Settings, skillActivations?: readonly RuntimeSkillActivation[], options?: {
645
+ authorizeAttemptExecution?: () => Promise<void> | void;
643
646
  editableArtifactToolsAvailable?: boolean;
644
647
  videoGenerationAvailable?: boolean;
645
648
  workspaceSkillPaths?: readonly WorkspaceSkillSearchPath[];
@@ -747,6 +750,10 @@ export type PrepareToolsOptions = {
747
750
  attemptToolDefinitions?: readonly AttemptToolDefinition[];
748
751
  /** Host authorization applied after catalog/input validation and before execution. */
749
752
  attemptToolAuthorize?: AttemptToolAuthorization;
753
+ /** Live accepted-attempt fence, evaluated at execution rather than catalog
754
+ * preparation. Includes model and Codemode calls and runs before consuming
755
+ * connector approval authority. Does not alter catalog identity. */
756
+ authorizeAttemptExecution?: () => Promise<void> | void;
750
757
  /** Attempt-bound connector policy installed into the canonical gateway lifecycle. */
751
758
  connectorActionPolicy?: ConnectorActionPolicyHooks;
752
759
  /** Private connector identities for exact-name attempt-local tools. */
package/dist/index.js CHANGED
@@ -191,6 +191,7 @@ import {
191
191
  projectRejectedReasoningArtifact,
192
192
  projectRemoteCompactionOverflowRetryInput,
193
193
  protocolItemsFromGeneratedItems,
194
+ readRuntimeSkill,
194
195
  recordModelPreparationMeasurement,
195
196
  refreshCodemodeTokenFile,
196
197
  refreshGitCredentialBindingTokenFiles,
@@ -217,6 +218,7 @@ import {
217
218
  runOwnedSandboxSetup,
218
219
  runRepositoryCloneHook,
219
220
  runRigSetupHook,
221
+ runtimeSkillIndexForAgent,
220
222
  safeMcpTransportError,
221
223
  sandboxArtifactRuntimeDoctorHooks,
222
224
  sandboxFileDownloadFailureNote,
@@ -229,6 +231,7 @@ import {
229
231
  serializeInteractionInterventionRequests,
230
232
  serializedRunStateHasOpaqueProviderArtifact,
231
233
  serializedToolsForRemoteCompaction,
234
+ skillCatalogFromComposition,
232
235
  spilledModelToolResult,
233
236
  stripInternalModelMetadata,
234
237
  stripProviderItemIdsFilter,
@@ -244,7 +247,7 @@ import {
244
247
  workspaceEnvironmentInstructions,
245
248
  wrapAttemptToolDefinitions,
246
249
  wrapAttemptToolExecute
247
- } from "./chunk-P5AEIDAS.js";
250
+ } from "./chunk-26GUTY32.js";
248
251
  import {
249
252
  ActiveBackendUnresolvableError,
250
253
  BROWSER_CONTROL_ADMIN_TOKEN_FILE,
@@ -514,8 +517,8 @@ import {
514
517
  withRunCredentialsClient,
515
518
  withRunCredentialsSession,
516
519
  withoutSandboxProviderIdentity
517
- } from "./chunk-WATBACLT.js";
518
- import "./chunk-YRKIQK25.js";
520
+ } from "./chunk-LGLJ5PVD.js";
521
+ import "./chunk-CD22I76N.js";
519
522
  import {
520
523
  SKILL_MAX_FILES,
521
524
  SKILL_MAX_FILE_BYTES,
@@ -528,7 +531,7 @@ import {
528
531
  parseSkillFrontmatter,
529
532
  skillArtifactContentSha256,
530
533
  skillLibraryRepositoryUrl
531
- } from "./chunk-7K6WOXFS.js";
534
+ } from "./chunk-GB763TSV.js";
532
535
  import "./chunk-UZ66CGC2.js";
533
536
  import {
534
537
  GMAIL_REST_API_BASE,
@@ -540,7 +543,7 @@ import {
540
543
  } from "./chunk-JHM4OS7C.js";
541
544
  import {
542
545
  MaxTurnsExceededError
543
- } from "./chunk-ORKCCH5X.js";
546
+ } from "./chunk-25B3EQRW.js";
544
547
  import "./chunk-PZ5AY32C.js";
545
548
  export {
546
549
  ActiveBackendUnresolvableError,
@@ -949,6 +952,7 @@ export {
949
952
  providerWorkspaceCapturePolicy,
950
953
  provisionBrowserControlClient,
951
954
  querySelfhostedOp,
955
+ readRuntimeSkill,
952
956
  readVerifiedWorkspaceArchive,
953
957
  readWorkspaceArchiveFromEnvelopeSessionState,
954
958
  recordModelPreparationMeasurement,
@@ -996,6 +1000,7 @@ export {
996
1000
  runStateCompatibilityProvider,
997
1001
  runStateExposedPortsRecord,
998
1002
  runWithToolCallCorrelation,
1003
+ runtimeSkillIndexForAgent,
999
1004
  safeMcpTransportError,
1000
1005
  sandboxArtifactRuntimeDoctorHooks,
1001
1006
  sandboxBackendForSdkBackendId,
@@ -1031,6 +1036,7 @@ export {
1031
1036
  signedEndpointExpiresAtMs,
1032
1037
  signedEndpointNeedsRefresh,
1033
1038
  skillArtifactContentSha256,
1039
+ skillCatalogFromComposition,
1034
1040
  skillLibraryRepositoryUrl,
1035
1041
  spilledModelToolResult,
1036
1042
  startRecording,
@@ -3,8 +3,8 @@ import {
3
3
  applyLocalSourceManifestToState,
4
4
  materializeLocalSourceManifest,
5
5
  materializeLocalSourceManifestEntry
6
- } from "./chunk-YRKIQK25.js";
7
- import "./chunk-ORKCCH5X.js";
6
+ } from "./chunk-CD22I76N.js";
7
+ import "./chunk-25B3EQRW.js";
8
8
  import "./chunk-PZ5AY32C.js";
9
9
  export {
10
10
  applyLocalSourceManifestEntryToState,
@@ -12,4 +12,4 @@ export {
12
12
  materializeLocalSourceManifest,
13
13
  materializeLocalSourceManifestEntry
14
14
  };
15
- //# sourceMappingURL=localSources-GDQRRHT3.js.map
15
+ //# sourceMappingURL=localSources-Z5IJIIRV.js.map
@@ -1,5 +1,5 @@
1
1
  import type { Settings } from "@opengeni/config";
2
- import type { CallModelInputFilter } from "@openai/agents";
2
+ import type { AgentInputItem, CallModelInputFilter } from "@openai/agents";
3
3
  import { type ProviderContextTokenSignal } from "./context-compaction.js";
4
4
  export type ContextRobustnessFilterOptions = {
5
5
  contextCompactionSignal?: () => ProviderContextTokenSignal | null | undefined;
@@ -20,6 +20,7 @@ export type ContextRobustnessFilterOptions = {
20
20
  * are separate properties and stay untouched; items are cloned, never mutated.
21
21
  */
22
22
  export declare const stripProviderItemIdsFilter: CallModelInputFilter;
23
+ export declare function stripProviderItemId(item: AgentInputItem): AgentInputItem;
23
24
  /**
24
25
  * callModelInputFilter that normalizes every `computer_call` carrying BOTH
25
26
  * `action` and `actions` down to EXACTLY ONE (keeps `actions`, drops `action`).
@@ -1,4 +1,5 @@
1
- import { type LocalDirLazySkillSource } from "@openai/agents/sandbox";
1
+ import { readSkillFiles } from "./skill-files.js";
2
+ import type { SkillCatalogDescriptor } from "./skill-catalog.js";
2
3
  export type RuntimeSkillArtifactFile = Readonly<{
3
4
  path: string;
4
5
  content: string;
@@ -47,13 +48,26 @@ export type EffectiveSkillSelection = Readonly<{
47
48
  contentSha256: string | null;
48
49
  reason: string;
49
50
  }>;
51
+ export type RuntimeSkillReadable = Readonly<{
52
+ id: string;
53
+ name: string;
54
+ description: string;
55
+ files: readonly RuntimeSkillArtifactFile[];
56
+ }>;
50
57
  export type RuntimeSkillComposition = Readonly<{
51
- lazySource: LocalDirLazySkillSource;
52
58
  selections: readonly EffectiveSkillSelection[];
53
59
  /** Exact always-visible catalog descriptors for explicitly activated Skills. */
54
60
  configuredDescriptors: readonly RuntimeSkillDescriptor[];
55
61
  configuredNames: readonly string[];
56
62
  nativeToolNames: readonly string[];
63
+ /** Model-facing catalog descriptors for configured and bundled Skills. */
64
+ index: readonly RuntimeSkillIndexEntry[];
65
+ artifacts: readonly RuntimeSkillReadable[];
66
+ }>;
67
+ export type RuntimeSkillIndexEntry = Readonly<{
68
+ id: string;
69
+ name: string;
70
+ description: string;
57
71
  }>;
58
72
  export type RuntimeSkillDescriptor = Readonly<{
59
73
  id: string;
@@ -62,6 +76,11 @@ export type RuntimeSkillDescriptor = Readonly<{
62
76
  reason: string;
63
77
  description: string;
64
78
  }>;
79
+ export type RuntimeSkillReadRequest = Readonly<{
80
+ skill: string;
81
+ paths?: readonly string[];
82
+ listFiles?: boolean;
83
+ }>;
65
84
  /**
66
85
  * Packaged guidance is server-readable content, not a sandbox installation.
67
86
  * The caller supplies the effective capability selection; compute backend is
@@ -72,10 +91,14 @@ export declare function loadNativeToolSkillArtifacts(nativeTools: NativeToolSkil
72
91
  }>): readonly RuntimeSkillArtifact[];
73
92
  /**
74
93
  * Compose the exact Skills surface for one agent.
75
- *
76
94
  * Optional/domain Skills enter only through explicit activations. Native
77
95
  * Skills are admitted only with the exact executable tool surface they
78
- * document. This one result owns both lazy materialization and inspection
79
- * provenance so those projections cannot disagree.
96
+ * document. The result is an in-memory catalog and file set, not an SDK loader.
80
97
  */
81
98
  export declare function composeRuntimeSkills(activations: readonly RuntimeSkillActivation[], nativeTools?: NativeToolSkillSet): RuntimeSkillComposition;
99
+ export declare function skillCatalogFromComposition(composition: RuntimeSkillComposition): readonly SkillCatalogDescriptor[];
100
+ export declare function readRuntimeSkill(composition: RuntimeSkillComposition, request: RuntimeSkillReadRequest): {
101
+ skillId: string;
102
+ files?: ReturnType<typeof readSkillFiles>["files"];
103
+ paths?: string[];
104
+ };
@@ -265,9 +265,9 @@ import {
265
265
  withRunCredentialsClient,
266
266
  withRunCredentialsSession,
267
267
  withoutSandboxProviderIdentity
268
- } from "../chunk-WATBACLT.js";
269
- import "../chunk-YRKIQK25.js";
270
- import "../chunk-ORKCCH5X.js";
268
+ } from "../chunk-LGLJ5PVD.js";
269
+ import "../chunk-CD22I76N.js";
270
+ import "../chunk-25B3EQRW.js";
271
271
  import "../chunk-PZ5AY32C.js";
272
272
  export {
273
273
  ActiveBackendUnresolvableError,
@@ -14,6 +14,10 @@ export declare class SkillFileError extends Error {
14
14
  constructor(code: "invalid_path" | "invalid_request" | "missing_file" | "output_too_large", message: string);
15
15
  }
16
16
  export declare function assertSkillRelativePath(path: string): void;
17
+ /** Inventory shares the reader's path validation and never includes file bodies. */
18
+ export declare function listSkillPaths(files: readonly SkillTextFile[], maxFiles: number): {
19
+ paths: string[];
20
+ };
17
21
  /** Omitted paths default to the entry point; explicit paths are never expanded. */
18
22
  export declare function readSkillFiles(files: readonly SkillTextFile[], paths?: readonly string[]): {
19
23
  files: SkillTextFile[];
@@ -1,5 +1,5 @@
1
1
  export { parseSkillFrontmatter as parsePortableSkillFrontmatter } from "@opengeni/contracts";
2
- export { applySkillFileChanges, assertSkillRelativePath, readSkillFiles, SkillFileError, SKILL_READ_MAX_OUTPUT_BYTES, SKILL_READ_MAX_PATHS, type SkillTextFile, } from "./skill-files.js";
2
+ export { applySkillFileChanges, assertSkillRelativePath, listSkillPaths, readSkillFiles, SkillFileError, SKILL_READ_MAX_OUTPUT_BYTES, SKILL_READ_MAX_PATHS, type SkillTextFile, } from "./skill-files.js";
3
3
  /**
4
4
  * Metadata for a platform-curated skill. The metadata is deliberately
5
5
  * provider-neutral: it describes guidance provenance and compatibility, not
@@ -11,6 +11,7 @@ import {
11
11
  getSkillLibraryEntry,
12
12
  isSkillLibraryEntryId,
13
13
  listSkillLibraryEntries,
14
+ listSkillPaths,
14
15
  loadSkillLibrarySkill,
15
16
  loadSkillManagementSkill,
16
17
  parseSkillFrontmatter,
@@ -19,7 +20,7 @@ import {
19
20
  skillArtifactContentSha256,
20
21
  skillLibraryRepositoryUrl,
21
22
  verifySkillLibraryArtifact
22
- } from "./chunk-7K6WOXFS.js";
23
+ } from "./chunk-GB763TSV.js";
23
24
  import "./chunk-PZ5AY32C.js";
24
25
  export {
25
26
  SKILL_MAX_FILES as PORTABLE_SKILL_MAX_FILES,
@@ -34,6 +35,7 @@ export {
34
35
  getSkillLibraryEntry,
35
36
  isSkillLibraryEntryId,
36
37
  listSkillLibraryEntries,
38
+ listSkillPaths,
37
39
  loadSkillLibrarySkill,
38
40
  loadSkillManagementSkill,
39
41
  parseSkillFrontmatter as parsePortableSkillFrontmatter,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  prepareAgentTools
3
- } from "./chunk-P5AEIDAS.js";
4
- import "./chunk-WATBACLT.js";
5
- import "./chunk-YRKIQK25.js";
6
- import "./chunk-7K6WOXFS.js";
3
+ } from "./chunk-26GUTY32.js";
4
+ import "./chunk-LGLJ5PVD.js";
5
+ import "./chunk-CD22I76N.js";
6
+ import "./chunk-GB763TSV.js";
7
7
  import "./chunk-UZ66CGC2.js";
8
8
  import "./chunk-JHM4OS7C.js";
9
- import "./chunk-ORKCCH5X.js";
9
+ import "./chunk-25B3EQRW.js";
10
10
  import "./chunk-PZ5AY32C.js";
11
11
  export {
12
12
  prepareAgentTools as prepareWorkspaceToolGatewayTools
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/runtime",
3
- "version": "2.4.3-canary.0",
3
+ "version": "2.5.1-canary.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -62,16 +62,16 @@
62
62
  "@openai/agents": "0.14.3",
63
63
  "@openai/agents-core": "0.14.3",
64
64
  "@openai/agents-extensions": "0.14.3",
65
- "@opengeni/agent-proto": "^0.5.1-canary.23",
66
- "@opengeni/capabilities": "^0.3.3-canary.5",
67
- "@opengeni/codemode": "^0.5.3-canary.0",
68
- "@opengeni/codex": "^0.2.22-canary.5",
69
- "@opengeni/config": "^1.0.4-canary.0",
70
- "@opengeni/contracts": "^2.15.2-canary.0",
71
- "@opengeni/network": "^0.3.1-canary.5",
72
- "@opengeni/sdk": "^4.0.2-canary.0",
73
- "@opengeni/tool-gateway": "^0.1.4-canary.0",
74
- "@opengeni/xai-subscription": "^0.1.4-canary.5",
65
+ "@opengeni/agent-proto": "^0.5.1-canary.24",
66
+ "@opengeni/capabilities": "^0.3.3-canary.6",
67
+ "@opengeni/codemode": "^0.5.4-canary.0",
68
+ "@opengeni/codex": "^0.2.22-canary.6",
69
+ "@opengeni/config": "^1.1.0-canary.0",
70
+ "@opengeni/contracts": "^3.0.0-canary.0",
71
+ "@opengeni/network": "^0.3.1-canary.6",
72
+ "@opengeni/sdk": "^5.0.0-canary.0",
73
+ "@opengeni/tool-gateway": "^0.1.5-canary.0",
74
+ "@opengeni/xai-subscription": "^0.1.4-canary.6",
75
75
  "debug": "4.4.3",
76
76
  "modal": "0.9.0",
77
77
  "openai": "6.47.0",
@@ -83,7 +83,9 @@ When save, publish, or install returns `humanInput`, call
83
83
  `request_human_input` with that exact payload. The card displays the complete
84
84
  immutable Skill files. The initiating human's Save activates that exact revision
85
85
  in the response transaction, before the session resumes. No follow-up activation
86
- tool or second review is needed. Don't save and Other do not activate the Skill.
86
+ tool or second review is needed. The runtime owns the review card's wording and
87
+ Save/Don't save choices; do not combine it with other questions. Don't save does
88
+ not activate the Skill, and Other is not a valid Skill decision.
87
89
  If the Skill changes before Save, make a new proposal for a fresh decision.
88
90
  Autonomous saves return applied and need no confirmation. Off refuses durable
89
91
  agent changes.