@starci/hfs 4.0.6 → 4.0.8

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 (134) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +10 -9
  3. package/bin/hfs.mjs +4 -4
  4. package/lint/run.mjs +1 -1
  5. package/package.json +2 -2
  6. package/runtime/engine/runtime-root.mjs +5 -0
  7. package/runtime/engine/yaml.mjs +3 -3
  8. package/runtime/knowledge/hfs/canon-pins.yaml +10 -10
  9. package/runtime/knowledge/hfs/slots.yaml +5 -5
  10. package/runtime/knowledge/patterns/fe/folder.yaml +2 -2
  11. package/runtime/knowledge/sonar-gate.yaml +2 -2
  12. package/runtime/modules/kernel/failure-codes.yaml +12 -2
  13. package/runtime/scripts/api/fs/lib.mjs +6 -0
  14. package/runtime/scripts/api/fs/rmdir-link.mjs +1 -1
  15. package/runtime/scripts/{lib → api/fs}/safe-remove.mjs +31 -82
  16. package/runtime/scripts/api/git/lib.mjs +1 -1
  17. package/runtime/scripts/api/sops/decrypt.mjs +16 -0
  18. package/runtime/scripts/{lib/hfs-allows.mjs → hfs/allows.mjs} +3 -3
  19. package/runtime/scripts/{checks → hfs}/architecture/backend.mjs +1 -1
  20. package/runtime/scripts/{checks → hfs}/architecture/config.mjs +2 -2
  21. package/runtime/scripts/{checks → hfs}/architecture/connection-map.mjs +1 -1
  22. package/runtime/scripts/{checks → hfs}/architecture/contract-fixture-guard.mjs +1 -1
  23. package/runtime/scripts/{checks → hfs}/architecture/fe-slot-allows.mjs +3 -3
  24. package/runtime/scripts/{checks → hfs}/architecture/feature-shape.mjs +1 -1
  25. package/runtime/scripts/{checks → hfs}/architecture/hfs-graph.mjs +1 -1
  26. package/runtime/scripts/{checks → hfs}/architecture/hfs.mjs +3 -3
  27. package/runtime/scripts/hfs/architecture/next-data-contract.mjs +96 -0
  28. package/runtime/scripts/{checks → hfs}/architecture/next-data.mjs +18 -105
  29. package/runtime/scripts/{checks → hfs}/architecture/required-files.mjs +1 -1
  30. package/runtime/scripts/{checks → hfs}/architecture/surface.mjs +1 -1
  31. package/runtime/scripts/{checks → hfs}/architecture/test-world-files.mjs +2 -2
  32. package/runtime/scripts/{checks → hfs}/architecture/typescript.mjs +1 -1
  33. package/runtime/scripts/{checks → hfs}/architecture.mjs +2 -2
  34. package/runtime/scripts/{lib/hfs-check.mjs → hfs/check.mjs} +33 -25
  35. package/runtime/scripts/hfs/manifest-shape.mjs +170 -0
  36. package/runtime/scripts/{lib/hfs-path-findings.mjs → hfs/path-findings.mjs} +6 -6
  37. package/runtime/scripts/{lib/hfs-rules → hfs/rules}/contract.mjs +3 -2
  38. package/runtime/scripts/hfs/rules/fe-contract-documents.mjs +66 -0
  39. package/runtime/scripts/{lib/hfs-rules → hfs/rules}/integration-specs.mjs +1 -1
  40. package/runtime/scripts/{lib/hfs-rules → hfs/rules}/secrets.mjs +2 -2
  41. package/runtime/scripts/{lib/hfs-rules → hfs/rules}/stacks.mjs +2 -2
  42. package/runtime/scripts/{lib/hfs-slots.mjs → hfs/slots.mjs} +52 -58
  43. package/runtime/scripts/{lib/hfs-tree.mjs → hfs/tree.mjs} +1 -1
  44. package/runtime/scripts/{lib/hfs-view.mjs → hfs/view.mjs} +3 -3
  45. package/runtime/scripts/lib/graphql-contract.mjs +429 -0
  46. package/runtime/scripts/lib/is-main.mjs +13 -0
  47. package/runtime/scripts/lib/language.mjs +2 -2
  48. package/runtime/scripts/lib/path-key.mjs +2 -0
  49. package/runtime/scripts/lib/stack-declaration.mjs +2 -2
  50. package/runtime/scripts/lib/test-secrets.mjs +2 -6
  51. package/runtime/scripts/{checks/common.mjs → lib/walk.mjs} +1 -12
  52. package/scaffold/app.mjs +1 -1
  53. package/scaffold/service.mjs +2 -2
  54. package/sync/hygiene.mjs +8 -8
  55. package/sync/index.mjs +48 -11
  56. package/templates/app/quality-config/codecov.yml +1 -1
  57. package/templates/app/quality-config/sonar-project.properties +1 -1
  58. package/templates/be/skeleton/src/modules/platform/http-security/origin.guard.ts +2 -2
  59. package/templates/fe/skeleton/apps/__app__/next.config.ts +10 -2
  60. package/templates/fe/skeleton/apps/__app__/src/app/[locale]/error.tsx +2 -2
  61. package/templates/fe/skeleton/apps/__app__/src/features/pages/ErrorPage/component.tsx +0 -2
  62. package/templates/fe/skeleton/apps/__app__/src/features/pages/ErrorPage/index.tsx +1 -7
  63. package/templates/fe/skeleton/apps/__app__/src/features/pages/GlobalErrorPage/component.tsx +0 -2
  64. package/templates/fe/skeleton/apps/__app__/src/features/pages/GlobalErrorPage/index.tsx +0 -1
  65. package/templates/fe/skeleton/apps/__app__/src/features/pages/HomePage/component.tsx +0 -4
  66. package/templates/fe/skeleton/apps/__app__/src/features/pages/HomePage/index.tsx +1 -1
  67. package/templates/fe/skeleton/apps/__app__/src/features/pages/LoadingPage/component.tsx +0 -4
  68. package/templates/fe/skeleton/apps/__app__/src/features/pages/LoadingPage/index.tsx +1 -1
  69. package/templates/fe/skeleton/apps/__app__/src/features/pages/NotFoundPage/component.tsx +0 -4
  70. package/templates/fe/skeleton/apps/__app__/src/features/pages/NotFoundPage/index.tsx +1 -1
  71. package/templates/fe/skeleton/apps/__app__/src/modules/i18n/request.ts +8 -3
  72. package/templates/fe/skeleton/apps/__app__/src/proxy.ts +1 -1
  73. package/runtime/engine/admission.mjs +0 -284
  74. package/runtime/engine/digest.mjs +0 -10
  75. package/runtime/engine/ledger-db.mjs +0 -1245
  76. package/runtime/engine/machine-db.mjs +0 -1565
  77. package/runtime/engine/migrations/machine/0001-init.sql +0 -887
  78. package/runtime/engine/migrations/machine/0002-worktrees-no-workflow-kind.sql +0 -13
  79. package/runtime/engine/migrations/machine/0003-worktrees-workflow-orca.sql +0 -21
  80. package/runtime/engine/migrations/runtime/0001-init.sql +0 -1072
  81. package/runtime/engine/migrations/runtime/0003-usage-unavailable.sql +0 -13
  82. package/runtime/engine/migrations/runtime/0004-attempt-why.sql +0 -43
  83. package/runtime/engine/migrations/runtime/0005-ended-workflow-views.sql +0 -93
  84. package/runtime/scripts/lib/artifact-hold.mjs +0 -89
  85. package/runtime/scripts/lib/artifact-store.mjs +0 -103
  86. package/runtime/scripts/lib/redact.mjs +0 -148
  87. /package/runtime/scripts/{checks → hfs}/architecture/background-unowned.mjs +0 -0
  88. /package/runtime/scripts/{checks → hfs}/architecture/client-reaches-server.mjs +0 -0
  89. /package/runtime/scripts/{checks → hfs}/architecture/clones.mjs +0 -0
  90. /package/runtime/scripts/{checks → hfs}/architecture/config-unread.mjs +0 -0
  91. /package/runtime/scripts/{checks → hfs}/architecture/constructor-deps.mjs +0 -0
  92. /package/runtime/scripts/{checks → hfs}/architecture/contracts.mjs +0 -0
  93. /package/runtime/scripts/{checks → hfs}/architecture/cross-app-duplicate.mjs +0 -0
  94. /package/runtime/scripts/{checks → hfs}/architecture/dead-exports.mjs +0 -0
  95. /package/runtime/scripts/{checks → hfs}/architecture/default-deny.mjs +0 -0
  96. /package/runtime/scripts/{checks → hfs}/architecture/doc-language.mjs +0 -0
  97. /package/runtime/scripts/{checks → hfs}/architecture/entrypoint.mjs +0 -0
  98. /package/runtime/scripts/{checks → hfs}/architecture/error-codes.mjs +0 -0
  99. /package/runtime/scripts/{checks → hfs}/architecture/error-masked.mjs +0 -0
  100. /package/runtime/scripts/{checks → hfs}/architecture/framework-pinned.mjs +0 -0
  101. /package/runtime/scripts/{checks → hfs}/architecture/frontend.mjs +0 -0
  102. /package/runtime/scripts/{checks → hfs}/architecture/hooks-are-hooks.mjs +0 -0
  103. /package/runtime/scripts/{checks → hfs}/architecture/i18n-keys.mjs +0 -0
  104. /package/runtime/scripts/{checks → hfs}/architecture/index.mjs +0 -0
  105. /package/runtime/scripts/{checks → hfs}/architecture/injection-token-exported.mjs +0 -0
  106. /package/runtime/scripts/{checks → hfs}/architecture/machine-ast.mjs +0 -0
  107. /package/runtime/scripts/{checks → hfs}/architecture/module-per-transport.mjs +0 -0
  108. /package/runtime/scripts/{checks → hfs}/architecture/owners.mjs +0 -0
  109. /package/runtime/scripts/{checks → hfs}/architecture/package-shape.mjs +0 -0
  110. /package/runtime/scripts/{checks → hfs}/architecture/reachability.mjs +0 -0
  111. /package/runtime/scripts/{checks → hfs}/architecture/register-once.mjs +0 -0
  112. /package/runtime/scripts/{checks → hfs}/architecture/registration.mjs +0 -0
  113. /package/runtime/scripts/{checks → hfs}/architecture/route-files-thin.mjs +0 -0
  114. /package/runtime/scripts/{checks → hfs}/architecture/schema-owner.mjs +0 -0
  115. /package/runtime/scripts/{checks → hfs}/architecture/source-names.mjs +0 -0
  116. /package/runtime/scripts/{checks → hfs}/architecture/sql-owner.mjs +0 -0
  117. /package/runtime/scripts/{checks → hfs}/architecture/sql-tokens.mjs +0 -0
  118. /package/runtime/scripts/{checks → hfs}/architecture/symbols.mjs +0 -0
  119. /package/runtime/scripts/{checks → hfs}/architecture/tiers.mjs +0 -0
  120. /package/runtime/scripts/{checks → hfs}/architecture/transport-owner.mjs +0 -0
  121. /package/runtime/scripts/{checks → hfs}/architecture/unit-spec-providers.mjs +0 -0
  122. /package/runtime/scripts/{lib → hfs}/repo-identity.mjs +0 -0
  123. /package/runtime/scripts/{lib/hfs-rules → hfs/rules}/deps.mjs +0 -0
  124. /package/runtime/scripts/{lib/hfs-rules → hfs/rules}/fe-no-tests.mjs +0 -0
  125. /package/runtime/scripts/{lib/hfs-rules/frontend.mjs → hfs/rules/frontend-tree.mjs} +0 -0
  126. /package/runtime/scripts/{lib/hfs-rules → hfs/rules}/lint-suppression.mjs +0 -0
  127. /package/runtime/scripts/{lib/hfs-rules → hfs/rules}/peer-integrations.mjs +0 -0
  128. /package/runtime/scripts/{lib/hfs-rules → hfs/rules}/pipeline.mjs +0 -0
  129. /package/runtime/scripts/{lib/hfs-rules → hfs/rules}/proof-commands.mjs +0 -0
  130. /package/runtime/scripts/{lib/hfs-rules → hfs/rules}/read.mjs +0 -0
  131. /package/runtime/scripts/{lib/hfs-rules → hfs/rules}/repo-local-checks.mjs +0 -0
  132. /package/runtime/scripts/{lib/hfs-rules → hfs/rules}/spec-placement.mjs +0 -0
  133. /package/runtime/scripts/{lib/hfs-rules → hfs/rules}/test-topology.mjs +0 -0
  134. /package/runtime/scripts/{checks → hfs}/typescript-programs.mjs +0 -0
@@ -1,13 +0,0 @@
1
- -- 0002-worktrees-no-workflow-kind (starci/machine@1, user_version 1 -> 2). Applied by engine/machine-db.mjs migrateMachine on
2
- -- the first writer open of an older machine.sqlite (after an integrity_check and a VACUUM INTO backup, with foreign_key_check
3
- -- + quick_check before COMMIT); a fresh machine.sqlite runs 0001 then the forward files.
4
- --
5
- -- The per-workflow worktree is removed: a workflow owns no checkout of its own, an op works in its job worktree and a land
6
- -- in its scratch. worktrees.kind no longer accepts 'workflow'. A row of that kind describes the removed mechanism and is
7
- -- deleted (a directory it named, if any is left, is an unregistered worktree the worktree GC and the footprint scan report);
8
- -- then the table's CHECK is rewritten in place (writable_schema: the views over worktrees stay as they are).
9
- DELETE FROM worktrees WHERE kind='workflow';
10
- PRAGMA writable_schema=ON;
11
- UPDATE sqlite_master
12
- SET sql=replace(sql, 'CHECK(kind IN (''op'',''workflow'',''land-scratch'',', 'CHECK(kind IN (''op'',''land-scratch'',')
13
- WHERE type='table' AND name='worktrees';
@@ -1,21 +0,0 @@
1
- -- 0003-worktrees-workflow-orca (starci/machine@1, user_version 2 -> 3). Applied by engine/machine-db.mjs migrateMachine on
2
- -- the first writer open of an older machine.sqlite (after an integrity_check and a VACUUM INTO backup, with foreign_key_check
3
- -- + quick_check before COMMIT); a fresh machine.sqlite runs 0001 then the forward files.
4
- --
5
- -- One worktree per Kernel workflow replaces the per-op worktree (owner decision WFWT, final). Orca creates and owns it (the
6
- -- Kernel launch), so the registry keys it by Orca's worktree id (orca_id, unique among the rows that have one), records
7
- -- the workflow's last checkpoint (checkpoint_sha) and the moment its finish asked for its release (release_pending_at: the
8
- -- host-side GC removes it once the Kernel's and the ops' terminals are released; never from inside itself). The draw
9
- -- critic's placement is an Orca worktree too (kind critic). worktrees.kind no longer accepts 'op': a row of that kind
10
- -- describes the removed mechanism and is deleted (a directory it named, if any is left, is an unregistered worktree the
11
- -- worktree GC and the footprint scan report); then the table's CHECK is rewritten in place (writable_schema: the views over worktrees stay as they are).
12
- DELETE FROM worktrees WHERE kind='op';
13
- ALTER TABLE worktrees ADD COLUMN orca_id TEXT;
14
- ALTER TABLE worktrees ADD COLUMN checkpoint_sha TEXT;
15
- ALTER TABLE worktrees ADD COLUMN release_pending_at INTEGER;
16
- CREATE UNIQUE INDEX IF NOT EXISTS ux_worktrees_orca_id ON worktrees(orca_id) WHERE orca_id IS NOT NULL;
17
- CREATE INDEX IF NOT EXISTS ix_worktrees_workflow ON worktrees(workflow_id,kind,removed_at);
18
- PRAGMA writable_schema=ON;
19
- UPDATE sqlite_master
20
- SET sql=replace(sql, 'CHECK(kind IN (''op'',''land-scratch'',', 'CHECK(kind IN (''workflow'',''critic'',''land-scratch'',')
21
- WHERE type='table' AND name='worktrees';