@yaklabs-ai/plugin-sdk 0.13.7 → 0.13.8

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/dist/kay-app.d.ts CHANGED
@@ -248,6 +248,12 @@ declare interface AuthAccount {
248
248
  readonly needsReconnect?: boolean;
249
249
  }
250
250
 
251
+ declare interface Availability {
252
+ readonly available: boolean;
253
+ readonly reason?: string;
254
+ readonly cause?: SystemOneFailureCause;
255
+ }
256
+
251
257
  /**
252
258
  * The availability-facts message: who the user is connected as, which auth-gated tools are
253
259
  * waiting on a connect, and which installed plugins are not connected. DURABLE and never
@@ -810,6 +816,82 @@ declare type DaemonServiceTurnMessage = CustomMessage<DaemonServiceTurnDetails>
810
816
  readonly display: true;
811
817
  };
812
818
 
819
+ declare type DecideAnswerFor<Q> = Q extends DecideBoolQuestion ? DecideBoolAnswer : Q extends DecideChoiceQuestion<infer L> ? DecideChoiceAnswer<L> : Q extends DecideScoreQuestion ? DecideScoreAnswer : never;
820
+
821
+ declare interface DecideBoolAnswer {
822
+ readonly type: "bool";
823
+ /** P(yes), from 0 to 1. */
824
+ readonly probability: number;
825
+ }
826
+
827
+ /** A yes/no question. `criteria` says what yes and what no mean; omit it to leave both open. */
828
+ declare interface DecideBoolQuestion {
829
+ readonly type: "bool";
830
+ readonly instructions: string;
831
+ readonly criteria?: {
832
+ readonly true: string;
833
+ readonly false: string;
834
+ };
835
+ }
836
+
837
+ declare interface DecideChoiceAnswer<L extends string = string> {
838
+ readonly type: "choice";
839
+ readonly choice: L;
840
+ readonly confidence: number;
841
+ /** P(label) for every offered label. */
842
+ readonly probabilities: Readonly<Record<L, number>>;
843
+ }
844
+
845
+ /** A choice among labels. Each label maps to what it means; an empty string leaves it open. */
846
+ declare interface DecideChoiceQuestion<L extends string = string> {
847
+ readonly type: "choice";
848
+ readonly instructions: string;
849
+ readonly criteria: Readonly<Record<L, string>>;
850
+ }
851
+
852
+ declare type DecideModelId = "jev" | "clef" | "clef-flash";
853
+
854
+ declare type DecideQuestion = DecideBoolQuestion | DecideChoiceQuestion | DecideScoreQuestion;
855
+
856
+ /** Questions keyed by the name each answer comes back under. */
857
+ declare type DecideQuestions = Readonly<Record<string, DecideQuestion>>;
858
+
859
+ declare interface DecideRequest<Q extends DecideQuestions = DecideQuestions> {
860
+ /** Defaults to `jev`. */
861
+ readonly model?: DecideModelId;
862
+ readonly state: DecideState;
863
+ readonly questions: Q;
864
+ }
865
+
866
+ declare interface DecideScoreAnswer {
867
+ readonly type: "score";
868
+ /** The expected level, from 0 to the number of levels minus one. */
869
+ readonly score: number;
870
+ readonly confidence: number;
871
+ }
872
+
873
+ /** A score over ordered levels: the first criterion scores 0, the next 1, and so on. */
874
+ declare interface DecideScoreQuestion {
875
+ readonly type: "score";
876
+ readonly instructions: string;
877
+ readonly criteria: readonly string[];
878
+ }
879
+
880
+ /**
881
+ * What a decide call reads. A JSON value is sent as JSON; every value must survive
882
+ * `JSON.stringify` unchanged.
883
+ */
884
+ declare type DecideState = string | object;
885
+
886
+ /** Every asked question has an answer of its own kind. */
887
+ declare interface Decision<Q extends DecideQuestions = DecideQuestions> {
888
+ readonly model: DecideModelId;
889
+ readonly answers: {
890
+ readonly [K in keyof Q]: DecideAnswerFor<Q[K]>;
891
+ };
892
+ readonly usage?: SystemOneTokenUsage;
893
+ }
894
+
813
895
  /** Createsa uni-directional Codec with Decode only. The Decode function is called on Value.Decode */
814
896
  declare function Decode<Type extends TSchema, Callback extends TDecodeCallback<StaticDecode<Type>, unknown>>(type: Type, callback: Callback): TCodec<Type, ReturnType<Callback>>;
815
897
 
@@ -887,6 +969,8 @@ declare interface DroppedContribution {
887
969
  readonly reason: "timeout" | "error";
888
970
  }
889
971
 
972
+ declare type DurationUnit = "seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years";
973
+
890
974
  /**
891
975
  * The Dynamic Context message: retrieval-produced context delivered right after human
892
976
  * text enters the conversation (prompt, steer, or a drained follow-up batch — one
@@ -989,6 +1073,18 @@ declare function Enum<Values extends TEnumValue[]>(values: readonly [...Values],
989
1073
  /** Creates an Enum type from a TypeScript enum declaration. */
990
1074
  declare function Enum<Enum extends TTypeScriptEnumLike>(value: Enum, options?: TSchemaOptions): TEnum<TTypeScriptEnumToEnumValues<Enum>>;
991
1075
 
1076
+ declare interface EstimateDistribution<V> {
1077
+ readonly value: V | null;
1078
+ readonly mean?: V;
1079
+ readonly median?: V;
1080
+ readonly p10?: V;
1081
+ readonly p90?: V;
1082
+ /** P(value < min). */
1083
+ readonly pBelow?: number;
1084
+ /** P(value > max). */
1085
+ readonly pAbove?: number;
1086
+ }
1087
+
992
1088
  /** Applies an Evaluate action to a type. */
993
1089
  declare function Evaluate<Type extends TSchema>(type: Type, options?: TSchemaOptions): TEvaluate<Type>;
994
1090
 
@@ -1166,13 +1262,135 @@ declare interface ExtensionPaths {
1166
1262
  /** Applies an Extract action using the given types. */
1167
1263
  declare function Extract_2<Left extends TSchema, Right extends TSchema>(left: Left, right: Right, options?: TSchemaOptions): TExtract<Left, Right>;
1168
1264
 
1265
+ declare type ExtractAnswerFor<F> = F extends ExtractTextField ? ExtractValueAnswer<"text", string> : F extends ExtractNumberField ? ExtractValueAnswer<"number", number> : F extends ExtractDateTimeField ? ExtractValueAnswer<F["type"], string> : F extends ExtractDurationField ? ExtractValueAnswer<"duration", number> : F extends ExtractListField ? ExtractListAnswer<F["items"] extends "number" ? number : string> : F extends ExtractEstimateField ? ExtractEstimateAnswer<F["min"] extends string ? string : number> : F extends ExtractForecastField ? ExtractForecastAnswer : never;
1266
+
1267
+ /** `date` answers are ISO dates, `time` ISO times, `datetime` ISO date-times. */
1268
+ declare interface ExtractDateTimeField extends ExtractFieldBase {
1269
+ readonly type: "date" | "time" | "datetime";
1270
+ }
1271
+
1169
1272
  /** Creates a deferred Extract action. */
1170
1273
  declare function ExtractDeferred<Left extends TSchema, Right extends TSchema>(left: Left, right: Right, options?: TSchemaOptions): TExtractDeferred<Left, Right>;
1171
1274
 
1275
+ declare interface ExtractDurationField extends ExtractFieldBase {
1276
+ readonly type: "duration";
1277
+ /** Seconds when omitted. */
1278
+ readonly unit?: DurationUnit;
1279
+ readonly integer?: boolean;
1280
+ readonly decimals?: number;
1281
+ }
1282
+
1283
+ declare interface ExtractEstimateAnswer<V = number | string> extends EstimateDistribution<V> {
1284
+ readonly type: "estimate";
1285
+ }
1286
+
1287
+ /** A distribution over one value. `min`/`max` are numbers, or ISO dates for a date estimate. */
1288
+ declare interface ExtractEstimateField extends ExtractFieldBase {
1289
+ readonly type: "estimate";
1290
+ readonly min: number | string;
1291
+ readonly max: number | string;
1292
+ /** Grid step: a positive number (days for a date estimate), `month` or `year`. */
1293
+ readonly step?: number | "month" | "year";
1294
+ readonly scale?: "linear" | "log";
1295
+ readonly unit?: string;
1296
+ }
1297
+
1298
+ declare type ExtractField = ExtractTextField | ExtractNumberField | ExtractDateTimeField | ExtractDurationField | ExtractListField | ExtractEstimateField | ExtractForecastField;
1299
+
1300
+ declare interface ExtractFieldBase {
1301
+ readonly instructions?: string;
1302
+ /** P(null) above which the value is null. Clairic's default is 0.5. */
1303
+ readonly nullThreshold?: number;
1304
+ }
1305
+
1306
+ /** Fields keyed by name. A name matches `^[A-Za-z_][A-Za-z0-9_.\-]{0,63}$`. */
1307
+ declare type ExtractFields = Readonly<Record<string, ExtractField>>;
1308
+
1309
+ declare interface ExtractForecastAnswer {
1310
+ readonly type: "forecast";
1311
+ /** One value per step; `null` when the state does not determine the forecast. */
1312
+ readonly value: readonly number[] | null;
1313
+ readonly steps: readonly EstimateDistribution<number>[];
1314
+ }
1315
+
1316
+ /** One distribution per future step. */
1317
+ declare interface ExtractForecastField extends ExtractFieldBase {
1318
+ readonly type: "forecast";
1319
+ readonly min: number;
1320
+ readonly max: number;
1321
+ /** Number of steps, 1 to 64. */
1322
+ readonly horizon: number;
1323
+ readonly interval?: ForecastInterval;
1324
+ readonly scale?: "linear" | "log";
1325
+ readonly unit?: string;
1326
+ }
1327
+
1328
+ declare interface Extraction<F extends ExtractFields = ExtractFields> {
1329
+ readonly model: ExtractModelId;
1330
+ readonly answers: {
1331
+ readonly [K in keyof F]: ExtractAnswerFor<F[K]>;
1332
+ };
1333
+ /** The state was cut to fit the model's context. */
1334
+ readonly truncated: boolean;
1335
+ readonly usage?: SystemOneTokenUsage;
1336
+ }
1337
+
1338
+ declare interface ExtractListAnswer<V> {
1339
+ readonly type: "list";
1340
+ readonly value: readonly V[] | null;
1341
+ readonly confidence?: number;
1342
+ /** One per item in `value`. */
1343
+ readonly confidences?: readonly number[];
1344
+ readonly spans?: readonly TextSpan[];
1345
+ }
1346
+
1347
+ declare interface ExtractListField extends ExtractFieldBase {
1348
+ readonly type: "list";
1349
+ readonly items: "text" | "number" | "date";
1350
+ readonly decimals?: number;
1351
+ }
1352
+
1353
+ declare type ExtractModelId = "clairic";
1354
+
1355
+ declare interface ExtractNumberField extends ExtractFieldBase {
1356
+ readonly type: "number";
1357
+ readonly unit?: string;
1358
+ readonly integer?: boolean;
1359
+ /** 0 to 6. */
1360
+ readonly decimals?: number;
1361
+ }
1362
+
1363
+ declare interface ExtractRequest<F extends ExtractFields = ExtractFields> {
1364
+ readonly model: ExtractModelId;
1365
+ /** Text only; JSON is not accepted. */
1366
+ readonly state: string;
1367
+ readonly fields: F;
1368
+ /** ISO date that anchors dates written without a year. */
1369
+ readonly referenceDate?: string;
1370
+ }
1371
+
1372
+ declare interface ExtractTextField extends ExtractFieldBase {
1373
+ readonly type: "text";
1374
+ }
1375
+
1376
+ declare interface ExtractValueAnswer<T extends "text" | "number" | "date" | "time" | "datetime" | "duration", V> {
1377
+ readonly type: T;
1378
+ /** `null` when the state does not determine the value. */
1379
+ readonly value: V | null;
1380
+ /** The best candidate even when `value` is null. */
1381
+ readonly guess?: V;
1382
+ readonly confidence?: number;
1383
+ readonly pNull?: number;
1384
+ readonly span?: TextSpan;
1385
+ readonly unit?: string;
1386
+ }
1387
+
1172
1388
  declare const Factor: (input: string) => [unknown, string] | [];
1173
1389
 
1174
1390
  declare function FactorMapping(input: [unknown, unknown, unknown, unknown, unknown]): unknown;
1175
1391
 
1392
+ declare type ForecastInterval = "step" | "minute" | "hour" | "day" | "week" | "month" | "quarter" | "year";
1393
+
1176
1394
  /** Creates a Function type. */
1177
1395
  declare function _Function_<Parameters extends TSchema[], ReturnType extends TSchema>(parameters: [...Parameters], returnType: ReturnType, options?: TSchemaOptions): TFunction<Parameters, ReturnType>;
1178
1396
 
@@ -1848,7 +2066,7 @@ declare interface KayAgentWhiteboardUpdateInput {
1848
2066
  }
1849
2067
 
1850
2068
  /**
1851
- * The signed-in Bonsai account. Always present on {@link KayAppPluginApi}.
2069
+ * The signed-in Bonsai account. Always present on `KayAppPluginApi`.
1852
2070
  *
1853
2071
  * Reading the profile is ungated: it exposes the signed-in user's own identity to a plugin they
1854
2072
  * explicitly enabled. The two stronger operations are separate claims, checked per call —
@@ -1907,7 +2125,7 @@ export declare interface KayAppAccount {
1907
2125
  * `profile`/`assertResult`, compare against the last-seen identity, and act only on a
1908
2126
  * real move (kay#8553 is the looping-reconnect bug the looser reading licensed). A gate
1909
2127
  * that re-registers account-scoped sources must also act when a registration reports
1910
- * {@link KayAppDataSourceRegistration.isRetired}: the host's identity change is not always
2128
+ * `KayAppDataSourceRegistration.isRetired`: the host's identity change is not always
1911
2129
  * one `profile` shows, and a gate reading only the identity leaves the source retired.
1912
2130
  */
1913
2131
  subscribe(listener: () => void): () => void;
@@ -1995,6 +2213,11 @@ export declare type KayAppAccountAssertionResult = {
1995
2213
  readonly status: "signed-out";
1996
2214
  };
1997
2215
 
2216
+ /**
2217
+ * The plugin-facing `kay.app` account contract (`app.account`): who is signed in to Bonsai, a
2218
+ * verifiable assertion of that identity, why one is unavailable, and the profile update. Changes to
2219
+ * this contract belong in this module.
2220
+ */
1998
2221
  /**
1999
2222
  * Who is signed in to Bonsai. Metadata only — this carries no secret and cannot be presented to
2000
2223
  * anyone as proof. Derived from the Bonsai product-account record's stored identity.
@@ -2963,7 +3186,7 @@ export declare interface KayAppContextContributor {
2963
3186
 
2964
3187
  /**
2965
3188
  * Raw read access to every stored session's transcript. Always present on
2966
- * {@link KayAppPluginApi}; each read is checked against the `corpus.read` claim, and refused
3189
+ * `KayAppPluginApi`; each read is checked against the `corpus.read` claim, and refused
2967
3190
  * unless the user has granted it. Data is raw and un-redacted — the plugin filters to what it
2968
3191
  * needs. Invocation queries are bounded pages. Transcript reads materialize a whole session
2969
3192
  * before yielding; the iterable does not promise per-entry streaming or an allocation bound.
@@ -3194,6 +3417,11 @@ export declare type KayAppDataSourceSnapshot = {
3194
3417
  readonly reason?: KayAppDataUnavailableReason;
3195
3418
  };
3196
3419
 
3420
+ /**
3421
+ * The plugin-facing `kay.app` app-data contract (`app.data`): registering the live definitions
3422
+ * behind manifest-declared data sources, app-wide or per session, and the closed reasons a source
3423
+ * reports no data. Changes to this contract belong in this module.
3424
+ */
3197
3425
  /**
3198
3426
  * Why a source has no data right now — a CLOSED classification, never a message.
3199
3427
  *
@@ -3823,6 +4051,14 @@ export declare interface KayAppPluginApi {
3823
4051
  * `if (app.withJev !== undefined)`.
3824
4052
  */
3825
4053
  readonly withJev: WithJev;
4054
+ /**
4055
+ * System One: fast, cheap judgment calls (`decide`) and typed field extraction (`extract`) on
4056
+ * small models (Jev, Clef, Clef Flash, Clairic). Each call is checked against `jev.use`; a call
4057
+ * that cannot be served or is not permitted throws a `SystemOneError` whose `cause.kind` says
4058
+ * why, so put the feature's cheaper path in the call's own `catch`. Always present, on every
4059
+ * host. Types: `@bonsai/plugin-sdk/system-one` (SDK 0.13.8).
4060
+ */
4061
+ readonly systemOne: SystemOneClient;
3826
4062
  /**
3827
4063
  * Recorded Jev signals. `observe` runs a Jev inference and records the answer as a durable,
3828
4064
  * provenance-stamped row; each call is checked against `jev.use`, and a refused grant, no
@@ -3874,7 +4110,7 @@ export declare interface KayAppPluginApi {
3874
4110
  /**
3875
4111
  * Register a session tool this plugin's manifest declares under
3876
4112
  * `targets.kay.app.contributes.tools`. Injected into every session under the declared
3877
- * `toolName`; each call's {@link KayAppToolContext} is host-stamped with the calling session.
4113
+ * `toolName`; each call's `KayAppToolContext` is host-stamped with the calling session.
3878
4114
  * Registering an undeclared `localId`, or one twice, throws and disables the plugin —
3879
4115
  * fail-closed at activation, exactly like {@link registerUriModule}.
3880
4116
  */
@@ -4391,8 +4627,8 @@ export declare interface KayAppSessionRunInput {
4391
4627
  readonly activeToolNames?: readonly KayAppSessionRunHostToolName[] | undefined;
4392
4628
  /**
4393
4629
  * The run's model, as either an exact pin (a provider-qualified reference from
4394
- * {@link KayAppModels.list}) or a tier word (`small`/`medium`/`large`/`ultra` —
4395
- * see {@link KayAppModels.listTiers}); absent, the daemon resolves
4630
+ * `KayAppModels.list`) or a tier word (`small`/`medium`/`large`/`ultra` —
4631
+ * see `KayAppModels.listTiers`); absent, the daemon resolves
4396
4632
  * the configured default. A tier word resolves through the same chokepoint every
4397
4633
  * other tier selection does — the daemon picks the concrete model, never the
4398
4634
  * plugin. An unavailable pin fails the run rather than silently substituting.
@@ -5153,6 +5389,11 @@ export declare interface KayAppStorage {
5153
5389
  readonly dataDir?: KayAppDataDirStorage;
5154
5390
  }
5155
5391
 
5392
+ /**
5393
+ * The plugin-facing `kay.app` models contract (`app.models`): the plugin-safe model catalog and
5394
+ * tiers, image-model resolution, the direct-completion broker, and the reasoning-effort ladder that
5395
+ * sessions and completions share. Changes to this contract belong in this module.
5396
+ */
5156
5397
  /** Bonsai's reasoning-effort ladder, in ascending order. */
5157
5398
  export declare type KayAppThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
5158
5399
 
@@ -5244,7 +5485,7 @@ export declare interface KayAppToolContext {
5244
5485
 
5245
5486
  /**
5246
5487
  * A session tool a `kay.app` plugin implements — the tool counterpart of an app-scoped
5247
- * {@link UriModule}: registered once at activation, injected into every session. The kernel
5488
+ * `UriModule`: registered once at activation, injected into every session. The kernel
5248
5489
  * `ToolDefinition` shape minus `name` (the host stamps the manifest-declared `toolName`; a
5249
5490
  * plugin never names its own model-facing tool at registration) and minus `requiresAuth`
5250
5491
  * (extension-auth binding is a `kay.agent` seam; an app tool acts through its granted app
@@ -5991,6 +6232,12 @@ export declare interface KayAppWorkspaceExecuteContext {
5991
6232
  readonly sessionId: string;
5992
6233
  }
5993
6234
 
6235
+ /**
6236
+ * The plugin-facing `kay.app` workspace contract (`app.workspace`): the desktop workspace snapshot
6237
+ * and the arrangement commands a plugin may run. This package does not import
6238
+ * `@bonsai/agent-runtime-protocol`, so these types are JSON-safe, hand-copied twins of that
6239
+ * package's workspace shapes. Changes to this contract belong in this module.
6240
+ */
5994
6241
  /**
5995
6242
  * What one pane item shows. A JSON-safe, hand-copied twin of `WorkspacePaneContent` in
5996
6243
  * `@bonsai/agent-runtime-protocol` — this package cannot import that protocol package (see this
@@ -8361,6 +8608,74 @@ declare interface SystemMessage {
8361
8608
  timestamp: number;
8362
8609
  }
8363
8610
 
8611
+ declare interface SystemOneCallOptions {
8612
+ readonly signal?: AbortSignal;
8613
+ /** Bounds the whole call, retries included. */
8614
+ readonly timeoutMs?: number;
8615
+ }
8616
+
8617
+ declare interface SystemOneClient {
8618
+ decide<const Q extends DecideQuestions>(request: DecideRequest<Q>, options?: SystemOneCallOptions): Promise<Decision<Q>>;
8619
+ extract<const F extends ExtractFields>(request: ExtractRequest<F>, options?: SystemOneCallOptions): Promise<Extraction<F>>;
8620
+ /** Whether some provider in the current order can serve `(kind, model)`. Never rejects. */
8621
+ availability(kind: SystemOneKind, model?: SystemOneModelId): Promise<Availability>;
8622
+ }
8623
+
8624
+ /**
8625
+ * Why a call failed or a provider can't serve, as a closed set. Never prose, and never the
8626
+ * vendor's body: bodies can echo the request's state.
8627
+ */
8628
+ declare type SystemOneFailureCause = {
8629
+ readonly kind: "no-credential";
8630
+ } | {
8631
+ readonly kind: "credential-store";
8632
+ } | {
8633
+ readonly kind: "not-served";
8634
+ } | {
8635
+ readonly kind: "not-permitted";
8636
+ } | {
8637
+ readonly kind: "unknown-model";
8638
+ } | {
8639
+ readonly kind: "invalid-request";
8640
+ readonly detail: string;
8641
+ } | {
8642
+ readonly kind: "too-large";
8643
+ } | {
8644
+ readonly kind: "http";
8645
+ readonly status: number;
8646
+ } | {
8647
+ readonly kind: "transport";
8648
+ } | {
8649
+ readonly kind: "timeout";
8650
+ } | {
8651
+ readonly kind: "aborted";
8652
+ } | {
8653
+ readonly kind: "invalid-answer";
8654
+ };
8655
+
8656
+ /**
8657
+ * ---
8658
+ * responsibility: The data shapes of the System One surface: models, the decide and extract
8659
+ * vocabularies, providers, and the failure causes.
8660
+ * owns:
8661
+ * - The caller-facing question, field, answer, and result types, in Bonsai's own words
8662
+ * (`bool` for yes/no, camelCase options). The vendors' words (`noul`, snake_case) appear
8663
+ * only in `wire.ts`.
8664
+ * - {@link SystemOneProvider}, the seam a transport implements.
8665
+ * does_not_own:
8666
+ * - Which models exist (`models.ts`), how answers are checked (`wire.ts`), or how a provider is
8667
+ * picked (`system-one-client.ts`).
8668
+ * ---
8669
+ */
8670
+ declare type SystemOneKind = "decide" | "extract";
8671
+
8672
+ declare type SystemOneModelId = DecideModelId | ExtractModelId;
8673
+
8674
+ declare interface SystemOneTokenUsage {
8675
+ readonly inputTokens: number;
8676
+ readonly outputTokens: number;
8677
+ }
8678
+
8364
8679
  declare namespace T {
8365
8680
  export {
8366
8681
  Codec,
@@ -9418,6 +9733,9 @@ declare type TExtractType<Left extends TSchema, Right extends TSchema, Check ext
9418
9733
 
9419
9734
  declare type TExtractUnion<Left extends TSchema[], Right extends TSchema, Result extends TSchema[] = []> = (Left extends [infer Head extends TSchema, ...infer Tail extends TSchema[]] ? TExtractUnion<Tail, Right, [...Result, ...TExtractType<Head, Right>]> : Result);
9420
9735
 
9736
+ /** `[start, end)` character offsets into the state. */
9737
+ declare type TextSpan = readonly [number, number];
9738
+
9421
9739
  declare type TFactor<Input extends string> = (TKeyOf<Input> extends [infer _0, infer Input extends string] ? (TBase<Input> extends [infer _1, infer Input extends string] ? (TIndexArray<Input> extends [infer _2, infer Input extends string] ? (TExtends_2<Input> extends [infer _3, infer Input extends string] ? (TWith<Input> extends [infer _4, infer Input extends string] ? [[_0, _1, _2, _3, _4], Input] : []) : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TFactorMapping<_0>, Input] : [];
9422
9740
 
9423
9741
  declare type TFactorExtends<Type extends T.TSchema, Extends extends unknown[]> = (Extends extends [infer Right extends T.TSchema, infer True extends T.TSchema, infer False extends T.TSchema] ? S_2.TConditionalDeferred<Type, Right, True, False> : Type);
package/dist/kay-app.js CHANGED
@@ -506,6 +506,19 @@ function payload(name, schema, options = {}) {
506
506
  };
507
507
  }
508
508
 
509
+ // packages/plugin-sdk/dist/kay-app/account.js
510
+ function isRetryable(result) {
511
+ return result.status === "not-ready";
512
+ }
513
+
514
+ // packages/plugin-sdk/dist/kay-app/automations.js
515
+ var KAY_APP_AUTOMATION_CONDITION_KINDS = [
516
+ "time",
517
+ "uri-change",
518
+ "occurrence",
519
+ "delayed-occurrence"
520
+ ];
521
+
509
522
  // packages/plugin-sdk/dist/kay-app/skills.js
510
523
  function createUnavailableSkills(message) {
511
524
  const unavailable = {
@@ -577,17 +590,6 @@ var KAY_APP_DATA_SNAPSHOT_MAX_BYTES = 16 * 1024 * 1024;
577
590
  var KAY_APP_DATA_CHANGE_MAX_BYTES = 256 * 1024;
578
591
  var KAY_APP_DATA_READ_REQUEST_MAX_BYTES = 64 * 1024;
579
592
  var KAY_APP_DATA_READ_RESULT_MAX_BYTES = 16 * 1024 * 1024;
580
-
581
- // packages/plugin-sdk/dist/kay-app/index.js
582
- function isRetryable(result) {
583
- return result.status === "not-ready";
584
- }
585
- var KAY_APP_AUTOMATION_CONDITION_KINDS = [
586
- "time",
587
- "uri-change",
588
- "occurrence",
589
- "delayed-occurrence"
590
- ];
591
593
  export {
592
594
  JevCallError,
593
595
  JsonSchema,