@skitterbyte/skitterspec-linear 18.2.0 → 18.3.1
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/bin/skitterspec-linear.js +7 -0
- package/package.json +1 -1
- package/src/cli.js +29 -2
- package/src/env/config.js +47 -2
|
@@ -33,6 +33,13 @@ if (!existsSync(join(__dirname, '..', 'src'))) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
const { run, HELP } = require('../src/cli.js')
|
|
36
|
+
|
|
37
|
+
// The provider's isolation defaults, registered beneath the project's own
|
|
38
|
+
// env.config.json so `spec-env stage` claims this provider's snapshot sidecar
|
|
39
|
+
// without a hand edit (see common src/env/config.js, setProviderEnvDefaults).
|
|
40
|
+
require('../src/env/config.js').setProviderEnvDefaults(
|
|
41
|
+
require('../src/vendor/linear/config.js').ENV_CONFIG_DEFAULTS,
|
|
42
|
+
)
|
|
36
43
|
const {
|
|
37
44
|
PROVIDER_COMMANDS,
|
|
38
45
|
providerHelpSection,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skitterbyte/skitterspec-linear",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.3.1",
|
|
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
|
@@ -4269,7 +4269,7 @@ async function specEnvReview(dir, config, specArg, flags, invokedFrom = dir) {
|
|
|
4269
4269
|
// The runners-up sit UNDER the network tier, because that is what they are
|
|
4270
4270
|
// alternatives to — and virtual adapters are gone from them entirely.
|
|
4271
4271
|
(served && !served.loopback && (served.alternates || []).length
|
|
4272
|
-
? served.alternates.map((u) => ` also: ${u}\n`).join('')
|
|
4272
|
+
? served.alternates.map((u) => ` also: ${u}${tailnetLabel(u)}\n`).join('')
|
|
4273
4273
|
: '') +
|
|
4274
4274
|
// WHICH TIERS THE WAIT COVERS, once, next to the stack. `local` and
|
|
4275
4275
|
// `network` are two doors into one room — the page POSTs to
|
|
@@ -4572,11 +4572,37 @@ function lanAddresses(nets = require('node:os').networkInterfaces()) {
|
|
|
4572
4572
|
* where the opposite hides the only address that works.
|
|
4573
4573
|
*/
|
|
4574
4574
|
function offerableLanAddresses(nets = require('node:os').networkInterfaces()) {
|
|
4575
|
-
|
|
4575
|
+
const ranked = rankLanAddresses(nets)
|
|
4576
|
+
// A tailnet address IS reachable from a phone off the LAN, but macOS puts it
|
|
4577
|
+
// on `utunN`, which the virtual filter drops. It is appended after every
|
|
4578
|
+
// other offerable address so the wifi one stays the best guess at home.
|
|
4579
|
+
const tailnet = ranked.filter((e) => VIRTUAL_IFACE.test(e.iface) && isTailnetAddress(e.address))
|
|
4580
|
+
return ranked
|
|
4576
4581
|
.filter((e) => !VIRTUAL_IFACE.test(e.iface))
|
|
4582
|
+
.concat(tailnet)
|
|
4577
4583
|
.map((e) => e.address)
|
|
4578
4584
|
}
|
|
4579
4585
|
|
|
4586
|
+
// 100.64.0.0/10 — the CGNAT range Tailscale assigns from.
|
|
4587
|
+
//
|
|
4588
|
+
// WHAT WOULD FOOL THIS: a carrier-grade NAT or another overlay network using
|
|
4589
|
+
// the same range on a utun adapter is offered too. That costs one dud `also:`
|
|
4590
|
+
// line, where filtering it hides the only link a reader off the wifi can open.
|
|
4591
|
+
function isTailnetAddress(address) {
|
|
4592
|
+
const m = /^100\.(\d+)\./.exec(address)
|
|
4593
|
+
return !!m && Number(m[1]) >= 64 && Number(m[1]) <= 127
|
|
4594
|
+
}
|
|
4595
|
+
|
|
4596
|
+
// The suffix on an `also:` line whose host is a tailnet address, so it reads
|
|
4597
|
+
// apart from the LAN one — a reader off the wifi needs to know which to tap.
|
|
4598
|
+
function tailnetLabel(url) {
|
|
4599
|
+
let host = ''
|
|
4600
|
+
try {
|
|
4601
|
+
host = new URL(url).hostname
|
|
4602
|
+
} catch {}
|
|
4603
|
+
return isTailnetAddress(host) ? ' (tailnet)' : ''
|
|
4604
|
+
}
|
|
4605
|
+
|
|
4580
4606
|
/**
|
|
4581
4607
|
* Bring the review server up, or adopt the one already running.
|
|
4582
4608
|
*
|
|
@@ -5950,6 +5976,7 @@ module.exports = {
|
|
|
5950
5976
|
unknownCommand,
|
|
5951
5977
|
rankLanAddresses,
|
|
5952
5978
|
offerableLanAddresses,
|
|
5979
|
+
tailnetLabel,
|
|
5953
5980
|
reviewTierStack,
|
|
5954
5981
|
serveProcFor,
|
|
5955
5982
|
serverScriptOk,
|
package/src/env/config.js
CHANGED
|
@@ -759,6 +759,48 @@ function mergeConfig(base, parsed) {
|
|
|
759
759
|
* It is advisory in the strongest sense: nothing here acts on it, and a config
|
|
760
760
|
* full of strays loads exactly as it always did.
|
|
761
761
|
*/
|
|
762
|
+
// The isolation keys a ticketing provider needs a project to declare — set
|
|
763
|
+
// once per process by a provider superset's bin, beneath whatever the
|
|
764
|
+
// project's own env.config.json says. They used to reach only the
|
|
765
|
+
// `env.config.json.example` composed at build time, which left every project
|
|
766
|
+
// that adopted a provider over an EXISTING isolation config (or skipped the
|
|
767
|
+
// example) with a `spec.companionPaths` that never claims the provider's
|
|
768
|
+
// snapshot sidecar — `spec-env stage` then classifies the spec's own
|
|
769
|
+
// `<baseDir>/<identifier>.base.json` as foreign and `/commit` leaves it
|
|
770
|
+
// behind. The base distribution registers nothing and behaves as before.
|
|
771
|
+
let providerEnvDefaults = null
|
|
772
|
+
function setProviderEnvDefaults(overrides) {
|
|
773
|
+
providerEnvDefaults = overrides || null
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
// Fill ONLY the keys the project's file does not mention: a key the file sets —
|
|
777
|
+
// including explicitly to '' or [] — is the project's decision and stands
|
|
778
|
+
// ("the two keys are one fix" in scripts/build-dist.test.js is the contract:
|
|
779
|
+
// blanking identifierField must keep disabling the companion expansion).
|
|
780
|
+
function applyProviderEnvDefaults(config, parsed) {
|
|
781
|
+
if (!providerEnvDefaults) return config
|
|
782
|
+
const d = providerEnvDefaults
|
|
783
|
+
const pBranch = parsed && typeof parsed.branch === 'object' && parsed.branch !== null ? parsed.branch : null
|
|
784
|
+
if (
|
|
785
|
+
d.branch &&
|
|
786
|
+
typeof d.branch.identifierField === 'string' &&
|
|
787
|
+
!(pBranch && 'identifierField' in pBranch) &&
|
|
788
|
+
!config.branch.identifierField
|
|
789
|
+
) {
|
|
790
|
+
config.branch.identifierField = d.branch.identifierField
|
|
791
|
+
}
|
|
792
|
+
const pSpec = parsed && typeof parsed.spec === 'object' && parsed.spec !== null ? parsed.spec : null
|
|
793
|
+
if (
|
|
794
|
+
d.spec &&
|
|
795
|
+
Array.isArray(d.spec.companionPaths) &&
|
|
796
|
+
!(pSpec && 'companionPaths' in pSpec) &&
|
|
797
|
+
!config.spec.companionPaths.length
|
|
798
|
+
) {
|
|
799
|
+
config.spec.companionPaths = [...d.spec.companionPaths]
|
|
800
|
+
}
|
|
801
|
+
return config
|
|
802
|
+
}
|
|
803
|
+
|
|
762
804
|
function loadEnvConfig(dir = process.cwd()) {
|
|
763
805
|
const base = defaults()
|
|
764
806
|
const file = join(dir, CONFIG_FILE)
|
|
@@ -767,7 +809,9 @@ function loadEnvConfig(dir = process.cwd()) {
|
|
|
767
809
|
try {
|
|
768
810
|
raw = readFileSync(file, 'utf-8')
|
|
769
811
|
} catch (error) {
|
|
770
|
-
if (error.code === 'ENOENT')
|
|
812
|
+
if (error.code === 'ENOENT') {
|
|
813
|
+
return { config: applyProviderEnvDefaults(base, null), present: false, unknown: [], badReviewers: [] }
|
|
814
|
+
}
|
|
771
815
|
throw error
|
|
772
816
|
}
|
|
773
817
|
|
|
@@ -779,7 +823,7 @@ function loadEnvConfig(dir = process.cwd()) {
|
|
|
779
823
|
}
|
|
780
824
|
|
|
781
825
|
return {
|
|
782
|
-
config: mergeConfig(base, parsed),
|
|
826
|
+
config: applyProviderEnvDefaults(mergeConfig(base, parsed), parsed),
|
|
783
827
|
present: true,
|
|
784
828
|
unknown: collectUnknownKeys(parsed),
|
|
785
829
|
badReviewers: collectBadReviewers(parsed),
|
|
@@ -788,6 +832,7 @@ function loadEnvConfig(dir = process.cwd()) {
|
|
|
788
832
|
|
|
789
833
|
module.exports = {
|
|
790
834
|
loadEnvConfig,
|
|
835
|
+
setProviderEnvDefaults,
|
|
791
836
|
resolveServePort,
|
|
792
837
|
derivedServePort,
|
|
793
838
|
servePortRoot,
|