@yaklabs-ai/plugin-sdk 0.48.1 → 0.50.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 +35 -19
- package/THIRD-PARTY-INVENTORY.json +1 -1
- package/dist/disclosure.d.ts +71 -45
- package/dist/disclosure.js +25 -1
- package/dist/endpoints.d.ts +25 -0
- package/dist/endpoints.js +9 -0
- package/dist/kay-agent-testing.d.ts +72 -46
- package/dist/kay-agent-testing.js +12 -9
- package/dist/kay-agent.d.ts +102 -51
- package/dist/kay-agent.js +26 -1
- package/dist/kay-app.d.ts +82 -61
- package/dist/kay-app.js +641 -607
- package/dist/uri.d.ts +380 -0
- package/dist/uri.js +81 -0
- package/dist/vendored-mcp.d.ts +2 -0
- package/package.json +9 -1
package/dist/kay-agent.d.ts
CHANGED
|
@@ -813,6 +813,10 @@ export declare function createUnavailableCompiler(message: string): KayAgentComp
|
|
|
813
813
|
*/
|
|
814
814
|
export declare function createUnavailableEndpoints(message: string): KayAgentEndpoints;
|
|
815
815
|
|
|
816
|
+
export declare function createUnavailablePluginEndpointCaller(message: string): PluginEndpointCaller;
|
|
817
|
+
|
|
818
|
+
export declare function createUnavailableUriCaller(message: string): PluginUriCaller;
|
|
819
|
+
|
|
816
820
|
/** What the module holds at mutation time: a provider revision, the current content, or both. */
|
|
817
821
|
export declare interface CurrentResourceState {
|
|
818
822
|
readonly revision?: string;
|
|
@@ -2777,8 +2781,16 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2777
2781
|
* 0.48.0 adds the models.complete UI capability.
|
|
2778
2782
|
*
|
|
2779
2783
|
* 0.48.1 adds app-tool metadata, conditional tool permissions and screen-action declarations.
|
|
2784
|
+
*
|
|
2785
|
+
* 0.49.0 adds sessionless URI calls on both backend targets. It removes app.memory and its note
|
|
2786
|
+
* types; callers use the resource surface instead. Previously admitted SDK contracts are no
|
|
2787
|
+
* longer served because they included app.memory on notebook hosts. No compatibility alias
|
|
2788
|
+
* restores it; callers migrate and declare ^0.49.0.
|
|
2789
|
+
*
|
|
2790
|
+
* 0.50.0 adds explicit cross-plugin endpoint calls on both backend targets. The URI-only 0.49.0
|
|
2791
|
+
* contract remains served.
|
|
2780
2792
|
*/
|
|
2781
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2793
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.50.0";
|
|
2782
2794
|
|
|
2783
2795
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2784
2796
|
|
|
@@ -2812,46 +2824,11 @@ export declare interface KayAgentCompiler {
|
|
|
2812
2824
|
bundleBrowser(request: KayBrowserBundleRequest, sources: KayBrowserSources): Promise<KayBrowserBundle>;
|
|
2813
2825
|
}
|
|
2814
2826
|
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
* `^0.19.0`.
|
|
2819
|
-
*
|
|
2820
|
-
* A plugin's two parts load as separate modules and share no memory, so this is how agent code
|
|
2821
|
-
* reaches state its app part keeps (a worker, a database). The manifest says which endpoints the
|
|
2822
|
-
* agent part may call: the `kay.app` target declares the endpoint with a `register` grant, and
|
|
2823
|
-
* `permissions.byTarget["kay.agent"].endpoints` lists it with `invoke`. No other plugin's endpoint
|
|
2824
|
-
* is nameable.
|
|
2825
|
-
*
|
|
2826
|
-
* An endpoint whose only `invoke` grant is the plugin's own `kay.agent` target is not reachable
|
|
2827
|
-
* from Bonsai's surfaces (its pages and runtime clients), so an action the agent takes after the
|
|
2828
|
-
* session's approval card cannot be taken around it.
|
|
2829
|
-
*/
|
|
2830
|
-
/** Why an {@link KayAgentEndpoints.invoke} call produced no value. */
|
|
2831
|
-
export declare type KayAgentEndpointFailureReason =
|
|
2832
|
-
/** The manifest grants this plugin's `kay.agent` target no `invoke` on this endpoint. */
|
|
2833
|
-
"not-declared"
|
|
2834
|
-
/** The plugin's `kay.app` part is not running, or registered no handler for it. */
|
|
2835
|
-
| "unavailable"
|
|
2836
|
-
/** The handler did not answer within the host's fixed deadline (10 seconds). It may still finish. */
|
|
2837
|
-
| "timed-out"
|
|
2838
|
-
/** The caller's `signal` aborted. The handler may still finish. */
|
|
2839
|
-
| "cancelled"
|
|
2840
|
-
/** The handler threw; `message` is its error's message. */
|
|
2841
|
-
| "failed"
|
|
2842
|
-
/** The request or the handler's response does not match the endpoint's declared schema. */
|
|
2843
|
-
| "invalid";
|
|
2844
|
-
|
|
2845
|
-
export declare type KayAgentEndpointOutcome = {
|
|
2846
|
-
readonly ok: true;
|
|
2847
|
-
readonly value: unknown;
|
|
2848
|
-
} | {
|
|
2849
|
-
readonly ok: false;
|
|
2850
|
-
readonly reason: KayAgentEndpointFailureReason;
|
|
2851
|
-
readonly message: string;
|
|
2852
|
-
};
|
|
2827
|
+
export declare type KayAgentEndpointFailureReason = PluginEndpointFailureReason;
|
|
2828
|
+
|
|
2829
|
+
export declare type KayAgentEndpointOutcome = PluginEndpointOutcome;
|
|
2853
2830
|
|
|
2854
|
-
export declare interface KayAgentEndpoints {
|
|
2831
|
+
export declare interface KayAgentEndpoints extends PluginEndpointCaller {
|
|
2855
2832
|
/**
|
|
2856
2833
|
* Call `endpoint`, the local id this plugin's manifest declares on its `kay.app` target. Never
|
|
2857
2834
|
* rejects: every failure is an outcome. Nothing is queued: when the app part is not running the
|
|
@@ -3032,7 +3009,7 @@ export declare interface KayAgentNetwork {
|
|
|
3032
3009
|
* here; the plugin never touches an `ExtensionApi`, `child_process`, credentials, or Electron.
|
|
3033
3010
|
*/
|
|
3034
3011
|
export declare interface KayAgentPluginApi {
|
|
3035
|
-
readonly uri: {
|
|
3012
|
+
readonly uri: PluginUriCaller & {
|
|
3036
3013
|
/** Register a whole URI module (a scheme handler that owns its address space, e.g. `drive://`). */
|
|
3037
3014
|
registerModule(module: UriExtensionModule): void;
|
|
3038
3015
|
};
|
|
@@ -3125,10 +3102,9 @@ export declare interface KayAgentPluginApi {
|
|
|
3125
3102
|
*/
|
|
3126
3103
|
readonly vendoredMcp: KayAgentVendoredMcp;
|
|
3127
3104
|
/**
|
|
3128
|
-
*
|
|
3129
|
-
*
|
|
3130
|
-
*
|
|
3131
|
-
* answers each call `unavailable`. See {@link KayAgentEndpoints} (SDK 0.17.3).
|
|
3105
|
+
* `invoke` calls this plugin's own declared app endpoint by local id. `invokePlugin` names a
|
|
3106
|
+
* provider plugin explicitly and checks this target's exact `endpoints.invoke` claim. Every
|
|
3107
|
+
* failure is an outcome; unavailable providers are never queued.
|
|
3132
3108
|
*/
|
|
3133
3109
|
readonly endpoints: KayAgentEndpoints;
|
|
3134
3110
|
/**
|
|
@@ -5105,13 +5081,32 @@ declare const PluginCapabilityRefusalV1: z.ZodObject<{
|
|
|
5105
5081
|
slug: z.ZodLiteral<"signals.read">;
|
|
5106
5082
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
5107
5083
|
}, z.core.$strict>, z.ZodObject<{
|
|
5108
|
-
target: z.
|
|
5109
|
-
|
|
5110
|
-
|
|
5084
|
+
target: z.ZodEnum<{
|
|
5085
|
+
"kay.agent": "kay.agent";
|
|
5086
|
+
"kay.app": "kay.app";
|
|
5087
|
+
}>;
|
|
5088
|
+
slug: z.ZodLiteral<"uri.call">;
|
|
5089
|
+
envelope: z.ZodObject<{
|
|
5090
|
+
scheme: z.ZodString;
|
|
5091
|
+
verb: z.ZodEnum<{
|
|
5092
|
+
search: "search";
|
|
5093
|
+
list: "list";
|
|
5094
|
+
read: "read";
|
|
5095
|
+
write: "write";
|
|
5096
|
+
edit: "edit";
|
|
5097
|
+
delete: "delete";
|
|
5098
|
+
}>;
|
|
5099
|
+
}, z.core.$strict>;
|
|
5111
5100
|
}, z.core.$strict>, z.ZodObject<{
|
|
5112
|
-
target: z.
|
|
5113
|
-
|
|
5114
|
-
|
|
5101
|
+
target: z.ZodEnum<{
|
|
5102
|
+
"kay.agent": "kay.agent";
|
|
5103
|
+
"kay.app": "kay.app";
|
|
5104
|
+
}>;
|
|
5105
|
+
slug: z.ZodLiteral<"endpoints.invoke">;
|
|
5106
|
+
envelope: z.ZodObject<{
|
|
5107
|
+
pluginId: z.ZodString;
|
|
5108
|
+
endpointId: z.ZodString;
|
|
5109
|
+
}, z.core.$strict>;
|
|
5115
5110
|
}, z.core.$strict>, z.ZodObject<{
|
|
5116
5111
|
target: z.ZodLiteral<"kay.app">;
|
|
5117
5112
|
slug: z.ZodLiteral<"skills.read">;
|
|
@@ -5440,6 +5435,28 @@ export declare interface PluginDelegatedServiceEntry {
|
|
|
5440
5435
|
readonly scheme: PluginDelegatedScheme;
|
|
5441
5436
|
}
|
|
5442
5437
|
|
|
5438
|
+
/** Sessionless JSON calls to another plugin's declared, publicly reachable endpoint. */
|
|
5439
|
+
export declare interface PluginEndpointCaller {
|
|
5440
|
+
/**
|
|
5441
|
+
* Never rejects. Both payload and result are validated against the provider's declared schemas.
|
|
5442
|
+
* Nothing is queued or retried. Cancellation and timeouts leave the operation's effect unknown.
|
|
5443
|
+
*/
|
|
5444
|
+
invokePlugin(providerPluginId: string, endpointLocalId: string, payload: unknown, options?: {
|
|
5445
|
+
readonly signal?: AbortSignal;
|
|
5446
|
+
}): Promise<PluginEndpointOutcome>;
|
|
5447
|
+
}
|
|
5448
|
+
|
|
5449
|
+
export declare type PluginEndpointFailureReason = "not-declared" | "unavailable" | "timed-out" | "cancelled" | "failed" | "invalid" | "denied";
|
|
5450
|
+
|
|
5451
|
+
export declare type PluginEndpointOutcome = {
|
|
5452
|
+
readonly ok: true;
|
|
5453
|
+
readonly value: unknown;
|
|
5454
|
+
} | {
|
|
5455
|
+
readonly ok: false;
|
|
5456
|
+
readonly reason: PluginEndpointFailureReason;
|
|
5457
|
+
readonly message: string;
|
|
5458
|
+
};
|
|
5459
|
+
|
|
5443
5460
|
export declare const PluginEventEnvelope: z.ZodObject<{
|
|
5444
5461
|
id: z.ZodString;
|
|
5445
5462
|
localId: z.ZodString;
|
|
@@ -5566,6 +5583,38 @@ declare const PluginToolName: z.ZodString;
|
|
|
5566
5583
|
|
|
5567
5584
|
declare type PluginToolName = z.infer<typeof PluginToolName>;
|
|
5568
5585
|
|
|
5586
|
+
/**
|
|
5587
|
+
* Sessionless resource calls. Each call checks the calling target's exact scheme and verb grant.
|
|
5588
|
+
* Results retain provider bytes, metadata and revisions; provider failures retain their URI tags.
|
|
5589
|
+
* A cancellation or lost response does not prove a mutation was not applied.
|
|
5590
|
+
*/
|
|
5591
|
+
export declare interface PluginUriCaller {
|
|
5592
|
+
read(input: string, options?: PluginUriReadOptions): Promise<RawResource>;
|
|
5593
|
+
list(input: string, params?: UriListParams, options?: PluginUriCallOptions): Promise<UriListResult>;
|
|
5594
|
+
search(input: string, params: UriSearchParams, options?: PluginUriCallOptions): Promise<UriSearchResult>;
|
|
5595
|
+
write(input: string, content?: UriPayload | Uint8Array, options?: PluginUriWriteOptions): Promise<UriMutationResult | void>;
|
|
5596
|
+
edit(input: string, payload: UriPayload, options?: PluginUriMutationOptions): Promise<UriMutationResult>;
|
|
5597
|
+
delete(input: string, options?: PluginUriMutationOptions): Promise<UriMutationResult>;
|
|
5598
|
+
}
|
|
5599
|
+
|
|
5600
|
+
export declare interface PluginUriCallOptions {
|
|
5601
|
+
readonly cwd?: string;
|
|
5602
|
+
readonly signal?: AbortSignal;
|
|
5603
|
+
}
|
|
5604
|
+
|
|
5605
|
+
export declare interface PluginUriMutationOptions extends PluginUriCallOptions {
|
|
5606
|
+
readonly expectedRevision?: string;
|
|
5607
|
+
}
|
|
5608
|
+
|
|
5609
|
+
export declare interface PluginUriReadOptions extends PluginUriCallOptions {
|
|
5610
|
+
readonly knownRevision?: string;
|
|
5611
|
+
}
|
|
5612
|
+
|
|
5613
|
+
export declare interface PluginUriWriteOptions extends PluginUriMutationOptions {
|
|
5614
|
+
readonly sources?: readonly UriWriteSource[];
|
|
5615
|
+
readonly writeSource?: UriSourceDescriptor;
|
|
5616
|
+
}
|
|
5617
|
+
|
|
5569
5618
|
/**
|
|
5570
5619
|
* What a run did to a URI. The words match the automation run wire's artifact actions. When one
|
|
5571
5620
|
* run both creates and updates a URI, the reader reports `created`.
|
|
@@ -11454,6 +11503,8 @@ export declare interface UriResolveContext {
|
|
|
11454
11503
|
* resolve a URI outside any verb call.
|
|
11455
11504
|
*/
|
|
11456
11505
|
readonly sessionId?: string;
|
|
11506
|
+
/** Host-stamped calling plugin; absent for session dispatch and resolver matching. */
|
|
11507
|
+
readonly callerPluginId?: string;
|
|
11457
11508
|
/**
|
|
11458
11509
|
* WHO the dispatching session acts as, stamped by the host at the same dispatch site as
|
|
11459
11510
|
* {@link UriResolveContext.sessionId} and just as un-influenceable by the caller - so a module
|
package/dist/kay-agent.js
CHANGED
|
@@ -982,6 +982,28 @@ function capability(spec) {
|
|
|
982
982
|
return { ...spec };
|
|
983
983
|
}
|
|
984
984
|
|
|
985
|
+
// packages/plugin-sdk/dist/uri.js
|
|
986
|
+
function createUnavailableUriCaller(message) {
|
|
987
|
+
const unavailable = async () => {
|
|
988
|
+
throw new Error(message);
|
|
989
|
+
};
|
|
990
|
+
return {
|
|
991
|
+
read: unavailable,
|
|
992
|
+
list: unavailable,
|
|
993
|
+
search: unavailable,
|
|
994
|
+
write: unavailable,
|
|
995
|
+
edit: unavailable,
|
|
996
|
+
delete: unavailable
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
// packages/plugin-sdk/dist/endpoints.js
|
|
1001
|
+
function createUnavailablePluginEndpointCaller(message) {
|
|
1002
|
+
return {
|
|
1003
|
+
invokePlugin: async () => ({ ok: false, reason: "unavailable", message })
|
|
1004
|
+
};
|
|
1005
|
+
}
|
|
1006
|
+
|
|
985
1007
|
// packages/herd-uri-extensions/dist/limits.js
|
|
986
1008
|
var MAX_BYTES = 50 * 1024 * 1024;
|
|
987
1009
|
var MAX_OUTPUT_CHARS = 5e5;
|
|
@@ -1477,7 +1499,8 @@ function createUnavailableCompiler(message) {
|
|
|
1477
1499
|
// packages/plugin-sdk/dist/kay-agent/endpoints.js
|
|
1478
1500
|
function createUnavailableEndpoints(message) {
|
|
1479
1501
|
return {
|
|
1480
|
-
invoke: async () => ({ ok: false, reason: "unavailable", message })
|
|
1502
|
+
invoke: async () => ({ ok: false, reason: "unavailable", message }),
|
|
1503
|
+
...createUnavailablePluginEndpointCaller(message)
|
|
1481
1504
|
};
|
|
1482
1505
|
}
|
|
1483
1506
|
|
|
@@ -1716,6 +1739,8 @@ export {
|
|
|
1716
1739
|
createOsascriptRunner,
|
|
1717
1740
|
createUnavailableCompiler,
|
|
1718
1741
|
createUnavailableEndpoints,
|
|
1742
|
+
createUnavailablePluginEndpointCaller,
|
|
1743
|
+
createUnavailableUriCaller,
|
|
1719
1744
|
declareProducedResources,
|
|
1720
1745
|
defineAuthedTool,
|
|
1721
1746
|
defineTool,
|
package/dist/kay-app.d.ts
CHANGED
|
@@ -830,6 +830,12 @@ declare function ConstructorParameters_2<Type extends TSchema>(type: Type, optio
|
|
|
830
830
|
/** Creates a deferred ConstructorParameters action. */
|
|
831
831
|
declare function ConstructorParametersDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TConstructorParametersDeferred<Type>;
|
|
832
832
|
|
|
833
|
+
/**
|
|
834
|
+
* Stable digest of a read's content, the revision a module without one gets.
|
|
835
|
+
* Prefixed so a provider revision can never collide with it by accident.
|
|
836
|
+
*/
|
|
837
|
+
export declare function contentDigest(content: string | Uint8Array): string;
|
|
838
|
+
|
|
833
839
|
export declare interface CorpusResourceInvocation {
|
|
834
840
|
readonly eventId: string;
|
|
835
841
|
/** Envelope recording time, never a run/message/incident identifier. */
|
|
@@ -946,6 +952,8 @@ export declare function createFallbackOnlySignals(): KayAppSignals;
|
|
|
946
952
|
*/
|
|
947
953
|
export declare function createKayPluginLog(write: (line: KayPluginLogLine) => void, bound?: KayPluginLogAttributes): KayPluginLog;
|
|
948
954
|
|
|
955
|
+
export declare function createUnavailablePluginEndpointCaller(message: string): PluginEndpointCaller;
|
|
956
|
+
|
|
949
957
|
/**
|
|
950
958
|
* A `KayAppSealing` that answers `unavailable` to every call: what a host with no vault binds, so
|
|
951
959
|
* `app.sealing` stays present on every host.
|
|
@@ -964,6 +972,8 @@ export declare function createUnavailableSkills(message: string): KayAppSkills;
|
|
|
964
972
|
*/
|
|
965
973
|
export declare function createUnavailableTools(): KayAppTools;
|
|
966
974
|
|
|
975
|
+
export declare function createUnavailableUriCaller(message: string): PluginUriCaller;
|
|
976
|
+
|
|
967
977
|
/**
|
|
968
978
|
* A `KayAppUsage` that answers `unavailable` to every call: what a host with no telemetry lane
|
|
969
979
|
* binds, so `app.usage` stays present on every host.
|
|
@@ -2887,8 +2897,16 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2887
2897
|
* 0.48.0 adds the models.complete UI capability.
|
|
2888
2898
|
*
|
|
2889
2899
|
* 0.48.1 adds app-tool metadata, conditional tool permissions and screen-action declarations.
|
|
2900
|
+
*
|
|
2901
|
+
* 0.49.0 adds sessionless URI calls on both backend targets. It removes app.memory and its note
|
|
2902
|
+
* types; callers use the resource surface instead. Previously admitted SDK contracts are no
|
|
2903
|
+
* longer served because they included app.memory on notebook hosts. No compatibility alias
|
|
2904
|
+
* restores it; callers migrate and declare ^0.49.0.
|
|
2905
|
+
*
|
|
2906
|
+
* 0.50.0 adds explicit cross-plugin endpoint calls on both backend targets. The URI-only 0.49.0
|
|
2907
|
+
* contract remains served.
|
|
2890
2908
|
*/
|
|
2891
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2909
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.50.0";
|
|
2892
2910
|
|
|
2893
2911
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2894
2912
|
|
|
@@ -4559,12 +4577,14 @@ export declare interface KayAppDynamicContextSearchOptions {
|
|
|
4559
4577
|
export declare interface KayAppEndpointContext {
|
|
4560
4578
|
readonly credentials: readonly KayAppResolvedCredential[];
|
|
4561
4579
|
readonly signal: AbortSignal;
|
|
4580
|
+
/** Host-stamped origin of a sessionless cross-plugin call; absent for other callers. */
|
|
4581
|
+
readonly callerPluginId?: string;
|
|
4562
4582
|
/** Record only a scheme from this call's credentials after its provider operation succeeds. */
|
|
4563
4583
|
reportWorked(schemeId: string): void;
|
|
4564
4584
|
}
|
|
4565
4585
|
|
|
4566
4586
|
/** The app-wide endpoint bus; payloads and returned values must be JSON. */
|
|
4567
|
-
export declare interface KayAppEndpoints {
|
|
4587
|
+
export declare interface KayAppEndpoints extends PluginEndpointCaller {
|
|
4568
4588
|
register(name: string, handler: (payload: unknown, context: KayAppEndpointContext) => unknown | Promise<unknown>): void;
|
|
4569
4589
|
}
|
|
4570
4590
|
|
|
@@ -4828,60 +4848,6 @@ export declare interface KayAppMcp {
|
|
|
4828
4848
|
}): Promise<VendoredMcpOutcome>;
|
|
4829
4849
|
}
|
|
4830
4850
|
|
|
4831
|
-
/**
|
|
4832
|
-
* Notes through Memory's ordinary notebook operations, without a chat session. Each call checks
|
|
4833
|
-
* `memory.read` or `memory.write`; a missing notebook or refused grant rejects. Paths are note
|
|
4834
|
-
* addresses such as `facts/this-computer`, without the `memory://` scheme.
|
|
4835
|
-
*/
|
|
4836
|
-
export declare interface KayAppMemory {
|
|
4837
|
-
read(path: string): Promise<KayAppMemoryNote | undefined>;
|
|
4838
|
-
/** Create a note; an existing address is a conflict. */
|
|
4839
|
-
create(path: string, input: KayAppMemoryNoteInput, options?: {
|
|
4840
|
-
readonly signal?: AbortSignal;
|
|
4841
|
-
}): Promise<void>;
|
|
4842
|
-
/** Edit only the revision returned by `read`; concurrent changes reject as a conflict. */
|
|
4843
|
-
edit(path: string, input: KayAppMemoryNoteEdit, options: {
|
|
4844
|
-
readonly expectedRevision: string;
|
|
4845
|
-
}): Promise<void>;
|
|
4846
|
-
}
|
|
4847
|
-
|
|
4848
|
-
export declare interface KayAppMemoryNote {
|
|
4849
|
-
readonly name: string;
|
|
4850
|
-
readonly description: string;
|
|
4851
|
-
readonly body: string;
|
|
4852
|
-
readonly frontmatter: Readonly<Record<string, unknown>> | undefined;
|
|
4853
|
-
readonly revision: string;
|
|
4854
|
-
}
|
|
4855
|
-
|
|
4856
|
-
export declare interface KayAppMemoryNoteEdit {
|
|
4857
|
-
readonly frontmatter?: {
|
|
4858
|
-
readonly name?: string;
|
|
4859
|
-
readonly description?: string;
|
|
4860
|
-
};
|
|
4861
|
-
readonly body?: {
|
|
4862
|
-
readonly replace: string;
|
|
4863
|
-
} | {
|
|
4864
|
-
readonly edits: readonly {
|
|
4865
|
-
readonly oldText: string;
|
|
4866
|
-
readonly newText: string;
|
|
4867
|
-
}[];
|
|
4868
|
-
};
|
|
4869
|
-
}
|
|
4870
|
-
|
|
4871
|
-
export declare interface KayAppMemoryNoteInput {
|
|
4872
|
-
readonly name: string;
|
|
4873
|
-
readonly description: string;
|
|
4874
|
-
readonly body: string;
|
|
4875
|
-
readonly sources?: readonly KayAppMemoryNoteSource[];
|
|
4876
|
-
}
|
|
4877
|
-
|
|
4878
|
-
export declare interface KayAppMemoryNoteSource {
|
|
4879
|
-
readonly id: string;
|
|
4880
|
-
readonly uri: string;
|
|
4881
|
-
readonly kind?: "user" | "source";
|
|
4882
|
-
readonly at?: string;
|
|
4883
|
-
}
|
|
4884
|
-
|
|
4885
4851
|
/** Input to one bounded direct model completion with no transcript or tools. */
|
|
4886
4852
|
export declare interface KayAppModelCompleteInput {
|
|
4887
4853
|
/** Attribution slug (`^[a-z][a-z0-9-]*$`) naming what this call is for. */
|
|
@@ -5494,8 +5460,7 @@ export declare interface KayAppPluginApi {
|
|
|
5494
5460
|
* present, like {@link signals}.
|
|
5495
5461
|
*/
|
|
5496
5462
|
readonly skills: KayAppSkills;
|
|
5497
|
-
|
|
5498
|
-
readonly memory?: KayAppMemory;
|
|
5463
|
+
readonly uri: PluginUriCaller;
|
|
5499
5464
|
/**
|
|
5500
5465
|
* Private API: only plugins Bonsai ships; refused for any other. The assistant's personality
|
|
5501
5466
|
* file, each call checked against `soul.write`. Absent when the host composed no soul store.
|
|
@@ -5539,9 +5504,9 @@ export declare interface KayAppPluginApi {
|
|
|
5539
5504
|
*/
|
|
5540
5505
|
readonly sealing: KayAppSealing;
|
|
5541
5506
|
/**
|
|
5542
|
-
*
|
|
5543
|
-
*
|
|
5544
|
-
*
|
|
5507
|
+
* Register this plugin's app handlers or call another plugin's declared endpoint with
|
|
5508
|
+
* `invokePlugin`. Foreign calls require this target's exact `endpoints.invoke` claim and
|
|
5509
|
+
* cannot reach an endpoint restricted to its owner's agent target.
|
|
5545
5510
|
*/
|
|
5546
5511
|
readonly endpoints: KayAppEndpoints;
|
|
5547
5512
|
/** Publish one event declared by this plugin's `kay.app` manifest target. */
|
|
@@ -10016,6 +9981,28 @@ declare type PluginCardSubmitResult<T> = {
|
|
|
10016
9981
|
readonly ok: false;
|
|
10017
9982
|
}>;
|
|
10018
9983
|
|
|
9984
|
+
/** Sessionless JSON calls to another plugin's declared, publicly reachable endpoint. */
|
|
9985
|
+
export declare interface PluginEndpointCaller {
|
|
9986
|
+
/**
|
|
9987
|
+
* Never rejects. Both payload and result are validated against the provider's declared schemas.
|
|
9988
|
+
* Nothing is queued or retried. Cancellation and timeouts leave the operation's effect unknown.
|
|
9989
|
+
*/
|
|
9990
|
+
invokePlugin(providerPluginId: string, endpointLocalId: string, payload: unknown, options?: {
|
|
9991
|
+
readonly signal?: AbortSignal;
|
|
9992
|
+
}): Promise<PluginEndpointOutcome>;
|
|
9993
|
+
}
|
|
9994
|
+
|
|
9995
|
+
export declare type PluginEndpointFailureReason = "not-declared" | "unavailable" | "timed-out" | "cancelled" | "failed" | "invalid" | "denied";
|
|
9996
|
+
|
|
9997
|
+
export declare type PluginEndpointOutcome = {
|
|
9998
|
+
readonly ok: true;
|
|
9999
|
+
readonly value: unknown;
|
|
10000
|
+
} | {
|
|
10001
|
+
readonly ok: false;
|
|
10002
|
+
readonly reason: PluginEndpointFailureReason;
|
|
10003
|
+
readonly message: string;
|
|
10004
|
+
};
|
|
10005
|
+
|
|
10019
10006
|
export declare const PluginEventEnvelope: z.ZodObject<{
|
|
10020
10007
|
id: z.ZodString;
|
|
10021
10008
|
localId: z.ZodString;
|
|
@@ -10178,6 +10165,38 @@ declare const PluginToolName: z.ZodString;
|
|
|
10178
10165
|
|
|
10179
10166
|
declare type PluginToolName = z.infer<typeof PluginToolName>;
|
|
10180
10167
|
|
|
10168
|
+
/**
|
|
10169
|
+
* Sessionless resource calls. Each call checks the calling target's exact scheme and verb grant.
|
|
10170
|
+
* Results retain provider bytes, metadata and revisions; provider failures retain their URI tags.
|
|
10171
|
+
* A cancellation or lost response does not prove a mutation was not applied.
|
|
10172
|
+
*/
|
|
10173
|
+
export declare interface PluginUriCaller {
|
|
10174
|
+
read(input: string, options?: PluginUriReadOptions): Promise<RawResource>;
|
|
10175
|
+
list(input: string, params?: UriListParams, options?: PluginUriCallOptions): Promise<UriListResult>;
|
|
10176
|
+
search(input: string, params: UriSearchParams, options?: PluginUriCallOptions): Promise<UriSearchResult>;
|
|
10177
|
+
write(input: string, content?: UriPayload | Uint8Array, options?: PluginUriWriteOptions): Promise<UriMutationResult | void>;
|
|
10178
|
+
edit(input: string, payload: UriPayload, options?: PluginUriMutationOptions): Promise<UriMutationResult>;
|
|
10179
|
+
delete(input: string, options?: PluginUriMutationOptions): Promise<UriMutationResult>;
|
|
10180
|
+
}
|
|
10181
|
+
|
|
10182
|
+
export declare interface PluginUriCallOptions {
|
|
10183
|
+
readonly cwd?: string;
|
|
10184
|
+
readonly signal?: AbortSignal;
|
|
10185
|
+
}
|
|
10186
|
+
|
|
10187
|
+
export declare interface PluginUriMutationOptions extends PluginUriCallOptions {
|
|
10188
|
+
readonly expectedRevision?: string;
|
|
10189
|
+
}
|
|
10190
|
+
|
|
10191
|
+
export declare interface PluginUriReadOptions extends PluginUriCallOptions {
|
|
10192
|
+
readonly knownRevision?: string;
|
|
10193
|
+
}
|
|
10194
|
+
|
|
10195
|
+
export declare interface PluginUriWriteOptions extends PluginUriMutationOptions {
|
|
10196
|
+
readonly sources?: readonly UriWriteSource[];
|
|
10197
|
+
readonly writeSource?: UriSourceDescriptor;
|
|
10198
|
+
}
|
|
10199
|
+
|
|
10181
10200
|
export declare interface PreparedAccessApproval {
|
|
10182
10201
|
readonly uri: string;
|
|
10183
10202
|
readonly content: Record<string, unknown>;
|
|
@@ -16644,6 +16663,8 @@ declare interface UriResolveContext_2 {
|
|
|
16644
16663
|
* resolve a URI outside any verb call.
|
|
16645
16664
|
*/
|
|
16646
16665
|
readonly sessionId?: string;
|
|
16666
|
+
/** Host-stamped calling plugin; absent for session dispatch and resolver matching. */
|
|
16667
|
+
readonly callerPluginId?: string;
|
|
16647
16668
|
/**
|
|
16648
16669
|
* WHO the dispatching session acts as, stamped by the host at the same dispatch site as
|
|
16649
16670
|
* {@link UriResolveContext.sessionId} and just as un-influenceable by the caller - so a module
|