@yaklabs-ai/plugin-protocol 0.51.0 → 0.52.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/README.md +1 -1
- package/THIRD-PARTY-INVENTORY.json +1 -1
- package/dist/index.d.ts +779 -120
- package/dist/index.js +1125 -939
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -266,8 +266,9 @@ var JsonSchema = z4.record(z4.string(), JsonValue);
|
|
|
266
266
|
var KAY_PLUGIN_MANIFEST_SIZE_CAP_BYTES = 1024 * 1024;
|
|
267
267
|
var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
|
|
268
268
|
var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@bonsai/plugin-protocol";
|
|
269
|
-
var KAY_PLUGIN_SDK_VERSION = "0.
|
|
269
|
+
var KAY_PLUGIN_SDK_VERSION = "0.52.0";
|
|
270
270
|
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
271
|
+
"0.51.0",
|
|
271
272
|
"0.50.0",
|
|
272
273
|
"0.49.0"
|
|
273
274
|
];
|
|
@@ -1233,7 +1234,7 @@ function finalizeArtifactProvenanceEnvelope(capture, artifacts) {
|
|
|
1233
1234
|
}
|
|
1234
1235
|
|
|
1235
1236
|
// packages/plugin-protocol/dist/authority.js
|
|
1236
|
-
import { z as
|
|
1237
|
+
import { z as z11 } from "zod";
|
|
1237
1238
|
|
|
1238
1239
|
// packages/plugin-protocol/dist/permissions.js
|
|
1239
1240
|
var permissions_exports = {};
|
|
@@ -1268,7 +1269,7 @@ __export(permissions_exports, {
|
|
|
1268
1269
|
retiredPermissionAsksIn: () => retiredPermissionAsksIn,
|
|
1269
1270
|
webSessionPathWithinPrefix: () => webSessionPathWithinPrefix
|
|
1270
1271
|
});
|
|
1271
|
-
import { z as
|
|
1272
|
+
import { z as z10 } from "zod";
|
|
1272
1273
|
|
|
1273
1274
|
// packages/plugin-protocol/dist/ids.js
|
|
1274
1275
|
function resolvePluginNamespace(pluginId, namespace) {
|
|
@@ -1296,6 +1297,50 @@ function resolveAdapterId(globalId, declaredAdapterId) {
|
|
|
1296
1297
|
return declaredAdapterId ?? globalId;
|
|
1297
1298
|
}
|
|
1298
1299
|
|
|
1300
|
+
// packages/plugin-protocol/dist/sign-in-facts.js
|
|
1301
|
+
import { z as z9 } from "zod";
|
|
1302
|
+
var Label = z9.string().min(1).max(120).refine((value) => value.trim().length > 0);
|
|
1303
|
+
var SetupText = z9.string().min(1).max(2048).refine((value) => value.trim().length > 0);
|
|
1304
|
+
var ClientFieldValidation = z9.discriminatedUnion("kind", [
|
|
1305
|
+
z9.strictObject({ kind: z9.literal("uuid") }),
|
|
1306
|
+
z9.strictObject({
|
|
1307
|
+
kind: z9.literal("suffix"),
|
|
1308
|
+
value: z9.string().min(1).max(120)
|
|
1309
|
+
})
|
|
1310
|
+
]);
|
|
1311
|
+
var PluginByoocProfile = z9.strictObject({
|
|
1312
|
+
displayName: Label,
|
|
1313
|
+
fields: z9.array(z9.strictObject({
|
|
1314
|
+
id: z9.string().regex(/^[A-Za-z][A-Za-z0-9]{0,63}$/),
|
|
1315
|
+
label: Label,
|
|
1316
|
+
optional: z9.boolean().optional(),
|
|
1317
|
+
validation: ClientFieldValidation.optional(),
|
|
1318
|
+
failureMessage: SetupText.optional()
|
|
1319
|
+
})).min(1).max(8).refine((fields) => fields[0]?.id === "clientId", {
|
|
1320
|
+
message: "the first BYOOC field must be clientId"
|
|
1321
|
+
}).refine((fields) => new Set(fields.map((field) => field.id)).size === fields.length, {
|
|
1322
|
+
message: "BYOOC field ids must be unique"
|
|
1323
|
+
}),
|
|
1324
|
+
setup: z9.strictObject({
|
|
1325
|
+
steps: z9.array(SetupText).min(1).max(20),
|
|
1326
|
+
notes: z9.array(SetupText).max(20),
|
|
1327
|
+
url: z9.url().startsWith("https://")
|
|
1328
|
+
}),
|
|
1329
|
+
endpointTemplates: z9.strictObject({
|
|
1330
|
+
authorizationUrl: z9.string().min(1).max(512),
|
|
1331
|
+
tokenUrl: z9.string().min(1).max(512)
|
|
1332
|
+
}).optional()
|
|
1333
|
+
});
|
|
1334
|
+
var PluginPickerRound = z9.strictObject({
|
|
1335
|
+
scopes: z9.array(z9.string().min(1).max(512)).min(1).max(16),
|
|
1336
|
+
extraAuthorizeParams: z9.record(z9.string().min(1), z9.string()),
|
|
1337
|
+
redirectParam: z9.string().min(1).max(120),
|
|
1338
|
+
requiresGrantedScope: z9.string().min(1).max(512),
|
|
1339
|
+
supersededByScopes: z9.array(z9.string().min(1).max(512)).max(16),
|
|
1340
|
+
purpose: Label,
|
|
1341
|
+
displayNoun: Label
|
|
1342
|
+
});
|
|
1343
|
+
|
|
1299
1344
|
// packages/plugin-protocol/dist/permissions.js
|
|
1300
1345
|
var WEB_SESSION_CSRF_SELECTOR_PATTERN = /^(?=.)(?:[a-zA-Z][a-zA-Z0-9-]*)?(?:#[a-zA-Z_][\w-]*|\[[a-zA-Z_:][\w:.-]*(?:=(?:"[^"]*"|'[^']*'|[\w-]+))?\])*$/u;
|
|
1301
1346
|
var RETIRED_PERMISSION_ASK_KEYS = [
|
|
@@ -1321,39 +1366,39 @@ var RETIRED_PERMISSION_ASK_KEYS = [
|
|
|
1321
1366
|
var RETIRED_WEB_SESSION_ROW_KEYS = ["operations"];
|
|
1322
1367
|
function createPermissionsSchemas(canonical) {
|
|
1323
1368
|
const { AuthSchemeReference: AuthSchemeReference2, AuthServiceReference: AuthServiceReference2, GlobalContributionId: GlobalContributionId2, LocalContributionId: LocalContributionId2, NonEmptyString: NonEmptyString3 } = canonical ? canonicalCommonSchemas : common_exports;
|
|
1324
|
-
const AuthGrantOperation2 =
|
|
1369
|
+
const AuthGrantOperation2 = z10.enum([
|
|
1325
1370
|
"status",
|
|
1326
1371
|
"list",
|
|
1327
1372
|
"connect",
|
|
1328
1373
|
"disconnect",
|
|
1329
1374
|
"resolve"
|
|
1330
1375
|
]);
|
|
1331
|
-
const AuthAccountSelector2 =
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
kind:
|
|
1376
|
+
const AuthAccountSelector2 = z10.discriminatedUnion("kind", [
|
|
1377
|
+
z10.strictObject({ kind: z10.literal("active") }),
|
|
1378
|
+
z10.strictObject({
|
|
1379
|
+
kind: z10.literal("account-id"),
|
|
1335
1380
|
accountId: NonEmptyString3
|
|
1336
1381
|
}),
|
|
1337
|
-
|
|
1382
|
+
z10.strictObject({ kind: z10.literal("record-id"), recordId: NonEmptyString3 })
|
|
1338
1383
|
]);
|
|
1339
|
-
const AuthScopeDefinition2 =
|
|
1384
|
+
const AuthScopeDefinition2 = z10.strictObject({
|
|
1340
1385
|
id: NonEmptyString3,
|
|
1341
1386
|
label: NonEmptyString3,
|
|
1342
1387
|
description: NonEmptyString3,
|
|
1343
|
-
documentationUrl:
|
|
1388
|
+
documentationUrl: z10.url().optional()
|
|
1344
1389
|
});
|
|
1345
|
-
const ScopeNeed2 =
|
|
1390
|
+
const ScopeNeed2 = z10.strictObject({
|
|
1346
1391
|
scope: NonEmptyString3,
|
|
1347
1392
|
reason: NonEmptyString3.exactOptional()
|
|
1348
1393
|
});
|
|
1349
|
-
const ScopeAlternative2 =
|
|
1350
|
-
allOf:
|
|
1394
|
+
const ScopeAlternative2 = z10.strictObject({
|
|
1395
|
+
allOf: z10.array(ScopeNeed2).min(1)
|
|
1351
1396
|
});
|
|
1352
|
-
const ScopeRequirement2 =
|
|
1397
|
+
const ScopeRequirement2 = z10.strictObject({
|
|
1353
1398
|
purpose: NonEmptyString3,
|
|
1354
|
-
alternatives:
|
|
1399
|
+
alternatives: z10.array(ScopeAlternative2).min(1)
|
|
1355
1400
|
});
|
|
1356
|
-
const AuthGrantFrontDoor2 =
|
|
1401
|
+
const AuthGrantFrontDoor2 = z10.strictObject({
|
|
1357
1402
|
/**
|
|
1358
1403
|
* The door id: the id `service_connect` takes (`gmail`). Never a registered auth service's id, and
|
|
1359
1404
|
* not the grant's `service`, which names the shared sign-in the door expands.
|
|
@@ -1365,15 +1410,20 @@ function createPermissionsSchemas(canonical) {
|
|
|
1365
1410
|
* first connect chains into a pick. `selection`: the scope already reaches every file of the
|
|
1366
1411
|
* type, and the pick only records which ones the person meant.
|
|
1367
1412
|
*/
|
|
1368
|
-
resourcePicker:
|
|
1369
|
-
effect:
|
|
1413
|
+
resourcePicker: z10.strictObject({
|
|
1414
|
+
effect: z10.enum(["selection", "resource-grant"]),
|
|
1370
1415
|
/** The file types the picker offers. */
|
|
1371
|
-
mimeTypes:
|
|
1416
|
+
mimeTypes: z10.array(NonEmptyString3.max(255)).min(1).max(32).optional(),
|
|
1372
1417
|
/** What the agent is told about the picked set once the pick lands. */
|
|
1373
|
-
successNote: NonEmptyString3.max(2048).optional()
|
|
1418
|
+
successNote: NonEmptyString3.max(2048).optional(),
|
|
1419
|
+
round: PluginPickerRound.optional(),
|
|
1420
|
+
completion: z10.strictObject({
|
|
1421
|
+
pluginId: z10.string().min(1),
|
|
1422
|
+
moduleId: z10.string().min(1)
|
|
1423
|
+
}).optional()
|
|
1374
1424
|
}).optional()
|
|
1375
1425
|
});
|
|
1376
|
-
const AuthGrantRequestBase =
|
|
1426
|
+
const AuthGrantRequestBase = z10.strictObject({
|
|
1377
1427
|
// A local (undotted) service must be declared in this same manifest; a
|
|
1378
1428
|
// qualified (dotted) service names another plugin's global id and is an
|
|
1379
1429
|
// external service dependency, recorded on the resolved contract's
|
|
@@ -1382,22 +1432,22 @@ function createPermissionsSchemas(canonical) {
|
|
|
1382
1432
|
// Optional for backward compatibility with grants whose service has a
|
|
1383
1433
|
// single unambiguous scheme. Local ids resolve under the service owner's
|
|
1384
1434
|
// namespace; qualified ids are preserved.
|
|
1385
|
-
schemes:
|
|
1386
|
-
operations:
|
|
1387
|
-
purposes:
|
|
1435
|
+
schemes: z10.array(AuthSchemeReference2).min(1).optional(),
|
|
1436
|
+
operations: z10.array(AuthGrantOperation2).min(1),
|
|
1437
|
+
purposes: z10.array(NonEmptyString3).optional(),
|
|
1388
1438
|
// Bridged by the runtime into an enforceable `CredentialGrant`:
|
|
1389
1439
|
// `allowedScopes` is the caller's scope ENVELOPE and
|
|
1390
1440
|
// `accountSelectors` map through. Absent `accountSelectors` resolves to the
|
|
1391
1441
|
// narrowest bound (see `ResolvedAuthGrantRequest`); absent scope envelope
|
|
1392
1442
|
// leaves the bridged grant scope-agnostic.
|
|
1393
|
-
allowedScopes:
|
|
1443
|
+
allowedScopes: z10.array(NonEmptyString3).min(1).optional(),
|
|
1394
1444
|
// Legacy spelling for `allowedScopes`; new manifests should use the authority-shaped name.
|
|
1395
|
-
requiredScopes:
|
|
1445
|
+
requiredScopes: z10.array(NonEmptyString3).min(1).optional(),
|
|
1396
1446
|
// Preferred proactive consent bundle; runtime resolution still uses `scopeRequirement`.
|
|
1397
|
-
connectScopes:
|
|
1447
|
+
connectScopes: z10.array(NonEmptyString3).min(1).optional(),
|
|
1398
1448
|
scopeRequirement: ScopeRequirement2.optional(),
|
|
1399
|
-
scopeDefinitions:
|
|
1400
|
-
accountSelectors:
|
|
1449
|
+
scopeDefinitions: z10.array(AuthScopeDefinition2).min(1).optional(),
|
|
1450
|
+
accountSelectors: z10.array(AuthAccountSelector2).min(1).optional(),
|
|
1401
1451
|
frontDoor: AuthGrantFrontDoor2.optional()
|
|
1402
1452
|
});
|
|
1403
1453
|
function validateAuthGrantRequest(grant, ctx) {
|
|
@@ -1485,19 +1535,19 @@ function createPermissionsSchemas(canonical) {
|
|
|
1485
1535
|
}
|
|
1486
1536
|
}
|
|
1487
1537
|
const AuthGrantRequest2 = AuthGrantRequestBase.superRefine(validateAuthGrantRequest);
|
|
1488
|
-
const StorageGrantRequest2 =
|
|
1489
|
-
kind:
|
|
1490
|
-
operations:
|
|
1538
|
+
const StorageGrantRequest2 = z10.strictObject({
|
|
1539
|
+
kind: z10.enum(["sqlite", "dataDir"]),
|
|
1540
|
+
operations: z10.array(z10.enum(["open", "read", "write"])).min(1)
|
|
1491
1541
|
});
|
|
1492
|
-
const EventGrantRequest2 =
|
|
1542
|
+
const EventGrantRequest2 = z10.strictObject({
|
|
1493
1543
|
event: NonEmptyString3,
|
|
1494
|
-
operations:
|
|
1544
|
+
operations: z10.array(z10.enum(["subscribe", "publish"])).min(1)
|
|
1495
1545
|
});
|
|
1496
|
-
const EndpointGrantRequest2 =
|
|
1546
|
+
const EndpointGrantRequest2 = z10.strictObject({
|
|
1497
1547
|
endpoint: LocalContributionId2,
|
|
1498
|
-
operations:
|
|
1548
|
+
operations: z10.array(z10.enum(["register", "invoke"])).min(1)
|
|
1499
1549
|
});
|
|
1500
|
-
const WebSessionOrigin =
|
|
1550
|
+
const WebSessionOrigin = z10.string().superRefine((value, ctx) => {
|
|
1501
1551
|
try {
|
|
1502
1552
|
const url = new URL(value);
|
|
1503
1553
|
if (url.protocol !== "https:" || url.username !== "" || url.password !== "" || url.pathname !== "/" || url.search !== "" || url.hash !== "" || url.origin !== value) {
|
|
@@ -1510,7 +1560,7 @@ function createPermissionsSchemas(canonical) {
|
|
|
1510
1560
|
ctx.addIssue({ code: "custom", message: "must be a valid HTTPS origin" });
|
|
1511
1561
|
}
|
|
1512
1562
|
});
|
|
1513
|
-
const WebSessionCsrfSourceUrl =
|
|
1563
|
+
const WebSessionCsrfSourceUrl = z10.url({ protocol: /^https$/ }).superRefine((value, ctx) => {
|
|
1514
1564
|
const url = new URL(value);
|
|
1515
1565
|
if (url.username !== "" || url.password !== "" || url.hash !== "") {
|
|
1516
1566
|
ctx.addIssue({
|
|
@@ -1552,10 +1602,10 @@ function createPermissionsSchemas(canonical) {
|
|
|
1552
1602
|
}
|
|
1553
1603
|
});
|
|
1554
1604
|
const WebSessionCsrfSelector2 = NonEmptyString3.regex(WEB_SESSION_CSRF_SELECTOR_PATTERN, "must be a compound simple selector: optional tag, then #id or [attr=value] predicates on that one element (no combinators, classes, or pseudo-classes)");
|
|
1555
|
-
const WebSessionGrantRequest2 =
|
|
1605
|
+
const WebSessionGrantRequest2 = z10.strictObject({
|
|
1556
1606
|
origin: WebSessionOrigin,
|
|
1557
|
-
pathPrefixes:
|
|
1558
|
-
csrf:
|
|
1607
|
+
pathPrefixes: z10.array(WebSessionPathPrefix).min(1),
|
|
1608
|
+
csrf: z10.strictObject({
|
|
1559
1609
|
sourceUrl: WebSessionCsrfSourceUrl,
|
|
1560
1610
|
selector: WebSessionCsrfSelector2,
|
|
1561
1611
|
attribute: NonEmptyString3,
|
|
@@ -1564,14 +1614,14 @@ function createPermissionsSchemas(canonical) {
|
|
|
1564
1614
|
bodyField: NonEmptyString3.optional()
|
|
1565
1615
|
}).optional()
|
|
1566
1616
|
});
|
|
1567
|
-
const KnowledgeSearchGrantRequest2 =
|
|
1568
|
-
scope:
|
|
1617
|
+
const KnowledgeSearchGrantRequest2 = z10.strictObject({
|
|
1618
|
+
scope: z10.literal("own-schemes")
|
|
1569
1619
|
});
|
|
1570
|
-
const KnownResourcesGrantRequest2 =
|
|
1571
|
-
scope:
|
|
1620
|
+
const KnownResourcesGrantRequest2 = z10.strictObject({
|
|
1621
|
+
scope: z10.literal("own-modules")
|
|
1572
1622
|
});
|
|
1573
|
-
const PluginAgentDefinitionPermissionRule2 =
|
|
1574
|
-
effect:
|
|
1623
|
+
const PluginAgentDefinitionPermissionRule2 = z10.strictObject({
|
|
1624
|
+
effect: z10.enum(["allow", "deny", "ask"]),
|
|
1575
1625
|
/** Restrict to one tool name. */
|
|
1576
1626
|
tool: NonEmptyString3.optional(),
|
|
1577
1627
|
/** Restrict to one classified capability key. */
|
|
@@ -1581,7 +1631,7 @@ function createPermissionsSchemas(canonical) {
|
|
|
1581
1631
|
/** Restrict to matching resources (a path glob, or a URI-shaped policy address). */
|
|
1582
1632
|
resource: NonEmptyString3.optional(),
|
|
1583
1633
|
/** Restrict the rule to one permission mode; omit to apply in all modes. */
|
|
1584
|
-
mode:
|
|
1634
|
+
mode: z10.enum(["default", "ask", "allow", "auto"]).optional()
|
|
1585
1635
|
});
|
|
1586
1636
|
function stripRetiredPermissionAsks(value) {
|
|
1587
1637
|
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
@@ -1603,14 +1653,14 @@ function createPermissionsSchemas(canonical) {
|
|
|
1603
1653
|
}
|
|
1604
1654
|
return remaining;
|
|
1605
1655
|
}
|
|
1606
|
-
const TargetPermissionWiring2 =
|
|
1607
|
-
auth:
|
|
1608
|
-
storage:
|
|
1609
|
-
events:
|
|
1610
|
-
endpoints:
|
|
1611
|
-
webSession:
|
|
1612
|
-
knowledgeSearch:
|
|
1613
|
-
knownResources:
|
|
1656
|
+
const TargetPermissionWiring2 = z10.strictObject({
|
|
1657
|
+
auth: z10.array(AuthGrantRequest2).optional(),
|
|
1658
|
+
storage: z10.array(StorageGrantRequest2).optional(),
|
|
1659
|
+
events: z10.array(EventGrantRequest2).optional(),
|
|
1660
|
+
endpoints: z10.array(EndpointGrantRequest2).optional(),
|
|
1661
|
+
webSession: z10.array(WebSessionGrantRequest2).optional(),
|
|
1662
|
+
knowledgeSearch: z10.array(KnowledgeSearchGrantRequest2).optional(),
|
|
1663
|
+
knownResources: z10.array(KnownResourcesGrantRequest2).optional()
|
|
1614
1664
|
}).superRefine((permissions, ctx) => {
|
|
1615
1665
|
const rows = permissions.webSession ?? [];
|
|
1616
1666
|
for (const [index, row] of rows.entries()) {
|
|
@@ -1628,9 +1678,9 @@ function createPermissionsSchemas(canonical) {
|
|
|
1628
1678
|
}
|
|
1629
1679
|
}
|
|
1630
1680
|
});
|
|
1631
|
-
const TargetPermissionSet2 = canonical ? TargetPermissionWiring2 :
|
|
1632
|
-
const PluginPermissionManifest2 =
|
|
1633
|
-
byTarget:
|
|
1681
|
+
const TargetPermissionSet2 = canonical ? TargetPermissionWiring2 : z10.preprocess(stripRetiredPermissionAsks, TargetPermissionWiring2);
|
|
1682
|
+
const PluginPermissionManifest2 = z10.strictObject({
|
|
1683
|
+
byTarget: z10.strictObject({
|
|
1634
1684
|
"kay.agent": TargetPermissionSet2.optional(),
|
|
1635
1685
|
"kay.app": TargetPermissionSet2.optional(),
|
|
1636
1686
|
"kay.ui": TargetPermissionSet2.optional()
|
|
@@ -1648,26 +1698,26 @@ function createPermissionsSchemas(canonical) {
|
|
|
1648
1698
|
});
|
|
1649
1699
|
const ResolvedAuthGrantRequest2 = AuthGrantRequestBase.extend({
|
|
1650
1700
|
service: GlobalContributionId2,
|
|
1651
|
-
schemes:
|
|
1701
|
+
schemes: z10.array(GlobalContributionId2).min(1).optional(),
|
|
1652
1702
|
// Resolution fills an absent binding with the narrowest bound, so a resolved
|
|
1653
1703
|
// grant ALWAYS carries an explicit, non-broadening account selector - the
|
|
1654
1704
|
// runtime never has to invent a default and fail open.
|
|
1655
|
-
accountSelectors:
|
|
1705
|
+
accountSelectors: z10.array(AuthAccountSelector2).min(1)
|
|
1656
1706
|
}).superRefine(validateAuthGrantRequest);
|
|
1657
1707
|
const ResolvedEndpointGrantRequest2 = EndpointGrantRequest2.extend({
|
|
1658
1708
|
endpoint: GlobalContributionId2
|
|
1659
1709
|
});
|
|
1660
|
-
const ResolvedTargetGrantSet2 =
|
|
1661
|
-
auth:
|
|
1662
|
-
storage:
|
|
1663
|
-
events:
|
|
1664
|
-
endpoints:
|
|
1665
|
-
webSession:
|
|
1666
|
-
knowledgeSearch:
|
|
1667
|
-
knownResources:
|
|
1668
|
-
});
|
|
1669
|
-
const ResolvedPluginGrants2 =
|
|
1670
|
-
byTarget:
|
|
1710
|
+
const ResolvedTargetGrantSet2 = z10.strictObject({
|
|
1711
|
+
auth: z10.array(ResolvedAuthGrantRequest2).optional(),
|
|
1712
|
+
storage: z10.array(StorageGrantRequest2).optional(),
|
|
1713
|
+
events: z10.array(EventGrantRequest2).optional(),
|
|
1714
|
+
endpoints: z10.array(ResolvedEndpointGrantRequest2).optional(),
|
|
1715
|
+
webSession: z10.array(WebSessionGrantRequest2).optional(),
|
|
1716
|
+
knowledgeSearch: z10.array(KnowledgeSearchGrantRequest2).optional(),
|
|
1717
|
+
knownResources: z10.array(KnownResourcesGrantRequest2).optional()
|
|
1718
|
+
});
|
|
1719
|
+
const ResolvedPluginGrants2 = z10.strictObject({
|
|
1720
|
+
byTarget: z10.strictObject({
|
|
1671
1721
|
"kay.agent": ResolvedTargetGrantSet2.optional(),
|
|
1672
1722
|
"kay.app": ResolvedTargetGrantSet2.optional(),
|
|
1673
1723
|
"kay.ui": ResolvedTargetGrantSet2.optional()
|
|
@@ -1818,24 +1868,24 @@ var AGENT_PERMISSION_RULE_FIELDS = [
|
|
|
1818
1868
|
function createAuthoritySchemas(canonical) {
|
|
1819
1869
|
const { ArtifactGenerationId: ArtifactGenerationId2, NonEmptyString: NonEmptyString3, UriScheme: UriScheme2, PluginId: PluginId2, LocalContributionId: LocalContributionId2 } = canonical ? canonicalCommonSchemas : common_exports;
|
|
1820
1870
|
const { PluginAgentDefinitionPermissionRule: PluginAgentDefinitionPermissionRule2 } = canonical ? canonicalPermissionSchemas : permissions_exports;
|
|
1821
|
-
const WhiteboardCapabilityScope2 =
|
|
1822
|
-
const WhiteboardCapabilityOperation2 =
|
|
1871
|
+
const WhiteboardCapabilityScope2 = z11.enum(["own-types", "all-types"]);
|
|
1872
|
+
const WhiteboardCapabilityOperation2 = z11.enum([
|
|
1823
1873
|
"discover",
|
|
1824
1874
|
"read",
|
|
1825
1875
|
"create",
|
|
1826
1876
|
"update",
|
|
1827
1877
|
"remove"
|
|
1828
1878
|
]);
|
|
1829
|
-
const WhiteboardCapabilityClaimV12 =
|
|
1830
|
-
target:
|
|
1831
|
-
slug:
|
|
1879
|
+
const WhiteboardCapabilityClaimV12 = z11.strictObject({
|
|
1880
|
+
target: z11.enum(["kay.agent", "kay.app"]),
|
|
1881
|
+
slug: z11.enum([
|
|
1832
1882
|
"whiteboard.discover",
|
|
1833
1883
|
"whiteboard.read",
|
|
1834
1884
|
"whiteboard.create",
|
|
1835
1885
|
"whiteboard.update",
|
|
1836
1886
|
"whiteboard.remove"
|
|
1837
1887
|
]),
|
|
1838
|
-
envelope:
|
|
1888
|
+
envelope: z11.strictObject({ scope: WhiteboardCapabilityScope2 })
|
|
1839
1889
|
}).superRefine((claim, ctx) => {
|
|
1840
1890
|
if (claim.target === "kay.app" && claim.slug !== "whiteboard.discover" && claim.slug !== "whiteboard.read") {
|
|
1841
1891
|
ctx.addIssue({
|
|
@@ -1845,167 +1895,167 @@ function createAuthoritySchemas(canonical) {
|
|
|
1845
1895
|
});
|
|
1846
1896
|
}
|
|
1847
1897
|
});
|
|
1848
|
-
const DeclaredSkillSourceEnvelope2 =
|
|
1849
|
-
|
|
1850
|
-
channel:
|
|
1898
|
+
const DeclaredSkillSourceEnvelope2 = z11.discriminatedUnion("channel", [
|
|
1899
|
+
z11.strictObject({
|
|
1900
|
+
channel: z11.literal("git-clone"),
|
|
1851
1901
|
locator: NonEmptyString3,
|
|
1852
1902
|
ref: NonEmptyString3.optional(),
|
|
1853
1903
|
subdir: NonEmptyString3.optional()
|
|
1854
1904
|
}),
|
|
1855
|
-
|
|
1856
|
-
channel:
|
|
1905
|
+
z11.strictObject({
|
|
1906
|
+
channel: z11.literal("installer"),
|
|
1857
1907
|
command: NonEmptyString3,
|
|
1858
|
-
args:
|
|
1908
|
+
args: z11.array(NonEmptyString3)
|
|
1859
1909
|
})
|
|
1860
1910
|
]);
|
|
1861
|
-
const PluginCapabilityClaimV12 =
|
|
1862
|
-
|
|
1863
|
-
target:
|
|
1864
|
-
slug:
|
|
1865
|
-
envelope:
|
|
1911
|
+
const PluginCapabilityClaimV12 = z11.discriminatedUnion("slug", [
|
|
1912
|
+
z11.strictObject({
|
|
1913
|
+
target: z11.literal("kay.app"),
|
|
1914
|
+
slug: z11.literal("sessions.run"),
|
|
1915
|
+
envelope: z11.strictObject({})
|
|
1866
1916
|
}),
|
|
1867
|
-
|
|
1868
|
-
target:
|
|
1869
|
-
slug:
|
|
1870
|
-
envelope:
|
|
1917
|
+
z11.strictObject({
|
|
1918
|
+
target: z11.literal("kay.agent"),
|
|
1919
|
+
slug: z11.literal("network.connect"),
|
|
1920
|
+
envelope: z11.strictObject({ connect: NonEmptyString3 })
|
|
1871
1921
|
}),
|
|
1872
|
-
|
|
1873
|
-
target:
|
|
1874
|
-
slug:
|
|
1875
|
-
envelope:
|
|
1922
|
+
z11.strictObject({
|
|
1923
|
+
target: z11.literal("kay.agent"),
|
|
1924
|
+
slug: z11.literal("web-session.request"),
|
|
1925
|
+
envelope: z11.strictObject({
|
|
1876
1926
|
origin: NonEmptyString3,
|
|
1877
1927
|
pathPrefix: NonEmptyString3
|
|
1878
1928
|
})
|
|
1879
1929
|
}),
|
|
1880
|
-
|
|
1881
|
-
target:
|
|
1882
|
-
slug:
|
|
1883
|
-
envelope:
|
|
1930
|
+
z11.strictObject({
|
|
1931
|
+
target: z11.literal("kay.agent"),
|
|
1932
|
+
slug: z11.literal("web-session.download"),
|
|
1933
|
+
envelope: z11.strictObject({
|
|
1884
1934
|
origin: NonEmptyString3,
|
|
1885
1935
|
pathPrefix: NonEmptyString3
|
|
1886
1936
|
})
|
|
1887
1937
|
}),
|
|
1888
|
-
|
|
1889
|
-
target:
|
|
1890
|
-
slug:
|
|
1891
|
-
envelope:
|
|
1938
|
+
z11.strictObject({
|
|
1939
|
+
target: z11.literal("kay.agent"),
|
|
1940
|
+
slug: z11.literal("process.spawn"),
|
|
1941
|
+
envelope: z11.strictObject({
|
|
1892
1942
|
command: NonEmptyString3,
|
|
1893
1943
|
argvClass: NonEmptyString3
|
|
1894
1944
|
})
|
|
1895
1945
|
}),
|
|
1896
|
-
|
|
1897
|
-
target:
|
|
1898
|
-
slug:
|
|
1899
|
-
envelope:
|
|
1946
|
+
z11.strictObject({
|
|
1947
|
+
target: z11.literal("kay.app"),
|
|
1948
|
+
slug: z11.literal("sessions.read"),
|
|
1949
|
+
envelope: z11.strictObject({})
|
|
1900
1950
|
}),
|
|
1901
|
-
|
|
1951
|
+
z11.strictObject({
|
|
1902
1952
|
// Every plugin's recorded Jev signals, not only the caller's own: an empty envelope because
|
|
1903
1953
|
// the grant itself is the visibility decision. Both first consumers (a session timeline, and
|
|
1904
1954
|
// an agent loop turning signals into skills) read rows another plugin recorded.
|
|
1905
|
-
target:
|
|
1906
|
-
slug:
|
|
1907
|
-
envelope:
|
|
1955
|
+
target: z11.literal("kay.app"),
|
|
1956
|
+
slug: z11.literal("signals.read"),
|
|
1957
|
+
envelope: z11.strictObject({})
|
|
1908
1958
|
}),
|
|
1909
|
-
|
|
1910
|
-
target:
|
|
1911
|
-
slug:
|
|
1912
|
-
envelope:
|
|
1959
|
+
z11.strictObject({
|
|
1960
|
+
target: z11.enum(["kay.agent", "kay.app"]),
|
|
1961
|
+
slug: z11.literal("uri.call"),
|
|
1962
|
+
envelope: z11.strictObject({
|
|
1913
1963
|
scheme: UriScheme2,
|
|
1914
|
-
verb:
|
|
1964
|
+
verb: z11.enum(["read", "list", "search", "write", "edit", "delete"])
|
|
1915
1965
|
})
|
|
1916
1966
|
}),
|
|
1917
|
-
|
|
1918
|
-
target:
|
|
1919
|
-
slug:
|
|
1920
|
-
envelope:
|
|
1967
|
+
z11.strictObject({
|
|
1968
|
+
target: z11.enum(["kay.agent", "kay.app"]),
|
|
1969
|
+
slug: z11.literal("endpoints.invoke"),
|
|
1970
|
+
envelope: z11.strictObject({
|
|
1921
1971
|
pluginId: PluginId2,
|
|
1922
1972
|
endpointId: LocalContributionId2
|
|
1923
1973
|
})
|
|
1924
1974
|
}),
|
|
1925
|
-
|
|
1975
|
+
z11.strictObject({
|
|
1926
1976
|
// Read every managed skill and its history: identity, versions, revisions, changes against
|
|
1927
1977
|
// the source, past versions, suggestions. Never a write. An empty envelope because the
|
|
1928
1978
|
// grant itself is the visibility decision, as with `signals.read`.
|
|
1929
|
-
target:
|
|
1930
|
-
slug:
|
|
1931
|
-
envelope:
|
|
1979
|
+
target: z11.literal("kay.app"),
|
|
1980
|
+
slug: z11.literal("skills.read"),
|
|
1981
|
+
envelope: z11.strictObject({})
|
|
1932
1982
|
}),
|
|
1933
|
-
|
|
1983
|
+
z11.strictObject({
|
|
1934
1984
|
// Change, install and delete the user's skills. Every write follows the same rules an
|
|
1935
1985
|
// agent's `skill://` write does, and each revision records the plugin that made it.
|
|
1936
|
-
target:
|
|
1937
|
-
slug:
|
|
1938
|
-
envelope:
|
|
1986
|
+
target: z11.literal("kay.app"),
|
|
1987
|
+
slug: z11.literal("skills.write"),
|
|
1988
|
+
envelope: z11.strictObject({})
|
|
1939
1989
|
}),
|
|
1940
|
-
|
|
1990
|
+
z11.strictObject({
|
|
1941
1991
|
// Publish a share plan `skills.prepareShare` built: push the user's skill, with their git
|
|
1942
1992
|
// credentials, into a marketplace repository other people's installs read. Private
|
|
1943
1993
|
// (PRIVATE_PLUGIN_CAPABILITY_SLUGS): the host has no consent prompt for an SDK call that
|
|
1944
1994
|
// sends data off the machine.
|
|
1945
|
-
target:
|
|
1946
|
-
slug:
|
|
1947
|
-
envelope:
|
|
1995
|
+
target: z11.literal("kay.app"),
|
|
1996
|
+
slug: z11.literal("skills.share"),
|
|
1997
|
+
envelope: z11.strictObject({})
|
|
1948
1998
|
}),
|
|
1949
|
-
|
|
1999
|
+
z11.strictObject({
|
|
1950
2000
|
// Turn an installed plugin on or off, which starts or stops its code under its own grants.
|
|
1951
2001
|
// Private (PRIVATE_PLUGIN_CAPABILITY_SLUGS): a plugin holding it could turn back on what the
|
|
1952
2002
|
// user turned off.
|
|
1953
|
-
target:
|
|
1954
|
-
slug:
|
|
1955
|
-
envelope:
|
|
2003
|
+
target: z11.literal("kay.app"),
|
|
2004
|
+
slug: z11.literal("plugins.set-enabled"),
|
|
2005
|
+
envelope: z11.strictObject({})
|
|
1956
2006
|
}),
|
|
1957
|
-
|
|
2007
|
+
z11.strictObject({
|
|
1958
2008
|
// Write a steward entry (recap, next steps, title, work headlines) into the session whose
|
|
1959
2009
|
// event the calling handler is answering. Bound to that session: a call for any other is
|
|
1960
2010
|
// refused. The daemon keeps its own bounds on every field.
|
|
1961
|
-
target:
|
|
1962
|
-
slug:
|
|
1963
|
-
envelope:
|
|
2011
|
+
target: z11.literal("kay.app"),
|
|
2012
|
+
slug: z11.literal("sessions.annotate"),
|
|
2013
|
+
envelope: z11.strictObject({})
|
|
1964
2014
|
}),
|
|
1965
|
-
|
|
2015
|
+
z11.strictObject({
|
|
1966
2016
|
// Compact the session whose event the calling handler is answering. Its own claim because
|
|
1967
2017
|
// compaction rewrites the live context and spends a model call; the daemon keeps the user's
|
|
1968
2018
|
// consent switch and the context floor in front of it.
|
|
1969
|
-
target:
|
|
1970
|
-
slug:
|
|
1971
|
-
envelope:
|
|
2019
|
+
target: z11.literal("kay.app"),
|
|
2020
|
+
slug: z11.literal("sessions.compact"),
|
|
2021
|
+
envelope: z11.strictObject({})
|
|
1972
2022
|
}),
|
|
1973
|
-
|
|
2023
|
+
z11.strictObject({
|
|
1974
2024
|
// Read and rewrite the soul file every new conversation is told. Private
|
|
1975
2025
|
// (PRIVATE_PLUGIN_CAPABILITY_SLUGS): only a plugin the release carries may hold it.
|
|
1976
|
-
target:
|
|
1977
|
-
slug:
|
|
1978
|
-
envelope:
|
|
2026
|
+
target: z11.literal("kay.app"),
|
|
2027
|
+
slug: z11.literal("soul.write"),
|
|
2028
|
+
envelope: z11.strictObject({})
|
|
1979
2029
|
}),
|
|
1980
|
-
|
|
2030
|
+
z11.strictObject({
|
|
1981
2031
|
// The text an agent sees for a tool or an address in a live session, where each comes from,
|
|
1982
2032
|
// and whether it is one of Bonsai's own. Read-only and never a call. An empty envelope because
|
|
1983
2033
|
// the grant itself is the visibility decision, as with `skills.read`.
|
|
1984
|
-
target:
|
|
1985
|
-
slug:
|
|
1986
|
-
envelope:
|
|
2034
|
+
target: z11.literal("kay.app"),
|
|
2035
|
+
slug: z11.literal("tools.describe"),
|
|
2036
|
+
envelope: z11.strictObject({})
|
|
1987
2037
|
}),
|
|
1988
|
-
|
|
1989
|
-
target:
|
|
1990
|
-
slug:
|
|
1991
|
-
envelope:
|
|
2038
|
+
z11.strictObject({
|
|
2039
|
+
target: z11.literal("kay.app"),
|
|
2040
|
+
slug: z11.literal("workspace.command"),
|
|
2041
|
+
envelope: z11.strictObject({})
|
|
1992
2042
|
}),
|
|
1993
|
-
|
|
1994
|
-
target:
|
|
1995
|
-
slug:
|
|
1996
|
-
envelope:
|
|
2043
|
+
z11.strictObject({
|
|
2044
|
+
target: z11.literal("kay.app"),
|
|
2045
|
+
slug: z11.literal("sessions.create"),
|
|
2046
|
+
envelope: z11.strictObject({})
|
|
1997
2047
|
}),
|
|
1998
|
-
|
|
1999
|
-
target:
|
|
2000
|
-
slug:
|
|
2001
|
-
envelope:
|
|
2048
|
+
z11.strictObject({
|
|
2049
|
+
target: z11.literal("kay.app"),
|
|
2050
|
+
slug: z11.literal("sessions.update"),
|
|
2051
|
+
envelope: z11.strictObject({})
|
|
2002
2052
|
}),
|
|
2003
|
-
|
|
2004
|
-
target:
|
|
2005
|
-
slug:
|
|
2006
|
-
envelope:
|
|
2053
|
+
z11.strictObject({
|
|
2054
|
+
target: z11.literal("kay.app"),
|
|
2055
|
+
slug: z11.literal("models.complete"),
|
|
2056
|
+
envelope: z11.strictObject({})
|
|
2007
2057
|
}),
|
|
2008
|
-
|
|
2058
|
+
z11.strictObject({
|
|
2009
2059
|
// Held to `kay.app`, the daemon-lifetime tier, even though the same System One client is exposed on
|
|
2010
2060
|
// BOTH the `kay.app` and `kay.agent` plugin SDKs (and to host composition directly): a slug
|
|
2011
2061
|
// pins exactly one target (see this file's module doc), so one shared claim is simpler and
|
|
@@ -2014,195 +2064,195 @@ function createAuthoritySchemas(canonical) {
|
|
|
2014
2064
|
// plugin's own pinned authority, which already spans both targets for every other capability
|
|
2015
2065
|
// (`network.connect`/`tool-interception.register` are decided by the identical per-plugin
|
|
2016
2066
|
// handle `kay.app`-target claims use). `app.systemOne` authorizes against it the same way.
|
|
2017
|
-
target:
|
|
2018
|
-
slug:
|
|
2019
|
-
envelope:
|
|
2067
|
+
target: z11.literal("kay.app"),
|
|
2068
|
+
slug: z11.literal("systemOne.use"),
|
|
2069
|
+
envelope: z11.strictObject({})
|
|
2020
2070
|
}),
|
|
2021
|
-
|
|
2022
|
-
target:
|
|
2023
|
-
slug:
|
|
2024
|
-
envelope:
|
|
2071
|
+
z11.strictObject({
|
|
2072
|
+
target: z11.literal("kay.app"),
|
|
2073
|
+
slug: z11.literal("automations.write"),
|
|
2074
|
+
envelope: z11.strictObject({})
|
|
2025
2075
|
}),
|
|
2026
|
-
|
|
2027
|
-
target:
|
|
2028
|
-
slug:
|
|
2029
|
-
envelope:
|
|
2076
|
+
z11.strictObject({
|
|
2077
|
+
target: z11.literal("kay.app"),
|
|
2078
|
+
slug: z11.literal("automations.run"),
|
|
2079
|
+
envelope: z11.strictObject({})
|
|
2030
2080
|
}),
|
|
2031
|
-
|
|
2032
|
-
target:
|
|
2033
|
-
slug:
|
|
2034
|
-
envelope:
|
|
2081
|
+
z11.strictObject({
|
|
2082
|
+
target: z11.literal("kay.app"),
|
|
2083
|
+
slug: z11.literal("workflows.define"),
|
|
2084
|
+
envelope: z11.strictObject({})
|
|
2035
2085
|
}),
|
|
2036
|
-
|
|
2086
|
+
z11.strictObject({
|
|
2037
2087
|
// Start a declared workflow on every plugin's signal events (`signals: true`), which carry
|
|
2038
2088
|
// other plugins' data. Private (PRIVATE_PLUGIN_CAPABILITY_SLUGS): only a plugin the release
|
|
2039
2089
|
// carries may hold it, so a third-party plugin cannot read every source's signals.
|
|
2040
|
-
target:
|
|
2041
|
-
slug:
|
|
2042
|
-
envelope:
|
|
2090
|
+
target: z11.literal("kay.app"),
|
|
2091
|
+
slug: z11.literal("workflows.signals"),
|
|
2092
|
+
envelope: z11.strictObject({})
|
|
2043
2093
|
}),
|
|
2044
|
-
|
|
2045
|
-
target:
|
|
2046
|
-
slug:
|
|
2047
|
-
envelope:
|
|
2094
|
+
z11.strictObject({
|
|
2095
|
+
target: z11.literal("kay.app"),
|
|
2096
|
+
slug: z11.literal("session-events.subscribe"),
|
|
2097
|
+
envelope: z11.strictObject({})
|
|
2048
2098
|
}),
|
|
2049
|
-
|
|
2050
|
-
target:
|
|
2051
|
-
slug:
|
|
2052
|
-
envelope:
|
|
2099
|
+
z11.strictObject({
|
|
2100
|
+
target: z11.literal("kay.app"),
|
|
2101
|
+
slug: z11.literal("agents.run"),
|
|
2102
|
+
envelope: z11.strictObject({})
|
|
2053
2103
|
}),
|
|
2054
|
-
|
|
2055
|
-
target:
|
|
2056
|
-
slug:
|
|
2104
|
+
z11.strictObject({
|
|
2105
|
+
target: z11.literal("kay.app"),
|
|
2106
|
+
slug: z11.literal("dynamic-context.register"),
|
|
2057
2107
|
// The declared `contributes.contextContributors` localId, which doubles as the contributor's
|
|
2058
2108
|
// section tag at the model boundary - so the row a human consents to names the section.
|
|
2059
|
-
envelope:
|
|
2109
|
+
envelope: z11.strictObject({ contributor: NonEmptyString3 })
|
|
2060
2110
|
}),
|
|
2061
|
-
|
|
2062
|
-
target:
|
|
2063
|
-
slug:
|
|
2111
|
+
z11.strictObject({
|
|
2112
|
+
target: z11.literal("kay.app"),
|
|
2113
|
+
slug: z11.literal("app-data.register"),
|
|
2064
2114
|
/** The declared `contributes.dataSources` localId. */
|
|
2065
|
-
envelope:
|
|
2115
|
+
envelope: z11.strictObject({ source: NonEmptyString3 })
|
|
2066
2116
|
}),
|
|
2067
|
-
|
|
2068
|
-
target:
|
|
2069
|
-
slug:
|
|
2070
|
-
envelope:
|
|
2117
|
+
z11.strictObject({
|
|
2118
|
+
target: z11.literal("kay.agent"),
|
|
2119
|
+
slug: z11.literal("session-artifacts.read"),
|
|
2120
|
+
envelope: z11.strictObject({ kind: z11.enum(["upload", "output"]) })
|
|
2071
2121
|
}),
|
|
2072
|
-
|
|
2073
|
-
target:
|
|
2074
|
-
slug:
|
|
2075
|
-
envelope:
|
|
2122
|
+
z11.strictObject({
|
|
2123
|
+
target: z11.literal("kay.agent"),
|
|
2124
|
+
slug: z11.literal("session-artifacts.create"),
|
|
2125
|
+
envelope: z11.strictObject({ kind: z11.literal("output") })
|
|
2076
2126
|
}),
|
|
2077
|
-
|
|
2078
|
-
target:
|
|
2079
|
-
slug:
|
|
2080
|
-
envelope:
|
|
2127
|
+
z11.strictObject({
|
|
2128
|
+
target: z11.literal("kay.app"),
|
|
2129
|
+
slug: z11.literal("artifacts.read"),
|
|
2130
|
+
envelope: z11.strictObject({ kind: z11.literal("output") })
|
|
2081
2131
|
}),
|
|
2082
|
-
|
|
2083
|
-
target:
|
|
2084
|
-
slug:
|
|
2085
|
-
envelope:
|
|
2132
|
+
z11.strictObject({
|
|
2133
|
+
target: z11.literal("kay.app"),
|
|
2134
|
+
slug: z11.literal("knowledge-source.register"),
|
|
2135
|
+
envelope: z11.strictObject({ source: NonEmptyString3 })
|
|
2086
2136
|
}),
|
|
2087
|
-
|
|
2088
|
-
target:
|
|
2089
|
-
slug:
|
|
2090
|
-
envelope:
|
|
2137
|
+
z11.strictObject({
|
|
2138
|
+
target: z11.literal("kay.app"),
|
|
2139
|
+
slug: z11.literal("account.assert"),
|
|
2140
|
+
envelope: z11.strictObject({})
|
|
2091
2141
|
}),
|
|
2092
|
-
|
|
2093
|
-
target:
|
|
2094
|
-
slug:
|
|
2095
|
-
envelope:
|
|
2142
|
+
z11.strictObject({
|
|
2143
|
+
target: z11.literal("kay.app"),
|
|
2144
|
+
slug: z11.literal("account.update"),
|
|
2145
|
+
envelope: z11.strictObject({})
|
|
2096
2146
|
}),
|
|
2097
|
-
|
|
2098
|
-
target:
|
|
2099
|
-
slug:
|
|
2100
|
-
envelope:
|
|
2147
|
+
z11.strictObject({
|
|
2148
|
+
target: z11.literal("kay.app"),
|
|
2149
|
+
slug: z11.literal("agents.permissions"),
|
|
2150
|
+
envelope: z11.strictObject({
|
|
2101
2151
|
/** The definition's local id - WHICH agent these rules are authored onto. */
|
|
2102
2152
|
agent: NonEmptyString3,
|
|
2103
2153
|
/** `definition.permissions`, in declaration order (order is semantic; first match wins). */
|
|
2104
|
-
rules:
|
|
2154
|
+
rules: z11.array(PluginAgentDefinitionPermissionRule2),
|
|
2105
2155
|
/** `definition.permissionsFallback`, in declaration order. */
|
|
2106
|
-
fallback:
|
|
2156
|
+
fallback: z11.array(PluginAgentDefinitionPermissionRule2)
|
|
2107
2157
|
})
|
|
2108
2158
|
}),
|
|
2109
|
-
|
|
2110
|
-
target:
|
|
2111
|
-
slug:
|
|
2112
|
-
envelope:
|
|
2159
|
+
z11.strictObject({
|
|
2160
|
+
target: z11.literal("kay.agent"),
|
|
2161
|
+
slug: z11.literal("tool-interception.register"),
|
|
2162
|
+
envelope: z11.strictObject({})
|
|
2113
2163
|
}),
|
|
2114
|
-
|
|
2115
|
-
target:
|
|
2116
|
-
slug:
|
|
2164
|
+
z11.strictObject({
|
|
2165
|
+
target: z11.literal("kay.agent"),
|
|
2166
|
+
slug: z11.literal("interaction.surface"),
|
|
2117
2167
|
/** The one Bonsai-shipped interaction surface this plugin may drive; one claim per surface. */
|
|
2118
|
-
envelope:
|
|
2119
|
-
surface:
|
|
2168
|
+
envelope: z11.strictObject({
|
|
2169
|
+
surface: z11.enum(["browser-pane", "desktop"])
|
|
2120
2170
|
})
|
|
2121
2171
|
}),
|
|
2122
|
-
|
|
2123
|
-
target:
|
|
2124
|
-
slug:
|
|
2172
|
+
z11.strictObject({
|
|
2173
|
+
target: z11.literal("plugin"),
|
|
2174
|
+
slug: z11.literal("config.declare-section"),
|
|
2125
2175
|
/** The settings-document section key, e.g. `models` or `plugins.com.acme.thing`. */
|
|
2126
|
-
envelope:
|
|
2176
|
+
envelope: z11.strictObject({ section: NonEmptyString3 })
|
|
2127
2177
|
}),
|
|
2128
|
-
|
|
2129
|
-
target:
|
|
2130
|
-
slug:
|
|
2178
|
+
z11.strictObject({
|
|
2179
|
+
target: z11.literal("plugin"),
|
|
2180
|
+
slug: z11.literal("auth.own-service"),
|
|
2131
2181
|
/** The minted global service id this plugin would own, e.g. `google.account`. */
|
|
2132
|
-
envelope:
|
|
2182
|
+
envelope: z11.strictObject({ service: NonEmptyString3 })
|
|
2133
2183
|
}),
|
|
2134
|
-
|
|
2135
|
-
target:
|
|
2136
|
-
slug:
|
|
2184
|
+
z11.strictObject({
|
|
2185
|
+
target: z11.literal("plugin"),
|
|
2186
|
+
slug: z11.literal("auth.shared-identity"),
|
|
2137
2187
|
/** The foreign global service id whose identity this plugin would resolve against. */
|
|
2138
|
-
envelope:
|
|
2188
|
+
envelope: z11.strictObject({ service: NonEmptyString3 })
|
|
2139
2189
|
}),
|
|
2140
|
-
|
|
2141
|
-
target:
|
|
2142
|
-
slug:
|
|
2190
|
+
z11.strictObject({
|
|
2191
|
+
target: z11.literal("plugin"),
|
|
2192
|
+
slug: z11.literal("cli.bind"),
|
|
2143
2193
|
/** The binary basename a resolved credential would be injected into. */
|
|
2144
|
-
envelope:
|
|
2194
|
+
envelope: z11.strictObject({ binary: NonEmptyString3 })
|
|
2145
2195
|
}),
|
|
2146
|
-
|
|
2147
|
-
target:
|
|
2148
|
-
slug:
|
|
2196
|
+
z11.strictObject({
|
|
2197
|
+
target: z11.literal("plugin"),
|
|
2198
|
+
slug: z11.literal("mcp.host-server"),
|
|
2149
2199
|
// The daemon dials this endpoint, holds its sign-in, and serves it as `mcp://<name>`, so the
|
|
2150
2200
|
// endpoint becomes daemon execution authority. It also lets the plugin's own code call any of
|
|
2151
2201
|
// the server's tools, writes included, through `api.vendoredMcp`, which the per-tool
|
|
2152
2202
|
// `mcp:<server>::<tool>` permission rows do not gate. One claim per exact name and URL.
|
|
2153
|
-
envelope:
|
|
2203
|
+
envelope: z11.strictObject({ name: NonEmptyString3, url: NonEmptyString3 })
|
|
2154
2204
|
}),
|
|
2155
|
-
|
|
2156
|
-
target:
|
|
2157
|
-
slug:
|
|
2205
|
+
z11.strictObject({
|
|
2206
|
+
target: z11.literal("plugin"),
|
|
2207
|
+
slug: z11.literal("prompt.resident"),
|
|
2158
2208
|
// A section of the plugin's own text in every session's system prompt. An empty envelope
|
|
2159
2209
|
// because the grant itself is the decision; the host caps the section's length.
|
|
2160
|
-
envelope:
|
|
2210
|
+
envelope: z11.strictObject({})
|
|
2161
2211
|
}),
|
|
2162
|
-
|
|
2212
|
+
z11.strictObject({
|
|
2163
2213
|
// Private API: registering the policy the daemon consults to pick a chat's model as it goes
|
|
2164
2214
|
// (`app.modelSelection.registerPolicy`). Only a plugin the release carries holds it.
|
|
2165
|
-
target:
|
|
2166
|
-
slug:
|
|
2167
|
-
envelope:
|
|
2215
|
+
target: z11.literal("kay.app"),
|
|
2216
|
+
slug: z11.literal("model-selection.register"),
|
|
2217
|
+
envelope: z11.strictObject({})
|
|
2168
2218
|
}),
|
|
2169
|
-
|
|
2219
|
+
z11.strictObject({
|
|
2170
2220
|
// Private API: adding text to every chat's system prompt (`app.systemPrompt.register`).
|
|
2171
2221
|
// Only a plugin the release carries holds it, so the text has no length cap yet.
|
|
2172
|
-
target:
|
|
2173
|
-
slug:
|
|
2174
|
-
envelope:
|
|
2222
|
+
target: z11.literal("kay.app"),
|
|
2223
|
+
slug: z11.literal("system-prompt.register"),
|
|
2224
|
+
envelope: z11.strictObject({})
|
|
2175
2225
|
}),
|
|
2176
|
-
|
|
2177
|
-
target:
|
|
2178
|
-
slug:
|
|
2226
|
+
z11.strictObject({
|
|
2227
|
+
target: z11.literal("plugin"),
|
|
2228
|
+
slug: z11.literal("skills.declared-source"),
|
|
2179
2229
|
envelope: DeclaredSkillSourceEnvelope2
|
|
2180
2230
|
}),
|
|
2181
2231
|
WhiteboardCapabilityClaimV12
|
|
2182
2232
|
]);
|
|
2183
|
-
const PluginCapabilityRefusalLayer2 =
|
|
2184
|
-
const PluginCapabilityRefusalCode2 =
|
|
2233
|
+
const PluginCapabilityRefusalLayer2 = z11.enum(["grant", "binding", "release"]);
|
|
2234
|
+
const PluginCapabilityRefusalCode2 = z11.enum([
|
|
2185
2235
|
"not-granted",
|
|
2186
2236
|
"grant-read-failed",
|
|
2187
2237
|
"binding-missing",
|
|
2188
2238
|
"argv-outside-class",
|
|
2189
2239
|
"builtin-only"
|
|
2190
2240
|
]);
|
|
2191
|
-
const PluginCapabilityRefusalV12 =
|
|
2241
|
+
const PluginCapabilityRefusalV12 = z11.strictObject({
|
|
2192
2242
|
claim: PluginCapabilityClaimV12,
|
|
2193
2243
|
layer: PluginCapabilityRefusalLayer2,
|
|
2194
2244
|
code: PluginCapabilityRefusalCode2,
|
|
2195
2245
|
message: NonEmptyString3,
|
|
2196
2246
|
artifactGenerationId: ArtifactGenerationId2.optional()
|
|
2197
2247
|
});
|
|
2198
|
-
const PluginCapabilityDecisionV12 =
|
|
2199
|
-
|
|
2200
|
-
kind:
|
|
2248
|
+
const PluginCapabilityDecisionV12 = z11.discriminatedUnion("kind", [
|
|
2249
|
+
z11.strictObject({
|
|
2250
|
+
kind: z11.literal("allowed"),
|
|
2201
2251
|
claim: PluginCapabilityClaimV12,
|
|
2202
2252
|
artifactGenerationId: ArtifactGenerationId2.optional()
|
|
2203
2253
|
}),
|
|
2204
|
-
|
|
2205
|
-
kind:
|
|
2254
|
+
z11.strictObject({
|
|
2255
|
+
kind: z11.literal("refused"),
|
|
2206
2256
|
refusal: PluginCapabilityRefusalV12
|
|
2207
2257
|
})
|
|
2208
2258
|
]);
|
|
@@ -2220,7 +2270,7 @@ function createAuthoritySchemas(canonical) {
|
|
|
2220
2270
|
}
|
|
2221
2271
|
var { WhiteboardCapabilityScope, WhiteboardCapabilityOperation, WhiteboardCapabilityClaimV1, DeclaredSkillSourceEnvelope, PluginCapabilityClaimV1, PluginCapabilityRefusalLayer, PluginCapabilityRefusalCode, PluginCapabilityRefusalV1, PluginCapabilityDecisionV1 } = createAuthoritySchemas(false);
|
|
2222
2272
|
var canonicalAuthoritySchemas = createAuthoritySchemas(true);
|
|
2223
|
-
var PluginCapabilityClaimInputV1 =
|
|
2273
|
+
var PluginCapabilityClaimInputV1 = z11.custom((value) => PluginCapabilityClaimV1.safeParse(value).success, "Invalid capability claim");
|
|
2224
2274
|
function normalizeNetworkConnectHost(value) {
|
|
2225
2275
|
const trimmed = value.trim();
|
|
2226
2276
|
if (trimmed.length === 0)
|
|
@@ -2830,7 +2880,7 @@ __export(contributions_exports, {
|
|
|
2830
2880
|
isUiAppSourceModule: () => isUiAppSourceModule,
|
|
2831
2881
|
uiAppSourceStylePath: () => uiAppSourceStylePath
|
|
2832
2882
|
});
|
|
2833
|
-
import { z as
|
|
2883
|
+
import { z as z13 } from "zod";
|
|
2834
2884
|
|
|
2835
2885
|
// packages/plugin-protocol/dist/plugin-events.js
|
|
2836
2886
|
var plugin_events_exports = {};
|
|
@@ -2857,7 +2907,7 @@ __export(plugin_events_exports, {
|
|
|
2857
2907
|
canonicalPluginEventSchemas: () => canonicalPluginEventSchemas,
|
|
2858
2908
|
pluginSignalPayloadJsonSchema: () => pluginSignalPayloadJsonSchema
|
|
2859
2909
|
});
|
|
2860
|
-
import { z as
|
|
2910
|
+
import { z as z12 } from "zod";
|
|
2861
2911
|
|
|
2862
2912
|
// packages/plugin-protocol/dist/plugin-signal-limits.js
|
|
2863
2913
|
var PLUGIN_EVENT_REFUSED_ERROR_NAME = "PluginEventRefusedError";
|
|
@@ -2883,8 +2933,8 @@ var PLUGIN_SIGNAL_RELATED_KEYS = [
|
|
|
2883
2933
|
var PLUGIN_EVENT_ID_MAX_BYTES = 1024;
|
|
2884
2934
|
function createPluginEventsSchemas(canonical) {
|
|
2885
2935
|
const { GlobalContributionId: GlobalContributionId2, NonEmptyString: NonEmptyString3 } = canonical ? canonicalCommonSchemas : common_exports;
|
|
2886
|
-
const PluginEventLocalId2 =
|
|
2887
|
-
const PluginEventUri2 =
|
|
2936
|
+
const PluginEventLocalId2 = z12.string().regex(/^[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*$/);
|
|
2937
|
+
const PluginEventUri2 = z12.string().refine((value) => {
|
|
2888
2938
|
if (!/^[a-z][a-z0-9+.-]*:/i.test(value) || /[\s\p{Cc}\\<>"{}|^`]/u.test(value) || /%(?![a-f0-9]{2})/i.test(value))
|
|
2889
2939
|
return false;
|
|
2890
2940
|
try {
|
|
@@ -2893,24 +2943,24 @@ function createPluginEventsSchemas(canonical) {
|
|
|
2893
2943
|
return false;
|
|
2894
2944
|
}
|
|
2895
2945
|
}, { message: "Expected an absolute resource URI" });
|
|
2896
|
-
const PluginEventTimestamp2 =
|
|
2946
|
+
const PluginEventTimestamp2 = z12.iso.datetime().refine((value) => !/\.\d{10}/.test(value), {
|
|
2897
2947
|
message: "Expected an ISO instant with at most nanosecond precision"
|
|
2898
2948
|
});
|
|
2899
|
-
const PluginEventRelated2 =
|
|
2900
|
-
const PluginEventPublishSource2 =
|
|
2949
|
+
const PluginEventRelated2 = z12.record(NonEmptyString3, z12.union([PluginEventUri2, z12.array(PluginEventUri2)]));
|
|
2950
|
+
const PluginEventPublishSource2 = z12.strictObject({
|
|
2901
2951
|
poller: NonEmptyString3.optional(),
|
|
2902
2952
|
runId: NonEmptyString3.optional()
|
|
2903
2953
|
});
|
|
2904
|
-
const PluginEventSource2 =
|
|
2905
|
-
layer:
|
|
2954
|
+
const PluginEventSource2 = z12.strictObject({
|
|
2955
|
+
layer: z12.literal("runtime"),
|
|
2906
2956
|
pluginId: NonEmptyString3,
|
|
2907
2957
|
sessionId: NonEmptyString3.optional(),
|
|
2908
2958
|
...PluginEventPublishSource2.shape
|
|
2909
2959
|
});
|
|
2910
|
-
const PluginEventId2 =
|
|
2960
|
+
const PluginEventId2 = z12.string().min(1).refine((value) => value === value.trim() && !/\p{Cc}/u.test(value) && new TextEncoder().encode(value).length <= PLUGIN_EVENT_ID_MAX_BYTES, {
|
|
2911
2961
|
message: "Event identity must be control-free, unpadded, and at most 1024 UTF-8 bytes"
|
|
2912
2962
|
});
|
|
2913
|
-
const PluginEventPublishInput2 =
|
|
2963
|
+
const PluginEventPublishInput2 = z12.strictObject({
|
|
2914
2964
|
uri: PluginEventUri2,
|
|
2915
2965
|
related: PluginEventRelated2.optional(),
|
|
2916
2966
|
key: PluginEventId2.optional(),
|
|
@@ -2918,11 +2968,11 @@ function createPluginEventsSchemas(canonical) {
|
|
|
2918
2968
|
source: PluginEventPublishSource2.optional(),
|
|
2919
2969
|
payload: JsonValue.optional()
|
|
2920
2970
|
});
|
|
2921
|
-
const PluginEventEnvelope2 =
|
|
2971
|
+
const PluginEventEnvelope2 = z12.strictObject({
|
|
2922
2972
|
id: PluginEventId2,
|
|
2923
2973
|
localId: PluginEventLocalId2,
|
|
2924
2974
|
type: GlobalContributionId2,
|
|
2925
|
-
version:
|
|
2975
|
+
version: z12.number().int().positive(),
|
|
2926
2976
|
uri: PluginEventUri2,
|
|
2927
2977
|
related: PluginEventRelated2.optional(),
|
|
2928
2978
|
key: PluginEventPublishInput2.shape.key,
|
|
@@ -2931,30 +2981,30 @@ function createPluginEventsSchemas(canonical) {
|
|
|
2931
2981
|
source: PluginEventSource2,
|
|
2932
2982
|
payload: JsonValue.optional()
|
|
2933
2983
|
});
|
|
2934
|
-
const PluginSignal2 =
|
|
2935
|
-
kind:
|
|
2936
|
-
direction:
|
|
2937
|
-
title:
|
|
2938
|
-
snippet:
|
|
2939
|
-
actor:
|
|
2940
|
-
name:
|
|
2984
|
+
const PluginSignal2 = z12.strictObject({
|
|
2985
|
+
kind: z12.enum(PLUGIN_SIGNAL_KINDS),
|
|
2986
|
+
direction: z12.enum(["in", "out"]).optional(),
|
|
2987
|
+
title: z12.string().max(PLUGIN_SIGNAL_TITLE_MAX).optional(),
|
|
2988
|
+
snippet: z12.string().max(PLUGIN_SIGNAL_SNIPPET_MAX).optional(),
|
|
2989
|
+
actor: z12.strictObject({
|
|
2990
|
+
name: z12.string().max(PLUGIN_SIGNAL_TITLE_MAX).optional(),
|
|
2941
2991
|
uri: PluginEventUri2
|
|
2942
2992
|
}).optional(),
|
|
2943
|
-
addressed:
|
|
2944
|
-
labels:
|
|
2993
|
+
addressed: z12.enum(["direct", "cc", "mention", "group", "none"]).optional(),
|
|
2994
|
+
labels: z12.array(z12.string().min(1).max(PLUGIN_SIGNAL_LABEL_MAX)).max(PLUGIN_SIGNAL_LABELS_MAX).optional(),
|
|
2945
2995
|
dueAt: PluginEventTimestamp2.optional(),
|
|
2946
|
-
state:
|
|
2996
|
+
state: z12.enum(["open", "resolved"]).optional()
|
|
2947
2997
|
}).refine((signal) => signal.state === void 0 || signal.kind === "status", {
|
|
2948
2998
|
message: "state is only for a status signal",
|
|
2949
2999
|
path: ["state"]
|
|
2950
3000
|
});
|
|
2951
|
-
const PluginSignalRelatedValue =
|
|
3001
|
+
const PluginSignalRelatedValue = z12.union([
|
|
2952
3002
|
PluginEventUri2,
|
|
2953
|
-
|
|
3003
|
+
z12.array(PluginEventUri2)
|
|
2954
3004
|
]);
|
|
2955
|
-
const PluginSignalPublish2 =
|
|
3005
|
+
const PluginSignalPublish2 = z12.object({
|
|
2956
3006
|
payload: PluginSignal2,
|
|
2957
|
-
related:
|
|
3007
|
+
related: z12.strictObject({
|
|
2958
3008
|
thread: PluginEventUri2,
|
|
2959
3009
|
from: PluginSignalRelatedValue.optional(),
|
|
2960
3010
|
to: PluginSignalRelatedValue.optional(),
|
|
@@ -2978,7 +3028,7 @@ function createPluginEventsSchemas(canonical) {
|
|
|
2978
3028
|
var { PluginSignal, PluginSignalPublish, PluginEventLocalId, PluginEventUri, PluginEventTimestamp, PluginEventRelated, PluginEventPublishSource, PluginEventSource, PluginEventId, PluginEventPublishInput, PluginEventEnvelope } = createPluginEventsSchemas(false);
|
|
2979
3029
|
var canonicalPluginEventSchemas = createPluginEventsSchemas(true);
|
|
2980
3030
|
function pluginSignalPayloadJsonSchema() {
|
|
2981
|
-
return
|
|
3031
|
+
return z12.toJSONSchema(PluginSignal, {
|
|
2982
3032
|
io: "input",
|
|
2983
3033
|
unrepresentable: "any"
|
|
2984
3034
|
});
|
|
@@ -3333,22 +3383,22 @@ function createContributionsSchemas(canonical) {
|
|
|
3333
3383
|
const { AuthSchemeReference: AuthSchemeReference2, AuthServiceReference: AuthServiceReference2, CliAuthEnvVarName: CliAuthEnvVarName2, CliBinaryName: CliBinaryName2, FileExtensionToken: FileExtensionToken2, GitBasicAuthUser: GitBasicAuthUser2, GitHostName: GitHostName2, LocalContributionId: LocalContributionId2, MimeTypeString: MimeTypeString2, NonEmptyString: NonEmptyString3, PackageAssetPath: PackageAssetPath2, PluginId: PluginId2, PluginToolName: PluginToolName2, TargetEntrypoint: TargetEntrypoint2, UriScheme: UriScheme2 } = canonical ? canonicalCommonSchemas : common_exports;
|
|
3334
3384
|
const { ScopeRequirement: ScopeRequirement2 } = canonical ? canonicalPermissionSchemas : permissions_exports;
|
|
3335
3385
|
const OptionalDisplayName = NonEmptyString3.optional();
|
|
3336
|
-
const ApprovalCardValueName =
|
|
3337
|
-
const ApprovalCardForm2 =
|
|
3386
|
+
const ApprovalCardValueName = z13.string().regex(/^[A-Za-z][A-Za-z0-9_]{0,63}$/u, "must be a plain field name");
|
|
3387
|
+
const ApprovalCardForm2 = z13.strictObject({
|
|
3338
3388
|
/** Where the write goes: a fixed address, or the card value that names one. */
|
|
3339
|
-
uri:
|
|
3340
|
-
|
|
3341
|
-
|
|
3389
|
+
uri: z13.union([
|
|
3390
|
+
z13.strictObject({ fixed: NonEmptyString3 }),
|
|
3391
|
+
z13.strictObject({ value: ApprovalCardValueName })
|
|
3342
3392
|
]),
|
|
3343
3393
|
/** The delivery request fields this kind of card accepts, beyond provider and account. */
|
|
3344
|
-
requestFields:
|
|
3394
|
+
requestFields: z13.array(ApprovalCardValueName).optional(),
|
|
3345
3395
|
/** Payload field to the card value it is filled from. An absent value or empty list is left out. */
|
|
3346
|
-
payload:
|
|
3396
|
+
payload: z13.record(ApprovalCardValueName, ApprovalCardValueName),
|
|
3347
3397
|
/** Payload fields with a constant value. */
|
|
3348
|
-
fixed:
|
|
3398
|
+
fixed: z13.record(ApprovalCardValueName, z13.union([z13.string(), z13.boolean()])).optional()
|
|
3349
3399
|
});
|
|
3350
3400
|
const ApprovalCardStoredForm2 = ApprovalCardForm2.extend({
|
|
3351
|
-
read:
|
|
3401
|
+
read: z13.strictObject({
|
|
3352
3402
|
revision: ApprovalCardValueName,
|
|
3353
3403
|
body: ApprovalCardValueName,
|
|
3354
3404
|
subject: ApprovalCardValueName.optional(),
|
|
@@ -3359,13 +3409,13 @@ function createContributionsSchemas(canonical) {
|
|
|
3359
3409
|
attachments: ApprovalCardValueName.optional()
|
|
3360
3410
|
})
|
|
3361
3411
|
});
|
|
3362
|
-
const ApprovalCardField =
|
|
3412
|
+
const ApprovalCardField = z13.strictObject({
|
|
3363
3413
|
key: ApprovalCardValueName,
|
|
3364
|
-
max:
|
|
3414
|
+
max: z13.number().int().positive()
|
|
3365
3415
|
});
|
|
3366
|
-
const ApprovalTypeContribution2 =
|
|
3416
|
+
const ApprovalTypeContribution2 = z13.strictObject({
|
|
3367
3417
|
localId: LocalContributionId2,
|
|
3368
|
-
kind:
|
|
3418
|
+
kind: z13.literal("message"),
|
|
3369
3419
|
/** The URI scheme of `uriModule` that cards of this type write to. */
|
|
3370
3420
|
provider: UriScheme2,
|
|
3371
3421
|
/** The local id of this plugin's URI module that handles the write. */
|
|
@@ -3373,82 +3423,82 @@ function createContributionsSchemas(canonical) {
|
|
|
3373
3423
|
/** Shown when a send's outcome cannot be confirmed: where the person checks. */
|
|
3374
3424
|
unknownMessage: NonEmptyString3,
|
|
3375
3425
|
/** The payload fields holding the text a person may edit. A `subject` makes this a mail type. */
|
|
3376
|
-
fields:
|
|
3426
|
+
fields: z13.strictObject({
|
|
3377
3427
|
body: ApprovalCardField,
|
|
3378
3428
|
subject: ApprovalCardField.optional()
|
|
3379
3429
|
}),
|
|
3380
|
-
presentation:
|
|
3381
|
-
showAccount:
|
|
3382
|
-
recipient:
|
|
3430
|
+
presentation: z13.strictObject({
|
|
3431
|
+
showAccount: z13.boolean(),
|
|
3432
|
+
recipient: z13.enum(["person", "target"])
|
|
3383
3433
|
}),
|
|
3384
3434
|
/** One form per kind of card this provider supports. A kind left out is never bound. */
|
|
3385
|
-
forms:
|
|
3435
|
+
forms: z13.strictObject({
|
|
3386
3436
|
inline: ApprovalCardForm2.optional(),
|
|
3387
3437
|
saved: ApprovalCardForm2.optional(),
|
|
3388
3438
|
stored: ApprovalCardStoredForm2.optional()
|
|
3389
3439
|
}),
|
|
3390
3440
|
/** What the card shows beyond its text, read from the delivery request. */
|
|
3391
|
-
display:
|
|
3441
|
+
display: z13.strictObject({
|
|
3392
3442
|
/** How the renderer reads the body. Absent is Markdown, or plain for a stored draft. */
|
|
3393
|
-
bodyFormat:
|
|
3443
|
+
bodyFormat: z13.literal("mrkdwn").optional(),
|
|
3394
3444
|
/** The request field naming what this card replies to. */
|
|
3395
3445
|
replyField: ApprovalCardValueName.optional(),
|
|
3396
3446
|
/** Shown instead of the reply's id when that id means nothing to a person. */
|
|
3397
3447
|
replyLabel: NonEmptyString3.optional(),
|
|
3398
3448
|
/** Further request fields shown as labelled lines. */
|
|
3399
|
-
facts:
|
|
3449
|
+
facts: z13.array(z13.strictObject({
|
|
3400
3450
|
label: NonEmptyString3,
|
|
3401
3451
|
field: ApprovalCardValueName
|
|
3402
3452
|
})).optional()
|
|
3403
3453
|
}).optional()
|
|
3404
3454
|
});
|
|
3405
|
-
const ToolIdentity =
|
|
3455
|
+
const ToolIdentity = z13.strictObject({
|
|
3406
3456
|
localId: LocalContributionId2,
|
|
3407
3457
|
toolName: PluginToolName2,
|
|
3408
3458
|
displayName: OptionalDisplayName,
|
|
3409
3459
|
description: NonEmptyString3.optional()
|
|
3410
3460
|
});
|
|
3411
|
-
const ToolPermission2 =
|
|
3412
|
-
kind:
|
|
3461
|
+
const ToolPermission2 = z13.strictObject({
|
|
3462
|
+
kind: z13.enum(["read", "mutate", "destructive", "execute"]),
|
|
3413
3463
|
ruleKey: NonEmptyString3.optional(),
|
|
3414
3464
|
scheme: NonEmptyString3.optional(),
|
|
3415
|
-
resourcePrefix:
|
|
3465
|
+
resourcePrefix: z13.string().max(256).optional(),
|
|
3416
3466
|
// Arguments whose string values name the resources a call touches.
|
|
3417
|
-
resourceArgs:
|
|
3418
|
-
resourceTrim:
|
|
3419
|
-
defaultPermission:
|
|
3467
|
+
resourceArgs: z13.array(NonEmptyString3).min(1).optional(),
|
|
3468
|
+
resourceTrim: z13.literal(true).optional(),
|
|
3469
|
+
defaultPermission: z13.enum(["allow", "ask", "never"]).optional(),
|
|
3420
3470
|
/** First matching rule wins; every condition in its when list must hold. */
|
|
3421
|
-
classificationRules:
|
|
3422
|
-
when:
|
|
3423
|
-
|
|
3471
|
+
classificationRules: z13.array(z13.strictObject({
|
|
3472
|
+
when: z13.array(z13.union([
|
|
3473
|
+
z13.strictObject({
|
|
3424
3474
|
arg: NonEmptyString3,
|
|
3425
|
-
equals:
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3475
|
+
equals: z13.union([
|
|
3476
|
+
z13.string(),
|
|
3477
|
+
z13.number(),
|
|
3478
|
+
z13.boolean(),
|
|
3479
|
+
z13.null()
|
|
3430
3480
|
])
|
|
3431
3481
|
}),
|
|
3432
|
-
|
|
3482
|
+
z13.strictObject({ arg: NonEmptyString3, present: z13.boolean() })
|
|
3433
3483
|
])).min(1).max(32),
|
|
3434
|
-
kind:
|
|
3484
|
+
kind: z13.enum(["read", "mutate", "destructive", "execute"]),
|
|
3435
3485
|
ruleKey: NonEmptyString3.optional()
|
|
3436
3486
|
})).min(1).max(64).optional()
|
|
3437
3487
|
});
|
|
3438
|
-
const ToolContribution2 =
|
|
3488
|
+
const ToolContribution2 = z13.strictObject({
|
|
3439
3489
|
...ToolIdentity.shape,
|
|
3440
3490
|
parameters: JsonSchema.optional(),
|
|
3441
|
-
executionMode:
|
|
3491
|
+
executionMode: z13.enum(["sequential", "parallel"]).optional(),
|
|
3442
3492
|
promptSnippet: NonEmptyString3.optional(),
|
|
3443
|
-
promptGuidelines:
|
|
3493
|
+
promptGuidelines: z13.array(NonEmptyString3).optional(),
|
|
3444
3494
|
permission: ToolPermission2.optional()
|
|
3445
3495
|
});
|
|
3446
|
-
const AgentToolContribution2 =
|
|
3496
|
+
const AgentToolContribution2 = z13.strictObject({
|
|
3447
3497
|
...ToolContribution2.shape,
|
|
3448
3498
|
parameters: JsonSchema.optional(),
|
|
3449
|
-
executionMode:
|
|
3499
|
+
executionMode: z13.enum(["sequential", "parallel"]).optional(),
|
|
3450
3500
|
promptSnippet: NonEmptyString3.optional(),
|
|
3451
|
-
promptGuidelines:
|
|
3501
|
+
promptGuidelines: z13.array(NonEmptyString3).optional(),
|
|
3452
3502
|
// A local ref names an auth service declared in this manifest; a dotted ref names another
|
|
3453
3503
|
// plugin's service, as `UriModuleContribution.authService` does.
|
|
3454
3504
|
authService: AuthServiceReference2.optional(),
|
|
@@ -3456,17 +3506,17 @@ function createContributionsSchemas(canonical) {
|
|
|
3456
3506
|
authScheme: LocalContributionId2.optional(),
|
|
3457
3507
|
permission: ToolPermission2.optional()
|
|
3458
3508
|
});
|
|
3459
|
-
const ConverterContribution2 =
|
|
3509
|
+
const ConverterContribution2 = z13.strictObject({
|
|
3460
3510
|
localId: LocalContributionId2,
|
|
3461
3511
|
displayName: OptionalDisplayName,
|
|
3462
3512
|
description: NonEmptyString3.optional(),
|
|
3463
3513
|
/** MIME types this converter claims - contract data for introspection and
|
|
3464
3514
|
* collision checks; runtime match behavior stays the converter's `matches()`. */
|
|
3465
|
-
mimeTypes:
|
|
3515
|
+
mimeTypes: z13.array(MimeTypeString2).min(1),
|
|
3466
3516
|
/** Extension fallbacks (no dot) used when a probe has no usable MIME type. */
|
|
3467
|
-
extensions:
|
|
3517
|
+
extensions: z13.array(FileExtensionToken2).min(1).optional()
|
|
3468
3518
|
});
|
|
3469
|
-
const UriOperationName =
|
|
3519
|
+
const UriOperationName = z13.enum([
|
|
3470
3520
|
"help",
|
|
3471
3521
|
"read",
|
|
3472
3522
|
"write",
|
|
@@ -3475,8 +3525,8 @@ function createContributionsSchemas(canonical) {
|
|
|
3475
3525
|
"search",
|
|
3476
3526
|
"delete"
|
|
3477
3527
|
]);
|
|
3478
|
-
const UriPermissionDefault =
|
|
3479
|
-
const UriVerbSentences =
|
|
3528
|
+
const UriPermissionDefault = z13.enum(["allow", "ask", "never"]);
|
|
3529
|
+
const UriVerbSentences = z13.strictObject({
|
|
3480
3530
|
read: NonEmptyString3.exactOptional(),
|
|
3481
3531
|
list: NonEmptyString3.exactOptional(),
|
|
3482
3532
|
search: NonEmptyString3.exactOptional(),
|
|
@@ -3484,81 +3534,83 @@ function createContributionsSchemas(canonical) {
|
|
|
3484
3534
|
edit: NonEmptyString3.exactOptional(),
|
|
3485
3535
|
delete: NonEmptyString3.exactOptional()
|
|
3486
3536
|
});
|
|
3487
|
-
const UriPatternInit =
|
|
3537
|
+
const UriPatternInit = z13.strictObject({
|
|
3488
3538
|
protocol: NonEmptyString3.exactOptional(),
|
|
3489
3539
|
hostname: NonEmptyString3.exactOptional(),
|
|
3490
3540
|
pathname: NonEmptyString3.exactOptional(),
|
|
3491
|
-
search:
|
|
3541
|
+
search: z13.string().exactOptional()
|
|
3492
3542
|
});
|
|
3493
|
-
const UriClaimContribution =
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
kind:
|
|
3543
|
+
const UriClaimContribution = z13.discriminatedUnion("kind", [
|
|
3544
|
+
z13.strictObject({ kind: z13.literal("scheme"), scheme: UriScheme2 }),
|
|
3545
|
+
z13.strictObject({
|
|
3546
|
+
kind: z13.literal("uriPattern"),
|
|
3497
3547
|
pattern: UriPatternInit,
|
|
3498
3548
|
normalizeTo: NonEmptyString3.exactOptional(),
|
|
3499
3549
|
route: LocalContributionId2.exactOptional(),
|
|
3500
3550
|
sourceUrl: NonEmptyString3.exactOptional(),
|
|
3501
3551
|
title: NonEmptyString3.exactOptional(),
|
|
3502
|
-
examples:
|
|
3552
|
+
examples: z13.array(NonEmptyString3).exactOptional()
|
|
3503
3553
|
}),
|
|
3504
|
-
|
|
3505
|
-
kind:
|
|
3554
|
+
z13.strictObject({
|
|
3555
|
+
kind: z13.literal("urlPattern"),
|
|
3506
3556
|
pattern: UriPatternInit,
|
|
3507
3557
|
normalizeTo: NonEmptyString3.exactOptional(),
|
|
3508
3558
|
route: LocalContributionId2.exactOptional(),
|
|
3509
|
-
examples:
|
|
3559
|
+
examples: z13.array(NonEmptyString3).exactOptional()
|
|
3510
3560
|
})
|
|
3511
3561
|
]);
|
|
3512
|
-
const UriTemplateContribution =
|
|
3562
|
+
const UriTemplateContribution = z13.strictObject({
|
|
3513
3563
|
uri: NonEmptyString3,
|
|
3514
3564
|
description: NonEmptyString3,
|
|
3515
|
-
operations:
|
|
3516
|
-
operationDocs:
|
|
3517
|
-
operationDefaults:
|
|
3565
|
+
operations: z13.array(UriOperationName).exactOptional(),
|
|
3566
|
+
operationDocs: z13.partialRecord(UriOperationName, NonEmptyString3).exactOptional(),
|
|
3567
|
+
operationDefaults: z13.partialRecord(UriOperationName, UriPermissionDefault).exactOptional()
|
|
3518
3568
|
});
|
|
3519
3569
|
const UriAuthActionRuleConditions = {
|
|
3520
|
-
operations:
|
|
3521
|
-
routes:
|
|
3522
|
-
query:
|
|
3570
|
+
operations: z13.array(UriOperationName).min(1).exactOptional(),
|
|
3571
|
+
routes: z13.array(LocalContributionId2).min(1).exactOptional(),
|
|
3572
|
+
query: z13.record(NonEmptyString3, z13.string()).exactOptional()
|
|
3523
3573
|
};
|
|
3524
|
-
const UriAuthActionRule =
|
|
3525
|
-
|
|
3526
|
-
|
|
3574
|
+
const UriAuthActionRule = z13.union([
|
|
3575
|
+
z13.strictObject({ ...UriAuthActionRuleConditions, action: NonEmptyString3 }),
|
|
3576
|
+
z13.strictObject({ ...UriAuthActionRuleConditions, public: z13.literal(true) })
|
|
3527
3577
|
]);
|
|
3528
|
-
const UriAgentHintContribution =
|
|
3578
|
+
const UriAgentHintContribution = z13.strictObject({
|
|
3529
3579
|
summary: NonEmptyString3,
|
|
3530
|
-
commonFlows:
|
|
3580
|
+
commonFlows: z13.array(z13.strictObject({
|
|
3531
3581
|
label: NonEmptyString3,
|
|
3532
3582
|
when: NonEmptyString3.exactOptional(),
|
|
3533
3583
|
example: NonEmptyString3
|
|
3534
3584
|
})).exactOptional(),
|
|
3535
3585
|
helpUri: NonEmptyString3.exactOptional(),
|
|
3536
|
-
triggers:
|
|
3537
|
-
keywords:
|
|
3538
|
-
patterns:
|
|
3586
|
+
triggers: z13.strictObject({
|
|
3587
|
+
keywords: z13.array(NonEmptyString3).exactOptional(),
|
|
3588
|
+
patterns: z13.array(NonEmptyString3).exactOptional()
|
|
3539
3589
|
}).exactOptional(),
|
|
3540
|
-
skills:
|
|
3590
|
+
skills: z13.array(NonEmptyString3).exactOptional()
|
|
3541
3591
|
});
|
|
3542
|
-
const ScreenActionOption =
|
|
3543
|
-
|
|
3544
|
-
kind:
|
|
3592
|
+
const ScreenActionOption = z13.discriminatedUnion("kind", [
|
|
3593
|
+
z13.strictObject({
|
|
3594
|
+
kind: z13.literal("exact"),
|
|
3545
3595
|
description: NonEmptyString3,
|
|
3546
|
-
verb:
|
|
3596
|
+
verb: z13.enum(["read", "write", "edit", "delete"]),
|
|
3547
3597
|
uri: NonEmptyString3
|
|
3548
3598
|
}),
|
|
3549
|
-
|
|
3550
|
-
kind:
|
|
3599
|
+
z13.strictObject({
|
|
3600
|
+
kind: z13.literal("catch-all"),
|
|
3551
3601
|
description: NonEmptyString3,
|
|
3552
|
-
verb:
|
|
3602
|
+
verb: z13.enum(["read", "write", "edit", "delete"])
|
|
3553
3603
|
})
|
|
3554
3604
|
]);
|
|
3555
3605
|
const UriModuleFactsShape = {
|
|
3556
|
-
|
|
3606
|
+
revisionBacked: z13.literal(true).optional(),
|
|
3607
|
+
mailCalibrationSource: z13.literal(true).optional(),
|
|
3608
|
+
screenActions: z13.strictObject({
|
|
3557
3609
|
scheme: UriScheme2,
|
|
3558
|
-
hosts:
|
|
3559
|
-
paths:
|
|
3560
|
-
apps:
|
|
3561
|
-
options:
|
|
3610
|
+
hosts: z13.array(NonEmptyString3),
|
|
3611
|
+
paths: z13.array(NonEmptyString3).min(1).optional(),
|
|
3612
|
+
apps: z13.array(NonEmptyString3),
|
|
3613
|
+
options: z13.record(NonEmptyString3, ScreenActionOption)
|
|
3562
3614
|
}).superRefine((catalog, ctx) => {
|
|
3563
3615
|
if (catalog.hosts.length === 0 && catalog.apps.length === 0) {
|
|
3564
3616
|
ctx.addIssue({
|
|
@@ -3583,29 +3635,29 @@ function createContributionsSchemas(canonical) {
|
|
|
3583
3635
|
}
|
|
3584
3636
|
}).exactOptional(),
|
|
3585
3637
|
/** Addresses the module answers, in match order; see `@herd/uri`'s `UriClaim`. */
|
|
3586
|
-
claims:
|
|
3638
|
+
claims: z13.array(UriClaimContribution).min(1).exactOptional(),
|
|
3587
3639
|
/** The module's routes, as its scheme-root `help` lists them. */
|
|
3588
|
-
templates:
|
|
3589
|
-
verbs:
|
|
3590
|
-
readable:
|
|
3591
|
-
writable:
|
|
3592
|
-
editable:
|
|
3593
|
-
deletable:
|
|
3594
|
-
listable:
|
|
3640
|
+
templates: z13.array(UriTemplateContribution).exactOptional(),
|
|
3641
|
+
verbs: z13.strictObject({
|
|
3642
|
+
readable: z13.boolean(),
|
|
3643
|
+
writable: z13.boolean(),
|
|
3644
|
+
editable: z13.boolean(),
|
|
3645
|
+
deletable: z13.boolean().exactOptional(),
|
|
3646
|
+
listable: z13.boolean(),
|
|
3595
3647
|
/** The module answers `search`. */
|
|
3596
|
-
searchable:
|
|
3648
|
+
searchable: z13.boolean().exactOptional()
|
|
3597
3649
|
}).exactOptional(),
|
|
3598
3650
|
verbDocs: UriVerbSentences.exactOptional(),
|
|
3599
|
-
permissionDefaults:
|
|
3651
|
+
permissionDefaults: z13.strictObject({
|
|
3600
3652
|
read: UriPermissionDefault.exactOptional(),
|
|
3601
3653
|
write: UriPermissionDefault.exactOptional(),
|
|
3602
3654
|
edit: UriPermissionDefault.exactOptional(),
|
|
3603
3655
|
delete: UriPermissionDefault.exactOptional()
|
|
3604
3656
|
}).exactOptional(),
|
|
3605
3657
|
/** Which sign-in action each call needs: the action table and the rules that pick one. */
|
|
3606
|
-
authActions:
|
|
3607
|
-
actions:
|
|
3608
|
-
rules:
|
|
3658
|
+
authActions: z13.strictObject({
|
|
3659
|
+
actions: z13.record(NonEmptyString3, ScopeRequirement2),
|
|
3660
|
+
rules: z13.array(UriAuthActionRule).min(1)
|
|
3609
3661
|
}).superRefine((policy, ctx) => {
|
|
3610
3662
|
policy.rules.forEach((rule, index) => {
|
|
3611
3663
|
if ("action" in rule && !(rule.action in policy.actions)) {
|
|
@@ -3617,18 +3669,18 @@ function createContributionsSchemas(canonical) {
|
|
|
3617
3669
|
}
|
|
3618
3670
|
});
|
|
3619
3671
|
}).exactOptional(),
|
|
3620
|
-
requiresConnection:
|
|
3621
|
-
acceptsSourceCopy:
|
|
3622
|
-
acceptsWriteSources:
|
|
3623
|
-
acceptsBytes:
|
|
3624
|
-
ownsLineSelectors:
|
|
3672
|
+
requiresConnection: z13.literal(true).exactOptional(),
|
|
3673
|
+
acceptsSourceCopy: z13.literal(false).exactOptional(),
|
|
3674
|
+
acceptsWriteSources: z13.literal(true).exactOptional(),
|
|
3675
|
+
acceptsBytes: z13.literal(true).exactOptional(),
|
|
3676
|
+
ownsLineSelectors: z13.literal(true).exactOptional(),
|
|
3625
3677
|
description: NonEmptyString3.exactOptional(),
|
|
3626
3678
|
agentHint: UriAgentHintContribution.exactOptional()
|
|
3627
3679
|
};
|
|
3628
|
-
const UriModuleFacts2 =
|
|
3629
|
-
const UriModuleContribution2 =
|
|
3680
|
+
const UriModuleFacts2 = z13.strictObject(UriModuleFactsShape);
|
|
3681
|
+
const UriModuleContribution2 = z13.strictObject({
|
|
3630
3682
|
localId: LocalContributionId2,
|
|
3631
|
-
schemes:
|
|
3683
|
+
schemes: z13.array(UriScheme2).min(1),
|
|
3632
3684
|
displayName: OptionalDisplayName,
|
|
3633
3685
|
...UriModuleFactsShape,
|
|
3634
3686
|
// A local ref (no dot) must name an auth service declared in this same
|
|
@@ -3651,15 +3703,15 @@ function createContributionsSchemas(canonical) {
|
|
|
3651
3703
|
// `knownResources` permission grant (`api.knownResources`). Present-means-on
|
|
3652
3704
|
// (`true` or absent; `false` is not a state). Decision record:
|
|
3653
3705
|
// `lab/user-plugins/decisions/014-known-resources-ledger.md`.
|
|
3654
|
-
knownResources:
|
|
3706
|
+
knownResources: z13.literal(true).optional(),
|
|
3655
3707
|
// The module's code defines `describeOperation`, the approval card's facts for a call. The
|
|
3656
3708
|
// daemon reads it here because it may hold only the manifest (a plugin that runs in the
|
|
3657
3709
|
// plugin host), and the host refuses a module whose code disagrees.
|
|
3658
|
-
describesOperations:
|
|
3710
|
+
describesOperations: z13.literal(true).optional(),
|
|
3659
3711
|
// The module's code defines `lookupWebLink`, which finds a resource's page when someone opens
|
|
3660
3712
|
// it. The daemon reads it here for the same reason, and the host refuses a module whose code
|
|
3661
3713
|
// disagrees.
|
|
3662
|
-
looksUpWebLinks:
|
|
3714
|
+
looksUpWebLinks: z13.literal(true).optional()
|
|
3663
3715
|
});
|
|
3664
3716
|
const AppUriModuleContribution2 = UriModuleContribution2.omit({
|
|
3665
3717
|
authActions: true,
|
|
@@ -3669,30 +3721,30 @@ function createContributionsSchemas(canonical) {
|
|
|
3669
3721
|
describesOperations: true,
|
|
3670
3722
|
looksUpWebLinks: true
|
|
3671
3723
|
});
|
|
3672
|
-
const AppDataSourceStore =
|
|
3673
|
-
|
|
3674
|
-
shape:
|
|
3724
|
+
const AppDataSourceStore = z13.discriminatedUnion("shape", [
|
|
3725
|
+
z13.strictObject({
|
|
3726
|
+
shape: z13.literal("rows"),
|
|
3675
3727
|
rowsField: NonEmptyString3,
|
|
3676
|
-
key:
|
|
3728
|
+
key: z13.array(NonEmptyString3).min(1)
|
|
3677
3729
|
}),
|
|
3678
|
-
|
|
3730
|
+
z13.strictObject({ shape: z13.literal("value") })
|
|
3679
3731
|
]);
|
|
3680
|
-
const AppDataSourceContribution2 =
|
|
3732
|
+
const AppDataSourceContribution2 = z13.strictObject({
|
|
3681
3733
|
localId: LocalContributionId2,
|
|
3682
|
-
scope:
|
|
3683
|
-
snapshot:
|
|
3684
|
-
version:
|
|
3734
|
+
scope: z13.enum(["runtime", "account", "session"]),
|
|
3735
|
+
snapshot: z13.strictObject({
|
|
3736
|
+
version: z13.number().int().positive(),
|
|
3685
3737
|
schema: JsonSchema
|
|
3686
3738
|
}),
|
|
3687
|
-
change:
|
|
3688
|
-
version:
|
|
3739
|
+
change: z13.strictObject({
|
|
3740
|
+
version: z13.number().int().positive(),
|
|
3689
3741
|
schema: JsonSchema,
|
|
3690
3742
|
/** Review-only claim; source schemas and behavioral tests enforce it because the daemon treats changes as opaque. */
|
|
3691
|
-
semantics:
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
kind:
|
|
3695
|
-
maxEncodedBytes:
|
|
3743
|
+
semantics: z13.discriminatedUnion("kind", [
|
|
3744
|
+
z13.strictObject({ kind: z13.literal("incremental") }),
|
|
3745
|
+
z13.strictObject({
|
|
3746
|
+
kind: z13.literal("snapshot-replacement"),
|
|
3747
|
+
maxEncodedBytes: z13.number().int().positive(),
|
|
3696
3748
|
rationale: pluginString(canonical).min(1).max(1024)
|
|
3697
3749
|
})
|
|
3698
3750
|
]).optional()
|
|
@@ -3718,25 +3770,25 @@ function createContributionsSchemas(canonical) {
|
|
|
3718
3770
|
});
|
|
3719
3771
|
}
|
|
3720
3772
|
});
|
|
3721
|
-
const WhiteboardTypeStorage2 =
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
kind:
|
|
3773
|
+
const WhiteboardTypeStorage2 = z13.discriminatedUnion("kind", [
|
|
3774
|
+
z13.strictObject({ kind: z13.literal("json") }),
|
|
3775
|
+
z13.strictObject({ kind: z13.literal("payload") }),
|
|
3776
|
+
z13.strictObject({
|
|
3777
|
+
kind: z13.literal("markdown"),
|
|
3726
3778
|
bodyField: NonEmptyString3
|
|
3727
3779
|
})
|
|
3728
3780
|
]);
|
|
3729
|
-
const WhiteboardTypeContribution2 =
|
|
3781
|
+
const WhiteboardTypeContribution2 = z13.strictObject({
|
|
3730
3782
|
localId: LocalContributionId2,
|
|
3731
3783
|
displayName: NonEmptyString3,
|
|
3732
|
-
schemaVersion:
|
|
3784
|
+
schemaVersion: z13.number().int().positive(),
|
|
3733
3785
|
storage: WhiteboardTypeStorage2,
|
|
3734
3786
|
valueSchema: JsonSchema
|
|
3735
3787
|
});
|
|
3736
|
-
const AppDataMaterializerContribution2 =
|
|
3788
|
+
const AppDataMaterializerContribution2 = z13.strictObject({
|
|
3737
3789
|
source: LocalContributionId2
|
|
3738
3790
|
});
|
|
3739
|
-
const ArtifactUriModuleContribution2 =
|
|
3791
|
+
const ArtifactUriModuleContribution2 = z13.strictObject({
|
|
3740
3792
|
localId: LocalContributionId2,
|
|
3741
3793
|
/** The single `scheme://` this module owns; also the on-disk artifact kind. */
|
|
3742
3794
|
scheme: UriScheme2,
|
|
@@ -3750,17 +3802,17 @@ function createContributionsSchemas(canonical) {
|
|
|
3750
3802
|
* composes its description from the plugin's own display name + scheme - a per-scheme label
|
|
3751
3803
|
* would have no path to matter, so it is intentionally omitted rather than accepted-and-ignored.
|
|
3752
3804
|
*/
|
|
3753
|
-
editable:
|
|
3805
|
+
editable: z13.boolean().optional(),
|
|
3754
3806
|
/** Opt in to `list` over the kind's stored names. Default false. Mirrors
|
|
3755
3807
|
* `CreateArtifactUriModuleOptions.listable`. */
|
|
3756
|
-
listable:
|
|
3808
|
+
listable: z13.boolean().optional(),
|
|
3757
3809
|
/**
|
|
3758
3810
|
* Opt in to `delete` for same-session entries. Default false. Deletion
|
|
3759
3811
|
* unlinks the stored file - no trash tier; a kind that wants recoverable
|
|
3760
3812
|
* deletion is not artifact-backed. Mirrors
|
|
3761
3813
|
* `CreateArtifactUriModuleOptions.deletable`.
|
|
3762
3814
|
*/
|
|
3763
|
-
deletable:
|
|
3815
|
+
deletable: z13.boolean().optional(),
|
|
3764
3816
|
/**
|
|
3765
3817
|
* Opt in to the `{ content, mode: "append" }` write envelope, which extends
|
|
3766
3818
|
* stored text instead of replacing it (concurrent-appender-safe: the host
|
|
@@ -3768,7 +3820,7 @@ function createContributionsSchemas(canonical) {
|
|
|
3768
3820
|
* keep their verbatim round-trip. Mirrors
|
|
3769
3821
|
* `CreateArtifactUriModuleOptions.appendable`.
|
|
3770
3822
|
*/
|
|
3771
|
-
appendable:
|
|
3823
|
+
appendable: z13.boolean().optional(),
|
|
3772
3824
|
/**
|
|
3773
3825
|
* Which sessions share one storage namespace. Default `"session"` - the existing
|
|
3774
3826
|
* per-session behavior (each session gets its own kind directory; other sessions'
|
|
@@ -3779,14 +3831,14 @@ function createContributionsSchemas(canonical) {
|
|
|
3779
3831
|
* the scope; the host derives the family root from provenance it already holds, so
|
|
3780
3832
|
* family identity never crosses the SDK boundary.
|
|
3781
3833
|
*/
|
|
3782
|
-
storageScope:
|
|
3834
|
+
storageScope: z13.enum(["session", "family"]).optional()
|
|
3783
3835
|
});
|
|
3784
|
-
const CliBindingContribution2 =
|
|
3836
|
+
const CliBindingContribution2 = z13.strictObject({
|
|
3785
3837
|
localId: LocalContributionId2,
|
|
3786
3838
|
binary: CliBinaryName2,
|
|
3787
|
-
aliases:
|
|
3839
|
+
aliases: z13.array(CliBinaryName2).optional(),
|
|
3788
3840
|
/** Where the binary comes from. Omitted => `"vendored"` (decision 007). */
|
|
3789
|
-
provider:
|
|
3841
|
+
provider: z13.enum(["vendored", "path"]).optional(),
|
|
3790
3842
|
// A local ref (no dot) must name an auth service declared in this same
|
|
3791
3843
|
// manifest; a qualified ref (dotted, e.g. `google.account`) names another
|
|
3792
3844
|
// plugin's already-minted global id and is recorded, not resolved, here (see
|
|
@@ -3799,20 +3851,20 @@ function createContributionsSchemas(canonical) {
|
|
|
3799
3851
|
* MUST be absent for a `path` binding, which can never receive a token.
|
|
3800
3852
|
*/
|
|
3801
3853
|
authEnvVar: CliAuthEnvVarName2.optional(),
|
|
3802
|
-
readOnly:
|
|
3803
|
-
write:
|
|
3854
|
+
readOnly: z13.array(NonEmptyString3),
|
|
3855
|
+
write: z13.array(NonEmptyString3)
|
|
3804
3856
|
});
|
|
3805
|
-
const GitHostContribution2 =
|
|
3857
|
+
const GitHostContribution2 = z13.strictObject({
|
|
3806
3858
|
host: GitHostName2,
|
|
3807
3859
|
authService: LocalContributionId2,
|
|
3808
3860
|
basicAuthUser: GitBasicAuthUser2
|
|
3809
3861
|
});
|
|
3810
|
-
const ResourceContribution2 =
|
|
3862
|
+
const ResourceContribution2 = z13.strictObject({
|
|
3811
3863
|
localId: LocalContributionId2,
|
|
3812
3864
|
displayName: OptionalDisplayName,
|
|
3813
3865
|
description: NonEmptyString3.optional()
|
|
3814
3866
|
});
|
|
3815
|
-
const SkillContribution2 =
|
|
3867
|
+
const SkillContribution2 = z13.strictObject({
|
|
3816
3868
|
localId: LocalContributionId2,
|
|
3817
3869
|
displayName: OptionalDisplayName,
|
|
3818
3870
|
/** Model-visible one-liner: when to reach for this skill. */
|
|
@@ -3820,18 +3872,18 @@ function createContributionsSchemas(canonical) {
|
|
|
3820
3872
|
/** The SKILL.md-style file inside the package carrying the full instructions. */
|
|
3821
3873
|
path: PackageAssetPath2
|
|
3822
3874
|
});
|
|
3823
|
-
const PluginSkillSourceDeclaration2 =
|
|
3824
|
-
|
|
3825
|
-
channel:
|
|
3875
|
+
const PluginSkillSourceDeclaration2 = z13.discriminatedUnion("channel", [
|
|
3876
|
+
z13.strictObject({
|
|
3877
|
+
channel: z13.literal("installer"),
|
|
3826
3878
|
localId: LocalContributionId2,
|
|
3827
3879
|
displayName: OptionalDisplayName,
|
|
3828
3880
|
/** The package-runner executable, e.g. `npx` - checked against the daemon's allowlist. */
|
|
3829
3881
|
command: NonEmptyString3,
|
|
3830
3882
|
/** Its argv, e.g. `["skills", "add", "clerk/skills"]`. */
|
|
3831
|
-
args:
|
|
3883
|
+
args: z13.array(NonEmptyString3)
|
|
3832
3884
|
}),
|
|
3833
|
-
|
|
3834
|
-
channel:
|
|
3885
|
+
z13.strictObject({
|
|
3886
|
+
channel: z13.literal("git-clone"),
|
|
3835
3887
|
localId: LocalContributionId2,
|
|
3836
3888
|
displayName: OptionalDisplayName,
|
|
3837
3889
|
/** The repository locator - canonicalized and hygiene-checked by the daemon. */
|
|
@@ -3842,17 +3894,17 @@ function createContributionsSchemas(canonical) {
|
|
|
3842
3894
|
subdir: NonEmptyString3.optional()
|
|
3843
3895
|
})
|
|
3844
3896
|
]);
|
|
3845
|
-
const SearchProviderContribution2 =
|
|
3897
|
+
const SearchProviderContribution2 = z13.strictObject({
|
|
3846
3898
|
localId: LocalContributionId2,
|
|
3847
3899
|
displayName: OptionalDisplayName,
|
|
3848
|
-
schemes:
|
|
3900
|
+
schemes: z13.array(UriScheme2).optional()
|
|
3849
3901
|
});
|
|
3850
|
-
const InteractionDriverContribution2 =
|
|
3902
|
+
const InteractionDriverContribution2 = z13.strictObject({
|
|
3851
3903
|
localId: LocalContributionId2,
|
|
3852
3904
|
displayName: OptionalDisplayName,
|
|
3853
|
-
kind:
|
|
3905
|
+
kind: z13.enum(["browser", "computer-use"])
|
|
3854
3906
|
});
|
|
3855
|
-
const EntityResolverContribution2 =
|
|
3907
|
+
const EntityResolverContribution2 = z13.strictObject({
|
|
3856
3908
|
localId: LocalContributionId2,
|
|
3857
3909
|
displayName: OptionalDisplayName,
|
|
3858
3910
|
/** The `kay.agent` URI module (this manifest's own `contributes.uriModules[].localId`) whose
|
|
@@ -3860,17 +3912,17 @@ function createContributionsSchemas(canonical) {
|
|
|
3860
3912
|
uriModule: LocalContributionId2,
|
|
3861
3913
|
/** `person` | `channel` | `repo` | `pull-request` | ... -- drives avatar-first vs glyph-first row
|
|
3862
3914
|
* anatomy (N10-R2) and lets the renderer request a narrower `entityTypes` filter. */
|
|
3863
|
-
entityTypes:
|
|
3915
|
+
entityTypes: z13.array(NonEmptyString3).min(1),
|
|
3864
3916
|
/** The URI namespace/route `search()` is called against, e.g. `slack://directory` or
|
|
3865
3917
|
* `github://search/repositories` -- the resolver's fixed search scope; the live user query is
|
|
3866
3918
|
* the `search()` call's `query` param, never concatenated into this string. */
|
|
3867
3919
|
uriHint: NonEmptyString3
|
|
3868
3920
|
});
|
|
3869
|
-
const AgentRenderContribution2 =
|
|
3921
|
+
const AgentRenderContribution2 = z13.strictObject({
|
|
3870
3922
|
localId: LocalContributionId2,
|
|
3871
|
-
resultKinds:
|
|
3923
|
+
resultKinds: z13.array(NonEmptyString3).min(1)
|
|
3872
3924
|
});
|
|
3873
|
-
const PluginCardContribution2 =
|
|
3925
|
+
const PluginCardContribution2 = z13.strictObject({
|
|
3874
3926
|
localId: LocalContributionId2,
|
|
3875
3927
|
description: NonEmptyString3,
|
|
3876
3928
|
inputs: JsonSchema,
|
|
@@ -3878,26 +3930,26 @@ function createContributionsSchemas(canonical) {
|
|
|
3878
3930
|
submitEndpoint: LocalContributionId2,
|
|
3879
3931
|
authService: AuthServiceReference2.optional()
|
|
3880
3932
|
});
|
|
3881
|
-
const EndpointContribution2 =
|
|
3933
|
+
const EndpointContribution2 = z13.strictObject({
|
|
3882
3934
|
localId: LocalContributionId2,
|
|
3883
3935
|
displayName: OptionalDisplayName,
|
|
3884
3936
|
requestSchema: JsonSchema.optional(),
|
|
3885
3937
|
responseSchema: JsonSchema.optional(),
|
|
3886
|
-
auth:
|
|
3938
|
+
auth: z13.strictObject({
|
|
3887
3939
|
service: AuthServiceReference2,
|
|
3888
|
-
schemes:
|
|
3940
|
+
schemes: z13.array(AuthSchemeReference2).min(1),
|
|
3889
3941
|
purpose: NonEmptyString3
|
|
3890
3942
|
}).optional(),
|
|
3891
|
-
timeoutMs:
|
|
3943
|
+
timeoutMs: z13.number().int().positive().optional()
|
|
3892
3944
|
});
|
|
3893
|
-
const WorkflowContribution2 =
|
|
3945
|
+
const WorkflowContribution2 = z13.strictObject({
|
|
3894
3946
|
localId: LocalContributionId2,
|
|
3895
3947
|
name: NonEmptyString3,
|
|
3896
3948
|
/** Plain-text purpose, at most 280 characters. */
|
|
3897
3949
|
description: NonEmptyString3,
|
|
3898
3950
|
/** How often it runs. The automations engine enforces its scheduling floor. */
|
|
3899
|
-
everyMs:
|
|
3900
|
-
auth:
|
|
3951
|
+
everyMs: z13.number().int().positive(),
|
|
3952
|
+
auth: z13.strictObject({
|
|
3901
3953
|
/** A local ref names a service in this manifest; a dotted ref names another plugin's. */
|
|
3902
3954
|
service: AuthServiceReference2,
|
|
3903
3955
|
scheme: AuthSchemeReference2,
|
|
@@ -3905,7 +3957,7 @@ function createContributionsSchemas(canonical) {
|
|
|
3905
3957
|
* Scopes each account's token must hold. Omitted, the host asks for the first scope of the
|
|
3906
3958
|
* `background-job` grant's `allowedScopes` that the account holds.
|
|
3907
3959
|
*/
|
|
3908
|
-
scopes:
|
|
3960
|
+
scopes: z13.array(NonEmptyString3).min(1).optional()
|
|
3909
3961
|
}).optional()
|
|
3910
3962
|
});
|
|
3911
3963
|
const McpServerUrl2 = pluginString(canonical).min(1).refine((value) => {
|
|
@@ -3921,8 +3973,8 @@ function createContributionsSchemas(canonical) {
|
|
|
3921
3973
|
}, {
|
|
3922
3974
|
message: "mcp server url must be https://, or http:// only for localhost/127.0.0.1 test servers"
|
|
3923
3975
|
});
|
|
3924
|
-
const McpServerAuthMode2 =
|
|
3925
|
-
const McpServerContribution2 =
|
|
3976
|
+
const McpServerAuthMode2 = z13.enum(["oauth", "api-key", "none"]);
|
|
3977
|
+
const McpServerContribution2 = z13.strictObject({
|
|
3926
3978
|
url: McpServerUrl2,
|
|
3927
3979
|
auth: McpServerAuthMode2.optional(),
|
|
3928
3980
|
authService: LocalContributionId2.optional()
|
|
@@ -3935,24 +3987,24 @@ function createContributionsSchemas(canonical) {
|
|
|
3935
3987
|
});
|
|
3936
3988
|
}
|
|
3937
3989
|
});
|
|
3938
|
-
const McpServerContributions2 =
|
|
3939
|
-
const AppEventSubscription2 =
|
|
3990
|
+
const McpServerContributions2 = z13.record(LocalContributionId2, McpServerContribution2);
|
|
3991
|
+
const AppEventSubscription2 = z13.strictObject({
|
|
3940
3992
|
localId: LocalContributionId2,
|
|
3941
3993
|
event: NonEmptyString3
|
|
3942
3994
|
});
|
|
3943
|
-
const ContextContributorContribution2 =
|
|
3995
|
+
const ContextContributorContribution2 = z13.strictObject({
|
|
3944
3996
|
localId: LocalContributionId2.max(64),
|
|
3945
3997
|
displayName: OptionalDisplayName,
|
|
3946
3998
|
description: NonEmptyString3.optional()
|
|
3947
3999
|
});
|
|
3948
|
-
const EventDefinitionVersion =
|
|
3949
|
-
const PluginEventDefinitionContribution2 =
|
|
4000
|
+
const EventDefinitionVersion = z13.number().int().positive();
|
|
4001
|
+
const PluginEventDefinitionContribution2 = z13.strictObject({
|
|
3950
4002
|
localId: PluginEventLocalId2,
|
|
3951
4003
|
displayName: OptionalDisplayName,
|
|
3952
4004
|
description: NonEmptyString3.optional(),
|
|
3953
4005
|
version: canonical ? EventDefinitionVersion : EventDefinitionVersion.default(1),
|
|
3954
4006
|
uriScheme: UriScheme2,
|
|
3955
|
-
relatedKeys:
|
|
4007
|
+
relatedKeys: z13.array(NonEmptyString3).readonly().optional(),
|
|
3956
4008
|
payloadSchema: JsonSchema.optional(),
|
|
3957
4009
|
/**
|
|
3958
4010
|
* This event is a signal: its payload is the shared `PluginSignal` v1 and every publish
|
|
@@ -3961,7 +4013,7 @@ function createContributionsSchemas(canonical) {
|
|
|
3961
4013
|
* and `relatedKeys` holds `thread` plus any of `from`, `to`, `cc`. Turning it on changes
|
|
3962
4014
|
* the payload, so bump `version` with it.
|
|
3963
4015
|
*/
|
|
3964
|
-
signal:
|
|
4016
|
+
signal: z13.boolean().optional()
|
|
3965
4017
|
}).superRefine((definition, context) => {
|
|
3966
4018
|
if (definition.signal !== true)
|
|
3967
4019
|
return;
|
|
@@ -3982,42 +4034,42 @@ function createContributionsSchemas(canonical) {
|
|
|
3982
4034
|
});
|
|
3983
4035
|
}
|
|
3984
4036
|
});
|
|
3985
|
-
const PluginNotificationRuleContribution2 =
|
|
4037
|
+
const PluginNotificationRuleContribution2 = z13.strictObject({
|
|
3986
4038
|
localId: LocalContributionId2,
|
|
3987
4039
|
/** The same-plugin `eventDefinitions` local id this rule matches. */
|
|
3988
4040
|
event: PluginEventLocalId2,
|
|
3989
|
-
where:
|
|
4041
|
+
where: z13.string({ error: (issue) => whereNotAStringMessage(issue.input) }).optional(),
|
|
3990
4042
|
rule: JsonObject
|
|
3991
4043
|
});
|
|
3992
|
-
const PluginProductEventContribution2 =
|
|
3993
|
-
|
|
4044
|
+
const PluginProductEventContribution2 = z13.union([
|
|
4045
|
+
z13.strictObject({
|
|
3994
4046
|
name: NonEmptyString3,
|
|
3995
4047
|
description: NonEmptyString3.optional(),
|
|
3996
|
-
fields:
|
|
4048
|
+
fields: z13.record(z13.string(), JsonObject).optional()
|
|
3997
4049
|
}),
|
|
3998
|
-
|
|
4050
|
+
z13.strictObject({ catalogEvent: NonEmptyString3 })
|
|
3999
4051
|
]);
|
|
4000
|
-
const UiEventSubscriptionContribution2 =
|
|
4052
|
+
const UiEventSubscriptionContribution2 = z13.strictObject({
|
|
4001
4053
|
localId: LocalContributionId2,
|
|
4002
4054
|
event: NonEmptyString3
|
|
4003
4055
|
});
|
|
4004
|
-
const DeviceDelegationContribution2 =
|
|
4056
|
+
const DeviceDelegationContribution2 = z13.strictObject({
|
|
4005
4057
|
localId: LocalContributionId2,
|
|
4006
|
-
device:
|
|
4007
|
-
delegateAs:
|
|
4058
|
+
device: z13.enum(["microphone"]),
|
|
4059
|
+
delegateAs: z13.enum(["clip", "stream", "status"])
|
|
4008
4060
|
});
|
|
4009
|
-
const CorpusAccess =
|
|
4010
|
-
const SessionReaderContribution2 =
|
|
4061
|
+
const CorpusAccess = z13.enum(["read"]);
|
|
4062
|
+
const SessionReaderContribution2 = z13.strictObject({
|
|
4011
4063
|
localId: LocalContributionId2,
|
|
4012
4064
|
displayName: OptionalDisplayName,
|
|
4013
4065
|
access: canonical ? CorpusAccess : CorpusAccess.default("read")
|
|
4014
4066
|
});
|
|
4015
|
-
const UiCommandContribution2 =
|
|
4067
|
+
const UiCommandContribution2 = z13.strictObject({
|
|
4016
4068
|
localId: LocalContributionId2,
|
|
4017
4069
|
title: NonEmptyString3,
|
|
4018
4070
|
icon: PackageAssetPath2.optional(),
|
|
4019
|
-
button:
|
|
4020
|
-
menu:
|
|
4071
|
+
button: z13.enum(["tabStrip"]).optional(),
|
|
4072
|
+
menu: z13.enum(["help"]).optional(),
|
|
4021
4073
|
where: NonEmptyString3.optional()
|
|
4022
4074
|
}).superRefine((command, ctx) => {
|
|
4023
4075
|
if (command.where === void 0)
|
|
@@ -4038,7 +4090,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4038
4090
|
});
|
|
4039
4091
|
}
|
|
4040
4092
|
});
|
|
4041
|
-
const UiSlotContribution2 =
|
|
4093
|
+
const UiSlotContribution2 = z13.strictObject({
|
|
4042
4094
|
localId: LocalContributionId2,
|
|
4043
4095
|
slot: NonEmptyString3,
|
|
4044
4096
|
title: NonEmptyString3.optional()
|
|
@@ -4052,84 +4104,84 @@ function createContributionsSchemas(canonical) {
|
|
|
4052
4104
|
"blob",
|
|
4053
4105
|
"about"
|
|
4054
4106
|
]);
|
|
4055
|
-
const ReferenceOpenBehavior2 =
|
|
4056
|
-
|
|
4057
|
-
|
|
4107
|
+
const ReferenceOpenBehavior2 = z13.discriminatedUnion("kind", [
|
|
4108
|
+
z13.strictObject({ kind: z13.literal("working-document") }),
|
|
4109
|
+
z13.strictObject({ kind: z13.literal("browser-pane") }),
|
|
4058
4110
|
/**
|
|
4059
4111
|
* Open one of the pages this manifest declares in `pages`. The window answers this from the
|
|
4060
4112
|
* manifest, and the page gets the whole address as its `objectId` unless `addresses` says
|
|
4061
4113
|
* otherwise. Needs no web address, so a plugin-only resource (`user-todo://items/3`) can pill.
|
|
4062
4114
|
*/
|
|
4063
|
-
|
|
4115
|
+
z13.strictObject({ kind: z13.literal("page"), pageId: NonEmptyString3 }),
|
|
4064
4116
|
/**
|
|
4065
4117
|
* Hand the address's link to an app on this machine. The module's claims fill the link as its
|
|
4066
4118
|
* `sourceUrl`, and `schemes` names every scheme those links may use: main opens a link only when
|
|
4067
4119
|
* a loaded plugin declares its scheme here. A plugin the person installed can't declare this.
|
|
4068
4120
|
*/
|
|
4069
|
-
|
|
4070
|
-
kind:
|
|
4071
|
-
schemes:
|
|
4121
|
+
z13.strictObject({
|
|
4122
|
+
kind: z13.literal("local-app"),
|
|
4123
|
+
schemes: z13.array(UriScheme2.refine((scheme) => !NOT_LOCAL_APP_SCHEMES.has(scheme), "Names the web, a file or script, not an app on this machine")).min(1)
|
|
4072
4124
|
})
|
|
4073
4125
|
]);
|
|
4074
|
-
const ReferencePresentationVariant2 =
|
|
4126
|
+
const ReferencePresentationVariant2 = z13.strictObject({
|
|
4075
4127
|
resourceKind: NonEmptyString3,
|
|
4076
4128
|
presentationPluginId: PluginId2.optional()
|
|
4077
4129
|
});
|
|
4078
|
-
const ReferencePresentationVariants2 =
|
|
4079
|
-
const ReferencePresentationUriPattern2 =
|
|
4130
|
+
const ReferencePresentationVariants2 = z13.record(MimeTypeString2, ReferencePresentationVariant2);
|
|
4131
|
+
const ReferencePresentationUriPattern2 = z13.strictObject({
|
|
4080
4132
|
protocol: NonEmptyString3,
|
|
4081
4133
|
hostname: NonEmptyString3,
|
|
4082
|
-
pathname:
|
|
4083
|
-
search:
|
|
4134
|
+
pathname: z13.string().optional(),
|
|
4135
|
+
search: z13.string().optional()
|
|
4084
4136
|
});
|
|
4085
|
-
const ReferencePresentationUrlClaim2 =
|
|
4086
|
-
kind:
|
|
4137
|
+
const ReferencePresentationUrlClaim2 = z13.strictObject({
|
|
4138
|
+
kind: z13.literal("urlPattern"),
|
|
4087
4139
|
pattern: ReferencePresentationUriPattern2.extend({
|
|
4088
|
-
protocol:
|
|
4140
|
+
protocol: z13.enum(["http", "https"])
|
|
4089
4141
|
}),
|
|
4090
4142
|
/** The claim's mark: an SVG file in the plugin, drawn in its own colours. */
|
|
4091
4143
|
brandIcon: PackageAssetPath2.optional()
|
|
4092
4144
|
});
|
|
4093
|
-
const ReferencePresentationTooltip2 =
|
|
4145
|
+
const ReferencePresentationTooltip2 = z13.strictObject({
|
|
4094
4146
|
/** Same-plugin kay.ui app mounted with read-only reference URI context. */
|
|
4095
4147
|
app: LocalContributionId2,
|
|
4096
4148
|
pattern: ReferencePresentationUriPattern2
|
|
4097
4149
|
});
|
|
4098
|
-
const ReferencePresentationAddress2 =
|
|
4150
|
+
const ReferencePresentationAddress2 = z13.strictObject({
|
|
4099
4151
|
pattern: ReferencePresentationUriPattern2,
|
|
4100
4152
|
objectId: NonEmptyString3.optional(),
|
|
4101
|
-
open:
|
|
4153
|
+
open: z13.strictObject({ kind: z13.literal("none") }).optional()
|
|
4102
4154
|
});
|
|
4103
|
-
const ReferencePresentationAccountLinkPage =
|
|
4155
|
+
const ReferencePresentationAccountLinkPage = z13.strictObject({
|
|
4104
4156
|
/** A literal host name. */
|
|
4105
|
-
hostname:
|
|
4106
|
-
pathname:
|
|
4157
|
+
hostname: z13.string().regex(/^[a-z0-9.-]+$/, "An account link's hostname is a literal lower-case host name."),
|
|
4158
|
+
pathname: z13.string().optional(),
|
|
4107
4159
|
/** A page matching one of these already names its account, so it stays as it is. */
|
|
4108
|
-
unlessPathname:
|
|
4160
|
+
unlessPathname: z13.array(z13.string()).min(1).optional(),
|
|
4109
4161
|
/** The path the page opens at, in place of its own. */
|
|
4110
|
-
setPathname:
|
|
4162
|
+
setPathname: z13.string().startsWith("/").optional(),
|
|
4111
4163
|
/** Query values to add. A page that already has one of these names stays as it is. */
|
|
4112
|
-
addQuery:
|
|
4164
|
+
addQuery: z13.record(NonEmptyString3, NonEmptyString3)
|
|
4113
4165
|
});
|
|
4114
|
-
const ReferencePresentationAccountLinkAddress =
|
|
4166
|
+
const ReferencePresentationAccountLinkAddress = z13.strictObject({
|
|
4115
4167
|
pattern: ReferencePresentationUriPattern2,
|
|
4116
|
-
url:
|
|
4168
|
+
url: z13.string().regex(/^https?:\/\//, "An account link's url is a web page.")
|
|
4117
4169
|
});
|
|
4118
|
-
const ReferencePresentationAccountLinks2 =
|
|
4119
|
-
label:
|
|
4120
|
-
pages:
|
|
4121
|
-
addresses:
|
|
4170
|
+
const ReferencePresentationAccountLinks2 = z13.strictObject({
|
|
4171
|
+
label: z13.enum(["email", "name"]).optional(),
|
|
4172
|
+
pages: z13.array(ReferencePresentationAccountLinkPage).min(1).optional(),
|
|
4173
|
+
addresses: z13.array(ReferencePresentationAccountLinkAddress).min(1).optional()
|
|
4122
4174
|
});
|
|
4123
|
-
const ReferencePresentationWords2 =
|
|
4175
|
+
const ReferencePresentationWords2 = z13.strictObject({
|
|
4124
4176
|
/** The row's mark, for a source with no icon of its own. Left out: the plugin's main icon. */
|
|
4125
|
-
glyph:
|
|
4177
|
+
glyph: z13.enum(TOOL_GLYPHS).optional(),
|
|
4126
4178
|
/** The thing an address names ("channel" in "Read Slack channel"). Left out: the row reads the scheme's own name. */
|
|
4127
4179
|
kind: NonEmptyString3.optional(),
|
|
4128
4180
|
/**
|
|
4129
4181
|
* A more specific kind by the address's shape. The first row that matches decides, and an
|
|
4130
4182
|
* address no row matches reads `kind`.
|
|
4131
4183
|
*/
|
|
4132
|
-
kinds:
|
|
4184
|
+
kinds: z13.array(z13.strictObject({
|
|
4133
4185
|
pattern: ReferencePresentationUriPattern2,
|
|
4134
4186
|
kind: NonEmptyString3
|
|
4135
4187
|
})).min(1).optional(),
|
|
@@ -4138,7 +4190,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4138
4190
|
/** What the live phrase names ("Slack" in "Reading Slack"). Left out: the bare verb ("Reading"). */
|
|
4139
4191
|
target: NonEmptyString3.optional(),
|
|
4140
4192
|
/** `kind` already says which source this is: "Edited plan", not "Edited Plan plan". */
|
|
4141
|
-
kindNamesSource:
|
|
4193
|
+
kindNamesSource: z13.literal(true).optional()
|
|
4142
4194
|
}).superRefine((value, ctx) => {
|
|
4143
4195
|
if (value.kind === void 0 && (value.glyph !== void 0 || value.kindNamesSource !== void 0 || value.kinds !== void 0)) {
|
|
4144
4196
|
ctx.addIssue({
|
|
@@ -4148,7 +4200,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4148
4200
|
});
|
|
4149
4201
|
}
|
|
4150
4202
|
});
|
|
4151
|
-
const ReferencePresentationContribution2 =
|
|
4203
|
+
const ReferencePresentationContribution2 = z13.strictObject({
|
|
4152
4204
|
localId: LocalContributionId2,
|
|
4153
4205
|
/** This manifest's URI module. Leave it out only for an address another layer serves. */
|
|
4154
4206
|
uriModule: LocalContributionId2.optional(),
|
|
@@ -4159,7 +4211,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4159
4211
|
*/
|
|
4160
4212
|
scheme: UriScheme2.optional(),
|
|
4161
4213
|
/** Which of the addresses open the page, and on what. Read by the window. */
|
|
4162
|
-
addresses:
|
|
4214
|
+
addresses: z13.array(ReferencePresentationAddress2).min(1).optional(),
|
|
4163
4215
|
/** Comes with `open`. A presentation with neither only words its module's addresses. */
|
|
4164
4216
|
resourceKind: NonEmptyString3.optional(),
|
|
4165
4217
|
/** How the address opens. Left out, it stays plain text. */
|
|
@@ -4167,7 +4219,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4167
4219
|
/** MIME-specific resource kinds; absent keys use the base presentation. */
|
|
4168
4220
|
variants: ReferencePresentationVariants2.optional(),
|
|
4169
4221
|
/** Lexical public URL claims used only for host-rendered browser presentations. */
|
|
4170
|
-
claims:
|
|
4222
|
+
claims: z13.array(ReferencePresentationUrlClaim2).optional(),
|
|
4171
4223
|
/** Informational app presentation matched against the canonical resource URI. */
|
|
4172
4224
|
tooltip: ReferencePresentationTooltip2.optional(),
|
|
4173
4225
|
/** What the transcript calls this module's addresses. Needs a `uriModule`. */
|
|
@@ -4250,7 +4302,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4250
4302
|
});
|
|
4251
4303
|
}
|
|
4252
4304
|
});
|
|
4253
|
-
const KayUiAppHostCapability2 =
|
|
4305
|
+
const KayUiAppHostCapability2 = z13.enum([
|
|
4254
4306
|
"navigation.open-session",
|
|
4255
4307
|
// Lets `navigation.openChat` create a blank chat (no message, no model
|
|
4256
4308
|
// turn) when no session id is given. It never sends anything.
|
|
@@ -4274,6 +4326,16 @@ function createContributionsSchemas(canonical) {
|
|
|
4274
4326
|
// artifacts the account may manage the access rule with a count of listed addresses, never the addresses.
|
|
4275
4327
|
// It reads no artifact bytes.
|
|
4276
4328
|
"shared-artifacts.read",
|
|
4329
|
+
// Lists the person's projects with their pinned-to-Home state and build state, pins or unpins
|
|
4330
|
+
// one to Home, renames a project or changes its description, and draws the host's project
|
|
4331
|
+
// controls in the app's pane (mark, working folder and repository, sessions, build status, the
|
|
4332
|
+
// new-project flow). Through `BonsaiProjectSessions` and `sessionsView` it exposes each
|
|
4333
|
+
// project's session titles, states and activity times. The page app holding it is the window's
|
|
4334
|
+
// project view and receives every request to show a project (`onOpenRequest`). It cannot
|
|
4335
|
+
// remove or refile a project or a file. Only a plugin that ships with Bonsai keeps it: desktop
|
|
4336
|
+
// main drops it from any other plugin's apps when it accepts them
|
|
4337
|
+
// (`BUNDLED_ONLY_UI_APP_HOST_CAPABILITIES`).
|
|
4338
|
+
"projects.manage",
|
|
4277
4339
|
// Grants exactly `panes.place` (see `WORKSPACE_VERB_TIERS`/`KayWorkspaceCommand` in
|
|
4278
4340
|
// `@bonsai/agent-runtime-protocol`) through the `kay.ui` capability broker's `workspace.place`,
|
|
4279
4341
|
// and `workspace.openBeside`: one artifact in the shell's reference side pane beside the app's own
|
|
@@ -4287,12 +4349,12 @@ function createContributionsSchemas(canonical) {
|
|
|
4287
4349
|
// rearrange the workspace but never remove something the user would have to notice going missing.
|
|
4288
4350
|
"workspace.arrange"
|
|
4289
4351
|
]);
|
|
4290
|
-
const UiAppCapabilities2 =
|
|
4291
|
-
endpoints:
|
|
4292
|
-
host:
|
|
4352
|
+
const UiAppCapabilities2 = z13.strictObject({
|
|
4353
|
+
endpoints: z13.array(LocalContributionId2).optional(),
|
|
4354
|
+
host: z13.array(KayUiAppHostCapability2).optional(),
|
|
4293
4355
|
// The feeds this app's pages read with `useBonsaiFeed`. A name means this plugin's own
|
|
4294
4356
|
// `kay.app` data source if it declares one, otherwise the feed the daemon publishes.
|
|
4295
|
-
feeds:
|
|
4357
|
+
feeds: z13.array(LocalContributionId2).optional()
|
|
4296
4358
|
}).superRefine((capabilities, ctx) => {
|
|
4297
4359
|
for (const field of ["endpoints", "host", "feeds"]) {
|
|
4298
4360
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -4308,10 +4370,10 @@ function createContributionsSchemas(canonical) {
|
|
|
4308
4370
|
}
|
|
4309
4371
|
}
|
|
4310
4372
|
});
|
|
4311
|
-
const UiRailBadge =
|
|
4373
|
+
const UiRailBadge = z13.strictObject({
|
|
4312
4374
|
source: LocalContributionId2,
|
|
4313
4375
|
where: NonEmptyString3.optional(),
|
|
4314
|
-
label:
|
|
4376
|
+
label: z13.strictObject({
|
|
4315
4377
|
one: NonEmptyString3.optional(),
|
|
4316
4378
|
other: NonEmptyString3
|
|
4317
4379
|
})
|
|
@@ -4327,48 +4389,48 @@ function createContributionsSchemas(canonical) {
|
|
|
4327
4389
|
});
|
|
4328
4390
|
}
|
|
4329
4391
|
});
|
|
4330
|
-
const UiRailEntryContribution2 =
|
|
4392
|
+
const UiRailEntryContribution2 = z13.strictObject({
|
|
4331
4393
|
id: LocalContributionId2,
|
|
4332
4394
|
title: NonEmptyString3,
|
|
4333
4395
|
icon: PackageAssetPath2.optional(),
|
|
4334
4396
|
page: NonEmptyString3,
|
|
4335
4397
|
homeLocation: NonEmptyString3.optional(),
|
|
4336
4398
|
shortcut: NonEmptyString3.optional(),
|
|
4337
|
-
order:
|
|
4338
|
-
section:
|
|
4399
|
+
order: z13.number().finite().optional(),
|
|
4400
|
+
section: z13.enum(["primary", "plugins"]).optional(),
|
|
4339
4401
|
badge: UiRailBadge.optional(),
|
|
4340
|
-
panel:
|
|
4341
|
-
featureFlagVariant:
|
|
4402
|
+
panel: z13.strictObject({ body: LocalContributionId2 }).optional(),
|
|
4403
|
+
featureFlagVariant: z13.strictObject({
|
|
4342
4404
|
flag: NonEmptyString3,
|
|
4343
4405
|
title: NonEmptyString3.optional(),
|
|
4344
4406
|
icon: PackageAssetPath2.optional(),
|
|
4345
|
-
panel:
|
|
4407
|
+
panel: z13.literal(false).optional()
|
|
4346
4408
|
}).optional()
|
|
4347
4409
|
});
|
|
4348
|
-
const UiToastPreviewContribution2 =
|
|
4410
|
+
const UiToastPreviewContribution2 = z13.strictObject({
|
|
4349
4411
|
rule: LocalContributionId2,
|
|
4350
4412
|
body: LocalContributionId2,
|
|
4351
4413
|
address: NonEmptyString3
|
|
4352
4414
|
});
|
|
4353
|
-
const UiPageContribution2 =
|
|
4415
|
+
const UiPageContribution2 = z13.strictObject({
|
|
4354
4416
|
id: NonEmptyString3,
|
|
4355
4417
|
title: NonEmptyString3.optional(),
|
|
4356
4418
|
icon: PackageAssetPath2.optional(),
|
|
4357
|
-
companion:
|
|
4419
|
+
companion: z13.boolean().optional(),
|
|
4358
4420
|
openedEvent: NonEmptyString3.optional()
|
|
4359
4421
|
});
|
|
4360
|
-
const UiAppFields =
|
|
4422
|
+
const UiAppFields = z13.strictObject({
|
|
4361
4423
|
localId: LocalContributionId2,
|
|
4362
4424
|
displayName: NonEmptyString3,
|
|
4363
4425
|
description: NonEmptyString3.optional(),
|
|
4364
4426
|
icon: PackageAssetPath2.optional(),
|
|
4365
|
-
runtime:
|
|
4427
|
+
runtime: z13.literal("kay.react-app.v1"),
|
|
4366
4428
|
/** Mounted only by a host-supplied context; never a standalone navigation destination. */
|
|
4367
|
-
contextOnly:
|
|
4368
|
-
sdk:
|
|
4429
|
+
contextOnly: z13.literal(true).optional(),
|
|
4430
|
+
sdk: z13.strictObject({ range: NonEmptyString3 }),
|
|
4369
4431
|
entrypoint: TargetEntrypoint2,
|
|
4370
|
-
styles:
|
|
4371
|
-
assets:
|
|
4432
|
+
styles: z13.array(PackageAssetPath2).optional(),
|
|
4433
|
+
assets: z13.array(PackageAssetPath2).optional(),
|
|
4372
4434
|
capabilities: UiAppCapabilities2.optional()
|
|
4373
4435
|
});
|
|
4374
4436
|
function stripRetiredUiAppFields(value) {
|
|
@@ -4379,36 +4441,36 @@ function createContributionsSchemas(canonical) {
|
|
|
4379
4441
|
delete remaining["activityRail"];
|
|
4380
4442
|
return remaining;
|
|
4381
4443
|
}
|
|
4382
|
-
const UiAppContribution2 = canonical ? UiAppFields :
|
|
4383
|
-
const ThemeContribution2 =
|
|
4444
|
+
const UiAppContribution2 = canonical ? UiAppFields : z13.preprocess(stripRetiredUiAppFields, UiAppFields);
|
|
4445
|
+
const ThemeContribution2 = z13.strictObject({
|
|
4384
4446
|
localId: LocalContributionId2,
|
|
4385
4447
|
displayName: NonEmptyString3,
|
|
4386
|
-
appearance:
|
|
4448
|
+
appearance: z13.enum(["light", "dark"]),
|
|
4387
4449
|
tokens: PackageAssetPath2
|
|
4388
4450
|
});
|
|
4389
|
-
const CommandHandler2 =
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
kind:
|
|
4451
|
+
const CommandHandler2 = z13.discriminatedUnion("kind", [
|
|
4452
|
+
z13.strictObject({ kind: z13.literal("skill"), skill: LocalContributionId2 }),
|
|
4453
|
+
z13.strictObject({
|
|
4454
|
+
kind: z13.literal("tool"),
|
|
4393
4455
|
tool: PluginToolName2,
|
|
4394
4456
|
/** Positional mapping from tokenized `argsText` onto the tool's own input fields - see this
|
|
4395
4457
|
* union's doc for the exact tokenize/map/last-field-absorbs rule. */
|
|
4396
|
-
argumentFields:
|
|
4458
|
+
argumentFields: z13.array(NonEmptyString3)
|
|
4397
4459
|
}),
|
|
4398
|
-
|
|
4399
|
-
kind:
|
|
4460
|
+
z13.strictObject({
|
|
4461
|
+
kind: z13.literal("endpoint"),
|
|
4400
4462
|
endpoint: LocalContributionId2
|
|
4401
4463
|
})
|
|
4402
4464
|
]);
|
|
4403
|
-
const CommandContribution2 =
|
|
4465
|
+
const CommandContribution2 = z13.strictObject({
|
|
4404
4466
|
localId: LocalContributionId2,
|
|
4405
4467
|
displayName: OptionalDisplayName,
|
|
4406
4468
|
description: NonEmptyString3,
|
|
4407
|
-
aliases:
|
|
4469
|
+
aliases: z13.array(LocalContributionId2).optional(),
|
|
4408
4470
|
argumentHint: NonEmptyString3.optional(),
|
|
4409
4471
|
handler: CommandHandler2
|
|
4410
4472
|
});
|
|
4411
|
-
const PluginContributionKind2 =
|
|
4473
|
+
const PluginContributionKind2 = z13.enum([
|
|
4412
4474
|
"tool",
|
|
4413
4475
|
"converter",
|
|
4414
4476
|
"uriModule",
|
|
@@ -4566,7 +4628,56 @@ __export(manifest_exports, {
|
|
|
4566
4628
|
retiredCompatibilityKeysIn: () => retiredCompatibilityKeysIn,
|
|
4567
4629
|
validateKayUiEventSubscription: () => validateKayUiEventSubscription
|
|
4568
4630
|
});
|
|
4569
|
-
|
|
4631
|
+
|
|
4632
|
+
// packages/plugin-protocol/dist/shell-commands.js
|
|
4633
|
+
import { z as z14 } from "zod";
|
|
4634
|
+
var PluginShellCommand = z14.strictObject({
|
|
4635
|
+
name: z14.string().regex(/^[a-z][a-z0-9-]*$/),
|
|
4636
|
+
aliases: z14.array(z14.string().regex(/^[a-z][a-z0-9-]*$/)).optional(),
|
|
4637
|
+
endpoint: z14.string().min(1),
|
|
4638
|
+
usage: z14.string().min(1)
|
|
4639
|
+
});
|
|
4640
|
+
var ShellCommandOutcome = z14.strictObject({
|
|
4641
|
+
exitCode: z14.number().int(),
|
|
4642
|
+
envelope: JsonValue,
|
|
4643
|
+
result: JsonValue.optional()
|
|
4644
|
+
});
|
|
4645
|
+
var ShellCommandRequest = z14.strictObject({
|
|
4646
|
+
argv: z14.array(z14.string()),
|
|
4647
|
+
cwd: z14.string(),
|
|
4648
|
+
outcomes: z14.array(ShellCommandOutcome).max(3)
|
|
4649
|
+
});
|
|
4650
|
+
var ShellCommandStep = z14.discriminatedUnion("kind", [
|
|
4651
|
+
z14.strictObject({
|
|
4652
|
+
kind: z14.literal("invoke"),
|
|
4653
|
+
toolName: z14.enum([
|
|
4654
|
+
"read",
|
|
4655
|
+
"list",
|
|
4656
|
+
"search",
|
|
4657
|
+
"write",
|
|
4658
|
+
"edit",
|
|
4659
|
+
"delete",
|
|
4660
|
+
"help"
|
|
4661
|
+
]),
|
|
4662
|
+
input: z14.record(z14.string(), JsonValue),
|
|
4663
|
+
flags: z14.record(z14.string(), z14.string())
|
|
4664
|
+
}),
|
|
4665
|
+
z14.strictObject({
|
|
4666
|
+
kind: z14.literal("finish"),
|
|
4667
|
+
exitCode: z14.number().int(),
|
|
4668
|
+
stdout: z14.string()
|
|
4669
|
+
})
|
|
4670
|
+
]);
|
|
4671
|
+
|
|
4672
|
+
// packages/plugin-protocol/dist/manifest.js
|
|
4673
|
+
import { z as z16 } from "zod";
|
|
4674
|
+
|
|
4675
|
+
// packages/plugin-protocol/dist/workload-purposes.js
|
|
4676
|
+
import { z as z15 } from "zod";
|
|
4677
|
+
var PluginWorkloadPurpose = z15.strictObject({
|
|
4678
|
+
purpose: z15.string().regex(/^[a-z][a-z0-9-]*$/),
|
|
4679
|
+
workloadClass: z15.enum(["dreaming", "hindsight"])
|
|
4680
|
+
});
|
|
4570
4681
|
|
|
4571
4682
|
// packages/plugin-protocol/dist/synthetic-contributions.js
|
|
4572
4683
|
function resolveConfigSectionContributionLocalId(section) {
|
|
@@ -4591,34 +4702,34 @@ function createManifestSchemas(canonical) {
|
|
|
4591
4702
|
const { AgentRenderContribution: AgentRenderContribution2, ApprovalTypeContribution: ApprovalTypeContribution2, WorkflowContribution: WorkflowContribution2, PluginCardContribution: PluginCardContribution2, AppDataMaterializerContribution: AppDataMaterializerContribution2, AppDataSourceContribution: AppDataSourceContribution2, AppUriModuleContribution: AppUriModuleContribution2, AppEventSubscription: AppEventSubscription2, ArtifactUriModuleContribution: ArtifactUriModuleContribution2, CliBindingContribution: CliBindingContribution2, CommandContribution: CommandContribution2, ContextContributorContribution: ContextContributorContribution2, ConverterContribution: ConverterContribution2, SessionReaderContribution: SessionReaderContribution2, DeviceDelegationContribution: DeviceDelegationContribution2, EndpointContribution: EndpointContribution2, EntityResolverContribution: EntityResolverContribution2, GitHostContribution: GitHostContribution2, McpServerContributions: McpServerContributions2, PluginEventDefinitionContribution: PluginEventDefinitionContribution2, PluginNotificationRuleContribution: PluginNotificationRuleContribution2, PluginProductEventContribution: PluginProductEventContribution2, ResourceContribution: ResourceContribution2, ReferencePresentationContribution: ReferencePresentationContribution2, PluginSkillSourceDeclaration: PluginSkillSourceDeclaration2, InteractionDriverContribution: InteractionDriverContribution2, SearchProviderContribution: SearchProviderContribution2, SkillContribution: SkillContribution2, ThemeContribution: ThemeContribution2, AgentToolContribution: AgentToolContribution2, ToolContribution: ToolContribution2, UiCommandContribution: UiCommandContribution2, UiAppContribution: UiAppContribution2, UiRailEntryContribution: UiRailEntryContribution2, UiToastPreviewContribution: UiToastPreviewContribution2, UiPageContribution: UiPageContribution2, UiEventSubscriptionContribution: UiEventSubscriptionContribution2, UiSlotContribution: UiSlotContribution2, UriModuleContribution: UriModuleContribution2, WhiteboardTypeContribution: WhiteboardTypeContribution2 } = canonical ? canonicalContributionSchemas : contributions_exports;
|
|
4592
4703
|
const { HttpsUrl: HttpsUrl2, LocalContributionId: LocalContributionId2, NonEmptyString: NonEmptyString3, PackageAssetPath: PackageAssetPath2, PluginId: PluginId2, PluginNamespace: PluginNamespace2, RegistrableDomain: RegistrableDomain2, SignedInStatusCode: SignedInStatusCode2, TargetEntrypoint: TargetEntrypoint2 } = canonical ? canonicalCommonSchemas : common_exports;
|
|
4593
4704
|
const { PluginPermissionManifest: PluginPermissionManifest2 } = canonical ? canonicalPermissionSchemas : permissions_exports;
|
|
4594
|
-
const KayAgentTargetManifest2 =
|
|
4705
|
+
const KayAgentTargetManifest2 = z16.strictObject({
|
|
4595
4706
|
entrypoint: TargetEntrypoint2,
|
|
4596
|
-
contributes:
|
|
4597
|
-
tools:
|
|
4598
|
-
converters:
|
|
4599
|
-
uriModules:
|
|
4707
|
+
contributes: z16.strictObject({
|
|
4708
|
+
tools: z16.array(AgentToolContribution2).optional(),
|
|
4709
|
+
converters: z16.array(ConverterContribution2).optional(),
|
|
4710
|
+
uriModules: z16.array(UriModuleContribution2).optional(),
|
|
4600
4711
|
// Host-composed artifact-backed schemes (see `ArtifactUriModuleContribution`): the plugin
|
|
4601
4712
|
// declares scheme + editability; the daemon binds each to the kernel's artifact lifecycle
|
|
4602
4713
|
// per session. Separate from `uriModules` (plugin-implemented backends) precisely because
|
|
4603
4714
|
// the plugin registers NOTHING for these at activation.
|
|
4604
|
-
artifactUriModules:
|
|
4605
|
-
cliBindings:
|
|
4715
|
+
artifactUriModules: z16.array(ArtifactUriModuleContribution2).optional(),
|
|
4716
|
+
cliBindings: z16.array(CliBindingContribution2).optional(),
|
|
4606
4717
|
// Which git hosts this plugin's credential serves (see `GitHostContribution`): a
|
|
4607
4718
|
// declaration, so a plugin for any git backend gets credentialed clones without
|
|
4608
4719
|
// the daemon learning its name. Sibling of `cliBindings` because both answer the
|
|
4609
4720
|
// same question - which of this plugin's auth services a host-side consumer
|
|
4610
4721
|
// resolves - for two different transports.
|
|
4611
|
-
gitHosts:
|
|
4612
|
-
resources:
|
|
4613
|
-
skills:
|
|
4614
|
-
searchProviders:
|
|
4615
|
-
interactionDrivers:
|
|
4616
|
-
entityResolvers:
|
|
4617
|
-
renderers:
|
|
4722
|
+
gitHosts: z16.array(GitHostContribution2).optional(),
|
|
4723
|
+
resources: z16.array(ResourceContribution2).optional(),
|
|
4724
|
+
skills: z16.array(SkillContribution2).optional(),
|
|
4725
|
+
searchProviders: z16.array(SearchProviderContribution2).optional(),
|
|
4726
|
+
interactionDrivers: z16.array(InteractionDriverContribution2).optional(),
|
|
4727
|
+
entityResolvers: z16.array(EntityResolverContribution2).optional(),
|
|
4728
|
+
renderers: z16.array(AgentRenderContribution2).optional(),
|
|
4618
4729
|
// Handler restricted to skill | tool by the manifest-level refinement below (see
|
|
4619
4730
|
// `CommandContribution`'s doc for why the restriction is not expressed in the type, and
|
|
4620
4731
|
// `CommandHandler`'s doc for why there is no promptTemplate variant to declare here).
|
|
4621
|
-
commands:
|
|
4732
|
+
commands: z16.array(CommandContribution2).optional()
|
|
4622
4733
|
}).optional(),
|
|
4623
4734
|
/**
|
|
4624
4735
|
* The plugin's primer skill - the `localId` of one of its own declared
|
|
@@ -4664,61 +4775,61 @@ function createManifestSchemas(canonical) {
|
|
|
4664
4775
|
* acquisition, not declared here, so there is nothing for the resolved contract to mint a
|
|
4665
4776
|
* `globalId` for at parse time.
|
|
4666
4777
|
*/
|
|
4667
|
-
skillSources:
|
|
4778
|
+
skillSources: z16.array(PluginSkillSourceDeclaration2).optional()
|
|
4668
4779
|
});
|
|
4669
|
-
const KayAppTargetManifest2 =
|
|
4780
|
+
const KayAppTargetManifest2 = z16.strictObject({
|
|
4670
4781
|
// Optional, like `kay.ui`'s: a target may carry only declarative `contributes` (e.g. a plugin
|
|
4671
4782
|
// that ships nothing but `mcpServers`) with no app-lifetime module for the host to load.
|
|
4672
4783
|
entrypoint: TargetEntrypoint2.optional(),
|
|
4673
|
-
contributes:
|
|
4784
|
+
contributes: z16.strictObject({
|
|
4674
4785
|
// Session tools implemented by the app-lifetime activation (registered once, injected into
|
|
4675
4786
|
// every session with a host-stamped session context) - the tool counterpart of `uriModules`
|
|
4676
4787
|
// below. Same descriptor shape as kay.agent tools; `toolName` shares ONE flat session
|
|
4677
4788
|
// namespace with them (enforced by the manifest-level refinement below).
|
|
4678
|
-
tools:
|
|
4679
|
-
endpoints:
|
|
4680
|
-
cards:
|
|
4681
|
-
uriModules:
|
|
4682
|
-
dataSources:
|
|
4683
|
-
whiteboardTypes:
|
|
4684
|
-
approvalTypes:
|
|
4685
|
-
workflows:
|
|
4686
|
-
eventDefinitions:
|
|
4789
|
+
tools: z16.array(ToolContribution2).optional(),
|
|
4790
|
+
endpoints: z16.array(EndpointContribution2).optional(),
|
|
4791
|
+
cards: z16.array(PluginCardContribution2).optional(),
|
|
4792
|
+
uriModules: z16.array(AppUriModuleContribution2).optional(),
|
|
4793
|
+
dataSources: z16.array(AppDataSourceContribution2).optional(),
|
|
4794
|
+
whiteboardTypes: z16.array(WhiteboardTypeContribution2).optional(),
|
|
4795
|
+
approvalTypes: z16.array(ApprovalTypeContribution2).optional(),
|
|
4796
|
+
workflows: z16.array(WorkflowContribution2).optional(),
|
|
4797
|
+
eventDefinitions: z16.array(PluginEventDefinitionContribution2).optional(),
|
|
4687
4798
|
// Default notification rules over this plugin's own `eventDefinitions`; seeded by the host
|
|
4688
4799
|
// (see `PluginNotificationRuleContribution`).
|
|
4689
|
-
notificationRules:
|
|
4690
|
-
productEvents:
|
|
4691
|
-
eventSubscriptions:
|
|
4692
|
-
deviceDelegations:
|
|
4693
|
-
sessionReaders:
|
|
4694
|
-
contextContributors:
|
|
4800
|
+
notificationRules: z16.array(PluginNotificationRuleContribution2).optional(),
|
|
4801
|
+
productEvents: z16.array(PluginProductEventContribution2).optional(),
|
|
4802
|
+
eventSubscriptions: z16.array(AppEventSubscription2).optional(),
|
|
4803
|
+
deviceDelegations: z16.array(DeviceDelegationContribution2).optional(),
|
|
4804
|
+
sessionReaders: z16.array(SessionReaderContribution2).optional(),
|
|
4805
|
+
contextContributors: z16.array(ContextContributorContribution2).optional(),
|
|
4695
4806
|
// Vendored MCP servers this plugin ships (see `McpServerContributions`). Each is hosted only
|
|
4696
4807
|
// for a plugin holding `mcp.host-server` for its name and URL; that is decided at
|
|
4697
4808
|
// composition, not here (see ARCHITECTURE.md "Validation Law").
|
|
4698
4809
|
mcpServers: McpServerContributions2.optional(),
|
|
4699
4810
|
// Handler restricted to endpoint-only by the manifest-level refinement below.
|
|
4700
|
-
commands:
|
|
4811
|
+
commands: z16.array(CommandContribution2).optional()
|
|
4701
4812
|
}).optional()
|
|
4702
4813
|
});
|
|
4703
|
-
const KayUiTargetManifest2 =
|
|
4814
|
+
const KayUiTargetManifest2 = z16.strictObject({
|
|
4704
4815
|
entrypoint: TargetEntrypoint2.extend({
|
|
4705
|
-
format:
|
|
4816
|
+
format: z16.literal("compiled-bundle").optional()
|
|
4706
4817
|
}).optional(),
|
|
4707
|
-
contributes:
|
|
4708
|
-
commands:
|
|
4709
|
-
slots:
|
|
4710
|
-
referencePresentations:
|
|
4711
|
-
apps:
|
|
4712
|
-
railEntries:
|
|
4713
|
-
toastPreviews:
|
|
4714
|
-
pages:
|
|
4715
|
-
themes:
|
|
4716
|
-
eventSubscriptions:
|
|
4717
|
-
dataMaterializers:
|
|
4818
|
+
contributes: z16.strictObject({
|
|
4819
|
+
commands: z16.array(UiCommandContribution2).optional(),
|
|
4820
|
+
slots: z16.array(UiSlotContribution2).optional(),
|
|
4821
|
+
referencePresentations: z16.array(ReferencePresentationContribution2).optional(),
|
|
4822
|
+
apps: z16.array(UiAppContribution2).optional(),
|
|
4823
|
+
railEntries: z16.array(UiRailEntryContribution2).optional(),
|
|
4824
|
+
toastPreviews: z16.array(UiToastPreviewContribution2).optional(),
|
|
4825
|
+
pages: z16.array(UiPageContribution2).optional(),
|
|
4826
|
+
themes: z16.array(ThemeContribution2).optional(),
|
|
4827
|
+
eventSubscriptions: z16.array(UiEventSubscriptionContribution2).optional(),
|
|
4828
|
+
dataMaterializers: z16.array(AppDataMaterializerContribution2).optional()
|
|
4718
4829
|
}).optional()
|
|
4719
4830
|
});
|
|
4720
|
-
const PluginConfigScope2 =
|
|
4721
|
-
const PluginConfigSectionManifest2 =
|
|
4831
|
+
const PluginConfigScope2 = z16.enum(["global", "project", "agent"]);
|
|
4832
|
+
const PluginConfigSectionManifest2 = z16.strictObject({
|
|
4722
4833
|
section: NonEmptyString3.optional(),
|
|
4723
4834
|
schema: JsonSchema,
|
|
4724
4835
|
/**
|
|
@@ -4736,22 +4847,23 @@ function createManifestSchemas(canonical) {
|
|
|
4736
4847
|
* is the baseline every section has; `agent` has no runtime mapping (the
|
|
4737
4848
|
* agent/entity fold is downstream of the document protocol).
|
|
4738
4849
|
*/
|
|
4739
|
-
scopes:
|
|
4850
|
+
scopes: z16.array(PluginConfigScope2).optional()
|
|
4740
4851
|
});
|
|
4741
|
-
const PluginConfigManifest2 =
|
|
4742
|
-
const PluginStorageManifest2 =
|
|
4743
|
-
sqlite:
|
|
4744
|
-
enabled:
|
|
4745
|
-
ownerTarget:
|
|
4852
|
+
const PluginConfigManifest2 = z16.array(PluginConfigSectionManifest2).min(1);
|
|
4853
|
+
const PluginStorageManifest2 = z16.strictObject({
|
|
4854
|
+
sqlite: z16.strictObject({
|
|
4855
|
+
enabled: z16.boolean(),
|
|
4856
|
+
ownerTarget: z16.literal("kay.app").optional(),
|
|
4746
4857
|
migrations: NonEmptyString3.optional()
|
|
4747
4858
|
}).optional(),
|
|
4748
|
-
dataDir:
|
|
4749
|
-
enabled:
|
|
4750
|
-
ownerTarget:
|
|
4859
|
+
dataDir: z16.strictObject({
|
|
4860
|
+
enabled: z16.boolean(),
|
|
4861
|
+
ownerTarget: z16.literal("kay.app").optional(),
|
|
4862
|
+
sharedWith: PluginId2.optional()
|
|
4751
4863
|
}).optional()
|
|
4752
4864
|
});
|
|
4753
|
-
const PluginOAuthClientSupplier2 =
|
|
4754
|
-
const PluginProvisioningProbe2 =
|
|
4865
|
+
const PluginOAuthClientSupplier2 = z16.enum(["kay", "user"]);
|
|
4866
|
+
const PluginProvisioningProbe2 = z16.strictObject({
|
|
4755
4867
|
/**
|
|
4756
4868
|
* The API endpoint that answers the question. The host sends the service's OWN credential here,
|
|
4757
4869
|
* so this must belong to the provider that minted it - enforced by the daemon against the
|
|
@@ -4759,13 +4871,13 @@ function createManifestSchemas(canonical) {
|
|
|
4759
4871
|
*/
|
|
4760
4872
|
url: HttpsUrl2,
|
|
4761
4873
|
/** Absent => `GET`. */
|
|
4762
|
-
method:
|
|
4874
|
+
method: z16.enum(["GET"]).optional(),
|
|
4763
4875
|
/**
|
|
4764
4876
|
* The statuses that make the response a VERDICT at all. Anything else (a 401 from a stale
|
|
4765
4877
|
* token, a 5xx, a rate limit) means the probe learned nothing and reports `unknown` - never
|
|
4766
4878
|
* `unsatisfied`, which would tell a user to go fix setup that is fine.
|
|
4767
4879
|
*/
|
|
4768
|
-
verdictStatuses:
|
|
4880
|
+
verdictStatuses: z16.array(SignedInStatusCode2).min(1),
|
|
4769
4881
|
/**
|
|
4770
4882
|
* Dot-path to a JSON array in the response body that must be NON-EMPTY for the requirement to
|
|
4771
4883
|
* count as satisfied (e.g. `installations`). Absent means a verdict status alone is enough.
|
|
@@ -4774,7 +4886,7 @@ function createManifestSchemas(canonical) {
|
|
|
4774
4886
|
*/
|
|
4775
4887
|
nonEmptyArrayAt: NonEmptyString3.optional()
|
|
4776
4888
|
});
|
|
4777
|
-
const PluginProvisioningRequirement2 =
|
|
4889
|
+
const PluginProvisioningRequirement2 = z16.strictObject({
|
|
4778
4890
|
/** Stable id, unique within the scheme. */
|
|
4779
4891
|
id: LocalContributionId2,
|
|
4780
4892
|
/** Human-facing requirement name, e.g. "GitHub App installation". */
|
|
@@ -4791,7 +4903,7 @@ function createManifestSchemas(canonical) {
|
|
|
4791
4903
|
probe: PluginProvisioningProbe2
|
|
4792
4904
|
});
|
|
4793
4905
|
const PluginProvisioningField = {
|
|
4794
|
-
provisioning:
|
|
4906
|
+
provisioning: z16.array(PluginProvisioningRequirement2).optional()
|
|
4795
4907
|
};
|
|
4796
4908
|
const PluginAuthSchemeDescriptionFields = {
|
|
4797
4909
|
/** Human-facing flow name; absent, the service's name stands in. */
|
|
@@ -4808,16 +4920,17 @@ function createManifestSchemas(canonical) {
|
|
|
4808
4920
|
authorizationUrl: HttpsUrl2,
|
|
4809
4921
|
tokenUrl: HttpsUrl2,
|
|
4810
4922
|
/** Provider-specific query parameters added to the authorize URL. */
|
|
4811
|
-
extraAuthorizeParams:
|
|
4923
|
+
extraAuthorizeParams: z16.record(NonEmptyString3, z16.string()).optional()
|
|
4812
4924
|
};
|
|
4813
|
-
const PluginAuthSchemeAccountLookup =
|
|
4814
|
-
const PluginAuthSchemeOAuthPkce =
|
|
4925
|
+
const PluginAuthSchemeAccountLookup = z16.literal("lookup");
|
|
4926
|
+
const PluginAuthSchemeOAuthPkce = z16.strictObject({
|
|
4815
4927
|
...PluginProvisioningField,
|
|
4816
4928
|
...PluginAuthSchemeDescriptionFields,
|
|
4817
4929
|
...PluginAuthSchemeOAuthEndpointFields,
|
|
4818
4930
|
localId: LocalContributionId2,
|
|
4819
|
-
kind:
|
|
4820
|
-
exchange:
|
|
4931
|
+
kind: z16.literal("oauth2"),
|
|
4932
|
+
exchange: z16.literal("pkce"),
|
|
4933
|
+
byoocProfile: PluginByoocProfile.optional(),
|
|
4821
4934
|
/**
|
|
4822
4935
|
* A public client id the plugin ships for its own sign-in. Only an installed plugin's is used:
|
|
4823
4936
|
* Bonsai's own plugins sign in with clients the host holds.
|
|
@@ -4840,7 +4953,7 @@ function createManifestSchemas(canonical) {
|
|
|
4840
4953
|
* runs on an untrusted manifest, so a hand-built `["kay","kay"]` must be refused here, not
|
|
4841
4954
|
* silently normalized).
|
|
4842
4955
|
*/
|
|
4843
|
-
clientSuppliers:
|
|
4956
|
+
clientSuppliers: z16.array(PluginOAuthClientSupplier2).nonempty().superRefine((suppliers, ctx) => {
|
|
4844
4957
|
if (new Set(suppliers).size !== suppliers.length) {
|
|
4845
4958
|
ctx.addIssue({
|
|
4846
4959
|
code: "custom",
|
|
@@ -4848,7 +4961,10 @@ function createManifestSchemas(canonical) {
|
|
|
4848
4961
|
});
|
|
4849
4962
|
}
|
|
4850
4963
|
}),
|
|
4851
|
-
scopes:
|
|
4964
|
+
scopes: z16.array(NonEmptyString3).optional()
|
|
4965
|
+
}).refine((scheme) => scheme.byoocProfile === void 0 || scheme.clientSuppliers.includes("user"), {
|
|
4966
|
+
message: "An own-client profile requires the user client supplier.",
|
|
4967
|
+
path: ["byoocProfile"]
|
|
4852
4968
|
}).refine((scheme) => scheme.clientSecret === void 0 || scheme.clientId !== void 0, {
|
|
4853
4969
|
message: "clientSecret needs the clientId it belongs to",
|
|
4854
4970
|
path: ["clientSecret"]
|
|
@@ -4856,33 +4972,33 @@ function createManifestSchemas(canonical) {
|
|
|
4856
4972
|
message: "a scheme with its own clientId names where its account comes from (`account`)",
|
|
4857
4973
|
path: ["account"]
|
|
4858
4974
|
});
|
|
4859
|
-
const PluginAuthSchemeOAuthConfidential =
|
|
4975
|
+
const PluginAuthSchemeOAuthConfidential = z16.strictObject({
|
|
4860
4976
|
...PluginProvisioningField,
|
|
4861
4977
|
...PluginAuthSchemeDescriptionFields,
|
|
4862
4978
|
...PluginAuthSchemeOAuthEndpointFields,
|
|
4863
4979
|
localId: LocalContributionId2,
|
|
4864
|
-
kind:
|
|
4865
|
-
exchange:
|
|
4980
|
+
kind: z16.literal("oauth2"),
|
|
4981
|
+
exchange: z16.literal("confidential"),
|
|
4866
4982
|
/** Absent means `["kay"]` - a confidential exchange's secret may only ever be Bonsai's. */
|
|
4867
|
-
clientSuppliers:
|
|
4868
|
-
scopes:
|
|
4983
|
+
clientSuppliers: z16.tuple([z16.literal("kay")]).optional(),
|
|
4984
|
+
scopes: z16.array(NonEmptyString3).optional(),
|
|
4869
4985
|
/** Where the account comes from (see {@link PluginAuthSchemeAccountLookup}). */
|
|
4870
|
-
account:
|
|
4986
|
+
account: z16.union([PluginAuthSchemeAccountLookup, z16.literal("sign-in")])
|
|
4871
4987
|
});
|
|
4872
|
-
const PluginAuthSchemeOAuth2 =
|
|
4988
|
+
const PluginAuthSchemeOAuth2 = z16.discriminatedUnion("exchange", [
|
|
4873
4989
|
PluginAuthSchemeOAuthPkce,
|
|
4874
4990
|
PluginAuthSchemeOAuthConfidential
|
|
4875
4991
|
]);
|
|
4876
|
-
const PluginAuthSchemeApiKey =
|
|
4992
|
+
const PluginAuthSchemeApiKey = z16.strictObject({
|
|
4877
4993
|
...PluginProvisioningField,
|
|
4878
4994
|
...PluginAuthSchemeDescriptionFields,
|
|
4879
4995
|
localId: LocalContributionId2,
|
|
4880
|
-
kind:
|
|
4881
|
-
scopes:
|
|
4996
|
+
kind: z16.literal("api-key"),
|
|
4997
|
+
scopes: z16.array(NonEmptyString3).optional(),
|
|
4882
4998
|
/** The connect prompt's label for the key. Absent: "<service name> API key". */
|
|
4883
4999
|
inputLabel: NonEmptyString3.optional(),
|
|
4884
5000
|
/** Two or more labeled inputs for a secret that comes in parts; absent asks for one key. */
|
|
4885
|
-
fields:
|
|
5001
|
+
fields: z16.array(z16.strictObject({ id: LocalContributionId2, label: NonEmptyString3 })).min(2).superRefine((fields, ctx) => {
|
|
4886
5002
|
if (new Set(fields.map((field) => field.id)).size !== fields.length) {
|
|
4887
5003
|
ctx.addIssue({
|
|
4888
5004
|
code: "custom",
|
|
@@ -4891,7 +5007,7 @@ function createManifestSchemas(canonical) {
|
|
|
4891
5007
|
}
|
|
4892
5008
|
}).optional(),
|
|
4893
5009
|
/** Where and how the person creates the key outside Bonsai. */
|
|
4894
|
-
setup:
|
|
5010
|
+
setup: z16.strictObject({ instructions: NonEmptyString3, url: HttpsUrl2 }).optional(),
|
|
4895
5011
|
/**
|
|
4896
5012
|
* `"lookup"`: the plugin checks a key before it is saved and names its account, with the function
|
|
4897
5013
|
* it registers (`api.auth.registerAccountLookup`). Absent: the key is saved unchecked, under the
|
|
@@ -4899,27 +5015,27 @@ function createManifestSchemas(canonical) {
|
|
|
4899
5015
|
*/
|
|
4900
5016
|
account: PluginAuthSchemeAccountLookup.optional()
|
|
4901
5017
|
});
|
|
4902
|
-
const PluginAuthSchemeDelegated =
|
|
5018
|
+
const PluginAuthSchemeDelegated = z16.strictObject({
|
|
4903
5019
|
...PluginAuthSchemeDescriptionFields,
|
|
4904
5020
|
localId: LocalContributionId2,
|
|
4905
|
-
kind:
|
|
4906
|
-
scopes:
|
|
5021
|
+
kind: z16.literal("delegated"),
|
|
5022
|
+
scopes: z16.array(NonEmptyString3).optional()
|
|
4907
5023
|
});
|
|
4908
|
-
const ExternalCliArgument =
|
|
5024
|
+
const ExternalCliArgument = z16.string().min(1).max(16384).refine((value) => ![...value].some(isUnsafeArgumentCharacter), {
|
|
4909
5025
|
message: "an argument may hold tabs and line breaks, but no other control character, no invisible character and no bidirectional override"
|
|
4910
5026
|
});
|
|
4911
|
-
const ExternalCliCommand =
|
|
5027
|
+
const ExternalCliCommand = z16.string().max(128).regex(/^[A-Za-z0-9][A-Za-z0-9._+-]*$/, {
|
|
4912
5028
|
message: "a command is an executable's basename (letters, digits, '.', '_', '+', '-'), never a path"
|
|
4913
5029
|
});
|
|
4914
5030
|
const ExternalCliHint = NonEmptyString3.max(2048);
|
|
4915
|
-
const ExternalCliArguments =
|
|
5031
|
+
const ExternalCliArguments = z16.array(ExternalCliArgument).max(64);
|
|
4916
5032
|
const SignedOutMarker = ExternalCliArgument.refine((value) => value.trim() !== "", { message: "a signed-out marker needs text beyond whitespace" });
|
|
4917
|
-
const PluginExternalCliConnect2 =
|
|
5033
|
+
const PluginExternalCliConnect2 = z16.strictObject({
|
|
4918
5034
|
/** A basename the host finds on `PATH` (`osascript`, `wrangler`), never a path. */
|
|
4919
5035
|
binary: ExternalCliCommand,
|
|
4920
|
-
probe:
|
|
5036
|
+
probe: z16.strictObject({
|
|
4921
5037
|
args: ExternalCliArguments.min(1),
|
|
4922
|
-
timeoutMs:
|
|
5038
|
+
timeoutMs: z16.number().int().min(1).max(12e4).optional(),
|
|
4923
5039
|
/**
|
|
4924
5040
|
* The CLI's own signed-out marker: text a failed probe's output (stderr, else stdout) contains
|
|
4925
5041
|
* when the CLI is signed out. A failure that carries it is a sign-in problem, and only such a
|
|
@@ -4927,13 +5043,13 @@ function createManifestSchemas(canonical) {
|
|
|
4927
5043
|
* unavailable. Required when `login` is declared, so a timeout never starts a sign-in. A list
|
|
4928
5044
|
* is for a CLI with several signed-out messages; any one of them counts.
|
|
4929
5045
|
*/
|
|
4930
|
-
signedOutMarker:
|
|
5046
|
+
signedOutMarker: z16.union([SignedOutMarker, z16.array(SignedOutMarker).min(1)]).optional()
|
|
4931
5047
|
}),
|
|
4932
5048
|
/** The CLI's interactive sign-in. Absent: connect only probes and reports. */
|
|
4933
|
-
login:
|
|
5049
|
+
login: z16.strictObject({
|
|
4934
5050
|
args: ExternalCliArguments.min(1),
|
|
4935
|
-
timeoutMs:
|
|
4936
|
-
pasteCode:
|
|
5051
|
+
timeoutMs: z16.number().int().min(1).max(6e5).optional(),
|
|
5052
|
+
pasteCode: z16.strictObject({
|
|
4937
5053
|
/** The redeeming argv; the host appends the code as its last argument. */
|
|
4938
5054
|
args: ExternalCliArguments.min(1),
|
|
4939
5055
|
/** What the prompt says, for a person. */
|
|
@@ -4945,12 +5061,12 @@ function createManifestSchemas(canonical) {
|
|
|
4945
5061
|
* for display, or hands it to an agent session that runs it behind the ordinary bash approval.
|
|
4946
5062
|
* Absent for a binary the OS ships (`osascript`).
|
|
4947
5063
|
*/
|
|
4948
|
-
install:
|
|
5064
|
+
install: z16.strictObject({
|
|
4949
5065
|
command: ExternalCliCommand,
|
|
4950
5066
|
args: ExternalCliArguments
|
|
4951
5067
|
}).optional(),
|
|
4952
5068
|
/** Prose for a person: `install` when the binary is missing, `login` when the probe fails. */
|
|
4953
|
-
hints:
|
|
5069
|
+
hints: z16.strictObject({
|
|
4954
5070
|
install: ExternalCliHint,
|
|
4955
5071
|
login: ExternalCliHint
|
|
4956
5072
|
})
|
|
@@ -4963,50 +5079,50 @@ function createManifestSchemas(canonical) {
|
|
|
4963
5079
|
});
|
|
4964
5080
|
}
|
|
4965
5081
|
});
|
|
4966
|
-
const PluginAuthSchemeExternalCli =
|
|
5082
|
+
const PluginAuthSchemeExternalCli = z16.strictObject({
|
|
4967
5083
|
...PluginAuthSchemeDescriptionFields,
|
|
4968
5084
|
localId: LocalContributionId2,
|
|
4969
|
-
kind:
|
|
4970
|
-
scopes:
|
|
5085
|
+
kind: z16.literal("external-cli"),
|
|
5086
|
+
scopes: z16.array(NonEmptyString3).optional(),
|
|
4971
5087
|
cli: PluginExternalCliConnect2.optional()
|
|
4972
5088
|
});
|
|
4973
|
-
const PluginAuthScheme2 =
|
|
5089
|
+
const PluginAuthScheme2 = z16.discriminatedUnion("kind", [
|
|
4974
5090
|
PluginAuthSchemeOAuth2,
|
|
4975
5091
|
PluginAuthSchemeApiKey,
|
|
4976
5092
|
PluginAuthSchemeDelegated,
|
|
4977
5093
|
PluginAuthSchemeExternalCli
|
|
4978
5094
|
]);
|
|
4979
|
-
const PluginWebSessionProbe2 =
|
|
5095
|
+
const PluginWebSessionProbe2 = z16.strictObject({
|
|
4980
5096
|
url: HttpsUrl2,
|
|
4981
5097
|
/** Absent => `GET`. `POST` sends an empty JSON object body. */
|
|
4982
|
-
method:
|
|
4983
|
-
signedInStatuses:
|
|
5098
|
+
method: z16.enum(["GET", "POST"]).optional(),
|
|
5099
|
+
signedInStatuses: z16.array(SignedInStatusCode2).min(1)
|
|
4984
5100
|
});
|
|
4985
|
-
const PluginWebSessionDeclaration2 =
|
|
5101
|
+
const PluginWebSessionDeclaration2 = z16.strictObject({
|
|
4986
5102
|
/** `required`: capabilities degrade without the site login; `recommended`: it only smooths UX. */
|
|
4987
|
-
importance:
|
|
5103
|
+
importance: z16.enum(["required", "recommended"]),
|
|
4988
5104
|
loginUrl: HttpsUrl2,
|
|
4989
|
-
cookieDomains:
|
|
5105
|
+
cookieDomains: z16.array(RegistrableDomain2).min(1),
|
|
4990
5106
|
probe: PluginWebSessionProbe2,
|
|
4991
|
-
oauthVenue:
|
|
5107
|
+
oauthVenue: z16.enum(["embedded", "external"]),
|
|
4992
5108
|
/**
|
|
4993
5109
|
* Where a page goes first when it opens in one of Bonsai's browser panes and this site login
|
|
4994
5110
|
* is missing: a sign-in page that continues to the page. A template with `:email` and `:url`
|
|
4995
5111
|
* (see `UriClaimTemplate`), on a host within `cookieDomains`.
|
|
4996
5112
|
*/
|
|
4997
|
-
signInFirst:
|
|
5113
|
+
signInFirst: z16.string().optional()
|
|
4998
5114
|
}).superRefine(refineWebSessionScopeConfined);
|
|
4999
|
-
const PluginAuthService2 =
|
|
5115
|
+
const PluginAuthService2 = z16.strictObject({
|
|
5000
5116
|
localId: LocalContributionId2,
|
|
5001
5117
|
displayName: NonEmptyString3,
|
|
5002
5118
|
/** One plain sentence on what connecting this service gives Bonsai. */
|
|
5003
5119
|
summary: NonEmptyString3.optional(),
|
|
5004
|
-
schemes:
|
|
5005
|
-
purposes:
|
|
5120
|
+
schemes: z16.array(PluginAuthScheme2).min(1),
|
|
5121
|
+
purposes: z16.array(NonEmptyString3).min(1),
|
|
5006
5122
|
webSession: PluginWebSessionDeclaration2.optional()
|
|
5007
5123
|
});
|
|
5008
|
-
const PluginAuthManifest2 =
|
|
5009
|
-
services:
|
|
5124
|
+
const PluginAuthManifest2 = z16.strictObject({
|
|
5125
|
+
services: z16.array(PluginAuthService2).optional()
|
|
5010
5126
|
});
|
|
5011
5127
|
function stripRetiredCompatibilityKeys(value) {
|
|
5012
5128
|
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
@@ -5017,17 +5133,17 @@ function createManifestSchemas(canonical) {
|
|
|
5017
5133
|
delete remaining[key];
|
|
5018
5134
|
return remaining;
|
|
5019
5135
|
}
|
|
5020
|
-
const PluginCompatibilityFields =
|
|
5021
|
-
supportedProtocols:
|
|
5136
|
+
const PluginCompatibilityFields = z16.strictObject({
|
|
5137
|
+
supportedProtocols: z16.array(KayPluginProtocolVersion).optional(),
|
|
5022
5138
|
minKayVersion: NonEmptyString3.optional(),
|
|
5023
5139
|
sdk: NonEmptyString3.optional()
|
|
5024
5140
|
});
|
|
5025
|
-
const PluginCompatibilityManifest2 = canonical ? PluginCompatibilityFields :
|
|
5141
|
+
const PluginCompatibilityManifest2 = canonical ? PluginCompatibilityFields : z16.preprocess(stripRetiredCompatibilityKeys, PluginCompatibilityFields);
|
|
5026
5142
|
const KayVersionString2 = NonEmptyString3.regex(SEMVER_PATTERN, {
|
|
5027
5143
|
message: "version must be semver, for example 1.2.3"
|
|
5028
5144
|
});
|
|
5029
|
-
const KayPluginManifestV12 =
|
|
5030
|
-
protocol:
|
|
5145
|
+
const KayPluginManifestV12 = z16.strictObject({
|
|
5146
|
+
protocol: z16.literal(KAY_PLUGIN_PROTOCOL_VERSION),
|
|
5031
5147
|
id: PluginId2,
|
|
5032
5148
|
displayName: NonEmptyString3,
|
|
5033
5149
|
version: KayVersionString2,
|
|
@@ -5055,8 +5171,8 @@ function createManifestSchemas(canonical) {
|
|
|
5055
5171
|
icon: PackageAssetPath2.optional(),
|
|
5056
5172
|
iconDark: PackageAssetPath2.optional(),
|
|
5057
5173
|
namespace: PluginNamespace2.optional(),
|
|
5058
|
-
targets:
|
|
5059
|
-
kay:
|
|
5174
|
+
targets: z16.strictObject({
|
|
5175
|
+
kay: z16.strictObject({
|
|
5060
5176
|
agent: KayAgentTargetManifest2.optional(),
|
|
5061
5177
|
app: KayAppTargetManifest2.optional(),
|
|
5062
5178
|
ui: KayUiTargetManifest2.optional()
|
|
@@ -5064,6 +5180,8 @@ function createManifestSchemas(canonical) {
|
|
|
5064
5180
|
}).optional(),
|
|
5065
5181
|
config: PluginConfigManifest2.optional(),
|
|
5066
5182
|
storage: PluginStorageManifest2.optional(),
|
|
5183
|
+
workloadPurposes: z16.array(PluginWorkloadPurpose).optional(),
|
|
5184
|
+
shellCommands: z16.array(PluginShellCommand).optional(),
|
|
5067
5185
|
auth: PluginAuthManifest2.optional(),
|
|
5068
5186
|
permissions: PluginPermissionManifest2.optional(),
|
|
5069
5187
|
compatibility: PluginCompatibilityManifest2.optional(),
|
|
@@ -5073,17 +5191,36 @@ function createManifestSchemas(canonical) {
|
|
|
5073
5191
|
* schemes then report `ownedByBonsai`. Honoured only for a plugin that ships with Bonsai: the
|
|
5074
5192
|
* host reads any other plugin's flag as false. Absent => false.
|
|
5075
5193
|
*/
|
|
5076
|
-
ownedByBonsai:
|
|
5194
|
+
ownedByBonsai: z16.boolean().optional(),
|
|
5077
5195
|
/**
|
|
5078
5196
|
* Explicit plugin-level dependencies - other plugins this plugin requires to be present in the
|
|
5079
5197
|
* composed roster. At composition time the runtime checks each id against the accepted
|
|
5080
5198
|
* registration list and derives a provenance-complete dependency graph (together with implicit
|
|
5081
5199
|
* auth-service edges from `consumesAuthServices`). Absent => no explicit dependencies.
|
|
5082
5200
|
*/
|
|
5083
|
-
dependencies:
|
|
5084
|
-
plugins:
|
|
5201
|
+
dependencies: z16.strictObject({
|
|
5202
|
+
plugins: z16.array(PluginId2).optional()
|
|
5085
5203
|
}).optional()
|
|
5086
5204
|
}).superRefine((manifest, ctx) => {
|
|
5205
|
+
const sharedWith = manifest.storage?.dataDir?.sharedWith;
|
|
5206
|
+
if (sharedWith !== void 0 && (!manifest.storage?.dataDir?.enabled || sharedWith === manifest.id || !manifest.dependencies?.plugins?.includes(sharedWith))) {
|
|
5207
|
+
ctx.addIssue({
|
|
5208
|
+
code: "custom",
|
|
5209
|
+
path: ["storage", "dataDir", "sharedWith"],
|
|
5210
|
+
message: "A shared data directory must name another declared plugin dependency."
|
|
5211
|
+
});
|
|
5212
|
+
}
|
|
5213
|
+
const workloadPurposes = /* @__PURE__ */ new Set();
|
|
5214
|
+
for (const [index, workload] of (manifest.workloadPurposes ?? []).entries()) {
|
|
5215
|
+
if (workloadPurposes.has(workload.purpose)) {
|
|
5216
|
+
ctx.addIssue({
|
|
5217
|
+
code: "custom",
|
|
5218
|
+
path: ["workloadPurposes", index, "purpose"],
|
|
5219
|
+
message: "A workload purpose must be unique within its plugin."
|
|
5220
|
+
});
|
|
5221
|
+
}
|
|
5222
|
+
workloadPurposes.add(workload.purpose);
|
|
5223
|
+
}
|
|
5087
5224
|
const authServices = new Set(manifest.auth?.services?.map((service) => service.localId) ?? []);
|
|
5088
5225
|
const authSchemeIdsByService = new Map((manifest.auth?.services ?? []).map((service) => [
|
|
5089
5226
|
service.localId,
|
|
@@ -5093,6 +5230,33 @@ function createManifestSchemas(canonical) {
|
|
|
5093
5230
|
]))
|
|
5094
5231
|
]));
|
|
5095
5232
|
const endpointIds = new Set(manifest.targets?.kay?.app?.contributes?.endpoints?.map((endpoint) => endpoint.localId) ?? []);
|
|
5233
|
+
const shellNames = /* @__PURE__ */ new Set([
|
|
5234
|
+
"help",
|
|
5235
|
+
"version",
|
|
5236
|
+
"info",
|
|
5237
|
+
"open",
|
|
5238
|
+
"launch",
|
|
5239
|
+
"session"
|
|
5240
|
+
]);
|
|
5241
|
+
for (const [index, command] of (manifest.shellCommands ?? []).entries()) {
|
|
5242
|
+
if (!endpointIds.has(command.endpoint)) {
|
|
5243
|
+
ctx.addIssue({
|
|
5244
|
+
code: "custom",
|
|
5245
|
+
path: ["shellCommands", index, "endpoint"],
|
|
5246
|
+
message: "A shell command must name an endpoint declared by this plugin's app target."
|
|
5247
|
+
});
|
|
5248
|
+
}
|
|
5249
|
+
for (const name of [command.name, ...command.aliases ?? []]) {
|
|
5250
|
+
if (shellNames.has(name)) {
|
|
5251
|
+
ctx.addIssue({
|
|
5252
|
+
code: "custom",
|
|
5253
|
+
path: ["shellCommands", index],
|
|
5254
|
+
message: `Shell command name '${name}' is reserved or already declared.`
|
|
5255
|
+
});
|
|
5256
|
+
}
|
|
5257
|
+
shellNames.add(name);
|
|
5258
|
+
}
|
|
5259
|
+
}
|
|
5096
5260
|
const storageKinds = /* @__PURE__ */ new Set();
|
|
5097
5261
|
if (manifest.storage?.sqlite?.enabled)
|
|
5098
5262
|
storageKinds.add("sqlite");
|
|
@@ -6143,7 +6307,7 @@ function pushContributionIds(output, path, items) {
|
|
|
6143
6307
|
}
|
|
6144
6308
|
|
|
6145
6309
|
// packages/plugin-protocol/dist/plugin-directory-verdict.js
|
|
6146
|
-
import { z as
|
|
6310
|
+
import { z as z18 } from "zod";
|
|
6147
6311
|
|
|
6148
6312
|
// packages/plugin-protocol/dist/plugin-load-diagnostic.js
|
|
6149
6313
|
var PLUGIN_DIAGNOSTIC_MESSAGE_CAP = 300;
|
|
@@ -6152,14 +6316,14 @@ function boundPluginDiagnosticMessage(message) {
|
|
|
6152
6316
|
}
|
|
6153
6317
|
|
|
6154
6318
|
// packages/plugin-protocol/dist/resolved-contract.js
|
|
6155
|
-
import { z as
|
|
6319
|
+
import { z as z17 } from "zod";
|
|
6156
6320
|
function createResolvedContractSchemas(canonical) {
|
|
6157
6321
|
const { PluginEventLocalId: PluginEventLocalId2 } = canonical ? canonicalPluginEventSchemas : plugin_events_exports;
|
|
6158
6322
|
const { ApprovalTypeContribution: ApprovalTypeContribution2, KayUiAppHostCapability: KayUiAppHostCapability2, McpServerAuthMode: McpServerAuthMode2, McpServerUrl: McpServerUrl2, PluginContributionKind: PluginContributionKindSchema, ReferenceOpenBehavior: ReferenceOpenBehavior2, ReferencePresentationUriPattern: ReferencePresentationUriPattern2, ReferencePresentationAccountLinks: ReferencePresentationAccountLinks2, ReferencePresentationAddress: ReferencePresentationAddress2, ReferencePresentationUrlClaim: ReferencePresentationUrlClaim2, ReferencePresentationVariants: ReferencePresentationVariants2, ReferencePresentationWords: ReferencePresentationWords2, UriModuleFacts: UriModuleFacts2, WhiteboardTypeStorage: WhiteboardTypeStorage2 } = canonical ? canonicalContributionSchemas : contributions_exports;
|
|
6159
6323
|
const { FileExtensionToken: FileExtensionToken2, GitBasicAuthUser: GitBasicAuthUser2, GitHostName: GitHostName2, GlobalContributionId: GlobalContributionId2, HttpsUrl: HttpsUrl2, LocalContributionId: LocalContributionId2, MimeTypeString: MimeTypeString2, NonEmptyString: NonEmptyString3, PackageAssetPath: PackageAssetPath2, PluginId: PluginId2, PluginNamespace: PluginNamespace2, PluginToolName: PluginToolName2, RegistrableDomain: RegistrableDomain2, SignedInStatusCode: SignedInStatusCode2, TargetEntrypoint: TargetEntrypoint2, UriScheme: UriScheme2 } = canonical ? canonicalCommonSchemas : common_exports;
|
|
6160
6324
|
const { PluginExternalCliConnect: PluginExternalCliConnect2, PluginOAuthClientSupplier: PluginOAuthClientSupplier2 } = canonical ? canonicalManifestSchemas : manifest_exports;
|
|
6161
6325
|
const { ResolvedPluginGrants: ResolvedPluginGrants2 } = canonical ? canonicalPermissionSchemas : permissions_exports;
|
|
6162
|
-
const ResolvedPluginContributionId2 =
|
|
6326
|
+
const ResolvedPluginContributionId2 = z17.strictObject({
|
|
6163
6327
|
target: PluginTargetName,
|
|
6164
6328
|
kind: PluginContributionKindSchema,
|
|
6165
6329
|
localId: PluginEventLocalId2,
|
|
@@ -6173,54 +6337,54 @@ function createResolvedContractSchemas(canonical) {
|
|
|
6173
6337
|
});
|
|
6174
6338
|
}
|
|
6175
6339
|
});
|
|
6176
|
-
const ResolvedKayToolId =
|
|
6340
|
+
const ResolvedKayToolId = z17.strictObject({
|
|
6177
6341
|
localId: LocalContributionId2,
|
|
6178
6342
|
globalId: GlobalContributionId2,
|
|
6179
6343
|
toolName: PluginToolName2
|
|
6180
6344
|
});
|
|
6181
|
-
const ResolvedKayAgentTool2 =
|
|
6345
|
+
const ResolvedKayAgentTool2 = z17.strictObject({
|
|
6182
6346
|
...ResolvedKayToolId.shape,
|
|
6183
6347
|
displayName: NonEmptyString3.optional(),
|
|
6184
6348
|
description: NonEmptyString3.optional(),
|
|
6185
6349
|
parameters: JsonSchema.optional(),
|
|
6186
|
-
executionMode:
|
|
6350
|
+
executionMode: z17.enum(["sequential", "parallel"]).optional(),
|
|
6187
6351
|
promptSnippet: NonEmptyString3.optional(),
|
|
6188
|
-
promptGuidelines:
|
|
6189
|
-
requiresAuth:
|
|
6352
|
+
promptGuidelines: z17.array(NonEmptyString3).optional(),
|
|
6353
|
+
requiresAuth: z17.strictObject({
|
|
6190
6354
|
serviceId: GlobalContributionId2,
|
|
6191
6355
|
schemeId: GlobalContributionId2.optional()
|
|
6192
6356
|
}).optional(),
|
|
6193
6357
|
permission: canonical ? canonicalContributionSchemas.ToolPermission.optional() : ToolPermission.optional()
|
|
6194
6358
|
});
|
|
6195
6359
|
const ResolvedKayAppTool2 = ResolvedKayAgentTool2.omit({ requiresAuth: true });
|
|
6196
|
-
const ResolvedKayAppDataSource2 =
|
|
6360
|
+
const ResolvedKayAppDataSource2 = z17.strictObject({
|
|
6197
6361
|
localId: LocalContributionId2,
|
|
6198
6362
|
globalId: GlobalContributionId2,
|
|
6199
|
-
scope:
|
|
6200
|
-
snapshot:
|
|
6201
|
-
version:
|
|
6202
|
-
schema:
|
|
6363
|
+
scope: z17.enum(["runtime", "account", "session"]),
|
|
6364
|
+
snapshot: z17.strictObject({
|
|
6365
|
+
version: z17.number().int().positive(),
|
|
6366
|
+
schema: z17.record(z17.string(), z17.unknown())
|
|
6203
6367
|
}),
|
|
6204
|
-
change:
|
|
6205
|
-
version:
|
|
6206
|
-
schema:
|
|
6207
|
-
semantics:
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
kind:
|
|
6211
|
-
maxEncodedBytes:
|
|
6368
|
+
change: z17.strictObject({
|
|
6369
|
+
version: z17.number().int().positive(),
|
|
6370
|
+
schema: z17.record(z17.string(), z17.unknown()),
|
|
6371
|
+
semantics: z17.discriminatedUnion("kind", [
|
|
6372
|
+
z17.strictObject({ kind: z17.literal("incremental") }),
|
|
6373
|
+
z17.strictObject({
|
|
6374
|
+
kind: z17.literal("snapshot-replacement"),
|
|
6375
|
+
maxEncodedBytes: z17.number().int().positive(),
|
|
6212
6376
|
rationale: pluginString(canonical).min(1).max(1024)
|
|
6213
6377
|
})
|
|
6214
6378
|
]).optional()
|
|
6215
6379
|
}),
|
|
6216
6380
|
read: AppDataSourceRead.optional(),
|
|
6217
|
-
store:
|
|
6218
|
-
|
|
6219
|
-
shape:
|
|
6220
|
-
rowsField:
|
|
6221
|
-
key:
|
|
6381
|
+
store: z17.discriminatedUnion("shape", [
|
|
6382
|
+
z17.strictObject({
|
|
6383
|
+
shape: z17.literal("rows"),
|
|
6384
|
+
rowsField: z17.string().min(1),
|
|
6385
|
+
key: z17.array(z17.string().min(1)).min(1)
|
|
6222
6386
|
}),
|
|
6223
|
-
|
|
6387
|
+
z17.strictObject({ shape: z17.literal("value") })
|
|
6224
6388
|
]).optional()
|
|
6225
6389
|
}).superRefine((source, ctx) => {
|
|
6226
6390
|
if (source.read !== void 0 && source.scope !== "session") {
|
|
@@ -6240,127 +6404,127 @@ function createResolvedContractSchemas(canonical) {
|
|
|
6240
6404
|
/** The auth service that module signs in through, whose accounts a card may send from. */
|
|
6241
6405
|
authService: GlobalContributionId2.optional()
|
|
6242
6406
|
});
|
|
6243
|
-
const ResolvedPluginCard2 =
|
|
6407
|
+
const ResolvedPluginCard2 = z17.strictObject({
|
|
6244
6408
|
localId: LocalContributionId2,
|
|
6245
6409
|
globalId: GlobalContributionId2,
|
|
6246
6410
|
pluginId: PluginId2,
|
|
6247
6411
|
description: NonEmptyString3,
|
|
6248
6412
|
inputs: JsonSchema,
|
|
6249
|
-
readEndpoint:
|
|
6413
|
+
readEndpoint: z17.strictObject({
|
|
6250
6414
|
localId: LocalContributionId2,
|
|
6251
6415
|
globalId: GlobalContributionId2
|
|
6252
6416
|
}),
|
|
6253
|
-
submitEndpoint:
|
|
6417
|
+
submitEndpoint: z17.strictObject({
|
|
6254
6418
|
localId: LocalContributionId2,
|
|
6255
6419
|
globalId: GlobalContributionId2
|
|
6256
6420
|
}),
|
|
6257
6421
|
authService: GlobalContributionId2.optional()
|
|
6258
6422
|
});
|
|
6259
|
-
const ResolvedKayAppWorkflow2 =
|
|
6423
|
+
const ResolvedKayAppWorkflow2 = z17.strictObject({
|
|
6260
6424
|
localId: LocalContributionId2,
|
|
6261
6425
|
globalId: GlobalContributionId2,
|
|
6262
6426
|
name: NonEmptyString3,
|
|
6263
6427
|
description: NonEmptyString3,
|
|
6264
|
-
everyMs:
|
|
6265
|
-
auth:
|
|
6428
|
+
everyMs: z17.number().int().positive(),
|
|
6429
|
+
auth: z17.strictObject({
|
|
6266
6430
|
serviceId: GlobalContributionId2,
|
|
6267
6431
|
schemeId: GlobalContributionId2,
|
|
6268
|
-
scopes:
|
|
6432
|
+
scopes: z17.array(NonEmptyString3).min(1).optional()
|
|
6269
6433
|
}).optional()
|
|
6270
6434
|
});
|
|
6271
|
-
const ResolvedKayAppWhiteboardType2 =
|
|
6435
|
+
const ResolvedKayAppWhiteboardType2 = z17.strictObject({
|
|
6272
6436
|
localId: LocalContributionId2,
|
|
6273
6437
|
globalId: GlobalContributionId2,
|
|
6274
6438
|
displayName: NonEmptyString3,
|
|
6275
|
-
schemaVersion:
|
|
6439
|
+
schemaVersion: z17.number().int().positive(),
|
|
6276
6440
|
storage: WhiteboardTypeStorage2,
|
|
6277
6441
|
valueSchema: JsonSchema
|
|
6278
6442
|
});
|
|
6279
|
-
const ResolvedKayAppMcpServer2 =
|
|
6443
|
+
const ResolvedKayAppMcpServer2 = z17.strictObject({
|
|
6280
6444
|
name: LocalContributionId2,
|
|
6281
6445
|
pluginId: PluginId2,
|
|
6282
6446
|
url: McpServerUrl2,
|
|
6283
6447
|
auth: McpServerAuthMode2,
|
|
6284
6448
|
authServiceId: GlobalContributionId2.optional()
|
|
6285
6449
|
});
|
|
6286
|
-
const ResolvedKayAgentUriModule2 =
|
|
6450
|
+
const ResolvedKayAgentUriModule2 = z17.strictObject({
|
|
6287
6451
|
localId: LocalContributionId2,
|
|
6288
6452
|
globalId: GlobalContributionId2,
|
|
6289
|
-
schemes:
|
|
6453
|
+
schemes: z17.array(UriScheme2).min(1),
|
|
6290
6454
|
displayName: NonEmptyString3.optional(),
|
|
6291
6455
|
authServiceId: GlobalContributionId2.optional(),
|
|
6292
6456
|
/** Mirrors `UriModuleContribution.authScheme`; a local ref takes the plugin's namespace. */
|
|
6293
6457
|
authSchemeId: GlobalContributionId2.optional(),
|
|
6294
6458
|
/** Mirrors `UriModuleContribution.knownResources` (host-side recording opt-in). */
|
|
6295
|
-
knownResources:
|
|
6459
|
+
knownResources: z17.literal(true).optional(),
|
|
6296
6460
|
/** Mirrors `UriModuleContribution.describesOperations`. */
|
|
6297
|
-
describesOperations:
|
|
6461
|
+
describesOperations: z17.literal(true).optional(),
|
|
6298
6462
|
/** Mirrors `UriModuleContribution.looksUpWebLinks`. */
|
|
6299
|
-
looksUpWebLinks:
|
|
6463
|
+
looksUpWebLinks: z17.literal(true).optional(),
|
|
6300
6464
|
...UriModuleFacts2.shape
|
|
6301
6465
|
});
|
|
6302
|
-
const ResolvedKayAgentArtifactUriModule2 =
|
|
6466
|
+
const ResolvedKayAgentArtifactUriModule2 = z17.strictObject({
|
|
6303
6467
|
localId: LocalContributionId2,
|
|
6304
6468
|
globalId: GlobalContributionId2,
|
|
6305
6469
|
scheme: UriScheme2,
|
|
6306
|
-
editable:
|
|
6307
|
-
listable:
|
|
6308
|
-
deletable:
|
|
6309
|
-
appendable:
|
|
6310
|
-
storageScope:
|
|
6470
|
+
editable: z17.boolean(),
|
|
6471
|
+
listable: z17.boolean(),
|
|
6472
|
+
deletable: z17.boolean(),
|
|
6473
|
+
appendable: z17.boolean(),
|
|
6474
|
+
storageScope: z17.enum(["session", "family"])
|
|
6311
6475
|
});
|
|
6312
|
-
const ResolvedKayAgentEntityResolver2 =
|
|
6476
|
+
const ResolvedKayAgentEntityResolver2 = z17.strictObject({
|
|
6313
6477
|
localId: LocalContributionId2,
|
|
6314
6478
|
globalId: GlobalContributionId2,
|
|
6315
6479
|
displayName: NonEmptyString3.optional(),
|
|
6316
6480
|
uriModule: GlobalContributionId2,
|
|
6317
|
-
entityTypes:
|
|
6481
|
+
entityTypes: z17.array(NonEmptyString3).min(1),
|
|
6318
6482
|
uriHint: NonEmptyString3
|
|
6319
6483
|
});
|
|
6320
|
-
const ResolvedKayAgentGitHostClaim2 =
|
|
6484
|
+
const ResolvedKayAgentGitHostClaim2 = z17.strictObject({
|
|
6321
6485
|
host: GitHostName2,
|
|
6322
6486
|
authServiceId: GlobalContributionId2,
|
|
6323
6487
|
/** Manifest-declared order; the clone ladder tries them in sequence. */
|
|
6324
|
-
authSchemeIds:
|
|
6488
|
+
authSchemeIds: z17.array(GlobalContributionId2).min(1),
|
|
6325
6489
|
/** Non-secret display copy for the claiming service, for clone failure text. */
|
|
6326
|
-
authServiceDisplayName:
|
|
6490
|
+
authServiceDisplayName: z17.string(),
|
|
6327
6491
|
basicAuthUser: GitBasicAuthUser2
|
|
6328
6492
|
});
|
|
6329
|
-
const ResolvedKayAgentConverter2 =
|
|
6493
|
+
const ResolvedKayAgentConverter2 = z17.strictObject({
|
|
6330
6494
|
localId: LocalContributionId2,
|
|
6331
6495
|
globalId: GlobalContributionId2,
|
|
6332
6496
|
description: NonEmptyString3.optional(),
|
|
6333
|
-
mimeTypes:
|
|
6334
|
-
extensions:
|
|
6497
|
+
mimeTypes: z17.array(MimeTypeString2).min(1),
|
|
6498
|
+
extensions: z17.array(FileExtensionToken2).min(1).optional()
|
|
6335
6499
|
});
|
|
6336
6500
|
const ResolvedReferencePresentationUrlClaim = ReferencePresentationUrlClaim2.extend({
|
|
6337
|
-
brandIcon:
|
|
6501
|
+
brandIcon: z17.string().max(64 * 1024).optional()
|
|
6338
6502
|
});
|
|
6339
|
-
const ResolvedReferencePresentation2 =
|
|
6503
|
+
const ResolvedReferencePresentation2 = z17.strictObject({
|
|
6340
6504
|
localId: LocalContributionId2,
|
|
6341
6505
|
globalId: GlobalContributionId2,
|
|
6342
6506
|
uriModule: GlobalContributionId2.optional(),
|
|
6343
6507
|
/** The schemes this presentation is about: its `scheme`, or its module's. */
|
|
6344
|
-
schemes:
|
|
6508
|
+
schemes: z17.array(UriScheme2).min(1).optional(),
|
|
6345
6509
|
/** The module's `displayName`: the source's name in a row. */
|
|
6346
6510
|
displayName: NonEmptyString3.optional(),
|
|
6347
6511
|
/** The module's auth service, qualified: whose accounts `accountLinks` reads. */
|
|
6348
6512
|
authService: GlobalContributionId2.optional(),
|
|
6349
6513
|
accountLinks: ReferencePresentationAccountLinks2.optional(),
|
|
6350
|
-
addresses:
|
|
6514
|
+
addresses: z17.array(ReferencePresentationAddress2).min(1).optional(),
|
|
6351
6515
|
/** Comes with `open`. A presentation with neither only words its module's addresses. */
|
|
6352
6516
|
resourceKind: NonEmptyString3.optional(),
|
|
6353
6517
|
open: ReferenceOpenBehavior2.optional(),
|
|
6354
6518
|
/** MIME-specific resource kinds; absent keys use the base presentation. */
|
|
6355
6519
|
variants: ReferencePresentationVariants2.optional(),
|
|
6356
|
-
claims:
|
|
6357
|
-
tooltip:
|
|
6520
|
+
claims: z17.array(ResolvedReferencePresentationUrlClaim).optional(),
|
|
6521
|
+
tooltip: z17.strictObject({
|
|
6358
6522
|
app: GlobalContributionId2,
|
|
6359
6523
|
pattern: ReferencePresentationUriPattern2
|
|
6360
6524
|
}).optional(),
|
|
6361
6525
|
words: ReferencePresentationWords2.optional()
|
|
6362
6526
|
});
|
|
6363
|
-
const ResolvedPluginProvisioningRequirement2 =
|
|
6527
|
+
const ResolvedPluginProvisioningRequirement2 = z17.strictObject({
|
|
6364
6528
|
id: LocalContributionId2,
|
|
6365
6529
|
displayName: NonEmptyString3,
|
|
6366
6530
|
description: NonEmptyString3,
|
|
@@ -6370,15 +6534,15 @@ function createResolvedContractSchemas(canonical) {
|
|
|
6370
6534
|
* URL degrades to "Reconnect" in the UI instead of a broken link.
|
|
6371
6535
|
*/
|
|
6372
6536
|
remediationUrl: HttpsUrl2.optional(),
|
|
6373
|
-
probe:
|
|
6537
|
+
probe: z17.strictObject({
|
|
6374
6538
|
url: HttpsUrl2,
|
|
6375
|
-
method:
|
|
6376
|
-
verdictStatuses:
|
|
6539
|
+
method: z17.enum(["GET"]),
|
|
6540
|
+
verdictStatuses: z17.array(SignedInStatusCode2).min(1),
|
|
6377
6541
|
nonEmptyArrayAt: NonEmptyString3.optional()
|
|
6378
6542
|
})
|
|
6379
6543
|
});
|
|
6380
6544
|
const ResolvedProvisioningField = {
|
|
6381
|
-
provisioning:
|
|
6545
|
+
provisioning: z17.array(ResolvedPluginProvisioningRequirement2).optional()
|
|
6382
6546
|
};
|
|
6383
6547
|
const ResolvedPluginAuthSchemeDescriptionFields = {
|
|
6384
6548
|
displayName: NonEmptyString3.optional(),
|
|
@@ -6390,114 +6554,115 @@ function createResolvedContractSchemas(canonical) {
|
|
|
6390
6554
|
...ResolvedPluginAuthSchemeDescriptionFields,
|
|
6391
6555
|
localId: LocalContributionId2,
|
|
6392
6556
|
globalId: GlobalContributionId2,
|
|
6393
|
-
kind:
|
|
6394
|
-
scopes:
|
|
6557
|
+
kind: z17.literal("oauth2"),
|
|
6558
|
+
scopes: z17.array(z17.string()).optional(),
|
|
6395
6559
|
authorizationUrl: HttpsUrl2,
|
|
6396
6560
|
tokenUrl: HttpsUrl2,
|
|
6397
|
-
extraAuthorizeParams:
|
|
6561
|
+
extraAuthorizeParams: z17.record(z17.string(), z17.string()).optional()
|
|
6398
6562
|
};
|
|
6399
|
-
const ResolvedPluginAuthSchemeOAuthPkce =
|
|
6563
|
+
const ResolvedPluginAuthSchemeOAuthPkce = z17.strictObject({
|
|
6400
6564
|
...ResolvedPluginAuthSchemeOAuthBase,
|
|
6401
|
-
exchange:
|
|
6402
|
-
|
|
6565
|
+
exchange: z17.literal("pkce"),
|
|
6566
|
+
byoocProfile: PluginByoocProfile.optional(),
|
|
6567
|
+
clientSuppliers: z17.array(PluginOAuthClientSupplier2).nonempty(),
|
|
6403
6568
|
clientId: NonEmptyString3.optional(),
|
|
6404
6569
|
clientSecret: NonEmptyString3.optional(),
|
|
6405
|
-
account:
|
|
6570
|
+
account: z17.literal("lookup").optional()
|
|
6406
6571
|
});
|
|
6407
|
-
const ResolvedPluginAuthSchemeOAuthConfidential =
|
|
6572
|
+
const ResolvedPluginAuthSchemeOAuthConfidential = z17.strictObject({
|
|
6408
6573
|
...ResolvedPluginAuthSchemeOAuthBase,
|
|
6409
|
-
exchange:
|
|
6410
|
-
clientSuppliers:
|
|
6411
|
-
account:
|
|
6574
|
+
exchange: z17.literal("confidential"),
|
|
6575
|
+
clientSuppliers: z17.tuple([z17.literal("kay")]),
|
|
6576
|
+
account: z17.enum(["lookup", "sign-in"])
|
|
6412
6577
|
});
|
|
6413
|
-
const ResolvedPluginAuthSchemeOAuth2 =
|
|
6578
|
+
const ResolvedPluginAuthSchemeOAuth2 = z17.discriminatedUnion("exchange", [
|
|
6414
6579
|
ResolvedPluginAuthSchemeOAuthPkce,
|
|
6415
6580
|
ResolvedPluginAuthSchemeOAuthConfidential
|
|
6416
6581
|
]);
|
|
6417
|
-
const ResolvedPluginAuthSchemeApiKey =
|
|
6582
|
+
const ResolvedPluginAuthSchemeApiKey = z17.strictObject({
|
|
6418
6583
|
...ResolvedProvisioningField,
|
|
6419
6584
|
...ResolvedPluginAuthSchemeDescriptionFields,
|
|
6420
6585
|
localId: LocalContributionId2,
|
|
6421
6586
|
globalId: GlobalContributionId2,
|
|
6422
|
-
kind:
|
|
6423
|
-
scopes:
|
|
6587
|
+
kind: z17.literal("api-key"),
|
|
6588
|
+
scopes: z17.array(z17.string()).optional(),
|
|
6424
6589
|
/** Resolution applies the manifest's default, "<service name> API key". */
|
|
6425
6590
|
inputLabel: NonEmptyString3,
|
|
6426
|
-
fields:
|
|
6427
|
-
setup:
|
|
6428
|
-
account:
|
|
6591
|
+
fields: z17.array(z17.strictObject({ id: z17.string(), label: z17.string() })).optional(),
|
|
6592
|
+
setup: z17.strictObject({ instructions: z17.string(), url: HttpsUrl2 }).optional(),
|
|
6593
|
+
account: z17.literal("lookup").optional()
|
|
6429
6594
|
});
|
|
6430
|
-
const ResolvedPluginAuthSchemeDelegated =
|
|
6595
|
+
const ResolvedPluginAuthSchemeDelegated = z17.strictObject({
|
|
6431
6596
|
...ResolvedPluginAuthSchemeDescriptionFields,
|
|
6432
6597
|
localId: LocalContributionId2,
|
|
6433
6598
|
globalId: GlobalContributionId2,
|
|
6434
|
-
kind:
|
|
6435
|
-
scopes:
|
|
6599
|
+
kind: z17.literal("delegated"),
|
|
6600
|
+
scopes: z17.array(z17.string()).optional()
|
|
6436
6601
|
});
|
|
6437
|
-
const ResolvedPluginAuthSchemeExternalCli =
|
|
6602
|
+
const ResolvedPluginAuthSchemeExternalCli = z17.strictObject({
|
|
6438
6603
|
...ResolvedPluginAuthSchemeDescriptionFields,
|
|
6439
6604
|
localId: LocalContributionId2,
|
|
6440
6605
|
globalId: GlobalContributionId2,
|
|
6441
|
-
kind:
|
|
6442
|
-
scopes:
|
|
6606
|
+
kind: z17.literal("external-cli"),
|
|
6607
|
+
scopes: z17.array(z17.string()).optional(),
|
|
6443
6608
|
/** The manifest's connect facts, verbatim. */
|
|
6444
6609
|
cli: PluginExternalCliConnect2.optional()
|
|
6445
6610
|
});
|
|
6446
|
-
const ResolvedPluginAuthScheme2 =
|
|
6611
|
+
const ResolvedPluginAuthScheme2 = z17.discriminatedUnion("kind", [
|
|
6447
6612
|
ResolvedPluginAuthSchemeOAuth2,
|
|
6448
6613
|
ResolvedPluginAuthSchemeApiKey,
|
|
6449
6614
|
ResolvedPluginAuthSchemeDelegated,
|
|
6450
6615
|
ResolvedPluginAuthSchemeExternalCli
|
|
6451
6616
|
]);
|
|
6452
|
-
const ResolvedPluginWebSession2 =
|
|
6453
|
-
importance:
|
|
6617
|
+
const ResolvedPluginWebSession2 = z17.strictObject({
|
|
6618
|
+
importance: z17.enum(["required", "recommended"]),
|
|
6454
6619
|
loginUrl: HttpsUrl2,
|
|
6455
|
-
cookieDomains:
|
|
6456
|
-
probe:
|
|
6620
|
+
cookieDomains: z17.array(RegistrableDomain2).min(1),
|
|
6621
|
+
probe: z17.strictObject({
|
|
6457
6622
|
url: HttpsUrl2,
|
|
6458
|
-
method:
|
|
6459
|
-
signedInStatuses:
|
|
6623
|
+
method: z17.enum(["GET", "POST"]),
|
|
6624
|
+
signedInStatuses: z17.array(SignedInStatusCode2).min(1)
|
|
6460
6625
|
}),
|
|
6461
|
-
oauthVenue:
|
|
6462
|
-
signInFirst:
|
|
6626
|
+
oauthVenue: z17.enum(["embedded", "external"]),
|
|
6627
|
+
signInFirst: z17.string().optional()
|
|
6463
6628
|
}).superRefine(refineWebSessionScopeConfined);
|
|
6464
|
-
const ResolvedPluginAuthService2 =
|
|
6629
|
+
const ResolvedPluginAuthService2 = z17.strictObject({
|
|
6465
6630
|
localId: LocalContributionId2,
|
|
6466
6631
|
globalId: GlobalContributionId2,
|
|
6467
|
-
displayName:
|
|
6468
|
-
summary:
|
|
6469
|
-
schemes:
|
|
6470
|
-
purposes:
|
|
6632
|
+
displayName: z17.string(),
|
|
6633
|
+
summary: z17.string().optional(),
|
|
6634
|
+
schemes: z17.array(ResolvedPluginAuthScheme2).min(1),
|
|
6635
|
+
purposes: z17.array(z17.string()).min(1),
|
|
6471
6636
|
/** The service's browser half, when the manifest declares one. */
|
|
6472
6637
|
webSession: ResolvedPluginWebSession2.optional()
|
|
6473
6638
|
});
|
|
6474
|
-
const ResolvedKayUiAppEndpointCapability2 =
|
|
6639
|
+
const ResolvedKayUiAppEndpointCapability2 = z17.strictObject({
|
|
6475
6640
|
localId: LocalContributionId2,
|
|
6476
6641
|
globalId: GlobalContributionId2
|
|
6477
6642
|
});
|
|
6478
|
-
const ResolvedKayUiApp2 =
|
|
6643
|
+
const ResolvedKayUiApp2 = z17.strictObject({
|
|
6479
6644
|
localId: LocalContributionId2,
|
|
6480
6645
|
globalId: GlobalContributionId2,
|
|
6481
6646
|
displayName: NonEmptyString3,
|
|
6482
|
-
contextOnly:
|
|
6647
|
+
contextOnly: z17.literal(true).optional(),
|
|
6483
6648
|
description: NonEmptyString3.optional(),
|
|
6484
6649
|
icon: PackageAssetPath2.optional(),
|
|
6485
|
-
runtime:
|
|
6486
|
-
sdk:
|
|
6650
|
+
runtime: z17.literal("kay.react-app.v1"),
|
|
6651
|
+
sdk: z17.strictObject({ range: NonEmptyString3 }),
|
|
6487
6652
|
entrypoint: TargetEntrypoint2,
|
|
6488
|
-
styles:
|
|
6489
|
-
assets:
|
|
6490
|
-
capabilities:
|
|
6491
|
-
endpoints:
|
|
6492
|
-
host:
|
|
6493
|
-
feeds:
|
|
6653
|
+
styles: z17.array(PackageAssetPath2).optional(),
|
|
6654
|
+
assets: z17.array(PackageAssetPath2).optional(),
|
|
6655
|
+
capabilities: z17.strictObject({
|
|
6656
|
+
endpoints: z17.array(ResolvedKayUiAppEndpointCapability2).optional(),
|
|
6657
|
+
host: z17.array(KayUiAppHostCapability2).optional(),
|
|
6658
|
+
feeds: z17.array(LocalContributionId2).optional()
|
|
6494
6659
|
}).optional()
|
|
6495
6660
|
});
|
|
6496
|
-
const ResolvedPluginContractV12 =
|
|
6497
|
-
protocol:
|
|
6661
|
+
const ResolvedPluginContractV12 = z17.strictObject({
|
|
6662
|
+
protocol: z17.literal("kay.plugin.v1"),
|
|
6498
6663
|
pluginId: PluginId2,
|
|
6499
6664
|
namespace: PluginNamespace2,
|
|
6500
|
-
contributions:
|
|
6665
|
+
contributions: z17.array(ResolvedPluginContributionId2),
|
|
6501
6666
|
// The deduplicated set of qualified (dotted) external auth-service ids this
|
|
6502
6667
|
// plugin references, from agent uriModule, tool and cliBinding
|
|
6503
6668
|
// `authService` refs, card sign-in refs, and auth-grant `service` refs. Always present - a plugin
|
|
@@ -6505,33 +6670,38 @@ function createResolvedContractSchemas(canonical) {
|
|
|
6505
6670
|
// is a recorded dependency, not a resolution: there is no runtime plugin
|
|
6506
6671
|
// loader in v1, so nothing here verifies the reference resolves within a
|
|
6507
6672
|
// composed roster (a composition-time concern owned elsewhere).
|
|
6508
|
-
consumesAuthServices:
|
|
6673
|
+
consumesAuthServices: z17.array(GlobalContributionId2),
|
|
6509
6674
|
// The explicit plugin-level dependency ids declared in `dependencies.plugins` on the manifest,
|
|
6510
6675
|
// deduped and validated at parse time. Always present; a plugin with no explicit dependencies
|
|
6511
6676
|
// carries an empty array. Composition checks each id against the accepted roster and derives the
|
|
6512
6677
|
// full dependency graph together with auth-inferred edges from `consumesAuthServices`.
|
|
6513
|
-
explicitDependencies:
|
|
6678
|
+
explicitDependencies: z17.array(PluginId2),
|
|
6679
|
+
dataDirSharedWith: PluginId2.optional(),
|
|
6680
|
+
workloadPurposes: z17.array(PluginWorkloadPurpose).optional(),
|
|
6681
|
+
shellCommands: z17.array(PluginShellCommand.omit({ endpoint: true }).extend({
|
|
6682
|
+
endpointId: GlobalContributionId2
|
|
6683
|
+
})).optional(),
|
|
6514
6684
|
// The auth services this plugin OWNS, carrying the global ids its harness
|
|
6515
6685
|
// target must register and the credential authority keys on. Always present;
|
|
6516
6686
|
// a plugin that declares no `auth.services` carries an empty array. The dual
|
|
6517
6687
|
// of `consumesAuthServices` (services it merely references).
|
|
6518
|
-
authServices:
|
|
6688
|
+
authServices: z17.array(ResolvedPluginAuthService2),
|
|
6519
6689
|
grants: ResolvedPluginGrants2.optional(),
|
|
6520
|
-
kayAgentUriModules:
|
|
6521
|
-
kayAgentArtifactUriModules:
|
|
6522
|
-
kayAgentEntityResolvers:
|
|
6523
|
-
kayAgentGitHostClaims:
|
|
6524
|
-
kayAgentTools:
|
|
6525
|
-
kayAppTools:
|
|
6526
|
-
kayAppApprovalTypes:
|
|
6527
|
-
kayAppWorkflows:
|
|
6528
|
-
kayAppCards:
|
|
6529
|
-
kayAppDataSources:
|
|
6530
|
-
kayAppWhiteboardTypes:
|
|
6531
|
-
kayAppMcpServers:
|
|
6532
|
-
kayAgentConverters:
|
|
6533
|
-
referencePresentations:
|
|
6534
|
-
kayUiApps:
|
|
6690
|
+
kayAgentUriModules: z17.array(ResolvedKayAgentUriModule2).optional(),
|
|
6691
|
+
kayAgentArtifactUriModules: z17.array(ResolvedKayAgentArtifactUriModule2).optional(),
|
|
6692
|
+
kayAgentEntityResolvers: z17.array(ResolvedKayAgentEntityResolver2).optional(),
|
|
6693
|
+
kayAgentGitHostClaims: z17.array(ResolvedKayAgentGitHostClaim2).optional(),
|
|
6694
|
+
kayAgentTools: z17.array(ResolvedKayAgentTool2).optional(),
|
|
6695
|
+
kayAppTools: z17.array(ResolvedKayAppTool2).optional(),
|
|
6696
|
+
kayAppApprovalTypes: z17.array(ResolvedKayAppApprovalType2).optional(),
|
|
6697
|
+
kayAppWorkflows: z17.array(ResolvedKayAppWorkflow2).optional(),
|
|
6698
|
+
kayAppCards: z17.array(ResolvedPluginCard2).optional(),
|
|
6699
|
+
kayAppDataSources: z17.array(ResolvedKayAppDataSource2).optional(),
|
|
6700
|
+
kayAppWhiteboardTypes: z17.array(ResolvedKayAppWhiteboardType2).optional(),
|
|
6701
|
+
kayAppMcpServers: z17.array(ResolvedKayAppMcpServer2).optional(),
|
|
6702
|
+
kayAgentConverters: z17.array(ResolvedKayAgentConverter2).optional(),
|
|
6703
|
+
referencePresentations: z17.array(ResolvedReferencePresentation2).optional(),
|
|
6704
|
+
kayUiApps: z17.array(ResolvedKayUiApp2).optional()
|
|
6535
6705
|
});
|
|
6536
6706
|
return {
|
|
6537
6707
|
ResolvedPluginContributionId: ResolvedPluginContributionId2,
|
|
@@ -6769,6 +6939,7 @@ function resolveAuthServices(namespace, manifest) {
|
|
|
6769
6939
|
kind: "oauth2",
|
|
6770
6940
|
exchange: "pkce",
|
|
6771
6941
|
clientSuppliers: scheme.clientSuppliers,
|
|
6942
|
+
...scheme.byoocProfile === void 0 ? {} : { byoocProfile: scheme.byoocProfile },
|
|
6772
6943
|
...scheme.clientId === void 0 ? {} : { clientId: scheme.clientId },
|
|
6773
6944
|
...scheme.clientSecret === void 0 ? {} : { clientSecret: scheme.clientSecret },
|
|
6774
6945
|
...scheme.account === void 0 ? {} : { account: scheme.account },
|
|
@@ -7059,6 +7230,14 @@ function resolveKayPluginContractV1(manifest) {
|
|
|
7059
7230
|
...manifest.dependencies?.plugins ?? []
|
|
7060
7231
|
],
|
|
7061
7232
|
authServices,
|
|
7233
|
+
...manifest.storage?.dataDir?.sharedWith === void 0 ? {} : { dataDirSharedWith: manifest.storage.dataDir.sharedWith },
|
|
7234
|
+
...manifest.workloadPurposes === void 0 ? {} : { workloadPurposes: manifest.workloadPurposes },
|
|
7235
|
+
...manifest.shellCommands === void 0 ? {} : {
|
|
7236
|
+
shellCommands: manifest.shellCommands.map(({ endpoint, ...command }) => ({
|
|
7237
|
+
...command,
|
|
7238
|
+
endpointId: resolveGlobalContributionId(namespace, endpoint)
|
|
7239
|
+
}))
|
|
7240
|
+
},
|
|
7062
7241
|
...grants && Object.keys(grants.byTarget).length > 0 ? { grants } : {},
|
|
7063
7242
|
...kayAgentUriModules && kayAgentUriModules.length > 0 ? { kayAgentUriModules } : {},
|
|
7064
7243
|
...kayAgentArtifactUriModules && kayAgentArtifactUriModules.length > 0 ? { kayAgentArtifactUriModules } : {},
|
|
@@ -7242,14 +7421,14 @@ function kayPluginCompatibilityAdvisories(input) {
|
|
|
7242
7421
|
message: boundPluginDiagnosticMessage(`${manifest.displayName} (${manifest.id}) ${advisory.message}`)
|
|
7243
7422
|
}));
|
|
7244
7423
|
}
|
|
7245
|
-
var ReadableCompatibility =
|
|
7246
|
-
supportedProtocols:
|
|
7424
|
+
var ReadableCompatibility = z18.object({
|
|
7425
|
+
supportedProtocols: z18.array(z18.string()).optional().catch(void 0),
|
|
7247
7426
|
minKayVersion: NonEmptyString.optional().catch(void 0),
|
|
7248
7427
|
sdk: NonEmptyString.optional().catch(void 0)
|
|
7249
7428
|
});
|
|
7250
|
-
var ReadableManifestHead =
|
|
7251
|
-
id:
|
|
7252
|
-
displayName:
|
|
7429
|
+
var ReadableManifestHead = z18.object({
|
|
7430
|
+
id: z18.string().optional().catch(void 0),
|
|
7431
|
+
displayName: z18.string().optional().catch(void 0),
|
|
7253
7432
|
compatibility: ReadableCompatibility.optional().catch(void 0)
|
|
7254
7433
|
});
|
|
7255
7434
|
function keepNamespaceDerivedTools(contract, grandfathered) {
|
|
@@ -7353,28 +7532,28 @@ function errorText(error) {
|
|
|
7353
7532
|
}
|
|
7354
7533
|
|
|
7355
7534
|
// packages/plugin-protocol/dist/session-health.js
|
|
7356
|
-
import { z as
|
|
7535
|
+
import { z as z19 } from "zod";
|
|
7357
7536
|
var SESSION_HEALTH_EXTENSION_ID = "kay.session-health";
|
|
7358
7537
|
var SESSION_HEALTH_ENTRY_NAME = "session_health";
|
|
7359
7538
|
var SESSION_HEALTH_CUSTOM_TYPE = `ext:${SESSION_HEALTH_EXTENSION_ID}:${SESSION_HEALTH_ENTRY_NAME}`;
|
|
7360
7539
|
var SESSION_HEALTH_CLASSIFIER_IDS = ["jev"];
|
|
7361
|
-
var sessionHealthEntrySchema =
|
|
7362
|
-
v:
|
|
7363
|
-
verdict:
|
|
7540
|
+
var sessionHealthEntrySchema = z19.object({
|
|
7541
|
+
v: z19.literal(1),
|
|
7542
|
+
verdict: z19.enum(["well", "bad", "unknown"]),
|
|
7364
7543
|
/**
|
|
7365
7544
|
* The model's calibrated confidence in `well`, 0..1, or null when the
|
|
7366
7545
|
* classifier declined to produce one. Never exported raw: the telemetry
|
|
7367
7546
|
* event carries only the decile bucket.
|
|
7368
7547
|
*/
|
|
7369
|
-
p_well:
|
|
7370
|
-
classifier:
|
|
7371
|
-
classifier_version:
|
|
7372
|
-
judged_at:
|
|
7373
|
-
user_entry_id:
|
|
7374
|
-
through_entry_id:
|
|
7375
|
-
usage:
|
|
7376
|
-
input_tokens:
|
|
7377
|
-
output_tokens:
|
|
7548
|
+
p_well: z19.number().min(0).max(1).nullable(),
|
|
7549
|
+
classifier: z19.enum(SESSION_HEALTH_CLASSIFIER_IDS),
|
|
7550
|
+
classifier_version: z19.string().min(1).max(64),
|
|
7551
|
+
judged_at: z19.number().int().nonnegative(),
|
|
7552
|
+
user_entry_id: z19.string().min(1).max(256),
|
|
7553
|
+
through_entry_id: z19.string().min(1).max(256),
|
|
7554
|
+
usage: z19.strictObject({
|
|
7555
|
+
input_tokens: z19.number().int().nonnegative(),
|
|
7556
|
+
output_tokens: z19.number().int().nonnegative()
|
|
7378
7557
|
}).optional()
|
|
7379
7558
|
});
|
|
7380
7559
|
function sessionHealthPWellDecile(pWell) {
|
|
@@ -7384,23 +7563,23 @@ function sessionHealthPWellDecile(pWell) {
|
|
|
7384
7563
|
}
|
|
7385
7564
|
|
|
7386
7565
|
// packages/plugin-protocol/dist/resource-invocations.js
|
|
7387
|
-
import { z as
|
|
7388
|
-
var CorpusResourceKind =
|
|
7566
|
+
import { z as z20 } from "zod";
|
|
7567
|
+
var CorpusResourceKind = z20.enum([
|
|
7389
7568
|
"skill",
|
|
7390
7569
|
"context-file",
|
|
7391
7570
|
"prompt-command"
|
|
7392
7571
|
]);
|
|
7393
|
-
var CorpusResourceInvocationCursor =
|
|
7394
|
-
at:
|
|
7395
|
-
eventId:
|
|
7572
|
+
var CorpusResourceInvocationCursor = z20.strictObject({
|
|
7573
|
+
at: z20.iso.datetime({ offset: true }),
|
|
7574
|
+
eventId: z20.string().min(1)
|
|
7396
7575
|
});
|
|
7397
|
-
var CorpusResourceInvocationQuery =
|
|
7576
|
+
var CorpusResourceInvocationQuery = z20.strictObject({
|
|
7398
7577
|
kind: CorpusResourceKind,
|
|
7399
|
-
since:
|
|
7400
|
-
until:
|
|
7578
|
+
since: z20.iso.datetime({ offset: true }),
|
|
7579
|
+
until: z20.iso.datetime({ offset: true }),
|
|
7401
7580
|
after: CorpusResourceInvocationCursor.optional(),
|
|
7402
|
-
limit:
|
|
7403
|
-
rootCreatedByKind:
|
|
7581
|
+
limit: z20.number().int().min(1).max(1e3).optional(),
|
|
7582
|
+
rootCreatedByKind: z20.enum(AGENT_RUNTIME_SESSION_CREATOR_KINDS).optional()
|
|
7404
7583
|
}).refine((value) => Date.parse(value.since) < Date.parse(value.until), {
|
|
7405
7584
|
message: "since must precede until"
|
|
7406
7585
|
});
|
|
@@ -7580,14 +7759,14 @@ function skillSuggestionEvidenceItems(evidence, options = {}) {
|
|
|
7580
7759
|
}
|
|
7581
7760
|
|
|
7582
7761
|
// packages/plugin-protocol/dist/ui-app-package.js
|
|
7583
|
-
import { z as
|
|
7762
|
+
import { z as z21 } from "zod";
|
|
7584
7763
|
var KAY_UI_APP_PACKAGE_PROTOCOL = "kay.ui.app-package.v1";
|
|
7585
7764
|
var KAY_UI_BUNDLE_INDEX_PROTOCOL = "kay.ui.bundle-index.v1";
|
|
7586
|
-
var KayUiBundleOutputPath =
|
|
7587
|
-
var KayUiBundleIndexV1 =
|
|
7588
|
-
protocol:
|
|
7765
|
+
var KayUiBundleOutputPath = z21.string().trim().min(1).refine((value) => !value.startsWith("/") && !value.startsWith("./") && !value.includes("\\") && !value.split("/").includes(".."), { message: "bundle output path must stay relative to the bundle root" });
|
|
7766
|
+
var KayUiBundleIndexV1 = z21.strictObject({
|
|
7767
|
+
protocol: z21.literal(KAY_UI_BUNDLE_INDEX_PROTOCOL),
|
|
7589
7768
|
entryPath: KayUiBundleOutputPath,
|
|
7590
|
-
files:
|
|
7769
|
+
files: z21.array(z21.strictObject({
|
|
7591
7770
|
path: KayUiBundleOutputPath,
|
|
7592
7771
|
mediaType: NonEmptyString
|
|
7593
7772
|
})).min(1)
|
|
@@ -7614,19 +7793,19 @@ var KayUiBundleIndexV1 = z18.strictObject({
|
|
|
7614
7793
|
function parseKayUiBundleIndexV1(input) {
|
|
7615
7794
|
return KayUiBundleIndexV1.parse(input);
|
|
7616
7795
|
}
|
|
7617
|
-
var KayUiAppPackageFile =
|
|
7796
|
+
var KayUiAppPackageFile = z21.strictObject({
|
|
7618
7797
|
path: PackageAssetPath,
|
|
7619
7798
|
mediaType: NonEmptyString,
|
|
7620
|
-
bytes:
|
|
7799
|
+
bytes: z21.instanceof(Uint8Array).refine((bytes) => bytes.byteLength > 0, {
|
|
7621
7800
|
message: "app package file bytes must not be empty"
|
|
7622
7801
|
})
|
|
7623
7802
|
});
|
|
7624
|
-
var KayUiAppPackageV1 =
|
|
7625
|
-
protocol:
|
|
7803
|
+
var KayUiAppPackageV1 = z21.strictObject({
|
|
7804
|
+
protocol: z21.literal(KAY_UI_APP_PACKAGE_PROTOCOL),
|
|
7626
7805
|
appLocalId: LocalContributionId,
|
|
7627
7806
|
entry: KayUiAppPackageFile,
|
|
7628
|
-
styles:
|
|
7629
|
-
assets:
|
|
7807
|
+
styles: z21.array(KayUiAppPackageFile).optional(),
|
|
7808
|
+
assets: z21.array(KayUiAppPackageFile).optional()
|
|
7630
7809
|
}).superRefine((appPackage, ctx) => {
|
|
7631
7810
|
if (appPackage.entry.mediaType !== "application/javascript") {
|
|
7632
7811
|
ctx.addIssue({
|
|
@@ -7663,16 +7842,16 @@ function parseKayUiAppPackageV1(input) {
|
|
|
7663
7842
|
}
|
|
7664
7843
|
|
|
7665
7844
|
// packages/plugin-protocol/dist/whiteboard.js
|
|
7666
|
-
import { z as
|
|
7845
|
+
import { z as z22 } from "zod";
|
|
7667
7846
|
var WhiteboardValue = JsonValue;
|
|
7668
|
-
var WhiteboardEntryEnvelope =
|
|
7847
|
+
var WhiteboardEntryEnvelope = z22.strictObject({
|
|
7669
7848
|
id: NonEmptyString,
|
|
7670
7849
|
typeId: GlobalContributionId,
|
|
7671
|
-
schemaVersion:
|
|
7672
|
-
title:
|
|
7850
|
+
schemaVersion: z22.number().int().positive(),
|
|
7851
|
+
title: z22.string(),
|
|
7673
7852
|
authorSessionId: NonEmptyString.nullable()
|
|
7674
7853
|
});
|
|
7675
|
-
var WhiteboardEntrySummary =
|
|
7854
|
+
var WhiteboardEntrySummary = z22.strictObject({
|
|
7676
7855
|
name: NonEmptyString,
|
|
7677
7856
|
entry: WhiteboardEntryEnvelope,
|
|
7678
7857
|
revision: NonEmptyString
|
|
@@ -7680,54 +7859,54 @@ var WhiteboardEntrySummary = z19.strictObject({
|
|
|
7680
7859
|
var WhiteboardEntrySnapshot = WhiteboardEntrySummary.extend({
|
|
7681
7860
|
value: WhiteboardValue
|
|
7682
7861
|
});
|
|
7683
|
-
var WhiteboardDiagnostic =
|
|
7862
|
+
var WhiteboardDiagnostic = z22.strictObject({
|
|
7684
7863
|
ruleId: NonEmptyString,
|
|
7685
|
-
severity:
|
|
7864
|
+
severity: z22.enum(["error", "warning"]),
|
|
7686
7865
|
message: NonEmptyString
|
|
7687
7866
|
});
|
|
7688
|
-
var WhiteboardEntryInfo =
|
|
7867
|
+
var WhiteboardEntryInfo = z22.strictObject({
|
|
7689
7868
|
name: NonEmptyString,
|
|
7690
7869
|
revision: NonEmptyString,
|
|
7691
7870
|
entry: WhiteboardEntryEnvelope.optional(),
|
|
7692
|
-
state:
|
|
7693
|
-
mutable:
|
|
7694
|
-
diagnostics:
|
|
7871
|
+
state: z22.enum(["available", "unavailable", "unsupported-version", "invalid"]),
|
|
7872
|
+
mutable: z22.boolean(),
|
|
7873
|
+
diagnostics: z22.array(z22.string())
|
|
7695
7874
|
});
|
|
7696
7875
|
var WhiteboardEntryInspection = WhiteboardEntryInfo.extend({
|
|
7697
7876
|
value: WhiteboardValue.optional(),
|
|
7698
|
-
text:
|
|
7699
|
-
truncated:
|
|
7877
|
+
text: z22.string(),
|
|
7878
|
+
truncated: z22.boolean()
|
|
7700
7879
|
});
|
|
7701
|
-
var WhiteboardTypeInfo =
|
|
7880
|
+
var WhiteboardTypeInfo = z22.strictObject({
|
|
7702
7881
|
typeId: GlobalContributionId,
|
|
7703
7882
|
displayName: NonEmptyString,
|
|
7704
|
-
schemaVersion:
|
|
7705
|
-
available:
|
|
7883
|
+
schemaVersion: z22.number().int().positive(),
|
|
7884
|
+
available: z22.boolean()
|
|
7706
7885
|
});
|
|
7707
7886
|
|
|
7708
7887
|
// packages/plugin-protocol/dist/product-events.js
|
|
7709
|
-
import { z as
|
|
7888
|
+
import { z as z23 } from "zod";
|
|
7710
7889
|
var exportable = {
|
|
7711
|
-
class:
|
|
7712
|
-
optional:
|
|
7890
|
+
class: z23.literal("exportable"),
|
|
7891
|
+
optional: z23.boolean().optional()
|
|
7713
7892
|
};
|
|
7714
|
-
var PluginProductEventField =
|
|
7715
|
-
|
|
7716
|
-
|
|
7893
|
+
var PluginProductEventField = z23.union([
|
|
7894
|
+
z23.strictObject({ class: z23.literal("local") }),
|
|
7895
|
+
z23.strictObject({
|
|
7717
7896
|
...exportable,
|
|
7718
|
-
type:
|
|
7719
|
-
values:
|
|
7897
|
+
type: z23.literal("enum"),
|
|
7898
|
+
values: z23.array(z23.string())
|
|
7720
7899
|
}),
|
|
7721
|
-
|
|
7900
|
+
z23.strictObject({
|
|
7722
7901
|
...exportable,
|
|
7723
|
-
type:
|
|
7724
|
-
min:
|
|
7725
|
-
max:
|
|
7726
|
-
integer:
|
|
7902
|
+
type: z23.literal("number"),
|
|
7903
|
+
min: z23.number(),
|
|
7904
|
+
max: z23.number(),
|
|
7905
|
+
integer: z23.boolean().optional()
|
|
7727
7906
|
}),
|
|
7728
|
-
|
|
7907
|
+
z23.strictObject({
|
|
7729
7908
|
...exportable,
|
|
7730
|
-
type:
|
|
7909
|
+
type: z23.enum([
|
|
7731
7910
|
"boolean",
|
|
7732
7911
|
"id",
|
|
7733
7912
|
"identifier",
|
|
@@ -7743,9 +7922,9 @@ function isPluginProductEventName(name) {
|
|
|
7743
7922
|
}
|
|
7744
7923
|
|
|
7745
7924
|
// packages/plugin-protocol/dist/artifact-outputs.js
|
|
7746
|
-
import { z as
|
|
7925
|
+
import { z as z24 } from "zod";
|
|
7747
7926
|
var ARTIFACT_OUTPUT_PAGE_MAX = 200;
|
|
7748
|
-
var Segment =
|
|
7927
|
+
var Segment = z24.string().min(1).max(1024).refine((value) => !/[^A-Za-z0-9._-]/.test(value)).refine((value) => value !== "." && value !== "..");
|
|
7749
7928
|
function parseArtifactOutputUri(uri) {
|
|
7750
7929
|
const match = /^output:\/\/([^/]+)\/([^/]+)$/.exec(uri);
|
|
7751
7930
|
if (match === null || !Segment.safeParse(match[1]).success || !Segment.safeParse(match[2]).success)
|
|
@@ -7755,12 +7934,12 @@ function parseArtifactOutputUri(uri) {
|
|
|
7755
7934
|
function isCanonicalArtifactOutputUri(uri) {
|
|
7756
7935
|
return parseArtifactOutputUri(uri) !== void 0;
|
|
7757
7936
|
}
|
|
7758
|
-
var ArtifactOutputUri =
|
|
7759
|
-
var ArtifactOutputChange =
|
|
7760
|
-
|
|
7761
|
-
uris:
|
|
7937
|
+
var ArtifactOutputUri = z24.string().refine(isCanonicalArtifactOutputUri, "Expected a canonical output://session/name URI");
|
|
7938
|
+
var ArtifactOutputChange = z24.union([
|
|
7939
|
+
z24.strictObject({
|
|
7940
|
+
uris: z24.array(ArtifactOutputUri).min(1).max(ARTIFACT_OUTPUT_PAGE_MAX)
|
|
7762
7941
|
}),
|
|
7763
|
-
|
|
7942
|
+
z24.strictObject({ sessionId: Segment })
|
|
7764
7943
|
]);
|
|
7765
7944
|
|
|
7766
7945
|
// packages/plugin-protocol/dist/credential-text.js
|
|
@@ -7803,25 +7982,25 @@ function isCredentialShapedText(value) {
|
|
|
7803
7982
|
}
|
|
7804
7983
|
|
|
7805
7984
|
// packages/plugin-protocol/dist/ui-module-bundle.js
|
|
7806
|
-
import { z as
|
|
7985
|
+
import { z as z25 } from "zod";
|
|
7807
7986
|
var KAY_UI_MODULE_BUNDLE_PROTOCOL = "kay.ui.module-bundle.v1";
|
|
7808
7987
|
var KAY_UI_MODULE_FILE_MAX_BYTES = 8 * 1024 * 1024;
|
|
7809
7988
|
var KAY_UI_MODULE_BUNDLE_MAX_BYTES = 32 * 1024 * 1024;
|
|
7810
7989
|
var KAY_UI_MODULE_BUNDLE_MAX_FILES = 256;
|
|
7811
|
-
var OutputPath =
|
|
7990
|
+
var OutputPath = z25.string().min(1).max(1024).refine((value) => {
|
|
7812
7991
|
const parsed = KayUiBundleIndexV1.shape.entryPath.safeParse(value);
|
|
7813
7992
|
return parsed.success && parsed.data === value && value.split("/").every((part) => part !== "" && part !== ".") && // oxlint-disable-next-line eslint/no-control-regex -- Untrusted artifact paths must reject literal control characters.
|
|
7814
7993
|
!/[\u0000-\u001f?#:%]/.test(value);
|
|
7815
7994
|
}, { message: "bundle path must contain only unambiguous relative segments" });
|
|
7816
|
-
var Sha256 =
|
|
7817
|
-
var KayUiModuleBundleIndexV1 =
|
|
7818
|
-
protocol:
|
|
7995
|
+
var Sha256 = z25.string().regex(/^[a-f0-9]{64}$/);
|
|
7996
|
+
var KayUiModuleBundleIndexV1 = z25.strictObject({
|
|
7997
|
+
protocol: z25.literal(KAY_UI_MODULE_BUNDLE_PROTOCOL),
|
|
7819
7998
|
entryPath: OutputPath,
|
|
7820
|
-
stylePaths:
|
|
7821
|
-
files:
|
|
7999
|
+
stylePaths: z25.array(OutputPath).max(KAY_UI_MODULE_BUNDLE_MAX_FILES),
|
|
8000
|
+
files: z25.array(z25.strictObject({
|
|
7822
8001
|
path: OutputPath,
|
|
7823
|
-
mediaType:
|
|
7824
|
-
byteLength:
|
|
8002
|
+
mediaType: z25.string().min(1).max(128).regex(/^[a-zA-Z0-9!#$&^_.+-]+\/[a-zA-Z0-9!#$&^_.+-]+$/),
|
|
8003
|
+
byteLength: z25.number().int().min(1).max(KAY_UI_MODULE_FILE_MAX_BYTES),
|
|
7825
8004
|
sha256: Sha256
|
|
7826
8005
|
})).min(1).max(KAY_UI_MODULE_BUNDLE_MAX_FILES)
|
|
7827
8006
|
}).superRefine((index, ctx) => {
|
|
@@ -7851,9 +8030,9 @@ var KayUiModuleBundleIndexV1 = z22.strictObject({
|
|
|
7851
8030
|
message: "bundle exceeds byte cap"
|
|
7852
8031
|
});
|
|
7853
8032
|
});
|
|
7854
|
-
var KayUiModuleBundleReference =
|
|
8033
|
+
var KayUiModuleBundleReference = z25.strictObject({
|
|
7855
8034
|
generationId: Sha256,
|
|
7856
|
-
revision:
|
|
8035
|
+
revision: z25.string().min(1).max(4096).refine((value) => value.trim() === value),
|
|
7857
8036
|
index: KayUiModuleBundleIndexV1
|
|
7858
8037
|
});
|
|
7859
8038
|
export {
|
|
@@ -7988,6 +8167,7 @@ export {
|
|
|
7988
8167
|
PluginAuthManifest,
|
|
7989
8168
|
PluginAuthScheme,
|
|
7990
8169
|
PluginAuthService,
|
|
8170
|
+
PluginByoocProfile,
|
|
7991
8171
|
PluginCapabilityClaimInputV1,
|
|
7992
8172
|
PluginCapabilityClaimV1,
|
|
7993
8173
|
PluginCapabilityDecisionV1,
|
|
@@ -8016,10 +8196,12 @@ export {
|
|
|
8016
8196
|
PluginNotificationRuleContribution,
|
|
8017
8197
|
PluginOAuthClientSupplier,
|
|
8018
8198
|
PluginPermissionManifest,
|
|
8199
|
+
PluginPickerRound,
|
|
8019
8200
|
PluginProductEventContribution,
|
|
8020
8201
|
PluginProductEventField,
|
|
8021
8202
|
PluginProvisioningProbe,
|
|
8022
8203
|
PluginProvisioningRequirement,
|
|
8204
|
+
PluginShellCommand,
|
|
8023
8205
|
PluginSignal,
|
|
8024
8206
|
PluginSignalPublish,
|
|
8025
8207
|
PluginSkillSourceDeclaration,
|
|
@@ -8029,6 +8211,7 @@ export {
|
|
|
8029
8211
|
PluginToolName,
|
|
8030
8212
|
PluginWebSessionDeclaration,
|
|
8031
8213
|
PluginWebSessionProbe,
|
|
8214
|
+
PluginWorkloadPurpose,
|
|
8032
8215
|
RENAMED_PLUGIN_CAPABILITY_SLUGS,
|
|
8033
8216
|
RESERVED_DIRECTORY_PLUGIN_ID_PREFIXES,
|
|
8034
8217
|
RETIRED_COMPATIBILITY_KEYS,
|
|
@@ -8091,6 +8274,9 @@ export {
|
|
|
8091
8274
|
SessionProvenanceRecord,
|
|
8092
8275
|
SessionReaderContribution,
|
|
8093
8276
|
SessionRelationship,
|
|
8277
|
+
ShellCommandOutcome,
|
|
8278
|
+
ShellCommandRequest,
|
|
8279
|
+
ShellCommandStep,
|
|
8094
8280
|
SignedInStatusCode,
|
|
8095
8281
|
SkillContribution,
|
|
8096
8282
|
StorageGrantRequest,
|