@jmfederico/pi-web 1.202610.4 → 1.202610.6

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.
Files changed (106) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/client/assets/classic-CyM97Akm.css +54 -0
  3. package/dist/client/assets/graphite-DquaqFXU.css +54 -0
  4. package/dist/client/assets/index-BAYF7oXL.js +4394 -0
  5. package/dist/client/assets/paper-CB1oLuRr.css +54 -0
  6. package/dist/client/assets/pi-web-dark-D_KtbM95.css +54 -0
  7. package/dist/client/assets/pi-web-light-DSNLMIBI.css +54 -0
  8. package/dist/client/index.html +2 -2
  9. package/dist/config.js +56 -0
  10. package/dist/config.js.map +1 -1
  11. package/dist/pi-packages/captains-log/dist/browser/index.js +13 -17
  12. package/dist/pi-packages/captains-log/dist/browser/panel.js +7 -11
  13. package/dist/pi-packages/relays/pi-web-plugin.js +21 -1
  14. package/dist/pi-packages/relays/relaysPanelElement.js +36 -32
  15. package/dist/pi-packages/workflows/browser/pi-web-plugin.js +35 -27
  16. package/dist/pi-packages/workflows/browser/worktreeDialog.js +156 -0
  17. package/dist/pi-packages/workflows/package.json +1 -0
  18. package/dist/pi-packages/workflows/prompts/worktree.md +11 -2
  19. package/dist/pi-packages/workflows/server-plugin.js +579 -0
  20. package/dist/pi-packages/workflows/vite.config.mjs +17 -0
  21. package/dist/pi-web-plugins/code-highlight/browser/pi-web-plugin.js +22 -0
  22. package/dist/pi-web-plugins/code-highlight/package.json +13 -0
  23. package/dist/pi-web-plugins/files/browser/pi-web-plugin.js +119 -162
  24. package/dist/pi-web-plugins/git/browser/git-panel.js +61 -46
  25. package/dist/pi-web-plugins/git/browser/pi-web-plugin.js +25 -3
  26. package/dist/pi-web-plugins/git/git-backend.js +13 -1
  27. package/dist/pi-web-plugins/git/server-plugin.js +8 -1
  28. package/dist/pi-web-plugins/mermaid/browser/pi-web-plugin.js +8 -3
  29. package/dist/pi-web-plugins/terminal/browser/pi-web-plugin.js +50 -29
  30. package/dist/pi-web-plugins/updates/pi-web-plugin.js +11 -11
  31. package/dist/pi-web-plugins/workspace-tasks/pi-web-plugin.js +21 -1
  32. package/dist/pi-web-plugins/workspace-tasks/tasksPanelElement.js +35 -19
  33. package/dist/piWebUpdate.js +32 -9
  34. package/dist/piWebUpdate.js.map +1 -1
  35. package/dist/plugin-api.d.ts +174 -45
  36. package/dist/server/browserMessageProjection.js +1 -1
  37. package/dist/server/browserMessageProjection.js.map +1 -1
  38. package/dist/server/configRoutes.js +7 -1
  39. package/dist/server/configRoutes.js.map +1 -1
  40. package/dist/server/machines/machineProxyRoutes.js +3 -2
  41. package/dist/server/machines/machineProxyRoutes.js.map +1 -1
  42. package/dist/server/piWebPluginService.js +7 -1
  43. package/dist/server/piWebPluginService.js.map +1 -1
  44. package/dist/server/plugins/pluginBackendChannelProxyAdmission.js +1 -1
  45. package/dist/server/plugins/pluginBackendChannelProxyAdmission.js.map +1 -1
  46. package/dist/server/plugins/pluginBackendChannelProxyRoutes.js +31 -38
  47. package/dist/server/plugins/pluginBackendChannelProxyRoutes.js.map +1 -1
  48. package/dist/server/plugins/pluginBackendProxyRoutes.js +38 -45
  49. package/dist/server/plugins/pluginBackendProxyRoutes.js.map +1 -1
  50. package/dist/server/plugins/pluginBackendRegistry.js +58 -34
  51. package/dist/server/plugins/pluginBackendRegistry.js.map +1 -1
  52. package/dist/server/plugins/serverPluginCatalogCapability.js +106 -0
  53. package/dist/server/plugins/serverPluginCatalogCapability.js.map +1 -0
  54. package/dist/server/plugins/serverPluginRuntime.js +21 -8
  55. package/dist/server/plugins/serverPluginRuntime.js.map +1 -1
  56. package/dist/server/sessiond/pluginBackendChannelRoutes.js +24 -14
  57. package/dist/server/sessiond/pluginBackendChannelRoutes.js.map +1 -1
  58. package/dist/server/sessiond/pluginBackendRoutes.js +51 -47
  59. package/dist/server/sessiond/pluginBackendRoutes.js.map +1 -1
  60. package/dist/server/sessiond/pluginCatalogRoutes.js +37 -0
  61. package/dist/server/sessiond/pluginCatalogRoutes.js.map +1 -0
  62. package/dist/server/sessiond/sessionProxyRoutes.js +17 -0
  63. package/dist/server/sessiond/sessionProxyRoutes.js.map +1 -1
  64. package/dist/server/sessiond/sessionServiceDependencies.js +1 -0
  65. package/dist/server/sessiond/sessionServiceDependencies.js.map +1 -1
  66. package/dist/server/sessiond.js +24 -4
  67. package/dist/server/sessiond.js.map +1 -1
  68. package/dist/server/sessions/authRoutes.js +1 -0
  69. package/dist/server/sessions/authRoutes.js.map +1 -1
  70. package/dist/server/sessions/authService.js +13 -0
  71. package/dist/server/sessions/authService.js.map +1 -1
  72. package/dist/server/sessions/builtinExtensionFactories.js +15 -1
  73. package/dist/server/sessions/builtinExtensionFactories.js.map +1 -1
  74. package/dist/server/sessions/companionBackend.js +286 -0
  75. package/dist/server/sessions/companionBackend.js.map +1 -0
  76. package/dist/server/sessions/mcpAuthFlowService.js +237 -0
  77. package/dist/server/sessions/mcpAuthFlowService.js.map +1 -0
  78. package/dist/server/sessions/mcpAuthRoutes.js +76 -0
  79. package/dist/server/sessions/mcpAuthRoutes.js.map +1 -0
  80. package/dist/server/sessions/messageHistoryTarget.js +18 -1
  81. package/dist/server/sessions/messageHistoryTarget.js.map +1 -1
  82. package/dist/server/sessions/piSessionEventConnections.js +5 -2
  83. package/dist/server/sessions/piSessionEventConnections.js.map +1 -1
  84. package/dist/server/sessions/piSessionService.js +279 -22
  85. package/dist/server/sessions/piSessionService.js.map +1 -1
  86. package/dist/server/sessions/sessionCommandService.js +3 -17
  87. package/dist/server/sessions/sessionCommandService.js.map +1 -1
  88. package/dist/server/sessions/sessionNameGenerator.js +4 -4
  89. package/dist/server/sessions/sessionNameGenerator.js.map +1 -1
  90. package/dist/server-plugin-api.d.ts +65 -15
  91. package/dist/server-plugin-api.js +25 -0
  92. package/dist/server-plugin-api.js.map +1 -1
  93. package/dist/shared/apiTypes.js.map +1 -1
  94. package/dist/shared/federatedRoutes.js +17 -5
  95. package/dist/shared/federatedRoutes.js.map +1 -1
  96. package/dist/shared/pluginApiTypes.d.ts +53 -0
  97. package/dist/shared/pluginBackendProtocol.js +56 -1
  98. package/dist/shared/pluginBackendProtocol.js.map +1 -1
  99. package/dist/shared/pluginCatalogTypes.d.ts +49 -0
  100. package/dist/shared/pluginCatalogTypes.js +156 -0
  101. package/dist/shared/pluginCatalogTypes.js.map +1 -0
  102. package/docs/config.md +68 -2
  103. package/docs/plugins.md +382 -20
  104. package/examples/session-bridge-plugin/src/browser/index.ts +1 -1
  105. package/package.json +7 -12
  106. package/dist/client/assets/index-BAl5IbYx.js +0 -4429
@@ -47,6 +47,58 @@ export const PLUGIN_BACKEND_CHANNEL_ERROR_MESSAGE_MAX_BYTES = 2_048;
47
47
  export const PLUGIN_BACKEND_CHANNEL_ERROR_CODE_MAX_LENGTH = 64;
48
48
  export const PAIRED_PLUGIN_BACKEND_REQUEST_ROUTE_PATH = "/paired-plugin-backends/:pluginId/projects/:projectId/workspaces/:workspaceId/:operation";
49
49
  export const PAIRED_PLUGIN_BACKEND_CHANNEL_ROUTE_PATH = "/paired-plugin-backends/:pluginId/projects/:projectId/workspaces/:workspaceId/channels/:operation";
50
+ export const PAIRED_PLUGIN_BACKEND_REQUEST_ROUTE_PATHS = Object.freeze([
51
+ "/paired-plugin-backends/:pluginId/:operation",
52
+ "/paired-plugin-backends/:pluginId/projects/:projectId/:operation",
53
+ PAIRED_PLUGIN_BACKEND_REQUEST_ROUTE_PATH,
54
+ ]);
55
+ export const PAIRED_PLUGIN_BACKEND_CHANNEL_ROUTE_PATHS = Object.freeze([
56
+ "/paired-plugin-backends/:pluginId/channels/:operation",
57
+ "/paired-plugin-backends/:pluginId/projects/:projectId/channels/:operation",
58
+ PAIRED_PLUGIN_BACKEND_CHANNEL_ROUTE_PATH,
59
+ ]);
60
+ /** Validate explicit wire authority without accepting browser-supplied paths. */
61
+ export function parsePluginBackendScopeSelection(value) {
62
+ const scope = value["scope"];
63
+ const projectId = value["projectId"];
64
+ const workspaceId = value["workspaceId"];
65
+ if (scope === undefined && projectId === undefined && workspaceId === undefined)
66
+ return {};
67
+ if (scope !== "machine" && scope !== "project" && scope !== "workspace")
68
+ throw new Error("Plugin backend scope must be machine, project, or workspace");
69
+ for (const id of [projectId, workspaceId]) {
70
+ if (id !== undefined && (typeof id !== "string" || id === "" || id.length > 512))
71
+ throw new Error("Plugin backend scope ids must be non-empty strings of at most 512 characters");
72
+ }
73
+ if (scope === "machine" && (projectId !== undefined || workspaceId !== undefined))
74
+ throw new Error("Machine scope cannot contain project or workspace ids");
75
+ if (scope === "project" && workspaceId !== undefined)
76
+ throw new Error("Project scope cannot contain a workspace id");
77
+ return { scope, ...(typeof projectId === "string" ? { projectId } : {}), ...(typeof workspaceId === "string" ? { workspaceId } : {}) };
78
+ }
79
+ export function pluginBackendScopeFromRoute(selection, wire) {
80
+ const scope = selection.workspaceId !== undefined ? "workspace" : selection.projectId !== undefined ? "project" : "machine";
81
+ if (wire === undefined)
82
+ return scope;
83
+ if (scope !== "workspace" && wire.scope === undefined)
84
+ throw new Error("Scoped plugin backend calls require an explicit scope");
85
+ if ((wire.scope !== undefined && wire.scope !== scope)
86
+ || (wire.projectId !== undefined && wire.projectId !== selection.projectId)
87
+ || (wire.workspaceId !== undefined && wire.workspaceId !== selection.workspaceId))
88
+ throw new Error("Plugin backend wire scope does not match route authority");
89
+ return scope;
90
+ }
91
+ export function pairedPluginBackendPath(selection, channel = false) {
92
+ const segments = ["", "paired-plugin-backends", encodeURIComponent(selection.pluginId)];
93
+ if (selection.projectId !== undefined)
94
+ segments.push("projects", encodeURIComponent(selection.projectId));
95
+ if (selection.workspaceId !== undefined)
96
+ segments.push("workspaces", encodeURIComponent(selection.workspaceId));
97
+ if (channel)
98
+ segments.push("channels");
99
+ segments.push(encodeURIComponent(selection.operation));
100
+ return segments.join("/");
101
+ }
50
102
  const OPERATION_PATTERN = /^[a-z][a-z0-9.-]*$/u;
51
103
  const CHANNEL_ERROR_CODE_PATTERN = /^[a-z][a-z0-9.-]*$/u;
52
104
  const MAX_JSON_DEPTH = 64;
@@ -94,14 +146,16 @@ export function parsePluginBackendRequestEnvelope(value) {
94
146
  if (!isPlainRecord(value))
95
147
  throw new Error("Plugin backend request body must be an object");
96
148
  return Object.freeze({
149
+ ...parsePluginBackendScopeSelection(value),
97
150
  revision: requirePluginBackendRevision(value["revision"]),
98
151
  input: cloneBoundedPluginBackendJson(value["input"], "Plugin backend request input"),
99
152
  });
100
153
  }
101
- export function serializePluginBackendChannelOpenEnvelope(revision, input) {
154
+ export function serializePluginBackendChannelOpenEnvelope(revision, input, selection = {}) {
102
155
  return serializePluginBackendChannelEnvelope({
103
156
  version: 1,
104
157
  kind: "open",
158
+ ...parsePluginBackendScopeSelection({ ...selection }),
105
159
  revision: requirePluginBackendRevision(revision),
106
160
  input: cloneBoundedPluginBackendJson(input, "Plugin backend channel open input", PLUGIN_BACKEND_JSON_MAX_BYTES),
107
161
  }, "Plugin backend channel open envelope", PLUGIN_BACKEND_CHANNEL_OPEN_FRAME_MAX_BYTES);
@@ -129,6 +183,7 @@ export function parsePluginBackendChannelClientEnvelope(text) {
129
183
  return Object.freeze({
130
184
  version: 1,
131
185
  kind: "open",
186
+ ...parsePluginBackendScopeSelection(value),
132
187
  revision: requirePluginBackendRevision(value["revision"]),
133
188
  input: cloneBoundedPluginBackendJson(value["input"], "Plugin backend channel open input", PLUGIN_BACKEND_JSON_MAX_BYTES),
134
189
  });
@@ -1 +1 @@
1
- {"version":3,"file":"pluginBackendProtocol.js","sourceRoot":"","sources":["../../src/shared/pluginBackendProtocol.ts"],"names":[],"mappings":"AAEA,+DAA+D;AAC/D,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,GAAG,IAAI,CAAC;AACxD,0FAA0F;AAC1F,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AACtE,+EAA+E;AAC/E,MAAM,CAAC,MAAM,qCAAqC,GAAG,6BAA6B,GA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KAAK,IAAI,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,49 @@
1
+ import type { PluginCapability, SessionUiMetadata, WorkspaceProviderMetadata, WorkspaceRemovalPresentation } from "./pluginApiTypes.js";
2
+ export interface PluginCatalogProject {
3
+ readonly id: string;
4
+ readonly name: string;
5
+ readonly path: string;
6
+ }
7
+ export interface PluginCatalogWorkspace {
8
+ readonly id: string;
9
+ readonly projectId: string;
10
+ readonly path: string;
11
+ readonly label: string;
12
+ readonly isMain: boolean;
13
+ readonly provider?: WorkspaceProviderMetadata;
14
+ readonly removal?: WorkspaceRemovalPresentation;
15
+ }
16
+ export interface PluginSessionSnapshot {
17
+ readonly id: string;
18
+ readonly cwd: string;
19
+ readonly name?: string;
20
+ readonly metadata?: SessionUiMetadata;
21
+ readonly archived: boolean;
22
+ readonly runtime: "not-hosted" | "idle" | "busy";
23
+ }
24
+ export interface PluginWorkspaceSelection {
25
+ readonly projectId: string;
26
+ readonly workspaceId: string;
27
+ }
28
+ export interface PluginSessionSelection extends PluginWorkspaceSelection {
29
+ readonly sessionId: string;
30
+ }
31
+ export interface PluginCatalogReadOptions {
32
+ readonly signal?: AbortSignal;
33
+ }
34
+ export interface PluginCatalogV1 {
35
+ readonly version: 1;
36
+ readonly projects: {
37
+ readonly list: (options?: PluginCatalogReadOptions) => Promise<readonly PluginCatalogProject[]>;
38
+ readonly get: (projectId: string, options?: PluginCatalogReadOptions) => Promise<PluginCatalogProject>;
39
+ };
40
+ readonly workspaces: {
41
+ readonly list: (projectId: string, options?: PluginCatalogReadOptions) => Promise<readonly PluginCatalogWorkspace[]>;
42
+ readonly get: (selection: PluginWorkspaceSelection, options?: PluginCatalogReadOptions) => Promise<PluginCatalogWorkspace>;
43
+ };
44
+ readonly sessions: {
45
+ readonly list: (selection: PluginWorkspaceSelection, options?: PluginCatalogReadOptions) => Promise<readonly PluginSessionSnapshot[]>;
46
+ readonly get: (selection: PluginSessionSelection, options?: PluginCatalogReadOptions) => Promise<PluginSessionSnapshot>;
47
+ };
48
+ }
49
+ export declare const PI_WEB_HOST_CATALOG_CAPABILITY: PluginCapability<PluginCatalogV1, 1>;
@@ -0,0 +1,156 @@
1
+ export const PI_WEB_HOST_CATALOG_CAPABILITY = Object.freeze({
2
+ pluginId: "pi-web.host",
3
+ id: "catalog",
4
+ version: 1,
5
+ parse: snapshotCatalog,
6
+ });
7
+ function snapshotCatalog(value) {
8
+ const catalog = record(value);
9
+ if (catalog["version"] !== 1)
10
+ throw invalid();
11
+ const projects = methods(catalog["projects"]);
12
+ const workspaces = methods(catalog["workspaces"]);
13
+ const sessions = methods(catalog["sessions"]);
14
+ return Object.freeze({
15
+ version: 1,
16
+ projects: Object.freeze({
17
+ list: async (options) => array(await projects.list(options), snapshotProject),
18
+ get: async (projectId, options) => {
19
+ const id = text(projectId);
20
+ const result = snapshotProject(await projects.get(id, options));
21
+ if (result.id !== id)
22
+ throw invalid();
23
+ return result;
24
+ },
25
+ }),
26
+ workspaces: Object.freeze({
27
+ list: async (projectId, options) => {
28
+ const id = text(projectId);
29
+ return array(await workspaces.list(id, options), (row) => workspaceFor(row, id));
30
+ },
31
+ get: async (selection, options) => {
32
+ const requested = snapshotSelection(selection);
33
+ const result = workspaceFor(await workspaces.get(requested, options), requested.projectId);
34
+ if (result.id !== requested.workspaceId)
35
+ throw invalid();
36
+ return result;
37
+ },
38
+ }),
39
+ sessions: Object.freeze({
40
+ list: async (selection, options) => array(await sessions.list(snapshotSelection(selection), options), snapshotSession),
41
+ get: async (selection, options) => {
42
+ const requested = snapshotSelection(selection, true);
43
+ const result = snapshotSession(await sessions.get(requested, options));
44
+ if (result.id !== requested.sessionId)
45
+ throw invalid();
46
+ return result;
47
+ },
48
+ }),
49
+ });
50
+ }
51
+ function methods(value) {
52
+ const owner = record(value);
53
+ const list = owner["list"];
54
+ const get = owner["get"];
55
+ if (typeof list !== "function" || typeof get !== "function")
56
+ throw invalid();
57
+ return {
58
+ list: (...args) => Promise.resolve(Reflect.apply(list, owner, args)),
59
+ get: (...args) => Promise.resolve(Reflect.apply(get, owner, args)),
60
+ };
61
+ }
62
+ function snapshotProject(value) {
63
+ const row = record(value);
64
+ return Object.freeze({ id: text(row["id"]), name: text(row["name"]), path: text(row["path"]) });
65
+ }
66
+ function workspaceFor(value, projectId) {
67
+ const row = record(value);
68
+ if (row["projectId"] !== projectId || typeof row["isMain"] !== "boolean")
69
+ throw invalid();
70
+ let provider;
71
+ if (row["provider"] !== undefined) {
72
+ const source = record(row["provider"]);
73
+ const capabilities = record(source["capabilities"]);
74
+ if (typeof capabilities["remove"] !== "boolean")
75
+ throw invalid();
76
+ provider = Object.freeze({
77
+ pluginId: text(source["pluginId"]),
78
+ capabilities: Object.freeze({ remove: capabilities["remove"] }),
79
+ ...(source["metadata"] === undefined ? {} : { metadata: jsonObject(source["metadata"]) }),
80
+ });
81
+ }
82
+ const removal = row["removal"] === undefined ? undefined : record(row["removal"]);
83
+ return Object.freeze({
84
+ id: text(row["id"]), projectId, path: text(row["path"]), label: text(row["label"]), isMain: row["isMain"],
85
+ ...(provider === undefined ? {} : { provider }),
86
+ ...(removal === undefined ? {} : { removal: Object.freeze({ actionLabel: text(removal["actionLabel"]), confirmation: text(removal["confirmation"]) }) }),
87
+ });
88
+ }
89
+ function snapshotSession(value) {
90
+ const row = record(value);
91
+ const runtime = row["runtime"];
92
+ if (typeof row["archived"] !== "boolean" || (runtime !== "not-hosted" && runtime !== "idle" && runtime !== "busy"))
93
+ throw invalid();
94
+ let metadata;
95
+ if (row["metadata"] !== undefined) {
96
+ metadata = Object.freeze(Object.fromEntries(Object.entries(record(row["metadata"])).map(([key, data]) => [key, jsonObject(data)])));
97
+ }
98
+ if (row["name"] !== undefined && typeof row["name"] !== "string")
99
+ throw invalid();
100
+ return Object.freeze({
101
+ id: text(row["id"]), cwd: text(row["cwd"]), archived: row["archived"], runtime,
102
+ ...(row["name"] === undefined ? {} : { name: row["name"] }),
103
+ ...(metadata === undefined ? {} : { metadata }),
104
+ });
105
+ }
106
+ function snapshotSelection(value, session = false) {
107
+ const row = record(value);
108
+ const keys = session ? ["projectId", "workspaceId", "sessionId"] : ["projectId", "workspaceId"];
109
+ if (Reflect.ownKeys(row).some((key) => typeof key !== "string" || !keys.includes(key)))
110
+ throw invalid();
111
+ return Object.freeze({ projectId: text(row["projectId"]), workspaceId: text(row["workspaceId"]), ...(session ? { sessionId: text(row["sessionId"]) } : {}) });
112
+ }
113
+ function array(value, snapshot) {
114
+ if (!Array.isArray(value))
115
+ throw invalid();
116
+ return Object.freeze(value.map(snapshot));
117
+ }
118
+ function record(value) {
119
+ if (!isRecord(value))
120
+ throw invalid();
121
+ return value;
122
+ }
123
+ function isRecord(value) {
124
+ if (typeof value !== "object" || value === null || Array.isArray(value))
125
+ return false;
126
+ const prototype = Object.getPrototypeOf(value);
127
+ return prototype === Object.prototype || prototype === null;
128
+ }
129
+ function text(value) {
130
+ if (typeof value !== "string" || value.trim() === "")
131
+ throw invalid();
132
+ return value;
133
+ }
134
+ function jsonObject(value, ancestors = new Set()) {
135
+ const source = record(value);
136
+ if (ancestors.has(source))
137
+ throw invalid();
138
+ ancestors.add(source);
139
+ const result = Object.freeze(Object.fromEntries(Object.entries(source).map(([key, data]) => [key, json(data, ancestors)])));
140
+ ancestors.delete(source);
141
+ return result;
142
+ }
143
+ function json(value, ancestors) {
144
+ if (value === null || typeof value === "string" || typeof value === "boolean" || (typeof value === "number" && Number.isFinite(value)))
145
+ return value;
146
+ if (Array.isArray(value)) {
147
+ if (ancestors.has(value))
148
+ throw invalid();
149
+ ancestors.add(value);
150
+ const result = Object.freeze(value.map((item) => json(item, ancestors)));
151
+ ancestors.delete(value);
152
+ return result;
153
+ }
154
+ return jsonObject(value, ancestors);
155
+ }
156
+ function invalid() { return new Error("Invalid PI WEB host catalog capability v1 data"); }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pluginCatalogTypes.js","sourceRoot":"","sources":["../../src/shared/pluginCatalogTypes.ts"],"names":[],"mappings":"AAgDA,MAAM,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AAC,CAAC,CAAC;IAC5H,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACzB,OAAO,MAAM,CAAC;AAChB,CAAC;AACD,SAAS,IAAI,CAAC,KAAc,EAAE,SAAsB;IAClD,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACrJ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,IAAI,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC;YAAE,MAAM,OAAO,EAAE,CAAC;QAC1C,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAa,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;QAClF,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACxB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AACtC,CAAC;AACD,SAAS,OAAO,KAAY,OAAO,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC,CAAC,CAAC"}
package/docs/config.md CHANGED
@@ -51,13 +51,15 @@ defaults → global config file → environment overrides
51
51
 
52
52
  Supported project-local settings are then applied for that project's workspaces. For upload and prompt-attachment defaults, `<project>/.pi-web/config.json` overrides the global value.
53
53
 
54
- Environment overrides include `PI_WEB_HOST`, `PI_WEB_PORT` / `PORT`, `PI_WEB_ALLOWED_HOSTS`, `PI_WEB_MAX_UPLOAD_BYTES`, `PI_CODING_AGENT_DIR`, `PI_CODING_AGENT_SESSION_DIR`, `PI_WEB_SPAWN_SESSIONS`, `PI_WEB_SUBSESSIONS`, `PI_WEB_ASK_USER`, and `PI_WEB_ENVIRONMENT_FACTS`.
54
+ Environment overrides include `PI_WEB_HOST`, `PI_WEB_PORT` / `PORT`, `PI_WEB_ALLOWED_HOSTS`, `PI_WEB_MAX_UPLOAD_BYTES`, `PI_WEB_SESSION_ARCHIVE_DIR`, `PI_CODING_AGENT_DIR`, `PI_CODING_AGENT_SESSION_DIR`, `PI_WEB_SPAWN_SESSIONS`, `PI_WEB_SUBSESSIONS`, `PI_WEB_ASK_USER`, and `PI_WEB_ENVIRONMENT_FACTS`.
55
55
 
56
56
  Process restarts depend on the key:
57
57
 
58
58
  - `host` / `port`: restart the gateway web/API service or process.
59
59
  - `maxUploadBytes`: restart both the web/API process and the session daemon on that machine.
60
60
  - `spawnSessions` / `subsessions` / `askUser` / `extensionDialogsTimeoutMs` / `environmentFacts`: restart the session daemon on that machine.
61
+ - `sessionArchive.directory`: restart the session daemon on that machine; changes only the destination for new archives.
62
+ - `sessionNaming`: saved model, token budget, thinking level, and timeout apply to the next naming request without a restart. Existing names and in-progress naming requests are unchanged.
61
63
  - `pathAccess`: applies on the next request; existing file views may need a browser refresh.
62
64
  - `uploads.defaultFolder`: applies to newly opened Files upload dialogs and new direct drag/drop batches after config/workspace refresh.
63
65
  - `attachments.defaultFolder`: applies to new prompt-attachment saves after config/workspace refresh.
@@ -91,6 +93,9 @@ The global gateway key is `defaultStreamingBehavior`: `steer` or `followUp`. It
91
93
  "defaultFolder": ".pi-web/attachments"
92
94
  },
93
95
  "maxUploadBytes": 67108864,
96
+ "sessionArchive": {
97
+ "directory": "/srv/pi-web/archives"
98
+ },
94
99
  "spawnSessions": true,
95
100
  "subsessions": true,
96
101
  "askUser": true,
@@ -165,6 +170,8 @@ Rows with JSON key `—` are runtime-only environment variables, not config-file
165
170
  | Agent can spawn sessions | `spawnSessions` | `PI_WEB_SPAWN_SESSIONS` | Global/session daemon | Not supported locally | Restart session daemon on that machine |
166
171
  | Tracked subsessions | `subsessions` | `PI_WEB_SUBSESSIONS` | Global/session daemon | Not supported locally; also requires `spawnSessions` | Restart session daemon on that machine |
167
172
  | Agent can post question forms | `askUser` | `PI_WEB_ASK_USER` | Global/session daemon | Not supported locally | Restart session daemon on that machine |
173
+ | Session archive directory | `sessionArchive.directory` | `PI_WEB_SESSION_ARCHIVE_DIR` | Global/session daemon | Not supported locally | Restart session daemon on that machine; new archives only |
174
+ | Session naming | `sessionNaming.model`, `sessionNaming.maxTokens`, `sessionNaming.thinkingLevel`, `sessionNaming.timeoutMs` | — | Global/session daemon | Not supported locally | Next naming request; no restart |
168
175
  | Extension dialog auto-cancel timeout | `extensionDialogsTimeoutMs` | — | Global/session daemon | Not supported locally | Restart session daemon on that machine |
169
176
  | Session environment facts | `environmentFacts` | `PI_WEB_ENVIRONMENT_FACTS` | Global/session daemon | Not supported locally | Restart session daemon on that machine |
170
177
  | PI WEB plugin desired enablement | `plugins.<id>.enabled` | — | Global | Not supported locally | Browser-only: reload tab. Server-backed: manually restart sessiond, then reload tab |
@@ -196,12 +203,26 @@ Rows with JSON key `—` are runtime-only environment variables, not config-file
196
203
 
197
204
  `PI_WEB_DATA_DIR` sets the root for PI WEB-managed runtime state and defaults to `~/.pi-web`. Unless a more specific path override is configured, PI WEB stores its project and machine registries, locally discovered plugins, default session-daemon socket, and session archives beneath this root.
198
205
 
199
- Each data directory is independent: after pointing PI WEB at a new root, it starts there with empty registries and no session archives. To carry session archives over, stop PI WEB, then copy `archived-sessions.json` and the `archived-sessions/` directory from the old data directory into the new one before starting it again.
206
+ Each data directory is independent: after pointing PI WEB at a new root, it starts there with empty registries and no archive index. Changing paths does not migrate data. Archive records retain their stored paths; see [Session archive directory](#session-archive-directory).
200
207
 
201
208
  Only one live session daemon may use a data directory. For a second instance, set a distinct `PI_WEB_DATA_DIR`, `PI_WEB_SESSIOND_SOCKET` (or `PI_WEB_SESSIOND_PORT` / `PI_WEB_SESSIOND_HOST`), and `PI_WEB_PORT`. Stale ownership markers are normally recovered automatically. If startup still refuses, verify the named owner is no longer running before deleting `sessiond-owner.json` as the error suggests.
202
209
 
203
210
  This setting does not change the PI WEB config file selected by `PI_WEB_CONFIG` or Pi-owned state such as the active session files selected by `PI_CODING_AGENT_SESSION_DIR`.
204
211
 
212
+ ### Session archive directory
213
+
214
+ Set `sessionArchive.directory` in the global config file to choose where new session archives are written. It defaults to `$PI_WEB_DATA_DIR/archived-sessions`. Project-local overrides are not supported.
215
+
216
+ ```json
217
+ { "sessionArchive": { "directory": "/srv/pi-web/archives" } }
218
+ ```
219
+
220
+ A nonempty `PI_WEB_SESSION_ARCHIVE_DIR` environment value takes precedence over the config file; an empty value is ignored. Relative paths resolve against the process working directory. Use an absolute path for a predictable destination; do not rely on tilde expansion.
221
+
222
+ Restart the session daemon on the affected machine after changing either value. Only the destination for new archives changes: the index stays at `$PI_WEB_DATA_DIR/archived-sessions.json`, existing records keep their stored paths, and no migration occurs.
223
+
224
+ Edit the global config file or daemon environment directly. Neither this destination nor the managed data directory is exposed in Settings.
225
+
205
226
  ### Agent process environment
206
227
 
207
228
  Agent shells, terminals, and child sessions inherit the daemon environment, including its Pi state paths. `NODE_ENV` and `PORT` are removed so they do not interfere with development commands.
@@ -309,6 +330,26 @@ This prevents accidental provider, configuration, or credential contamination be
309
330
 
310
331
  Configure providers before the daemon starts: use the active agent directory's `models.json`, or install the Pi extension globally in that agent directory. Project Pi extensions and project-level `models.json` files cannot add providers to PI WEB's shared baseline. After updating PI WEB—or after installing, removing, or updating a global Pi extension that registers providers—manually restart `pi-web-sessiond.service` (`systemctl --user restart pi-web-sessiond`). Restarting only the web/API service and running `/reload` do not rebuild the baseline.
311
332
 
333
+ ### MCP server sign-in and sign-out
334
+
335
+ Select a nonarchived session, then choose **MCP login** or **MCP logout** from **Actions**. Each action asks you to select an eligible server, even when only one is available. MCP actions are separate from model-provider authentication; the provider dialogs have no MCP footer.
336
+
337
+ Alternatively, open **Settings → MCP** to see enabled OAuth-eligible servers for the selected session on the settings machine. Each server has **Login** and **Logout** controls that target it directly, without another server picker. Disabled servers, servers using header-based authentication, and stdio servers are not listed as OAuth authentication candidates.
338
+
339
+ Both entry points use the same MCP dialog flow, showing the chosen server and Pi’s progress and outcome without switching to Chat. They require an idle session in a trusted workspace with Pi’s built-in MCP command enabled. Finish the current MCP authentication operation before starting another on the same machine.
340
+
341
+ Pi can reuse valid or refreshable credentials without asking you to authorize again. No browser prompt may mean credentials were reused; it is not proof of success. Read Pi’s messages for the outcome: **Operation finished** means the command ended, not that login succeeded. There is no force-reauthorization or switch-account control.
342
+
343
+ If Pi provides an authorization link, open it and complete authentication in your browser. If the callback cannot reach the runtime—for example, with a remote or container deployment—paste the full redirected URL into the dialog when prompted.
344
+
345
+ **Logout** removes the server’s local Pi credentials and disconnects its authenticated connection. Other sessions using the same saved credentials are also affected. It does not disable the server configuration or revoke access at the provider. To revoke access, use the provider’s account settings.
346
+
347
+ **Cancel** requests that pending UI or future prompts stop. It may not immediately stop browser approval, token exchange, or reconnection already in progress; credentials may already have been saved if you cancel after approval.
348
+
349
+ Pi owns OAuth tokens and server reconnection, storing MCP credentials in the active profile’s `mcp-auth.json`, separate from model-provider authentication. Ordinary `/mcp` commands entered in Chat still use Pi’s inline extension UI.
350
+
351
+ After updating PI WEB, manually restart the session daemon to activate this flow. A browser reload or web/API restart is insufficient. For the systemd user service, run `systemctl --user restart pi-web-sessiond` from outside its hosted sessions; restarting interrupts active sessions and terminals.
352
+
312
353
  ### Background model catalog refresh
313
354
 
314
355
  PI WEB refreshes provider model catalogs automatically in the background and after login or logout. Reopen the model selector to see new models. Failed refreshes keep the last successful catalog and report problems in daemon logs. A refresh can briefly delay session startup; the activity line reports when model lists are refreshing.
@@ -358,6 +399,31 @@ Forms are saved in the conversation and survive restarts. Only a form at the end
358
399
 
359
400
  Restart the session daemon after changing `askUser` or after upgrading PI WEB to a version that introduces this tool. For the systemd user service, run `systemctl --user restart pi-web-sessiond`.
360
401
 
402
+ ### Session naming
403
+
404
+ Use **Settings → Session daemon → Session naming** on the selected machine to choose a naming model, generation budget, thinking level, and timeout. The naming model button opens a searchable list of that machine's available models; choose **Use session model** to remove the model override. No active session is required. Refresh settings to reload the list after configuring a provider. By default, naming uses the session's model and **24 tokens**, including for reasoning models. Naming does not change the conversation's model.
405
+
406
+ These settings are optional machine-global overrides:
407
+
408
+ ```json
409
+ {
410
+ "sessionNaming": {
411
+ "model": "provider/model-id",
412
+ "maxTokens": 2048,
413
+ "thinkingLevel": "off",
414
+ "timeoutMs": 90000
415
+ }
416
+ }
417
+ ```
418
+
419
+ `model` must identify a model in that machine's model catalog, using its configured provider and credentials. Omit it to use the session model. `maxTokens` must be a positive integer; omit it to restore 24. This is a generation budget, not title length; providers may count reasoning against it. Project-local overrides are not supported.
420
+
421
+ `thinkingLevel` defaults to `minimal`. Supported values are `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Choose `off` to disable optional reasoning where supported, while keeping a positive token budget for the title. Models and providers may limit or map thinking levels; `off` cannot disable mandatory reasoning. Naming settings do not change the conversation's thinking level.
422
+
423
+ `timeoutMs` sets the total naming-request timeout, including gateway queueing, model loading, and generation. It defaults to `10000` (10 seconds). Use a positive integer in milliseconds, up to `2147483647`; Settings displays seconds. Increase it for local models that need time to load. Clearing the UI field restores 10 seconds. This is a total wall-time limit, not an idle timeout, and has no environment-variable override.
424
+
425
+ Saved model, budget, thinking-level, and timeout changes apply to the next naming request without a restart or reload. Existing names and in-progress naming requests are unchanged. Agent permission changes in the same panel still require a session-daemon restart. Naming failures use the existing first-message fallback and are recorded in daemon logs.
426
+
361
427
  ### Extension dialogs
362
428
 
363
429
  Pi extensions can show confirmation, selection, and text-input dialogs inline in the session transcript, including while a session starts or a tool runs. Dialog support is always on; there is no enable flag. See [Pi extension dialogs in PI WEB](https://pi-web.dev/plugins#pi-extension-dialogs) for details.