@opengeni/contracts 0.5.0 → 0.6.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.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +13 -0
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -2183,6 +2183,10 @@ export const Session = z.object({
|
|
|
2183
2183
|
initialMessage: z.string(),
|
|
2184
2184
|
title: z.string().nullable(),
|
|
2185
2185
|
titleSource: z.enum(["user", "agent"]).nullable(),
|
|
2186
|
+
// Per-session agent persona/system instructions supplied at create. Org-visible
|
|
2187
|
+
// metadata (exposed like title/goal), never a secret and never a timeline event.
|
|
2188
|
+
// null when the session carried none.
|
|
2189
|
+
instructions: z.string().nullable(),
|
|
2186
2190
|
resources: z.array(ResourceRef),
|
|
2187
2191
|
tools: z.array(ToolRef),
|
|
2188
2192
|
metadata: z.record(z.string(), z.unknown()),
|
|
@@ -2779,6 +2783,15 @@ export type SessionEvent = z.infer<typeof SessionEvent>;
|
|
|
2779
2783
|
|
|
2780
2784
|
export const CreateSessionRequest = z.object({
|
|
2781
2785
|
initialMessage: z.string().min(1),
|
|
2786
|
+
// Per-session agent persona/system instructions (org-visible metadata, NOT a
|
|
2787
|
+
// secret). Rides the SAME system-level instructions channel the per-workspace
|
|
2788
|
+
// agentInstructions rides, composed AFTER the workspace persona so it refines
|
|
2789
|
+
// it for this one session — how a host delivers per-agent-type prompts without
|
|
2790
|
+
// leaking them into the user-visible timeline (it is NEVER emitted as an
|
|
2791
|
+
// event, unlike goal/initialMessage). Trimmed, non-empty. The 32768-char cap
|
|
2792
|
+
// matches the codebase's largest free-form string convention (workspace
|
|
2793
|
+
// environment variable values). Absent ⇒ byte-identical to today.
|
|
2794
|
+
instructions: z.string().trim().min(1).max(32768).optional(),
|
|
2782
2795
|
resources: z.array(ResourceRef).default([]),
|
|
2783
2796
|
tools: z.array(ToolRef).default([]),
|
|
2784
2797
|
metadata: z.record(z.string(), z.unknown()).default({}),
|