@agent-teams/engineering-foundation 0.1.0 → 0.2.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 (96) hide show
  1. package/README.md +20 -15
  2. package/dist/capabilities/workspace-dependency-declarations/adapters/outbound/pnpm-workspace/pnpm-workspace-reader.d.ts +6 -0
  3. package/dist/capabilities/workspace-dependency-declarations/adapters/outbound/pnpm-workspace/pnpm-workspace-reader.d.ts.map +1 -0
  4. package/dist/capabilities/workspace-dependency-declarations/adapters/outbound/pnpm-workspace/pnpm-workspace-reader.js +199 -0
  5. package/dist/capabilities/workspace-dependency-declarations/adapters/outbound/pnpm-workspace/pnpm-workspace-reader.js.map +1 -0
  6. package/dist/capabilities/workspace-dependency-declarations/application/model/workspace-snapshot.d.ts +27 -0
  7. package/dist/capabilities/workspace-dependency-declarations/application/model/workspace-snapshot.d.ts.map +1 -0
  8. package/dist/capabilities/workspace-dependency-declarations/application/model/workspace-snapshot.js +7 -0
  9. package/dist/capabilities/workspace-dependency-declarations/application/model/workspace-snapshot.js.map +1 -0
  10. package/dist/capabilities/workspace-dependency-declarations/application/policies/evaluate-workspace-dependencies.d.ts +5 -0
  11. package/dist/capabilities/workspace-dependency-declarations/application/policies/evaluate-workspace-dependencies.d.ts.map +1 -0
  12. package/dist/capabilities/workspace-dependency-declarations/application/policies/evaluate-workspace-dependencies.js +219 -0
  13. package/dist/capabilities/workspace-dependency-declarations/application/policies/evaluate-workspace-dependencies.js.map +1 -0
  14. package/dist/capabilities/workspace-dependency-declarations/application/ports/workspace-reader.d.ts +5 -0
  15. package/dist/capabilities/workspace-dependency-declarations/application/ports/workspace-reader.d.ts.map +1 -0
  16. package/dist/capabilities/workspace-dependency-declarations/application/ports/workspace-reader.js +2 -0
  17. package/dist/capabilities/workspace-dependency-declarations/application/ports/workspace-reader.js.map +1 -0
  18. package/dist/capabilities/workspace-dependency-declarations/application/rules.d.ts +26 -0
  19. package/dist/capabilities/workspace-dependency-declarations/application/rules.d.ts.map +1 -0
  20. package/dist/capabilities/workspace-dependency-declarations/application/rules.js +28 -0
  21. package/dist/capabilities/workspace-dependency-declarations/application/rules.js.map +1 -0
  22. package/dist/capabilities/workspace-dependency-declarations/contract/config.d.ts +19 -0
  23. package/dist/capabilities/workspace-dependency-declarations/contract/config.d.ts.map +1 -0
  24. package/dist/capabilities/workspace-dependency-declarations/contract/config.js +10 -0
  25. package/dist/capabilities/workspace-dependency-declarations/contract/config.js.map +1 -0
  26. package/dist/capabilities/workspace-dependency-declarations/module.d.ts +3 -0
  27. package/dist/capabilities/workspace-dependency-declarations/module.d.ts.map +1 -0
  28. package/dist/capabilities/workspace-dependency-declarations/module.js +45 -0
  29. package/dist/capabilities/workspace-dependency-declarations/module.js.map +1 -0
  30. package/dist/capability-runtime.d.ts +34 -0
  31. package/dist/capability-runtime.d.ts.map +1 -0
  32. package/dist/capability-runtime.js +86 -0
  33. package/dist/capability-runtime.js.map +1 -0
  34. package/dist/check-contract.d.ts +56 -0
  35. package/dist/check-contract.d.ts.map +1 -0
  36. package/dist/check-contract.js +2 -0
  37. package/dist/check-contract.js.map +1 -0
  38. package/dist/check-runner.d.ts +11 -0
  39. package/dist/check-runner.d.ts.map +1 -0
  40. package/dist/check-runner.js +70 -0
  41. package/dist/check-runner.js.map +1 -0
  42. package/dist/cli.js +73 -8
  43. package/dist/cli.js.map +1 -1
  44. package/dist/composition/capability-registry.d.ts +3 -0
  45. package/dist/composition/capability-registry.d.ts.map +1 -0
  46. package/dist/composition/capability-registry.js +6 -0
  47. package/dist/composition/capability-registry.js.map +1 -0
  48. package/dist/foundation-config.d.ts +15 -0
  49. package/dist/foundation-config.d.ts.map +1 -0
  50. package/dist/foundation-config.js +10 -0
  51. package/dist/foundation-config.js.map +1 -0
  52. package/dist/index.d.ts +0 -2
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +0 -1
  55. package/dist/index.js.map +1 -1
  56. package/dist/local-mode/consumer-policy.d.ts +0 -1
  57. package/dist/local-mode/consumer-policy.d.ts.map +1 -1
  58. package/dist/local-mode/consumer-policy.js +1 -4
  59. package/dist/local-mode/consumer-policy.js.map +1 -1
  60. package/dist/local-mode/inspection.d.ts +1 -1
  61. package/dist/local-mode/inspection.d.ts.map +1 -1
  62. package/dist/local-mode/inspection.js +1 -1
  63. package/dist/local-mode/inspection.js.map +1 -1
  64. package/dist/local-mode/service.js +2 -1
  65. package/dist/local-mode/service.js.map +1 -1
  66. package/dist/package-self-check.d.ts.map +1 -1
  67. package/dist/package-self-check.js +11 -4
  68. package/dist/package-self-check.js.map +1 -1
  69. package/dist/report-renderer.d.ts +3 -0
  70. package/dist/report-renderer.d.ts.map +1 -0
  71. package/dist/report-renderer.js +31 -0
  72. package/dist/report-renderer.js.map +1 -0
  73. package/dist/schema-catalog.d.ts +7 -0
  74. package/dist/schema-catalog.d.ts.map +1 -0
  75. package/dist/schema-catalog.js +58 -0
  76. package/dist/schema-catalog.js.map +1 -0
  77. package/dist/semantic-version.d.ts +2 -0
  78. package/dist/semantic-version.d.ts.map +1 -0
  79. package/dist/semantic-version.js +5 -0
  80. package/dist/semantic-version.js.map +1 -0
  81. package/dist/strict-yaml.d.ts +6 -0
  82. package/dist/strict-yaml.d.ts.map +1 -0
  83. package/dist/strict-yaml.js +99 -0
  84. package/dist/strict-yaml.js.map +1 -0
  85. package/package.json +6 -1
  86. package/presets/oxlint/base.json +39 -0
  87. package/presets/oxlint/node.json +8 -0
  88. package/presets/typescript/base.json +17 -0
  89. package/presets/typescript/node.json +9 -0
  90. package/schemas/foundation-check-report/v1.schema.json +138 -0
  91. package/schemas/foundation-config/v1.schema.json +49 -0
  92. package/schemas/workspace-dependency-declarations/v1.schema.json +61 -0
  93. package/dist/config.d.ts +0 -18
  94. package/dist/config.d.ts.map +0 -1
  95. package/dist/config.js +0 -106
  96. package/dist/config.js.map +0 -1
@@ -0,0 +1,99 @@
1
+ import { readFile, realpath, stat } from "node:fs/promises";
2
+ import { isAbsolute, relative, resolve, sep } from "node:path";
3
+ import { isAlias, isMap, isNode, isPair, parseDocument, visit } from "yaml";
4
+ import { CapabilityInputError } from "./capability-runtime.js";
5
+ const MAX_CONFIG_BYTES = 1024 * 1024;
6
+ function inputError(code, message, phase) {
7
+ throw new CapabilityInputError({ code, message, phase, retryable: false });
8
+ }
9
+ export function assertNotCancelled(signal) {
10
+ if (signal?.aborted === true) {
11
+ throw new CapabilityInputError({
12
+ code: "EXECUTION_CANCELLED",
13
+ message: "Foundation check was cancelled.",
14
+ phase: "execution",
15
+ retryable: false
16
+ });
17
+ }
18
+ }
19
+ export function assertRepositoryRelativePath(path, phase) {
20
+ const segments = path.split("/");
21
+ if (path.length === 0 ||
22
+ isAbsolute(path) ||
23
+ path.includes("\\") ||
24
+ segments.some((segment) => segment === "" || segment === "." || segment === "..")) {
25
+ inputError("CONFIG_PATH_INVALID", "Configuration paths must be normalized repository-relative POSIX paths.", phase);
26
+ }
27
+ }
28
+ export async function resolveContainedFile(consumerRoot, repositoryPath, phase) {
29
+ assertRepositoryRelativePath(repositoryPath, phase);
30
+ const canonicalRoot = await realpath(consumerRoot);
31
+ const candidate = resolve(canonicalRoot, repositoryPath);
32
+ let canonicalCandidate;
33
+ try {
34
+ canonicalCandidate = await realpath(candidate);
35
+ }
36
+ catch {
37
+ inputError("CONFIG_FILE_UNAVAILABLE", `Required configuration file is unavailable: ${repositoryPath}.`, phase);
38
+ }
39
+ const relation = relative(canonicalRoot, canonicalCandidate);
40
+ if (relation === ".." || relation.startsWith(`..${sep}`) || isAbsolute(relation)) {
41
+ inputError("CONFIG_PATH_ESCAPE", `Configuration path escapes the consumer repository: ${repositoryPath}.`, phase);
42
+ }
43
+ const metadata = await stat(canonicalCandidate);
44
+ if (!metadata.isFile() || metadata.size > MAX_CONFIG_BYTES) {
45
+ inputError("CONFIG_FILE_INVALID", `Configuration file must be a regular file no larger than ${MAX_CONFIG_BYTES} bytes: ${repositoryPath}.`, phase);
46
+ }
47
+ return canonicalCandidate;
48
+ }
49
+ export function parseStrictYaml(source, phase) {
50
+ const document = parseDocument(source, {
51
+ customTags: [],
52
+ merge: false,
53
+ schema: "core",
54
+ uniqueKeys: true
55
+ });
56
+ if (document.errors.length > 0 || document.warnings.length > 0) {
57
+ const problem = [...document.errors, ...document.warnings]
58
+ .slice(0, 8)
59
+ .map((error) => error.message)
60
+ .join("; ")
61
+ .slice(0, 1000);
62
+ inputError("YAML_INVALID", problem || "YAML input is invalid.", phase);
63
+ }
64
+ let forbidden;
65
+ visit(document, (_key, node) => {
66
+ if (isAlias(node)) {
67
+ forbidden = "YAML aliases are prohibited.";
68
+ return visit.BREAK;
69
+ }
70
+ if (isNode(node) && (node.anchor !== undefined || node.tag !== undefined)) {
71
+ forbidden = "YAML anchors and explicit tags are prohibited.";
72
+ return visit.BREAK;
73
+ }
74
+ if (isPair(node) &&
75
+ isNode(node.key) &&
76
+ "value" in node.key &&
77
+ node.key.value === "<<") {
78
+ forbidden = "YAML merge keys are prohibited.";
79
+ return visit.BREAK;
80
+ }
81
+ if (isMap(node) && node.items.length > 10_000) {
82
+ forbidden = "YAML mapping exceeds the supported size limit.";
83
+ return visit.BREAK;
84
+ }
85
+ return;
86
+ });
87
+ if (forbidden !== undefined) {
88
+ inputError("YAML_FEATURE_PROHIBITED", forbidden, phase);
89
+ }
90
+ return document.toJS({ maxAliasCount: 0 });
91
+ }
92
+ export async function loadStrictYamlFile(consumerRoot, repositoryPath, phase, signal) {
93
+ assertNotCancelled(signal);
94
+ const path = await resolveContainedFile(consumerRoot, repositoryPath, phase);
95
+ const source = await readFile(path, "utf8");
96
+ assertNotCancelled(signal);
97
+ return parseStrictYaml(source, phase);
98
+ }
99
+ //# sourceMappingURL=strict-yaml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strict-yaml.js","sourceRoot":"","sources":["../src/strict-yaml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAk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CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC;YAC9C,SAAS,GAAG,gDAAgD,CAAC;YAC7D,OAAO,KAAK,CAAC,KAAK,CAAC;QACrB,CAAC;QACD,OAAO;IACT,CAAC,CAAC,CAAC;IACH,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,UAAU,CAAC,yBAAyB,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAY,CAAC;AACxD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,YAAoB,EACpB,cAAsB,EACtB,KAAa,EACb,MAAoB;IAEpB,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC3B,MAAM,IAAI,GAAG,MAAM,oBAAoB,CAAC,YAAY,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;IAC7E,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5C,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACxC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-teams/engineering-foundation",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Versioned engineering policy, tooling, and conformance for Agent Teams repositories.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -17,10 +17,14 @@
17
17
  "types": "./dist/local-mode/index.d.ts",
18
18
  "import": "./dist/local-mode/index.js"
19
19
  },
20
+ "./schemas/*": "./schemas/*",
21
+ "./presets/*": "./presets/*",
20
22
  "./package.json": "./package.json"
21
23
  },
22
24
  "files": [
23
25
  "dist",
26
+ "presets",
27
+ "schemas",
24
28
  "LICENSE",
25
29
  "README.md"
26
30
  ],
@@ -50,6 +54,7 @@
50
54
  ]
51
55
  },
52
56
  "dependencies": {
57
+ "ajv": "8.20.0",
53
58
  "proper-lockfile": "4.1.2",
54
59
  "yaml": "2.9.0"
55
60
  }
@@ -0,0 +1,39 @@
1
+ {
2
+ "categories": {
3
+ "correctness": "error",
4
+ "suspicious": "error"
5
+ },
6
+ "options": {
7
+ "reportUnusedDisableDirectives": "error",
8
+ "respectEslintDisableDirectives": false,
9
+ "typeAware": false,
10
+ "typeCheck": false
11
+ },
12
+ "plugins": [
13
+ "eslint",
14
+ "typescript",
15
+ "oxc",
16
+ "unicorn",
17
+ "import",
18
+ "promise"
19
+ ],
20
+ "rules": {
21
+ "array-callback-return": "error",
22
+ "curly": "error",
23
+ "eqeqeq": "error",
24
+ "import/no-duplicates": "error",
25
+ "import/no-mutable-exports": "error",
26
+ "import/no-self-import": "error",
27
+ "no-eval": "error",
28
+ "no-implied-eval": "error",
29
+ "no-new-func": "error",
30
+ "no-promise-executor-return": "error",
31
+ "no-prototype-builtins": "error",
32
+ "oxc/no-accumulating-spread": "error",
33
+ "promise/no-return-wrap": "error",
34
+ "promise/param-names": "error",
35
+ "unicorn/error-message": "error",
36
+ "unicorn/no-abusive-eslint-disable": "error",
37
+ "unicorn/no-useless-undefined": "error"
38
+ }
39
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": ["./base.json"],
3
+ "plugins": ["node"],
4
+ "rules": {
5
+ "node/no-path-concat": "error",
6
+ "unicorn/prefer-node-protocol": "error"
7
+ }
8
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowUnreachableCode": false,
4
+ "allowUnusedLabels": false,
5
+ "exactOptionalPropertyTypes": true,
6
+ "forceConsistentCasingInFileNames": true,
7
+ "moduleDetection": "force",
8
+ "noFallthroughCasesInSwitch": true,
9
+ "noImplicitOverride": true,
10
+ "noImplicitReturns": true,
11
+ "noUncheckedIndexedAccess": true,
12
+ "noUncheckedSideEffectImports": true,
13
+ "strict": true,
14
+ "useUnknownInCatchVariables": true,
15
+ "verbatimModuleSyntax": true
16
+ }
17
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "./base.json",
3
+ "compilerOptions": {
4
+ "lib": ["ES2024"],
5
+ "module": "NodeNext",
6
+ "moduleResolution": "NodeNext",
7
+ "target": "ES2024"
8
+ }
9
+ }
@@ -0,0 +1,138 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-teams.ai/engineering-foundation/foundation-check-report/v1",
4
+ "title": "Agent Teams Engineering Foundation check report",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "reportSchemaVersion",
9
+ "foundationVersion",
10
+ "coverage",
11
+ "outcome",
12
+ "summary",
13
+ "capabilities"
14
+ ],
15
+ "properties": {
16
+ "reportSchemaVersion": { "const": 1 },
17
+ "foundationVersion": { "type": "string" },
18
+ "coverage": { "const": "full" },
19
+ "outcome": { "$ref": "#/$defs/outcome" },
20
+ "summary": { "$ref": "#/$defs/summary" },
21
+ "capabilities": {
22
+ "type": "array",
23
+ "items": { "$ref": "#/$defs/capabilityReport" }
24
+ },
25
+ "problem": { "$ref": "#/$defs/problem" }
26
+ },
27
+ "$defs": {
28
+ "outcome": {
29
+ "enum": ["passed", "violations", "invalid-input", "failed", "cancelled"]
30
+ },
31
+ "severity": {
32
+ "enum": ["error", "warning", "info"]
33
+ },
34
+ "summary": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": ["errors", "warnings", "infos"],
38
+ "properties": {
39
+ "errors": { "type": "integer", "minimum": 0 },
40
+ "warnings": { "type": "integer", "minimum": 0 },
41
+ "infos": { "type": "integer", "minimum": 0 }
42
+ }
43
+ },
44
+ "position": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": ["line", "column"],
48
+ "properties": {
49
+ "line": { "type": "integer", "minimum": 1 },
50
+ "column": { "type": "integer", "minimum": 1 }
51
+ }
52
+ },
53
+ "location": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": ["path"],
57
+ "properties": {
58
+ "path": { "type": "string", "minLength": 1 },
59
+ "start": { "$ref": "#/$defs/position" },
60
+ "end": { "$ref": "#/$defs/position" }
61
+ }
62
+ },
63
+ "evidence": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": ["kind", "value"],
67
+ "properties": {
68
+ "kind": { "type": "string", "minLength": 1 },
69
+ "value": { "type": "string", "maxLength": 500 }
70
+ }
71
+ },
72
+ "diagnostic": {
73
+ "type": "object",
74
+ "additionalProperties": false,
75
+ "required": [
76
+ "ruleId",
77
+ "severity",
78
+ "subject",
79
+ "message",
80
+ "location",
81
+ "relatedLocations",
82
+ "evidence",
83
+ "remediation",
84
+ "requiresArchitectureReview"
85
+ ],
86
+ "properties": {
87
+ "ruleId": { "type": "string", "minLength": 1 },
88
+ "severity": { "$ref": "#/$defs/severity" },
89
+ "subject": { "type": "string", "minLength": 1 },
90
+ "message": { "type": "string", "minLength": 1, "maxLength": 1000 },
91
+ "location": { "$ref": "#/$defs/location" },
92
+ "relatedLocations": {
93
+ "type": "array",
94
+ "items": { "$ref": "#/$defs/location" }
95
+ },
96
+ "evidence": {
97
+ "type": "array",
98
+ "items": { "$ref": "#/$defs/evidence" }
99
+ },
100
+ "remediation": { "type": "string", "minLength": 1, "maxLength": 1000 },
101
+ "requiresArchitectureReview": { "type": "boolean" }
102
+ }
103
+ },
104
+ "problem": {
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "required": ["code", "message", "phase", "retryable"],
108
+ "properties": {
109
+ "code": { "type": "string", "minLength": 1 },
110
+ "message": { "type": "string", "minLength": 1, "maxLength": 1000 },
111
+ "phase": { "type": "string", "minLength": 1 },
112
+ "retryable": { "type": "boolean" }
113
+ }
114
+ },
115
+ "capabilityReport": {
116
+ "type": "object",
117
+ "additionalProperties": false,
118
+ "required": [
119
+ "capabilityId",
120
+ "capabilityConfigSchemaVersion",
121
+ "outcome",
122
+ "summary",
123
+ "diagnostics"
124
+ ],
125
+ "properties": {
126
+ "capabilityId": { "type": "string", "minLength": 1 },
127
+ "capabilityConfigSchemaVersion": { "type": "integer", "minimum": 1 },
128
+ "outcome": { "$ref": "#/$defs/outcome" },
129
+ "summary": { "$ref": "#/$defs/summary" },
130
+ "diagnostics": {
131
+ "type": "array",
132
+ "items": { "$ref": "#/$defs/diagnostic" }
133
+ },
134
+ "problem": { "$ref": "#/$defs/problem" }
135
+ }
136
+ }
137
+ }
138
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-teams.ai/engineering-foundation/foundation-config/v1",
4
+ "title": "Agent Teams Engineering Foundation configuration",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "project", "capabilities"],
8
+ "properties": {
9
+ "schemaVersion": {
10
+ "const": 1
11
+ },
12
+ "project": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": ["id"],
16
+ "properties": {
17
+ "id": {
18
+ "type": "string",
19
+ "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
20
+ }
21
+ }
22
+ },
23
+ "capabilities": {
24
+ "type": "object",
25
+ "additionalProperties": false,
26
+ "minProperties": 1,
27
+ "properties": {
28
+ "workspace.dependency-declarations": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": ["configPath"],
32
+ "properties": {
33
+ "configPath": {
34
+ "$ref": "#/$defs/repositoryRelativeYamlPath"
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ },
41
+ "$defs": {
42
+ "repositoryRelativeYamlPath": {
43
+ "type": "string",
44
+ "minLength": 1,
45
+ "maxLength": 240,
46
+ "pattern": "^(?!/)(?!.*\\\\)(?!.*(?:^|/)\\.\\.(?:/|$)).+\\.ya?ml$"
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-teams.ai/engineering-foundation/workspace-dependency-declarations/v1",
4
+ "title": "Workspace dependency declarations capability configuration",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "packageManager", "policies"],
8
+ "properties": {
9
+ "schemaVersion": { "const": 1 },
10
+ "packageManager": {
11
+ "type": "object",
12
+ "additionalProperties": false,
13
+ "required": ["kind", "workspaceManifest"],
14
+ "properties": {
15
+ "kind": { "const": "pnpm" },
16
+ "workspaceManifest": { "const": "pnpm-workspace.yaml" }
17
+ }
18
+ },
19
+ "policies": {
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "required": [
23
+ "externalDependencies",
24
+ "catalogVersions",
25
+ "internalDependencies",
26
+ "reservedScopes",
27
+ "developmentOnlyPackages",
28
+ "exactRegistryDevelopmentOnlyPackages"
29
+ ],
30
+ "properties": {
31
+ "externalDependencies": { "const": "catalog" },
32
+ "catalogVersions": { "const": "exact" },
33
+ "internalDependencies": { "const": "workspace-protocol" },
34
+ "reservedScopes": {
35
+ "type": "array",
36
+ "uniqueItems": true,
37
+ "items": {
38
+ "type": "string",
39
+ "pattern": "^@[a-z0-9][a-z0-9._-]*/$"
40
+ }
41
+ },
42
+ "developmentOnlyPackages": {
43
+ "type": "array",
44
+ "uniqueItems": true,
45
+ "items": {
46
+ "type": "string",
47
+ "pattern": "^(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*$"
48
+ }
49
+ },
50
+ "exactRegistryDevelopmentOnlyPackages": {
51
+ "type": "array",
52
+ "uniqueItems": true,
53
+ "items": {
54
+ "type": "string",
55
+ "pattern": "^(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*$"
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
package/dist/config.d.ts DELETED
@@ -1,18 +0,0 @@
1
- export declare const FOUNDATION_CONFIG_SCHEMA_VERSION: 1;
2
- export declare const FOUNDATION_CAPABILITIES: readonly ["architecture", "documentation", "lint", "reliability", "security"];
3
- export declare const FOUNDATION_PROJECT_KINDS: readonly ["client", "runtime", "service", "tooling"];
4
- export type FoundationCapabilityName = (typeof FOUNDATION_CAPABILITIES)[number];
5
- export type FoundationProjectKind = (typeof FOUNDATION_PROJECT_KINDS)[number];
6
- export interface FoundationCapabilityConfig {
7
- readonly enabled: boolean;
8
- readonly configPath?: string;
9
- }
10
- export interface FoundationConfig {
11
- readonly schemaVersion: typeof FOUNDATION_CONFIG_SCHEMA_VERSION;
12
- readonly projectId: string;
13
- readonly projectKind: FoundationProjectKind;
14
- readonly capabilities: Readonly<Partial<Record<FoundationCapabilityName, FoundationCapabilityConfig>>>;
15
- }
16
- export declare function parseFoundationConfig(input: unknown): FoundationConfig;
17
- export declare function defineFoundationConfig(input: FoundationConfig): FoundationConfig;
18
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gCAAgC,EAAG,CAAU,CAAC;AAE3D,eAAO,MAAM,uBAAuB,YAClC,cAAc,EACd,eAAe,EACf,MAAM,EACN,aAAa,EACb,UAAU,CACF,CAAC;AAEX,eAAO,MAAM,wBAAwB,YACnC,QAAQ,EACR,SAAS,EACT,SAAS,EACT,SAAS,CACD,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAChF,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,aAAa,EAAE,OAAO,gCAAgC,CAAC;IAChE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,qBAAqB,CAAC;IAC5C,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAC7B,OAAO,CAAC,MAAM,CAAC,wBAAwB,EAAE,0BAA0B,CAAC,CAAC,CACtE,CAAC;CACH;AAiGD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAkDtE;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,gBAAgB,GACtB,gBAAgB,CAElB"}
package/dist/config.js DELETED
@@ -1,106 +0,0 @@
1
- import { isAbsolute, normalize, sep } from "node:path";
2
- import { FoundationError } from "./errors.js";
3
- export const FOUNDATION_CONFIG_SCHEMA_VERSION = 1;
4
- export const FOUNDATION_CAPABILITIES = [
5
- "architecture",
6
- "documentation",
7
- "lint",
8
- "reliability",
9
- "security"
10
- ];
11
- export const FOUNDATION_PROJECT_KINDS = [
12
- "client",
13
- "runtime",
14
- "service",
15
- "tooling"
16
- ];
17
- const PROJECT_ID_PATTERN = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
18
- function isRecord(value) {
19
- return typeof value === "object" && value !== null && !Array.isArray(value);
20
- }
21
- function isProjectKind(value) {
22
- return (typeof value === "string" &&
23
- FOUNDATION_PROJECT_KINDS.some((candidate) => candidate === value));
24
- }
25
- function isCapabilityName(value) {
26
- return FOUNDATION_CAPABILITIES.some((candidate) => candidate === value);
27
- }
28
- function validateConfigPath(value, capability) {
29
- if (value === undefined) {
30
- return undefined;
31
- }
32
- if (typeof value !== "string" || value.length === 0) {
33
- throw new FoundationError("CONFIG_INVALID", `Capability ${capability} configPath must be a non-empty relative path.`);
34
- }
35
- const normalized = normalize(value);
36
- if (isAbsolute(value) ||
37
- normalized === ".." ||
38
- normalized.startsWith(`..${sep}`)) {
39
- throw new FoundationError("CONFIG_INVALID", `Capability ${capability} configPath cannot escape the consumer repository.`);
40
- }
41
- return value;
42
- }
43
- function parseCapabilities(value) {
44
- if (!isRecord(value)) {
45
- throw new FoundationError("CONFIG_INVALID", "Foundation capabilities must be an object.");
46
- }
47
- const entries = Object.entries(value);
48
- if (entries.length === 0) {
49
- throw new FoundationError("CONFIG_INVALID", "At least one foundation capability must be declared.");
50
- }
51
- const parsed = {};
52
- for (const [name, candidate] of entries) {
53
- if (!isCapabilityName(name)) {
54
- throw new FoundationError("CONFIG_INVALID", `Unknown foundation capability: ${name}.`);
55
- }
56
- if (!isRecord(candidate) || typeof candidate.enabled !== "boolean") {
57
- throw new FoundationError("CONFIG_INVALID", `Capability ${name} must declare an enabled boolean.`);
58
- }
59
- const allowedKeys = new Set(["configPath", "enabled"]);
60
- const unknownKey = Object.keys(candidate).find((key) => !allowedKeys.has(key));
61
- if (unknownKey !== undefined) {
62
- throw new FoundationError("CONFIG_INVALID", `Capability ${name} contains unknown field: ${unknownKey}.`);
63
- }
64
- const configPath = validateConfigPath(candidate.configPath, name);
65
- parsed[name] = Object.freeze({
66
- enabled: candidate.enabled,
67
- ...(configPath === undefined ? {} : { configPath })
68
- });
69
- }
70
- return Object.freeze(parsed);
71
- }
72
- export function parseFoundationConfig(input) {
73
- if (!isRecord(input)) {
74
- throw new FoundationError("CONFIG_INVALID", "Foundation configuration must be an object.");
75
- }
76
- const allowedKeys = new Set([
77
- "capabilities",
78
- "projectId",
79
- "projectKind",
80
- "schemaVersion"
81
- ]);
82
- const unknownKey = Object.keys(input).find((key) => !allowedKeys.has(key));
83
- if (unknownKey !== undefined) {
84
- throw new FoundationError("CONFIG_INVALID", `Foundation configuration contains unknown field: ${unknownKey}.`);
85
- }
86
- if (input.schemaVersion !== FOUNDATION_CONFIG_SCHEMA_VERSION) {
87
- throw new FoundationError("CONFIG_INVALID", `Unsupported foundation schemaVersion: ${String(input.schemaVersion)}.`);
88
- }
89
- if (typeof input.projectId !== "string" ||
90
- !PROJECT_ID_PATTERN.test(input.projectId)) {
91
- throw new FoundationError("CONFIG_INVALID", "projectId must be a lowercase kebab-case identifier up to 63 characters.");
92
- }
93
- if (!isProjectKind(input.projectKind)) {
94
- throw new FoundationError("CONFIG_INVALID", `Unknown projectKind: ${String(input.projectKind)}.`);
95
- }
96
- return Object.freeze({
97
- schemaVersion: FOUNDATION_CONFIG_SCHEMA_VERSION,
98
- projectId: input.projectId,
99
- projectKind: input.projectKind,
100
- capabilities: parseCapabilities(input.capabilities)
101
- });
102
- }
103
- export function defineFoundationConfig(input) {
104
- return parseFoundationConfig(input);
105
- }
106
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAU,CAAC;AAE3D,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,cAAc;IACd,eAAe;IACf,MAAM;IACN,aAAa;IACb,UAAU;CACF,CAAC;AAEX,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,QAAQ;IACR,SAAS;IACT,SAAS;IACT,SAAS;CACD,CAAC;AAmBX,MAAM,kBAAkB,GAAG,wCAAwC,CAAC;AAEpE,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,wBAAwB,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,KAAK,KAAK,CAAC,CAClE,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,OAAO,uBAAu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