@yaklabs-ai/plugin-sdk 0.15.0 → 0.15.2

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.
@@ -7077,6 +7077,14 @@ declare type ToolParametersWire = unknown;
7077
7077
  * declares {@link ToolPermissionHint.quiet} and keeps its honest `kind`.
7078
7078
  */
7079
7079
  declare interface ToolPermissionHint {
7080
+ /**
7081
+ * Names this exact call for the approval card, from its validated input: a title and optional
7082
+ * labelled facts. Render-only: never matched against a rule, never one-tap approval grounds.
7083
+ * The tool says what its input claims, so the gate shows it as the tool's claim, not as the
7084
+ * daemon's attestation. The host admits only display-safe text; a throw, a blank title or an
7085
+ * unsafe string costs the description and the call is asked about as before.
7086
+ */
7087
+ readonly describePreview?: (input: Record<string, unknown>) => ToolPreviewDescription | undefined;
7080
7088
  readonly kind?: ToolActionKind;
7081
7089
  readonly scheme?: string;
7082
7090
  readonly ruleKey?: string;
@@ -7203,6 +7211,16 @@ declare interface ToolPermissionHint {
7203
7211
  readonly defaultPermission?: "allow" | "ask" | "never";
7204
7212
  }
7205
7213
 
7214
+ /** What {@link ToolPermissionHint.describePreview} answers. */
7215
+ declare interface ToolPreviewDescription {
7216
+ readonly title: string;
7217
+ readonly description?: string;
7218
+ readonly fields?: readonly {
7219
+ readonly label: string;
7220
+ readonly value: string;
7221
+ }[];
7222
+ }
7223
+
7206
7224
  /** Controls whether a tool is expected to complete inline or via background adoption. */
7207
7225
  declare type ToolRunPolicy = "inline" | "background";
7208
7226
 
@@ -7000,6 +7000,14 @@ declare type ToolParametersWire = unknown;
7000
7000
  * declares {@link ToolPermissionHint.quiet} and keeps its honest `kind`.
7001
7001
  */
7002
7002
  declare interface ToolPermissionHint {
7003
+ /**
7004
+ * Names this exact call for the approval card, from its validated input: a title and optional
7005
+ * labelled facts. Render-only: never matched against a rule, never one-tap approval grounds.
7006
+ * The tool says what its input claims, so the gate shows it as the tool's claim, not as the
7007
+ * daemon's attestation. The host admits only display-safe text; a throw, a blank title or an
7008
+ * unsafe string costs the description and the call is asked about as before.
7009
+ */
7010
+ readonly describePreview?: (input: Record<string, unknown>) => ToolPreviewDescription | undefined;
7003
7011
  readonly kind?: ToolActionKind;
7004
7012
  readonly scheme?: string;
7005
7013
  readonly ruleKey?: string;
@@ -7126,6 +7134,16 @@ declare interface ToolPermissionHint {
7126
7134
  readonly defaultPermission?: "allow" | "ask" | "never";
7127
7135
  }
7128
7136
 
7137
+ /** What {@link ToolPermissionHint.describePreview} answers. */
7138
+ declare interface ToolPreviewDescription {
7139
+ readonly title: string;
7140
+ readonly description?: string;
7141
+ readonly fields?: readonly {
7142
+ readonly label: string;
7143
+ readonly value: string;
7144
+ }[];
7145
+ }
7146
+
7129
7147
  /** Controls whether a tool is expected to complete inline or via background adoption. */
7130
7148
  declare type ToolRunPolicy = "inline" | "background";
7131
7149
 
@@ -9053,6 +9053,14 @@ export declare type ToolParametersWire = unknown;
9053
9053
  * declares {@link ToolPermissionHint.quiet} and keeps its honest `kind`.
9054
9054
  */
9055
9055
  declare interface ToolPermissionHint {
9056
+ /**
9057
+ * Names this exact call for the approval card, from its validated input: a title and optional
9058
+ * labelled facts. Render-only: never matched against a rule, never one-tap approval grounds.
9059
+ * The tool says what its input claims, so the gate shows it as the tool's claim, not as the
9060
+ * daemon's attestation. The host admits only display-safe text; a throw, a blank title or an
9061
+ * unsafe string costs the description and the call is asked about as before.
9062
+ */
9063
+ readonly describePreview?: (input: Record<string, unknown>) => ToolPreviewDescription | undefined;
9056
9064
  readonly kind?: ToolActionKind;
9057
9065
  readonly scheme?: string;
9058
9066
  readonly ruleKey?: string;
@@ -9179,6 +9187,16 @@ declare interface ToolPermissionHint {
9179
9187
  readonly defaultPermission?: "allow" | "ask" | "never";
9180
9188
  }
9181
9189
 
9190
+ /** What {@link ToolPermissionHint.describePreview} answers. */
9191
+ declare interface ToolPreviewDescription {
9192
+ readonly title: string;
9193
+ readonly description?: string;
9194
+ readonly fields?: readonly {
9195
+ readonly label: string;
9196
+ readonly value: string;
9197
+ }[];
9198
+ }
9199
+
9182
9200
  /** Controls whether a tool is expected to complete inline or via background adoption. */
9183
9201
  export declare type ToolRunPolicy = "inline" | "background";
9184
9202
 
@@ -505,6 +505,7 @@ declare interface CustomAgentMessages {
505
505
  userInvoked: UserInvokedMessage;
506
506
  availabilityFacts: AvailabilityFactsMessage;
507
507
  midTurnCompactionOutcome: MidTurnCompactionOutcomeMessage;
508
+ runContinuationCarrier: RunContinuationCarrierMessage;
508
509
  subagentResult: SubagentResultMessage;
509
510
  backgroundTaskResult: BackgroundTaskResultMessage;
510
511
  }
@@ -1235,12 +1236,23 @@ declare interface KayAppCorpus {
1235
1236
  */
1236
1237
  readEntries(sessionId: string): AsyncIterable<TranscriptEntry>;
1237
1238
  /**
1238
- * Read one bounded physical JSONL page. The host resolves `sessionId` to its authoritative
1239
- * indexed path and validates the opaque cursor before opening it. When `throughEntryId` is
1240
- * supplied, the cursor stops at that entry's transaction line; a V4 line may carry later
1241
- * entries, which are returned for the caller to filter and are replayed on the next page.
1242
- * A page can hold no entries at all (a run of storage lines) while more follows; a record
1243
- * longer than the page is stepped over and counted in `oversizedRecords`.
1239
+ * Active-branch entries from the latest canonical human turn opener (send companions included)
1240
+ * through the anchor, oldest first. Mid-turn steers and machine wakes remain inside that window;
1241
+ * attachment-only openers and fresh card answers count. Missing sessions/anchors return [];
1242
+ * unsupported hosts may omit it.
1243
+ * Reads never fall back to materializing the full log.
1244
+ */
1245
+ readLatestHumanWindow?(sessionId: string, options?: {
1246
+ readonly throughEntryId?: string;
1247
+ }): Promise<readonly TranscriptEntry[]>;
1248
+ /**
1249
+ * Read one bounded page of a session's stored transcript. The host resolves `sessionId` to its
1250
+ * authoritative indexed path and validates the opaque cursor before reading. When
1251
+ * `throughEntryId` is supplied, the page ends at that entry and the cursor stays at the start of
1252
+ * the commit holding it: the commit's other entries are returned for the caller to filter, and
1253
+ * the next page replays that commit. A page can hold no entries at all (storage records with no
1254
+ * entry) while more follows; a record longer than the page is stepped over and counted in
1255
+ * `oversizedRecords`.
1244
1256
  */
1245
1257
  readEntryBatch?(sessionId: string, options?: {
1246
1258
  readonly cursor?: JsonValue_3;
@@ -1255,7 +1267,7 @@ declare interface KayAppCorpus {
1255
1267
  readSessionSourceMark(sessionId: string): Promise<KayAppCorpusSourceMark | undefined>;
1256
1268
  }
1257
1269
 
1258
- /** One bounded physical page from the host's incremental JSONL reader. */
1270
+ /** One bounded page from the host's stored transcript reader. */
1259
1271
  declare interface KayAppCorpusEntryBatch {
1260
1272
  readonly entries: readonly TranscriptEntry[];
1261
1273
  /** Opaque JSON cursor after the physical page; only the host may interpret it or open its path. */
@@ -1758,13 +1770,7 @@ declare interface MessageEntry extends EntryBase {
1758
1770
  /** TypeBox instantiation metrics */
1759
1771
  declare const Metrics: TMetrics;
1760
1772
 
1761
- /**
1762
- * A hidden kernel statement delivered before resuming a tool-requested compaction stop.
1763
- *
1764
- * Module-local, unlike every sibling above it: this message is never rendered and never matched
1765
- * by name outside this file, so exporting the string would only publish something no surface
1766
- * consumes. It earns an export the day one needs to recognise it.
1767
- */
1773
+ /** A hidden kernel statement delivered before resuming a tool-requested compaction stop. */
1768
1774
  declare const MID_TURN_COMPACTION_OUTCOME_CUSTOM_TYPE = "mid_turn_compaction_outcome";
1769
1775
 
1770
1776
  declare interface MidTurnCompactionOutcomeDetails {
@@ -2424,6 +2430,34 @@ declare function ReturnType_2<Type extends TSchema>(type: Type, options?: TSchem
2424
2430
  /** Creates a deferred ReturnType action. */
2425
2431
  declare function ReturnTypeDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TReturnTypeDeferred<Type>;
2426
2432
 
2433
+ /**
2434
+ * The hidden message a continued run rides as its admission ticket (a mid-turn compaction
2435
+ * resume, a run-recovery re-drive). The engine writes it; this package's placement rows keep it
2436
+ * out of the canonical transcript.
2437
+ */
2438
+ declare const RUN_CONTINUATION_CARRIER_CUSTOM_TYPE = "herd_run_continuation";
2439
+
2440
+ /**
2441
+ * What a {@link RUN_CONTINUATION_CARRIER_CUSTOM_TYPE} carrier records about the failed turns it
2442
+ * continues.
2443
+ */
2444
+ declare interface RunContinuationCarrierDetails {
2445
+ readonly provenance: {
2446
+ readonly source: "core";
2447
+ };
2448
+ /**
2449
+ * Visible text the failed turns since the previous carrier streamed before they died. Absent
2450
+ * when they showed none (thinking, an unexecuted tool call, or a thrown attempt): such a
2451
+ * carrier is plain.
2452
+ */
2453
+ readonly shownText?: string;
2454
+ }
2455
+
2456
+ declare type RunContinuationCarrierMessage = CustomMessage<RunContinuationCarrierDetails> & {
2457
+ readonly customType: typeof RUN_CONTINUATION_CARRIER_CUSTOM_TYPE;
2458
+ readonly display: false;
2459
+ };
2460
+
2427
2461
  /**
2428
2462
  * A durable runtime notice: the daemon telling the HUMAN, in the transcript,
2429
2463
  * that something it was going to do on their behalf did not happen — and why.
@@ -2884,6 +2918,7 @@ declare const SessionProvenanceRecord: z.ZodObject<{
2884
2918
  cron: "cron";
2885
2919
  occurrence: "occurrence";
2886
2920
  "uri-change": "uri-change";
2921
+ "plugin-event": "plugin-event";
2887
2922
  manual: "manual";
2888
2923
  }>;
2889
2924
  }, z.core.$strict>, z.ZodObject<{