@skitterbyte/skitterspec-linear 19.13.0 → 19.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -526,7 +526,8 @@ through to a documented conservative default; see the field notes below.
526
526
  // SKITTERSPEC_READER=local|remote in the environment outranks this key: a
527
527
  // wrapper that runs the engine on another machine (a VM's `prlctl exec`)
528
528
  // speaks for that machine alone. A reader on another machine — this key or
529
- // that variable set to "remote", or ssh — gets no `local` tier while
529
+ // that variable set to "remote", ssh, or a Windows session with no desktop
530
+ // (no SESSIONNAME: `prlctl exec`, sshd, a scheduled task) — gets no `local` tier while
530
531
  // `network` has a URL, since 127.0.0.1 is the engine's machine.
531
532
  // An explicit "local"/"remote" is BELIEVED WITHOUT SNIFFING: you know where
532
533
  // you are reading, and no signal outranks being told. Detection is only the
@@ -171,13 +171,22 @@ engine runs on one machine and the reader is on another — a wrapper running it
171
171
  inside a VM, or an ssh session — `127.0.0.1` is the engine's machine, not the
172
172
  reader's. That door never opens, whatever anyone asks. It was also first in the
173
173
  stack, the link habit reaches for, and it cost a timeout on every review. So the
174
- engine hides it, on a signal someone set on purpose: `SKITTERSPEC_READER=remote`
175
- (`local` outranks ssh), the committed `review.reader`, or ssh. It hides it only
174
+ engine hides it, on `SKITTERSPEC_READER=remote` (`local` outranks everything
175
+ below it), the committed `review.reader`, ssh, or a Windows session with no
176
+ desktop (no `SESSIONNAME`, which is what `prlctl exec`, the OpenSSH server and a
177
+ scheduled task all look like). It hides it only
176
178
  when `network` has a URL to take its place; otherwise the line stays and says
177
- it is unreachable. Detection decides nothing here, and nor does the skill. A
178
- tier marked `hidden` in `--json` is absent from the printed stack, so copying
179
- the stack still produces the right banner. The holding line names the engine's
180
- `covers` — *the wait covers network* — never a door the stack did not show.
179
+ it is unreachable.
180
+
181
+ **That last signal is detection, allowed here for what a wrong guess costs.** The network URL is the same server, so it opens from
182
+ the engine's own machine too. A reader wrongly judged to be elsewhere gets the
183
+ second-best link, never a page that will not open. Detection has done harm
184
+ before when it decided whether to *serve*, because a wrong guess there removed
185
+ the verdict loop. Nothing like that is at stake here. The skill still decides
186
+ nothing. A tier marked `hidden` in `--json` is absent from the printed stack, so
187
+ copying the stack still produces the right banner. The holding line names the
188
+ engine's `covers` — *the wait covers network* — never a door the stack did not
189
+ show.
181
190
 
182
191
  **The `network` tier may carry alternates, and they are part of it — not a fourth tier.**
183
192
  The engine offers the other addresses this machine has (a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skitterbyte/skitterspec-linear",
3
- "version": "19.13.0",
3
+ "version": "19.14.0",
4
4
  "description": "Spec-driven development for Claude Code, with one-way Linear sync — a superset of @skitterbyte/skitterspec: the base filesystem workflow plus /spec-status · /spec-push and the spec-sync CLI. The repo is canonical; Linear is a generated mirror. Install this OR the base, not both.",
5
5
  "keywords": [
6
6
  "claude",
package/src/cli.js CHANGED
@@ -1029,7 +1029,7 @@ async function serveTadaPage({ window, flags, recap }) {
1029
1029
  const q = tadaQuery({ ...flags, on: flags.on || (flags.since ? null : localDay(window.since)) })
1030
1030
  const withQ = (u) => (u ? `${u}${q}` : u)
1031
1031
  const page = { ...served, loopbackUrl: withQ(served.loopbackUrl), url: withQ(served.url), alternates: (served.alternates || []).map(withQ) }
1032
- const reader = resolveReader(config, process.env)
1032
+ const reader = resolveReader(config, process.env, process.platform)
1033
1033
  const tiers = reviewTierStack({ served: page, fileUrl: null, publishedUrl: null, config, reader })
1034
1034
  process.stdout.write(`page: ${humanLabel(window)}\n${reviewStackText(tiers)}`)
1035
1035
  return true
@@ -1135,7 +1135,7 @@ function epicPageTiers(inputs, up, epic) {
1135
1135
  if (!inputs.config) return null
1136
1136
  if (!up) return { off: true, start: 'skitterspec spec-env review serve --host 0.0.0.0' }
1137
1137
  const served = reviewServedUrls(up, offerableLanAddresses(), epic)
1138
- const reader = resolveReader(inputs.config, process.env)
1138
+ const reader = resolveReader(inputs.config, process.env, process.platform)
1139
1139
  return { tiers: reviewTierStack({ served, fileUrl: null, publishedUrl: null, config: inputs.config, reader }) }
1140
1140
  }
1141
1141
 
@@ -4878,7 +4878,7 @@ function reshowStack(dir, config, spec, out) {
4878
4878
  const cfg = withSpecRemote(config, out)
4879
4879
  const up = readRunningReviewServer(dir, cfg)
4880
4880
  const served = up ? reviewServedUrls(up, offerableLanAddresses(), spec.folder) : null
4881
- const reader = resolveReader(cfg, process.env)
4881
+ const reader = resolveReader(cfg, process.env, process.platform)
4882
4882
  const tiers = reviewTierStack({ served, fileUrl: reviewFileUrl(out), publishedUrl: readReviewUrl(out), config: cfg, reader })
4883
4883
  let live = null
4884
4884
  try {
@@ -6217,7 +6217,7 @@ async function specEnvReview(dir, config, specArg, flags, invokedFrom = dir) {
6217
6217
  const url = readReviewUrl(out)
6218
6218
 
6219
6219
  // Resolved before the --json early return, so both outputs agree.
6220
- const reader = resolveReader(config, process.env)
6220
+ const reader = resolveReader(config, process.env, process.platform)
6221
6221
 
6222
6222
  // A remote reader cannot open a path on this machine — that is the whole of
6223
6223
  // what detection established. Serving is how the engine answers it: a local
package/src/env/review.js CHANGED
@@ -222,8 +222,13 @@ function numstatFor(git, ref, file, untracked) {
222
222
  * WHAT WOULD FOOL THIS: the bridge variable is an undocumented harness internal
223
223
  * and may be renamed or dropped, so its ABSENCE proves nothing — which is the
224
224
  * whole reason `unknown` exists and the default is not `local`.
225
+ *
226
+ * `platform` is passed in for the same reason as `env`, and defaults to NONE
227
+ * rather than `process.platform`: a caller that names no platform, and every
228
+ * test that states only an environment, gets the platform-free answer on any
229
+ * machine the suite runs on.
225
230
  */
226
- function detectReader(env = {}) {
231
+ function detectReader(env = {}, platform = null) {
227
232
  // SSH first: a standard convention, and the strongest available signal. If the
228
233
  // shell arrived over the network, the page's path is on a machine the reader
229
234
  // is not looking at.
@@ -233,6 +238,20 @@ function detectReader(env = {}) {
233
238
  // produced the original dead link, read on a phone.
234
239
  if (env.CLAUDE_CODE_BRIDGE_SESSION_ID) return { reader: 'remote', why: 'bridge session' }
235
240
 
241
+ // A WINDOWS SESSION WITH NO DESKTOP. Windows sets SESSIONNAME for every
242
+ // interactive logon — `Console` at the desktop, `RDP-Tcp#N` over Remote
243
+ // Desktop — and whatever starts from that desktop inherits it. A process
244
+ // outside any desktop has none: `prlctl exec`'s background logon (a Mac
245
+ // driving the VM), the OpenSSH server, a scheduled task, a service. Nobody is
246
+ // at this machine's browser in any of those.
247
+ //
248
+ // WHAT WOULD FOOL THIS: a scheduled task or service run while someone sits at
249
+ // the desk. That is affordable only because of what it decides — `local` is
250
+ // hidden only while `network` has a URL, and that URL is the same server, so
251
+ // a wrong guess costs the second-best link, never a page that will not open.
252
+ // Elsewhere SESSIONNAME means nothing, so its absence is not evidence.
253
+ if (platform === 'win32' && !env.SESSIONNAME) return { reader: 'remote', why: 'no interactive session' }
254
+
236
255
  // CLAUDE_CODE_ENTRYPOINT IS DELIBERATELY NOT CONSULTED. It describes the
237
256
  // PROCESS, not the reader, and reports `cli` for a bridged session — it said
238
257
  // exactly that for the session this was written from, where the reader was on
@@ -248,7 +267,7 @@ function detectReader(env = {}) {
248
267
  * sniffing: the operator knows where they are reading, and no signal outranks
249
268
  * being told.
250
269
  */
251
- function resolveReader(config, env = {}) {
270
+ function resolveReader(config, env = {}, platform = null) {
252
271
  // THE WRAPPER FIRST, because it is the one thing that knows this machine. A
253
272
  // committed `review.reader` speaks for every checkout of the repo; a wrapper
254
273
  // that runs the engine inside a VM (`prlctl exec`) speaks for this one, and
@@ -257,7 +276,7 @@ function resolveReader(config, env = {}) {
257
276
  if (told === 'local' || told === 'remote') return { reader: told, why: 'SKITTERSPEC_READER' }
258
277
  const setting = (config && config.review && config.review.reader) || 'detect'
259
278
  if (setting === 'local' || setting === 'remote') return { reader: setting, why: 'configured' }
260
- return detectReader(env)
279
+ return detectReader(env, platform)
261
280
  }
262
281
 
263
282
  /**
@@ -269,7 +288,10 @@ function resolveReader(config, env = {}) {
269
288
  * same machine, where loopback opens fine; and its variable is an undocumented
270
289
  * harness internal. Hiding a working link on that guess is the load-bearing
271
290
  * detection `detectReader` warns against, so only the signals someone set on
272
- * purpose count: the wrapper's variable, the committed setting, and SSH.
291
+ * purpose count: the wrapper's variable, the committed setting, and SSH — plus
292
+ * one detection, a Windows session with no desktop, admitted because hiding
293
+ * `local` only ever happens beside a working `network` URL, so being wrong
294
+ * costs the second-best link rather than the loop.
273
295
  *
274
296
  * WHAT WOULD FOOL THIS: SSH with a `-L` port forward makes the reader's loopback
275
297
  * reach this server, so `ssh` is a strong hint rather than proof —