@opengeni/contracts 0.5.0 → 0.7.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 +4 -15
- package/dist/index.js +17 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +17 -14
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -429,20 +429,6 @@ export const ErrorEnvelope = z.object({
|
|
|
429
429
|
});
|
|
430
430
|
export type ErrorEnvelope = z.infer<typeof ErrorEnvelope>;
|
|
431
431
|
|
|
432
|
-
export const PageInfo = z.object({
|
|
433
|
-
limit: z.number().int().positive(),
|
|
434
|
-
nextCursor: z.string().nullable(),
|
|
435
|
-
hasMore: z.boolean(),
|
|
436
|
-
});
|
|
437
|
-
export type PageInfo = z.infer<typeof PageInfo>;
|
|
438
|
-
|
|
439
|
-
export function paginated<T extends z.ZodTypeAny>(item: T) {
|
|
440
|
-
return z.object({
|
|
441
|
-
data: z.array(item),
|
|
442
|
-
page: PageInfo,
|
|
443
|
-
});
|
|
444
|
-
}
|
|
445
|
-
|
|
446
432
|
export const Permission = z.enum([
|
|
447
433
|
"account:read",
|
|
448
434
|
"account:admin",
|
|
@@ -2183,6 +2169,10 @@ export const Session = z.object({
|
|
|
2183
2169
|
initialMessage: z.string(),
|
|
2184
2170
|
title: z.string().nullable(),
|
|
2185
2171
|
titleSource: z.enum(["user", "agent"]).nullable(),
|
|
2172
|
+
// Per-session agent persona/system instructions supplied at create. Org-visible
|
|
2173
|
+
// metadata (exposed like title/goal), never a secret and never a timeline event.
|
|
2174
|
+
// null when the session carried none.
|
|
2175
|
+
instructions: z.string().nullable(),
|
|
2186
2176
|
resources: z.array(ResourceRef),
|
|
2187
2177
|
tools: z.array(ToolRef),
|
|
2188
2178
|
metadata: z.record(z.string(), z.unknown()),
|
|
@@ -2779,6 +2769,15 @@ export type SessionEvent = z.infer<typeof SessionEvent>;
|
|
|
2779
2769
|
|
|
2780
2770
|
export const CreateSessionRequest = z.object({
|
|
2781
2771
|
initialMessage: z.string().min(1),
|
|
2772
|
+
// Per-session agent persona/system instructions (org-visible metadata, NOT a
|
|
2773
|
+
// secret). Rides the SAME system-level instructions channel the per-workspace
|
|
2774
|
+
// agentInstructions rides, composed AFTER the workspace persona so it refines
|
|
2775
|
+
// it for this one session — how a host delivers per-agent-type prompts without
|
|
2776
|
+
// leaking them into the user-visible timeline (it is NEVER emitted as an
|
|
2777
|
+
// event, unlike goal/initialMessage). Trimmed, non-empty. The 32768-char cap
|
|
2778
|
+
// matches the codebase's largest free-form string convention (workspace
|
|
2779
|
+
// environment variable values). Absent ⇒ byte-identical to today.
|
|
2780
|
+
instructions: z.string().trim().min(1).max(32768).optional(),
|
|
2782
2781
|
resources: z.array(ResourceRef).default([]),
|
|
2783
2782
|
tools: z.array(ToolRef).default([]),
|
|
2784
2783
|
metadata: z.record(z.string(), z.unknown()).default({}),
|
|
@@ -3480,6 +3479,10 @@ export type ClientModel = z.infer<typeof ClientModel>;
|
|
|
3480
3479
|
|
|
3481
3480
|
export const ClientConfig = z.object({
|
|
3482
3481
|
deploymentRevision: z.string(),
|
|
3482
|
+
// Release-train version of the server (absent on dev/source builds). The
|
|
3483
|
+
// compatibility policy lives in docs/architecture.md — clients within the
|
|
3484
|
+
// same major are supported; evolution is additive within a major.
|
|
3485
|
+
serverVersion: z.string().optional(),
|
|
3483
3486
|
defaultModel: z.string(),
|
|
3484
3487
|
allowedModels: z.array(z.string()).min(1),
|
|
3485
3488
|
// Richer model list (provider-grouped) for the picker. Defaults to [] for
|