@hexagen-monaco/sync 0.7.0 → 0.7.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.
@@ -1 +1 @@
1
- {"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../src/linter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C;;;GAGG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA2CrE"}
1
+ {"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../src/linter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C;;;GAGG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA6CrE"}
package/dist/results.d.ts CHANGED
@@ -62,6 +62,14 @@ export interface SyncRunSummary {
62
62
  totalOps: number;
63
63
  /** Generators that caught a failure into `result.error` this run. */
64
64
  errors: number;
65
+ /**
66
+ * The root manifest.yaml was absent and the engine synthesized an empty one
67
+ * (the dry-run fallback). A fact, not an op: a plain `--dry-run` preview
68
+ * tolerates it, but a verification gate (`--check`) treats it as a failure —
69
+ * you cannot certify a tree drift-free against a manifest that does not
70
+ * exist. The engine only reports it; the CLI decides the exit code (A1).
71
+ */
72
+ manifestMissing: boolean;
65
73
  durationMs: number;
66
74
  }
67
75
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../src/results.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,SAAS,GACT,WAAW,GACX,SAAS,GACT,WAAW,CAAC;AAEhB;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CA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E,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,eAAe,CASnD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,eAAe,EACvB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,WAAW,GAClB,IAAI,CAaN"}
@@ -6,7 +6,29 @@ export interface InitOptions {
6
6
  targetRoot?: string;
7
7
  manifest?: Manifest;
8
8
  }
9
- export declare function findWorkspaceRoot(options: InitOptions): Promise<string>;
10
- export declare function loadManifest(workspaceRoot: string, flags: SyncFlags, options: InitOptions): Promise<Manifest>;
9
+ /**
10
+ * Resolve the workspace root (Wave-C consumer experience, RCA #7):
11
+ * `options.targetRoot` wins (programmatic callers — the wizard's external
12
+ * mode, tests); otherwise walk up from each probe start in order and return
13
+ * the first directory whose package.json declares a `workspaces` array.
14
+ *
15
+ * Probe order is cwd FIRST, install location second:
16
+ * - cwd-first is the CLI convention (git/npm/turbo all operate on where you
17
+ * are), and it is the only start that works for a global or `npx` install,
18
+ * where __dirname lives in a cache directory whose walk-up finds nothing —
19
+ * the old __dirname-only walk hard-failed there with a terse error that
20
+ * never named the real problem.
21
+ * - The __dirname fallback preserves every previously-working setup: a
22
+ * locally installed CLI invoked from OUTSIDE its workspace (cwd resolves
23
+ * nothing) still finds the workspace it is installed in.
24
+ *
25
+ * `probeStarts` is parameterized for tests only; production callers use the
26
+ * default.
27
+ */
28
+ export declare function findWorkspaceRoot(options: InitOptions, probeStarts?: readonly string[]): Promise<string>;
29
+ export declare function loadManifest(workspaceRoot: string, flags: SyncFlags, options: InitOptions): Promise<{
30
+ manifest: Manifest;
31
+ manifestMissing: boolean;
32
+ }>;
11
33
  export declare function validateManifest(manifest: Manifest, flags: SyncFlags): void;
12
34
  //# sourceMappingURL=sync-engine-init.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sync-engine-init.d.ts","sourceRoot":"","sources":["../src/sync-engine-init.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAKpD,QAAA,MAAM,SAAS,QAA2B,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAsB7E;AAED,wBAAsB,YAAY,CAChC,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,QAAQ,CAAC,CA+BnB;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAiC3E"}
1
+ {"version":3,"file":"sync-engine-init.d.ts","sourceRoot":"","sources":["../src/sync-engine-init.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAKpD,QAAA,MAAM,SAAS,QAA2B,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AA6CD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,WAAW,EACpB,WAAW,GAAE,SAAS,MAAM,EAA+B,GAC1D,OAAO,CAAC,MAAM,CAAC,CAyBjB;AAED,wBAAsB,YAAY,CAChC,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,eAAe,EAAE,OAAO,CAAA;CAAE,CAAC,CAgC3D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAiC3E"}
@@ -12,6 +12,7 @@ export declare class SyncEngine {
12
12
  private partialConfig;
13
13
  private fullConfig;
14
14
  private manifest;
15
+ private manifestMissing;
15
16
  private workspaceRoot;
16
17
  private readonly options?;
17
18
  constructor(flags: SyncFlags, options?: SyncEngineOptions);
@@ -1 +1 @@
1
- {"version":3,"file":"sync-engine.d.ts","sourceRoot":"","sources":["../src/sync-engine.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAc,MAAM,aAAa,CAAC;AAkBpD,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAkBpD,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAyB;IAKvC,OAAO,CAAC,OAAO,CAAqB;IAYpC,OAAO,CAAC,QAAQ,CAA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,WAAW;YAML,iBAAiB;YAmCjB,qBAAqB;IAiG7B,GAAG,IAAI,OAAO,CAAC,cAAc,CAAC;CAmTrC"}
@@ -35,11 +35,11 @@ library, to avoid hallucinated dependencies.
35
35
 
36
36
  ## Conventions
37
37
 
38
- - **Logging:** use the structured logger (`src/infrastructure/logging/logger.ts`, from the
39
- `observability` template) — e.g. `logger.info({ userId }, "user.created")`. **Never `console.log`**
40
- — it has no level, correlation id, or redaction and becomes technical debt. The `eslint-no-console`
41
- template enforces this in lint/CI; the only exempt sites are the logger transport, server startup,
42
- scripts, and config files.
38
+ - **Logging:** prefer structured, leveled logging over bare `console.log` in
39
+ application code. If the `observability` template is installed, its logger is
40
+ the required interface and `.agents/logging.md` is the binding spec; if the
41
+ `eslint-no-console` template is installed, lint/CI enforces the ban. Without
42
+ those templates, keep logging consistent with the surrounding code.
43
43
 
44
44
  ## Commands After Edits
45
45
 
@@ -93,5 +93,7 @@ Deeper guidance lives in `.agents/`:
93
93
  - `testing.md` — runner, assertions, file naming
94
94
  - `git.md` — commit/branch/PR rules
95
95
  - `tech-stack.md` — exact tools, with negative examples
96
+ - `logging.md` — the binding logging spec (present when the `observability`
97
+ template is installed)
96
98
  - `session-log.md` — running log of AI-assisted sessions (present when session
97
99
  logging is enabled)
@@ -5,9 +5,10 @@
5
5
  # cat .gitignore.hexagen >> .gitignore
6
6
  #
7
7
  # Keep this file — it's the committed reference for the env-ignore rules (like
8
- # .env.example), and `hexagen validate-templates` expects every template output
9
- # to stay present. The leading blank line above keeps these rules from merging
10
- # onto the last line of a .gitignore with no trailing newline. Ignores your
8
+ # .env.example). If this template is registered in the project's template
9
+ # config, `hexagen validate-templates` will flag this file when it goes
10
+ # missing. The leading blank line above keeps these rules from merging onto
11
+ # the last line of a .gitignore with no trailing newline. Ignores your
11
12
  # local/secret env files but keeps the committed *.example references tracked.
12
13
 
13
14
  .env
@@ -0,0 +1,34 @@
1
+ # Logging Spec
2
+
3
+ This spec ships with the `observability` template. The logger it mandates is
4
+ installed at `src/infrastructure/logging/logger.ts` — if you are reading this
5
+ file, that logger exists in this project.
6
+
7
+ ## The Rule
8
+
9
+ Use the structured logger for all application logging. Import it from the
10
+ `src/infrastructure/logging` barrel (the module's public surface — not the
11
+ individual files), via a relative path or your project's path alias:
12
+
13
+ ```ts
14
+ import { logger } from "../infrastructure/logging";
15
+
16
+ logger.info({ userId }, "user.created");
17
+ ```
18
+
19
+ **Never `console.log`** in application code — it has no level, no correlation
20
+ id, and no redaction, and it becomes technical debt the moment it lands.
21
+
22
+ ## Exempt Sites
23
+
24
+ The only places `console` is acceptable:
25
+
26
+ - the logger transport itself (`src/infrastructure/logging/`)
27
+ - server startup/shutdown messages emitted before the logger exists
28
+ - one-off scripts outside the app runtime
29
+ - config files evaluated at build time
30
+
31
+ ## Enforcement
32
+
33
+ If the `eslint-no-console` template is also installed, this rule is enforced in
34
+ lint/CI. Otherwise it relies on code review — the rule stands either way.
@@ -39,6 +39,7 @@
39
39
  "server/middleware/request-logger.ts",
40
40
  "app/api/health/route.ts",
41
41
  ".env.observability.example",
42
+ ".agents/logging.md",
42
43
  {
43
44
  "path": "instrumentation.ts",
44
45
  "when": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexagen-monaco/sync",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "type": "module",
5
5
  "description": "HexaGen Sync Engine — Generate and sync modular monorepos",
6
6
  "keywords": [