@yaklabs-ai/plugin-protocol 0.11.0 → 0.12.3
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 -7
- package/dist/index.d.ts +190 -10
- package/dist/index.js +60 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"package": "@yaklabs-ai/plugin-protocol",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.3",
|
|
5
5
|
"target": "npm",
|
|
6
6
|
"firstPartyLicense": "MIT",
|
|
7
7
|
"bundled": [],
|
|
@@ -12,12 +12,6 @@
|
|
|
12
12
|
"source": "https://github.com/colinhacks/zod",
|
|
13
13
|
"note": "Installed as a consumer dependency; it is not bundled into the staged artifacts.",
|
|
14
14
|
"versionRange": "^4.0.0"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"name": "@typesafe-ai/sdk",
|
|
18
|
-
"license": "MIT",
|
|
19
|
-
"source": "https://github.com/typesafe-ai/typesafe-sdk-js",
|
|
20
|
-
"note": "Types-only: the SDK re-exports the vendor's Jev client types, and the vendor's nominal class must stay a single declaration across entrypoints. Installed as a consumer dependency; a plugin never declares it itself."
|
|
21
15
|
}
|
|
22
16
|
]
|
|
23
17
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -263,6 +263,7 @@ export declare const ArtifactProvenanceCaptureContextSchema: z.ZodObject<{
|
|
|
263
263
|
"turn-settled": "turn-settled";
|
|
264
264
|
"phase-shift": "phase-shift";
|
|
265
265
|
"human-message": "human-message";
|
|
266
|
+
"ui-action": "ui-action";
|
|
266
267
|
}>;
|
|
267
268
|
entryId: z.ZodString;
|
|
268
269
|
runId: z.ZodOptional<z.ZodString>;
|
|
@@ -355,6 +356,7 @@ export declare const ArtifactProvenanceCaptureContextSchema: z.ZodObject<{
|
|
|
355
356
|
"turn-settled": "turn-settled";
|
|
356
357
|
"phase-shift": "phase-shift";
|
|
357
358
|
"human-message": "human-message";
|
|
359
|
+
"ui-action": "ui-action";
|
|
358
360
|
}>;
|
|
359
361
|
entryId: z.ZodString;
|
|
360
362
|
runId: z.ZodOptional<z.ZodString>;
|
|
@@ -451,6 +453,7 @@ export declare const ArtifactProvenanceCause: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
451
453
|
"turn-settled": "turn-settled";
|
|
452
454
|
"phase-shift": "phase-shift";
|
|
453
455
|
"human-message": "human-message";
|
|
456
|
+
"ui-action": "ui-action";
|
|
454
457
|
}>;
|
|
455
458
|
entryId: z.ZodString;
|
|
456
459
|
runId: z.ZodOptional<z.ZodString>;
|
|
@@ -528,6 +531,7 @@ export declare const ArtifactProvenanceEnvelopeV1: z.ZodPipe<z.ZodUnknown, z.Zod
|
|
|
528
531
|
"turn-settled": "turn-settled";
|
|
529
532
|
"phase-shift": "phase-shift";
|
|
530
533
|
"human-message": "human-message";
|
|
534
|
+
"ui-action": "ui-action";
|
|
531
535
|
}>;
|
|
532
536
|
entryId: z.ZodString;
|
|
533
537
|
runId: z.ZodOptional<z.ZodString>;
|
|
@@ -619,6 +623,7 @@ export declare const ArtifactProvenanceEnvelopeV1: z.ZodPipe<z.ZodUnknown, z.Zod
|
|
|
619
623
|
"turn-settled": "turn-settled";
|
|
620
624
|
"phase-shift": "phase-shift";
|
|
621
625
|
"human-message": "human-message";
|
|
626
|
+
"ui-action": "ui-action";
|
|
622
627
|
}>;
|
|
623
628
|
entryId: z.ZodString;
|
|
624
629
|
runId: z.ZodOptional<z.ZodString>;
|
|
@@ -735,6 +740,7 @@ export declare const ArtifactProvenanceEnvelopeV1: z.ZodPipe<z.ZodUnknown, z.Zod
|
|
|
735
740
|
"turn-settled": "turn-settled";
|
|
736
741
|
"phase-shift": "phase-shift";
|
|
737
742
|
"human-message": "human-message";
|
|
743
|
+
"ui-action": "ui-action";
|
|
738
744
|
}>;
|
|
739
745
|
entryId: z.ZodString;
|
|
740
746
|
runId: z.ZodOptional<z.ZodString>;
|
|
@@ -906,6 +912,7 @@ export declare const ArtifactProvenanceMutation: z.ZodObject<{
|
|
|
906
912
|
"turn-settled": "turn-settled";
|
|
907
913
|
"phase-shift": "phase-shift";
|
|
908
914
|
"human-message": "human-message";
|
|
915
|
+
"ui-action": "ui-action";
|
|
909
916
|
}>;
|
|
910
917
|
entryId: z.ZodString;
|
|
911
918
|
runId: z.ZodOptional<z.ZodString>;
|
|
@@ -1001,6 +1008,7 @@ export declare const ArtifactProvenanceOperation: z.ZodObject<{
|
|
|
1001
1008
|
"turn-settled": "turn-settled";
|
|
1002
1009
|
"phase-shift": "phase-shift";
|
|
1003
1010
|
"human-message": "human-message";
|
|
1011
|
+
"ui-action": "ui-action";
|
|
1004
1012
|
}>;
|
|
1005
1013
|
entryId: z.ZodString;
|
|
1006
1014
|
runId: z.ZodOptional<z.ZodString>;
|
|
@@ -1141,6 +1149,7 @@ export declare const ArtifactProvenanceSession: z.ZodObject<{
|
|
|
1141
1149
|
"turn-settled": "turn-settled";
|
|
1142
1150
|
"phase-shift": "phase-shift";
|
|
1143
1151
|
"human-message": "human-message";
|
|
1152
|
+
"ui-action": "ui-action";
|
|
1144
1153
|
}>;
|
|
1145
1154
|
entryId: z.ZodString;
|
|
1146
1155
|
runId: z.ZodOptional<z.ZodString>;
|
|
@@ -1869,6 +1878,23 @@ export declare const HttpsUrl: z.ZodURL;
|
|
|
1869
1878
|
|
|
1870
1879
|
export declare type HttpsUrl = z.infer<typeof HttpsUrl>;
|
|
1871
1880
|
|
|
1881
|
+
/**
|
|
1882
|
+
* An Interaction driver (a backend behind the harness-owned `interaction_*` tools) the plugin's
|
|
1883
|
+
* `kay.agent` entrypoint registers with `api.registerInteractionDriver`. The driver's `id` must be
|
|
1884
|
+
* this `localId`; `kind` says whether it drives web pages ("browser", Browser Interaction) or
|
|
1885
|
+
* native apps ("computer-use", Computer Use Interaction).
|
|
1886
|
+
*/
|
|
1887
|
+
export declare const InteractionDriverContribution: z.ZodObject<{
|
|
1888
|
+
localId: z.ZodString;
|
|
1889
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
1890
|
+
kind: z.ZodEnum<{
|
|
1891
|
+
browser: "browser";
|
|
1892
|
+
"computer-use": "computer-use";
|
|
1893
|
+
}>;
|
|
1894
|
+
}, z.core.$strict>;
|
|
1895
|
+
|
|
1896
|
+
export declare type InteractionDriverContribution = z.infer<typeof InteractionDriverContribution>;
|
|
1897
|
+
|
|
1872
1898
|
/** Whether the report permits the plugin to load. */
|
|
1873
1899
|
export declare function isCompatible(report: KayPluginCompatibilityReport): boolean;
|
|
1874
1900
|
|
|
@@ -1935,7 +1961,7 @@ export declare const KAY_APP_DATA_SNAPSHOT_MAX_BYTES: number;
|
|
|
1935
1961
|
export declare const KAY_EVENT_PUBLISHER_ID: "kay";
|
|
1936
1962
|
|
|
1937
1963
|
/** 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", "0.9.1", "0.10.0"];
|
|
1964
|
+
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", "0.10.0", "0.11.0", "0.11.1", "0.12.0", "0.12.1", "0.12.2"];
|
|
1939
1965
|
|
|
1940
1966
|
export declare const KAY_PLUGIN_PROTOCOL_PACKAGE_NAME: "@kay/plugin-protocol";
|
|
1941
1967
|
|
|
@@ -2069,8 +2095,64 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2069
2095
|
* new list, and an exhaustive switch over gap codes must handle the new one.
|
|
2070
2096
|
* 0.10.0 stays in the runtime-contract retention list below, because a plugin
|
|
2071
2097
|
* compiled against it reads the same run detail and simply ignores the list.
|
|
2098
|
+
*
|
|
2099
|
+
* 0.11.1 adds read-only skill metadata (`app.skills`: `list`, `read`, `history`),
|
|
2100
|
+
* checked per call against the new `skills.read` claim. Additive: a plugin
|
|
2101
|
+
* compiled against 0.11.0 never reads the member. A plugin that calls it
|
|
2102
|
+
* declares `^0.11.1`, so an older host refuses it at load instead of the call
|
|
2103
|
+
* failing.
|
|
2104
|
+
*
|
|
2105
|
+
* 0.12.0 replaces the vendor client `api.withJev` hands its callback. `use`
|
|
2106
|
+
* now receives Kay's own `JevClient` (`@kay/plugin-sdk/jev`): one method,
|
|
2107
|
+
* `classify({state, questions})`, in Kay's question and answer vocabulary
|
|
2108
|
+
* (yes/no is `bool` answering `probability`; instructions and criteria are
|
|
2109
|
+
* text; the state is a JSON object), rejecting with a classified
|
|
2110
|
+
* `JevCallError`. TypeSafe's `TypeSafeClient`, `SystemOneRequest`,
|
|
2111
|
+
* `SystemOneResult`, `Questions`, and the `NoulResponse`/`ChoiceResponse`/
|
|
2112
|
+
* `ScoreResponse` re-exports are gone, and the SDK no longer depends on
|
|
2113
|
+
* `@typesafe-ai/sdk`. `app.signals.observe` takes the same questions, answers
|
|
2114
|
+
* `invalid` for a state that is not a JSON object, and its reads type stored
|
|
2115
|
+
* answers as `KayAppSignalAnswer` (a `JevAnswer`, or a yes/no answer recorded
|
|
2116
|
+
* before 0.12.0 as `{type: "noul", noul}`).
|
|
2117
|
+
*
|
|
2118
|
+
* A clean break with no shim, and deliberately NOT a load refusal: every
|
|
2119
|
+
* earlier release stays in the retention list below. `withJev`'s contract was
|
|
2120
|
+
* always that `use` may fail and the fallback then runs, so a plugin compiled
|
|
2121
|
+
* against 0.11 that calls `jev.systemOne` throws inside `use` and runs its
|
|
2122
|
+
* fallback on this host. This fallback guarantee does not cover `signals.observe`:
|
|
2123
|
+
* old text/array states now return `invalid`; old object states with `noul`
|
|
2124
|
+
* questions can classify but receive `bool` answers, so reading `.noul` yields
|
|
2125
|
+
* undefined. Stored pre-0.12 answers retain `noul`. Retention allows activation,
|
|
2126
|
+
* not vocabulary compatibility: old plugins must migrate both surfaces.
|
|
2127
|
+
*
|
|
2128
|
+
* 0.12.1 adds `app.time` (`KayAppTime`): `snapshot()` returns the daemon's clock and the time
|
|
2129
|
+
* zone the user is in, as `{ nowMs, zone, zoneSource }`, where `zoneSource: "utc-fallback"` marks a
|
|
2130
|
+
* zone the host does not know. The member is always present and ungated, like `app.paths`.
|
|
2131
|
+
* Additive: a plugin compiled against 0.12.0 never reads it. A plugin that calls it declares
|
|
2132
|
+
* `^0.12.1`, so an older host refuses a directory or repository plugin at load instead of the
|
|
2133
|
+
* call failing. That check needs a host that knows its own version, and it never runs for a
|
|
2134
|
+
* bundled plugin, which ships with the SDK it calls.
|
|
2135
|
+
*
|
|
2136
|
+
* 0.12.2 adds the `ui-action` session event (`KayAppUiActionSessionEvent`), a fourth member of the
|
|
2137
|
+
* `KayAppSessionEvent` union: the daemon publishes it once per accepted answer to a card the agent
|
|
2138
|
+
* drew with `ui_render` (pressing Send on a drafted message, submitting a form), carrying the
|
|
2139
|
+
* projected entry's id and the answered call's id and no payload. A typed message still publishes
|
|
2140
|
+
* only `human-message`. Additive: a plugin compiled against 0.12.1 never subscribes to it, and
|
|
2141
|
+
* code that narrows the union by `type` meets one more member, as it must for any future one. A
|
|
2142
|
+
* plugin that subscribes to it declares `^0.12.2`, so an older host refuses a directory or
|
|
2143
|
+
* repository plugin at load instead of the subscription never firing. That check never runs for a
|
|
2144
|
+
* bundled plugin, which ships with the SDK it calls.
|
|
2145
|
+
*
|
|
2146
|
+
* 0.12.3 adds the `page` reference open kind (`{ kind: "page", pageId }` on a
|
|
2147
|
+
* `referencePresentations` entry), and lets a presentation name a `kay.app` URI module as well as a
|
|
2148
|
+
* `kay.agent` one. A plugin's own `scheme://` references then pill with its icon and the module's
|
|
2149
|
+
* `describe` title, and a click opens the plugin's own registered page with the reference URI as
|
|
2150
|
+
* the page's `objectId`. Additive: a `^0.12.2` plugin keeps loading. The value is new schema, so an
|
|
2151
|
+
* older host refuses the whole manifest at parse (`manifest-schema-invalid`), before any range
|
|
2152
|
+
* check runs. A plugin that declares it still declares `^0.12.3`, so the install-time version
|
|
2153
|
+
* checks name the mismatch instead of a schema error.
|
|
2072
2154
|
*/
|
|
2073
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2155
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.12.3";
|
|
2074
2156
|
|
|
2075
2157
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2076
2158
|
|
|
@@ -2163,6 +2245,14 @@ export declare const KayAgentTargetManifest: z.ZodObject<{
|
|
|
2163
2245
|
displayName: z.ZodOptional<z.ZodString>;
|
|
2164
2246
|
schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2165
2247
|
}, z.core.$strict>>>;
|
|
2248
|
+
interactionDrivers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2249
|
+
localId: z.ZodString;
|
|
2250
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
2251
|
+
kind: z.ZodEnum<{
|
|
2252
|
+
browser: "browser";
|
|
2253
|
+
"computer-use": "computer-use";
|
|
2254
|
+
}>;
|
|
2255
|
+
}, z.core.$strict>>>;
|
|
2166
2256
|
entityResolvers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2167
2257
|
localId: z.ZodString;
|
|
2168
2258
|
displayName: z.ZodOptional<z.ZodString>;
|
|
@@ -2503,6 +2593,14 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
2503
2593
|
displayName: z.ZodOptional<z.ZodString>;
|
|
2504
2594
|
schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2505
2595
|
}, z.core.$strict>>>;
|
|
2596
|
+
interactionDrivers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2597
|
+
localId: z.ZodString;
|
|
2598
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
2599
|
+
kind: z.ZodEnum<{
|
|
2600
|
+
browser: "browser";
|
|
2601
|
+
"computer-use": "computer-use";
|
|
2602
|
+
}>;
|
|
2603
|
+
}, z.core.$strict>>>;
|
|
2506
2604
|
entityResolvers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2507
2605
|
localId: z.ZodString;
|
|
2508
2606
|
displayName: z.ZodOptional<z.ZodString>;
|
|
@@ -2725,6 +2823,9 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
2725
2823
|
kind: z.ZodLiteral<"working-document">;
|
|
2726
2824
|
}, z.core.$strict>, z.ZodObject<{
|
|
2727
2825
|
kind: z.ZodLiteral<"browser-pane">;
|
|
2826
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2827
|
+
kind: z.ZodLiteral<"page">;
|
|
2828
|
+
pageId: z.ZodString;
|
|
2728
2829
|
}, z.core.$strict>], "kind">;
|
|
2729
2830
|
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2730
2831
|
resourceKind: z.ZodString;
|
|
@@ -2767,12 +2868,12 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
2767
2868
|
capabilities: z.ZodOptional<z.ZodObject<{
|
|
2768
2869
|
endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2769
2870
|
host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
2871
|
+
"skills.read": "skills.read";
|
|
2770
2872
|
"automations.run": "automations.run";
|
|
2771
2873
|
"navigation.open-session": "navigation.open-session";
|
|
2772
2874
|
"cost.read": "cost.read";
|
|
2773
2875
|
"billing.read": "billing.read";
|
|
2774
2876
|
"context.read": "context.read";
|
|
2775
|
-
"skills.read": "skills.read";
|
|
2776
2877
|
"memory.read": "memory.read";
|
|
2777
2878
|
"usage.read": "usage.read";
|
|
2778
2879
|
"self-improvement.read": "self-improvement.read";
|
|
@@ -3203,12 +3304,12 @@ export declare const KayPluginProtocolVersion: z.ZodLiteral<"kay.plugin.v1">;
|
|
|
3203
3304
|
export declare type KayPluginProtocolVersion = z.infer<typeof KayPluginProtocolVersion>;
|
|
3204
3305
|
|
|
3205
3306
|
export declare const KayUiAppHostCapability: z.ZodEnum<{
|
|
3307
|
+
"skills.read": "skills.read";
|
|
3206
3308
|
"automations.run": "automations.run";
|
|
3207
3309
|
"navigation.open-session": "navigation.open-session";
|
|
3208
3310
|
"cost.read": "cost.read";
|
|
3209
3311
|
"billing.read": "billing.read";
|
|
3210
3312
|
"context.read": "context.read";
|
|
3211
|
-
"skills.read": "skills.read";
|
|
3212
3313
|
"memory.read": "memory.read";
|
|
3213
3314
|
"usage.read": "usage.read";
|
|
3214
3315
|
"self-improvement.read": "self-improvement.read";
|
|
@@ -3307,6 +3408,9 @@ export declare const KayUiTargetManifest: z.ZodObject<{
|
|
|
3307
3408
|
kind: z.ZodLiteral<"working-document">;
|
|
3308
3409
|
}, z.core.$strict>, z.ZodObject<{
|
|
3309
3410
|
kind: z.ZodLiteral<"browser-pane">;
|
|
3411
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
3412
|
+
kind: z.ZodLiteral<"page">;
|
|
3413
|
+
pageId: z.ZodString;
|
|
3310
3414
|
}, z.core.$strict>], "kind">;
|
|
3311
3415
|
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3312
3416
|
resourceKind: z.ZodString;
|
|
@@ -3349,12 +3453,12 @@ export declare const KayUiTargetManifest: z.ZodObject<{
|
|
|
3349
3453
|
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3350
3454
|
endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3351
3455
|
host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3456
|
+
"skills.read": "skills.read";
|
|
3352
3457
|
"automations.run": "automations.run";
|
|
3353
3458
|
"navigation.open-session": "navigation.open-session";
|
|
3354
3459
|
"cost.read": "cost.read";
|
|
3355
3460
|
"billing.read": "billing.read";
|
|
3356
3461
|
"context.read": "context.read";
|
|
3357
|
-
"skills.read": "skills.read";
|
|
3358
3462
|
"memory.read": "memory.read";
|
|
3359
3463
|
"usage.read": "usage.read";
|
|
3360
3464
|
"self-improvement.read": "self-improvement.read";
|
|
@@ -3590,7 +3694,7 @@ export declare function parseResolvedPluginContractV1(value: unknown): ResolvedP
|
|
|
3590
3694
|
export declare function parseSemver(value: string): ParsedSemver | undefined;
|
|
3591
3695
|
|
|
3592
3696
|
/** Every capability slug {@link PluginCapabilityClaimV1} can express, for exhaustive table checks. */
|
|
3593
|
-
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"];
|
|
3697
|
+
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", "skills.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", "interaction.surface", "config.declare-section", "auth.own-service", "auth.shared-identity", "cli.bind", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove"];
|
|
3594
3698
|
|
|
3595
3699
|
/** The root `<svg>` attribute a tile icon declares itself with. */
|
|
3596
3700
|
export declare const PLUGIN_ICON_SHAPE_ATTRIBUTE = "data-icon-shape";
|
|
@@ -4026,6 +4130,10 @@ export declare const PluginCapabilityClaimV1: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
4026
4130
|
target: z.ZodLiteral<"kay.app">;
|
|
4027
4131
|
slug: z.ZodLiteral<"signals.read">;
|
|
4028
4132
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4133
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
4134
|
+
target: z.ZodLiteral<"kay.app">;
|
|
4135
|
+
slug: z.ZodLiteral<"skills.read">;
|
|
4136
|
+
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4029
4137
|
}, z.core.$strict>, z.ZodObject<{
|
|
4030
4138
|
target: z.ZodLiteral<"kay.app">;
|
|
4031
4139
|
slug: z.ZodLiteral<"workspace.command">;
|
|
@@ -4130,6 +4238,15 @@ export declare const PluginCapabilityClaimV1: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
4130
4238
|
target: z.ZodLiteral<"kay.agent">;
|
|
4131
4239
|
slug: z.ZodLiteral<"tool-interception.register">;
|
|
4132
4240
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4241
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
4242
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
4243
|
+
slug: z.ZodLiteral<"interaction.surface">;
|
|
4244
|
+
envelope: z.ZodObject<{
|
|
4245
|
+
surface: z.ZodEnum<{
|
|
4246
|
+
"browser-pane": "browser-pane";
|
|
4247
|
+
desktop: "desktop";
|
|
4248
|
+
}>;
|
|
4249
|
+
}, z.core.$strict>;
|
|
4133
4250
|
}, z.core.$strict>, z.ZodObject<{
|
|
4134
4251
|
target: z.ZodLiteral<"plugin">;
|
|
4135
4252
|
slug: z.ZodLiteral<"config.declare-section">;
|
|
@@ -4233,6 +4350,10 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
4233
4350
|
target: z.ZodLiteral<"kay.app">;
|
|
4234
4351
|
slug: z.ZodLiteral<"signals.read">;
|
|
4235
4352
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4353
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
4354
|
+
target: z.ZodLiteral<"kay.app">;
|
|
4355
|
+
slug: z.ZodLiteral<"skills.read">;
|
|
4356
|
+
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4236
4357
|
}, z.core.$strict>, z.ZodObject<{
|
|
4237
4358
|
target: z.ZodLiteral<"kay.app">;
|
|
4238
4359
|
slug: z.ZodLiteral<"workspace.command">;
|
|
@@ -4337,6 +4458,15 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
4337
4458
|
target: z.ZodLiteral<"kay.agent">;
|
|
4338
4459
|
slug: z.ZodLiteral<"tool-interception.register">;
|
|
4339
4460
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4461
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
4462
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
4463
|
+
slug: z.ZodLiteral<"interaction.surface">;
|
|
4464
|
+
envelope: z.ZodObject<{
|
|
4465
|
+
surface: z.ZodEnum<{
|
|
4466
|
+
"browser-pane": "browser-pane";
|
|
4467
|
+
desktop: "desktop";
|
|
4468
|
+
}>;
|
|
4469
|
+
}, z.core.$strict>;
|
|
4340
4470
|
}, z.core.$strict>, z.ZodObject<{
|
|
4341
4471
|
target: z.ZodLiteral<"plugin">;
|
|
4342
4472
|
slug: z.ZodLiteral<"config.declare-section">;
|
|
@@ -4435,6 +4565,10 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
4435
4565
|
target: z.ZodLiteral<"kay.app">;
|
|
4436
4566
|
slug: z.ZodLiteral<"signals.read">;
|
|
4437
4567
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4568
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
4569
|
+
target: z.ZodLiteral<"kay.app">;
|
|
4570
|
+
slug: z.ZodLiteral<"skills.read">;
|
|
4571
|
+
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4438
4572
|
}, z.core.$strict>, z.ZodObject<{
|
|
4439
4573
|
target: z.ZodLiteral<"kay.app">;
|
|
4440
4574
|
slug: z.ZodLiteral<"workspace.command">;
|
|
@@ -4539,6 +4673,15 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
4539
4673
|
target: z.ZodLiteral<"kay.agent">;
|
|
4540
4674
|
slug: z.ZodLiteral<"tool-interception.register">;
|
|
4541
4675
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4676
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
4677
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
4678
|
+
slug: z.ZodLiteral<"interaction.surface">;
|
|
4679
|
+
envelope: z.ZodObject<{
|
|
4680
|
+
surface: z.ZodEnum<{
|
|
4681
|
+
"browser-pane": "browser-pane";
|
|
4682
|
+
desktop: "desktop";
|
|
4683
|
+
}>;
|
|
4684
|
+
}, z.core.$strict>;
|
|
4542
4685
|
}, z.core.$strict>, z.ZodObject<{
|
|
4543
4686
|
target: z.ZodLiteral<"plugin">;
|
|
4544
4687
|
slug: z.ZodLiteral<"config.declare-section">;
|
|
@@ -4700,6 +4843,10 @@ export declare const PluginCapabilityRefusalV1: z.ZodObject<{
|
|
|
4700
4843
|
target: z.ZodLiteral<"kay.app">;
|
|
4701
4844
|
slug: z.ZodLiteral<"signals.read">;
|
|
4702
4845
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4846
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
4847
|
+
target: z.ZodLiteral<"kay.app">;
|
|
4848
|
+
slug: z.ZodLiteral<"skills.read">;
|
|
4849
|
+
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4703
4850
|
}, z.core.$strict>, z.ZodObject<{
|
|
4704
4851
|
target: z.ZodLiteral<"kay.app">;
|
|
4705
4852
|
slug: z.ZodLiteral<"workspace.command">;
|
|
@@ -4804,6 +4951,15 @@ export declare const PluginCapabilityRefusalV1: z.ZodObject<{
|
|
|
4804
4951
|
target: z.ZodLiteral<"kay.agent">;
|
|
4805
4952
|
slug: z.ZodLiteral<"tool-interception.register">;
|
|
4806
4953
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4954
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
4955
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
4956
|
+
slug: z.ZodLiteral<"interaction.surface">;
|
|
4957
|
+
envelope: z.ZodObject<{
|
|
4958
|
+
surface: z.ZodEnum<{
|
|
4959
|
+
"browser-pane": "browser-pane";
|
|
4960
|
+
desktop: "desktop";
|
|
4961
|
+
}>;
|
|
4962
|
+
}, z.core.$strict>;
|
|
4807
4963
|
}, z.core.$strict>, z.ZodObject<{
|
|
4808
4964
|
target: z.ZodLiteral<"plugin">;
|
|
4809
4965
|
slug: z.ZodLiteral<"config.declare-section">;
|
|
@@ -4922,6 +5078,7 @@ export declare const PluginContributionKind: z.ZodEnum<{
|
|
|
4922
5078
|
artifactUriModule: "artifactUriModule";
|
|
4923
5079
|
cliBinding: "cliBinding";
|
|
4924
5080
|
searchProvider: "searchProvider";
|
|
5081
|
+
interactionDriver: "interactionDriver";
|
|
4925
5082
|
entityResolver: "entityResolver";
|
|
4926
5083
|
agentRenderer: "agentRenderer";
|
|
4927
5084
|
eventDefinition: "eventDefinition";
|
|
@@ -5505,6 +5662,9 @@ export declare const ReferenceOpenBehavior: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
5505
5662
|
kind: z.ZodLiteral<"working-document">;
|
|
5506
5663
|
}, z.core.$strict>, z.ZodObject<{
|
|
5507
5664
|
kind: z.ZodLiteral<"browser-pane">;
|
|
5665
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
5666
|
+
kind: z.ZodLiteral<"page">;
|
|
5667
|
+
pageId: z.ZodString;
|
|
5508
5668
|
}, z.core.$strict>], "kind">;
|
|
5509
5669
|
|
|
5510
5670
|
export declare type ReferenceOpenBehavior = z.infer<typeof ReferenceOpenBehavior>;
|
|
@@ -5517,6 +5677,9 @@ export declare const ReferencePresentationContribution: z.ZodObject<{
|
|
|
5517
5677
|
kind: z.ZodLiteral<"working-document">;
|
|
5518
5678
|
}, z.core.$strict>, z.ZodObject<{
|
|
5519
5679
|
kind: z.ZodLiteral<"browser-pane">;
|
|
5680
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
5681
|
+
kind: z.ZodLiteral<"page">;
|
|
5682
|
+
pageId: z.ZodString;
|
|
5520
5683
|
}, z.core.$strict>], "kind">;
|
|
5521
5684
|
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
5522
5685
|
resourceKind: z.ZodString;
|
|
@@ -5899,12 +6062,12 @@ export declare const ResolvedKayUiApp: z.ZodObject<{
|
|
|
5899
6062
|
globalId: z.ZodString;
|
|
5900
6063
|
}, z.core.$strict>>>;
|
|
5901
6064
|
host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
6065
|
+
"skills.read": "skills.read";
|
|
5902
6066
|
"automations.run": "automations.run";
|
|
5903
6067
|
"navigation.open-session": "navigation.open-session";
|
|
5904
6068
|
"cost.read": "cost.read";
|
|
5905
6069
|
"billing.read": "billing.read";
|
|
5906
6070
|
"context.read": "context.read";
|
|
5907
|
-
"skills.read": "skills.read";
|
|
5908
6071
|
"memory.read": "memory.read";
|
|
5909
6072
|
"usage.read": "usage.read";
|
|
5910
6073
|
"self-improvement.read": "self-improvement.read";
|
|
@@ -6185,6 +6348,7 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
6185
6348
|
artifactUriModule: "artifactUriModule";
|
|
6186
6349
|
cliBinding: "cliBinding";
|
|
6187
6350
|
searchProvider: "searchProvider";
|
|
6351
|
+
interactionDriver: "interactionDriver";
|
|
6188
6352
|
entityResolver: "entityResolver";
|
|
6189
6353
|
agentRenderer: "agentRenderer";
|
|
6190
6354
|
eventDefinition: "eventDefinition";
|
|
@@ -6707,6 +6871,9 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
6707
6871
|
kind: z.ZodLiteral<"working-document">;
|
|
6708
6872
|
}, z.core.$strict>, z.ZodObject<{
|
|
6709
6873
|
kind: z.ZodLiteral<"browser-pane">;
|
|
6874
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
6875
|
+
kind: z.ZodLiteral<"page">;
|
|
6876
|
+
pageId: z.ZodString;
|
|
6710
6877
|
}, z.core.$strict>], "kind">;
|
|
6711
6878
|
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
6712
6879
|
resourceKind: z.ZodString;
|
|
@@ -6748,12 +6915,12 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
6748
6915
|
globalId: z.ZodString;
|
|
6749
6916
|
}, z.core.$strict>>>;
|
|
6750
6917
|
host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
6918
|
+
"skills.read": "skills.read";
|
|
6751
6919
|
"automations.run": "automations.run";
|
|
6752
6920
|
"navigation.open-session": "navigation.open-session";
|
|
6753
6921
|
"cost.read": "cost.read";
|
|
6754
6922
|
"billing.read": "billing.read";
|
|
6755
6923
|
"context.read": "context.read";
|
|
6756
|
-
"skills.read": "skills.read";
|
|
6757
6924
|
"memory.read": "memory.read";
|
|
6758
6925
|
"usage.read": "usage.read";
|
|
6759
6926
|
"self-improvement.read": "self-improvement.read";
|
|
@@ -6789,6 +6956,7 @@ export declare const ResolvedPluginContributionId: z.ZodObject<{
|
|
|
6789
6956
|
artifactUriModule: "artifactUriModule";
|
|
6790
6957
|
cliBinding: "cliBinding";
|
|
6791
6958
|
searchProvider: "searchProvider";
|
|
6959
|
+
interactionDriver: "interactionDriver";
|
|
6792
6960
|
entityResolver: "entityResolver";
|
|
6793
6961
|
agentRenderer: "agentRenderer";
|
|
6794
6962
|
eventDefinition: "eventDefinition";
|
|
@@ -7139,6 +7307,9 @@ export declare const ResolvedReferencePresentation: z.ZodObject<{
|
|
|
7139
7307
|
kind: z.ZodLiteral<"working-document">;
|
|
7140
7308
|
}, z.core.$strict>, z.ZodObject<{
|
|
7141
7309
|
kind: z.ZodLiteral<"browser-pane">;
|
|
7310
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
7311
|
+
kind: z.ZodLiteral<"page">;
|
|
7312
|
+
pageId: z.ZodString;
|
|
7142
7313
|
}, z.core.$strict>], "kind">;
|
|
7143
7314
|
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
7144
7315
|
resourceKind: z.ZodString;
|
|
@@ -7524,6 +7695,7 @@ export declare const SessionCausedByEvent: z.ZodObject<{
|
|
|
7524
7695
|
"turn-settled": "turn-settled";
|
|
7525
7696
|
"phase-shift": "phase-shift";
|
|
7526
7697
|
"human-message": "human-message";
|
|
7698
|
+
"ui-action": "ui-action";
|
|
7527
7699
|
}>;
|
|
7528
7700
|
entryId: z.ZodString;
|
|
7529
7701
|
runId: z.ZodOptional<z.ZodString>;
|
|
@@ -7747,6 +7919,7 @@ export declare const SessionProvenanceRecord: z.ZodObject<{
|
|
|
7747
7919
|
"turn-settled": "turn-settled";
|
|
7748
7920
|
"phase-shift": "phase-shift";
|
|
7749
7921
|
"human-message": "human-message";
|
|
7922
|
+
"ui-action": "ui-action";
|
|
7750
7923
|
}>;
|
|
7751
7924
|
entryId: z.ZodString;
|
|
7752
7925
|
runId: z.ZodOptional<z.ZodString>;
|
|
@@ -8089,6 +8262,13 @@ export declare type TurnMessageOrigin =
|
|
|
8089
8262
|
/** Neither the session nor the message establishes human authorship. */
|
|
8090
8263
|
| "unknown";
|
|
8091
8264
|
|
|
8265
|
+
/**
|
|
8266
|
+
* Who wrote one message, read from what the transcript carries: `clientIntentId` AND
|
|
8267
|
+
* `details.deliveryId` mean a person typed it. The one definition the turn packet and every other
|
|
8268
|
+
* reader of a message's authorship share.
|
|
8269
|
+
*/
|
|
8270
|
+
export declare function turnMessageOrigin(entry: Pick<TurnPacketEntry, "message">): TurnMessageOrigin;
|
|
8271
|
+
|
|
8092
8272
|
export declare interface TurnPacket {
|
|
8093
8273
|
/** The message that opened the turn. */
|
|
8094
8274
|
readonly personMessage: TurnPacketMessage;
|
|
@@ -8149,12 +8329,12 @@ export declare interface TurnPacketMessage {
|
|
|
8149
8329
|
export declare const UiAppCapabilities: z.ZodObject<{
|
|
8150
8330
|
endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8151
8331
|
host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
8332
|
+
"skills.read": "skills.read";
|
|
8152
8333
|
"automations.run": "automations.run";
|
|
8153
8334
|
"navigation.open-session": "navigation.open-session";
|
|
8154
8335
|
"cost.read": "cost.read";
|
|
8155
8336
|
"billing.read": "billing.read";
|
|
8156
8337
|
"context.read": "context.read";
|
|
8157
|
-
"skills.read": "skills.read";
|
|
8158
8338
|
"memory.read": "memory.read";
|
|
8159
8339
|
"usage.read": "usage.read";
|
|
8160
8340
|
"self-improvement.read": "self-improvement.read";
|
|
@@ -8185,12 +8365,12 @@ export declare const UiAppContribution: z.ZodObject<{
|
|
|
8185
8365
|
capabilities: z.ZodOptional<z.ZodObject<{
|
|
8186
8366
|
endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8187
8367
|
host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
8368
|
+
"skills.read": "skills.read";
|
|
8188
8369
|
"automations.run": "automations.run";
|
|
8189
8370
|
"navigation.open-session": "navigation.open-session";
|
|
8190
8371
|
"cost.read": "cost.read";
|
|
8191
8372
|
"billing.read": "billing.read";
|
|
8192
8373
|
"context.read": "context.read";
|
|
8193
|
-
"skills.read": "skills.read";
|
|
8194
8374
|
"memory.read": "memory.read";
|
|
8195
8375
|
"usage.read": "usage.read";
|
|
8196
8376
|
"self-improvement.read": "self-improvement.read";
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ function textOf(entry) {
|
|
|
30
30
|
return "";
|
|
31
31
|
return content.map((part) => typeof part === "object" && part !== null && part.type === "text" && typeof part.text === "string" ? part.text : "").join("");
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function turnMessageOrigin(entry) {
|
|
34
34
|
const m = entry.message;
|
|
35
35
|
if (m === void 0 || typeof m.clientIntentId !== "string")
|
|
36
36
|
return "unknown";
|
|
@@ -71,7 +71,7 @@ function turnPacket(entries, settleEntryId, options = {}) {
|
|
|
71
71
|
entryId: entry.id,
|
|
72
72
|
timestamp: entry.timestamp,
|
|
73
73
|
text: textOf(entry),
|
|
74
|
-
origin:
|
|
74
|
+
origin: turnMessageOrigin(entry)
|
|
75
75
|
});
|
|
76
76
|
return {
|
|
77
77
|
personMessage: toPacket(opener),
|
|
@@ -96,7 +96,7 @@ function precedingPersonMessages(entries, packet, count) {
|
|
|
96
96
|
continue;
|
|
97
97
|
if (e.type !== "message" || e.message?.role !== "user")
|
|
98
98
|
continue;
|
|
99
|
-
if (
|
|
99
|
+
if (turnMessageOrigin(e) !== "human-verified")
|
|
100
100
|
continue;
|
|
101
101
|
found.push({
|
|
102
102
|
entryId: e.id,
|
|
@@ -115,7 +115,7 @@ 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.12.3";
|
|
119
119
|
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
120
120
|
"0.8.0",
|
|
121
121
|
"0.8.1",
|
|
@@ -125,7 +125,12 @@ var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
|
125
125
|
"0.8.5",
|
|
126
126
|
"0.9.0",
|
|
127
127
|
"0.9.1",
|
|
128
|
-
"0.10.0"
|
|
128
|
+
"0.10.0",
|
|
129
|
+
"0.11.0",
|
|
130
|
+
"0.11.1",
|
|
131
|
+
"0.12.0",
|
|
132
|
+
"0.12.1",
|
|
133
|
+
"0.12.2"
|
|
129
134
|
];
|
|
130
135
|
var KAY_PLUGIN_TARGET_NAMES = [
|
|
131
136
|
"kay.agent",
|
|
@@ -344,7 +349,12 @@ var SessionCausedByEventShape = z3.strictObject({
|
|
|
344
349
|
/** Required when `kind` is `"session-event"` or absent; must be omitted when `kind` is `"backfill"`. */
|
|
345
350
|
event: z3.strictObject({
|
|
346
351
|
/** {@link KayAppSessionEventType} in `@kay/plugin-sdk`, mirrored: a closed, extensible union. */
|
|
347
|
-
type: z3.enum([
|
|
352
|
+
type: z3.enum([
|
|
353
|
+
"turn-settled",
|
|
354
|
+
"phase-shift",
|
|
355
|
+
"human-message",
|
|
356
|
+
"ui-action"
|
|
357
|
+
]),
|
|
348
358
|
entryId: NonEmptyString2,
|
|
349
359
|
/** The source run captured at the event boundary; absence remains unresolved. */
|
|
350
360
|
runId: NonEmptyString2.optional(),
|
|
@@ -1516,6 +1526,14 @@ var PluginCapabilityClaimV1 = z6.discriminatedUnion("slug", [
|
|
|
1516
1526
|
slug: z6.literal("signals.read"),
|
|
1517
1527
|
envelope: z6.strictObject({})
|
|
1518
1528
|
}),
|
|
1529
|
+
z6.strictObject({
|
|
1530
|
+
// Read-only metadata about every managed skill: identity, versions, history, suggestions.
|
|
1531
|
+
// Never a skill's bytes (an agent reads those through `skill://`) and never a write. An
|
|
1532
|
+
// empty envelope because the grant itself is the visibility decision, as with `signals.read`.
|
|
1533
|
+
target: z6.literal("kay.app"),
|
|
1534
|
+
slug: z6.literal("skills.read"),
|
|
1535
|
+
envelope: z6.strictObject({})
|
|
1536
|
+
}),
|
|
1519
1537
|
z6.strictObject({
|
|
1520
1538
|
target: z6.literal("kay.app"),
|
|
1521
1539
|
slug: z6.literal("workspace.command"),
|
|
@@ -1614,6 +1632,12 @@ var PluginCapabilityClaimV1 = z6.discriminatedUnion("slug", [
|
|
|
1614
1632
|
slug: z6.literal("tool-interception.register"),
|
|
1615
1633
|
envelope: z6.strictObject({})
|
|
1616
1634
|
}),
|
|
1635
|
+
z6.strictObject({
|
|
1636
|
+
target: z6.literal("kay.agent"),
|
|
1637
|
+
slug: z6.literal("interaction.surface"),
|
|
1638
|
+
/** The one Kay-shipped interaction surface this plugin may drive; one claim per surface. */
|
|
1639
|
+
envelope: z6.strictObject({ surface: z6.enum(["browser-pane", "desktop"]) })
|
|
1640
|
+
}),
|
|
1617
1641
|
z6.strictObject({
|
|
1618
1642
|
target: z6.literal("plugin"),
|
|
1619
1643
|
slug: z6.literal("config.declare-section"),
|
|
@@ -1650,6 +1674,7 @@ var PLUGIN_CAPABILITY_SLUGS = [
|
|
|
1650
1674
|
"process.spawn",
|
|
1651
1675
|
"corpus.read",
|
|
1652
1676
|
"signals.read",
|
|
1677
|
+
"skills.read",
|
|
1653
1678
|
"workspace.command",
|
|
1654
1679
|
"sessions.create",
|
|
1655
1680
|
"sessions.update",
|
|
@@ -1666,6 +1691,7 @@ var PLUGIN_CAPABILITY_SLUGS = [
|
|
|
1666
1691
|
"account.update",
|
|
1667
1692
|
"agents.permissions",
|
|
1668
1693
|
"tool-interception.register",
|
|
1694
|
+
"interaction.surface",
|
|
1669
1695
|
"config.declare-section",
|
|
1670
1696
|
"auth.own-service",
|
|
1671
1697
|
"auth.shared-identity",
|
|
@@ -1754,6 +1780,7 @@ function sameClaim(a, b) {
|
|
|
1754
1780
|
case "sessions.update":
|
|
1755
1781
|
case "corpus.read":
|
|
1756
1782
|
case "signals.read":
|
|
1783
|
+
case "skills.read":
|
|
1757
1784
|
case "workspace.command":
|
|
1758
1785
|
case "models.complete":
|
|
1759
1786
|
case "jev.use":
|
|
@@ -1776,6 +1803,8 @@ function sameClaim(a, b) {
|
|
|
1776
1803
|
return (b.slug === "filesystem.read" || b.slug === "filesystem.write") && a.envelope.root === b.envelope.root;
|
|
1777
1804
|
case "process.spawn":
|
|
1778
1805
|
return b.slug === "process.spawn" && a.envelope.command === b.envelope.command && a.envelope.argvClass === b.envelope.argvClass;
|
|
1806
|
+
case "interaction.surface":
|
|
1807
|
+
return b.slug === "interaction.surface" && a.envelope.surface === b.envelope.surface;
|
|
1779
1808
|
case "dynamic-context.register":
|
|
1780
1809
|
return b.slug === "dynamic-context.register" && a.envelope.contributor === b.envelope.contributor;
|
|
1781
1810
|
case "app-data.register":
|
|
@@ -1818,6 +1847,7 @@ function envelopePairs(a, b) {
|
|
|
1818
1847
|
case "sessions.update":
|
|
1819
1848
|
case "corpus.read":
|
|
1820
1849
|
case "signals.read":
|
|
1850
|
+
case "skills.read":
|
|
1821
1851
|
case "workspace.command":
|
|
1822
1852
|
case "models.complete":
|
|
1823
1853
|
case "jev.use":
|
|
@@ -1846,6 +1876,8 @@ function envelopePairs(a, b) {
|
|
|
1846
1876
|
[a.envelope.command, b.envelope.command],
|
|
1847
1877
|
[a.envelope.argvClass, b.envelope.argvClass]
|
|
1848
1878
|
] : [];
|
|
1879
|
+
case "interaction.surface":
|
|
1880
|
+
return b.slug === "interaction.surface" ? [[a.envelope.surface, b.envelope.surface]] : [];
|
|
1849
1881
|
case "dynamic-context.register":
|
|
1850
1882
|
return b.slug === "dynamic-context.register" ? [[a.envelope.contributor, b.envelope.contributor]] : [];
|
|
1851
1883
|
case "app-data.register":
|
|
@@ -2387,6 +2419,11 @@ var SearchProviderContribution = z7.strictObject({
|
|
|
2387
2419
|
displayName: OptionalDisplayName,
|
|
2388
2420
|
schemes: z7.array(UriScheme).optional()
|
|
2389
2421
|
});
|
|
2422
|
+
var InteractionDriverContribution = z7.strictObject({
|
|
2423
|
+
localId: LocalContributionId,
|
|
2424
|
+
displayName: OptionalDisplayName,
|
|
2425
|
+
kind: z7.enum(["browser", "computer-use"])
|
|
2426
|
+
});
|
|
2390
2427
|
var EntityResolverContribution = z7.strictObject({
|
|
2391
2428
|
localId: LocalContributionId,
|
|
2392
2429
|
displayName: OptionalDisplayName,
|
|
@@ -2504,7 +2541,13 @@ var ResultRendererContribution = z7.strictObject({
|
|
|
2504
2541
|
});
|
|
2505
2542
|
var ReferenceOpenBehavior = z7.discriminatedUnion("kind", [
|
|
2506
2543
|
z7.strictObject({ kind: z7.literal("working-document") }),
|
|
2507
|
-
z7.strictObject({ kind: z7.literal("browser-pane") })
|
|
2544
|
+
z7.strictObject({ kind: z7.literal("browser-pane") }),
|
|
2545
|
+
/**
|
|
2546
|
+
* Open one of the presenting plugin's OWN registered pages (`registerPage`'s
|
|
2547
|
+
* descriptor id) with the reference's canonical URI as the page's `objectId`.
|
|
2548
|
+
* Needs no web address, so a plugin-only resource (`user-todo://items/3`) can pill.
|
|
2549
|
+
*/
|
|
2550
|
+
z7.strictObject({ kind: z7.literal("page"), pageId: NonEmptyString })
|
|
2508
2551
|
]);
|
|
2509
2552
|
var ReferencePresentationVariant = z7.strictObject({
|
|
2510
2553
|
resourceKind: NonEmptyString,
|
|
@@ -2643,6 +2686,7 @@ var PluginContributionKind = z7.enum([
|
|
|
2643
2686
|
"resource",
|
|
2644
2687
|
"skill",
|
|
2645
2688
|
"searchProvider",
|
|
2689
|
+
"interactionDriver",
|
|
2646
2690
|
"entityResolver",
|
|
2647
2691
|
"agentRenderer",
|
|
2648
2692
|
"endpoint",
|
|
@@ -2749,6 +2793,7 @@ var KayAgentTargetManifest = z8.strictObject({
|
|
|
2749
2793
|
resources: z8.array(ResourceContribution).optional(),
|
|
2750
2794
|
skills: z8.array(SkillContribution).optional(),
|
|
2751
2795
|
searchProviders: z8.array(SearchProviderContribution).optional(),
|
|
2796
|
+
interactionDrivers: z8.array(InteractionDriverContribution).optional(),
|
|
2752
2797
|
entityResolvers: z8.array(EntityResolverContribution).optional(),
|
|
2753
2798
|
renderers: z8.array(AgentRenderContribution).optional(),
|
|
2754
2799
|
// Handler restricted to skill | tool by the manifest-level refinement below (see
|
|
@@ -3212,7 +3257,10 @@ var KayPluginManifestV1 = z8.strictObject({
|
|
|
3212
3257
|
}
|
|
3213
3258
|
const subscribedUiEvents = new Set(manifest.targets?.kay?.ui?.contributes?.eventSubscriptions?.map((subscription) => subscription.event) ?? []);
|
|
3214
3259
|
const invokedUiEndpoints = new Set(manifest.permissions?.byTarget["kay.ui"]?.endpoints?.filter((grant) => grant.operations.includes("invoke")).map((grant) => grant.endpoint) ?? []);
|
|
3215
|
-
const uriModuleIds = new Set(
|
|
3260
|
+
const uriModuleIds = new Set([
|
|
3261
|
+
...manifest.targets?.kay?.agent?.contributes?.uriModules ?? [],
|
|
3262
|
+
...manifest.targets?.kay?.app?.contributes?.uriModules ?? []
|
|
3263
|
+
].map((module) => module.localId));
|
|
3216
3264
|
const presentationByUriModule = /* @__PURE__ */ new Map();
|
|
3217
3265
|
for (const [index, presentation] of (manifest.targets?.kay?.ui?.contributes?.referencePresentations ?? []).entries()) {
|
|
3218
3266
|
const path = [
|
|
@@ -3712,6 +3760,7 @@ function collectDeclaredContributionIds(manifest) {
|
|
|
3712
3760
|
pushContributionIds(output, ["targets", "kay", "agent", "contributes", "resources"], agent?.resources);
|
|
3713
3761
|
pushContributionIds(output, ["targets", "kay", "agent", "contributes", "skills"], agent?.skills);
|
|
3714
3762
|
pushContributionIds(output, ["targets", "kay", "agent", "contributes", "searchProviders"], agent?.searchProviders);
|
|
3763
|
+
pushContributionIds(output, ["targets", "kay", "agent", "contributes", "interactionDrivers"], agent?.interactionDrivers);
|
|
3715
3764
|
pushContributionIds(output, ["targets", "kay", "agent", "contributes", "entityResolvers"], agent?.entityResolvers);
|
|
3716
3765
|
pushContributionIds(output, ["targets", "kay", "agent", "contributes", "renderers"], agent?.renderers);
|
|
3717
3766
|
pushContributionIds(output, ["targets", "kay", "agent", "contributes", "commands"], agent?.commands);
|
|
@@ -4053,6 +4102,7 @@ function collectContributionSources(manifest) {
|
|
|
4053
4102
|
pushAll(output, "kay.agent", "resource", agent?.resources);
|
|
4054
4103
|
pushAll(output, "kay.agent", "skill", agent?.skills);
|
|
4055
4104
|
pushAll(output, "kay.agent", "searchProvider", agent?.searchProviders);
|
|
4105
|
+
pushAll(output, "kay.agent", "interactionDriver", agent?.interactionDrivers);
|
|
4056
4106
|
pushAll(output, "kay.agent", "entityResolver", agent?.entityResolvers);
|
|
4057
4107
|
pushAll(output, "kay.agent", "agentRenderer", agent?.renderers);
|
|
4058
4108
|
pushAll(output, "kay.agent", "command", agent?.commands);
|
|
@@ -4677,6 +4727,7 @@ export {
|
|
|
4677
4727
|
GlobalContributionId,
|
|
4678
4728
|
HttpStatusCode,
|
|
4679
4729
|
HttpsUrl,
|
|
4730
|
+
InteractionDriverContribution,
|
|
4680
4731
|
JsonObject,
|
|
4681
4732
|
JsonPointer,
|
|
4682
4733
|
JsonSchema,
|
|
@@ -4872,6 +4923,7 @@ export {
|
|
|
4872
4923
|
satisfiesSemverRange,
|
|
4873
4924
|
sessionHealthEntrySchema,
|
|
4874
4925
|
sessionHealthPWellDecile,
|
|
4926
|
+
turnMessageOrigin,
|
|
4875
4927
|
turnPacket,
|
|
4876
4928
|
urlHostWithinDomain,
|
|
4877
4929
|
validateKayUiEventSubscription,
|
package/package.json
CHANGED