@yaklabs-ai/plugin-protocol 0.9.0 → 0.10.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 +162 -2
- package/dist/index.js +96 -36
- 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
|
|
|
@@ -1830,7 +1935,7 @@ export declare const KAY_APP_DATA_SNAPSHOT_MAX_BYTES: number;
|
|
|
1830
1935
|
export declare const KAY_EVENT_PUBLISHER_ID: "kay";
|
|
1831
1936
|
|
|
1832
1937
|
/** Released SDK contracts still implemented by the host, alongside its current SDK. */
|
|
1833
|
-
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"];
|
|
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", "0.9.1"];
|
|
1834
1939
|
|
|
1835
1940
|
export declare const KAY_PLUGIN_PROTOCOL_PACKAGE_NAME: "@kay/plugin-protocol";
|
|
1836
1941
|
|
|
@@ -1934,8 +2039,30 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
1934
2039
|
* EXISTING apis; the type contract does not change. It still takes the patch
|
|
1935
2040
|
* slot: nothing a `^0.8.1`/`^0.8.3` plugin already compiles against changes
|
|
1936
2041
|
* shape, and the fix is which bytes reach npm, not what the contract promises.
|
|
2042
|
+
*
|
|
2043
|
+
* 0.9.0 adds timer_cancelled and requires workflow descriptions and summary
|
|
2044
|
+
* returns. This is an authoring-type break only: the host retains the 0.8
|
|
2045
|
+
* runtime contracts.
|
|
2046
|
+
*
|
|
2047
|
+
* 0.9.1 adds bounded corpus invocation reads (`app.corpus.listResourceInvocations`).
|
|
2048
|
+
* Existing received APIs are unchanged, so this is additive only.
|
|
2049
|
+
*
|
|
2050
|
+
* 0.10.0 removes the `spawn-session` variant from `KayAppAutomationEffectInput`
|
|
2051
|
+
* (and its daemon-facing mirror, `KayAutomationEffectInput`): an agent or
|
|
2052
|
+
* plugin can no longer create a spawn-session automation binding (owner
|
|
2053
|
+
* ruling, 2026-09-28) — durable recurring agent work is a plugin workflow
|
|
2054
|
+
* (`app.workflows.define` + `ctx.runAgent`) or a direct `session/run`. A
|
|
2055
|
+
* binding created before this version, or by daemon-internal code, still
|
|
2056
|
+
* stores and reads the effect fine (`KayAppAutomationEffect` keeps it); only
|
|
2057
|
+
* the create-time input type is narrower. Mostly an authoring-type break —
|
|
2058
|
+
* 0.9.0 and 0.9.1 stay in the runtime-contract retention list below, so a
|
|
2059
|
+
* plugin still running bytecode compiled against either keeps loading and
|
|
2060
|
+
* working — except for the one call this ruling actually closes:
|
|
2061
|
+
* `app.automations.create` with a `spawn-session` effect now throws
|
|
2062
|
+
* explicitly at the call site instead of being accepted, for any plugin
|
|
2063
|
+
* regardless of its declared SDK range.
|
|
1937
2064
|
*/
|
|
1938
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2065
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.10.0";
|
|
1939
2066
|
|
|
1940
2067
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
1941
2068
|
|
|
@@ -3457,6 +3584,9 @@ export declare function parseSemver(value: string): ParsedSemver | undefined;
|
|
|
3457
3584
|
/** Every capability slug {@link PluginCapabilityClaimV1} can express, for exhaustive table checks. */
|
|
3458
3585
|
export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "filesystem.read", "filesystem.write", "process.spawn", "corpus.read", "signals.read", "workspace.command", "sessions.create", "sessions.update", "models.complete", "jev.use", "automations.write", "automations.run", "workflows.define", "session-events.subscribe", "agents.run", "dynamic-context.register", "app-data.register", "account.assert", "account.update", "agents.permissions", "tool-interception.register", "config.declare-section", "auth.own-service", "auth.shared-identity", "cli.bind", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove"];
|
|
3459
3586
|
|
|
3587
|
+
/** The root `<svg>` attribute a tile icon declares itself with. */
|
|
3588
|
+
export declare const PLUGIN_ICON_SHAPE_ATTRIBUTE = "data-icon-shape";
|
|
3589
|
+
|
|
3460
3590
|
/** Rule-body keys the host stamps, so a manifest's `rule` may not carry them. */
|
|
3461
3591
|
export declare const PLUGIN_NOTIFICATION_RULE_HOST_KEYS: readonly ["id", "match", "sender"];
|
|
3462
3592
|
|
|
@@ -4807,6 +4937,29 @@ export declare const PluginEventDefinitionContribution: z.ZodObject<{
|
|
|
4807
4937
|
|
|
4808
4938
|
export declare type PluginEventDefinitionContribution = z.infer<typeof PluginEventDefinitionContribution>;
|
|
4809
4939
|
|
|
4940
|
+
/**
|
|
4941
|
+
* How a plugin icon asks to be drawn.
|
|
4942
|
+
*
|
|
4943
|
+
* - `"mark"` (the default): a logo or glyph on a transparent field. The host frames it, inset
|
|
4944
|
+
* on a white tile, so marks of every shape and color read at one size.
|
|
4945
|
+
* - `"tile"`: a tile icon, artwork that is already a complete tile (its own background, edge to
|
|
4946
|
+
* edge). The host draws it full-bleed in its tile's shape, with no white field, border, or
|
|
4947
|
+
* inset.
|
|
4948
|
+
*
|
|
4949
|
+
* The icon declares this itself with `data-icon-shape="tile"` on its root `<svg>` element, so
|
|
4950
|
+
* any plugin (first- or third-party) opts in the same way and a host keeps no list of which
|
|
4951
|
+
* plugins do. It lives in the markup, not the manifest: the manifest is a strict schema, and a
|
|
4952
|
+
* new field there would make every older host reject the plugin.
|
|
4953
|
+
*/
|
|
4954
|
+
export declare type PluginIconShape = "mark" | "tile";
|
|
4955
|
+
|
|
4956
|
+
/**
|
|
4957
|
+
* Read a plugin icon's declared {@link PluginIconShape}. Only the ROOT element's attribute
|
|
4958
|
+
* counts (a nested `<svg>`, a comment, or text never turns a mark into a tile); anything
|
|
4959
|
+
* undeclared or unparseable is a `"mark"`.
|
|
4960
|
+
*/
|
|
4961
|
+
export declare function pluginIconShape(svg: string): PluginIconShape;
|
|
4962
|
+
|
|
4810
4963
|
export declare const PluginId: z.ZodString;
|
|
4811
4964
|
|
|
4812
4965
|
export declare type PluginId = z.infer<typeof PluginId>;
|
|
@@ -7353,9 +7506,11 @@ export declare const SessionCausedByEvent: z.ZodObject<{
|
|
|
7353
7506
|
type: z.ZodEnum<{
|
|
7354
7507
|
"turn-settled": "turn-settled";
|
|
7355
7508
|
"phase-shift": "phase-shift";
|
|
7509
|
+
"human-message": "human-message";
|
|
7356
7510
|
}>;
|
|
7357
7511
|
entryId: z.ZodString;
|
|
7358
7512
|
runId: z.ZodOptional<z.ZodString>;
|
|
7513
|
+
throughEntryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7359
7514
|
}, z.core.$strict>>;
|
|
7360
7515
|
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
7361
7516
|
}, z.core.$strict>;
|
|
@@ -7574,9 +7729,11 @@ export declare const SessionProvenanceRecord: z.ZodObject<{
|
|
|
7574
7729
|
type: z.ZodEnum<{
|
|
7575
7730
|
"turn-settled": "turn-settled";
|
|
7576
7731
|
"phase-shift": "phase-shift";
|
|
7732
|
+
"human-message": "human-message";
|
|
7577
7733
|
}>;
|
|
7578
7734
|
entryId: z.ZodString;
|
|
7579
7735
|
runId: z.ZodOptional<z.ZodString>;
|
|
7736
|
+
throughEntryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7580
7737
|
}, z.core.$strict>>;
|
|
7581
7738
|
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
7582
7739
|
}, z.core.$strict>>;
|
|
@@ -7668,6 +7825,9 @@ export declare const StorageGrantRequest: z.ZodObject<{
|
|
|
7668
7825
|
|
|
7669
7826
|
export declare type StorageGrantRequest = z.infer<typeof StorageGrantRequest>;
|
|
7670
7827
|
|
|
7828
|
+
/** Markup that opens an SVG document: the prolog, then the root `<svg` start tag. */
|
|
7829
|
+
export declare const SVG_DOCUMENT_START: RegExp;
|
|
7830
|
+
|
|
7671
7831
|
export declare const TargetEntrypoint: z.ZodObject<{
|
|
7672
7832
|
module: z.ZodString;
|
|
7673
7833
|
export: z.ZodOptional<z.ZodString>;
|
package/dist/index.js
CHANGED
|
@@ -115,14 +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.10.0";
|
|
119
119
|
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
120
120
|
"0.8.0",
|
|
121
121
|
"0.8.1",
|
|
122
122
|
"0.8.2",
|
|
123
123
|
"0.8.3",
|
|
124
124
|
"0.8.4",
|
|
125
|
-
"0.8.5"
|
|
125
|
+
"0.8.5",
|
|
126
|
+
"0.9.0",
|
|
127
|
+
"0.9.1"
|
|
126
128
|
];
|
|
127
129
|
var KAY_PLUGIN_TARGET_NAMES = [
|
|
128
130
|
"kay.agent",
|
|
@@ -341,10 +343,12 @@ var SessionCausedByEventShape = z3.strictObject({
|
|
|
341
343
|
/** Required when `kind` is `"session-event"` or absent; must be omitted when `kind` is `"backfill"`. */
|
|
342
344
|
event: z3.strictObject({
|
|
343
345
|
/** {@link KayAppSessionEventType} in `@kay/plugin-sdk`, mirrored: a closed, extensible union. */
|
|
344
|
-
type: z3.enum(["turn-settled", "phase-shift"]),
|
|
346
|
+
type: z3.enum(["turn-settled", "phase-shift", "human-message"]),
|
|
345
347
|
entryId: NonEmptyString2,
|
|
346
348
|
/** The source run captured at the event boundary; absence remains unresolved. */
|
|
347
|
-
runId: NonEmptyString2.optional()
|
|
349
|
+
runId: NonEmptyString2.optional(),
|
|
350
|
+
/** Exact prior persisted boundary for a projected human-message event; null means empty history. */
|
|
351
|
+
throughEntryId: NonEmptyString2.nullable().optional()
|
|
348
352
|
}).optional(),
|
|
349
353
|
/**
|
|
350
354
|
* The plugin-supplied exact-match dedupe key, when it gave one. Absent when the handler chose
|
|
@@ -2664,6 +2668,24 @@ var PluginContributionKind = z7.enum([
|
|
|
2664
2668
|
"configSection"
|
|
2665
2669
|
]);
|
|
2666
2670
|
|
|
2671
|
+
// packages/plugin-protocol/dist/icon-shape.js
|
|
2672
|
+
var SVG_PROLOG = String.raw`^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[\s\S]*?-->\s*)*(?:<!DOCTYPE[^>]*>\s*)?`;
|
|
2673
|
+
var SVG_DOCUMENT_START = new RegExp(`${SVG_PROLOG}<svg[\\s>]`, "iu");
|
|
2674
|
+
var SVG_ROOT_START_TAG = new RegExp(`${SVG_PROLOG}<svg((?:\\s+[^\\s=>/]+(?:\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s"'>]+))?)*)\\s*/?>`, "iu");
|
|
2675
|
+
var ATTRIBUTE = /([^\s=>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/gu;
|
|
2676
|
+
var PLUGIN_ICON_SHAPE_ATTRIBUTE = "data-icon-shape";
|
|
2677
|
+
function pluginIconShape(svg) {
|
|
2678
|
+
const attributes = SVG_ROOT_START_TAG.exec(svg)?.[1];
|
|
2679
|
+
if (attributes === void 0)
|
|
2680
|
+
return "mark";
|
|
2681
|
+
for (const [, name, double, single, bare] of attributes.matchAll(ATTRIBUTE)) {
|
|
2682
|
+
if (name === PLUGIN_ICON_SHAPE_ATTRIBUTE) {
|
|
2683
|
+
return (double ?? single ?? bare) === "tile" ? "tile" : "mark";
|
|
2684
|
+
}
|
|
2685
|
+
}
|
|
2686
|
+
return "mark";
|
|
2687
|
+
}
|
|
2688
|
+
|
|
2667
2689
|
// packages/plugin-protocol/dist/ids.js
|
|
2668
2690
|
function resolvePluginNamespace(pluginId, namespace) {
|
|
2669
2691
|
return namespace ?? pluginId;
|
|
@@ -3030,10 +3052,20 @@ var KayPluginManifestV1 = z8.strictObject({
|
|
|
3030
3052
|
*/
|
|
3031
3053
|
description: NonEmptyString,
|
|
3032
3054
|
// Display icons resolved relative to the package root and traversal-guarded
|
|
3033
|
-
// by `PackageAssetPath`.
|
|
3034
|
-
//
|
|
3035
|
-
//
|
|
3036
|
-
//
|
|
3055
|
+
// by `PackageAssetPath`. This is a *raster/asset* icon — distinct from the
|
|
3056
|
+
// *symbolic* `UiCommandContribution.icon` (an icon-set name), see LEXICON
|
|
3057
|
+
// `icon`. By default the host treats the SVG as a mark and frames it, inset
|
|
3058
|
+
// on a white tile. An SVG whose artwork is already a complete tile (its own
|
|
3059
|
+
// background, edge to edge) says so with `data-icon-shape="tile"` on its
|
|
3060
|
+
// root `<svg>` element, and the host then draws it full-bleed in its tile
|
|
3061
|
+
// shape (LEXICON `tile icon`; `pluginIconShape` in `./icon-shape.ts`). The
|
|
3062
|
+
// signal lives in the asset, not here, so older hosts keep parsing the
|
|
3063
|
+
// manifest.
|
|
3064
|
+
//
|
|
3065
|
+
// `iconDark` is accepted and containment-checked, but no host reads or
|
|
3066
|
+
// renders it today. The supported dark variant lives inside `icon` itself:
|
|
3067
|
+
// an internal `@media (prefers-color-scheme: dark)` rule, which follows the
|
|
3068
|
+
// app theme (docs/directory-plugins.md).
|
|
3037
3069
|
icon: PackageAssetPath.optional(),
|
|
3038
3070
|
iconDark: PackageAssetPath.optional(),
|
|
3039
3071
|
namespace: PluginNamespace.optional(),
|
|
@@ -4440,15 +4472,37 @@ function sessionHealthPWellDecile(pWell) {
|
|
|
4440
4472
|
return Math.min(9, Math.floor(pWell * 10));
|
|
4441
4473
|
}
|
|
4442
4474
|
|
|
4443
|
-
// packages/plugin-protocol/dist/
|
|
4475
|
+
// packages/plugin-protocol/dist/resource-invocations.js
|
|
4444
4476
|
import { z as z11 } from "zod";
|
|
4477
|
+
var CorpusResourceKind = z11.enum([
|
|
4478
|
+
"skill",
|
|
4479
|
+
"context-file",
|
|
4480
|
+
"prompt-command"
|
|
4481
|
+
]);
|
|
4482
|
+
var CorpusResourceInvocationCursor = z11.strictObject({
|
|
4483
|
+
at: z11.iso.datetime({ offset: true }),
|
|
4484
|
+
eventId: z11.string().min(1)
|
|
4485
|
+
});
|
|
4486
|
+
var CorpusResourceInvocationQuery = z11.strictObject({
|
|
4487
|
+
kind: CorpusResourceKind,
|
|
4488
|
+
since: z11.iso.datetime({ offset: true }),
|
|
4489
|
+
until: z11.iso.datetime({ offset: true }),
|
|
4490
|
+
after: CorpusResourceInvocationCursor.optional(),
|
|
4491
|
+
limit: z11.number().int().min(1).max(1e3).optional(),
|
|
4492
|
+
rootCreatedByKind: z11.enum(AGENT_RUNTIME_SESSION_CREATOR_KINDS).optional()
|
|
4493
|
+
}).refine((value) => Date.parse(value.since) < Date.parse(value.until), {
|
|
4494
|
+
message: "since must precede until"
|
|
4495
|
+
});
|
|
4496
|
+
|
|
4497
|
+
// packages/plugin-protocol/dist/ui-app-package.js
|
|
4498
|
+
import { z as z12 } from "zod";
|
|
4445
4499
|
var KAY_UI_APP_PACKAGE_PROTOCOL = "kay.ui.app-package.v1";
|
|
4446
4500
|
var KAY_UI_BUNDLE_INDEX_PROTOCOL = "kay.ui.bundle-index.v1";
|
|
4447
|
-
var KayUiBundleOutputPath =
|
|
4448
|
-
var KayUiBundleIndexV1 =
|
|
4449
|
-
protocol:
|
|
4501
|
+
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" });
|
|
4502
|
+
var KayUiBundleIndexV1 = z12.strictObject({
|
|
4503
|
+
protocol: z12.literal(KAY_UI_BUNDLE_INDEX_PROTOCOL),
|
|
4450
4504
|
entryPath: KayUiBundleOutputPath,
|
|
4451
|
-
files:
|
|
4505
|
+
files: z12.array(z12.strictObject({
|
|
4452
4506
|
path: KayUiBundleOutputPath,
|
|
4453
4507
|
mediaType: NonEmptyString
|
|
4454
4508
|
})).min(1)
|
|
@@ -4475,19 +4529,19 @@ var KayUiBundleIndexV1 = z11.strictObject({
|
|
|
4475
4529
|
function parseKayUiBundleIndexV1(input) {
|
|
4476
4530
|
return KayUiBundleIndexV1.parse(input);
|
|
4477
4531
|
}
|
|
4478
|
-
var KayUiAppPackageFile =
|
|
4532
|
+
var KayUiAppPackageFile = z12.strictObject({
|
|
4479
4533
|
path: PackageAssetPath,
|
|
4480
4534
|
mediaType: NonEmptyString,
|
|
4481
|
-
bytes:
|
|
4535
|
+
bytes: z12.instanceof(Uint8Array).refine((bytes) => bytes.byteLength > 0, {
|
|
4482
4536
|
message: "app package file bytes must not be empty"
|
|
4483
4537
|
})
|
|
4484
4538
|
});
|
|
4485
|
-
var KayUiAppPackageV1 =
|
|
4486
|
-
protocol:
|
|
4539
|
+
var KayUiAppPackageV1 = z12.strictObject({
|
|
4540
|
+
protocol: z12.literal(KAY_UI_APP_PACKAGE_PROTOCOL),
|
|
4487
4541
|
appLocalId: LocalContributionId,
|
|
4488
4542
|
entry: KayUiAppPackageFile,
|
|
4489
|
-
styles:
|
|
4490
|
-
assets:
|
|
4543
|
+
styles: z12.array(KayUiAppPackageFile).optional(),
|
|
4544
|
+
assets: z12.array(KayUiAppPackageFile).optional()
|
|
4491
4545
|
}).superRefine((appPackage, ctx) => {
|
|
4492
4546
|
if (appPackage.entry.mediaType !== "application/javascript") {
|
|
4493
4547
|
ctx.addIssue({
|
|
@@ -4524,16 +4578,16 @@ function parseKayUiAppPackageV1(input) {
|
|
|
4524
4578
|
}
|
|
4525
4579
|
|
|
4526
4580
|
// packages/plugin-protocol/dist/whiteboard.js
|
|
4527
|
-
import { z as
|
|
4581
|
+
import { z as z13 } from "zod";
|
|
4528
4582
|
var WhiteboardValue = JsonValue;
|
|
4529
|
-
var WhiteboardEntryEnvelope =
|
|
4583
|
+
var WhiteboardEntryEnvelope = z13.strictObject({
|
|
4530
4584
|
id: NonEmptyString,
|
|
4531
4585
|
typeId: GlobalContributionId,
|
|
4532
|
-
schemaVersion:
|
|
4533
|
-
title:
|
|
4586
|
+
schemaVersion: z13.number().int().positive(),
|
|
4587
|
+
title: z13.string(),
|
|
4534
4588
|
authorSessionId: NonEmptyString.nullable()
|
|
4535
4589
|
});
|
|
4536
|
-
var WhiteboardEntrySummary =
|
|
4590
|
+
var WhiteboardEntrySummary = z13.strictObject({
|
|
4537
4591
|
name: NonEmptyString,
|
|
4538
4592
|
entry: WhiteboardEntryEnvelope,
|
|
4539
4593
|
revision: NonEmptyString
|
|
@@ -4541,31 +4595,31 @@ var WhiteboardEntrySummary = z12.strictObject({
|
|
|
4541
4595
|
var WhiteboardEntrySnapshot = WhiteboardEntrySummary.extend({
|
|
4542
4596
|
value: WhiteboardValue
|
|
4543
4597
|
});
|
|
4544
|
-
var WhiteboardDiagnostic =
|
|
4598
|
+
var WhiteboardDiagnostic = z13.strictObject({
|
|
4545
4599
|
ruleId: NonEmptyString,
|
|
4546
|
-
severity:
|
|
4600
|
+
severity: z13.enum(["error", "warning"]),
|
|
4547
4601
|
message: NonEmptyString
|
|
4548
4602
|
});
|
|
4549
|
-
var WhiteboardEntryInfo =
|
|
4603
|
+
var WhiteboardEntryInfo = z13.strictObject({
|
|
4550
4604
|
name: NonEmptyString,
|
|
4551
4605
|
revision: NonEmptyString,
|
|
4552
4606
|
entry: WhiteboardEntryEnvelope.optional(),
|
|
4553
|
-
state:
|
|
4554
|
-
mutable:
|
|
4555
|
-
diagnostics:
|
|
4607
|
+
state: z13.enum(["available", "unavailable", "unsupported-version", "invalid"]),
|
|
4608
|
+
mutable: z13.boolean(),
|
|
4609
|
+
diagnostics: z13.array(z13.string())
|
|
4556
4610
|
});
|
|
4557
4611
|
var WhiteboardEntryInspection = WhiteboardEntryInfo.extend({
|
|
4558
4612
|
value: WhiteboardValue.optional(),
|
|
4559
|
-
text:
|
|
4560
|
-
truncated:
|
|
4613
|
+
text: z13.string(),
|
|
4614
|
+
truncated: z13.boolean()
|
|
4561
4615
|
});
|
|
4562
|
-
var WhiteboardTypeInfo =
|
|
4616
|
+
var WhiteboardTypeInfo = z13.strictObject({
|
|
4563
4617
|
typeId: GlobalContributionId,
|
|
4564
4618
|
displayName: NonEmptyString,
|
|
4565
|
-
schemaVersion:
|
|
4566
|
-
available:
|
|
4619
|
+
schemaVersion: z13.number().int().positive(),
|
|
4620
|
+
available: z13.boolean(),
|
|
4567
4621
|
/** A plugin-owned readonly presentation; absent types use the host fallback. */
|
|
4568
|
-
presentation:
|
|
4622
|
+
presentation: z13.strictObject({
|
|
4569
4623
|
app: GlobalContributionId
|
|
4570
4624
|
}).optional()
|
|
4571
4625
|
});
|
|
@@ -4607,6 +4661,9 @@ export {
|
|
|
4607
4661
|
ContextContributorContribution,
|
|
4608
4662
|
ConverterContribution,
|
|
4609
4663
|
CorpusContribution,
|
|
4664
|
+
CorpusResourceInvocationCursor,
|
|
4665
|
+
CorpusResourceInvocationQuery,
|
|
4666
|
+
CorpusResourceKind,
|
|
4610
4667
|
DeviceDelegationContribution,
|
|
4611
4668
|
EndpointContribution,
|
|
4612
4669
|
EndpointGrantRequest,
|
|
@@ -4657,6 +4714,7 @@ export {
|
|
|
4657
4714
|
MimeTypeString,
|
|
4658
4715
|
NonEmptyString,
|
|
4659
4716
|
PLUGIN_CAPABILITY_SLUGS,
|
|
4717
|
+
PLUGIN_ICON_SHAPE_ATTRIBUTE,
|
|
4660
4718
|
PLUGIN_NOTIFICATION_RULE_HOST_KEYS,
|
|
4661
4719
|
PackageAssetPath,
|
|
4662
4720
|
PluginAgentDefinitionPermissionRule,
|
|
@@ -4728,6 +4786,7 @@ export {
|
|
|
4728
4786
|
SESSION_HEALTH_CUSTOM_TYPE,
|
|
4729
4787
|
SESSION_HEALTH_ENTRY_NAME,
|
|
4730
4788
|
SESSION_HEALTH_EXTENSION_ID,
|
|
4789
|
+
SVG_DOCUMENT_START,
|
|
4731
4790
|
ScopeAlternative,
|
|
4732
4791
|
ScopeNeed,
|
|
4733
4792
|
ScopeRequirement,
|
|
@@ -4796,6 +4855,7 @@ export {
|
|
|
4796
4855
|
parseKayUiBundleIndexV1,
|
|
4797
4856
|
parseResolvedPluginContractV1,
|
|
4798
4857
|
parseSemver,
|
|
4858
|
+
pluginIconShape,
|
|
4799
4859
|
precedingPersonMessages,
|
|
4800
4860
|
refineWebSessionScopeConfined,
|
|
4801
4861
|
resolveAdapterId,
|
package/package.json
CHANGED