@opengeni/contracts 0.22.0 → 0.23.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 +268 -76
- package/dist/index.js +20 -32
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +70 -65
package/dist/index.js
CHANGED
|
@@ -2691,13 +2691,7 @@ var FIRST_PARTY_MCP_TOOL_NAMES = [
|
|
|
2691
2691
|
"slack_bot_post_message"
|
|
2692
2692
|
];
|
|
2693
2693
|
var FirstPartyMcpToolName = z3.enum(FIRST_PARTY_MCP_TOOL_NAMES);
|
|
2694
|
-
var DEFAULT_FIRST_PARTY_MCP_TOOLS =
|
|
2695
|
-
"set_session_title",
|
|
2696
|
-
"goal_set",
|
|
2697
|
-
"goal_update",
|
|
2698
|
-
"goal_complete",
|
|
2699
|
-
"goal_pause"
|
|
2700
|
-
];
|
|
2694
|
+
var DEFAULT_FIRST_PARTY_MCP_TOOLS = FIRST_PARTY_MCP_TOOL_NAMES;
|
|
2701
2695
|
function prefixedMcpToolName(registryId2, toolName) {
|
|
2702
2696
|
return `${registryId2}__${toolName}`;
|
|
2703
2697
|
}
|
|
@@ -3926,7 +3920,7 @@ var ToolRef = z3.object({
|
|
|
3926
3920
|
var registryId = /^[A-Za-z0-9_-]+$/;
|
|
3927
3921
|
var SessionMcpServerId = z3.string().min(1).regex(registryId);
|
|
3928
3922
|
var SessionToolPolicy = z3.object({
|
|
3929
|
-
mode: z3.enum(["workspace_default", "explicit", "inherited"
|
|
3923
|
+
mode: z3.enum(["workspace_default", "explicit", "inherited"]),
|
|
3930
3924
|
inheritedFromSessionId: z3.string().uuid().nullable()
|
|
3931
3925
|
});
|
|
3932
3926
|
var SESSION_EFFECTIVE_TOOL_POLICY_ID_LIMIT = 64;
|
|
@@ -3934,7 +3928,7 @@ var SESSION_EFFECTIVE_TOOL_POLICY_ID_MAX_LENGTH = 200;
|
|
|
3934
3928
|
var SessionEffectiveToolPolicyId = z3.string().min(1).max(SESSION_EFFECTIVE_TOOL_POLICY_ID_MAX_LENGTH).regex(registryId);
|
|
3935
3929
|
var SessionEffectiveToolPolicyIds = z3.array(SessionEffectiveToolPolicyId).max(SESSION_EFFECTIVE_TOOL_POLICY_ID_LIMIT);
|
|
3936
3930
|
var SessionEffectiveToolPolicy = z3.object({
|
|
3937
|
-
mode: z3.enum(["workspace_default", "explicit", "inherited"
|
|
3931
|
+
mode: z3.enum(["workspace_default", "explicit", "inherited"]),
|
|
3938
3932
|
inheritedFromSessionId: z3.string().uuid().nullable(),
|
|
3939
3933
|
selectedIds: SessionEffectiveToolPolicyIds,
|
|
3940
3934
|
effectiveIds: SessionEffectiveToolPolicyIds,
|
|
@@ -4216,8 +4210,9 @@ var UpdateSessionToolPolicyRequest = z3.union([
|
|
|
4216
4210
|
expectedVersion: z3.number().int().positive()
|
|
4217
4211
|
}).strict(),
|
|
4218
4212
|
z3.object({
|
|
4219
|
-
mode: z3.literal("explicit")
|
|
4213
|
+
mode: z3.literal("explicit"),
|
|
4220
4214
|
tools: z3.array(ToolRef).max(64),
|
|
4215
|
+
firstPartyMcpTools: z3.array(FirstPartyMcpToolName),
|
|
4221
4216
|
expectedVersion: z3.number().int().positive()
|
|
4222
4217
|
}).strict()
|
|
4223
4218
|
]);
|
|
@@ -4440,10 +4435,6 @@ var ComposerDraft = z3.object({
|
|
|
4440
4435
|
revision: z3.number().int().nonnegative(),
|
|
4441
4436
|
text: z3.string(),
|
|
4442
4437
|
resources: z3.array(ResourceRef),
|
|
4443
|
-
tools: z3.array(ToolRef),
|
|
4444
|
-
// False means the draft inherits the session policy. True preserves an
|
|
4445
|
-
// explicit array, including [], across autosave/reload and queue checkout.
|
|
4446
|
-
toolsProvided: z3.boolean().default(false),
|
|
4447
4438
|
model: z3.string().min(1),
|
|
4448
4439
|
reasoningEffort: ReasoningEffort,
|
|
4449
4440
|
sourceTurnId: z3.string().uuid().nullable(),
|
|
@@ -4474,8 +4465,6 @@ var DeleteSessionQueueItemRequest = z3.object({
|
|
|
4474
4465
|
var SaveComposerDraftRequest = ComposerDraft.pick({
|
|
4475
4466
|
text: true,
|
|
4476
4467
|
resources: true,
|
|
4477
|
-
tools: true,
|
|
4478
|
-
toolsProvided: true,
|
|
4479
4468
|
model: true,
|
|
4480
4469
|
reasoningEffort: true
|
|
4481
4470
|
}).extend({ expectedRevision: z3.number().int().nonnegative() });
|
|
@@ -4486,7 +4475,8 @@ var NewSessionDraftOptions = z3.object({
|
|
|
4486
4475
|
variableSetId: z3.string().uuid().optional(),
|
|
4487
4476
|
rigId: z3.string().uuid().optional(),
|
|
4488
4477
|
goal: GoalSpec.optional(),
|
|
4489
|
-
firstPartyMcpPermissions: z3.array(Permission).optional()
|
|
4478
|
+
firstPartyMcpPermissions: z3.array(Permission).optional(),
|
|
4479
|
+
firstPartyMcpTools: z3.array(FirstPartyMcpToolName).optional()
|
|
4490
4480
|
});
|
|
4491
4481
|
var NewSessionDraft = z3.object({
|
|
4492
4482
|
revision: z3.number().int().nonnegative(),
|
|
@@ -5577,13 +5567,9 @@ var Session = z3.object({
|
|
|
5577
5567
|
resources: z3.array(ResourceRef),
|
|
5578
5568
|
skills: SessionSkills.default([]),
|
|
5579
5569
|
tools: z3.array(ToolRef),
|
|
5580
|
-
// Origin
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
// Optimistic-concurrency fence for durable policy mutations. Optional for
|
|
5584
|
-
// older clients/fixtures; current servers always emit the authoritative
|
|
5585
|
-
// value.
|
|
5586
|
-
toolPolicyVersion: z3.number().int().positive().optional(),
|
|
5570
|
+
// Origin and optimistic-concurrency fence for the durable session policy.
|
|
5571
|
+
toolPolicy: SessionToolPolicy,
|
|
5572
|
+
toolPolicyVersion: z3.number().int().positive(),
|
|
5587
5573
|
// Secret-safe current resolution, computed at an API/read or execution
|
|
5588
5574
|
// boundary from IDs only. Optional because internal DB readers need not load
|
|
5589
5575
|
// the workspace runtime registry.
|
|
@@ -5620,9 +5606,9 @@ var Session = z3.object({
|
|
|
5620
5606
|
// Non-default first-party MCP token permissions (manager-style sessions);
|
|
5621
5607
|
// null means the fixed worker default set.
|
|
5622
5608
|
firstPartyMcpPermissions: z3.array(Permission).nullable(),
|
|
5623
|
-
//
|
|
5624
|
-
//
|
|
5625
|
-
firstPartyMcpTools: z3.array(FirstPartyMcpToolName)
|
|
5609
|
+
// Exact model-visible OpenGeni selection. All catalogued tools are selected
|
|
5610
|
+
// by default; [] intentionally selects none.
|
|
5611
|
+
firstPartyMcpTools: z3.array(FirstPartyMcpToolName),
|
|
5626
5612
|
// Per-session third-party MCP servers, metadata only. Credential values are
|
|
5627
5613
|
// write-only and never appear here.
|
|
5628
5614
|
mcpServers: z3.array(SessionMcpServerMetadata).default([]),
|
|
@@ -7319,7 +7305,7 @@ var CreateSessionRequest = withVariableSetIdAlias({
|
|
|
7319
7305
|
// rejected; creation never silently expands a child beyond that set.
|
|
7320
7306
|
firstPartyMcpPermissions: z3.array(Permission).optional(),
|
|
7321
7307
|
// Exact model-visible selection from the broad first-party OpenGeni MCP
|
|
7322
|
-
// catalog.
|
|
7308
|
+
// catalog. Omission selects the full catalog; [] intentionally exposes none.
|
|
7323
7309
|
// This does not grant authority: every registered tool is permission-gated.
|
|
7324
7310
|
firstPartyMcpTools: z3.array(FirstPartyMcpToolName).optional(),
|
|
7325
7311
|
// Third-party MCP servers attached only to this session. For an agent-created
|
|
@@ -7485,7 +7471,6 @@ var ClientSessionEvent = z3.discriminatedUnion("type", [
|
|
|
7485
7471
|
// turn for retry/recovery, never copied into the visible user message.
|
|
7486
7472
|
turnInstructions: z3.string().trim().min(1).max(32768).optional(),
|
|
7487
7473
|
resources: z3.array(ResourceRef).default([]),
|
|
7488
|
-
tools: z3.array(ToolRef).default([]),
|
|
7489
7474
|
model: z3.string().min(1).optional(),
|
|
7490
7475
|
reasoningEffort: ReasoningEffort.optional(),
|
|
7491
7476
|
controlEtag: z3.string().min(1).optional(),
|
|
@@ -7493,7 +7478,7 @@ var ClientSessionEvent = z3.discriminatedUnion("type", [
|
|
|
7493
7478
|
// Header-value rotation only. URL/name/tool settings are immutable after
|
|
7494
7479
|
// session create; persisted events expose metadata, never header values.
|
|
7495
7480
|
mcpCredentialUpdates: z3.array(SessionMcpCredentialUpdateInput).optional()
|
|
7496
|
-
})
|
|
7481
|
+
}).strict()
|
|
7497
7482
|
}),
|
|
7498
7483
|
z3.object({
|
|
7499
7484
|
type: z3.literal("user.approvalDecision"),
|
|
@@ -7518,14 +7503,13 @@ var SteerSessionMessageRequest = z3.object({
|
|
|
7518
7503
|
// Same per-turn system-level context as a queued user.message.
|
|
7519
7504
|
turnInstructions: z3.string().trim().min(1).max(32768).optional(),
|
|
7520
7505
|
resources: z3.array(ResourceRef).default([]),
|
|
7521
|
-
tools: z3.array(ToolRef).default([]),
|
|
7522
7506
|
model: z3.string().min(1).optional(),
|
|
7523
7507
|
reasoningEffort: ReasoningEffort.optional(),
|
|
7524
7508
|
clientEventId: SessionOperationKey.optional(),
|
|
7525
7509
|
controlEtag: z3.string().min(1).optional(),
|
|
7526
7510
|
expectedDraftRevision: z3.number().int().nonnegative().optional(),
|
|
7527
7511
|
mcpCredentialUpdates: z3.array(SessionMcpCredentialUpdateInput).optional()
|
|
7528
|
-
});
|
|
7512
|
+
}).strict();
|
|
7529
7513
|
var SteerSessionMessageResponse = z3.object({
|
|
7530
7514
|
accepted: SessionEvent,
|
|
7531
7515
|
turn: SessionTurn
|
|
@@ -7555,6 +7539,7 @@ var GitHubRepository = z3.object({
|
|
|
7555
7539
|
});
|
|
7556
7540
|
var GitHubRepositoryScope = z3.enum(["all", "selected"]);
|
|
7557
7541
|
var GitHubBindingStatus = z3.enum(["disabled", "unbound", "bound"]);
|
|
7542
|
+
var GitHubAppSetupMode = z3.enum(["platform", "operator"]);
|
|
7558
7543
|
var GitHubInstallationLifecycle = z3.enum(["active", "suspended", "deleted", "unverified"]);
|
|
7559
7544
|
var GitHubInstallationBinding = z3.object({
|
|
7560
7545
|
installationId: z3.number().int().positive(),
|
|
@@ -7564,12 +7549,14 @@ var GitHubInstallationBinding = z3.object({
|
|
|
7564
7549
|
lifecycle: GitHubInstallationLifecycle,
|
|
7565
7550
|
repositoryScope: GitHubRepositoryScope,
|
|
7566
7551
|
repositoryCount: z3.number().int().nonnegative(),
|
|
7552
|
+
configureUrl: z3.string().url().nullable(),
|
|
7567
7553
|
createdAt: z3.string(),
|
|
7568
7554
|
updatedAt: z3.string()
|
|
7569
7555
|
});
|
|
7570
7556
|
var GitHubAppInfo = z3.object({
|
|
7571
7557
|
configured: z3.boolean(),
|
|
7572
7558
|
status: GitHubBindingStatus,
|
|
7559
|
+
setupMode: GitHubAppSetupMode,
|
|
7573
7560
|
appId: z3.string().nullable(),
|
|
7574
7561
|
clientId: z3.string().nullable(),
|
|
7575
7562
|
appSlug: z3.string().nullable(),
|
|
@@ -8478,6 +8465,7 @@ export {
|
|
|
8478
8465
|
GitFileStatusCode,
|
|
8479
8466
|
GitHubAppInfo,
|
|
8480
8467
|
GitHubAppManifestCreate,
|
|
8468
|
+
GitHubAppSetupMode,
|
|
8481
8469
|
GitHubBindingStatus,
|
|
8482
8470
|
GitHubInstallationBinding,
|
|
8483
8471
|
GitHubInstallationLifecycle,
|