@opengeni/contracts 1.0.2 → 1.1.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/agent-config.d.ts +29 -8
- package/dist/artifact-catalog.d.ts +19 -0
- package/dist/atlassian.js +1 -1
- package/dist/bundled-skills.d.ts +9 -0
- package/dist/{chunk-46KLD2UH.js → chunk-6GXQBK6J.js} +2 -2
- package/dist/{chunk-X7ETVO4P.js → chunk-VSM752ZW.js} +35 -9
- package/dist/chunk-VSM752ZW.js.map +1 -0
- package/dist/connect.js +1 -1
- package/dist/connection-authority.js +2 -2
- package/dist/google-drive.js +1 -1
- package/dist/host-mcp-bindings.js +2 -2
- package/dist/index.d.ts +4 -1
- package/dist/index.js +11 -1
- package/dist/personal-github.js +1 -1
- package/package.json +1 -1
- package/src/agent-config.ts +51 -17
- package/src/artifact-catalog.ts +14 -0
- package/src/bundled-skills.ts +13 -0
- package/src/index.ts +12 -1
- package/dist/chunk-X7ETVO4P.js.map +0 -1
- /package/dist/{chunk-46KLD2UH.js.map → chunk-6GXQBK6J.js.map} +0 -0
package/dist/agent-config.d.ts
CHANGED
|
@@ -293,8 +293,15 @@ export declare const ClientAgentConfig: z.ZodObject<{
|
|
|
293
293
|
}, z.core.$strict>>;
|
|
294
294
|
}, z.core.$strict>;
|
|
295
295
|
export type ClientAgentConfig = z.infer<typeof ClientAgentConfig>;
|
|
296
|
-
/** A
|
|
296
|
+
/** A built-in MCP server's owner: a capability, or pure runtime mechanics. */
|
|
297
297
|
export type AgentToolCapability = AgentCapabilityId | "runtime";
|
|
298
|
+
/**
|
|
299
|
+
* A first-party tool's owner: a capability, pure runtime mechanics, or the
|
|
300
|
+
* attached compute (a managed sandbox or Connected Machine).
|
|
301
|
+
*/
|
|
302
|
+
export type AgentFirstPartyToolOwner = AgentToolCapability | "sandbox";
|
|
303
|
+
/** Owners no capability toggles: the runtime or the attached compute derives them. */
|
|
304
|
+
export declare function isDerivedAgentToolOwner(owner: AgentFirstPartyToolOwner): owner is "runtime" | "sandbox";
|
|
298
305
|
/**
|
|
299
306
|
* Exhaustive map from every `FIRST_PARTY_MCP_TOOL_NAMES` entry to exactly one
|
|
300
307
|
* owner. The `Record` type makes an unmapped new name a compile error, and
|
|
@@ -302,15 +309,18 @@ export type AgentToolCapability = AgentCapabilityId | "runtime";
|
|
|
302
309
|
*
|
|
303
310
|
* `runtime` tools are mechanics every agent needs regardless of what it may do:
|
|
304
311
|
* - `wait_for_input`: ends the turn and waits for the next input.
|
|
305
|
-
* - `command_read` / `command_wait`: read/await the session's own background
|
|
306
|
-
* sandbox commands (the shell already exists whenever a sandbox is attached).
|
|
307
312
|
* - `set_session_title`: session titling.
|
|
313
|
+
*
|
|
314
|
+
* `sandbox` tools are derived from attached compute and never toggled:
|
|
315
|
+
* - `command_read` / `command_wait`: read/await the session's own background
|
|
316
|
+
* commands. A command can only exist on a managed sandbox or Connected
|
|
317
|
+
* Machine, so a turn with neither attached never receives them.
|
|
308
318
|
*/
|
|
309
319
|
export declare const FIRST_PARTY_MCP_TOOL_CAPABILITIES: {
|
|
310
320
|
readonly set_session_title: "runtime";
|
|
311
321
|
readonly wait_for_input: "runtime";
|
|
312
|
-
readonly command_wait: "
|
|
313
|
-
readonly command_read: "
|
|
322
|
+
readonly command_wait: "sandbox";
|
|
323
|
+
readonly command_read: "sandbox";
|
|
314
324
|
readonly goal_set: "goals";
|
|
315
325
|
readonly goal_update: "goals";
|
|
316
326
|
readonly goal_progress: "goals";
|
|
@@ -544,7 +554,7 @@ export declare const AGENT_BUILTIN_MCP_SERVER_CAPABILITIES: {
|
|
|
544
554
|
readonly docs: "knowledge";
|
|
545
555
|
readonly "google-drive-publishing": "workspaceConnectors";
|
|
546
556
|
};
|
|
547
|
-
export declare function firstPartyMcpToolCapability(tool: FirstPartyMcpToolName):
|
|
557
|
+
export declare function firstPartyMcpToolCapability(tool: FirstPartyMcpToolName): AgentFirstPartyToolOwner;
|
|
548
558
|
/** Availability narrows configuration; it never grants a disabled capability. */
|
|
549
559
|
export type AgentToolEnvironment = {
|
|
550
560
|
/** Explicit product MCPs are independent of ambient workspace connectors. */
|
|
@@ -556,12 +566,23 @@ export type AgentToolEnvironment = {
|
|
|
556
566
|
media?: boolean | undefined;
|
|
557
567
|
hasDeferredTools?: boolean;
|
|
558
568
|
routerInHistory?: boolean;
|
|
569
|
+
/**
|
|
570
|
+
* Whether the turn has a managed sandbox or Connected Machine attached.
|
|
571
|
+
* `false` withholds the `sandbox`-owned first-party tools, which could never
|
|
572
|
+
* find a command; undefined means not yet known and keeps them.
|
|
573
|
+
*/
|
|
574
|
+
sandboxAttached?: boolean;
|
|
559
575
|
};
|
|
560
|
-
|
|
576
|
+
/** Runtime mechanics every configured agent receives. */
|
|
577
|
+
export declare const AGENT_RUNTIME_MECHANIC_TOOL_NAMES: readonly ["wait_for_input"];
|
|
578
|
+
/** First-party tools a configured agent receives whenever compute is attached. */
|
|
579
|
+
export declare const AGENT_SANDBOX_MECHANIC_TOOL_NAMES: readonly ["command_read", "command_wait"];
|
|
561
580
|
/**
|
|
562
581
|
* The one turn-time capability gate. Null means the historical attachment
|
|
563
582
|
* rules, including unconditional Skill tools and router. Resource-derived
|
|
564
|
-
* sandbox tools, product MCPs and runtime mechanics are never toggled
|
|
583
|
+
* sandbox tools, product MCPs and runtime mechanics are never toggled; the
|
|
584
|
+
* `sandbox`-owned first-party tools follow `environment.sandboxAttached` for
|
|
585
|
+
* every session, configured or not.
|
|
565
586
|
*/
|
|
566
587
|
export declare function resolveAgentToolFamilies(config: ResolvedAgentConfig | null | undefined, environment?: AgentToolEnvironment): {
|
|
567
588
|
webSearch: boolean;
|
|
@@ -26,6 +26,7 @@ export declare const ArtifactCatalogItem: z.ZodObject<{
|
|
|
26
26
|
active: "active";
|
|
27
27
|
archived: "archived";
|
|
28
28
|
}>;
|
|
29
|
+
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
29
30
|
sourceSessionId: z.ZodOptional<z.ZodString>;
|
|
30
31
|
versionId: z.ZodOptional<z.ZodString>;
|
|
31
32
|
file: z.ZodOptional<z.ZodObject<{
|
|
@@ -114,6 +115,7 @@ export declare const ArtifactCatalogListResponse: z.ZodObject<{
|
|
|
114
115
|
active: "active";
|
|
115
116
|
archived: "archived";
|
|
116
117
|
}>;
|
|
118
|
+
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
117
119
|
sourceSessionId: z.ZodOptional<z.ZodString>;
|
|
118
120
|
versionId: z.ZodOptional<z.ZodString>;
|
|
119
121
|
file: z.ZodOptional<z.ZodObject<{
|
|
@@ -159,3 +161,20 @@ export declare const ArtifactCatalogListResponse: z.ZodObject<{
|
|
|
159
161
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
160
162
|
}, z.core.$strict>;
|
|
161
163
|
export type ArtifactCatalogListResponse = z.infer<typeof ArtifactCatalogListResponse>;
|
|
164
|
+
export declare const UpdateArtifactPinRequest: z.ZodObject<{
|
|
165
|
+
pinned: z.ZodBoolean;
|
|
166
|
+
}, z.core.$strict>;
|
|
167
|
+
export type UpdateArtifactPinRequest = z.infer<typeof UpdateArtifactPinRequest>;
|
|
168
|
+
export declare const ArtifactPinResponse: z.ZodObject<{
|
|
169
|
+
kind: z.ZodEnum<{
|
|
170
|
+
document: "document";
|
|
171
|
+
file: "file";
|
|
172
|
+
image: "image";
|
|
173
|
+
presentation: "presentation";
|
|
174
|
+
site: "site";
|
|
175
|
+
spreadsheet: "spreadsheet";
|
|
176
|
+
}>;
|
|
177
|
+
artifactId: z.ZodString;
|
|
178
|
+
pinned: z.ZodBoolean;
|
|
179
|
+
}, z.core.$strict>;
|
|
180
|
+
export type ArtifactPinResponse = z.infer<typeof ArtifactPinResponse>;
|
package/dist/atlassian.js
CHANGED
package/dist/bundled-skills.d.ts
CHANGED
|
@@ -30,6 +30,15 @@ export declare const BundledSkillSelection: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
|
30
30
|
}>>, z.ZodTransform<("builtin:document-parsing" | "builtin:opengeni-client" | "builtin:opengeni-documents" | "builtin:opengeni-help" | "builtin:opengeni-presentations" | "builtin:opengeni-projects" | "builtin:opengeni-schedules" | "builtin:opengeni-sites" | "builtin:opengeni-skills" | "builtin:opengeni-spreadsheets" | "builtin:opengeni-video-generation" | "builtin:opengeni-visualize")[], ("builtin:document-parsing" | "builtin:opengeni-client" | "builtin:opengeni-documents" | "builtin:opengeni-help" | "builtin:opengeni-presentations" | "builtin:opengeni-projects" | "builtin:opengeni-schedules" | "builtin:opengeni-sites" | "builtin:opengeni-skills" | "builtin:opengeni-spreadsheets" | "builtin:opengeni-video-generation" | "builtin:opengeni-visualize")[]>>;
|
|
31
31
|
/** Undefined is defaults/inheritance; an explicit empty list disables bundles. */
|
|
32
32
|
export declare function resolveBundledSkillSelection(requested: readonly BundledSkillId[] | undefined, parent: readonly BundledSkillId[] | undefined): BundledSkillId[] | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Freeze the defaults a session's agent configuration implies. An agent that
|
|
35
|
+
* starts from `capabilities: "none"` carries no bundled Opengeni guides unless
|
|
36
|
+
* the request lists them; an explicit list (including `[]`) is kept exactly,
|
|
37
|
+
* and `"all"` or legacy (null) configurations keep the bundled defaults.
|
|
38
|
+
*/
|
|
39
|
+
export declare function bundledSkillSelectionForAgentConfig(selection: BundledSkillId[] | undefined, agentConfig: {
|
|
40
|
+
from: "all" | "none";
|
|
41
|
+
} | null | undefined): BundledSkillId[] | undefined;
|
|
33
42
|
export declare function withBundledSkillSelectionMetadata(metadata: Record<string, unknown>, ids: readonly BundledSkillId[] | undefined): Record<string, unknown>;
|
|
34
43
|
/**
|
|
35
44
|
* Exact stored selection for keyed create replay identity. Unlike the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConnectionKind,
|
|
3
3
|
SessionTenancyVisibility
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VSM752ZW.js";
|
|
5
5
|
|
|
6
6
|
// src/connection-authority.ts
|
|
7
7
|
import { z } from "zod";
|
|
@@ -183,4 +183,4 @@ export {
|
|
|
183
183
|
ConnectionUseAuditFact,
|
|
184
184
|
ConnectionUseAuthorizationResult
|
|
185
185
|
};
|
|
186
|
-
//# sourceMappingURL=chunk-
|
|
186
|
+
//# sourceMappingURL=chunk-6GXQBK6J.js.map
|
|
@@ -196,6 +196,8 @@ var ArtifactCatalogItem = z4.object({
|
|
|
196
196
|
createdAt: z4.string().datetime({ offset: true }),
|
|
197
197
|
updatedAt: z4.string().datetime({ offset: true }),
|
|
198
198
|
status: z4.enum(["active", "archived"]),
|
|
199
|
+
/** Shared workspace metadata, not content-access authority. */
|
|
200
|
+
pinned: z4.boolean().optional(),
|
|
199
201
|
sourceSessionId: z4.string().uuid().optional(),
|
|
200
202
|
versionId: z4.string().min(1).max(128).optional(),
|
|
201
203
|
file: RetainedArtifactReferenceSchema.optional(),
|
|
@@ -216,6 +218,12 @@ var ArtifactCatalogListResponse = z4.object({
|
|
|
216
218
|
items: z4.array(ArtifactCatalogItem).max(100),
|
|
217
219
|
nextCursor: z4.string().max(8192).nullable()
|
|
218
220
|
}).strict();
|
|
221
|
+
var UpdateArtifactPinRequest = z4.object({ pinned: z4.boolean() }).strict();
|
|
222
|
+
var ArtifactPinResponse = z4.object({
|
|
223
|
+
kind: ArtifactCatalogKind,
|
|
224
|
+
artifactId: z4.string().min(1).max(128),
|
|
225
|
+
pinned: z4.boolean()
|
|
226
|
+
}).strict();
|
|
219
227
|
|
|
220
228
|
// src/claude-subscription-oauth.ts
|
|
221
229
|
import { z as z5 } from "zod";
|
|
@@ -1143,11 +1151,14 @@ var ClientAgentConfig = z13.object({
|
|
|
1143
1151
|
}).strict()
|
|
1144
1152
|
)
|
|
1145
1153
|
}).strict();
|
|
1154
|
+
function isDerivedAgentToolOwner(owner) {
|
|
1155
|
+
return owner === "runtime" || owner === "sandbox";
|
|
1156
|
+
}
|
|
1146
1157
|
var FIRST_PARTY_MCP_TOOL_CAPABILITIES = {
|
|
1147
1158
|
set_session_title: "runtime",
|
|
1148
1159
|
wait_for_input: "runtime",
|
|
1149
|
-
command_wait: "
|
|
1150
|
-
command_read: "
|
|
1160
|
+
command_wait: "sandbox",
|
|
1161
|
+
command_read: "sandbox",
|
|
1151
1162
|
goal_set: "goals",
|
|
1152
1163
|
goal_update: "goals",
|
|
1153
1164
|
goal_progress: "goals",
|
|
@@ -1390,7 +1401,9 @@ function firstPartyMcpToolCapability(tool) {
|
|
|
1390
1401
|
return FIRST_PARTY_MCP_TOOL_CAPABILITIES[tool];
|
|
1391
1402
|
}
|
|
1392
1403
|
var AGENT_RUNTIME_MECHANIC_TOOL_NAMES = [
|
|
1393
|
-
"wait_for_input"
|
|
1404
|
+
"wait_for_input"
|
|
1405
|
+
];
|
|
1406
|
+
var AGENT_SANDBOX_MECHANIC_TOOL_NAMES = [
|
|
1394
1407
|
"command_read",
|
|
1395
1408
|
"command_wait"
|
|
1396
1409
|
];
|
|
@@ -1400,8 +1413,10 @@ function resolveAgentToolFamilies(config, environment = {}) {
|
|
|
1400
1413
|
const humanInput = enabled("humanInput") && environment.humanInput !== false;
|
|
1401
1414
|
const media = enabled("media") && environment.media !== false;
|
|
1402
1415
|
const skills = !config ? "manage" : enabled("skills") ? config.capabilities.skills : false;
|
|
1416
|
+
const sandboxTools = environment.sandboxAttached !== false;
|
|
1403
1417
|
const allowsFirstPartyTool = (name) => {
|
|
1404
1418
|
const owner = FIRST_PARTY_MCP_TOOL_CAPABILITIES[name];
|
|
1419
|
+
if (owner === "sandbox") return sandboxTools;
|
|
1405
1420
|
return owner === "runtime" || enabled(owner);
|
|
1406
1421
|
};
|
|
1407
1422
|
return {
|
|
@@ -1413,10 +1428,13 @@ function resolveAgentToolFamilies(config, environment = {}) {
|
|
|
1413
1428
|
router: !config || environment.hasDeferredTools === true || environment.routerInHistory === true,
|
|
1414
1429
|
allowsFirstPartyTool,
|
|
1415
1430
|
firstPartyTools(names) {
|
|
1416
|
-
return !config ?
|
|
1431
|
+
return !config ? names.filter(
|
|
1432
|
+
(name) => sandboxTools || FIRST_PARTY_MCP_TOOL_CAPABILITIES[name] !== "sandbox"
|
|
1433
|
+
) : [
|
|
1417
1434
|
.../* @__PURE__ */ new Set([
|
|
1418
1435
|
...names.filter(allowsFirstPartyTool),
|
|
1419
|
-
...AGENT_RUNTIME_MECHANIC_TOOL_NAMES
|
|
1436
|
+
...AGENT_RUNTIME_MECHANIC_TOOL_NAMES,
|
|
1437
|
+
...sandboxTools ? AGENT_SANDBOX_MECHANIC_TOOL_NAMES : []
|
|
1420
1438
|
])
|
|
1421
1439
|
];
|
|
1422
1440
|
},
|
|
@@ -1845,7 +1863,7 @@ function capabilityFilteredOut(config, id) {
|
|
|
1845
1863
|
function agentConfigFirstPartyMcpTools(config, baseline, explicit) {
|
|
1846
1864
|
for (const tool of explicit ?? []) {
|
|
1847
1865
|
const owner = FIRST_PARTY_MCP_TOOL_CAPABILITIES[tool];
|
|
1848
|
-
if (owner
|
|
1866
|
+
if (!isDerivedAgentToolOwner(owner) && capabilityFilteredOut(config, owner)) {
|
|
1849
1867
|
throw new AgentConfigError(
|
|
1850
1868
|
"agent_config_conflict",
|
|
1851
1869
|
`firstPartyMcpTools lists ${tool}, but agent capability ${owner} is off`,
|
|
@@ -1855,13 +1873,13 @@ function agentConfigFirstPartyMcpTools(config, baseline, explicit) {
|
|
|
1855
1873
|
}
|
|
1856
1874
|
return baseline.filter((tool) => {
|
|
1857
1875
|
const owner = FIRST_PARTY_MCP_TOOL_CAPABILITIES[tool];
|
|
1858
|
-
return owner
|
|
1876
|
+
return isDerivedAgentToolOwner(owner) || !capabilityFilteredOut(config, owner);
|
|
1859
1877
|
});
|
|
1860
1878
|
}
|
|
1861
1879
|
function agentConfigAddedFirstPartyMcpTools(previous, next, defaults) {
|
|
1862
1880
|
return defaults.filter((tool) => {
|
|
1863
1881
|
const owner = FIRST_PARTY_MCP_TOOL_CAPABILITIES[tool];
|
|
1864
|
-
return owner
|
|
1882
|
+
return !isDerivedAgentToolOwner(owner) && !agentCapabilityEnabled(previous, owner) && agentCapabilityEnabled(next.capabilities, owner);
|
|
1865
1883
|
});
|
|
1866
1884
|
}
|
|
1867
1885
|
function agentConfigToolRefs(input) {
|
|
@@ -2728,6 +2746,9 @@ function resolveBundledSkillSelection(requested, parent) {
|
|
|
2728
2746
|
throw new Error("A child cannot widen its parent's bundled Skill selection");
|
|
2729
2747
|
return selected === void 0 ? void 0 : BundledSkillSelection.parse(selected);
|
|
2730
2748
|
}
|
|
2749
|
+
function bundledSkillSelectionForAgentConfig(selection, agentConfig) {
|
|
2750
|
+
return selection === void 0 && agentConfig?.from === "none" ? [] : selection;
|
|
2751
|
+
}
|
|
2731
2752
|
var BUNDLED_SKILL_SELECTION_KEY = "_opengeni_bundled_skill_ids_v1";
|
|
2732
2753
|
function withBundledSkillSelectionMetadata(metadata, ids) {
|
|
2733
2754
|
const next = { ...metadata };
|
|
@@ -24391,6 +24412,8 @@ export {
|
|
|
24391
24412
|
ArtifactCatalogItem,
|
|
24392
24413
|
ArtifactCatalogListQuery,
|
|
24393
24414
|
ArtifactCatalogListResponse,
|
|
24415
|
+
UpdateArtifactPinRequest,
|
|
24416
|
+
ArtifactPinResponse,
|
|
24394
24417
|
ClaudeSubscriptionSetupTokenRequest,
|
|
24395
24418
|
ClaudeSubscriptionOAuthStartRequest,
|
|
24396
24419
|
ClaudeSubscriptionOAuthStartResponse,
|
|
@@ -24513,6 +24536,7 @@ export {
|
|
|
24513
24536
|
ResolvedAgentConfig,
|
|
24514
24537
|
UpdateSessionAgentRequest,
|
|
24515
24538
|
ClientAgentConfig,
|
|
24539
|
+
isDerivedAgentToolOwner,
|
|
24516
24540
|
FIRST_PARTY_MCP_TOOL_CAPABILITIES,
|
|
24517
24541
|
AGENT_FUNCTION_TOOL_CAPABILITIES,
|
|
24518
24542
|
resolveAgentMediaToolSurface,
|
|
@@ -24521,6 +24545,7 @@ export {
|
|
|
24521
24545
|
AGENT_BUILTIN_MCP_SERVER_CAPABILITIES,
|
|
24522
24546
|
firstPartyMcpToolCapability,
|
|
24523
24547
|
AGENT_RUNTIME_MECHANIC_TOOL_NAMES,
|
|
24548
|
+
AGENT_SANDBOX_MECHANIC_TOOL_NAMES,
|
|
24524
24549
|
resolveAgentToolFamilies,
|
|
24525
24550
|
firstPartyMcpToolsForCapability,
|
|
24526
24551
|
AGENT_CAPABILITY_DESCRIPTIONS,
|
|
@@ -24643,6 +24668,7 @@ export {
|
|
|
24643
24668
|
BundledSkillId,
|
|
24644
24669
|
BundledSkillSelection,
|
|
24645
24670
|
resolveBundledSkillSelection,
|
|
24671
|
+
bundledSkillSelectionForAgentConfig,
|
|
24646
24672
|
withBundledSkillSelectionMetadata,
|
|
24647
24673
|
storedBundledSkillSelectionIdentity,
|
|
24648
24674
|
bundledSkillSelectionFromMetadata,
|
|
@@ -26541,4 +26567,4 @@ export {
|
|
|
26541
26567
|
AtlassianDisconnectRequest,
|
|
26542
26568
|
atlassianScopesAllowRead
|
|
26543
26569
|
};
|
|
26544
|
-
//# sourceMappingURL=chunk-
|
|
26570
|
+
//# sourceMappingURL=chunk-VSM752ZW.js.map
|