@opengeni/core 0.3.0 → 0.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/core",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "OpenGeni framework-agnostic core: the domain, access, and billing layers (neutral access, off-HTTP V2 surface). Behavior-preserving extraction from apps/api — keeps Hono's HTTPException for error throwing (typed-errors cleanup deferred).",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -37,14 +37,14 @@
37
37
  "dependencies": {
38
38
  "@modelcontextprotocol/sdk": "^1.29.0",
39
39
  "@opengeni/codex": "^0.2.1",
40
- "@opengeni/config": "^0.2.3",
41
- "@opengeni/contracts": "^0.5.0",
42
- "@opengeni/db": "^0.3.0",
43
- "@opengeni/documents": "^0.2.3",
44
- "@opengeni/events": "^0.2.3",
40
+ "@opengeni/config": "^0.2.5",
41
+ "@opengeni/contracts": "^0.7.0",
42
+ "@opengeni/db": "^0.4.1",
43
+ "@opengeni/documents": "^0.2.5",
44
+ "@opengeni/events": "^0.2.5",
45
45
  "@opengeni/observability": "^0.2.1",
46
- "@opengeni/runtime": "^0.2.3",
47
- "@opengeni/storage": "^0.2.3",
46
+ "@opengeni/runtime": "^0.3.1",
47
+ "@opengeni/storage": "^0.2.5",
48
48
  "hono": "^4.12.18"
49
49
  },
50
50
  "devDependencies": {
@@ -24,6 +24,7 @@ export type SessionWorkflowClient = {
24
24
  syncScheduledTask: (input: { task: ScheduledTask }) => Promise<void>;
25
25
  deleteScheduledTaskSchedule: (input: { temporalScheduleId: string }) => Promise<void>;
26
26
  triggerScheduledTask: (input: { task: ScheduledTask; agentRunUsageIdempotencyKey?: string; triggerWorkflowId?: string }) => Promise<void>;
27
+ check?: () => Promise<void>;
27
28
  };
28
29
 
29
30
  export type DocumentIndexClient = {
@@ -38,6 +39,7 @@ export type AppDependencies = {
38
39
  documentIndexer?: DocumentIndexClient;
39
40
  documentServices?: DocumentServices;
40
41
  observability?: Observability;
42
+ readinessChecks?: Partial<Record<"db" | "nats" | "temporal", () => Promise<void> | void>>;
41
43
  githubStateSecret?: string;
42
44
  managedAuth?: ManagedAuth | null;
43
45
  // The API process's OWN agent-loop-free sandbox client (constructed from
@@ -232,6 +232,11 @@ export async function createAndStartSession(input: {
232
232
  // Names/ids only; the session.created payload never carries variable values.
233
233
  environment?: { id: string; name: string } | null;
234
234
  goal?: GoalSpec | null;
235
+ // Per-session agent persona/system instructions (org-visible metadata, not a
236
+ // secret). Persisted on the session row and composed system-level AFTER the
237
+ // workspace agentInstructions at turn time; never emitted as a timeline event.
238
+ // Null/omitted ⇒ the session carries none.
239
+ instructions?: string | null;
235
240
  // Validated against the creating grant before this is called.
236
241
  firstPartyMcpPermissions?: Permission[] | null;
237
242
  // Encrypted DB rows plus matching safe metadata for create-time per-session
@@ -293,6 +298,7 @@ export async function createAndStartSession(input: {
293
298
  sandboxBackend: input.sandboxBackend,
294
299
  environmentId: input.environment?.id ?? null,
295
300
  firstPartyMcpPermissions: input.firstPartyMcpPermissions ?? null,
301
+ instructions: input.instructions ?? null,
296
302
  parentSessionId: input.parentSessionId ?? null,
297
303
  createIdempotencyKey: input.createIdempotencyKey,
298
304
  sandboxGroupId: input.sandboxGroupId ?? null,
@@ -315,6 +321,7 @@ export async function createAndStartSession(input: {
315
321
  sandboxBackend: input.sandboxBackend,
316
322
  environmentId: input.environment?.id ?? null,
317
323
  firstPartyMcpPermissions: input.firstPartyMcpPermissions ?? null,
324
+ instructions: input.instructions ?? null,
318
325
  parentSessionId: input.parentSessionId ?? null,
319
326
  sandboxGroupId: input.sandboxGroupId ?? null,
320
327
  ...(input.sandboxOs ? { sandboxOs: input.sandboxOs } : {}),
@@ -855,6 +862,10 @@ export async function createSessionForRequest(
855
862
  metadata: payload.metadata,
856
863
  environment: environment ? { id: environment.id, name: environment.name } : null,
857
864
  goal: payload.goal ?? null,
865
+ // Per-session persona instructions (already trimmed/validated by the
866
+ // contracts schema). Persisted on the row; composed system-level at turn
867
+ // time. Not surfaced as an event.
868
+ instructions: payload.instructions ?? null,
858
869
  firstPartyMcpPermissions,
859
870
  mcpServers: sessionMcpServers.dbServers,
860
871
  sessionMcpServers: sessionMcpServers.metadata,