@vincemakes/kiso-runtime 0.15.4 → 0.15.5

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/store.d.ts CHANGED
@@ -66,6 +66,20 @@ export interface SessionMeta {
66
66
  readonly createdAt: number;
67
67
  readonly updatedAt: number;
68
68
  }
69
+ /**
70
+ * The session's title — its first substantive prompt.
71
+ *
72
+ * Exported on the INTERNAL entry (never the public root: this is a
73
+ * projection helper, not an API the runtime wants to support forever —
74
+ * and adding it to the root surface is a ritual the api-surface gate
75
+ * rightly refused). It has two consumers and may only have one
76
+ * definition: `list()` below, which is what `kiso sessions` prints, and
77
+ * the CLI's session-card projection, which is what the resume PICKER
78
+ * shows. They were allowed to differ once — the listing got the title
79
+ * and the picker kept showing bare ids, so the fix reached the surface
80
+ * nobody uses and missed the one everybody does.
81
+ */
82
+ export declare function sessionTitle(records: readonly StoreRecord[]): string;
69
83
  export declare class SessionStore {
70
84
  #private;
71
85
  readonly root: string;
package/dist/store.js CHANGED
@@ -86,7 +86,20 @@ const ID_PATTERN = /^[A-Za-z0-9._-]+$/;
86
86
  const MIN_TITLE_CHARS = 4;
87
87
  const ASCII_OPENER = /^\s*(hi|hey|hello|yo|hiya|howdy|ping|test|ok|okay|thanks|thx)[\s!.,?~]*$/i;
88
88
  const isOpener = (t) => [...t].length < MIN_TITLE_CHARS || ASCII_OPENER.test(t);
89
- function titleOf(records) {
89
+ /**
90
+ * The session's title — its first substantive prompt.
91
+ *
92
+ * Exported on the INTERNAL entry (never the public root: this is a
93
+ * projection helper, not an API the runtime wants to support forever —
94
+ * and adding it to the root surface is a ritual the api-surface gate
95
+ * rightly refused). It has two consumers and may only have one
96
+ * definition: `list()` below, which is what `kiso sessions` prints, and
97
+ * the CLI's session-card projection, which is what the resume PICKER
98
+ * shows. They were allowed to differ once — the listing got the title
99
+ * and the picker kept showing bare ids, so the fix reached the surface
100
+ * nobody uses and missed the one everybody does.
101
+ */
102
+ export function sessionTitle(records) {
90
103
  const asked = records
91
104
  .map((r) => r.event)
92
105
  .filter((e) => e.type === "user_input" && typeof e.content === "string")
@@ -330,7 +343,7 @@ export class SessionStore {
330
343
  continue;
331
344
  metas.push({
332
345
  id,
333
- title: titleOf(records),
346
+ title: sessionTitle(records),
334
347
  events: records.length,
335
348
  runs: new Set(records.map((r) => r.runId)).size,
336
349
  createdAt: records[0]?.ts ?? 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-runtime",
3
- "version": "0.15.4",
3
+ "version": "0.15.5",
4
4
  "description": "kiso runtime \u2014 durable multi-turn agent sessions: AgentDefinition, AgentRuntime, AgentSession, Run, append-only JSONL store.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -25,11 +25,11 @@
25
25
  "test": "vitest run"
26
26
  },
27
27
  "dependencies": {
28
- "@vincemakes/kiso-core": "0.15.4"
28
+ "@vincemakes/kiso-core": "0.15.5"
29
29
  },
30
30
  "peerDependencies": {
31
- "@vincemakes/kiso-provider-anthropic": "0.15.4",
32
- "@vincemakes/kiso-provider-openai": "0.15.4"
31
+ "@vincemakes/kiso-provider-anthropic": "0.15.5",
32
+ "@vincemakes/kiso-provider-openai": "0.15.5"
33
33
  },
34
34
  "peerDependenciesMeta": {
35
35
  "@vincemakes/kiso-provider-anthropic": {
@@ -40,7 +40,7 @@
40
40
  }
41
41
  },
42
42
  "devDependencies": {
43
- "@vincemakes/kiso-evals": "0.15.4",
43
+ "@vincemakes/kiso-evals": "0.15.5",
44
44
  "@types/node": "^26.1.2",
45
45
  "typescript": "^5.7.2",
46
46
  "vitest": "^3.0.0"