@code-yeongyu/senpi 2026.11.6-1 → 2026.11.6-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.
- package/CHANGELOG.md +35 -0
- package/dist/bundle/chunks/{chunk-5MWHZH2O.js → chunk-2FDW2LQL.js} +1 -1
- package/dist/bundle/chunks/{chunk-GG2JO3CL.js → chunk-4E7GDG4H.js} +1 -1
- package/dist/bundle/chunks/{chunk-K5JLYACP.js → chunk-4GKU755E.js} +1 -1
- package/dist/bundle/chunks/{chunk-437VLZQZ.js → chunk-7III44PV.js} +1 -1
- package/dist/bundle/chunks/chunk-7PSBD5KS.js +9 -0
- package/dist/bundle/chunks/{chunk-KFWHLVVH.js → chunk-C7OKUC7L.js} +1 -1
- package/dist/bundle/chunks/{chunk-CX32K5KD.js → chunk-CF5OGBC4.js} +7 -7
- package/dist/bundle/chunks/{chunk-7TGZJH6Z.js → chunk-D5MRJWUK.js} +40 -39
- package/dist/bundle/chunks/{chunk-E6L5VZSM.js → chunk-DSWDJ7HT.js} +1 -1
- package/dist/bundle/chunks/{chunk-6NMTFURP.js → chunk-ECW7VBMB.js} +1 -1
- package/dist/bundle/chunks/{chunk-2CSLJLM6.js → chunk-GKAYPJ4E.js} +2 -2
- package/dist/bundle/chunks/{chunk-KCGUUIUS.js → chunk-GNSMNSL7.js} +1 -1
- package/dist/bundle/chunks/{chunk-V3JSQ3PG.js → chunk-GSKCWXXG.js} +1 -1
- package/dist/bundle/chunks/{chunk-USKWGPA6.js → chunk-GTJJ73DE.js} +1 -1
- package/dist/bundle/chunks/{chunk-HHSYTDKO.js → chunk-HLM46XEB.js} +2 -2
- package/dist/bundle/chunks/{chunk-A4F4J2KH.js → chunk-I3PHVJAS.js} +2 -2
- package/dist/bundle/chunks/{chunk-LAMRXFHZ.js → chunk-LNPAT22L.js} +1 -1
- package/dist/bundle/chunks/chunk-NH7SYIGN.js +2 -0
- package/dist/bundle/chunks/{chunk-ZIIDIVTG.js → chunk-R2Z7CX77.js} +1 -1
- package/dist/bundle/chunks/{chunk-32I42CEY.js → chunk-RQ6CHXQ2.js} +1 -1
- package/dist/bundle/chunks/chunk-SJI6UB23.js +2 -0
- package/dist/bundle/chunks/{chunk-KUIEHAPR.js → chunk-T2SMQPRE.js} +1 -1
- package/dist/bundle/chunks/{chunk-IPG434JT.js → chunk-TIPKAMSS.js} +1 -1
- package/dist/bundle/chunks/{chunk-RI5ABX7A.js → chunk-TMXRR3N7.js} +2 -2
- package/dist/bundle/chunks/chunk-VD7AKTGP.js +3 -0
- package/dist/bundle/chunks/{chunk-22JICYKS.js → chunk-WAOGBBZR.js} +1 -1
- package/dist/bundle/chunks/{chunk-6MHCFJDB.js → chunk-WGRKM3N6.js} +2 -2
- package/dist/bundle/chunks/{chunk-WF5R2VSP.js → chunk-X5ZVYNOL.js} +1 -1
- package/dist/bundle/chunks/{chunk-H2FBGZNP.js → chunk-XCMII2VQ.js} +2 -2
- package/dist/bundle/chunks/{chunk-5JUCTKYS.js → chunk-YK3ZZCHI.js} +1 -1
- package/dist/bundle/chunks/{cli-main-ZQBSX5H5.js → cli-main-T74YJGIF.js} +1 -1
- package/dist/bundle/chunks/{hand-entry-7U7354GG.js → hand-entry-AYRUGE2A.js} +2 -2
- package/dist/bundle/chunks/{headless-host-7LKTG76U.js → headless-host-ES74ZB6M.js} +1 -1
- package/dist/bundle/chunks/{help-fast-path-NLSWH2CA.js → help-fast-path-TMTGLOBG.js} +1 -1
- package/dist/bundle/chunks/{host-command-3YRFN35E.js → host-command-YRXZE4TV.js} +1 -1
- package/dist/bundle/chunks/{host-lifecycle-6XLVIECJ.js → host-lifecycle-6VCXMPDW.js} +1 -1
- package/dist/bundle/chunks/host-lifecycle.js +1 -1
- package/dist/bundle/chunks/{host-session-command-F7USXUZV.js → host-session-command-N7IN7ZDV.js} +1 -1
- package/dist/bundle/chunks/{interactive-mode-4RF3PUQ2.js → interactive-mode-B5SQDLH7.js} +1 -1
- package/dist/bundle/chunks/{list-tips-H6VGDFTS.js → list-tips-DU57HHKA.js} +1 -1
- package/dist/bundle/chunks/{main-G2SRZYQN.js → main-UQFVFCNY.js} +1 -1
- package/dist/bundle/chunks/{multi-session-host-RPN54GUC.js → multi-session-host-XSUJDHFZ.js} +5 -5
- package/dist/bundle/chunks/{openai-codex-responses-MJZKUS6I.js → openai-codex-responses-7V6LTDRU.js} +2 -2
- package/dist/bundle/chunks/{package-manager-cli-D2VFD463.js → package-manager-cli-GLUNPQJU.js} +1 -1
- package/dist/bundle/chunks/{role-37WVG42T.js → role-RRFFHZF5.js} +1 -1
- package/dist/bundle/chunks/{rotation-stream-QELPMM4N.js → rotation-stream-BN2YK2MC.js} +1 -1
- package/dist/bundle/chunks/{rpc-mode-P4D3DVYD.js → rpc-mode-JYN3E7P7.js} +1 -1
- package/dist/bundle/chunks/rpc-monitor-source-C6VQ3BC4.js +3 -0
- package/dist/bundle/chunks/{run-attached-tui-CGA6O5FR.js → run-attached-tui-W236SEOR.js} +1 -1
- package/dist/bundle/chunks/{schedule-command-XWSNOAGG.js → schedule-command-B2EJTBOE.js} +1 -1
- package/dist/bundle/chunks/session-control-endpoint-YIMLHGLG.js +3 -0
- package/dist/bundle/chunks/{session-picker-OA2AUVZG.js → session-picker-E6ZONUJB.js} +1 -1
- package/dist/bundle/chunks/session-worker.js +294 -292
- package/dist/bundle/cli.js +2 -2
- package/dist/bundle/host-supervisor.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/bundle/runtime-manifest.json +1 -1
- package/dist/cli/project-trust-headless.d.ts +13 -0
- package/dist/cli/project-trust-headless.js +35 -0
- package/dist/cli/project-trust.js +13 -50
- package/dist/cli/schedule-delivery.d.ts +4 -0
- package/dist/cli/schedule-delivery.js +6 -0
- package/dist/cli/schedule-runner.js +8 -0
- package/dist/cli/session-opening.d.ts +19 -0
- package/dist/cli/session-opening.js +47 -1
- package/dist/core/agent-session-runtime.d.ts +12 -0
- package/dist/core/agent-session-runtime.js +41 -0
- package/dist/core/agent-session.js +13 -22
- package/dist/core/egress/api-table.d.ts +121 -0
- package/dist/core/egress/api-table.js +41 -0
- package/dist/core/egress/classify.d.ts +19 -0
- package/dist/core/egress/classify.js +197 -0
- package/dist/core/egress/credential-fields.d.ts +18 -0
- package/dist/core/egress/credential-fields.js +83 -0
- package/dist/core/egress/custody-sidecar.d.ts +44 -0
- package/dist/core/egress/custody-sidecar.js +91 -0
- package/dist/core/egress/device-custody.d.ts +12 -0
- package/dist/core/egress/device-custody.js +82 -0
- package/dist/core/egress/endpoint.d.ts +33 -0
- package/dist/core/egress/endpoint.js +115 -0
- package/dist/core/execute-tool-on-host.d.ts +26 -0
- package/dist/core/execute-tool-on-host.js +96 -0
- package/dist/core/extensions/builtin/compaction/retained-message-safety.js +15 -0
- package/dist/core/extensions/builtin/goal/index.js +15 -3
- package/dist/core/extensions/builtin/goal/stop-pause.d.ts +2 -0
- package/dist/core/extensions/builtin/goal/stop-pause.js +5 -0
- package/dist/core/extensions/builtin/herdr/herdr-state.d.ts +10 -0
- package/dist/core/extensions/builtin/herdr/herdr-state.js +34 -6
- package/dist/core/extensions/builtin/herdr/index.js +6 -2
- package/dist/core/extensions/builtin/mcp/service.d.ts +9 -1
- package/dist/core/extensions/builtin/mcp/service.js +32 -1
- package/dist/core/extensions/builtin/terminal/rpc-monitor-remote.d.ts +43 -0
- package/dist/core/extensions/builtin/terminal/rpc-monitor-remote.js +158 -0
- package/dist/core/extensions/builtin/terminal/rpc-monitor-render.d.ts +2 -0
- package/dist/core/extensions/builtin/terminal/rpc-monitor-render.js +4 -0
- package/dist/core/extensions/builtin/terminal/rpc-monitor-source.d.ts +5 -2
- package/dist/core/extensions/builtin/terminal/rpc-monitor-source.js +19 -4
- package/dist/core/extensions/builtin/terminal/rpc-monitor-targets.d.ts +4 -0
- package/dist/core/extensions/builtin/terminal/rpc-monitor-targets.js +15 -0
- package/dist/core/extensions/builtin/terminal/rpc-monitor-watch.d.ts +10 -0
- package/dist/core/extensions/builtin/terminal/rpc-monitor-watch.js +28 -2
- package/dist/core/extensions/builtin/terminal/rpc-remote-source.d.ts +59 -0
- package/dist/core/extensions/builtin/terminal/rpc-remote-source.js +15 -0
- package/dist/core/extensions/builtin/terminal/terminal-manifest-model.d.ts +5 -0
- package/dist/core/extensions/builtin/terminal/terminal-manifest-parse.js +14 -1
- package/dist/core/extensions/builtin/terminal/tools/monitor-rpc.js +8 -1
- package/dist/core/extensions/loader.js +8 -0
- package/dist/core/extensions/types.d.ts +6 -0
- package/dist/core/foreign-session-holders.d.ts +1 -1
- package/dist/core/foreign-session-holders.js +3 -3
- package/dist/core/session-import/jsonl-import.d.ts +8 -12
- package/dist/core/session-import/jsonl-import.js +99 -40
- package/dist/core/session-manager.d.ts +2 -0
- package/dist/core/session-manager.js +7 -2
- package/dist/core/session-store/durable-binding.d.ts +2 -0
- package/dist/core/session-store/durable-binding.js +26 -4
- package/dist/core/settings-manager.d.ts +20 -0
- package/dist/core/settings-manager.js +51 -0
- package/dist/core/trust-manager.d.ts +1 -18
- package/dist/core/trust-manager.js +3 -124
- package/dist/core/trust-requiring-resources.d.ts +21 -0
- package/dist/core/trust-requiring-resources.js +189 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/main.js +42 -12
- package/dist/modes/interactive/interactive-mode.js +2 -2
- package/dist/modes/interactive/session-control-commands.js +2 -0
- package/dist/modes/rpc/connection-handler.js +17 -0
- package/dist/modes/rpc/connection-question-bridge.js +7 -4
- package/dist/modes/rpc/effect-commands.d.ts +24 -0
- package/dist/modes/rpc/host-boot-extensions.d.ts +4 -0
- package/dist/modes/rpc/host-boot-extensions.js +17 -0
- package/dist/modes/rpc/host-lifecycle-shutdown.js +11 -2
- package/dist/modes/rpc/loopless-runtime-settings.js +5 -1
- package/dist/modes/rpc/method-classes-schema-session.d.ts +33 -0
- package/dist/modes/rpc/method-classes-schema-session.js +4 -0
- package/dist/modes/rpc/method-classes-schema.d.ts +33 -0
- package/dist/modes/rpc/method-classes.d.ts +4 -0
- package/dist/modes/rpc/method-classes.js +7 -0
- package/dist/modes/rpc/multi-session-host.d.ts +2 -0
- package/dist/modes/rpc/multi-session-host.js +7 -2
- package/dist/modes/rpc/project-workspace-commands.d.ts +60 -0
- package/dist/modes/rpc/project-workspace-commands.js +145 -0
- package/dist/modes/rpc/rpc-error-types.d.ts +11 -1
- package/dist/modes/rpc/rpc-error-types.js +10 -0
- package/dist/modes/rpc/rpc-input-validation.js +4 -0
- package/dist/modes/rpc/rpc-mutation-response-types.d.ts +13 -0
- package/dist/modes/rpc/rpc-read-response-types.d.ts +13 -0
- package/dist/modes/rpc/rpc-session-command-types.d.ts +15 -0
- package/dist/modes/rpc/session-attachment-gate.js +2 -0
- package/dist/modes/rpc/session-command-activity.js +2 -0
- package/docs/engine-socket/fixtures/admission-routes/h-legacy.json +1 -1
- package/docs/engine-socket/fixtures/rpc-inbound-samples.json +41 -2
- package/docs/extensions.md +17 -1
- package/docs/rpc.md +121 -4
- package/docs/terminal-tools.md +8 -0
- package/native/socket-secret/prebuilds/win32-arm64/senpi_socket_secret.win32-arm64.node +0 -0
- package/native/socket-secret/prebuilds/win32-x64/senpi_socket_secret.win32-x64.node +0 -0
- package/package.json +6 -6
- package/dist/bundle/chunks/chunk-FUQJK2TU.js +0 -2
- package/dist/bundle/chunks/chunk-POZMRM6V.js +0 -2
- package/dist/bundle/chunks/chunk-XBG63MJZ.js +0 -8
- package/dist/bundle/chunks/chunk-YP47G4YP.js +0 -3
- package/dist/bundle/chunks/rpc-monitor-source-KKN2UP4T.js +0 -3
- package/dist/bundle/chunks/session-control-endpoint-OST7WAKP.js +0 -3
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The session workspace's project trust and project-scope settings over RPC (senpi#6176).
|
|
3
|
+
*
|
|
4
|
+
* Trust: the choices are exactly the ones `/trust` offers (`getProjectTrustOptions` without the session-only
|
|
5
|
+
* entries), and choosing one saves exactly what that choice saves in `trust.json`. It is never implied: only an
|
|
6
|
+
* explicit `set_project_trust` writes, and a launch that named the trust (`--approve`/`--no-approve`) refuses it, because
|
|
7
|
+
* that flag outranks every saved decision. Then, in the order `resolveProjectTrusted` decides a session's trust, a folder
|
|
8
|
+
* with nothing trust gates stays trusted, and a `project_trust` handler of the extensions loaded before trust (never a
|
|
9
|
+
* project extension) decides before any saved choice: a choice it decides against is refused, with nothing saved and
|
|
10
|
+
* nothing applied. Otherwise the session takes the decision the way a Full access change does
|
|
11
|
+
* (`applyProjectTrustChange`), in line with the runtime's own trust changes: project settings, skills, prompts,
|
|
12
|
+
* extensions and MCP servers load or unload at once.
|
|
13
|
+
*
|
|
14
|
+
* Settings: the project settings file is read as stored (reading runs nothing, so trust does not gate it) and written
|
|
15
|
+
* one top-level key at a time through `SettingsManager`'s own project write path, which refuses an untrusted project.
|
|
16
|
+
*/
|
|
17
|
+
import { createHeadlessProjectTrustContext } from "../../cli/project-trust-headless.js";
|
|
18
|
+
import { emitProjectTrustEvent } from "../../core/extensions/runner.js";
|
|
19
|
+
import { getSettingsPath } from "../../core/settings-manager.js";
|
|
20
|
+
import { getProjectTrustOptions, ProjectTrustStore } from "../../core/trust-manager.js";
|
|
21
|
+
import { hasTrustRequiringProjectResourcesAsync } from "../../core/trust-requiring-resources.js";
|
|
22
|
+
import { RPC_ERROR_INVALID_ARGUMENT, RPC_ERROR_PROJECT_NOT_TRUSTED, RPC_ERROR_PROJECT_SETTINGS_UNREADABLE, RPC_ERROR_PROJECT_SETTINGS_WRITE_FAILED, RPC_ERROR_PROJECT_TRUST_EXTENSION_DECIDED, RPC_ERROR_PROJECT_TRUST_LOCKED, } from "./rpc-error-types.js";
|
|
23
|
+
/** A top-level settings key: an identifier, so no prototype key or path ever reaches the file. */
|
|
24
|
+
const SETTINGS_KEY = /^[A-Za-z][A-Za-z0-9_]*$/;
|
|
25
|
+
function choiceOf(option) {
|
|
26
|
+
if (!option.trusted)
|
|
27
|
+
return "do_not_trust";
|
|
28
|
+
return option.updates.length > 1 ? "trust_parent" : "trust";
|
|
29
|
+
}
|
|
30
|
+
function trustChoices(cwd) {
|
|
31
|
+
return getProjectTrustOptions(cwd).map((option) => ({ choice: choiceOf(option), option }));
|
|
32
|
+
}
|
|
33
|
+
export async function readProjectTrust(session) {
|
|
34
|
+
const cwd = session.sessionManager.getCwd();
|
|
35
|
+
const entry = new ProjectTrustStore(session.agentDir).getEntry(cwd);
|
|
36
|
+
return {
|
|
37
|
+
cwd,
|
|
38
|
+
projectTrusted: session.settingsManager.isProjectTrusted(),
|
|
39
|
+
requiresTrust: await hasTrustRequiringProjectResourcesAsync(cwd),
|
|
40
|
+
saved: entry === null ? null : { path: entry.path, trusted: entry.decision },
|
|
41
|
+
locked: session.settingsManager.isProjectTrustLocked(),
|
|
42
|
+
choices: trustChoices(cwd).map(({ choice, option }) => ({
|
|
43
|
+
choice,
|
|
44
|
+
label: option.label,
|
|
45
|
+
trusted: option.trusted,
|
|
46
|
+
path: option.savedPath ?? cwd,
|
|
47
|
+
})),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* What a `project_trust` handler decides for `cwd`, asked as a session open asks it: the handlers of the extensions
|
|
52
|
+
* loaded before trust (`loadProjectTrustExtensions` leaves project extensions out), first decided answer wins, no UI.
|
|
53
|
+
* A handler that throws falls through, as in `resolveProjectTrusted`, and is reported on stderr like its warning.
|
|
54
|
+
*/
|
|
55
|
+
async function extensionTrustDecision(session, cwd) {
|
|
56
|
+
const loaded = session.resourceLoader.getExtensions();
|
|
57
|
+
const preTrust = { ...loaded, extensions: loaded.extensions.filter((ext) => ext.sourceInfo.scope !== "project") };
|
|
58
|
+
const { result, errors } = await emitProjectTrustEvent(preTrust, { type: "project_trust", cwd }, createHeadlessProjectTrustContext({ cwd, mode: "rpc", hasUI: false }));
|
|
59
|
+
for (const error of errors) {
|
|
60
|
+
process.stderr.write(`senpi rpc: Extension "${error.extensionPath}" project_trust error: ${error.error}\n`);
|
|
61
|
+
}
|
|
62
|
+
return result === undefined ? undefined : result.trusted === "yes";
|
|
63
|
+
}
|
|
64
|
+
export async function writeProjectTrust(session, choice, inTrustChangeOrder) {
|
|
65
|
+
const cwd = session.sessionManager.getCwd();
|
|
66
|
+
const selected = trustChoices(cwd).find((entry) => entry.choice === choice);
|
|
67
|
+
if (selected === undefined) {
|
|
68
|
+
return {
|
|
69
|
+
ok: false,
|
|
70
|
+
message: `set_project_trust requires 'choice' to be one of: ${trustChoices(cwd)
|
|
71
|
+
.map((entry) => entry.choice)
|
|
72
|
+
.join(", ")}.`,
|
|
73
|
+
errorCode: RPC_ERROR_INVALID_ARGUMENT,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
const settings = session.settingsManager;
|
|
77
|
+
if (settings.isProjectTrustLocked()) {
|
|
78
|
+
return {
|
|
79
|
+
ok: false,
|
|
80
|
+
message: "This engine was launched with an explicit project trust flag; a saved decision cannot change it.",
|
|
81
|
+
errorCode: RPC_ERROR_PROJECT_TRUST_LOCKED,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
return inTrustChangeOrder(async () => {
|
|
85
|
+
// As resolveProjectTrusted: a folder with nothing trust gates is trusted whatever is saved or decided.
|
|
86
|
+
const requiresTrust = await hasTrustRequiringProjectResourcesAsync(cwd);
|
|
87
|
+
const decided = requiresTrust ? await extensionTrustDecision(session, cwd) : undefined;
|
|
88
|
+
if (decided !== undefined && decided !== selected.option.trusted) {
|
|
89
|
+
return {
|
|
90
|
+
ok: false,
|
|
91
|
+
message: `A project_trust extension handler decides this folder is ${decided ? "trusted" : "untrusted"}; nothing was saved.`,
|
|
92
|
+
errorCode: RPC_ERROR_PROJECT_TRUST_EXTENSION_DECIDED,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
new ProjectTrustStore(session.agentDir).setMany(selected.option.updates);
|
|
96
|
+
const trusted = requiresTrust ? selected.option.trusted : true;
|
|
97
|
+
if (settings.isProjectTrusted() !== trusted) {
|
|
98
|
+
settings.setProjectTrusted(trusted);
|
|
99
|
+
await session.applyProjectTrustChange();
|
|
100
|
+
}
|
|
101
|
+
return { ok: true, data: await readProjectTrust(session) };
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
export function readProjectSettings(session) {
|
|
105
|
+
const cwd = session.sessionManager.getCwd();
|
|
106
|
+
const path = getSettingsPath(cwd, session.agentDir, "project");
|
|
107
|
+
return {
|
|
108
|
+
cwd,
|
|
109
|
+
projectTrusted: session.settingsManager.isProjectTrusted(),
|
|
110
|
+
...session.settingsManager.readProjectSettingsFile(path),
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export async function writeProjectSetting(session, key, value) {
|
|
114
|
+
if (typeof key !== "string" || !SETTINGS_KEY.test(key) || value === undefined) {
|
|
115
|
+
return {
|
|
116
|
+
ok: false,
|
|
117
|
+
message: "set_project_setting requires an identifier 'key' and a JSON 'value' (null removes the key).",
|
|
118
|
+
errorCode: RPC_ERROR_INVALID_ARGUMENT,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
const settings = session.settingsManager;
|
|
122
|
+
if (!settings.isProjectTrusted()) {
|
|
123
|
+
return {
|
|
124
|
+
ok: false,
|
|
125
|
+
message: "Project is not trusted; refusing to write project settings. Trust it with set_project_trust first.",
|
|
126
|
+
errorCode: RPC_ERROR_PROJECT_NOT_TRUSTED,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
const file = readProjectSettings(session);
|
|
130
|
+
if (file.error !== null) {
|
|
131
|
+
return { ok: false, message: file.error, errorCode: RPC_ERROR_PROJECT_SETTINGS_UNREADABLE };
|
|
132
|
+
}
|
|
133
|
+
try {
|
|
134
|
+
await settings.setProjectSetting(key, value);
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
return {
|
|
138
|
+
ok: false,
|
|
139
|
+
message: `Writing ${file.path} failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
140
|
+
errorCode: RPC_ERROR_PROJECT_SETTINGS_WRITE_FAILED,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
return { ok: true, data: readProjectSettings(session) };
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=project-workspace-commands.js.map
|
|
@@ -26,6 +26,16 @@ export declare const RPC_ERROR_OPEN_FAILED = "open_failed";
|
|
|
26
26
|
export declare const RPC_ERROR_OWNER_CHANGED = "owner_changed";
|
|
27
27
|
export declare const RPC_ERROR_SESSION_NOT_HELD = "session_not_held";
|
|
28
28
|
export declare const RPC_ERROR_MEDIA_NOT_FOUND = "media_not_found";
|
|
29
|
+
/** `set_project_trust` on an engine launched with `--approve`/`--no-approve`: the flag outranks every saved decision. */
|
|
30
|
+
export declare const RPC_ERROR_PROJECT_TRUST_LOCKED = "project_trust_locked";
|
|
31
|
+
/** `set_project_trust` against what a `project_trust` extension handler decides; nothing is saved or applied. */
|
|
32
|
+
export declare const RPC_ERROR_PROJECT_TRUST_EXTENSION_DECIDED = "project_trust_extension_decided";
|
|
33
|
+
/** `set_project_setting` whose write to the project settings file failed (permissions, a held lock). */
|
|
34
|
+
export declare const RPC_ERROR_PROJECT_SETTINGS_WRITE_FAILED = "project_settings_write_failed";
|
|
35
|
+
/** `set_project_setting` while the session's project is untrusted; `set_project_trust` first. */
|
|
36
|
+
export declare const RPC_ERROR_PROJECT_NOT_TRUSTED = "project_not_trusted";
|
|
37
|
+
/** `set_project_setting` while the project settings file does not parse; fix the file first. */
|
|
38
|
+
export declare const RPC_ERROR_PROJECT_SETTINGS_UNREADABLE = "project_settings_unreadable";
|
|
29
39
|
/** `open_session.context` broke a documented cap (key count, key syntax, value or total bytes). */
|
|
30
40
|
export declare const RPC_ERROR_INVALID_SESSION_CONTEXT = "invalid_session_context";
|
|
31
41
|
/** `open_session.env` is malformed or names a variable that is not caller-passable on this host (senpi#4381). */
|
|
@@ -113,5 +123,5 @@ export declare const RPC_ERROR_RELEASE_FAILED = "release_failed";
|
|
|
113
123
|
export declare const RPC_ERROR_HOST_DRAINING = "host_draining";
|
|
114
124
|
/** The supervisor has closed admission; a launch-owning caller may ensure a successor. */
|
|
115
125
|
export declare const RPC_ERROR_HOST_STOPPING = "host_stopping";
|
|
116
|
-
export type RpcErrorCode = typeof RPC_ERROR_SESSION_IDENTITY_MISMATCH | typeof RPC_ERROR_SESSION_BUSY_LIFECYCLE | typeof RPC_ERROR_ATTACHED_ELSEWHERE | typeof RPC_ERROR_OWNER_CHANGED | typeof RPC_ERROR_SESSION_NOT_HELD | typeof RPC_ERROR_HOST_STOPPING | typeof RPC_ERROR_UNKNOWN_SESSION | typeof RPC_ERROR_SESSION_NOT_ATTACHED | typeof RPC_ERROR_SESSION_CLOSING | typeof RPC_ERROR_SESSION_PATH_IN_USE | typeof RPC_ERROR_SESSION_HELD | typeof RPC_ERROR_SESSION_RESERVATION_LIMIT | typeof RPC_ERROR_MISSING_SESSION_ID | typeof RPC_ERROR_MULTI_SESSION_DISABLED | typeof RPC_ERROR_INVALID_PATH | typeof RPC_ERROR_OPEN_FAILED | typeof RPC_ERROR_MEDIA_NOT_FOUND | typeof RPC_ERROR_INVALID_SESSION_CONTEXT | typeof RPC_ERROR_INVALID_SUBSCRIPTION | typeof RPC_ERROR_UNKNOWN_SUBSCRIPTION | typeof RPC_ERROR_SUBSCRIPTION_LIMIT | typeof RPC_ERROR_UNSUPPORTED_TRANSPORT | typeof RPC_ERROR_INVALID_SESSION_KIND | typeof RPC_ERROR_INVALID_LAUNCH_PROFILE | typeof RPC_ERROR_INVALID_SESSION_ID | typeof RPC_ERROR_SESSION_ID_IN_USE | typeof RPC_ERROR_HOST_MEMORY_PRESSURE | typeof RPC_ERROR_WARM_FAILED | typeof RPC_ERROR_STREAMING | typeof RPC_ERROR_ENTRY_NOT_FOUND | typeof RPC_ERROR_MODEL_NOT_FOUND | typeof RPC_ERROR_EFFECT_ID_CONFLICT | typeof RPC_ERROR_TRANSCRIPT_UNREADABLE | typeof RPC_ERROR_PROVIDER_UNAVAILABLE | typeof RPC_ERROR_PROVIDER_CREDENTIALS_MISSING | typeof RPC_ERROR_PROVIDER_CREDENTIALS_EXPIRED | typeof RPC_ERROR_NO_MODEL_SELECTED | typeof RPC_ERROR_TURN_CONFLICT | typeof RPC_ERROR_CONTEXT_BUDGET | typeof RPC_ERROR_EVAL_CELL_NOT_FOUND | typeof RPC_ERROR_INVALID_EVAL_CELL_REQUEST | typeof RPC_ERROR_EVAL_CELLS_UNAVAILABLE | typeof RPC_ERROR_NOT_ASSISTANT | typeof RPC_ERROR_NOT_USER | typeof RPC_ERROR_EMPTY_TEXT | typeof RPC_ERROR_UNKNOWN_COMMAND | typeof RPC_ERROR_STALE_LEAF | typeof RPC_ERROR_TURN_ACTIVE | typeof RPC_ERROR_SESSION_BUSY | typeof RPC_ERROR_ATTACHED | typeof RPC_ERROR_INVALID_RELEASE_REASON | typeof RPC_ERROR_RELEASE_UNSUPPORTED | typeof RPC_ERROR_RELEASE_FAILED | typeof RPC_ERROR_HOST_DRAINING | typeof RPC_ERROR_RESPONSE_UNWRITABLE;
|
|
126
|
+
export type RpcErrorCode = typeof RPC_ERROR_SESSION_IDENTITY_MISMATCH | typeof RPC_ERROR_SESSION_BUSY_LIFECYCLE | typeof RPC_ERROR_ATTACHED_ELSEWHERE | typeof RPC_ERROR_OWNER_CHANGED | typeof RPC_ERROR_SESSION_NOT_HELD | typeof RPC_ERROR_HOST_STOPPING | typeof RPC_ERROR_UNKNOWN_SESSION | typeof RPC_ERROR_SESSION_NOT_ATTACHED | typeof RPC_ERROR_SESSION_CLOSING | typeof RPC_ERROR_SESSION_PATH_IN_USE | typeof RPC_ERROR_SESSION_HELD | typeof RPC_ERROR_SESSION_RESERVATION_LIMIT | typeof RPC_ERROR_MISSING_SESSION_ID | typeof RPC_ERROR_MULTI_SESSION_DISABLED | typeof RPC_ERROR_INVALID_PATH | typeof RPC_ERROR_OPEN_FAILED | typeof RPC_ERROR_MEDIA_NOT_FOUND | typeof RPC_ERROR_PROJECT_TRUST_LOCKED | typeof RPC_ERROR_PROJECT_TRUST_EXTENSION_DECIDED | typeof RPC_ERROR_PROJECT_SETTINGS_WRITE_FAILED | typeof RPC_ERROR_PROJECT_NOT_TRUSTED | typeof RPC_ERROR_PROJECT_SETTINGS_UNREADABLE | typeof RPC_ERROR_INVALID_SESSION_CONTEXT | typeof RPC_ERROR_INVALID_SUBSCRIPTION | typeof RPC_ERROR_UNKNOWN_SUBSCRIPTION | typeof RPC_ERROR_SUBSCRIPTION_LIMIT | typeof RPC_ERROR_UNSUPPORTED_TRANSPORT | typeof RPC_ERROR_INVALID_SESSION_KIND | typeof RPC_ERROR_INVALID_LAUNCH_PROFILE | typeof RPC_ERROR_INVALID_SESSION_ID | typeof RPC_ERROR_SESSION_ID_IN_USE | typeof RPC_ERROR_HOST_MEMORY_PRESSURE | typeof RPC_ERROR_WARM_FAILED | typeof RPC_ERROR_STREAMING | typeof RPC_ERROR_ENTRY_NOT_FOUND | typeof RPC_ERROR_MODEL_NOT_FOUND | typeof RPC_ERROR_EFFECT_ID_CONFLICT | typeof RPC_ERROR_TRANSCRIPT_UNREADABLE | typeof RPC_ERROR_PROVIDER_UNAVAILABLE | typeof RPC_ERROR_PROVIDER_CREDENTIALS_MISSING | typeof RPC_ERROR_PROVIDER_CREDENTIALS_EXPIRED | typeof RPC_ERROR_NO_MODEL_SELECTED | typeof RPC_ERROR_TURN_CONFLICT | typeof RPC_ERROR_CONTEXT_BUDGET | typeof RPC_ERROR_EVAL_CELL_NOT_FOUND | typeof RPC_ERROR_INVALID_EVAL_CELL_REQUEST | typeof RPC_ERROR_EVAL_CELLS_UNAVAILABLE | typeof RPC_ERROR_NOT_ASSISTANT | typeof RPC_ERROR_NOT_USER | typeof RPC_ERROR_EMPTY_TEXT | typeof RPC_ERROR_UNKNOWN_COMMAND | typeof RPC_ERROR_STALE_LEAF | typeof RPC_ERROR_TURN_ACTIVE | typeof RPC_ERROR_SESSION_BUSY | typeof RPC_ERROR_ATTACHED | typeof RPC_ERROR_INVALID_RELEASE_REASON | typeof RPC_ERROR_RELEASE_UNSUPPORTED | typeof RPC_ERROR_RELEASE_FAILED | typeof RPC_ERROR_HOST_DRAINING | typeof RPC_ERROR_RESPONSE_UNWRITABLE;
|
|
117
127
|
//# sourceMappingURL=rpc-error-types.d.ts.map
|
|
@@ -26,6 +26,16 @@ export const RPC_ERROR_OPEN_FAILED = "open_failed";
|
|
|
26
26
|
export const RPC_ERROR_OWNER_CHANGED = "owner_changed";
|
|
27
27
|
export const RPC_ERROR_SESSION_NOT_HELD = "session_not_held";
|
|
28
28
|
export const RPC_ERROR_MEDIA_NOT_FOUND = "media_not_found";
|
|
29
|
+
/** `set_project_trust` on an engine launched with `--approve`/`--no-approve`: the flag outranks every saved decision. */
|
|
30
|
+
export const RPC_ERROR_PROJECT_TRUST_LOCKED = "project_trust_locked";
|
|
31
|
+
/** `set_project_trust` against what a `project_trust` extension handler decides; nothing is saved or applied. */
|
|
32
|
+
export const RPC_ERROR_PROJECT_TRUST_EXTENSION_DECIDED = "project_trust_extension_decided";
|
|
33
|
+
/** `set_project_setting` whose write to the project settings file failed (permissions, a held lock). */
|
|
34
|
+
export const RPC_ERROR_PROJECT_SETTINGS_WRITE_FAILED = "project_settings_write_failed";
|
|
35
|
+
/** `set_project_setting` while the session's project is untrusted; `set_project_trust` first. */
|
|
36
|
+
export const RPC_ERROR_PROJECT_NOT_TRUSTED = "project_not_trusted";
|
|
37
|
+
/** `set_project_setting` while the project settings file does not parse; fix the file first. */
|
|
38
|
+
export const RPC_ERROR_PROJECT_SETTINGS_UNREADABLE = "project_settings_unreadable";
|
|
29
39
|
/** `open_session.context` broke a documented cap (key count, key syntax, value or total bytes). */
|
|
30
40
|
export const RPC_ERROR_INVALID_SESSION_CONTEXT = "invalid_session_context";
|
|
31
41
|
/** `open_session.env` is malformed or names a variable that is not caller-passable on this host (senpi#4381). */
|
|
@@ -161,6 +161,10 @@ export function rpcCommandPayloadError(command) {
|
|
|
161
161
|
if (value.type === "append_session_entry" && !validSessionEntry(value.entry)) {
|
|
162
162
|
return "append_session_entry entry is malformed.";
|
|
163
163
|
}
|
|
164
|
+
if ((value.type === "prompt" || value.type === "steer" || value.type === "follow_up") &&
|
|
165
|
+
typeof value.message !== "string") {
|
|
166
|
+
return "message must be a string.";
|
|
167
|
+
}
|
|
164
168
|
return undefined;
|
|
165
169
|
}
|
|
166
170
|
/**
|
|
@@ -8,6 +8,7 @@ import type { ServiceTier } from "../../core/extensions/builtin/service-tier.ts"
|
|
|
8
8
|
import type { SessionControlAdmission } from "../../core/extensions/types.ts";
|
|
9
9
|
import type { ApiKeyVerification } from "../../core/verify-api-key.ts";
|
|
10
10
|
import type { ClientMessageAdmission } from "./client-admission-record.ts";
|
|
11
|
+
import type { RpcProjectSettings, RpcProjectTrust } from "./project-workspace-commands.ts";
|
|
11
12
|
import type { RpcAbortQuiesce, RpcEffectAnswer, RpcQueuedInputChange } from "./rpc-effect-answer-types.ts";
|
|
12
13
|
import type { EditAssistantMessageResult, EditUserMessageResult, NavigateTreeResult } from "./rpc-result-types.ts";
|
|
13
14
|
import type { RpcProviderAccount } from "./rpc-session-state-types.ts";
|
|
@@ -205,6 +206,18 @@ export type RpcMutationResponse = {
|
|
|
205
206
|
type: "response";
|
|
206
207
|
command: "set_steering_mode";
|
|
207
208
|
success: true;
|
|
209
|
+
} | {
|
|
210
|
+
id?: string;
|
|
211
|
+
type: "response";
|
|
212
|
+
command: "set_project_trust";
|
|
213
|
+
success: true;
|
|
214
|
+
data: RpcProjectTrust;
|
|
215
|
+
} | {
|
|
216
|
+
id?: string;
|
|
217
|
+
type: "response";
|
|
218
|
+
command: "set_project_setting";
|
|
219
|
+
success: true;
|
|
220
|
+
data: RpcProjectSettings;
|
|
208
221
|
} | {
|
|
209
222
|
id?: string;
|
|
210
223
|
type: "response";
|
|
@@ -9,6 +9,7 @@ import type { ReleaseReceipt } from "./compact-event-leases.ts";
|
|
|
9
9
|
import type { EventPageAnswer, RecoveryPageAnswer } from "./compact-recovery-requests.ts";
|
|
10
10
|
import type { ThinkingLevelSource } from "../../core/session-thinking-memory.ts";
|
|
11
11
|
import type { EffectStatus } from "./effect-record.ts";
|
|
12
|
+
import type { RpcProjectSettings, RpcProjectTrust } from "./project-workspace-commands.ts";
|
|
12
13
|
import type { RpcSlashCommand } from "./rpc-command-surface.ts";
|
|
13
14
|
import type { RpcEvalCell, RpcEvalCellSnapshot } from "./rpc-result-types.ts";
|
|
14
15
|
import type { RpcAuthProvider, RpcAuthStoreError, RpcLoadedExtension, RpcLoadedMcpServer, RpcProviderAccount, RpcSessionState } from "./rpc-session-state-types.ts";
|
|
@@ -196,6 +197,18 @@ export type RpcReadResponse = {
|
|
|
196
197
|
extensions: RpcLoadedExtension[];
|
|
197
198
|
mcpServers: RpcLoadedMcpServer[];
|
|
198
199
|
};
|
|
200
|
+
} | {
|
|
201
|
+
id?: string;
|
|
202
|
+
type: "response";
|
|
203
|
+
command: "get_project_trust";
|
|
204
|
+
success: true;
|
|
205
|
+
data: RpcProjectTrust;
|
|
206
|
+
} | {
|
|
207
|
+
id?: string;
|
|
208
|
+
type: "response";
|
|
209
|
+
command: "get_project_settings";
|
|
210
|
+
success: true;
|
|
211
|
+
data: RpcProjectSettings;
|
|
199
212
|
} | {
|
|
200
213
|
id?: string;
|
|
201
214
|
type: "response";
|
|
@@ -468,6 +468,21 @@ export type RpcSessionCommand = {
|
|
|
468
468
|
} | {
|
|
469
469
|
id?: string;
|
|
470
470
|
type: "get_loaded_surfaces";
|
|
471
|
+
} | {
|
|
472
|
+
id?: string;
|
|
473
|
+
type: "get_project_trust";
|
|
474
|
+
} | {
|
|
475
|
+
id?: string;
|
|
476
|
+
type: "set_project_trust";
|
|
477
|
+
choice: "trust" | "trust_parent" | "do_not_trust";
|
|
478
|
+
} | {
|
|
479
|
+
id?: string;
|
|
480
|
+
type: "get_project_settings";
|
|
481
|
+
} | {
|
|
482
|
+
id?: string;
|
|
483
|
+
type: "set_project_setting";
|
|
484
|
+
key: string;
|
|
485
|
+
value: unknown;
|
|
471
486
|
} | {
|
|
472
487
|
id?: string;
|
|
473
488
|
type: "extension_request";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"rpcClientRequests": "{\"type\":\"get_protocol_info\",\"id\":\"rpc-auth-protocol\",\"observe\":true,\"auth\":{\"client_nonce\":\"<public-nonce>\"}}\n{\"type\":\"set_client_info\",\"width\":100,\"capabilities\":[],\"id\":\"req_1\"}\n{\"type\":\"open_session\",\"cwd\":\"<root>/cwd\",\"sessionPath\":\"<root>/cwd/session.jsonl\",\"id\":\"req_2\"}\n{\"type\":\"get_entries\",\"sessionId\":\"rpc-1\",\"id\":\"req_3\"}\n{\"type\":\"close_session\",\"sessionId\":\"rpc-1\",\"id\":\"req_4\"}\n",
|
|
3
|
-
"rpcClientFrames": "{\"id\":\"rpc-auth-protocol\",\"type\":\"response\",\"command\":\"get_protocol_info\",\"success\":true,\"data\":{\"protocolVersion\":1,\"serverVersion\":\"<server-version>\",\"capabilities\":[\"<capabilities>\"],\"mode\":\"multi\",\"instanceId\":\"<uuid-1>\",\"generation\":0,\"engineVersion\":\"<server-version>\",\"engineOrdinal\":\"<engine-ordinal>\",\"launch_profile\":{\"profile_id\":\"ca7a49435f02009fdda5dac49d29408dcfeb1ab5374353784c5a9def467f5be1\",\"core\":{\"extensions\":[],\"multi_session\":false,\"session_runtime\":\"worker\"}},\"agentDir\":\"<root>/agent\",\"method_classes\":{\"version\":1,\"digest\":\"56c692be165af1736661e24017ebd1526ae2e7aed1beb726abd2c3691bca9f43\",\"classes\":{\"get_protocol_info\":\"observe\",\"get_subscription_limits\":\"observe\",\"list_sessions\":\"observe\",\"list_hands\":\"observe\",\"get_state\":\"observe\",\"get_snapshot\":\"observe\",\"get_entries\":\"observe\",\"get_messages\":\"observe\",\"get_tree\":\"observe\",\"get_fork_messages\":\"observe\",\"get_last_assistant_text\":\"observe\",\"get_session_stats\":\"observe\",\"get_effect_status\":\"dynamic\",\"get_pending_inputs\":\"observe\",\"get_follow_up_messages\":\"observe\",\"get_steering_messages\":\"observe\",\"get_commands\":\"observe\",\"get_loaded_surfaces\":\"observe\",\"get_available_models\":\"observe\",\"get_available_thinking_levels\":\"observe\",\"get_model_thinking_level\":\"observe\",\"get_fast_mode\":\"observe\",\"get_media\":\"observe\",\"memory_report\":\"observe\",\"eval_cells.list\":\"observe\",\"eval_cells.peek\":\"observe\",\"prompt\":\"dynamic\",\"steer\":\"dynamic\",\"follow_up\":\"dynamic\",\"abort\":\"drive\",\"interrupt\":\"drive\",\"abort_retry\":\"drive\",\"abort_compaction\":\"drive\",\"abort_branch_summary\":\"drive\",\"compact\":\"drive\",\"clear_queue\":\"drive\",\"dequeue_message\":\"drive\",\"edit_queued_message\":\"drive\",\"hold_input\":\"drive\",\"withdraw_held_input\":\"drive\",\"append_user_message\":\"drive\",\"edit_user_message\":\"drive\",\"continue_from_leaf\":\"drive\",\"navigate_tree\":\"drive\",\"set_label\":\"drive\",\"set_session_name\":\"drive\",\"set_thinking_level\":\"dynamic\",\"set_model\":\"dynamic\",\"set_auto_compaction\":\"drive\",\"set_retry_fallback\":\"drive\",\"pause_for_run\":\"drive\",\"resume_for_run\":\"drive\",\"wake\":\"drive\",\"release_tool_barrier\":\"drive\",\"request_self_settle\":\"drive\",\"eval_cells.stop\":\"drive\",\"append_session_entry\":\"dynamic\",\"extension_ui_response\":\"answer\",\"extension_ui_progress\":\"answer\",\"new_session\":\"dynamic\",\"open_session\":\"dynamic\",\"resume_session\":\"thread\",\"fork\":\"thread\",\"clone\":\"thread\",\"close_session\":\"thread\",\"unload_session\":\"thread\",\"set_session_context\":\"thread\",\"attach_session\":\"thread\",\"select_hand\":\"device_admin\",\"bash\":\"device_admin\",\"abort_bash\":\"device_admin\",\"record_bash_result\":\"device_admin\",\"cleanup_bash_output\":\"device_admin\",\"extension_request\":\"device_admin\",\"reload\":\"device_admin\",\"check_reload_veto\":\"device_admin\",\"resolve_path\":\"device_admin\",\"login_start\":\"device_admin\",\"login_cancel\":\"device_admin\",\"login_api_key\":\"device_admin\",\"logout\":\"device_admin\",\"verify_api_key\":\"device_admin\",\"get_auth_providers\":\"device_admin\",\"get_provider_accounts\":\"device_admin\",\"account_order\":\"device_admin\",\"account_pin\":\"device_admin\",\"account_remove\":\"device_admin\",\"account_reset\":\"device_admin\",\"test_provider_account\":\"device_admin\",\"set_favorite_models\":\"device_admin\",\"set_scoped_models\":\"device_admin\",\"cycle_model\":\"device_admin\",\"cycle_thinking_level\":\"device_admin\",\"set_fast_mode\":\"device_admin\",\"set_steering_mode\":\"device_admin\",\"set_follow_up_mode\":\"device_admin\",\"set_auto_retry\":\"device_admin\",\"edit_assistant_message\":\"device_admin\",\"send_custom_message\":\"device_admin\",\"switch_session\":\"device_admin\",\"import_jsonl\":\"device_admin\",\"export_html\":\"device_admin\",\"export_jsonl\":\"device_admin\",\"set_client_info\":\"connection_local\",\"subscribe_sessions\":\"connection_local\",\"unsubscribe_sessions\":\"connection_local\",\"record_user_activity\":\"connection_local\",\"detach_connection\":\"connection_local\",\"release_session\":\"connection_local\",\"warm\":\"connection_local\",\"host_response\":\"connection_local\",\"release_attachment\":\"connection_local\",\"reclaim_session\":\"connection_local\",\"move_session\":\"connection_local\",\"get_recovery_page\":\"connection_local\",\"release_recovery\":\"connection_local\",\"cancel_attempt\":\"connection_local\",\"reset_stream\":\"connection_local\"},\"dynamic_versions\":{\"get_effect_status\":1,\"prompt\":1,\"steer\":1,\"follow_up\":1,\"set_thinking_level\":1,\"set_model\":1,\"append_session_entry\":1,\"new_session\":1,\"open_session\":2}},\"memory_pressure\":false,\"path_identity_resolver\":{\"state\":\"not_started\",\"detail\":null}}}\n{\"id\":\"req_1\",\"type\":\"response\",\"command\":\"set_client_info\",\"success\":true}\n{\"type\":\"queued\",\"for_request\":\"req_2\",\"position\":1,\"in_flight\":0}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-2>\",\"method\":\"setWidget\",\"widgetKey\":\"todo-sidebar\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-3>\",\"method\":\"setStatus\",\"statusKey\":\"anthropic-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-4>\",\"method\":\"setWidget\",\"widgetKey\":\"anthropic-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-5>\",\"method\":\"setStatus\",\"statusKey\":\"openai-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-6>\",\"method\":\"setWidget\",\"widgetKey\":\"openai-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-7>\",\"method\":\"setStatus\",\"statusKey\":\"monitors\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-8>\",\"method\":\"setStatus\",\"statusKey\":\"pi-websearch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-9>\",\"method\":\"setWidget\",\"widgetKey\":\"pi-websearch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-10>\",\"method\":\"setStatus\",\"statusKey\":\"pi-webfetch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-11>\",\"method\":\"setWidget\",\"widgetKey\":\"pi-webfetch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"entry_appended\",\"entry\":{\"type\":\"custom\",\"customType\":\"pi-rules.scan\",\"data\":{\"cwd\":\"<root>/cwd\",\"reason\":\"startup\"},\"startupBookkeeping\":true,\"id\":\"<entry-1>\",\"parentId\":\"<entry-2>\",\"timestamp\":\"2026-10-29T00:00:00.000Z\"},\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-12>\",\"method\":\"setStatus\",\"statusKey\":\"todo-waiting\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-13>\",\"method\":\"setStatus\",\"statusKey\":\"goal\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"session_opened\",\"sessionId\":\"rpc-1\",\"durableSessionId\":\"<uuid-14>\",\"sessionPath\":\"<root>/cwd/session.jsonl\",\"kind\":\"interactive\",\"cwd\":\"<root>/cwd\"}\n{\"id\":\"req_2\",\"type\":\"response\",\"command\":\"open_session\",\"success\":true,\"data\":{\"sessionId\":\"rpc-1\",\"state\":{\"answeredUiRequests\":[],\"paused\":false,\"pausedNoticeCount\":0,\"holds\":[],\"lifecycle\":{\"state\":\"done\",\"seq\":0,\"epoch\":0,\"epochOrigin\":\"automatic\",\"humanInputRevision\":0,\"selfSettleEligible\":true,\"restoring\":false,\"persisted\":false,\"runPaused\":false,\"since\":\"2026-10-29T00:00:00.000Z\",\"role\":\"root\",\"rootSessionId\":\"<uuid-14>\",\"activityRevision\":{\"instanceId\":\"<uuid-15>\",\"revision\":0},\"waitingOn\":{\"children\":0,\"background\":[],\"human\":[]},\"holds\":[],\"observedAt\":\"2026-10-29T00:00:00.000Z\"},\"pendingQuestions\":[],\"pendingDialogs\":[],\"model\":{\"id\":\"faux-a\",\"name\":\"faux-a\",\"api\":\"faux:fixture\",\"provider\":\"faux\",\"baseUrl\":\"http://localhost:0\",\"reasoning\":false,\"input\":[\"text\",\"image\"],\"cost\":{\"input\":0,\"output\":0,\"cacheRead\":0,\"cacheWrite\":0},\"contextWindow\":128000,\"maxTokens\":16384},\"pendingModelSwitch\":null,\"thinkingLevel\":\"off\",\"thinkingLevelSource\":\"default\",\"sessionModelThinkingLevels\":{\"faux/faux-a\":\"off\"},\"fastMode\":false,\"isStreaming\":false,\"pausedHeldInputCount\":0,\"runPaused\":false,\"pause\":{\"pauseSeq\":0,\"records\":[]},\"isCompacting\":false,\"retryAttempt\":0,\"isBashRunning\":false,\"steeringMode\":\"all\",\"followUpMode\":\"one-at-a-time\",\"sessionFile\":\"<root>/cwd/session.jsonl\",\"sessionId\":\"<uuid-14>\",\"cwd\":\"<root>/cwd\",\"projectTrusted\":false,\"entries\":[{\"type\":\"model_change\",\"id\":\"<entry-3>\",\"parentId\":null,\"timestamp\":\"2026-10-29T00:00:00.000Z\",\"provider\":\"faux\",\"modelId\":\"faux-a\"},{\"type\":\"thinking_level_change\",\"id\":\"<entry-2>\",\"parentId\":\"<entry-3>\",\"timestamp\":\"2026-10-29T00:00:00.000Z\",\"thinkingLevel\":\"off\",\"provider\":\"faux\",\"modelId\":\"faux-a\"},{\"type\":\"custom\",\"customType\":\"pi-rules.scan\",\"data\":{\"cwd\":\"<root>/cwd\",\"reason\":\"startup\"},\"startupBookkeeping\":true,\"id\":\"<entry-1>\",\"parentId\":\"<entry-2>\",\"timestamp\":\"2026-10-29T00:00:00.000Z\"}],\"steering\":[],\"followUp\":[],\"ordered\":[],\"autoCompactionEnabled\":true,\"messageCount\":0,\"pendingMessageCount\":0,\"usageTotals\":{\"input\":0,\"output\":0,\"cacheRead\":0,\"cacheWrite\":0,\"cost\":0},\"contextUsage\":{\"tokens\":0,\"contextWindow\":128000,\"percent\":0},\"favoriteModels\":[],\"scopedModels\":[]}},\"sessionId\":\"rpc-1\"}\n{\"id\":\"req_3\",\"type\":\"response\",\"command\":\"get_entries\",\"success\":true,\"data\":{\"entries\":[{\"type\":\"model_change\",\"id\":\"<entry-3>\",\"parentId\":null,\"timestamp\":\"2026-10-29T00:00:00.000Z\",\"provider\":\"faux\",\"modelId\":\"faux-a\"},{\"type\":\"thinking_level_change\",\"id\":\"<entry-2>\",\"parentId\":\"<entry-3>\",\"timestamp\":\"2026-10-29T00:00:00.000Z\",\"thinkingLevel\":\"off\",\"provider\":\"faux\",\"modelId\":\"faux-a\"},{\"type\":\"custom\",\"customType\":\"pi-rules.scan\",\"data\":{\"cwd\":\"<root>/cwd\",\"reason\":\"startup\"},\"startupBookkeeping\":true,\"id\":\"<entry-1>\",\"parentId\":\"<entry-2>\",\"timestamp\":\"2026-10-29T00:00:00.000Z\"}],\"leafId\":\"<entry-1>\"},\"sessionId\":\"rpc-1\"}\n{\"type\":\"session_closed\",\"sessionId\":\"rpc-1\",\"reason\":\"client_close\"}\n{\"id\":\"req_4\",\"type\":\"response\",\"command\":\"close_session\",\"success\":true,\"data\":{},\"sessionId\":\"rpc-1\"}\n",
|
|
3
|
+
"rpcClientFrames": "{\"id\":\"rpc-auth-protocol\",\"type\":\"response\",\"command\":\"get_protocol_info\",\"success\":true,\"data\":{\"protocolVersion\":1,\"serverVersion\":\"<server-version>\",\"capabilities\":[\"<capabilities>\"],\"mode\":\"multi\",\"instanceId\":\"<uuid-1>\",\"generation\":0,\"engineVersion\":\"<server-version>\",\"engineOrdinal\":\"<engine-ordinal>\",\"launch_profile\":{\"profile_id\":\"ca7a49435f02009fdda5dac49d29408dcfeb1ab5374353784c5a9def467f5be1\",\"core\":{\"extensions\":[],\"multi_session\":false,\"session_runtime\":\"worker\"}},\"agentDir\":\"<root>/agent\",\"method_classes\":{\"version\":1,\"digest\":\"3860136b2a1b07c20373ed361df07c045bd1e84fce001917e271ca0e4b903e63\",\"classes\":{\"get_protocol_info\":\"observe\",\"get_subscription_limits\":\"observe\",\"list_sessions\":\"observe\",\"list_hands\":\"observe\",\"get_state\":\"observe\",\"get_snapshot\":\"observe\",\"get_entries\":\"observe\",\"get_messages\":\"observe\",\"get_tree\":\"observe\",\"get_fork_messages\":\"observe\",\"get_last_assistant_text\":\"observe\",\"get_session_stats\":\"observe\",\"get_effect_status\":\"dynamic\",\"get_pending_inputs\":\"observe\",\"get_follow_up_messages\":\"observe\",\"get_steering_messages\":\"observe\",\"get_commands\":\"observe\",\"get_loaded_surfaces\":\"observe\",\"get_project_trust\":\"observe\",\"get_available_models\":\"observe\",\"get_available_thinking_levels\":\"observe\",\"get_model_thinking_level\":\"observe\",\"get_fast_mode\":\"observe\",\"get_media\":\"observe\",\"memory_report\":\"observe\",\"eval_cells.list\":\"observe\",\"eval_cells.peek\":\"observe\",\"prompt\":\"dynamic\",\"steer\":\"dynamic\",\"follow_up\":\"dynamic\",\"abort\":\"drive\",\"interrupt\":\"drive\",\"abort_retry\":\"drive\",\"abort_compaction\":\"drive\",\"abort_branch_summary\":\"drive\",\"compact\":\"drive\",\"clear_queue\":\"drive\",\"dequeue_message\":\"drive\",\"edit_queued_message\":\"drive\",\"hold_input\":\"drive\",\"withdraw_held_input\":\"drive\",\"append_user_message\":\"drive\",\"edit_user_message\":\"drive\",\"continue_from_leaf\":\"drive\",\"navigate_tree\":\"drive\",\"set_label\":\"drive\",\"set_session_name\":\"drive\",\"set_thinking_level\":\"dynamic\",\"set_model\":\"dynamic\",\"set_auto_compaction\":\"drive\",\"set_retry_fallback\":\"drive\",\"pause_for_run\":\"drive\",\"resume_for_run\":\"drive\",\"wake\":\"drive\",\"release_tool_barrier\":\"drive\",\"request_self_settle\":\"drive\",\"eval_cells.stop\":\"drive\",\"append_session_entry\":\"dynamic\",\"extension_ui_response\":\"answer\",\"extension_ui_progress\":\"answer\",\"new_session\":\"dynamic\",\"open_session\":\"dynamic\",\"resume_session\":\"thread\",\"fork\":\"thread\",\"clone\":\"thread\",\"close_session\":\"thread\",\"unload_session\":\"thread\",\"set_session_context\":\"thread\",\"attach_session\":\"thread\",\"select_hand\":\"device_admin\",\"bash\":\"device_admin\",\"abort_bash\":\"device_admin\",\"record_bash_result\":\"device_admin\",\"cleanup_bash_output\":\"device_admin\",\"extension_request\":\"device_admin\",\"reload\":\"device_admin\",\"check_reload_veto\":\"device_admin\",\"resolve_path\":\"device_admin\",\"login_start\":\"device_admin\",\"login_cancel\":\"device_admin\",\"login_api_key\":\"device_admin\",\"logout\":\"device_admin\",\"verify_api_key\":\"device_admin\",\"get_auth_providers\":\"device_admin\",\"get_provider_accounts\":\"device_admin\",\"account_order\":\"device_admin\",\"account_pin\":\"device_admin\",\"account_remove\":\"device_admin\",\"account_reset\":\"device_admin\",\"test_provider_account\":\"device_admin\",\"set_favorite_models\":\"device_admin\",\"set_scoped_models\":\"device_admin\",\"cycle_model\":\"device_admin\",\"cycle_thinking_level\":\"device_admin\",\"set_fast_mode\":\"device_admin\",\"set_steering_mode\":\"device_admin\",\"set_follow_up_mode\":\"device_admin\",\"set_auto_retry\":\"device_admin\",\"set_project_trust\":\"device_admin\",\"get_project_settings\":\"device_admin\",\"set_project_setting\":\"device_admin\",\"edit_assistant_message\":\"device_admin\",\"send_custom_message\":\"device_admin\",\"switch_session\":\"device_admin\",\"import_jsonl\":\"device_admin\",\"export_html\":\"device_admin\",\"export_jsonl\":\"device_admin\",\"set_client_info\":\"connection_local\",\"subscribe_sessions\":\"connection_local\",\"unsubscribe_sessions\":\"connection_local\",\"record_user_activity\":\"connection_local\",\"detach_connection\":\"connection_local\",\"release_session\":\"connection_local\",\"warm\":\"connection_local\",\"host_response\":\"connection_local\",\"release_attachment\":\"connection_local\",\"reclaim_session\":\"connection_local\",\"move_session\":\"connection_local\",\"get_recovery_page\":\"connection_local\",\"release_recovery\":\"connection_local\",\"cancel_attempt\":\"connection_local\",\"reset_stream\":\"connection_local\"},\"dynamic_versions\":{\"get_effect_status\":1,\"prompt\":1,\"steer\":1,\"follow_up\":1,\"set_thinking_level\":1,\"set_model\":1,\"append_session_entry\":1,\"new_session\":1,\"open_session\":2}},\"memory_pressure\":false,\"path_identity_resolver\":{\"state\":\"not_started\",\"detail\":null}}}\n{\"id\":\"req_1\",\"type\":\"response\",\"command\":\"set_client_info\",\"success\":true}\n{\"type\":\"queued\",\"for_request\":\"req_2\",\"position\":1,\"in_flight\":0}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-2>\",\"method\":\"setWidget\",\"widgetKey\":\"todo-sidebar\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-3>\",\"method\":\"setStatus\",\"statusKey\":\"anthropic-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-4>\",\"method\":\"setWidget\",\"widgetKey\":\"anthropic-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-5>\",\"method\":\"setStatus\",\"statusKey\":\"openai-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-6>\",\"method\":\"setWidget\",\"widgetKey\":\"openai-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-7>\",\"method\":\"setStatus\",\"statusKey\":\"monitors\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-8>\",\"method\":\"setStatus\",\"statusKey\":\"pi-websearch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-9>\",\"method\":\"setWidget\",\"widgetKey\":\"pi-websearch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-10>\",\"method\":\"setStatus\",\"statusKey\":\"pi-webfetch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-11>\",\"method\":\"setWidget\",\"widgetKey\":\"pi-webfetch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"entry_appended\",\"entry\":{\"type\":\"custom\",\"customType\":\"pi-rules.scan\",\"data\":{\"cwd\":\"<root>/cwd\",\"reason\":\"startup\"},\"startupBookkeeping\":true,\"id\":\"<entry-1>\",\"parentId\":\"<entry-2>\",\"timestamp\":\"2026-10-29T00:00:00.000Z\"},\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-12>\",\"method\":\"setStatus\",\"statusKey\":\"todo-waiting\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-13>\",\"method\":\"setStatus\",\"statusKey\":\"goal\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"session_opened\",\"sessionId\":\"rpc-1\",\"durableSessionId\":\"<uuid-14>\",\"sessionPath\":\"<root>/cwd/session.jsonl\",\"kind\":\"interactive\",\"cwd\":\"<root>/cwd\"}\n{\"id\":\"req_2\",\"type\":\"response\",\"command\":\"open_session\",\"success\":true,\"data\":{\"sessionId\":\"rpc-1\",\"state\":{\"answeredUiRequests\":[],\"paused\":false,\"pausedNoticeCount\":0,\"holds\":[],\"lifecycle\":{\"state\":\"done\",\"seq\":0,\"epoch\":0,\"epochOrigin\":\"automatic\",\"humanInputRevision\":0,\"selfSettleEligible\":true,\"restoring\":false,\"persisted\":false,\"runPaused\":false,\"since\":\"2026-10-29T00:00:00.000Z\",\"role\":\"root\",\"rootSessionId\":\"<uuid-14>\",\"activityRevision\":{\"instanceId\":\"<uuid-15>\",\"revision\":0},\"waitingOn\":{\"children\":0,\"background\":[],\"human\":[]},\"holds\":[],\"observedAt\":\"2026-10-29T00:00:00.000Z\"},\"pendingQuestions\":[],\"pendingDialogs\":[],\"model\":{\"id\":\"faux-a\",\"name\":\"faux-a\",\"api\":\"faux:fixture\",\"provider\":\"faux\",\"baseUrl\":\"http://localhost:0\",\"reasoning\":false,\"input\":[\"text\",\"image\"],\"cost\":{\"input\":0,\"output\":0,\"cacheRead\":0,\"cacheWrite\":0},\"contextWindow\":128000,\"maxTokens\":16384},\"pendingModelSwitch\":null,\"thinkingLevel\":\"off\",\"thinkingLevelSource\":\"default\",\"sessionModelThinkingLevels\":{\"faux/faux-a\":\"off\"},\"fastMode\":false,\"isStreaming\":false,\"pausedHeldInputCount\":0,\"runPaused\":false,\"pause\":{\"pauseSeq\":0,\"records\":[]},\"isCompacting\":false,\"retryAttempt\":0,\"isBashRunning\":false,\"steeringMode\":\"all\",\"followUpMode\":\"one-at-a-time\",\"sessionFile\":\"<root>/cwd/session.jsonl\",\"sessionId\":\"<uuid-14>\",\"cwd\":\"<root>/cwd\",\"projectTrusted\":false,\"entries\":[{\"type\":\"model_change\",\"id\":\"<entry-3>\",\"parentId\":null,\"timestamp\":\"2026-10-29T00:00:00.000Z\",\"provider\":\"faux\",\"modelId\":\"faux-a\"},{\"type\":\"thinking_level_change\",\"id\":\"<entry-2>\",\"parentId\":\"<entry-3>\",\"timestamp\":\"2026-10-29T00:00:00.000Z\",\"thinkingLevel\":\"off\",\"provider\":\"faux\",\"modelId\":\"faux-a\"},{\"type\":\"custom\",\"customType\":\"pi-rules.scan\",\"data\":{\"cwd\":\"<root>/cwd\",\"reason\":\"startup\"},\"startupBookkeeping\":true,\"id\":\"<entry-1>\",\"parentId\":\"<entry-2>\",\"timestamp\":\"2026-10-29T00:00:00.000Z\"}],\"steering\":[],\"followUp\":[],\"ordered\":[],\"autoCompactionEnabled\":true,\"messageCount\":0,\"pendingMessageCount\":0,\"usageTotals\":{\"input\":0,\"output\":0,\"cacheRead\":0,\"cacheWrite\":0,\"cost\":0},\"contextUsage\":{\"tokens\":0,\"contextWindow\":128000,\"percent\":0},\"favoriteModels\":[],\"scopedModels\":[]}},\"sessionId\":\"rpc-1\"}\n{\"id\":\"req_3\",\"type\":\"response\",\"command\":\"get_entries\",\"success\":true,\"data\":{\"entries\":[{\"type\":\"model_change\",\"id\":\"<entry-3>\",\"parentId\":null,\"timestamp\":\"2026-10-29T00:00:00.000Z\",\"provider\":\"faux\",\"modelId\":\"faux-a\"},{\"type\":\"thinking_level_change\",\"id\":\"<entry-2>\",\"parentId\":\"<entry-3>\",\"timestamp\":\"2026-10-29T00:00:00.000Z\",\"thinkingLevel\":\"off\",\"provider\":\"faux\",\"modelId\":\"faux-a\"},{\"type\":\"custom\",\"customType\":\"pi-rules.scan\",\"data\":{\"cwd\":\"<root>/cwd\",\"reason\":\"startup\"},\"startupBookkeeping\":true,\"id\":\"<entry-1>\",\"parentId\":\"<entry-2>\",\"timestamp\":\"2026-10-29T00:00:00.000Z\"}],\"leafId\":\"<entry-1>\"},\"sessionId\":\"rpc-1\"}\n{\"type\":\"session_closed\",\"sessionId\":\"rpc-1\",\"reason\":\"client_close\"}\n{\"id\":\"req_4\",\"type\":\"response\",\"command\":\"close_session\",\"success\":true,\"data\":{},\"sessionId\":\"rpc-1\"}\n",
|
|
4
4
|
"subscribeRequests": "{\"type\":\"subscribe_sessions\",\"mirror\":\"all\",\"id\":\"subscriber-1\"}\n{\"type\":\"unsubscribe_sessions\",\"subscriptionId\":\"sub-1\",\"id\":\"subscriber-2\"}\n",
|
|
5
5
|
"subscribeFrames": "{\"id\":\"subscriber-1\",\"type\":\"response\",\"command\":\"subscribe_sessions\",\"success\":true,\"data\":{\"subscriptionId\":\"sub-1\",\"snapshot\":[],\"seq\":0,\"hostGeneration\":\"0\",\"hostInstanceId\":\"<uuid-1>\"}}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-2>\",\"method\":\"setWidget\",\"widgetKey\":\"todo-sidebar\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-3>\",\"method\":\"setStatus\",\"statusKey\":\"anthropic-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-4>\",\"method\":\"setWidget\",\"widgetKey\":\"anthropic-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-5>\",\"method\":\"setStatus\",\"statusKey\":\"openai-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-6>\",\"method\":\"setWidget\",\"widgetKey\":\"openai-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-7>\",\"method\":\"setStatus\",\"statusKey\":\"monitors\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-8>\",\"method\":\"setStatus\",\"statusKey\":\"pi-websearch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-9>\",\"method\":\"setWidget\",\"widgetKey\":\"pi-websearch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-10>\",\"method\":\"setStatus\",\"statusKey\":\"pi-webfetch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-11>\",\"method\":\"setWidget\",\"widgetKey\":\"pi-webfetch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"entry_appended\",\"entry\":{\"type\":\"custom\",\"customType\":\"pi-rules.scan\",\"data\":{\"cwd\":\"<root>/cwd\",\"reason\":\"startup\"},\"startupBookkeeping\":true,\"id\":\"<entry-1>\",\"parentId\":\"<entry-2>\",\"timestamp\":\"2026-10-29T00:00:00.000Z\"},\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-12>\",\"method\":\"setStatus\",\"statusKey\":\"todo-waiting\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-13>\",\"method\":\"setStatus\",\"statusKey\":\"goal\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"session_opened\",\"sessionId\":\"rpc-1\",\"durableSessionId\":\"<uuid-14>\",\"sessionPath\":\"<root>/cwd/session.jsonl\",\"kind\":\"interactive\",\"cwd\":\"<root>/cwd\"}\n{\"type\":\"session_status\",\"subscriptionId\":\"sub-1\",\"seq\":1,\"sessionId\":\"rpc-1\",\"status\":\"idle\",\"kind\":\"interactive\",\"cwd\":\"<root>/cwd\",\"attachments\":1,\"durableSessionId\":\"<uuid-14>\",\"sessionPath\":\"<root>/cwd/session.jsonl\",\"model\":{\"provider\":\"faux\",\"id\":\"faux-a\"},\"thinkingLevel\":\"off\",\"pendingQueue\":{\"steering\":0,\"followUp\":0},\"lastChange\":{\"at\":\"2026-10-29T00:00:00.000Z\",\"cause\":\"open\",\"by\":\"client\"}}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-15>\",\"method\":\"setStatus\",\"statusKey\":\"anthropic-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-16>\",\"method\":\"setWidget\",\"widgetKey\":\"anthropic-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-17>\",\"method\":\"setStatus\",\"statusKey\":\"openai-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-18>\",\"method\":\"setWidget\",\"widgetKey\":\"openai-web-search\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-19>\",\"method\":\"setStatus\",\"statusKey\":\"monitors\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-20>\",\"method\":\"setStatus\",\"statusKey\":\"pi-websearch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-21>\",\"method\":\"setWidget\",\"widgetKey\":\"pi-websearch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-22>\",\"method\":\"setStatus\",\"statusKey\":\"pi-webfetch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-23>\",\"method\":\"setWidget\",\"widgetKey\":\"pi-webfetch\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"extension_ui_request\",\"id\":\"<uuid-24>\",\"method\":\"setStatus\",\"statusKey\":\"loop\",\"sessionId\":\"rpc-1\"}\n{\"type\":\"session_closed\",\"sessionId\":\"rpc-1\",\"reason\":\"client_close\"}\n{\"type\":\"session_status\",\"subscriptionId\":\"sub-1\",\"seq\":2,\"sessionId\":\"rpc-1\",\"status\":\"closed\",\"reason\":\"client_close\",\"kind\":\"interactive\",\"cwd\":\"<root>/cwd\",\"attachments\":1,\"durableSessionId\":\"<uuid-14>\",\"sessionPath\":\"<root>/cwd/session.jsonl\",\"model\":{\"provider\":\"faux\",\"id\":\"faux-a\"},\"thinkingLevel\":\"off\",\"pendingQueue\":{\"steering\":0,\"followUp\":0},\"lastChange\":{\"at\":\"2026-10-29T00:00:00.000Z\",\"cause\":\"close\",\"by\":\"client\"}}\n{\"id\":\"subscriber-2\",\"type\":\"response\",\"command\":\"unsubscribe_sessions\",\"success\":true}\n"
|
|
6
6
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"methodClassesVersion": 1,
|
|
3
|
-
"methodClassesDigest": "
|
|
3
|
+
"methodClassesDigest": "3860136b2a1b07c20373ed361df07c045bd1e84fce001917e271ca0e4b903e63",
|
|
4
4
|
"sampleId": "00000000-0000-7000-8000-000000000000",
|
|
5
5
|
"samplePathRoot": "/nonexistent/senpi-rpc-inbound-sample",
|
|
6
|
-
"methodCount":
|
|
6
|
+
"methodCount": 122,
|
|
7
7
|
"methods": [
|
|
8
8
|
{
|
|
9
9
|
"method": "abort",
|
|
@@ -534,6 +534,24 @@
|
|
|
534
534
|
"type": "get_pending_inputs"
|
|
535
535
|
}
|
|
536
536
|
},
|
|
537
|
+
{
|
|
538
|
+
"method": "get_project_settings",
|
|
539
|
+
"class": "device_admin",
|
|
540
|
+
"sampleClass": "device_admin",
|
|
541
|
+
"connectionLocal": false,
|
|
542
|
+
"sample": {
|
|
543
|
+
"type": "get_project_settings"
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"method": "get_project_trust",
|
|
548
|
+
"class": "observe",
|
|
549
|
+
"sampleClass": "observe",
|
|
550
|
+
"connectionLocal": false,
|
|
551
|
+
"sample": {
|
|
552
|
+
"type": "get_project_trust"
|
|
553
|
+
}
|
|
554
|
+
},
|
|
537
555
|
{
|
|
538
556
|
"method": "get_protocol_info",
|
|
539
557
|
"class": "observe",
|
|
@@ -1047,6 +1065,27 @@
|
|
|
1047
1065
|
"modelId": "rpc-sample-model"
|
|
1048
1066
|
}
|
|
1049
1067
|
},
|
|
1068
|
+
{
|
|
1069
|
+
"method": "set_project_setting",
|
|
1070
|
+
"class": "device_admin",
|
|
1071
|
+
"sampleClass": "device_admin",
|
|
1072
|
+
"connectionLocal": false,
|
|
1073
|
+
"sample": {
|
|
1074
|
+
"type": "set_project_setting",
|
|
1075
|
+
"key": "defaultThinkingLevel",
|
|
1076
|
+
"value": "minimal"
|
|
1077
|
+
}
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
"method": "set_project_trust",
|
|
1081
|
+
"class": "device_admin",
|
|
1082
|
+
"sampleClass": "device_admin",
|
|
1083
|
+
"connectionLocal": false,
|
|
1084
|
+
"sample": {
|
|
1085
|
+
"type": "set_project_trust",
|
|
1086
|
+
"choice": "trust"
|
|
1087
|
+
}
|
|
1088
|
+
},
|
|
1050
1089
|
{
|
|
1051
1090
|
"method": "set_retry_fallback",
|
|
1052
1091
|
"class": "drive",
|
package/docs/extensions.md
CHANGED
|
@@ -1380,7 +1380,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1380
1380
|
|
|
1381
1381
|
Optional read-only list of resolved paths for every successfully loaded extension, including event-only extensions. Builtin and inline factories retain synthetic identifiers such as `<builtin:herdr>`. The runner resolves file paths against the session working directory and provides this list to event, command, and tool contexts; older hosts and hand-built contexts may omit it.
|
|
1382
1382
|
|
|
1383
|
-
The builtin `herdr` reporter reads this list at session start. Inside a herdr TUI pane it reports pending questions and host dialogs as `blocked`, active
|
|
1383
|
+
The builtin `herdr` reporter reads this list at session start. Inside a herdr TUI pane it reports pending questions and host dialogs as `blocked`, an active turn and bounded background work that will start a turn (subagents, DAG runs, detached eval cells, one-shot monitors with a deadline) as `working`, and otherwise `idle`; once the turn has ended, monitors with no deadline and background terminal sessions are named in the idle report's message instead of keeping the pane `working`, using source `custom:senpi`. It reports session titles and releases the pane only on quit, not reload or session navigation.
|
|
1384
1384
|
|
|
1385
1385
|
In every TUI session, herdr pane or not, the same reporter also publishes that state through `ctx.ui.setProgramStatus` (OSC 7501), so terminals that read the Program Status Protocol, such as herdr-core panes, see it too. A built-in question is reported with `kind: "question"` and a permission prompt with `kind: "permission"`; other dialogs carry no kind. The status is cleared on quit. Deferring to a user reporter affects only the herdr socket, not this status.
|
|
1386
1386
|
|
|
@@ -2490,6 +2490,22 @@ pi.registerMemoryReporter("myCache", () => ({ entries: cache.size, approxBytes:
|
|
|
2490
2490
|
|
|
2491
2491
|
Names the report owns (`sessionId`, `takenAt`, `pid`, `main`, `kernels`, `residentStore`, `tuiRenderCache`, `heapSnapshot`, `reporterErrors`) throw at registration. When two extensions register the same name, the first loaded wins.
|
|
2492
2492
|
|
|
2493
|
+
### pi.registerRpcRemoteSource(source)
|
|
2494
|
+
|
|
2495
|
+
Serve `monitor` rpc targets that name a session on another device: `<device>/<session>` or `<device>/*` (see [terminal tools](terminal-tools.md#session-status-rpc-branch)). senpi knows no transport; the source does. `open(target, { events, exclude, resumeFrom? }, handlers)` resolves to `{ initial, stop }`, where `initial` is `{ rows, settledTurns?, generation?, cursor? }` and its `rows` are snapshot-shaped (`sessionId`, `status`, ...). Through `handlers` the source reports `record(record)` for each live record, `resynced(state)` after a gap, `cursor(cursor)` when its resume position moves, `lost(reason)` when the device stops answering, and `ended(reason)` when the watch can never continue. senpi renders every record with the local renderer, reports each settled turn a resync names in `settledTurns` once and each live `agent_settled` as it arrives, and saves the cursor in a persistent monitor's checkpoint, so a restore passes it back as `resumeFrom`. Reject `open` with a typed reason when the target cannot be watched.
|
|
2496
|
+
|
|
2497
|
+
```typescript
|
|
2498
|
+
const unregister = pi.registerRpcRemoteSource({
|
|
2499
|
+
async open(target, options, handlers) {
|
|
2500
|
+
const stream = await myTransport.watch(target.device, target.session, options.resumeFrom);
|
|
2501
|
+
stream.on("record", handlers.record);
|
|
2502
|
+
return { initial: stream.state, stop: () => stream.close() };
|
|
2503
|
+
},
|
|
2504
|
+
});
|
|
2505
|
+
```
|
|
2506
|
+
|
|
2507
|
+
The latest registration wins; it is removed on unregister, a failed load or runtime invalidation. Without one, a remote target is refused.
|
|
2508
|
+
|
|
2493
2509
|
### pi.registerEntryRenderer(customType, renderer)
|
|
2494
2510
|
|
|
2495
2511
|
Register a custom TUI renderer for custom entries with your `customType`. Custom entries are created with `pi.appendEntry()` and do not participate in LLM context.
|