dxcomplete 0.2.1 → 0.3.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 (89) hide show
  1. package/.env.example +0 -7
  2. package/README.md +68 -103
  3. package/dist/cli.js +2 -24
  4. package/dist/validate.js +10 -26
  5. package/docs/cost-model.md +2 -2
  6. package/docs/decision-basis.md +5 -11
  7. package/docs/diagrams.md +3 -3
  8. package/docs/index.md +25 -39
  9. package/docs/model.md +15 -23
  10. package/docs/open-questions.md +1 -1
  11. package/docs/taxonomy.md +7 -8
  12. package/docs/workflows.md +3 -3
  13. package/package.json +24 -24
  14. package/templates/process/README.md +11 -11
  15. package/templates/process/controls.yml +19 -19
  16. package/templates/process/cost-model.yml +3 -3
  17. package/templates/process/decision-basis.yml +4 -4
  18. package/templates/process/diagrams/00-decision-basis.mmd +1 -1
  19. package/templates/process/diagrams/00-overview.mmd +1 -1
  20. package/templates/process/diagrams/01-intake-triage.mmd +4 -4
  21. package/templates/process/diagrams/02-product-definition.mmd +3 -3
  22. package/templates/process/diagrams/03-engineering-execution.mmd +1 -1
  23. package/templates/process/diagrams/04-qa-verification.mmd +1 -1
  24. package/templates/process/diagrams/05-product-validation.mmd +1 -1
  25. package/templates/process/diagrams/06-change-release-control.mmd +1 -1
  26. package/templates/process/diagrams/07-deployment-operations.mmd +1 -1
  27. package/templates/process/diagrams/08-support-incident-management.mmd +1 -1
  28. package/templates/process/diagrams/09-problem-improvement.mmd +1 -1
  29. package/templates/process/diagrams/10-risk-control-management.mmd +1 -1
  30. package/templates/process/diagrams/11-audit-evidence-capture.mmd +1 -1
  31. package/templates/process/roles.yml +6 -6
  32. package/templates/process/taxonomy.yml +46 -46
  33. package/templates/process/workflows.yml +29 -29
  34. package/website/account.html +57 -0
  35. package/website/app.js +177 -0
  36. package/website/flow.html +4 -0
  37. package/website/glossary.html +4 -0
  38. package/website/index.html +4 -0
  39. package/website/objects.html +4 -0
  40. package/website/operating-guide.html +4 -0
  41. package/website/outcomes.html +4 -0
  42. package/website/phase-build.html +4 -0
  43. package/website/phase-elicit.html +4 -0
  44. package/website/phase-go-live.html +4 -0
  45. package/website/phase-measure.html +4 -0
  46. package/website/phase-operate.html +4 -0
  47. package/website/phase-orient.html +4 -0
  48. package/website/phase-weigh.html +4 -0
  49. package/website/roles.html +4 -0
  50. package/website/styles.css +217 -1
  51. package/dist/http/service.d.ts +0 -7
  52. package/dist/http/service.js +0 -725
  53. package/dist/mcp/docs.d.ts +0 -114
  54. package/dist/mcp/docs.js +0 -626
  55. package/dist/mcp/server.d.ts +0 -20
  56. package/dist/mcp/server.js +0 -3059
  57. package/dist/runtime/auth.d.ts +0 -162
  58. package/dist/runtime/auth.js +0 -394
  59. package/dist/runtime/check.d.ts +0 -7
  60. package/dist/runtime/check.js +0 -16
  61. package/dist/runtime/config.d.ts +0 -17
  62. package/dist/runtime/config.js +0 -93
  63. package/dist/runtime/mongo.d.ts +0 -9
  64. package/dist/runtime/mongo.js +0 -56
  65. package/dist/runtime/records.d.ts +0 -427
  66. package/dist/runtime/records.js +0 -2092
  67. package/scripts/check-env-surface.mjs +0 -136
  68. package/scripts/check-public-copy.mjs +0 -263
  69. package/scripts/check-service-boundary.mjs +0 -63
  70. package/scripts/runtime-work-order.mjs +0 -506
  71. package/scripts/smoke-mcp-http.mjs +0 -4026
  72. package/src/cli.ts +0 -268
  73. package/src/http/server.ts +0 -314
  74. package/src/http/service.ts +0 -934
  75. package/src/init.ts +0 -262
  76. package/src/install-manifest.ts +0 -144
  77. package/src/mcp/docs.ts +0 -777
  78. package/src/mcp/server.ts +0 -4580
  79. package/src/package-root.ts +0 -31
  80. package/src/runtime/actor.ts +0 -61
  81. package/src/runtime/auth.ts +0 -673
  82. package/src/runtime/check.ts +0 -18
  83. package/src/runtime/config.ts +0 -128
  84. package/src/runtime/mongo.ts +0 -89
  85. package/src/runtime/records.ts +0 -3205
  86. package/src/runtime/workspace.ts +0 -155
  87. package/src/upgrade.ts +0 -356
  88. package/src/validate.ts +0 -141
  89. package/src/version.ts +0 -16
@@ -1,31 +0,0 @@
1
- import { constants as fsConstants } from "node:fs";
2
- import { access } from "node:fs/promises";
3
- import path from "node:path";
4
- import { fileURLToPath } from "node:url";
5
-
6
- export async function resolvePackageRoot(): Promise<string> {
7
- const currentFile = fileURLToPath(import.meta.url);
8
- const currentDir = path.dirname(currentFile);
9
- const candidates = [
10
- path.resolve(currentDir, ".."),
11
- path.resolve(currentDir, "..", ".."),
12
- process.cwd()
13
- ];
14
-
15
- for (const candidate of candidates) {
16
- if (await fileExists(path.join(candidate, "templates", "process", "README.md"))) {
17
- return candidate;
18
- }
19
- }
20
-
21
- throw new Error("Unable to locate dxcomplete templates directory.");
22
- }
23
-
24
- export async function fileExists(filePath: string): Promise<boolean> {
25
- try {
26
- await access(filePath, fsConstants.F_OK);
27
- return true;
28
- } catch {
29
- return false;
30
- }
31
- }
@@ -1,61 +0,0 @@
1
- import { hostname, userInfo } from "node:os";
2
-
3
- export type ActorContext = {
4
- actorId: string;
5
- provider: "local" | "google";
6
- displayName: string;
7
- email?: string;
8
- providerSubject?: string;
9
- };
10
-
11
- export function createLocalActorContext(): ActorContext {
12
- const username = readUsername();
13
- const host = hostname() || "local";
14
-
15
- return {
16
- actorId: `local:${encodeActorPart(username)}@${encodeActorPart(host)}`,
17
- provider: "local",
18
- displayName: `${username}@${host}`
19
- };
20
- }
21
-
22
- export function createGoogleActorContext(input: {
23
- email: string;
24
- subject: string;
25
- displayName?: string;
26
- }): ActorContext {
27
- const email = normalizeEmail(input.email);
28
- const subject = input.subject.trim();
29
-
30
- if (!subject) {
31
- throw new Error("Google actor subject is required.");
32
- }
33
-
34
- return {
35
- actorId: `google:${encodeActorPart(subject)}`,
36
- provider: "google",
37
- providerSubject: subject,
38
- displayName: input.displayName?.trim() || email,
39
- email
40
- };
41
- }
42
-
43
- export function normalizeEmail(value: string): string {
44
- const normalized = value.trim().toLowerCase();
45
- if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(normalized)) {
46
- throw new Error("Expected a valid email address.");
47
- }
48
- return normalized;
49
- }
50
-
51
- function readUsername(): string {
52
- try {
53
- return userInfo().username || "unknown";
54
- } catch {
55
- return "unknown";
56
- }
57
- }
58
-
59
- function encodeActorPart(value: string): string {
60
- return encodeURIComponent(value.trim() || "unknown");
61
- }