refactor: hard-fork GSD -> MSD (Make Software Done)
Mechanical rename produced by scripts/msd-rename.cjs: gsd/Gsd/GSD -> msd/Msd/MSD across contents and paths, upstream package/repo coordinates -> @golem15/msd-core and golem15com/msd-core. Deep links into upstream history, sibling upstream packages, the GSD-2 import feature, CHANGELOG.md and .changeset/ are kept as-is. Hand edits on top: MSD block-letter banner and logos, LICENSE copyright line, package/plugin identity, regenerated lockfile, install-tree fixtures, derived registries and benchmark baseline; migration checksum baseline re-locked (MSD keeps its own install state, so no install had applied the old sums); sort-order and regex-escaped expectations in tests adjusted.
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
* Default behaviour (createDefaultLogger):
|
||||
* 1. Silent on success — no stdout/stderr when result.kind === 'ok'.
|
||||
* 2. Structured JSON to stderr on error — one line per dispatch error.
|
||||
* 3. Opt-in audit file — when GSD_AUDIT=1 OR config.audit.enabled===true,
|
||||
* 3. Opt-in audit file — when MSD_AUDIT=1 OR config.audit.enabled===true,
|
||||
* appends every event (success + error) as one JSON line to
|
||||
* .planning/.gsd-trace.jsonl relative to `cwd`. Creates .planning/ if absent.
|
||||
* 4. Args redaction — args omitted by default; included when GSD_AUDIT_ARGS=1.
|
||||
* .planning/.msd-trace.jsonl relative to `cwd`. Creates .planning/ if absent.
|
||||
* 4. Args redaction — args omitted by default; included when MSD_AUDIT_ARGS=1.
|
||||
*
|
||||
* No-op logger (createNoOpLogger):
|
||||
* Silent on all events. Used as the Hub default when no logger is injected.
|
||||
@@ -25,7 +25,7 @@ import path from 'node:path';
|
||||
|
||||
import { redactEvent } from './redaction.cjs';
|
||||
|
||||
const AUDIT_FILE_NAME = '.gsd-trace.jsonl';
|
||||
const AUDIT_FILE_NAME = '.msd-trace.jsonl';
|
||||
const PLANNING_DIR = '.planning';
|
||||
|
||||
// ─── helpers ─────────────────────────────────────────────────────────────────
|
||||
@@ -42,7 +42,7 @@ function _safeStringify(value: unknown): string {
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether observability is opt-in enabled — via the GSD_AUDIT env var
|
||||
* Determine whether observability is opt-in enabled — via the MSD_AUDIT env var
|
||||
* or config.audit.enabled. Exported (#2620) so the live dispatch seam can decide
|
||||
* whether to inject the reference logger at all: when observability is off we
|
||||
* inject nothing (the Hub stays byte-for-byte silent, preserving the default
|
||||
@@ -50,7 +50,7 @@ function _safeStringify(value: unknown): string {
|
||||
* createDefaultLogger and gets the stderr-on-error line + opt-in file audit.
|
||||
*/
|
||||
function _isAuditEnabled(config?: { audit?: { enabled?: boolean } }): boolean {
|
||||
if (process.env['GSD_AUDIT'] === '1') return true;
|
||||
if (process.env['MSD_AUDIT'] === '1') return true;
|
||||
if (config && config.audit && config.audit.enabled === true) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* hand-written .cjs; only types are added.
|
||||
*
|
||||
* Privacy default: args are OMITTED from every emitted event (both stderr
|
||||
* and file audit). Opt-in: set GSD_AUDIT_ARGS=1 to include args verbatim.
|
||||
* and file audit). Opt-in: set MSD_AUDIT_ARGS=1 to include args verbatim.
|
||||
*
|
||||
* This module is deliberately simple and has no side effects — redaction
|
||||
* decisions are stateless reads of process.env at call time so that tests
|
||||
@@ -19,18 +19,18 @@ export type DispatchEvent = Record<string, unknown>;
|
||||
|
||||
/**
|
||||
* Returns true when the caller has opted in to including args in events.
|
||||
* Only GSD_AUDIT_ARGS === '1' enables inclusion; any other value (including
|
||||
* Only MSD_AUDIT_ARGS === '1' enables inclusion; any other value (including
|
||||
* empty string, 'true', 'yes') keeps the default of omitting args.
|
||||
*/
|
||||
export function shouldIncludeArgs(): boolean {
|
||||
return process.env.GSD_AUDIT_ARGS === '1';
|
||||
return process.env.MSD_AUDIT_ARGS === '1';
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a redacted copy of a DispatchEvent.
|
||||
*
|
||||
* If args should be omitted (default), strips the `args` field entirely.
|
||||
* If args should be included (GSD_AUDIT_ARGS=1), passes the event through
|
||||
* If args should be included (MSD_AUDIT_ARGS=1), passes the event through
|
||||
* unchanged (args were already set by makeDispatchEvent with includeArgs:true,
|
||||
* or absent — in which case they stay absent).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user