@xmoon76/dsh-pi-tui 0.5.1 → 0.5.3

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 (31) hide show
  1. package/README.en.md +130 -17
  2. package/README.md +76 -16
  3. package/cordis.patch.yml +17 -49
  4. package/dist/builtins.mjs +3 -2
  5. package/dist/context-summary-CxUpNkA9.mjs +2951 -0
  6. package/dist/extension/advanced.d.mts +2 -2
  7. package/dist/extension/unstable.d.mts +1 -1
  8. package/dist/{extensions-v3Rf-qJA.d.mts → extensions-DzpBiiYb.d.mts} +1 -1
  9. package/dist/{extensions-1WYBUQ8I.mjs → extensions-a-rxanjw.mjs} +3514 -2892
  10. package/dist/extensions.d.mts +2 -2
  11. package/dist/extensions.mjs +1 -1
  12. package/dist/index.d.mts +13 -11
  13. package/dist/index.mjs +20158 -7768
  14. package/dist/performance-host-BJT6scGF.mjs +266 -0
  15. package/dist/performance-host.d.mts +36 -0
  16. package/dist/performance-host.mjs +2 -0
  17. package/dist/performance-view-jvvd8Jn7.mjs +476 -0
  18. package/dist/{public-types-BEjj7FEb.d.mts → public-types-gZi3iFNh.d.mts} +1 -1
  19. package/dist/rolldown-runtime-8H4AJuhK.mjs +14 -0
  20. package/dist/{runtime-CcQyhIvI.mjs → runtime-BtPH-UUb.mjs} +625 -261
  21. package/dist/session-BZLxhrPQ.mjs +5697 -0
  22. package/dist/{startup-CmTYVTGC.mjs → startup-D5Xu8diR.mjs} +22 -7
  23. package/dist/startup.d.mts +1 -2
  24. package/dist/startup.mjs +1 -1
  25. package/dist/tasks-D_z5Yjjr.mjs +267 -0
  26. package/dist/{terminal-progress-source-BfiTKDT-.mjs → terminal-progress-source-BlmksrSD.mjs} +116 -265
  27. package/generated/dsh-presets/cordis.patch.yml +8 -26
  28. package/generated/dsh-presets/minimal.patch.yml +17 -0
  29. package/generated/dsh-presets/ptc.patch.yml +8 -26
  30. package/generated/dsh-presets/standard.patch.yml +8 -26
  31. package/package.json +166 -146
@@ -1,272 +1,32 @@
1
- import { ft as isFooterLayout, pt as parseFooterLayout } from "./extensions-1WYBUQ8I.mjs";
1
+ import { ht as parseFooterLayout, mt as isFooterLayout } from "./extensions-a-rxanjw.mjs";
2
2
  import { accessSync, constants, readdirSync, statSync } from "node:fs";
3
3
  import { delimiter, join, posix, win32 } from "node:path";
4
4
  import { homedir } from "node:os";
5
5
  import { spawn } from "node:child_process";
6
- //#region src/runtime/process/errors.ts
6
+ //#region src/runtime/direct/working-directory-direct.ts
7
7
  /**
8
- * Shared, TOTAL error-observation helpers for every async boundary in the
9
- * TUI: the owned/detached entries (`tasks.ts`), the lifecycle roots
10
- * (startup, exit, flush), the per-task callbacks and the diagnostics
11
- * formatter. One implementation, one behavior — no drift between modules.
8
+ * The effective directory of one live Agent's Session: the official
9
+ * `workingDirectory.get(session)` value when the service is mounted, else the
10
+ * immutable header cwd — the INITIAL committed value of that same projection,
11
+ * so a minimal composition without the row keeps the historical read instead
12
+ * of inventing a directory.
12
13
  *
13
- * CONTRACT (deliberately scoped, honestly worded): the SYNC boundary is
14
- * total — observing any legal JavaScript value (a Proxy with a throwing
15
- * `getPrototypeOf` trap, a throwing `message` getter, a throwing
16
- * `toString`/`Symbol.toPrimitive`) can never make THIS code throw or
17
- * reject; every observation is protected and every fallback is a fixed
18
- * constant that never touches the value again. What is NOT guaranteed: an
19
- * observer (getter/trap/coercion) that, WHILE being observed, spawns its
20
- * OWN detached async work (e.g. `void Promise.reject(...)` inside
21
- * `toString`) — that rejection belongs to the observer, not to this
22
- * boundary, and no synchronous try/catch can intercept it. Callers must
23
- * not describe this module as a strict "any legal value, zero side
24
- * effects" guarantee.
25
- * @module @xmoon76/dsh-pi-tui/runtime/process/errors
14
+ * @param workingDirectory - the official service, or `undefined` when the
15
+ * composition does not mount the row.
16
+ * @param agent - the exact live Agent whose Session is read.
17
+ * @returns the effective absolute directory, or `undefined` when neither the
18
+ * service nor a header cwd can answer (never a Client-side guess).
26
19
  */
27
- /**
28
- * Describe an arbitrary thrown value as a string WITHOUT ever throwing:
29
- * `instanceof`, property reads and coercion are all inside the protection,
30
- * the fallbacks are FIXED constants that never touch the value again, and
31
- * a hostile Proxy/getter/`Symbol.toPrimitive` yields a stable placeholder
32
- * instead of escaping. (Best-effort beyond the sync boundary — see the
33
- * module contract.)
34
- */
35
- function safeErrorMessage(value) {
36
- try {
37
- if (value instanceof Error) try {
38
- const message = value.message;
39
- return typeof message === "string" ? message : "<error with non-string message>";
40
- } catch {
41
- return "<error with unreadable message>";
42
- }
43
- return String(value);
44
- } catch {
45
- return "<unprintable error>";
46
- }
20
+ function effectiveAgentCwd(workingDirectory, agent) {
21
+ if (workingDirectory === void 0) return agent.session.header.cwd;
22
+ return workingDirectory.get(agent.session);
47
23
  }
48
- /** Describe an arbitrary thrown value using its normal `String` form without
49
- * allowing hostile coercion to escape the async boundary. */
50
- function safeErrorString(value) {
51
- try {
52
- return String(value);
53
- } catch {
54
- return "<unprintable error>";
55
- }
56
- }
57
- //#endregion
58
- //#region src/runtime/process/tasks.ts
59
- /**
60
- * Whether an error represents an abort/cancel rather than a real failure.
61
- * TOTAL over the whole `unknown` domain: every probe (prototype-chain
62
- * walk, `name`/`code` getters) is inside the protection, and a hostile
63
- * value that throws while being observed simply classifies as NOT a
64
- * cancellation — recognizing a cancellation must never mint a new primary
65
- * error.
66
- */
67
- function isCancellation(error) {
68
- try {
69
- if (!(error instanceof Error)) return false;
70
- return error.name === "AbortError" || error.code === "ABORT_ERR";
71
- } catch {
72
- return false;
73
- }
74
- }
75
- /** Build a cancellation-shaped error the classifier recognizes (a plain
76
- * `new Error('...')` would route through the failure path). */
77
- function cancellationError(message) {
78
- const error = new Error(message);
79
- error.name = "AbortError";
80
- error.code = "ABORT_ERR";
81
- return error;
82
- }
83
- /** Read the live session id for diagnostics WITHOUT ever throwing: a
84
- * throwing `sessionId()` callback degrades to `undefined` (diagnostics
85
- * must not crash classification or the final sink). */
86
- function safeSessionId(options) {
87
- try {
88
- return options.sessionId?.();
89
- } catch {
90
- return;
91
- }
92
- }
93
- /**
94
- * Invoke the task factory SYNCHRONOUSLY (an ownership action inside the
95
- * factory — a stop, a latch, a spawn — must take effect before the helper
96
- * returns, so two calls in one input batch cannot both start), and convert
97
- * a synchronous throw into a rejected promise so it classifies exactly like
98
- * a rejection.
99
- */
100
- function invokeTask(task) {
101
- try {
102
- return Promise.resolve(task());
103
- } catch (error) {
104
- return Promise.reject(error);
105
- }
106
- }
107
- /**
108
- * Observe the settlement of an ALREADY-OWNED promise without taking ownership.
109
- * The callback runs on fulfilment or rejection and its own result is dropped,
110
- * so bookkeeping (for example removing a promise from a teardown-drained set)
111
- * never adds a second, unhandled rejection branch next to the real owner's
112
- * failure handling. Never use this to START work — that is `runDetached` /
113
- * `runOwned`.
114
- * @param promise - the promise whose failure semantics already have an owner.
115
- * @param onSettled - runs once, on either settlement.
116
- */
117
- function observeSettled(promise, onSettled) {
118
- promise.then(onSettled, onSettled);
119
- }
120
- /**
121
- * Attach rejection handling to a fire-and-forget task. The factory is
122
- * invoked synchronously (a synchronous throw is a rejection like any
123
- * other); every rejection is caught and classified:
124
- * - cancellation → debug diagnostics only (never a user error);
125
- * - recoverable (per the options hook) → notify + warn;
126
- * - anything else → warn.
127
- * The log line carries the task label and the live session id — never the
128
- * task payload (no API keys, prompt bodies, or shell output). A throwing
129
- * notify/diag/sessionId path cannot escape: it lands in the handler-failure
130
- * sink, which is itself total over the `unknown` domain.
131
- */
132
- function runDetached(label, task, options) {
133
- invokeTask(task).catch((error) => {
134
- if (isCancellation(error)) {
135
- options.diag.debug(label, {
136
- session: safeSessionId(options),
137
- cancelled: true
138
- });
139
- return;
140
- }
141
- const message = safeErrorMessage(error);
142
- options.diag.warn(label, {
143
- session: safeSessionId(options),
144
- error: message
145
- });
146
- if (options.recoverable?.(error) === true) options.notify?.(`${label}: ${message}`);
147
- }).catch(handlerFailure(label, options));
148
- }
149
- /**
150
- * The owned-workflow counterpart of {@link runDetached}: a fire-and-forget
151
- * task whose RESULT drives user-visible state (a settled card, a restored
152
- * draft, a queue mutation, a notification). The factory starts
153
- * SYNCHRONOUSLY; the TASK phase (factory throw / task rejection) classifies
154
- * with the error shape plus the task-local predicate; the onResult phase is
155
- * classified as a PRIMARY failure — ERROR + onError, never a cancellation,
156
- * regardless of error shape or task-local state; a terminal side-effect
157
- * handler's (onCancel/onError/classifier) own sync/async throw is wrapped
158
- * in a {@link HandlerFailure} and lands in the `${label} handler failed`
159
- * sink exactly once, without mutating the thrown value. Never a bare
160
- * `void somePromise()`: every owned flow goes through this entry
161
- * (AGENTS.md).
162
- */
163
- function runOwned(label, task, options) {
164
- invokeTask(task).then((result) => options.onResult?.(result), (error) => {
165
- return classify(label, options, error, true);
166
- }).catch((error) => {
167
- if (isHandlerFailure(error)) throw error;
168
- return classify(label, options, error, false);
169
- }).catch(handlerFailure(label, options));
170
- }
171
- /**
172
- * Classify one failure and record the classification diagnostics, then run
173
- * the matching per-task callback. `allowCancellation` gates ALL cancellation
174
- * classification: the task phase may treat an AbortError or a task-local
175
- * state as a cancellation; the onResult phase may not (a result-consumer
176
- * failure is a failure). A terminal side-effect handler's own sync/async
177
- * failure is wrapped in {@link HandlerFailure} and propagated to the
178
- * handler-failure sink — never re-classified, never repeated, never
179
- * escaped. All diagnostics go through the never-throw helpers, so a
180
- * hostile thrown value or a throwing sessionId/diag can never mint a new
181
- * primary error.
182
- */
183
- function classify(label, options, error, allowCancellation) {
184
- if (allowCancellation && (isCancellation(error) || taskLocalCancellation(options, error))) {
185
- options.diag.debug(label, {
186
- session: safeSessionId(options),
187
- cancelled: true
188
- });
189
- if (options.onCancel !== void 0) return guardHandler(() => options.onCancel(error));
190
- return;
191
- }
192
- options.diag.error(label, {
193
- session: safeSessionId(options),
194
- error: safeErrorMessage(error)
195
- });
196
- if (options.onError !== void 0) return guardHandler(() => options.onError(error));
197
- }
198
- /** The task-local predicate (cancellation classification is already gated
199
- * by the caller). A throwing predicate is wrapped as a handler failure — it
200
- * never re-routes the original error into the wrong classification and is
201
- * never itself re-classified. */
202
- function taskLocalCancellation(options, error) {
203
- if (options.isCancellation === void 0) return false;
204
- try {
205
- return options.isCancellation(error) === true;
206
- } catch (classifierError) {
207
- throw new HandlerFailure(classifierError);
208
- }
209
- }
210
- /**
211
- * Immutable wrapper for a terminal side-effect handler's own failure. The
212
- * thrown value is NEVER mutated (a primitive, null, or a frozen/non-
213
- * extensible error must survive intact); the wrapper carries the original
214
- * cause to the handler-failure sink, and the middle classification catch
215
- * recognizes it and forwards it unchanged — so `onError`/`onCancel` run
216
- * exactly once even when they throw.
217
- */
218
- var HandlerFailure = class {
219
- cause;
220
- constructor(cause) {
221
- this.cause = cause;
222
- handlerFailures.add(this);
223
- }
224
- };
225
- /** Identity registry for the internal wrappers: `WeakSet.has` compares by
226
- * identity and never walks the argument's prototype chain, so a hostile
227
- * thrown value (a Proxy with a throwing `getPrototypeOf` trap) can be
228
- * tested safely — `instanceof HandlerFailure` on an untrusted value could
229
- * itself throw. */
230
- const handlerFailures = /* @__PURE__ */ new WeakSet();
231
- /** Whether a value is one of OUR wrapper instances (identity only; total
232
- * over the whole `unknown` domain). */
233
- function isHandlerFailure(value) {
234
- return typeof value === "object" && value !== null && handlerFailures.has(value);
235
- }
236
- /** Run a per-task terminal callback; a sync or async failure is wrapped in
237
- * {@link HandlerFailure} so the chain forwards it to the handler-failure
238
- * sink instead of re-classifying it (and never repeats the callback). */
239
- function guardHandler(invoke) {
240
- try {
241
- const outcome = invoke();
242
- if (outcome !== void 0) return outcome.catch((error) => {
243
- throw new HandlerFailure(error);
244
- });
245
- return;
246
- } catch (error) {
247
- throw new HandlerFailure(error);
248
- }
249
- }
250
- /**
251
- * The final sink of both helpers: a terminal side-effect handler
252
- * (onResult's own invocation aside — see {@link runOwned}), a task-local
253
- * classifier, or the diagnostics channel itself threw. The ENTIRE body is
254
- * protected — wrapper unwrapping, error description, the session read and
255
- * the diag call all live inside the try, and the fallback is a fixed
256
- * constant that never touches the hostile value again — so the sink is a
257
- * total function over the `unknown` domain: it can NEVER reject, and there
258
- * is no lower sink to leak into.
259
- */
260
- function handlerFailure(label, options) {
261
- return (error) => {
262
- try {
263
- const cause = isHandlerFailure(error) ? error.cause : error;
264
- options.diag.error(`${label} handler failed`, {
265
- session: safeSessionId(options),
266
- error: safeErrorMessage(cause)
267
- });
268
- } catch {}
269
- };
24
+ /** The effective directory recorded by one official `workingDirectory`
25
+ * projection SNAPSHOT value: its wire view is `string | null`, where `null`
26
+ * is the legal "no directory recorded" state (the header had none) — an
27
+ * absent/foreign value reads `undefined` (unavailable), never a directory. */
28
+ function projectedWorkingDirectory(value) {
29
+ return typeof value === "string" && value !== "" ? value : void 0;
270
30
  }
271
31
  //#endregion
272
32
  //#region src/runtime/session-reader-port.ts
@@ -1445,8 +1205,58 @@ function detachedSessionStatus(sessionId, values, cwd) {
1445
1205
  cacheReadTokens: usageValue.cacheReadTokens,
1446
1206
  cacheWriteTokens: usageValue.cacheWriteTokens
1447
1207
  };
1208
+ const performance = performanceProjection(values.piTuiPerformance);
1209
+ if (performance !== void 0) record.performance = performance;
1448
1210
  return record;
1449
1211
  }
1212
+ /** A finite non-negative projection number, or `undefined` (never coerced,
1213
+ * never defaulted). */
1214
+ function finiteNumber(value) {
1215
+ return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
1216
+ }
1217
+ /** Whether every entry of a candidate tuple is present (the shape gate). */
1218
+ function allDefined(values) {
1219
+ return values.every((entry) => entry !== void 0);
1220
+ }
1221
+ /**
1222
+ * Detach the bundle's own `piTuiPerformance` wire value: BOTH scopes with all
1223
+ * of their finite non-negative counters, or `undefined` — a malformed,
1224
+ * foreign or partial value reads absent (the capability cannot answer), never
1225
+ * a partially copied or coerced projection.
1226
+ */
1227
+ function performanceProjection(value) {
1228
+ if (typeof value !== "object" || value === null) return void 0;
1229
+ const source = value;
1230
+ const recent = typeof source.recent === "object" && source.recent !== null ? source.recent : void 0;
1231
+ const all = typeof source.all === "object" && source.all !== null ? source.all : void 0;
1232
+ if (recent === void 0 || all === void 0) return void 0;
1233
+ const fields = [
1234
+ finiteNumber(recent.outputTokens),
1235
+ finiteNumber(recent.modelMs),
1236
+ finiteNumber(recent.samples),
1237
+ finiteNumber(recent.firstTokenMs),
1238
+ finiteNumber(recent.firstTokenSamples),
1239
+ finiteNumber(all.outputTokens),
1240
+ finiteNumber(all.modelMs),
1241
+ finiteNumber(all.samples)
1242
+ ];
1243
+ if (!allDefined(fields)) return void 0;
1244
+ const [recentOutputTokens, recentModelMs, recentSamples, firstTokenMs, firstTokenSamples, allOutputTokens, allModelMs, allSamples] = fields;
1245
+ return {
1246
+ recent: {
1247
+ outputTokens: recentOutputTokens,
1248
+ modelMs: recentModelMs,
1249
+ samples: recentSamples,
1250
+ firstTokenMs,
1251
+ firstTokenSamples
1252
+ },
1253
+ all: {
1254
+ outputTokens: allOutputTokens,
1255
+ modelMs: allModelMs,
1256
+ samples: allSamples
1257
+ }
1258
+ };
1259
+ }
1450
1260
  /** Narrow the official `goal` projection view: `null` (no goal) is a LEGAL
1451
1261
  * value and stays distinct from `undefined` (unavailable); the current goal
1452
1262
  * is read from `goal.{objective,phase}` with the phase vocabulary validated. */
@@ -1899,7 +1709,7 @@ async function listPiTuiHostFileReferences(agent, query, signal, deps) {
1899
1709
  }))
1900
1710
  };
1901
1711
  }
1902
- const workspaceCwd = agent.session.header.cwd ?? process.cwd();
1712
+ const workspaceCwd = effectiveAgentCwd(deps.workingDirectory, agent) ?? process.cwd();
1903
1713
  const resolved = resolvePathQuery(query, workspaceCwd, deps.environment);
1904
1714
  const searchBase = scopeSearchBase(resolved, query, workspaceCwd, deps.environment);
1905
1715
  const discovered = await discoverForQuery(searchBase === resolved.searchBase ? resolved : {
@@ -1932,7 +1742,7 @@ function detachIncompatible(entry) {
1932
1742
  name: entry.name,
1933
1743
  version: entry.version,
1934
1744
  runtimeVersion: entry.runtimeVersion,
1935
- peers: Object.freeze({ ...entry.peers })
1745
+ requirements: Object.freeze({ ...entry.requirements })
1936
1746
  });
1937
1747
  }
1938
1748
  function detachError(error) {
@@ -1960,12 +1770,19 @@ function detachBundle(bundle) {
1960
1770
  }));
1961
1771
  return Object.freeze({
1962
1772
  name: bundle.name,
1773
+ official: bundle.official,
1774
+ availability: bundle.availability,
1775
+ ...bundle.installTarget === void 0 ? {} : { installTarget: Object.freeze({
1776
+ spec: bundle.installTarget.spec,
1777
+ version: bundle.installTarget.version
1778
+ }) },
1963
1779
  ...bundle.version === void 0 ? {} : { version: bundle.version },
1964
1780
  ...bundle.meta === void 0 ? {} : pickMeta(bundle.meta),
1965
1781
  ...bundle.description === void 0 ? {} : { description: bundle.description },
1966
1782
  enabled: bundle.enabled,
1967
1783
  installed: bundle.installed,
1968
1784
  optional: bundle.optional,
1785
+ ...bundle.source === void 0 ? {} : { source: bundle.source },
1969
1786
  removable: bundle.removable,
1970
1787
  ...bundle.readOnlyReason === void 0 ? {} : { readOnlyReason: bundle.readOnlyReason },
1971
1788
  ...bundle.error === void 0 ? {} : { error: detachError(bundle.error) },
@@ -2007,16 +1824,34 @@ function detachPluginManagerSnapshot(input) {
2007
1824
  exemptionWarnings: Object.freeze([...input.exemptions.warnings])
2008
1825
  });
2009
1826
  }
1827
+ function detachPackageResult(result) {
1828
+ return Object.freeze({
1829
+ exitCode: result.exitCode,
1830
+ output: result.output,
1831
+ truncated: result.truncated,
1832
+ ...result.kind === void 0 ? {} : { kind: result.kind },
1833
+ ...result.timedOut === void 0 ? {} : { timedOut: result.timedOut },
1834
+ ...result.incompatible === void 0 ? {} : { incompatible: Object.freeze(result.incompatible.map(detachIncompatible)) }
1835
+ });
1836
+ }
2010
1837
  /** Map one persisted change and its observed application outcome. */
2011
1838
  function detachChange(result) {
2012
1839
  return Object.freeze({
2013
1840
  changed: result.changed,
2014
1841
  application: result.application,
1842
+ ...result.restartReason === void 0 ? {} : { restartReason: result.restartReason },
2015
1843
  stage: result.stage,
2016
1844
  target: result.target,
1845
+ ...result.enabled === void 0 ? {} : { enabled: result.enabled },
2017
1846
  ...result.error === void 0 ? {} : { error: detachError(result.error) },
2018
1847
  ...result.warnings === void 0 ? {} : { warnings: Object.freeze([...result.warnings]) },
2019
- ...result.bundle === void 0 ? {} : { bundle: result.bundle }
1848
+ ...result.bundle === void 0 ? {} : { bundle: result.bundle },
1849
+ ...result.version === void 0 ? {} : { version: result.version },
1850
+ ...result.pendingBuilds === void 0 ? {} : { pendingBuilds: Object.freeze([...result.pendingBuilds]) },
1851
+ ...result.approvedBuilds === void 0 ? {} : { approvedBuilds: Object.freeze([...result.approvedBuilds]) },
1852
+ ...result.packageResult === void 0 ? {} : { packageResult: detachPackageResult(result.packageResult) },
1853
+ ...result.registries === void 0 ? {} : { registries: Object.freeze([...result.registries]) },
1854
+ ...result.failedAt === void 0 ? {} : { failedAt: result.failedAt }
2020
1855
  });
2021
1856
  }
2022
1857
  /** Map what a spec names before installation. */
@@ -2164,6 +1999,22 @@ function createTerminalProgressInterval(onUnknownReason) {
2164
1999
  };
2165
2000
  }
2166
2001
  //#endregion
2002
+ //#region src/runtime/plugin-manager-port.ts
2003
+ /**
2004
+ * One plugin mutation's result arrived after the operation's authoritative
2005
+ * currentness context was superseded. The write may have been applied, so this
2006
+ * is NOT a refusal: the caller must present the outcome as indeterminate and
2007
+ * let the authoritative inventory reread decide what is true. A backend
2008
+ * adapter raises it only when its own currentness authority proves the reply
2009
+ * belongs to a superseded context; this module names no transport.
2010
+ */
2011
+ var PluginManagerStaleResultError = class extends Error {
2012
+ constructor(operation) {
2013
+ super(`pluginManager.${operation} returned after its currentness context was superseded; the authoritative inventory reread decides the outcome`);
2014
+ this.name = "PluginManagerStaleResultError";
2015
+ }
2016
+ };
2017
+ //#endregion
2167
2018
  //#region src/runtime/remote/pi-tui-terminal-progress-contract.ts
2168
2019
  /** The wire namespace (and Host Cordis service key) of the private stream. */
2169
2020
  const PI_TUI_TERMINAL_PROGRESS_NAMESPACE = "piTuiTerminalProgress";
@@ -2346,4 +2197,4 @@ function createRemoteTerminalProgressSource(deps) {
2346
2197
  } };
2347
2198
  }
2348
2199
  //#endregion
2349
- export { effectiveCustomCommandRefreshMs as $, directAgentOf as A, SupersededReadError as B, safeSubagentErrorMessage as C, REMOTE_IMPLEMENTED_CAPABILITIES as D, DIRECT_IMPLEMENTED_CAPABILITIES as E, ROUTE_PATTERN as F, discoverForQuery as G, reattachDisplayBase as H, credentialOptionsFor as I, DEFAULT_CUSTOM_COMMAND_REFRESH_MS as J, escapeFinderRegex as K, deriveKeyRef as L, requireCreated as M, requireOpened as N, LifecycleError as O, PROTOCOL_CHOICES as P, customItemName as Q, providerOptionsFor as R, classifySubagentPromptSettlement as S, isRemoteBusinessRefusalCode as T, resolvePathQuery as U, rankPathCandidates as V, separatorOfRaw as W, customCommandConfigOf as X, activeFooterItemIds as Y, customItemId as Z, QUESTION_REPLY_QUEUED as _, safeErrorString as _t, createTerminalProgressInterval as a, resolveTrustedFooterCommand as at, detachedSessionStatus as b, detachLog as c, resolveUserLayerFooterMode as ct, pluginInstallRequestId as d, cancellationError as dt, effectiveCustomCommandTimeoutMs as et, listPiTuiHostFileReferences as f, isCancellation as ft, QUESTION_BAD_ANSWER as g, safeErrorMessage as gt, resolveFdPath as h, runOwned as ht, PI_TUI_TERMINAL_PROGRESS_WATCH as i, parseFooterCommandConfig as it, ownerHandleOf as j, clientOwnerOf as k, detachPhase as l, MAX_COMMAND_TIMEOUT_MS as lt, hostPathQueryEnvironment as m, runDetached as mt, createRemoteTerminalProgressSource as n, parseFooterCustomItem as nt, detachChange as o, resolveUserCommandItemActivationIds as ot, DirectHostDiscoveryDriver as p, observeSettled as pt, normalizeFinderRecords as q, PI_TUI_TERMINAL_PROGRESS_NAMESPACE as r, parseFooterCustomItems as rt, detachInspection as s, resolveUserCommandItemFallbackActivationIds as st, consumeRemoteTerminalProgress as t, executableCommandItemIds as tt, detachPluginManagerSnapshot as u, contextPressureOccupancy as ut, QuestionAnswerError as v, GATEWAY_PRE_INVOCATION_CODES as w, detachedTurnOutline as x, questionAnswerError as y, resolveCredentialArg as z };
2200
+ export { customItemName as $, clientOwnerOf as A, resolveCredentialArg as B, classifySubagentPromptSettlement as C, DIRECT_IMPLEMENTED_CAPABILITIES as D, isRemoteBusinessRefusalCode as E, PROTOCOL_CHOICES as F, separatorOfRaw as G, rankPathCandidates as H, ROUTE_PATTERN as I, normalizeFinderRecords as J, discoverForQuery as K, credentialOptionsFor as L, ownerHandleOf as M, requireCreated as N, REMOTE_IMPLEMENTED_CAPABILITIES as O, requireOpened as P, customItemId as Q, deriveKeyRef as R, detachedTurnOutline as S, GATEWAY_PRE_INVOCATION_CODES as T, reattachDisplayBase as U, SupersededReadError as V, resolvePathQuery as W, activeFooterItemIds as X, DEFAULT_CUSTOM_COMMAND_REFRESH_MS as Y, customCommandConfigOf as Z, QUESTION_BAD_ANSWER as _, PluginManagerStaleResultError as a, parseFooterCommandConfig as at, questionAnswerError as b, detachInspection as c, resolveUserCommandItemFallbackActivationIds as ct, detachPluginManagerSnapshot as d, contextPressureOccupancy as dt, effectiveCustomCommandRefreshMs as et, pluginInstallRequestId as f, effectiveAgentCwd as ft, resolveFdPath as g, hostPathQueryEnvironment as h, PI_TUI_TERMINAL_PROGRESS_WATCH as i, parseFooterCustomItems as it, directAgentOf as j, LifecycleError as k, detachLog as l, resolveUserLayerFooterMode as lt, DirectHostDiscoveryDriver as m, createRemoteTerminalProgressSource as n, executableCommandItemIds as nt, createTerminalProgressInterval as o, resolveTrustedFooterCommand as ot, listPiTuiHostFileReferences as p, projectedWorkingDirectory as pt, escapeFinderRegex as q, PI_TUI_TERMINAL_PROGRESS_NAMESPACE as r, parseFooterCustomItem as rt, detachChange as s, resolveUserCommandItemActivationIds as st, consumeRemoteTerminalProgress as t, effectiveCustomCommandTimeoutMs as tt, detachPhase as u, MAX_COMMAND_TIMEOUT_MS as ut, QUESTION_REPLY_QUEUED as v, safeSubagentErrorMessage as w, detachedSessionStatus as x, QuestionAnswerError as y, providerOptionsFor as z };
@@ -13,13 +13,14 @@
13
13
  - id: persona
14
14
  name: '@deepseek-ai/dsh-persona'
15
15
  config:
16
- suffix: Your working directory is {{cwd}}.
17
16
  prefix: >-
18
17
  You are a coding agent powered by the {{model}} model.
19
18
  - id: agent-instructions
20
19
  name: '@deepseek-ai/dsh-agent-instructions'
21
20
  config:
22
21
  maxBytes: 65536
22
+ - id: time-context
23
+ name: '@deepseek-ai/dsh-time-context'
23
24
  - id: tool-bash
24
25
  name: '@deepseek-ai/dsh-tool-bash'
25
26
  disabled: !!js process.platform === 'win32'
@@ -34,6 +35,8 @@
34
35
  sampleOverCapGlobResults: false
35
36
  - id: tool-jobs
36
37
  name: '@deepseek-ai/dsh-tool-jobs'
38
+ - id: tool-schedule
39
+ name: '@deepseek-ai/dsh-tool-schedule'
37
40
  - id: command-goal
38
41
  name: '@deepseek-ai/dsh-command-goal'
39
42
  - id: tool-goal
@@ -48,7 +51,7 @@
48
51
  name: '@deepseek-ai/dsh-plan-mode'
49
52
  config:
50
53
  section: |
51
- You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
54
+ You are in plan mode. Stay in plan mode until the user approves your plan through exit_plan_mode or switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
52
55
 
53
56
  Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
54
57
 
@@ -92,41 +95,17 @@
92
95
  provider: spawn
93
96
  toolName: subagent
94
97
  modelSelectionSettings: true
95
- backgroundMode: continuable
96
98
  - id: tool-subagent-fork
97
99
  name: '@deepseek-ai/dsh-tool-subagent'
98
100
  config:
99
101
  provider: fork
100
102
  toolName: subagent_fork
101
- backgroundMode: continuable
102
- - id: tool-subagent-codex
103
- name: '@deepseek-ai/dsh-tool-subagent'
104
- disabled: true
105
- config:
106
- provider: codex
107
- toolName: subagent_codex
108
- backgroundMode: one-shot
109
- maxDepth: provider-managed
110
- - id: tool-subagent-claude-code
111
- name: '@deepseek-ai/dsh-tool-subagent'
112
- disabled: true
113
- config:
114
- provider: claude-code
115
- toolName: subagent_claude_code
116
- backgroundMode: one-shot
117
- maxDepth: provider-managed
118
103
  - id: workflow-ptc
119
104
  name: '@deepseek-ai/dsh-workflow-ptc'
120
105
  config:
121
106
  provider: spawn
122
107
  - id: tool-workflow
123
108
  name: '@deepseek-ai/dsh-tool-workflow'
124
- - id: tool-ralph
125
- name: '@deepseek-ai/dsh-tool-ralph'
126
- disabled: true
127
- config:
128
- subagentProvider: spawn
129
- maxRounds: 64
130
109
  - id: tool-ask-user
131
110
  name: '@deepseek-ai/dsh-tool-ask-user'
132
111
  - id: tool-todo
@@ -152,3 +131,6 @@
152
131
  - id: tool-plugin-manager
153
132
  name: '@deepseek-ai/dsh-plugin-manager/tools'
154
133
  disabled: !!js "!ctx.get('profileContext')"
134
+ - id: tool-plugin-market
135
+ name: '@deepseek-ai/dsh-plugin-market/tools'
136
+ disabled: !!js "!ctx.get('profileContext')"
@@ -14,6 +14,23 @@
14
14
  prefix: You are a helpful software engineer assistant.
15
15
  complete: true
16
16
  includeRuntimeContext: false
17
+ - id: tool-fs
18
+ name: '@deepseek-ai/dsh-tool-fs'
19
+ config:
20
+ read: false
21
+ readImage: true
22
+ write: false
23
+ edit: false
24
+ - id: compaction
25
+ name: cordis:group
26
+ group: true
27
+ isolate:
28
+ compaction: true
29
+ config:
30
+ - id: compaction-basic
31
+ name: '@deepseek-ai/dsh-compaction-basic'
32
+ - id: command-compact
33
+ name: '@deepseek-ai/dsh-command-compact'
17
34
  - id: persistent-shell
18
35
  name: cordis:group
19
36
  group: true
@@ -11,12 +11,13 @@
11
11
  - id: persona
12
12
  name: '@deepseek-ai/dsh-persona'
13
13
  config:
14
- suffix: Your working directory is {{cwd}}.
15
14
  prefix: You are a coding agent powered by the {{model}} model.
16
15
  - id: agent-instructions
17
16
  name: '@deepseek-ai/dsh-agent-instructions'
18
17
  config:
19
18
  maxBytes: 65536
19
+ - id: time-context
20
+ name: '@deepseek-ai/dsh-time-context'
20
21
  - id: tool-bash
21
22
  name: '@deepseek-ai/dsh-tool-bash'
22
23
  disabled: !!js process.platform === 'win32'
@@ -31,6 +32,8 @@
31
32
  sampleOverCapGlobResults: false
32
33
  - id: tool-jobs
33
34
  name: '@deepseek-ai/dsh-tool-jobs'
35
+ - id: tool-schedule
36
+ name: '@deepseek-ai/dsh-tool-schedule'
34
37
  - id: skill-filesystem
35
38
  name: '@deepseek-ai/dsh-skill-filesystem'
36
39
  - id: tool-skill
@@ -49,7 +52,7 @@
49
52
  name: '@deepseek-ai/dsh-plan-mode'
50
53
  config:
51
54
  section: |
52
- You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
55
+ You are in plan mode. Stay in plan mode until the user approves your plan through exit_plan_mode or switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
53
56
 
54
57
  Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
55
58
 
@@ -93,29 +96,11 @@
93
96
  provider: spawn
94
97
  toolName: subagent
95
98
  modelSelectionSettings: true
96
- backgroundMode: continuable
97
99
  - id: tool-subagent-fork
98
100
  name: '@deepseek-ai/dsh-tool-subagent'
99
101
  config:
100
102
  provider: fork
101
103
  toolName: subagent_fork
102
- backgroundMode: continuable
103
- - id: tool-subagent-codex
104
- name: '@deepseek-ai/dsh-tool-subagent'
105
- disabled: true
106
- config:
107
- provider: codex
108
- toolName: subagent_codex
109
- backgroundMode: one-shot
110
- maxDepth: provider-managed
111
- - id: tool-subagent-claude-code
112
- name: '@deepseek-ai/dsh-tool-subagent'
113
- disabled: true
114
- config:
115
- provider: claude-code
116
- toolName: subagent_claude_code
117
- backgroundMode: one-shot
118
- maxDepth: provider-managed
119
104
  - id: workflow-ptc
120
105
  name: '@deepseek-ai/dsh-workflow-ptc'
121
106
  disabled: true
@@ -124,12 +109,6 @@
124
109
  - id: tool-workflow
125
110
  name: '@deepseek-ai/dsh-tool-workflow'
126
111
  disabled: true
127
- - id: tool-ralph
128
- name: '@deepseek-ai/dsh-tool-ralph'
129
- disabled: true
130
- config:
131
- subagentProvider: spawn
132
- maxRounds: 64
133
112
  - id: tool-ask-user
134
113
  name: '@deepseek-ai/dsh-tool-ask-user'
135
114
  - id: tool-todo
@@ -150,3 +129,6 @@
150
129
  - id: tool-plugin-manager
151
130
  name: '@deepseek-ai/dsh-plugin-manager/tools'
152
131
  disabled: true
132
+ - id: tool-plugin-market
133
+ name: '@deepseek-ai/dsh-plugin-market/tools'
134
+ disabled: true