@pi-archimedes/session-name 2.2.0 → 2.4.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 CHANGED
@@ -33,9 +33,10 @@ After a conversation ends (`agent_end`), the extension extracts the first user m
33
33
 
34
34
  | Setting | Type | Default | Description |
35
35
  |---------|------|---------|-------------|
36
- | `enabled` | bool | `true` | Enable automatic session naming |
37
36
  | `model` | string | _(current model)_ | Override model for title generation (e.g., `openai/gpt-4o-mini`) |
38
37
 
38
+ On/off is managed by the suite: toggle via `/plugins` (`archimedes.sessionName.enabled`, default on).
39
+
39
40
  Settings are stored in `~/.pi/agent/settings.json` under the `archimedes.sessionName` namespace.
40
41
 
41
42
  ## Integration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-archimedes/session-name",
3
- "version": "2.2.0",
3
+ "version": "2.4.0",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -14,7 +14,7 @@
14
14
  ".": "./src/index.ts"
15
15
  },
16
16
  "dependencies": {
17
- "@pi-archimedes/core": "2.2.0"
17
+ "@pi-archimedes/core": "2.4.0"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@earendil-works/pi-coding-agent": ">=0.1.0",
@@ -22,6 +22,9 @@
22
22
  "@earendil-works/pi-tui": ">=0.1.0"
23
23
  },
24
24
  "devDependencies": {
25
+ "@earendil-works/pi-ai": "^0.84.2",
26
+ "@earendil-works/pi-coding-agent": "^0.84.2",
27
+ "@earendil-works/pi-tui": "^0.84.2",
25
28
  "typescript": "^6.0.0"
26
29
  },
27
30
  "pi": {
package/src/index.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { complete } from "@earendil-works/pi-ai";
1
+ import { complete } from "@earendil-works/pi-ai/compat";
2
+ import type { ProviderHeaders } from "@earendil-works/pi-ai";
2
3
  import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
3
4
  import { loadConfig } from "@pi-archimedes/core/settings-io";
4
5
  import type { SettingItem } from "@earendil-works/pi-tui";
@@ -6,12 +7,12 @@ import type { SettingItem } from "@earendil-works/pi-tui";
6
7
  // ── Config ──────────────────────────────────────────────────────────────────
7
8
 
8
9
  export interface SessionNameSettings {
10
+ // suite-managed by meta's plugin gate (archimedes.sessionName.enabled — see ADR 0012); session-name never reads this
9
11
  enabled?: boolean | undefined;
10
12
  model?: string | undefined;
11
13
  }
12
14
 
13
15
  const DEFAULT_SESSION_NAME_CONFIG: SessionNameSettings = {
14
- enabled: true,
15
16
  model: undefined,
16
17
  };
17
18
 
@@ -84,9 +85,6 @@ async function generateTitle(
84
85
  try {
85
86
  const settings = loadSessionNameConfig();
86
87
 
87
- // Guard: feature disabled
88
- if (!settings.enabled) return;
89
-
90
88
  // 1. Build conversation text — first user + assistant exchange only
91
89
  const branch = ctx.sessionManager.getBranch();
92
90
  const userLines: string[] = [];
@@ -161,7 +159,7 @@ async function generateTitle(
161
159
  if (!auth.ok) return;
162
160
 
163
161
  // 6. Make API call
164
- const opts: { reasoning: "minimal"; cacheRetention: "none"; sessionId: string; apiKey?: string; headers?: Record<string, string> } = {
162
+ const opts: { reasoning: "minimal"; cacheRetention: "none"; sessionId: string; apiKey?: string; headers?: ProviderHeaders } = {
165
163
  reasoning: "minimal",
166
164
  cacheRetention: "none",
167
165
  sessionId: crypto.randomUUID(),
@@ -243,13 +241,6 @@ export default registerSessionName;
243
241
  /** Build settings UI items for the session-name package. */
244
242
  export function getSessionNameSettingsItems(config: SessionNameSettings): SettingItem[] {
245
243
  return [
246
- {
247
- id: "sessionNameEnabled",
248
- label: "Auto session naming",
249
- description: "Auto-generate session titles after the first exchange",
250
- currentValue: config.enabled ? "On" : "Off",
251
- values: ["On", "Off"],
252
- },
253
244
  {
254
245
  id: "sessionNameModel",
255
246
  label: "Model for naming",