@opengeni/runtime 6.8.0 → 6.9.1-canary.41937124785001

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 (84) hide show
  1. package/THIRD_PARTY_NOTICES +2 -2
  2. package/dist/agent-instructions/identity.d.ts +14 -0
  3. package/dist/agent-instructions/index.d.ts +1 -1
  4. package/dist/agent-instructions/modules/skills.d.ts +4 -1
  5. package/dist/agent-instructions/runtime-mechanics.d.ts +3 -1
  6. package/dist/agent-instructions/types.d.ts +25 -0
  7. package/dist/anthropic-messages.d.ts +1 -14
  8. package/dist/assets/codemode-client.json +1 -1
  9. package/dist/{chunk-JRM6HEPY.js → chunk-APU6UUHI.js} +2 -2
  10. package/dist/{chunk-2MBI6D2F.js → chunk-DBAPM5I6.js} +2 -2
  11. package/dist/{chunk-E2YB7OIA.js → chunk-FNKSN2A5.js} +2 -2
  12. package/dist/{chunk-5K2NI7NX.js → chunk-GSUMEZPM.js} +365 -277
  13. package/dist/chunk-GSUMEZPM.js.map +1 -0
  14. package/dist/{chunk-V7MCFH4O.js → chunk-NE4JBK2K.js} +3 -3
  15. package/dist/{chunk-RXCYGCX7.js → chunk-POPKVRF2.js} +398 -1240
  16. package/dist/chunk-POPKVRF2.js.map +1 -0
  17. package/dist/{chunk-QNQGZKHJ.js → chunk-UEB32W73.js} +3 -3
  18. package/dist/{chunk-6MHS5OUN.js → chunk-ZXR3UWXQ.js} +4 -4
  19. package/dist/codex-tool-search.d.ts +2 -15
  20. package/dist/command-completion-delivery.d.ts +1 -7
  21. package/dist/gmail-rest-mcp.js +3 -3
  22. package/dist/google-calendar-rest-mcp.js +2 -2
  23. package/dist/index.d.ts +21 -22
  24. package/dist/index.js +16 -18
  25. package/dist/lazy-tool-transport.d.ts +41 -13
  26. package/dist/mcp-listed-tools.d.ts +14 -0
  27. package/dist/metrics.d.ts +0 -15
  28. package/dist/model-call.js +1 -1
  29. package/dist/model-preparation-diagnostics.d.ts +1 -1
  30. package/dist/model-provider-client.d.ts +0 -3
  31. package/dist/provider-invalid-request.d.ts +0 -12
  32. package/dist/provider-tool-names.d.ts +14 -43
  33. package/dist/replayable-json-body.d.ts +1 -5
  34. package/dist/sandbox/index.js +2 -2
  35. package/dist/slack-rest-mcp.js +3 -3
  36. package/dist/{src-FEEP3A3M.js → src-TV3KAXWW.js} +6 -9
  37. package/dist/src-TV3KAXWW.js.map +1 -0
  38. package/dist/tool-discovery-ranking.d.ts +2 -0
  39. package/dist/workspace-tool-gateway.js +8 -8
  40. package/package.json +20 -19
  41. package/src/agent-instructions/PROMPT_CHANGELOG.md +105 -0
  42. package/src/agent-instructions/base-behavior.ts +54 -19
  43. package/src/agent-instructions/identity.ts +39 -1
  44. package/src/agent-instructions/index.ts +2 -0
  45. package/src/agent-instructions/modules/media.ts +5 -3
  46. package/src/agent-instructions/modules/skills.ts +6 -3
  47. package/src/agent-instructions/runtime-mechanics.ts +36 -15
  48. package/src/agent-instructions/types.ts +38 -0
  49. package/src/anthropic-messages.ts +7 -97
  50. package/src/bundled_default_skills/opengeni-client/SKILL.md +8 -5
  51. package/src/bundled_default_skills/opengeni-client/references/configure-the-agent.md +15 -0
  52. package/src/bundled_default_skills/opengeni-client/references/production-checklist.md +3 -3
  53. package/src/bundled_default_skills/opengeni-client/references/versions-and-upgrades.md +45 -0
  54. package/src/bundled_default_skills/opengeni-help/SKILL.md +5 -0
  55. package/src/bundled_default_skills/opengeni-help/references/models-and-subscriptions.md +12 -0
  56. package/src/codex-tool-search.ts +4 -26
  57. package/src/command-completion-delivery.ts +2 -9
  58. package/src/index.ts +294 -143
  59. package/src/lazy-tool-transport.ts +237 -81
  60. package/src/mcp-listed-tools.ts +57 -0
  61. package/src/metrics.ts +0 -15
  62. package/src/model-context-inspector.ts +81 -5
  63. package/src/model-preparation-diagnostics.ts +0 -1
  64. package/src/model-provider-client.ts +0 -16
  65. package/src/model-provider-routing.ts +1 -2
  66. package/src/provider-history-adapter.ts +0 -5
  67. package/src/provider-invalid-request.ts +19 -90
  68. package/src/provider-tool-names.ts +38 -283
  69. package/src/replayable-json-body.ts +3 -171
  70. package/src/single-model-call.ts +1 -2
  71. package/src/tool-discovery-ranking.ts +117 -14
  72. package/dist/chunk-5K2NI7NX.js.map +0 -1
  73. package/dist/chunk-RXCYGCX7.js.map +0 -1
  74. package/dist/provider-request-tool-names.d.ts +0 -134
  75. package/dist/src-FEEP3A3M.js.map +0 -1
  76. package/dist/tool-result-secret-masking.d.ts +0 -35
  77. package/src/provider-request-tool-names.ts +0 -900
  78. package/src/tool-result-secret-masking.ts +0 -180
  79. /package/dist/{chunk-JRM6HEPY.js.map → chunk-APU6UUHI.js.map} +0 -0
  80. /package/dist/{chunk-2MBI6D2F.js.map → chunk-DBAPM5I6.js.map} +0 -0
  81. /package/dist/{chunk-E2YB7OIA.js.map → chunk-FNKSN2A5.js.map} +0 -0
  82. /package/dist/{chunk-V7MCFH4O.js.map → chunk-NE4JBK2K.js.map} +0 -0
  83. /package/dist/{chunk-QNQGZKHJ.js.map → chunk-UEB32W73.js.map} +0 -0
  84. /package/dist/{chunk-6MHS5OUN.js.map → chunk-ZXR3UWXQ.js.map} +0 -0
@@ -2055,10 +2055,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2055
2055
  License / NOTICE text 26
2056
2056
  ~~~~~~~~~~~~~~~~~~~~~~~~
2057
2057
 
2058
- follow-redirects 1.16.1
2058
+ follow-redirects 1.16.2
2059
2059
 
2060
2060
  Sources:
2061
- - follow-redirects 1.16.1: LICENSE
2061
+ - follow-redirects 1.16.2: LICENSE
2062
2062
 
2063
2063
  Copyright 2014–present Olivier Lalonde <olalonde@gmail.com>, James Talmage <james@talmage.io>, Ruben Verborgh
2064
2064
 
@@ -1,3 +1,5 @@
1
+ import type { ResolvedAgentCapabilities } from "@opengeni/contracts";
2
+ import type { AgentPromptResources } from "./types.js";
1
3
  /**
2
4
  * Opengeni's default identity: who the agent is and its voice. It is the only
3
5
  * part of the system text an embedder replaces (`agent.identity`, the
@@ -5,6 +7,16 @@
5
7
  * in base behavior so a replaced identity keeps it.
6
8
  */
7
9
  export declare const DEFAULT_AGENT_IDENTITY: string;
10
+ /**
11
+ * The default identity for an agent that shares no workspace with the user:
12
+ * no compute, files, Knowledge, artifacts, connectors, automations, sessions,
13
+ * browser, secrets or Skill management (typically `capabilities: "none"` with
14
+ * the product's own tools). Same voice, without claims of a shared Opengeni
15
+ * workspace that would not hold.
16
+ */
17
+ export declare const NEUTRAL_AGENT_IDENTITY: string;
18
+ /** Whether the agent works in a workspace it shares with the user. */
19
+ export declare function agentSharesWorkspace(capabilities: ResolvedAgentCapabilities, resources: Pick<AgentPromptResources, "managedSandbox" | "connectedMachine">): boolean;
8
20
  /** A legacy persona template read as identity: the CORE marker is ignored. */
9
21
  export declare function identityFromLegacyTemplate(template: string | null | undefined): string | null;
10
22
  /**
@@ -18,4 +30,6 @@ export declare function resolveAgentIdentity(input: {
18
30
  sessionIdentity?: string | null | undefined;
19
31
  workspaceIdentity?: string | null | undefined;
20
32
  deploymentTemplate?: string | null | undefined;
33
+ /** The last tier; Opengeni's default identity when omitted. */
34
+ defaultIdentity?: string | undefined;
21
35
  }): string;
@@ -1,7 +1,7 @@
1
1
  export { AGENT_PROMPT_MODULES, MODULAR_LAYER_SEPARATOR, SESSION_INSTRUCTIONS_PREAMBLE, composeModularAgentInstructions, composeOperationalContract, type ComposeModularAgentInstructionsInput, type ModularInstructionLayer, } from "./compose.js";
2
2
  export { INSTRUCTION_PRECEDENCE, renderBaseBehavior } from "./base-behavior.js";
3
3
  export { renderRuntimeMechanics } from "./runtime-mechanics.js";
4
- export { DEFAULT_AGENT_IDENTITY, identityFromLegacyTemplate, resolveAgentIdentity, } from "./identity.js";
4
+ export { DEFAULT_AGENT_IDENTITY, NEUTRAL_AGENT_IDENTITY, agentSharesWorkspace, identityFromLegacyTemplate, resolveAgentIdentity, } from "./identity.js";
5
5
  export { workspaceEnvironmentInstructions } from "./legacy-environment.js";
6
6
  export { rigInstructions } from "./modules/rig.js";
7
7
  export { UNATTENDED_SESSION_GUIDANCE } from "./modules/unattended.js";
@@ -1,3 +1,6 @@
1
1
  import { type AgentPromptModule } from "../types.js";
2
- /** Reading and following Skills. Present whenever Skills are readable. */
2
+ /**
3
+ * Reading and following Skills. Present whenever a Skill can be read: Skill
4
+ * management is on, or reading is on and the Skill index is not empty.
5
+ */
3
6
  export declare const skillsModule: AgentPromptModule;
@@ -5,6 +5,8 @@ import { type AgentPromptContext } from "./types.js";
5
5
  * Connected Machine is attached, background commands. Embedder instructions do
6
6
  * not override these. Clauses naming a first-party runtime tool
7
7
  * (`wait_for_input`, `command_read`, `command_wait`) drop only when the attempt
8
- * proved that tool absent; tool discovery is never pruned.
8
+ * proved that tool absent. Tool discovery renders unless the attempt proved it
9
+ * attaches nothing deferred (`toolSearchAbsent`), in which case it has no
10
+ * search router; the router decision is made from the same frozen facts.
9
11
  */
10
12
  export declare function renderRuntimeMechanics(context: AgentPromptContext): string;
@@ -63,6 +63,11 @@ export type AgentPromptResources = {
63
63
  * keeps prompts unchanged.
64
64
  */
65
65
  commandCompletionDelivery?: boolean | undefined;
66
+ /**
67
+ * `false` when the session's Skill index is empty, so with Skills read-only
68
+ * there is no Skill to read. Omitted keeps Skill guidance unchanged.
69
+ */
70
+ skillsReadable?: boolean | undefined;
66
71
  workspaceEnvironment?: WorkspaceEnvironmentContext | undefined;
67
72
  rig?: RigInstructionsContext | undefined;
68
73
  /**
@@ -108,7 +113,27 @@ export type AgentPromptToolAvailability = {
108
113
  * merely unselected on a turn of a session that may already have children).
109
114
  */
110
115
  readonly childSessionsImpossible?: true;
116
+ /**
117
+ * Nothing the attempt attaches is deferred, so it has no tool search router
118
+ * (`tool_search`, `tool_list`, `tool_invoke`) and tool discovery guidance is
119
+ * omitted. Omitted keeps that guidance.
120
+ */
121
+ readonly toolSearchAbsent?: true;
111
122
  };
123
+ /** False only when the attempt proved it has no tool search router. */
124
+ export declare function toolSearchAvailable(context: AgentPromptContext): boolean;
125
+ /** The agent can save Knowledge, instructions or Skills, which learning policy governs. */
126
+ export declare function canLearn(context: AgentPromptContext): boolean;
127
+ /**
128
+ * The agent can read a Skill this turn: Skill management is on, or reading is
129
+ * on and the Skill index is not proven empty.
130
+ */
131
+ export declare function skillsReadable(context: AgentPromptContext): boolean;
132
+ /**
133
+ * Something can resume the agent after a wait or on a timer: `wait_for_input`
134
+ * may exist, or automations can be scheduled.
135
+ */
136
+ export declare function canWaitOrSchedule(context: AgentPromptContext): boolean;
112
137
  /** False only when the attempt proved the named tool absent. */
113
138
  export declare function toolAvailable(context: AgentPromptContext, name: FirstPartyMcpToolName): boolean;
114
139
  /** True when none of the named tools was proven absent. */
@@ -1,7 +1,6 @@
1
1
  import { type Model, type ModelRequest, type ModelResponse, type ResponseStreamEvent } from "@openai/agents";
2
2
  import { type ResolvedModelProvider } from "@opengeni/config";
3
3
  import { type ClaudeCiteSource } from "@opengeni/contracts/claude-cite-tags";
4
- import { type ToolNameObservers } from "./provider-request-tool-names.js";
5
4
  type Json = Record<string, any>;
6
5
  type Message = {
7
6
  role: "user" | "assistant" | "system";
@@ -107,18 +106,11 @@ export declare class AnthropicMessagesModel implements Model {
107
106
  readonly provider: ResolvedModelProvider;
108
107
  readonly model: string;
109
108
  private readonly fetch;
110
- private readonly toolNameObservers;
111
109
  private readonly fallbackSessionId;
112
110
  private readonly promptId;
113
111
  private previousRequestId;
114
112
  private readonly sizeImage;
115
- /** The tool-name aliases each response answers (see provider-request-tool-names.ts). */
116
- private readonly toolNameAliases;
117
- /** Names this model's route rejected (see RejectedToolNames). */
118
- private readonly rejectedToolNames;
119
- constructor(provider: ResolvedModelProvider, model: string, fetch?: typeof globalThis.fetch, toolNameObservers?: ToolNameObservers);
120
- /** A Claude message or stream event with aliased tool names mapped back. */
121
- private restoredToolNames;
113
+ constructor(provider: ResolvedModelProvider, model: string, fetch?: typeof globalThis.fetch);
122
114
  /** Project inline images only; never fetch arbitrary URLs or edit stored history. */
123
115
  private sizeImageBlocks;
124
116
  /**
@@ -130,11 +122,6 @@ export declare class AnthropicMessagesModel implements Model {
130
122
  private prepare;
131
123
  /** Uses the same final serialization as dispatch, but performs no network I/O. */
132
124
  measureRequest(request: ModelRequest, stream?: boolean): Promise<import("./anthropic-request-size.js").AnthropicRequestSize>;
133
- /**
134
- * Send one request. A 400 that rejects a tool name is answered by sending
135
- * the request once more with every tool name aliased (strict mode); that
136
- * resend is never repeated, and its own answer is final.
137
- */
138
125
  private send;
139
126
  getResponse(request: ModelRequest): Promise<ModelResponse>;
140
127
  getStreamedResponse(request: ModelRequest): AsyncIterable<ResponseStreamEvent>;