@dsh-triage/signals 0.0.0-stage → 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DSH-Addition contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,17 @@
1
- # Temporary Holding Version
1
+ # @dsh-triage/signals
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Tiered signal adapters. Each adapter produces **evidence**, never a conclusion.
4
+
5
+ | Adapter | Source | Tier | Licence note |
6
+ |---|---|---|---|
7
+ | `fetchPackument` / `parsePackument` | npm registry metadata | `declared` | registry terms |
8
+ | `fetchInstallVerification` / `projectInstallVerification` | dsh.so install verification | `measured-registry` | **CC BY 4.0 — attribute dsh.so** |
9
+ | `discoverLocalArtifacts` | guard incidents / vet reports / savepoints already on disk | `inferred` until schemas are verified | each tool's own licence |
10
+
11
+ ## Rules
12
+
13
+ - `fetch` is injected: unit tests never touch the network.
14
+ - Third-party payloads are read defensively; unknown fields go to `raw` and are never guessed into claims.
15
+ - No adapter may emit `measured-local` — only `packages/probe` can, because only probe runs on this machine.
16
+
17
+ MIT. dsh.so data is CC BY 4.0 and must be attributed wherever it is displayed.
@@ -0,0 +1,45 @@
1
+ /**
2
+ * dsh.so registry adapter.
3
+ *
4
+ * Licensing (COMPLIANCE.md §4): dsh.so data is CC BY 4.0. Any surface that shows
5
+ * it MUST attribute dsh.so, and MUST NOT reword its verdicts (e.g. turning
6
+ * "L4 sandbox install passed" into "verified working on your machine").
7
+ *
8
+ * Blind spot (BS-06): L4/L5 are clean-sandbox measurements on one fixed
9
+ * environment. They are `measured-registry`, never `measured-local`.
10
+ */
11
+ import type { Evidence } from '@dsh-triage/core';
12
+ import type { FetchLike, SignalError } from './npm.js';
13
+ export type InstallVerificationState = 'passed' | 'failed' | 'unknown' | 'stale' | 'untested';
14
+ export interface InstallVerification {
15
+ readonly name: string;
16
+ readonly version: string | null;
17
+ readonly dshVersion: string | null;
18
+ readonly state: InstallVerificationState;
19
+ /** Highest level reported by the registry, e.g. `L5`. */
20
+ readonly level: string | null;
21
+ readonly verifiedAt: string | null;
22
+ readonly raw: unknown;
23
+ }
24
+ export interface DshSoOptions {
25
+ readonly baseUrl?: string;
26
+ readonly fetchImpl?: FetchLike;
27
+ readonly timeoutMs?: number;
28
+ }
29
+ /**
30
+ * Read the install-verification record for one plugin.
31
+ *
32
+ * The endpoint shape is intentionally treated as untrusted input: unknown fields
33
+ * are preserved in `raw` and never guessed into strong claims.
34
+ */
35
+ export declare function fetchInstallVerification(name: string, options?: DshSoOptions): Promise<{
36
+ ok: true;
37
+ value: InstallVerification;
38
+ } | {
39
+ ok: false;
40
+ error: SignalError;
41
+ }>;
42
+ /** Pure projection with defensive field reading (the API is third-party). */
43
+ export declare function projectInstallVerification(name: string, raw: unknown): InstallVerification;
44
+ export declare function dshSoEvidence(record: InstallVerification, at: string): Evidence;
45
+ //# sourceMappingURL=dshso.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dshso.d.ts","sourceRoot":"","sources":["../src/dshso.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAEtD,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAA;AAE7F,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,QAAQ,CAAC,KAAK,EAAE,wBAAwB,CAAA;IACxC,yDAAyD;IACzD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAA;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAID;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,mBAAmB,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAAE,CAAC,CAyBvF;AAID,6EAA6E;AAC7E,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,mBAAmB,CAe1F;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,mBAAmB,EAAE,EAAE,EAAE,MAAM,GAAG,QAAQ,CAS/E"}
package/dist/dshso.js ADDED
@@ -0,0 +1,77 @@
1
+ /**
2
+ * dsh.so registry adapter.
3
+ *
4
+ * Licensing (COMPLIANCE.md §4): dsh.so data is CC BY 4.0. Any surface that shows
5
+ * it MUST attribute dsh.so, and MUST NOT reword its verdicts (e.g. turning
6
+ * "L4 sandbox install passed" into "verified working on your machine").
7
+ *
8
+ * Blind spot (BS-06): L4/L5 are clean-sandbox measurements on one fixed
9
+ * environment. They are `measured-registry`, never `measured-local`.
10
+ */
11
+ const DEFAULT_BASE = 'https://www.dsh.so';
12
+ /**
13
+ * Read the install-verification record for one plugin.
14
+ *
15
+ * The endpoint shape is intentionally treated as untrusted input: unknown fields
16
+ * are preserved in `raw` and never guessed into strong claims.
17
+ */
18
+ export async function fetchInstallVerification(name, options = {}) {
19
+ const base = options.baseUrl ?? DEFAULT_BASE;
20
+ const fetchImpl = options.fetchImpl ?? globalThis.fetch;
21
+ const encoded = name.startsWith('@') ? name.replace('/', '%2F') : name;
22
+ const url = `${base}/data/install/${encoded}.json`;
23
+ const controller = new AbortController();
24
+ const timer = setTimeout(() => controller.abort(), options.timeoutMs ?? 15_000);
25
+ try {
26
+ const response = await fetchImpl(url, { signal: controller.signal });
27
+ if (response.status === 404) {
28
+ return { ok: false, error: { code: 'not-found', detail: `no install record for ${name}`, source: url } };
29
+ }
30
+ if (!response.ok) {
31
+ return { ok: false, error: { code: 'network-error', detail: `HTTP ${response.status}`, source: url } };
32
+ }
33
+ const parsed = JSON.parse(await response.text());
34
+ return { ok: true, value: projectInstallVerification(name, parsed) };
35
+ }
36
+ catch (error) {
37
+ return {
38
+ ok: false,
39
+ error: { code: 'invalid-json', detail: error instanceof Error ? error.message : String(error), source: url },
40
+ };
41
+ }
42
+ finally {
43
+ clearTimeout(timer);
44
+ }
45
+ }
46
+ const STATES = ['passed', 'failed', 'unknown', 'stale', 'untested'];
47
+ /** Pure projection with defensive field reading (the API is third-party). */
48
+ export function projectInstallVerification(name, raw) {
49
+ const record = raw !== null && typeof raw === 'object' ? raw : {};
50
+ const stateRaw = record['state'] ?? record['status'];
51
+ const state = typeof stateRaw === 'string' && STATES.includes(stateRaw)
52
+ ? stateRaw
53
+ : 'unknown';
54
+ return {
55
+ name,
56
+ version: stringOrNull(record['version']),
57
+ dshVersion: stringOrNull(record['dshVersion'] ?? record['dsh']),
58
+ state,
59
+ level: stringOrNull(record['level']),
60
+ verifiedAt: stringOrNull(record['verifiedAt'] ?? record['checkedAt']),
61
+ raw,
62
+ };
63
+ }
64
+ export function dshSoEvidence(record, at) {
65
+ return {
66
+ id: `dshso-${record.version ?? 'unknown'}`,
67
+ tier: 'measured-registry',
68
+ source: `dsh.so:${record.name}${record.version === null ? '' : `@${record.version}`}`,
69
+ method: 'registry-install-verification',
70
+ at,
71
+ detail: `${record.level ?? 'L?'} ${record.state}${record.dshVersion === null ? '' : ` on dsh ${record.dshVersion}`}`,
72
+ };
73
+ }
74
+ function stringOrNull(value) {
75
+ return typeof value === 'string' && value !== '' ? value : null;
76
+ }
77
+ //# sourceMappingURL=dshso.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dshso.js","sourceRoot":"","sources":["../src/dshso.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAwBH,MAAM,YAAY,GAAG,oBAAoB,CAAA;AAEzC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,IAAY,EACZ,UAAwB,EAAE;IAE1B,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,IAAI,YAAY,CAAA;IAC5C,MAAM,SAAS,GAAG,OAAO,CAAC,S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CAAC;AAED,MAAM,UAAU,aAAa,CAAC,MAA2B,EAAE,EAAU;IACnE,OAAO;QACL,EAAE,EAAE,SAAS,MAAM,CAAC,OAAO,IAAI,SAAS,EAAE;QAC1C,IAAI,EAAE,mBAAmB;QACzB,MAAM,EAAE,UAAU,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,EAAE;QACrF,MAAM,EAAE,+BAA+B;QACvC,EAAE;QACF,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,UAAU,EAAE,EAAE;KACrH,CAAA;AACH,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA;AACjE,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Public surface of `@dsh-triage/signals`.
3
+ *
4
+ * Every adapter is (a) network-injected, (b) tier-tagged, (c) explicitly
5
+ * attributable. No adapter is allowed to produce a `measured-local` tier: only
6
+ * `packages/probe` can, because only probe runs on this machine.
7
+ */
8
+ export type { FetchLike, NpmAdapterOptions, NpmPackument, NpmVersionManifest, SignalError, SignalErrorCode } from './npm.js';
9
+ export { encodePackageName, fetchPackument, npmEvidence, parsePackument } from './npm.js';
10
+ export type { DshSoOptions, InstallVerification, InstallVerificationState } from './dshso.js';
11
+ export { dshSoEvidence, fetchInstallVerification, projectInstallVerification } from './dshso.js';
12
+ export type { DiscoverOptions, LocalArtifact, LocalArtifactKind } from './local.js';
13
+ export { discoverLocalArtifacts } from './local.js';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,YAAY,EAAE,kBAAkB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC5H,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzF,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAC7F,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAA;AAEhG,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Public surface of `@dsh-triage/signals`.
3
+ *
4
+ * Every adapter is (a) network-injected, (b) tier-tagged, (c) explicitly
5
+ * attributable. No adapter is allowed to produce a `measured-local` tier: only
6
+ * `packages/probe` can, because only probe runs on this machine.
7
+ */
8
+ export { encodePackageName, fetchPackument, npmEvidence, parsePackument } from './npm.js';
9
+ export { dshSoEvidence, fetchInstallVerification, projectInstallVerification } from './dshso.js';
10
+ export { discoverLocalArtifacts } from './local.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAGzF,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAA;AAGhG,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Local artifacts produced by *other* tools (guard incidents, vet reports, snapshots).
3
+ *
4
+ * Status: discovery only (M0/M1). Nothing here feeds a verdict yet, because the
5
+ * schemas are third-party and unverified — see `audit/blind_spots.json` BS-04.
6
+ * Reading them is still useful: `dsh-triage audit` lists what evidence already
7
+ * exists on this machine, so M2 can start consuming the stable ones.
8
+ *
9
+ * Hard rule: read-only, bounded (no recursive walks outside the candidate list),
10
+ * and tolerant of broken JSON (reported, never thrown).
11
+ */
12
+ export type LocalArtifactKind = 'guard-incident' | 'vet-result' | 'savepoint' | 'unknown';
13
+ export interface LocalArtifact {
14
+ readonly path: string;
15
+ readonly kind: LocalArtifactKind;
16
+ /** Parsed JSON when available; `null` when the file is not valid JSON. */
17
+ readonly raw: unknown;
18
+ readonly bytes: number;
19
+ readonly note: string;
20
+ }
21
+ export interface DiscoverOptions {
22
+ /** Directory that contains the artifacts (usually the profile directory). */
23
+ readonly root: string;
24
+ readonly maxFiles?: number;
25
+ }
26
+ /** Discover known artifacts under `root`; missing paths are simply absent. */
27
+ export declare function discoverLocalArtifacts(options: DiscoverOptions): Promise<readonly LocalArtifact[]>;
28
+ //# sourceMappingURL=local.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../src/local.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,CAAA;AAEzF,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAA;IAChC,0EAA0E;IAC1E,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAC3B;AAgBD,8EAA8E;AAC9E,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,aAAa,EAAE,CAAC,CAoBxG"}
package/dist/local.js ADDED
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Local artifacts produced by *other* tools (guard incidents, vet reports, snapshots).
3
+ *
4
+ * Status: discovery only (M0/M1). Nothing here feeds a verdict yet, because the
5
+ * schemas are third-party and unverified — see `audit/blind_spots.json` BS-04.
6
+ * Reading them is still useful: `dsh-triage audit` lists what evidence already
7
+ * exists on this machine, so M2 can start consuming the stable ones.
8
+ *
9
+ * Hard rule: read-only, bounded (no recursive walks outside the candidate list),
10
+ * and tolerant of broken JSON (reported, never thrown).
11
+ */
12
+ import { readFile, readdir, stat } from 'node:fs/promises';
13
+ import { join } from 'node:path';
14
+ const CANDIDATES = [
15
+ { relative: '.guard/incidents', kind: 'guard-incident', directory: true },
16
+ { relative: 'incidents', kind: 'guard-incident', directory: true },
17
+ { relative: '.vetting/vet-result.json', kind: 'vet-result', directory: false },
18
+ { relative: '.vetting/vet-report.md', kind: 'vet-result', directory: false },
19
+ { relative: '.savepoints', kind: 'savepoint', directory: true },
20
+ ];
21
+ /** Discover known artifacts under `root`; missing paths are simply absent. */
22
+ export async function discoverLocalArtifacts(options) {
23
+ const maxFiles = options.maxFiles ?? 40;
24
+ const found = [];
25
+ for (const candidate of CANDIDATES) {
26
+ const path = join(options.root, candidate.relative);
27
+ if (candidate.directory) {
28
+ const names = await safeReaddir(path);
29
+ for (const name of names.sort((a, b) => a.localeCompare(b)).slice(0, maxFiles)) {
30
+ if (!/\.(json|jsonl|md)$/i.test(name))
31
+ continue;
32
+ const artifact = await readArtifact(join(path, name), candidate.kind);
33
+ if (artifact !== null)
34
+ found.push(artifact);
35
+ }
36
+ }
37
+ else {
38
+ const artifact = await readArtifact(path, candidate.kind);
39
+ if (artifact !== null)
40
+ found.push(artifact);
41
+ }
42
+ }
43
+ return found.sort((a, b) => a.path.localeCompare(b.path));
44
+ }
45
+ async function safeReaddir(path) {
46
+ try {
47
+ const entries = await readdir(path, { withFileTypes: true });
48
+ return entries.filter((entry) => entry.isFile()).map((entry) => entry.name);
49
+ }
50
+ catch {
51
+ return [];
52
+ }
53
+ }
54
+ async function readArtifact(path, kind) {
55
+ try {
56
+ const info = await stat(path);
57
+ if (!info.isFile() || info.size > 4 * 1024 * 1024) {
58
+ return {
59
+ path,
60
+ kind,
61
+ raw: null,
62
+ bytes: info.size,
63
+ note: 'skipped: not a regular file under 4 MiB',
64
+ };
65
+ }
66
+ const text = await readFile(path, 'utf8');
67
+ if (/\.md$/i.test(path)) {
68
+ return { path, kind, raw: null, bytes: info.size, note: 'markdown report (not parsed in M0)' };
69
+ }
70
+ try {
71
+ const parsed = JSON.parse(text);
72
+ return { path, kind, raw: parsed, bytes: info.size, note: 'parsed json (schema unverified)' };
73
+ }
74
+ catch {
75
+ return { path, kind, raw: null, bytes: info.size, note: 'invalid json; kept for manual inspection only' };
76
+ }
77
+ }
78
+ catch {
79
+ return null;
80
+ }
81
+ }
82
+ //# sourceMappingURL=local.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local.js","sourceRoot":"","sources":["../src/local.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAyBhC,MAAM,UAAU,GAAyB;IACvC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,IAAI,EAAE,gBAAgB,EAAE,SAAS,EAAE,IAAI,EAAE;IACzE,EAAE,QAAQ,EAAE,WAAW,EAAE,IAA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AAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACxB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,oCAAoC,EAAE,CAAA;QAChG,CAAC;QACD,IAAI,CAAC;YACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;YACxC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,iCAAiC,EAAE,CAAA;QAC/F,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,+CAA+C,EAAE,CAAA;QAC3G,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
package/dist/npm.d.ts ADDED
@@ -0,0 +1,76 @@
1
+ /**
2
+ * npm registry adapter (metadata only).
3
+ *
4
+ * Contract:
5
+ * - We read `version`, `engines`, `peerDependencies`, `deprecated`, `time`.
6
+ * - We never download or execute tarballs here; that belongs to `probe`, behind
7
+ * an explicit opt-in and the `quarantine/` gate.
8
+ * - `fetch` is injected so tests never touch the network.
9
+ *
10
+ * Evidence tier: `declared` (what the author published), not `measured-*`.
11
+ */
12
+ import type { Evidence } from '@dsh-triage/core';
13
+ export interface NpmVersionManifest {
14
+ readonly version: string;
15
+ readonly engines?: unknown;
16
+ readonly peerDependencies?: unknown;
17
+ readonly deprecated?: string;
18
+ }
19
+ export interface NpmPackument {
20
+ readonly name: string;
21
+ readonly latest: string | null;
22
+ readonly versions: ReadonlyMap<string, NpmVersionManifest>;
23
+ readonly modified: string | null;
24
+ /**
25
+ * Every dist-tag the author publishes (`latest`, `next`, `rc`, …).
26
+ *
27
+ * WHY (T-109 / CASE-10849): `@deepseek-ai/dsh-tools` had `latest` pointing at
28
+ * `0.0.1-rc.1` while `0.2.1-rc.x` was already published. A user who installs the
29
+ * bare name gets the stale build and is then denied by admission — the failure
30
+ * starts in the tag, not in the range. Reading only `latest` made that invisible.
31
+ */
32
+ readonly distTags: Readonly<Record<string, string>>;
33
+ /** Publish timestamps per version (`time` minus `created`/`modified`), ISO strings. */
34
+ readonly publishedAt: Readonly<Record<string, string>>;
35
+ }
36
+ export type SignalErrorCode = 'network-error' | 'not-found' | 'invalid-json' | 'invalid-payload' | 'unsupported';
37
+ export interface SignalError {
38
+ readonly code: SignalErrorCode;
39
+ readonly detail: string;
40
+ /** Where the request went, for reporting. */
41
+ readonly source: string;
42
+ }
43
+ export type FetchLike = (url: string, init?: {
44
+ readonly signal?: AbortSignal;
45
+ }) => Promise<{
46
+ readonly ok: boolean;
47
+ readonly status: number;
48
+ text(): Promise<string>;
49
+ }>;
50
+ export interface NpmAdapterOptions {
51
+ readonly registry?: string;
52
+ readonly fetchImpl?: FetchLike;
53
+ readonly timeoutMs?: number;
54
+ /** ISO timestamp for evidence; injected so output stays deterministic. */
55
+ readonly at: string;
56
+ }
57
+ /** URL-safe encoding for scoped names (`@scope/pkg` -> `@scope%2Fpkg`). */
58
+ export declare function encodePackageName(name: string): string;
59
+ export declare function fetchPackument(name: string, options: NpmAdapterOptions): Promise<{
60
+ readonly ok: false;
61
+ readonly error: SignalError;
62
+ } | {
63
+ ok: true;
64
+ value: NpmPackument;
65
+ }>;
66
+ /** Pure JSON -> packument projection. Exported for tests and offline fixtures. */
67
+ export declare function parsePackument(text: string): {
68
+ readonly ok: true;
69
+ readonly value: NpmPackument;
70
+ } | {
71
+ readonly ok: false;
72
+ readonly error: SignalError;
73
+ };
74
+ /** Evidence describing the npm facts that a verdict rested on. */
75
+ export declare function npmEvidence(packument: NpmPackument, version: string, at: string): Evidence;
76
+ //# sourceMappingURL=npm.d.ts.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E,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAAE,KAAK,OAAO,CAAC;IACzF,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CACxB,CAAC,CAAA;AAEF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAA;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CACpB;AAID,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB;iBAuC1D,KAAK;oBAAkB,WAAW;;;;GALpD;AAED,kFAAkF;AAClF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GACvC;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;CAAE,GACnD;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAA;CAAE,CA4DtD;AAED,kEAAkE;AAClE,wBAAgB,WAAW,CAAC,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,QAAQ,CAS1F"}
package/dist/npm.js ADDED
@@ -0,0 +1,128 @@
1
+ /**
2
+ * npm registry adapter (metadata only).
3
+ *
4
+ * Contract:
5
+ * - We read `version`, `engines`, `peerDependencies`, `deprecated`, `time`.
6
+ * - We never download or execute tarballs here; that belongs to `probe`, behind
7
+ * an explicit opt-in and the `quarantine/` gate.
8
+ * - `fetch` is injected so tests never touch the network.
9
+ *
10
+ * Evidence tier: `declared` (what the author published), not `measured-*`.
11
+ */
12
+ const DEFAULT_REGISTRY = 'https://registry.npmjs.org';
13
+ /** URL-safe encoding for scoped names (`@scope/pkg` -> `@scope%2Fpkg`). */
14
+ export function encodePackageName(name) {
15
+ return name.replace('/', '%2F');
16
+ }
17
+ export async function fetchPackument(name, options) {
18
+ const registry = options.registry ?? DEFAULT_REGISTRY;
19
+ const fetchImpl = options.fetchImpl ?? globalThis.fetch;
20
+ const url = `${registry}/${encodePackageName(name)}`;
21
+ const timeoutMs = options.timeoutMs ?? 15_000;
22
+ const controller = new AbortController();
23
+ const timer = setTimeout(() => controller.abort(), timeoutMs);
24
+ try {
25
+ const response = await fetchImpl(url, { signal: controller.signal });
26
+ if (response.status === 404) {
27
+ return { ok: false, error: { code: 'not-found', detail: `npm has no package ${name}`, source: url } };
28
+ }
29
+ if (!response.ok) {
30
+ return {
31
+ ok: false,
32
+ error: { code: 'network-error', detail: `HTTP ${response.status}`, source: url },
33
+ };
34
+ }
35
+ const text = await response.text();
36
+ const parsed = parsePackument(text);
37
+ if (!parsed.ok)
38
+ return parsed;
39
+ return { ok: true, value: parsed.value };
40
+ }
41
+ catch (error) {
42
+ return {
43
+ ok: false,
44
+ error: {
45
+ code: 'network-error',
46
+ detail: error instanceof Error ? error.message : String(error),
47
+ source: url,
48
+ },
49
+ };
50
+ }
51
+ finally {
52
+ clearTimeout(timer);
53
+ }
54
+ }
55
+ /** Pure JSON -> packument projection. Exported for tests and offline fixtures. */
56
+ export function parsePackument(text) {
57
+ let raw;
58
+ try {
59
+ raw = JSON.parse(text);
60
+ }
61
+ catch (error) {
62
+ return {
63
+ ok: false,
64
+ error: { code: 'invalid-json', detail: error instanceof Error ? error.message : String(error), source: 'npm' },
65
+ };
66
+ }
67
+ if (raw === null || typeof raw !== 'object') {
68
+ return { ok: false, error: { code: 'invalid-payload', detail: 'packument is not an object', source: 'npm' } };
69
+ }
70
+ const record = raw;
71
+ const name = typeof record['name'] === 'string' ? record['name'] : '';
72
+ const distTagsRaw = record['dist-tags'];
73
+ const distTags = {};
74
+ if (distTagsRaw !== null && typeof distTagsRaw === 'object') {
75
+ for (const [tag, version] of Object.entries(distTagsRaw)) {
76
+ // `dist-tags` is author-controlled JSON: keep only well-formed entries.
77
+ if (typeof version === 'string' && version.trim() !== '')
78
+ distTags[tag] = version.trim();
79
+ }
80
+ }
81
+ const latest = distTags['latest'] ?? null;
82
+ const versionsRaw = record['versions'];
83
+ const versions = new Map();
84
+ if (versionsRaw !== null && typeof versionsRaw === 'object') {
85
+ for (const [version, manifest] of Object.entries(versionsRaw)) {
86
+ if (manifest === null || typeof manifest !== 'object')
87
+ continue;
88
+ const manifestRecord = manifest;
89
+ versions.set(version, {
90
+ version,
91
+ engines: manifestRecord['engines'],
92
+ peerDependencies: manifestRecord['peerDependencies'],
93
+ deprecated: manifestRecord['deprecated'] === undefined
94
+ ? undefined
95
+ : typeof manifestRecord['deprecated'] === 'string' && manifestRecord['deprecated'].trim() !== ''
96
+ ? manifestRecord['deprecated']
97
+ : undefined,
98
+ });
99
+ }
100
+ }
101
+ const time = record['time'];
102
+ const modified = time !== null && typeof time === 'object' && typeof time['modified'] === 'string'
103
+ ? time['modified']
104
+ : null;
105
+ const publishedAt = {};
106
+ if (time !== null && typeof time === 'object') {
107
+ for (const [version, value] of Object.entries(time)) {
108
+ // `created` / `modified` are package-level keys, not versions.
109
+ if (version === 'created' || version === 'modified')
110
+ continue;
111
+ if (typeof value === 'string' && value.trim() !== '')
112
+ publishedAt[version] = value;
113
+ }
114
+ }
115
+ return { ok: true, value: { name, latest, versions, modified, distTags, publishedAt } };
116
+ }
117
+ /** Evidence describing the npm facts that a verdict rested on. */
118
+ export function npmEvidence(packument, version, at) {
119
+ return {
120
+ id: `npm-${version}`,
121
+ tier: 'declared',
122
+ source: `npm:${packument.name}@${version}`,
123
+ method: 'registry-metadata',
124
+ at,
125
+ detail: packument.modified === null ? undefined : `packument modified ${packument.modified}`,
126
+ };
127
+ }
128
+ //# sourceMappingURL=npm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"npm.js","sourceRoot":"","sources":["../src/npm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAoDH,MAAM,gBAAgB,GAAG,4BAA4B,CAAA;AAErD,2EAA2E;AAC3E,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;AACjC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAY,EAAE,OAA0B;IAC3E,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,gBAAgB,CAAA;IACrD,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAK,UAAU,CAAC,KAA8B,CAAA;IACjF,MAAM,GAAG,GAAG,GAAG,QAAQ,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAA;IACpD,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,MAAM,CAAA;IAC7C,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAA;IACxC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,SAAS,CAAC,CAAA;IAC7D,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAA;QACpE,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC5B,OAAO,EAAE,EAAE,EAAE,KAAc,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,WAAoB,EAAE,MAAM,EAAE,sBAAsB,IAAI,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,CAAA;QACzH,CAAC;QACD,IAAI,CAAC,QAA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E,KAAK,EAAE;gBAAE,WAAW,CAAC,OAAO,CAAC,GAAG,KAAK,CAAA;QACpF,CAAC;IACH,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,CAAA;AACzF,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,WAAW,CAAC,SAAuB,EAAE,OAAe,EAAE,EAAU;IAC9E,OAAO;QACL,EAAE,EAAE,OAAO,OAAO,EAAE;QACpB,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,OAAO,SAAS,CAAC,IAAI,IAAI,OAAO,EAAE;QAC1C,MAAM,EAAE,mBAAmB;QAC3B,EAAE;QACF,MAAM,EAAE,SAAS,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,sBAAsB,SAAS,CAAC,QAAQ,EAAE;KAC7F,CAAA;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,33 @@
1
1
  {
2
2
  "name": "@dsh-triage/signals",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "description": "Tiered signal adapters for dsh-triage: npm registry, dsh.so registry, hub catalog, and local tool artifacts. Every signal carries provenance; nothing is merged silently.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "README.md"
17
+ ],
18
+ "license": "MIT",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/jjjjjjjjnnjnn/dsh-triage.git",
22
+ "directory": "packages/signals"
23
+ },
24
+ "engines": {
25
+ "node": ">=22.19"
26
+ },
27
+ "dependencies": {
28
+ "@dsh-triage/core": "0.1.0"
29
+ },
30
+ "scripts": {
31
+ "build": "tsc -b"
32
+ }
6
33
  }