@yaklabs-ai/plugin-protocol 0.8.5 → 0.9.1
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 +115 -1
- package/dist/index.js +76 -34
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -262,9 +262,11 @@ export declare const ArtifactProvenanceCaptureContextSchema: z.ZodObject<{
|
|
|
262
262
|
type: z.ZodEnum<{
|
|
263
263
|
"turn-settled": "turn-settled";
|
|
264
264
|
"phase-shift": "phase-shift";
|
|
265
|
+
"human-message": "human-message";
|
|
265
266
|
}>;
|
|
266
267
|
entryId: z.ZodString;
|
|
267
268
|
runId: z.ZodOptional<z.ZodString>;
|
|
269
|
+
throughEntryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
268
270
|
}, z.core.$strict>>;
|
|
269
271
|
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
270
272
|
}, z.core.$strict>;
|
|
@@ -352,9 +354,11 @@ export declare const ArtifactProvenanceCaptureContextSchema: z.ZodObject<{
|
|
|
352
354
|
type: z.ZodEnum<{
|
|
353
355
|
"turn-settled": "turn-settled";
|
|
354
356
|
"phase-shift": "phase-shift";
|
|
357
|
+
"human-message": "human-message";
|
|
355
358
|
}>;
|
|
356
359
|
entryId: z.ZodString;
|
|
357
360
|
runId: z.ZodOptional<z.ZodString>;
|
|
361
|
+
throughEntryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
358
362
|
}, z.core.$strict>>;
|
|
359
363
|
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
360
364
|
}, z.core.$strict>>;
|
|
@@ -446,9 +450,11 @@ export declare const ArtifactProvenanceCause: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
446
450
|
type: z.ZodEnum<{
|
|
447
451
|
"turn-settled": "turn-settled";
|
|
448
452
|
"phase-shift": "phase-shift";
|
|
453
|
+
"human-message": "human-message";
|
|
449
454
|
}>;
|
|
450
455
|
entryId: z.ZodString;
|
|
451
456
|
runId: z.ZodOptional<z.ZodString>;
|
|
457
|
+
throughEntryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
452
458
|
}, z.core.$strict>>;
|
|
453
459
|
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
454
460
|
}, z.core.$strict>;
|
|
@@ -521,9 +527,11 @@ export declare const ArtifactProvenanceEnvelopeV1: z.ZodPipe<z.ZodUnknown, z.Zod
|
|
|
521
527
|
type: z.ZodEnum<{
|
|
522
528
|
"turn-settled": "turn-settled";
|
|
523
529
|
"phase-shift": "phase-shift";
|
|
530
|
+
"human-message": "human-message";
|
|
524
531
|
}>;
|
|
525
532
|
entryId: z.ZodString;
|
|
526
533
|
runId: z.ZodOptional<z.ZodString>;
|
|
534
|
+
throughEntryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
527
535
|
}, z.core.$strict>>;
|
|
528
536
|
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
529
537
|
}, z.core.$strict>;
|
|
@@ -610,9 +618,11 @@ export declare const ArtifactProvenanceEnvelopeV1: z.ZodPipe<z.ZodUnknown, z.Zod
|
|
|
610
618
|
type: z.ZodEnum<{
|
|
611
619
|
"turn-settled": "turn-settled";
|
|
612
620
|
"phase-shift": "phase-shift";
|
|
621
|
+
"human-message": "human-message";
|
|
613
622
|
}>;
|
|
614
623
|
entryId: z.ZodString;
|
|
615
624
|
runId: z.ZodOptional<z.ZodString>;
|
|
625
|
+
throughEntryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
616
626
|
}, z.core.$strict>>;
|
|
617
627
|
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
618
628
|
}, z.core.$strict>;
|
|
@@ -724,9 +734,11 @@ export declare const ArtifactProvenanceEnvelopeV1: z.ZodPipe<z.ZodUnknown, z.Zod
|
|
|
724
734
|
type: z.ZodEnum<{
|
|
725
735
|
"turn-settled": "turn-settled";
|
|
726
736
|
"phase-shift": "phase-shift";
|
|
737
|
+
"human-message": "human-message";
|
|
727
738
|
}>;
|
|
728
739
|
entryId: z.ZodString;
|
|
729
740
|
runId: z.ZodOptional<z.ZodString>;
|
|
741
|
+
throughEntryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
730
742
|
}, z.core.$strict>>;
|
|
731
743
|
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
732
744
|
}, z.core.$strict>>;
|
|
@@ -893,9 +905,11 @@ export declare const ArtifactProvenanceMutation: z.ZodObject<{
|
|
|
893
905
|
type: z.ZodEnum<{
|
|
894
906
|
"turn-settled": "turn-settled";
|
|
895
907
|
"phase-shift": "phase-shift";
|
|
908
|
+
"human-message": "human-message";
|
|
896
909
|
}>;
|
|
897
910
|
entryId: z.ZodString;
|
|
898
911
|
runId: z.ZodOptional<z.ZodString>;
|
|
912
|
+
throughEntryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
899
913
|
}, z.core.$strict>>;
|
|
900
914
|
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
901
915
|
}, z.core.$strict>;
|
|
@@ -986,9 +1000,11 @@ export declare const ArtifactProvenanceOperation: z.ZodObject<{
|
|
|
986
1000
|
type: z.ZodEnum<{
|
|
987
1001
|
"turn-settled": "turn-settled";
|
|
988
1002
|
"phase-shift": "phase-shift";
|
|
1003
|
+
"human-message": "human-message";
|
|
989
1004
|
}>;
|
|
990
1005
|
entryId: z.ZodString;
|
|
991
1006
|
runId: z.ZodOptional<z.ZodString>;
|
|
1007
|
+
throughEntryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
992
1008
|
}, z.core.$strict>>;
|
|
993
1009
|
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
994
1010
|
}, z.core.$strict>;
|
|
@@ -1124,9 +1140,11 @@ export declare const ArtifactProvenanceSession: z.ZodObject<{
|
|
|
1124
1140
|
type: z.ZodEnum<{
|
|
1125
1141
|
"turn-settled": "turn-settled";
|
|
1126
1142
|
"phase-shift": "phase-shift";
|
|
1143
|
+
"human-message": "human-message";
|
|
1127
1144
|
}>;
|
|
1128
1145
|
entryId: z.ZodString;
|
|
1129
1146
|
runId: z.ZodOptional<z.ZodString>;
|
|
1147
|
+
throughEntryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1130
1148
|
}, z.core.$strict>>;
|
|
1131
1149
|
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
1132
1150
|
}, z.core.$strict>>;
|
|
@@ -1556,6 +1574,93 @@ export declare const CorpusContribution: z.ZodObject<{
|
|
|
1556
1574
|
|
|
1557
1575
|
export declare type CorpusContribution = z.infer<typeof CorpusContribution>;
|
|
1558
1576
|
|
|
1577
|
+
export declare interface CorpusResourceInvocation {
|
|
1578
|
+
readonly eventId: string;
|
|
1579
|
+
/** Envelope recording time, never a run/message/incident identifier. */
|
|
1580
|
+
readonly at: string;
|
|
1581
|
+
readonly kind: CorpusResourceKind;
|
|
1582
|
+
readonly sessionId: string;
|
|
1583
|
+
/** Falls back to sessionId for legacy events without a recorded root. */
|
|
1584
|
+
readonly rootSessionId: string;
|
|
1585
|
+
readonly name: string;
|
|
1586
|
+
readonly sourceId?: string;
|
|
1587
|
+
/** Absent on unresolved legacy rows; names/aliases are not a substitute. */
|
|
1588
|
+
readonly resourceId?: string;
|
|
1589
|
+
readonly version?: string;
|
|
1590
|
+
readonly variantId?: string;
|
|
1591
|
+
readonly rootProvenance: SessionProvenanceRecord;
|
|
1592
|
+
/** Current index hints, not the session's historical context at invocation. */
|
|
1593
|
+
readonly currentContext: {
|
|
1594
|
+
readonly cwd: string;
|
|
1595
|
+
readonly projectId?: string;
|
|
1596
|
+
};
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
/** Exclusive keyset position; preserve timestamp precision when returning it. */
|
|
1600
|
+
export declare const CorpusResourceInvocationCursor: z.ZodObject<{
|
|
1601
|
+
at: z.ZodISODateTime;
|
|
1602
|
+
eventId: z.ZodString;
|
|
1603
|
+
}, z.core.$strict>;
|
|
1604
|
+
|
|
1605
|
+
export declare type CorpusResourceInvocationCursor = z.infer<typeof CorpusResourceInvocationCursor>;
|
|
1606
|
+
|
|
1607
|
+
export declare interface CorpusResourceInvocationExclusion {
|
|
1608
|
+
readonly eventId: string;
|
|
1609
|
+
readonly sessionId: string;
|
|
1610
|
+
readonly rootSessionId: string;
|
|
1611
|
+
readonly reason: "session-missing" | "root-missing" | "root-provenance-unverified" | "root-creator-filtered";
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
export declare type CorpusResourceInvocationPage = {
|
|
1615
|
+
readonly state: "available";
|
|
1616
|
+
readonly items: readonly CorpusResourceInvocation[];
|
|
1617
|
+
/** Absent only when this recording-time window is exhausted. */
|
|
1618
|
+
readonly next?: CorpusResourceInvocationCursor;
|
|
1619
|
+
/** Telemetry import succeeded; exclusions still describe missing or filtered index facts. */
|
|
1620
|
+
readonly coverage: {
|
|
1621
|
+
readonly scanned: number;
|
|
1622
|
+
readonly exclusions: readonly CorpusResourceInvocationExclusion[];
|
|
1623
|
+
};
|
|
1624
|
+
} | {
|
|
1625
|
+
readonly state: "unavailable";
|
|
1626
|
+
readonly reason: "not-wired" | "telemetry-unavailable" | "telemetry-incomplete" | "index-unavailable" | "invalid-record";
|
|
1627
|
+
readonly message: string;
|
|
1628
|
+
};
|
|
1629
|
+
|
|
1630
|
+
/** Half-open recording-time window. Limits bound scanned rows, including exclusions. */
|
|
1631
|
+
export declare const CorpusResourceInvocationQuery: z.ZodObject<{
|
|
1632
|
+
kind: z.ZodEnum<{
|
|
1633
|
+
skill: "skill";
|
|
1634
|
+
"context-file": "context-file";
|
|
1635
|
+
"prompt-command": "prompt-command";
|
|
1636
|
+
}>;
|
|
1637
|
+
since: z.ZodISODateTime;
|
|
1638
|
+
until: z.ZodISODateTime;
|
|
1639
|
+
after: z.ZodOptional<z.ZodObject<{
|
|
1640
|
+
at: z.ZodISODateTime;
|
|
1641
|
+
eventId: z.ZodString;
|
|
1642
|
+
}, z.core.$strict>>;
|
|
1643
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1644
|
+
rootCreatedByKind: z.ZodOptional<z.ZodEnum<{
|
|
1645
|
+
human: "human";
|
|
1646
|
+
agent: "agent";
|
|
1647
|
+
plugin: "plugin";
|
|
1648
|
+
trigger: "trigger";
|
|
1649
|
+
daemon: "daemon";
|
|
1650
|
+
}>>;
|
|
1651
|
+
}, z.core.$strict>;
|
|
1652
|
+
|
|
1653
|
+
export declare type CorpusResourceInvocationQuery = z.infer<typeof CorpusResourceInvocationQuery>;
|
|
1654
|
+
|
|
1655
|
+
/** Roster invocation facts, not evidence that a read completed successfully. */
|
|
1656
|
+
export declare const CorpusResourceKind: z.ZodEnum<{
|
|
1657
|
+
skill: "skill";
|
|
1658
|
+
"context-file": "context-file";
|
|
1659
|
+
"prompt-command": "prompt-command";
|
|
1660
|
+
}>;
|
|
1661
|
+
|
|
1662
|
+
export declare type CorpusResourceKind = z.infer<typeof CorpusResourceKind>;
|
|
1663
|
+
|
|
1559
1664
|
/** Drop repeats under {@link sameClaim}, preserving first-seen order (a sort settles the rest). */
|
|
1560
1665
|
export declare function dedupeClaims(claims: readonly PluginCapabilityClaimV1[]): PluginCapabilityClaimV1[];
|
|
1561
1666
|
|
|
@@ -1829,6 +1934,9 @@ export declare const KAY_APP_DATA_SNAPSHOT_MAX_BYTES: number;
|
|
|
1829
1934
|
*/
|
|
1830
1935
|
export declare const KAY_EVENT_PUBLISHER_ID: "kay";
|
|
1831
1936
|
|
|
1937
|
+
/** Released SDK contracts still implemented by the host, alongside its current SDK. */
|
|
1938
|
+
export declare const KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS: readonly ["0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.9.0"];
|
|
1939
|
+
|
|
1832
1940
|
export declare const KAY_PLUGIN_PROTOCOL_PACKAGE_NAME: "@kay/plugin-protocol";
|
|
1833
1941
|
|
|
1834
1942
|
export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
@@ -1932,7 +2040,7 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
1932
2040
|
* slot: nothing a `^0.8.1`/`^0.8.3` plugin already compiles against changes
|
|
1933
2041
|
* shape, and the fix is which bytes reach npm, not what the contract promises.
|
|
1934
2042
|
*/
|
|
1935
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2043
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.9.1";
|
|
1936
2044
|
|
|
1937
2045
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
1938
2046
|
|
|
@@ -2253,6 +2361,8 @@ export declare interface KayPluginHostCompatibility {
|
|
|
2253
2361
|
readonly protocolVersion: string;
|
|
2254
2362
|
/** The plugin SDK version this host injects, e.g. `KAY_PLUGIN_SDK_VERSION`. */
|
|
2255
2363
|
readonly sdkVersion: string;
|
|
2364
|
+
/** Older SDK releases whose runtime contracts this host still implements; absent means none. */
|
|
2365
|
+
readonly compatibleSdkVersions?: readonly string[];
|
|
2256
2366
|
/** The Kay app version. Advisory only — never a refusal. */
|
|
2257
2367
|
readonly appVersion: string;
|
|
2258
2368
|
/**
|
|
@@ -7348,9 +7458,11 @@ export declare const SessionCausedByEvent: z.ZodObject<{
|
|
|
7348
7458
|
type: z.ZodEnum<{
|
|
7349
7459
|
"turn-settled": "turn-settled";
|
|
7350
7460
|
"phase-shift": "phase-shift";
|
|
7461
|
+
"human-message": "human-message";
|
|
7351
7462
|
}>;
|
|
7352
7463
|
entryId: z.ZodString;
|
|
7353
7464
|
runId: z.ZodOptional<z.ZodString>;
|
|
7465
|
+
throughEntryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7354
7466
|
}, z.core.$strict>>;
|
|
7355
7467
|
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
7356
7468
|
}, z.core.$strict>;
|
|
@@ -7569,9 +7681,11 @@ export declare const SessionProvenanceRecord: z.ZodObject<{
|
|
|
7569
7681
|
type: z.ZodEnum<{
|
|
7570
7682
|
"turn-settled": "turn-settled";
|
|
7571
7683
|
"phase-shift": "phase-shift";
|
|
7684
|
+
"human-message": "human-message";
|
|
7572
7685
|
}>;
|
|
7573
7686
|
entryId: z.ZodString;
|
|
7574
7687
|
runId: z.ZodOptional<z.ZodString>;
|
|
7688
|
+
throughEntryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7575
7689
|
}, z.core.$strict>>;
|
|
7576
7690
|
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
7577
7691
|
}, z.core.$strict>>;
|
package/dist/index.js
CHANGED
|
@@ -115,7 +115,16 @@ import { z as z2 } from "zod";
|
|
|
115
115
|
import { z } from "zod";
|
|
116
116
|
var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
|
|
117
117
|
var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@kay/plugin-protocol";
|
|
118
|
-
var KAY_PLUGIN_SDK_VERSION = "0.
|
|
118
|
+
var KAY_PLUGIN_SDK_VERSION = "0.9.1";
|
|
119
|
+
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
120
|
+
"0.8.0",
|
|
121
|
+
"0.8.1",
|
|
122
|
+
"0.8.2",
|
|
123
|
+
"0.8.3",
|
|
124
|
+
"0.8.4",
|
|
125
|
+
"0.8.5",
|
|
126
|
+
"0.9.0"
|
|
127
|
+
];
|
|
119
128
|
var KAY_PLUGIN_TARGET_NAMES = [
|
|
120
129
|
"kay.agent",
|
|
121
130
|
"kay.app",
|
|
@@ -333,10 +342,12 @@ var SessionCausedByEventShape = z3.strictObject({
|
|
|
333
342
|
/** Required when `kind` is `"session-event"` or absent; must be omitted when `kind` is `"backfill"`. */
|
|
334
343
|
event: z3.strictObject({
|
|
335
344
|
/** {@link KayAppSessionEventType} in `@kay/plugin-sdk`, mirrored: a closed, extensible union. */
|
|
336
|
-
type: z3.enum(["turn-settled", "phase-shift"]),
|
|
345
|
+
type: z3.enum(["turn-settled", "phase-shift", "human-message"]),
|
|
337
346
|
entryId: NonEmptyString2,
|
|
338
347
|
/** The source run captured at the event boundary; absence remains unresolved. */
|
|
339
|
-
runId: NonEmptyString2.optional()
|
|
348
|
+
runId: NonEmptyString2.optional(),
|
|
349
|
+
/** Exact prior persisted boundary for a projected human-message event; null means empty history. */
|
|
350
|
+
throughEntryId: NonEmptyString2.nullable().optional()
|
|
340
351
|
}).optional(),
|
|
341
352
|
/**
|
|
342
353
|
* The plugin-supplied exact-match dedupe key, when it gave one. Absent when the handler chose
|
|
@@ -2106,11 +2117,16 @@ function checkKayPluginHostCompatibility(compatibility, host) {
|
|
|
2106
2117
|
}
|
|
2107
2118
|
return { refusal: void 0, advisories };
|
|
2108
2119
|
}
|
|
2109
|
-
|
|
2120
|
+
const supportedVersions = [
|
|
2121
|
+
host.sdkVersion,
|
|
2122
|
+
...host.compatibleSdkVersions ?? []
|
|
2123
|
+
];
|
|
2124
|
+
const invalidVersion = supportedVersions.find((version) => parseSemver(version) === void 0);
|
|
2125
|
+
if (invalidVersion !== void 0) {
|
|
2110
2126
|
return {
|
|
2111
2127
|
refusal: {
|
|
2112
2128
|
code: "host-sdk-version-invalid",
|
|
2113
|
-
message: `cannot be checked: this Kay reports plugin SDK "${
|
|
2129
|
+
message: `cannot be checked: this Kay reports plugin SDK "${invalidVersion}", which is not valid semver`
|
|
2114
2130
|
},
|
|
2115
2131
|
advisories
|
|
2116
2132
|
};
|
|
@@ -2124,7 +2140,7 @@ function checkKayPluginHostCompatibility(compatibility, host) {
|
|
|
2124
2140
|
advisories
|
|
2125
2141
|
};
|
|
2126
2142
|
}
|
|
2127
|
-
if (satisfiesSemverRange(
|
|
2143
|
+
if (!supportedVersions.some((version) => satisfiesSemverRange(version, range) === true)) {
|
|
2128
2144
|
return {
|
|
2129
2145
|
refusal: {
|
|
2130
2146
|
code: "sdk-range-unsatisfied",
|
|
@@ -4427,15 +4443,37 @@ function sessionHealthPWellDecile(pWell) {
|
|
|
4427
4443
|
return Math.min(9, Math.floor(pWell * 10));
|
|
4428
4444
|
}
|
|
4429
4445
|
|
|
4430
|
-
// packages/plugin-protocol/dist/
|
|
4446
|
+
// packages/plugin-protocol/dist/resource-invocations.js
|
|
4431
4447
|
import { z as z11 } from "zod";
|
|
4448
|
+
var CorpusResourceKind = z11.enum([
|
|
4449
|
+
"skill",
|
|
4450
|
+
"context-file",
|
|
4451
|
+
"prompt-command"
|
|
4452
|
+
]);
|
|
4453
|
+
var CorpusResourceInvocationCursor = z11.strictObject({
|
|
4454
|
+
at: z11.iso.datetime({ offset: true }),
|
|
4455
|
+
eventId: z11.string().min(1)
|
|
4456
|
+
});
|
|
4457
|
+
var CorpusResourceInvocationQuery = z11.strictObject({
|
|
4458
|
+
kind: CorpusResourceKind,
|
|
4459
|
+
since: z11.iso.datetime({ offset: true }),
|
|
4460
|
+
until: z11.iso.datetime({ offset: true }),
|
|
4461
|
+
after: CorpusResourceInvocationCursor.optional(),
|
|
4462
|
+
limit: z11.number().int().min(1).max(1e3).optional(),
|
|
4463
|
+
rootCreatedByKind: z11.enum(AGENT_RUNTIME_SESSION_CREATOR_KINDS).optional()
|
|
4464
|
+
}).refine((value) => Date.parse(value.since) < Date.parse(value.until), {
|
|
4465
|
+
message: "since must precede until"
|
|
4466
|
+
});
|
|
4467
|
+
|
|
4468
|
+
// packages/plugin-protocol/dist/ui-app-package.js
|
|
4469
|
+
import { z as z12 } from "zod";
|
|
4432
4470
|
var KAY_UI_APP_PACKAGE_PROTOCOL = "kay.ui.app-package.v1";
|
|
4433
4471
|
var KAY_UI_BUNDLE_INDEX_PROTOCOL = "kay.ui.bundle-index.v1";
|
|
4434
|
-
var KayUiBundleOutputPath =
|
|
4435
|
-
var KayUiBundleIndexV1 =
|
|
4436
|
-
protocol:
|
|
4472
|
+
var KayUiBundleOutputPath = z12.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" });
|
|
4473
|
+
var KayUiBundleIndexV1 = z12.strictObject({
|
|
4474
|
+
protocol: z12.literal(KAY_UI_BUNDLE_INDEX_PROTOCOL),
|
|
4437
4475
|
entryPath: KayUiBundleOutputPath,
|
|
4438
|
-
files:
|
|
4476
|
+
files: z12.array(z12.strictObject({
|
|
4439
4477
|
path: KayUiBundleOutputPath,
|
|
4440
4478
|
mediaType: NonEmptyString
|
|
4441
4479
|
})).min(1)
|
|
@@ -4462,19 +4500,19 @@ var KayUiBundleIndexV1 = z11.strictObject({
|
|
|
4462
4500
|
function parseKayUiBundleIndexV1(input) {
|
|
4463
4501
|
return KayUiBundleIndexV1.parse(input);
|
|
4464
4502
|
}
|
|
4465
|
-
var KayUiAppPackageFile =
|
|
4503
|
+
var KayUiAppPackageFile = z12.strictObject({
|
|
4466
4504
|
path: PackageAssetPath,
|
|
4467
4505
|
mediaType: NonEmptyString,
|
|
4468
|
-
bytes:
|
|
4506
|
+
bytes: z12.instanceof(Uint8Array).refine((bytes) => bytes.byteLength > 0, {
|
|
4469
4507
|
message: "app package file bytes must not be empty"
|
|
4470
4508
|
})
|
|
4471
4509
|
});
|
|
4472
|
-
var KayUiAppPackageV1 =
|
|
4473
|
-
protocol:
|
|
4510
|
+
var KayUiAppPackageV1 = z12.strictObject({
|
|
4511
|
+
protocol: z12.literal(KAY_UI_APP_PACKAGE_PROTOCOL),
|
|
4474
4512
|
appLocalId: LocalContributionId,
|
|
4475
4513
|
entry: KayUiAppPackageFile,
|
|
4476
|
-
styles:
|
|
4477
|
-
assets:
|
|
4514
|
+
styles: z12.array(KayUiAppPackageFile).optional(),
|
|
4515
|
+
assets: z12.array(KayUiAppPackageFile).optional()
|
|
4478
4516
|
}).superRefine((appPackage, ctx) => {
|
|
4479
4517
|
if (appPackage.entry.mediaType !== "application/javascript") {
|
|
4480
4518
|
ctx.addIssue({
|
|
@@ -4511,16 +4549,16 @@ function parseKayUiAppPackageV1(input) {
|
|
|
4511
4549
|
}
|
|
4512
4550
|
|
|
4513
4551
|
// packages/plugin-protocol/dist/whiteboard.js
|
|
4514
|
-
import { z as
|
|
4552
|
+
import { z as z13 } from "zod";
|
|
4515
4553
|
var WhiteboardValue = JsonValue;
|
|
4516
|
-
var WhiteboardEntryEnvelope =
|
|
4554
|
+
var WhiteboardEntryEnvelope = z13.strictObject({
|
|
4517
4555
|
id: NonEmptyString,
|
|
4518
4556
|
typeId: GlobalContributionId,
|
|
4519
|
-
schemaVersion:
|
|
4520
|
-
title:
|
|
4557
|
+
schemaVersion: z13.number().int().positive(),
|
|
4558
|
+
title: z13.string(),
|
|
4521
4559
|
authorSessionId: NonEmptyString.nullable()
|
|
4522
4560
|
});
|
|
4523
|
-
var WhiteboardEntrySummary =
|
|
4561
|
+
var WhiteboardEntrySummary = z13.strictObject({
|
|
4524
4562
|
name: NonEmptyString,
|
|
4525
4563
|
entry: WhiteboardEntryEnvelope,
|
|
4526
4564
|
revision: NonEmptyString
|
|
@@ -4528,31 +4566,31 @@ var WhiteboardEntrySummary = z12.strictObject({
|
|
|
4528
4566
|
var WhiteboardEntrySnapshot = WhiteboardEntrySummary.extend({
|
|
4529
4567
|
value: WhiteboardValue
|
|
4530
4568
|
});
|
|
4531
|
-
var WhiteboardDiagnostic =
|
|
4569
|
+
var WhiteboardDiagnostic = z13.strictObject({
|
|
4532
4570
|
ruleId: NonEmptyString,
|
|
4533
|
-
severity:
|
|
4571
|
+
severity: z13.enum(["error", "warning"]),
|
|
4534
4572
|
message: NonEmptyString
|
|
4535
4573
|
});
|
|
4536
|
-
var WhiteboardEntryInfo =
|
|
4574
|
+
var WhiteboardEntryInfo = z13.strictObject({
|
|
4537
4575
|
name: NonEmptyString,
|
|
4538
4576
|
revision: NonEmptyString,
|
|
4539
4577
|
entry: WhiteboardEntryEnvelope.optional(),
|
|
4540
|
-
state:
|
|
4541
|
-
mutable:
|
|
4542
|
-
diagnostics:
|
|
4578
|
+
state: z13.enum(["available", "unavailable", "unsupported-version", "invalid"]),
|
|
4579
|
+
mutable: z13.boolean(),
|
|
4580
|
+
diagnostics: z13.array(z13.string())
|
|
4543
4581
|
});
|
|
4544
4582
|
var WhiteboardEntryInspection = WhiteboardEntryInfo.extend({
|
|
4545
4583
|
value: WhiteboardValue.optional(),
|
|
4546
|
-
text:
|
|
4547
|
-
truncated:
|
|
4584
|
+
text: z13.string(),
|
|
4585
|
+
truncated: z13.boolean()
|
|
4548
4586
|
});
|
|
4549
|
-
var WhiteboardTypeInfo =
|
|
4587
|
+
var WhiteboardTypeInfo = z13.strictObject({
|
|
4550
4588
|
typeId: GlobalContributionId,
|
|
4551
4589
|
displayName: NonEmptyString,
|
|
4552
|
-
schemaVersion:
|
|
4553
|
-
available:
|
|
4590
|
+
schemaVersion: z13.number().int().positive(),
|
|
4591
|
+
available: z13.boolean(),
|
|
4554
4592
|
/** A plugin-owned readonly presentation; absent types use the host fallback. */
|
|
4555
|
-
presentation:
|
|
4593
|
+
presentation: z13.strictObject({
|
|
4556
4594
|
app: GlobalContributionId
|
|
4557
4595
|
}).optional()
|
|
4558
4596
|
});
|
|
@@ -4594,6 +4632,9 @@ export {
|
|
|
4594
4632
|
ContextContributorContribution,
|
|
4595
4633
|
ConverterContribution,
|
|
4596
4634
|
CorpusContribution,
|
|
4635
|
+
CorpusResourceInvocationCursor,
|
|
4636
|
+
CorpusResourceInvocationQuery,
|
|
4637
|
+
CorpusResourceKind,
|
|
4597
4638
|
DeviceDelegationContribution,
|
|
4598
4639
|
EndpointContribution,
|
|
4599
4640
|
EndpointGrantRequest,
|
|
@@ -4615,6 +4656,7 @@ export {
|
|
|
4615
4656
|
KAY_APP_DATA_READ_RESULT_MAX_BYTES,
|
|
4616
4657
|
KAY_APP_DATA_SNAPSHOT_MAX_BYTES,
|
|
4617
4658
|
KAY_EVENT_PUBLISHER_ID,
|
|
4659
|
+
KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS,
|
|
4618
4660
|
KAY_PLUGIN_PROTOCOL_PACKAGE_NAME,
|
|
4619
4661
|
KAY_PLUGIN_PROTOCOL_VERSION,
|
|
4620
4662
|
KAY_PLUGIN_SDK_VERSION,
|