@yaklabs-ai/plugin-sdk 0.15.1 → 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.
@@ -114,14 +114,13 @@ declare interface TranscriptSourceEntryLike extends TranscriptTreeEntryLike {
114
114
 
115
115
  /**
116
116
  * A session entry as {@link branchEntryIds} reads it: the fields above plus the
117
- * tree links the walk follows to find the active branch. No timestamp: the walk
118
- * never reads one, and a live v2 entry carries epoch milliseconds where a raw
119
- * v3 log carries an ISO string, so requiring either shape here would force one
117
+ * parent link the walk follows to find the active branch. No timestamp: the walk
118
+ * never reads one, and callers hold entries whose timestamp is epoch
119
+ * milliseconds or an ISO string, so requiring either shape here would force one
120
120
  * class of caller to convert entries it only wants walked.
121
121
  */
122
122
  declare interface TranscriptTreeEntryLike extends TranscriptEntryLike {
123
123
  readonly parentId?: string | null;
124
- readonly targetId?: string | null;
125
124
  }
126
125
 
127
126
  export { }
@@ -14,7 +14,7 @@ function branchEntryIds(entries) {
14
14
  return EMPTY_BRANCH_IDS;
15
15
  const byId = new Map(entries.map((entry) => [entry.id, entry]));
16
16
  const onBranch = /* @__PURE__ */ new Set();
17
- let cursor = last.type === "leaf" ? last.targetId ?? null : last.id;
17
+ let cursor = last.id;
18
18
  while (cursor !== null && !onBranch.has(cursor)) {
19
19
  onBranch.add(cursor);
20
20
  cursor = byId.get(cursor)?.parentId ?? null;
@@ -3,8 +3,8 @@ import { z } from 'zod';
3
3
  export declare const ATTACHMENTS_CUSTOM_TYPE = "attachments";
4
4
 
5
5
  /**
6
- * The ids on a session's active branch: the leaf chain walked parent-ward from
7
- * the tip, which a trailing `leaf` marker moves. Empty for an empty log.
6
+ * The ids on a session's active branch: the parent chain walked from the tip,
7
+ * the last entry. Empty for an empty log.
8
8
  *
9
9
  * One walk shared by every reader of "is this entry still live", so a rewind
10
10
  * means the same thing to every projection that calls it. Self-guarding
@@ -106,14 +106,13 @@ export declare interface TranscriptSourceEntryLike extends TranscriptTreeEntryLi
106
106
 
107
107
  /**
108
108
  * A session entry as {@link branchEntryIds} reads it: the fields above plus the
109
- * tree links the walk follows to find the active branch. No timestamp: the walk
110
- * never reads one, and a live v2 entry carries epoch milliseconds where a raw
111
- * v3 log carries an ISO string, so requiring either shape here would force one
109
+ * parent link the walk follows to find the active branch. No timestamp: the walk
110
+ * never reads one, and callers hold entries whose timestamp is epoch
111
+ * milliseconds or an ISO string, so requiring either shape here would force one
112
112
  * class of caller to convert entries it only wants walked.
113
113
  */
114
114
  declare interface TranscriptTreeEntryLike extends TranscriptEntryLike {
115
115
  readonly parentId?: string | null;
116
- readonly targetId?: string | null;
117
116
  }
118
117
 
119
118
  /**
@@ -27,7 +27,7 @@ function branchEntryIds(entries) {
27
27
  return EMPTY_BRANCH_IDS;
28
28
  const byId = new Map(entries.map((entry) => [entry.id, entry]));
29
29
  const onBranch = /* @__PURE__ */ new Set();
30
- let cursor = last.type === "leaf" ? last.targetId ?? null : last.id;
30
+ let cursor = last.id;
31
31
  while (cursor !== null && !onBranch.has(cursor)) {
32
32
  onBranch.add(cursor);
33
33
  cursor = byId.get(cursor)?.parentId ?? null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaklabs-ai/plugin-sdk",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "description": "The Kay plugin SDK — types and helpers for authoring a Kay directory plugin.",
5
5
  "author": "YakLabs",
6
6
  "type": "module",
@@ -45,6 +45,10 @@
45
45
  "types": "./dist/transcript.d.ts",
46
46
  "default": "./dist/transcript.js"
47
47
  },
48
+ "./canonical-transcript": {
49
+ "types": "./dist/canonical-transcript.d.ts",
50
+ "default": "./dist/canonical-transcript.js"
51
+ },
48
52
  "./time": {
49
53
  "types": "./dist/time.d.ts",
50
54
  "default": "./dist/time.js"