@opensip-cli/config 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.
Files changed (56) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +8 -0
  3. package/README.md +31 -0
  4. package/dist/capability-preferences.d.ts +39 -0
  5. package/dist/capability-preferences.d.ts.map +1 -0
  6. package/dist/capability-preferences.js +61 -0
  7. package/dist/capability-preferences.js.map +1 -0
  8. package/dist/composer.d.ts +58 -0
  9. package/dist/composer.d.ts.map +1 -0
  10. package/dist/composer.js +111 -0
  11. package/dist/composer.js.map +1 -0
  12. package/dist/declaration.d.ts +59 -0
  13. package/dist/declaration.d.ts.map +1 -0
  14. package/dist/declaration.js +15 -0
  15. package/dist/declaration.js.map +1 -0
  16. package/dist/document/cli-config.d.ts +102 -0
  17. package/dist/document/cli-config.d.ts.map +1 -0
  18. package/dist/document/cli-config.js +150 -0
  19. package/dist/document/cli-config.js.map +1 -0
  20. package/dist/document/dashboard.d.ts +21 -0
  21. package/dist/document/dashboard.d.ts.map +1 -0
  22. package/dist/document/dashboard.js +21 -0
  23. package/dist/document/dashboard.js.map +1 -0
  24. package/dist/document/global-config.d.ts +101 -0
  25. package/dist/document/global-config.d.ts.map +1 -0
  26. package/dist/document/global-config.js +163 -0
  27. package/dist/document/global-config.js.map +1 -0
  28. package/dist/document/host-declarations.d.ts +44 -0
  29. package/dist/document/host-declarations.d.ts.map +1 -0
  30. package/dist/document/host-declarations.js +48 -0
  31. package/dist/document/host-declarations.js.map +1 -0
  32. package/dist/document/targeting.d.ts +151 -0
  33. package/dist/document/targeting.d.ts.map +1 -0
  34. package/dist/document/targeting.js +71 -0
  35. package/dist/document/targeting.js.map +1 -0
  36. package/dist/document/template.d.ts +43 -0
  37. package/dist/document/template.d.ts.map +1 -0
  38. package/dist/document/template.js +63 -0
  39. package/dist/document/template.js.map +1 -0
  40. package/dist/index.d.ts +39 -0
  41. package/dist/index.d.ts.map +1 -0
  42. package/dist/index.js +37 -0
  43. package/dist/index.js.map +1 -0
  44. package/dist/json-schema.d.ts +23 -0
  45. package/dist/json-schema.d.ts.map +1 -0
  46. package/dist/json-schema.js +25 -0
  47. package/dist/json-schema.js.map +1 -0
  48. package/dist/namespace-claims.d.ts +29 -0
  49. package/dist/namespace-claims.d.ts.map +1 -0
  50. package/dist/namespace-claims.js +62 -0
  51. package/dist/namespace-claims.js.map +1 -0
  52. package/dist/precedence.d.ts +47 -0
  53. package/dist/precedence.d.ts.map +1 -0
  54. package/dist/precedence.js +103 -0
  55. package/dist/precedence.js.map +1 -0
  56. package/package.json +47 -0
@@ -0,0 +1,62 @@
1
+ /**
2
+ * namespace-claims — the ADR-0043 unclaimed-namespace report.
3
+ *
4
+ * The composer deliberately tolerates unclaimed top-level keys (the
5
+ * uninstalled-tool forward-compat contract, `composer.ts` rule 2) — but it
6
+ * tolerates them SILENTLY, which is the live typo hole: `fitnes:` validates
7
+ * cleanly and the user's config just never applies. This pure analyzer makes
8
+ * the tolerance observable: it names each unclaimed namespace and suggests
9
+ * the nearest claimed one when a typo is plausible. The CLI emits the warning
10
+ * (config stays log-free); rejection policy (a LOADED tool with an undeclared
11
+ * namespace) also lives at the caller, which knows the loaded-tool set.
12
+ */
13
+ /**
14
+ * Levenshtein distance, bounded: returns early with `max + 1` when the
15
+ * difference cannot be ≤ `max`. Small inputs (config keys), no dependency.
16
+ */
17
+ function boundedEditDistance(a, b, max) {
18
+ if (Math.abs(a.length - b.length) > max)
19
+ return max + 1;
20
+ let prev = Array.from({ length: b.length + 1 }, (_, i) => i);
21
+ for (let i = 1; i <= a.length; i++) {
22
+ const curr = [i];
23
+ let rowMin = i;
24
+ for (let j = 1; j <= b.length; j++) {
25
+ const cost = a[i - 1] === b[j - 1] ? 0 : 1;
26
+ curr[j] = Math.min(curr[j - 1] + 1, prev[j] + 1, prev[j - 1] + cost);
27
+ rowMin = Math.min(rowMin, curr[j]);
28
+ }
29
+ if (rowMin > max)
30
+ return max + 1;
31
+ prev = curr;
32
+ }
33
+ return prev[b.length];
34
+ }
35
+ const SUGGESTION_MAX_DISTANCE = 2;
36
+ /**
37
+ * Report the document's top-level keys that no declaration claims. Pure: no
38
+ * IO, no logging — the caller decides warn-vs-reject per key (ADR-0043).
39
+ */
40
+ export function analyzeNamespaceClaims(declarations, document) {
41
+ if (typeof document !== 'object' || document === null || Array.isArray(document)) {
42
+ return { unclaimed: [] };
43
+ }
44
+ const claimed = new Set(declarations.map((d) => d.namespace));
45
+ const unclaimed = [];
46
+ for (const key of Object.keys(document)) {
47
+ if (claimed.has(key))
48
+ continue;
49
+ let suggestion;
50
+ let best = SUGGESTION_MAX_DISTANCE + 1;
51
+ for (const candidate of claimed) {
52
+ const d = boundedEditDistance(key, candidate, SUGGESTION_MAX_DISTANCE);
53
+ if (d < best) {
54
+ best = d;
55
+ suggestion = candidate;
56
+ }
57
+ }
58
+ unclaimed.push({ namespace: key, ...(suggestion === undefined ? {} : { suggestion }) });
59
+ }
60
+ return { unclaimed };
61
+ }
62
+ //# sourceMappingURL=namespace-claims.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"namespace-claims.js","sourceRoot":"","sources":["../src/namespace-claims.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAgBH;;;GAGG;AACH,SAAS,mBAAmB,CAAC,CAAS,EAAE,CAAS,EAAE,GAAW;IAC5D,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG;QAAE,OAAO,GAAG,GAAG,CAAC,CAAC;IACxD,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAC7D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE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,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAyB,EAAE,CAAC;IAC3C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxC,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,SAAS;QAC/B,IAAI,UAA8B,CAAC;QACnC,IAAI,IAAI,GAAG,uBAAuB,GAAG,CAAC,CAAC;QACvC,KAAK,MAAM,SAAS,IAAI,OAAO,EAAE,CAAC;YAChC,MAAM,CAAC,GAAG,mBAAmB,CAAC,GAAG,EAAE,SAAS,EAAE,uBAAuB,CAAC,CAAC;YACvE,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC;gBACb,IAAI,GAAG,CAAC,CAAC;gBACT,UAAU,GAAG,SAAS,CAAC;YACzB,CAAC;QACH,CAAC;QACD,SAAS,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1F,CAAC;IACD,OAAO,EAAE,SAAS,EAAE,CAAC;AACvB,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * precedence — resolves the effective configuration from layered sources.
3
+ *
4
+ * Precedence, highest-wins, per namespace/key:
5
+ *
6
+ * flag > env > file > defaults
7
+ *
8
+ * - `defaults` — each declaration's `defaults` (lowest precedence).
9
+ * - `file` — the validated `opensip-cli.config.yml` document.
10
+ * - `env` — values read from environment variables via each
11
+ * declaration's `env` bindings, coerced per binding `type`.
12
+ * - `flags` — CLI-supplied overrides (highest precedence).
13
+ *
14
+ * Resolution is per-key within each namespace: a flag for `fitness.recipe` does
15
+ * not clobber a file-supplied `fitness.failOnErrors`. Sources are plain
16
+ * `namespace -> { key -> value }` maps; the resolver deep-merges them in
17
+ * precedence order.
18
+ */
19
+ import type { ToolConfigDeclaration } from './declaration.js';
20
+ /** A `namespace -> { key -> value }` map for one precedence source. */
21
+ type NamespaceMap = Record<string, Record<string, unknown>>;
22
+ /** Inputs to {@link resolveConfig}. All sources are optional. */
23
+ export interface ResolveConfigInput {
24
+ /** The tool declarations (supply `defaults` + `env` bindings). */
25
+ readonly declarations: readonly ToolConfigDeclaration[];
26
+ /** Highest-precedence overrides, e.g. parsed CLI flags. */
27
+ readonly flags?: NamespaceMap;
28
+ /** Raw environment map, typically `process.env`. */
29
+ readonly env?: Readonly<Record<string, string | undefined>>;
30
+ /** The validated config file document (namespace blocks). */
31
+ readonly file?: NamespaceMap;
32
+ }
33
+ /** The resolved configuration: `namespace -> { key -> value }`. */
34
+ export type ResolvedConfig = Record<string, Record<string, unknown>>;
35
+ /**
36
+ * Resolve the effective config by merging sources in precedence order.
37
+ *
38
+ * Only namespaces that appear in `declarations` are resolved (unclaimed
39
+ * top-level keys are not this resolver's concern — they pass through the
40
+ * composer untouched). For each declared namespace the resolver merges, in
41
+ * ascending precedence: declaration defaults → file block → env bindings →
42
+ * flags. A later source's key overrides an earlier source's same key; keys only
43
+ * present in an earlier source are preserved.
44
+ */
45
+ export declare function resolveConfig(input: ResolveConfigInput): ResolvedConfig;
46
+ export {};
47
+ //# sourceMappingURL=precedence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"precedence.d.ts","sourceRoot":"","sources":["../src/precedence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAGV,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAE1B,uEAAuE;AACvE,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAE5D,iEAAiE;AACjE,MAAM,WAAW,kBAAkB;IACjC,kEAAkE;IAClE,QAAQ,CAAC,YAAY,EAAE,SAAS,qBAAqB,EAAE,CAAC;IACxD,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IAC9B,oDAAoD;IACpD,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IAC5D,6DAA6D;IAC7D,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;CAC9B;AAED,mEAAmE;AACnE,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAsDrE;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,cAAc,CA2BvE"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * precedence — resolves the effective configuration from layered sources.
3
+ *
4
+ * Precedence, highest-wins, per namespace/key:
5
+ *
6
+ * flag > env > file > defaults
7
+ *
8
+ * - `defaults` — each declaration's `defaults` (lowest precedence).
9
+ * - `file` — the validated `opensip-cli.config.yml` document.
10
+ * - `env` — values read from environment variables via each
11
+ * declaration's `env` bindings, coerced per binding `type`.
12
+ * - `flags` — CLI-supplied overrides (highest precedence).
13
+ *
14
+ * Resolution is per-key within each namespace: a flag for `fitness.recipe` does
15
+ * not clobber a file-supplied `fitness.failOnErrors`. Sources are plain
16
+ * `namespace -> { key -> value }` maps; the resolver deep-merges them in
17
+ * precedence order.
18
+ */
19
+ /** Accepted truthy / falsy spellings for a `boolean` env binding (case-insensitive). */
20
+ const BOOLEAN_TRUE = new Set(['true', '1']);
21
+ const BOOLEAN_FALSE = new Set(['false', '0']);
22
+ /** Coerce a raw env string for a `boolean` binding; undefined drops an unrecognised value. */
23
+ function coerceBoolean(raw) {
24
+ const v = raw.trim().toLowerCase();
25
+ if (BOOLEAN_TRUE.has(v))
26
+ return true;
27
+ if (BOOLEAN_FALSE.has(v))
28
+ return false;
29
+ return undefined;
30
+ }
31
+ /** Coerce a raw env string per its binding `type`; return undefined to drop it. */
32
+ function coerceEnvValue(raw, type) {
33
+ switch (type) {
34
+ case 'number': {
35
+ const trimmed = raw.trim();
36
+ if (trimmed.length === 0)
37
+ return undefined; // empty or whitespace → treat as unset (prevents CI footguns like FAIL_ON_ERRORS=${UNSET} becoming 0)
38
+ const n = Number(trimmed);
39
+ return Number.isFinite(n) ? n : undefined;
40
+ }
41
+ case 'boolean': {
42
+ return coerceBoolean(raw);
43
+ }
44
+ case 'string':
45
+ case undefined: {
46
+ return raw;
47
+ }
48
+ }
49
+ }
50
+ /** Project a declaration's env bindings into a `{ key -> coerced value }` map. */
51
+ function readEnvBindings(bindings, env) {
52
+ const out = {};
53
+ if (!bindings)
54
+ return out;
55
+ for (const binding of bindings) {
56
+ const raw = env[binding.envVar];
57
+ if (raw === undefined)
58
+ continue;
59
+ const coerced = coerceEnvValue(raw, binding.type);
60
+ if (coerced !== undefined)
61
+ out[binding.key] = coerced;
62
+ }
63
+ return out;
64
+ }
65
+ /** A plain object check that treats arrays and null as non-objects. */
66
+ function isPlainObject(v) {
67
+ return typeof v === 'object' && v !== null && !Array.isArray(v);
68
+ }
69
+ /**
70
+ * Resolve the effective config by merging sources in precedence order.
71
+ *
72
+ * Only namespaces that appear in `declarations` are resolved (unclaimed
73
+ * top-level keys are not this resolver's concern — they pass through the
74
+ * composer untouched). For each declared namespace the resolver merges, in
75
+ * ascending precedence: declaration defaults → file block → env bindings →
76
+ * flags. A later source's key overrides an earlier source's same key; keys only
77
+ * present in an earlier source are preserved.
78
+ */
79
+ export function resolveConfig(input) {
80
+ const { declarations, flags = {}, env = {}, file = {} } = input;
81
+ const resolved = {};
82
+ for (const decl of declarations) {
83
+ const ns = decl.namespace;
84
+ const merged = {};
85
+ // 1. defaults (lowest)
86
+ if (isPlainObject(decl.defaults)) {
87
+ Object.assign(merged, decl.defaults);
88
+ }
89
+ // 2. file
90
+ if (isPlainObject(file[ns])) {
91
+ Object.assign(merged, file[ns]);
92
+ }
93
+ // 3. env bindings
94
+ Object.assign(merged, readEnvBindings(decl.env, env));
95
+ // 4. flags (highest)
96
+ if (isPlainObject(flags[ns])) {
97
+ Object.assign(merged, flags[ns]);
98
+ }
99
+ resolved[ns] = merged;
100
+ }
101
+ return resolved;
102
+ }
103
+ //# sourceMappingURL=precedence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"precedence.js","sourceRoot":"","sources":["../src/precedence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AA0BH,wFAAwF;AACxF,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;AAC5C,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;AAE9C,8FAA8F;AAC9F,SAAS,aAAa,CAAC,GAAW;IAChC,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACnC,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACrC,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACvC,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,mFAAmF;AACnF,SAAS,cAAc,CAAC,GAAW,EAAE,IAAgC;IACnE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,QAAQ,CAAC,CAAC,CAAC;YACd,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;YAC3B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,SAAS,CAAC,CAAC,sGAAsG;YAClJ,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;YAC1B,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC5C,CAAC;Q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EAAE,CAAC;QAE3C,uBAAuB;QACvB,IAAI,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACjC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC;QACD,UAAU;QACV,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;YAC5B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;QAClC,CAAC;QACD,kBAAkB;QAClB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;QACtD,qBAAqB;QACrB,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;YAC7B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;QACnC,CAAC;QAED,QAAQ,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@opensip-cli/config",
3
+ "version": "0.1.0",
4
+ "license": "Apache-2.0",
5
+ "description": "Configuration layer for OpenSIP CLI — the capability-configuration composer and schema registry",
6
+ "keywords": [
7
+ "opensip-cli",
8
+ "static-analysis",
9
+ "code-quality"
10
+ ],
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/opensip-ai/opensip-cli.git",
14
+ "directory": "packages/config"
15
+ },
16
+ "homepage": "https://github.com/opensip-ai/opensip-cli",
17
+ "bugs": {
18
+ "url": "https://github.com/opensip-ai/opensip-cli/issues"
19
+ },
20
+ "type": "module",
21
+ "main": "./dist/index.js",
22
+ "types": "./dist/index.d.ts",
23
+ "exports": {
24
+ ".": "./dist/index.js"
25
+ },
26
+ "files": [
27
+ "dist",
28
+ "LICENSE",
29
+ "NOTICE"
30
+ ],
31
+ "dependencies": {
32
+ "yaml": "^2.9.0",
33
+ "zod": "^4.4.3",
34
+ "@opensip-cli/core": "0.1.0"
35
+ },
36
+ "devDependencies": {
37
+ "@types/node": "^24.13.2",
38
+ "typescript": "~6.0.3",
39
+ "vitest": "^4.1.8"
40
+ },
41
+ "scripts": {
42
+ "build": "tsc",
43
+ "test": "vitest run --passWithNoTests",
44
+ "typecheck": "tsc --noEmit",
45
+ "clean": "rm -rf dist"
46
+ }
47
+ }