@starci/hfs 1.0.1 → 2.0.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.
- package/CHANGELOG.md +51 -0
- package/README.md +110 -12
- package/bin/hfs.mjs +119 -15
- package/emit/compiler.mjs +35 -0
- package/emit/contracts.mjs +97 -0
- package/emit/operations-worker.mjs +24 -0
- package/emit/operations.mjs +126 -0
- package/emit/schema-worker.mjs +117 -0
- package/emit/static-graph.mjs +670 -0
- package/emit/type-schema.mjs +145 -0
- package/package.json +4 -1
- package/report/sonar.mjs +180 -0
- package/runtime/engine/admission.mjs +284 -0
- package/runtime/engine/digest.mjs +10 -0
- package/runtime/engine/ledger-db.mjs +1245 -0
- package/runtime/engine/machine-db.mjs +1484 -0
- package/runtime/engine/migrations/machine/0001-init.sql +887 -0
- package/runtime/engine/migrations/runtime/0001-init.sql +1072 -0
- package/runtime/engine/migrations/runtime/0003-usage-unavailable.sql +13 -0
- package/runtime/engine/migrations/runtime/0004-attempt-why.sql +43 -0
- package/runtime/engine/plain-object.mjs +5 -0
- package/runtime/knowledge/hfs/canon-pins.yaml +16 -58
- package/runtime/knowledge/hfs/slots.yaml +405 -137
- package/runtime/knowledge/patterns/fe/folder.yaml +309 -0
- package/runtime/knowledge/sonar-gate.yaml +85 -0
- package/runtime/modules/kernel/failure-codes.yaml +1480 -16
- package/runtime/scripts/checks/architecture/backend.mjs +350 -0
- package/runtime/scripts/checks/architecture/background-unowned.mjs +107 -0
- package/runtime/scripts/checks/architecture/client-reaches-server.mjs +94 -0
- package/runtime/scripts/checks/architecture/clones.mjs +200 -0
- package/runtime/scripts/checks/architecture/config-unread.mjs +35 -0
- package/runtime/scripts/checks/architecture/config.mjs +310 -0
- package/runtime/scripts/checks/architecture/connection-map.mjs +208 -0
- package/runtime/scripts/checks/architecture/constructor-deps.mjs +100 -0
- package/runtime/scripts/checks/architecture/contract-fixture-guard.mjs +128 -0
- package/runtime/scripts/checks/architecture/contracts.mjs +792 -0
- package/runtime/scripts/checks/architecture/cross-app-duplicate.mjs +73 -0
- package/runtime/scripts/checks/architecture/dead-exports.mjs +265 -0
- package/runtime/scripts/checks/architecture/default-deny.mjs +129 -0
- package/runtime/scripts/checks/architecture/doc-language.mjs +39 -0
- package/runtime/scripts/checks/architecture/entrypoint.mjs +57 -0
- package/runtime/scripts/checks/architecture/error-codes.mjs +45 -0
- package/runtime/scripts/checks/architecture/error-masked.mjs +60 -0
- package/runtime/scripts/checks/architecture/fe-slot-allows.mjs +38 -0
- package/runtime/scripts/checks/architecture/feature-shape.mjs +49 -0
- package/runtime/scripts/checks/architecture/framework-pinned.mjs +83 -0
- package/runtime/scripts/checks/architecture/frontend.mjs +995 -0
- package/runtime/scripts/checks/architecture/hfs-graph.mjs +61 -0
- package/runtime/scripts/checks/architecture/hfs.mjs +521 -0
- package/runtime/scripts/checks/architecture/hooks-are-hooks.mjs +88 -0
- package/runtime/scripts/checks/architecture/i18n-keys.mjs +146 -0
- package/runtime/scripts/checks/architecture/index.mjs +316 -0
- package/runtime/scripts/checks/architecture/injection-token-exported.mjs +62 -0
- package/runtime/scripts/checks/architecture/machine-ast.mjs +138 -0
- package/runtime/scripts/checks/architecture/module-per-transport.mjs +130 -0
- package/runtime/scripts/checks/architecture/next-data.mjs +775 -0
- package/runtime/scripts/checks/architecture/owners.mjs +89 -0
- package/runtime/scripts/checks/architecture/package-shape.mjs +63 -0
- package/runtime/scripts/checks/architecture/reachability.mjs +233 -0
- package/runtime/scripts/checks/architecture/register-once.mjs +141 -0
- package/runtime/scripts/checks/architecture/registration.mjs +319 -0
- package/runtime/scripts/checks/architecture/required-files.mjs +172 -0
- package/runtime/scripts/checks/architecture/route-files-thin.mjs +97 -0
- package/runtime/scripts/checks/architecture/schema-owner.mjs +261 -0
- package/runtime/scripts/checks/architecture/size-growth.mjs +73 -0
- package/runtime/scripts/checks/architecture/source-names.mjs +607 -0
- package/runtime/scripts/checks/architecture/sql-owner.mjs +142 -0
- package/runtime/scripts/checks/architecture/sql-tokens.mjs +327 -0
- package/runtime/scripts/checks/architecture/symbols.mjs +193 -0
- package/runtime/scripts/checks/architecture/test-world-files.mjs +163 -0
- package/runtime/scripts/checks/architecture/tiers.mjs +130 -0
- package/runtime/scripts/checks/architecture/transport-owner.mjs +112 -0
- package/runtime/scripts/checks/architecture/typescript.mjs +500 -0
- package/runtime/scripts/checks/architecture/unit-spec-providers.mjs +122 -0
- package/runtime/scripts/checks/architecture.mjs +41 -0
- package/runtime/scripts/checks/common.mjs +37 -0
- package/runtime/scripts/checks/typescript-programs.mjs +82 -0
- package/runtime/scripts/lib/artifact-hold.mjs +89 -0
- package/runtime/scripts/lib/artifact-store.mjs +103 -0
- package/runtime/scripts/lib/fs-kind.mjs +10 -0
- package/runtime/scripts/lib/git.mjs +53 -0
- package/runtime/scripts/lib/hfs-allows.mjs +57 -0
- package/runtime/scripts/lib/hfs-check.mjs +254 -28
- package/runtime/scripts/lib/hfs-rules/contract.mjs +126 -0
- package/runtime/scripts/lib/hfs-rules/deps.mjs +63 -0
- package/runtime/scripts/lib/hfs-rules/fe-no-tests.mjs +47 -0
- package/runtime/scripts/lib/hfs-rules/frontend.mjs +124 -0
- package/runtime/scripts/lib/hfs-rules/lint-suppression.mjs +34 -0
- package/runtime/scripts/lib/hfs-rules/pipeline.mjs +51 -0
- package/runtime/scripts/lib/hfs-rules/proof-commands.mjs +64 -0
- package/runtime/scripts/lib/hfs-rules/read.mjs +28 -0
- package/runtime/scripts/lib/hfs-rules/repo-local-checks.mjs +32 -0
- package/runtime/scripts/lib/hfs-rules/secrets.mjs +54 -0
- package/runtime/scripts/lib/hfs-rules/spec-placement.mjs +31 -0
- package/runtime/scripts/lib/hfs-rules/stacks.mjs +54 -0
- package/runtime/scripts/lib/hfs-rules/test-topology.mjs +31 -0
- package/runtime/scripts/lib/hfs-slots.mjs +88 -40
- package/runtime/scripts/lib/hfs-tree.mjs +80 -0
- package/runtime/scripts/lib/hfs-view.mjs +68 -0
- package/runtime/scripts/lib/json.mjs +22 -0
- package/runtime/scripts/lib/language.mjs +107 -0
- package/runtime/scripts/lib/path-key.mjs +2 -0
- package/runtime/scripts/lib/redact.mjs +148 -0
- package/runtime/scripts/lib/repo-identity.mjs +50 -0
- package/runtime/scripts/lib/safe-remove.mjs +179 -0
- package/runtime/scripts/lib/secret-patterns.mjs +44 -0
- package/runtime/scripts/lib/sleep-sync.mjs +17 -0
- package/runtime/scripts/lib/stack-declaration.mjs +52 -0
- package/runtime/scripts/lib/stack-services.mjs +217 -0
- package/runtime/scripts/lib/test-secrets.mjs +120 -0
- package/scaffold/service.mjs +333 -0
- package/sync/format.mjs +46 -0
- package/sync/hygiene.mjs +56 -24
- package/sync/index.mjs +133 -41
- package/sync/managed.mjs +170 -0
- package/sync/skeleton.mjs +32 -10
- package/sync/sonar-key.mjs +13 -0
- package/sync/ts-strict.mjs +48 -0
- package/templates/{common → be/ci-workflows/github/workflows}/ci.yml +13 -13
- package/templates/be/{e2e.yml → ci-workflows/github/workflows/e2e.yml} +1 -0
- package/templates/be/hooks/husky/pre-commit +13 -0
- package/templates/be/hooks/husky/pre-push +7 -0
- package/templates/be/package-scripts/package.json +22 -0
- package/templates/be/{sonar-project.properties → quality-config/sonar-project.properties} +2 -3
- package/templates/be/skeleton/apps/__app__/src/app.module.ts +14 -4
- package/templates/be/skeleton/apps/__app__/src/main.ts +9 -6
- package/templates/be/skeleton/scripts/.gitkeep +0 -0
- package/templates/be/skeleton/src/features/system-health/application/check-liveness.contracts.ts +2 -0
- package/templates/be/skeleton/src/features/system-health/application/check-liveness.handler.ts +22 -0
- package/templates/be/skeleton/src/features/system-health/application/check-liveness.query.ts +11 -0
- package/templates/be/skeleton/src/features/system-health/index.ts +1 -1
- package/templates/be/skeleton/src/features/system-health/system-health.module.ts +3 -3
- package/templates/be/skeleton/src/features/system-health/transport/http/live.controller.ts +8 -9
- package/templates/be/skeleton/src/features/system-health/transport/http/system-health-http.module.ts +3 -6
- package/templates/be/skeleton/src/modules/domain/liveness/index.ts +3 -0
- package/templates/be/skeleton/src/modules/domain/liveness/liveness.contracts.ts +9 -0
- package/templates/be/skeleton/src/modules/domain/liveness/liveness.module-definition.ts +7 -0
- package/templates/be/skeleton/src/modules/domain/liveness/liveness.module.ts +14 -0
- package/templates/be/skeleton/src/modules/domain/liveness/liveness.options.ts +2 -0
- package/templates/be/skeleton/src/modules/domain/liveness/liveness.service.spec.ts +40 -0
- package/templates/be/skeleton/src/modules/domain/liveness/liveness.service.ts +26 -0
- package/templates/be/skeleton/src/modules/platform/clock/clock.decorators.ts +9 -0
- package/templates/be/skeleton/src/modules/platform/clock/clock.module-definition.ts +7 -0
- package/templates/be/skeleton/src/modules/platform/clock/clock.module.ts +19 -0
- package/templates/be/skeleton/src/modules/platform/clock/clock.options.ts +2 -0
- package/templates/be/skeleton/src/modules/platform/clock/clock.port.ts +5 -0
- package/templates/be/skeleton/src/modules/platform/clock/index.ts +4 -0
- package/templates/be/skeleton/src/modules/platform/clock/system-clock.service.spec.ts +20 -0
- package/templates/be/skeleton/src/modules/platform/clock/system-clock.service.ts +9 -0
- package/templates/be/skeleton/src/modules/platform/composition/composition.decorators.ts +8 -0
- package/templates/be/skeleton/src/modules/platform/composition/index.ts +2 -0
- package/templates/be/skeleton/src/modules/platform/config/config.decorators.ts +9 -0
- package/templates/be/skeleton/src/modules/platform/config/index.ts +2 -3
- package/templates/be/skeleton/src/modules/platform/config/server.config.ts +1 -1
- package/templates/be/skeleton/src/modules/platform/config/server.options.ts +0 -3
- package/templates/be/skeleton/src/modules/platform/cqrs/cqrs.contracts.ts +5 -0
- package/templates/be/skeleton/src/modules/platform/cqrs/cqrs.decorators.ts +9 -0
- package/templates/be/skeleton/src/modules/platform/cqrs/cqrs.handler.ts +27 -0
- package/templates/be/skeleton/src/modules/platform/cqrs/cqrs.log-events.ts +5 -0
- package/templates/be/skeleton/src/modules/platform/cqrs/cqrs.module-definition.ts +7 -0
- package/templates/be/skeleton/src/modules/platform/cqrs/cqrs.module.ts +18 -0
- package/templates/be/skeleton/src/modules/platform/cqrs/cqrs.options.ts +2 -0
- package/templates/be/skeleton/src/modules/platform/cqrs/index.ts +4 -0
- package/templates/be/skeleton/src/modules/platform/errors/error.filter.ts +8 -12
- package/templates/be/skeleton/src/modules/platform/errors/errors.log-events.ts +5 -0
- package/templates/be/skeleton/src/modules/platform/errors/index.ts +1 -1
- package/templates/be/skeleton/src/modules/platform/logging/index.ts +4 -4
- package/templates/be/skeleton/src/modules/platform/logging/json-logger.service.spec.ts +99 -0
- package/templates/be/skeleton/src/modules/platform/logging/json-logger.service.ts +38 -0
- package/templates/be/skeleton/src/modules/platform/logging/logging.decorators.ts +9 -0
- package/templates/be/skeleton/src/modules/platform/logging/logging.log-events.ts +7 -0
- package/templates/be/skeleton/src/modules/platform/logging/logging.module-definition.ts +7 -0
- package/templates/be/skeleton/src/modules/platform/logging/logging.module.ts +23 -10
- package/templates/be/skeleton/src/modules/platform/logging/logging.options.ts +2 -0
- package/templates/be/skeleton/src/modules/platform/logging/logging.port.ts +15 -0
- package/templates/be/tool-config/eslint.config.mjs +3 -0
- package/templates/be/tool-config/jest.config.js +1 -0
- package/templates/be/tool-config/prettierignore +8 -0
- package/templates/be/tool-config/prettierrc +1 -0
- package/templates/be/tool-config/src/tests/tsconfig.json +5 -0
- package/templates/be/tool-config/tsconfig.build.json +5 -0
- package/templates/be/tool-config/tsconfig.json +11 -0
- package/templates/common/gitignore.base +1 -1
- package/templates/fe/ci-workflows/github/workflows/ci.yml +54 -0
- package/templates/fe/hooks/husky/pre-commit +16 -0
- package/templates/fe/hooks/husky/pre-push +6 -0
- package/templates/fe/package-scripts/package.json +17 -0
- package/templates/fe/parts/api-client.ts +44 -0
- package/templates/fe/parts/api-outcome.ts +7 -0
- package/templates/fe/quality-config/sonar-project.properties +8 -0
- package/templates/fe/skeleton/apps/__app__/src/app/[locale]/layout.tsx +1 -1
- package/templates/fe/skeleton/apps/__app__/src/app/[locale]/not-found.tsx +1 -1
- package/templates/fe/skeleton/apps/__app__/src/app/global-error.tsx +1 -1
- package/templates/fe/skeleton/scripts/.gitkeep +0 -0
- package/templates/fe/skeleton-app/apps/__app__/src/modules/api/client.ts +1 -0
- package/templates/fe/skeleton-app/apps/__app__/src/modules/api/index.ts +3 -0
- package/templates/fe/skeleton-app/apps/__app__/src/modules/api/outcome.ts +1 -0
- package/templates/fe/skeleton-app/apps/__app__/src/modules/i18n/index.ts +4 -0
- package/templates/fe/skeleton-shared/apps/__app__/next.config.ts +12 -0
- package/templates/fe/skeleton-shared/apps/__app__/src/modules/api/index.ts +2 -0
- package/templates/fe/skeleton-shared/apps/__app__/src/modules/i18n/index.ts +9 -0
- package/templates/fe/skeleton-shared/apps/__app__/src/modules/i18n/request.ts +5 -0
- package/templates/fe/skeleton-shared/apps/__app__/src/proxy.ts +5 -0
- package/templates/fe/skeleton-shared/packages/__family__-api/package.json +12 -0
- package/templates/fe/skeleton-shared/packages/__family__-api/src/client.ts +1 -0
- package/templates/fe/skeleton-shared/packages/__family__-api/src/index.ts +3 -0
- package/templates/fe/skeleton-shared/packages/__family__-api/src/outcome.ts +1 -0
- package/templates/fe/skeleton-shared/packages/__family__-api/tsconfig.json +5 -0
- package/templates/fe/skeleton-shared/packages/__family__-i18n/package.json +18 -0
- package/templates/fe/skeleton-shared/packages/__family__-i18n/src/app.ts +19 -0
- package/templates/fe/skeleton-shared/packages/__family__-i18n/src/index.ts +2 -0
- package/templates/fe/skeleton-shared/packages/__family__-i18n/src/proxy.ts +12 -0
- package/templates/fe/skeleton-shared/packages/__family__-i18n/src/request.ts +15 -0
- package/templates/fe/skeleton-shared/packages/__family__-i18n/tsconfig.json +5 -0
- package/templates/fe/tool-config/eslint.config.mjs +3 -0
- package/templates/fe/tool-config/prettierignore +10 -0
- package/templates/fe/tool-config/prettierrc +1 -0
- package/templates/fe/tool-config/stylelint.config.mjs +3 -0
- package/templates/fe/tool-config/tsconfig.json +4 -0
- package/templates/be/pre-commit +0 -8
- package/templates/be/skeleton/apps/__app__/src/__app__.composition.spec.ts +0 -31
- package/templates/be/skeleton/src/features/system-health/transport/http/live.controller.spec.ts +0 -13
- package/templates/be/skeleton/src/modules/platform/config/env-source.spec.ts +0 -36
- package/templates/be/skeleton/src/modules/platform/config/server.config.spec.ts +0 -19
- package/templates/be/skeleton/src/modules/platform/errors/domain-error.spec.ts +0 -15
- package/templates/be/skeleton/src/modules/platform/errors/error.filter.spec.ts +0 -38
- package/templates/be/skeleton/src/modules/platform/logging/json-logger.spec.ts +0 -33
- package/templates/be/skeleton/src/modules/platform/logging/json-logger.ts +0 -35
- package/templates/be/skeleton/src/modules/platform/logging/log-id.ts +0 -9
- package/templates/be/skeleton/src/modules/platform/logging/logger.port.ts +0 -19
- package/templates/common/codecov.yml +0 -13
- package/templates/common/pre-push +0 -5
- package/templates/fe/e2e.yml +0 -22
- package/templates/fe/pre-commit +0 -7
- package/templates/fe/skeleton/apps/__app__/src/app/health/live/route.spec.ts +0 -10
- package/templates/fe/skeleton/apps/__app__/src/modules/i18n/messages.spec.ts +0 -27
- package/templates/fe/skeleton/apps/__app__/src/modules/i18n/routing.spec.ts +0 -10
- package/templates/fe/sonar-project.properties +0 -11
- /package/templates/be/skeleton/src/modules/platform/config/{env-source.ts → env-source.config.ts} +0 -0
- /package/templates/be/skeleton/src/modules/platform/errors/{domain-error.ts → domain.error.ts} +0 -0
- /package/templates/fe/{skeleton → skeleton-app}/apps/__app__/next.config.ts +0 -0
- /package/templates/fe/{skeleton → skeleton-app}/apps/__app__/src/modules/i18n/config.ts +0 -0
- /package/templates/fe/{skeleton → skeleton-app}/apps/__app__/src/modules/i18n/navigation.ts +0 -0
- /package/templates/fe/{skeleton → skeleton-app}/apps/__app__/src/modules/i18n/request.ts +0 -0
- /package/templates/fe/{skeleton → skeleton-app}/apps/__app__/src/modules/i18n/routing.ts +0 -0
- /package/templates/fe/{skeleton → skeleton-app}/apps/__app__/src/proxy.ts +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
-- 0003-usage-unavailable (starci/runtime@1, user_version 1 -> 3). Applied by engine/ledger-db.mjs migrateLedger on the first
|
|
2
|
+
-- writer open of an older ledger, after a VACUUM INTO backup and an integrity_check, with foreign_key_check + quick_check
|
|
3
|
+
-- before COMMIT; a fresh ledger runs 0001 then this file.
|
|
4
|
+
--
|
|
5
|
+
-- op_attempts.usage_source admits 'unavailable' (the attempt's agent has no usage adapter, or no session file was ever found),
|
|
6
|
+
-- and usage_reason says why. SQLite cannot ALTER a CHECK, so the table SQL in sqlite_master is rewritten under
|
|
7
|
+
-- writable_schema (the documented path for a change that leaves the on-disk row format alone: the constraint only widens),
|
|
8
|
+
-- then schema_version is bumped by the migrator. Every existing row already satisfies the wider constraint.
|
|
9
|
+
ALTER TABLE op_attempts ADD COLUMN usage_reason TEXT;
|
|
10
|
+
PRAGMA writable_schema=ON;
|
|
11
|
+
UPDATE sqlite_master
|
|
12
|
+
SET sql=replace(sql,'usage_source IN (''cli-transcript'',''provider-report'')','usage_source IN (''cli-transcript'',''provider-report'',''unavailable'')')
|
|
13
|
+
WHERE type='table' AND name='op_attempts' AND instr(sql,'''unavailable''')=0;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
-- 0004-attempt-why (starci/runtime@1, user_version 3 -> 4). Applied by engine/ledger-db.mjs migrateLedger on the first
|
|
2
|
+
-- writer open of an older ledger (after a VACUUM INTO backup and an integrity_check, with foreign_key_check + quick_check
|
|
3
|
+
-- before COMMIT); a fresh ledger runs 0001 then the forward files.
|
|
4
|
+
--
|
|
5
|
+
-- op_attempts.why_json: the owner-facing reason an attempt failed, was blocked, refused or is waiting (starci/why@1,
|
|
6
|
+
-- scripts/kernel/why.mjs, docs/why.md), written with the settle. The two attempt views are recreated:
|
|
7
|
+
-- v_attempt_state.native 'awaiting-owner' (job awaiting_owner, or verdict blocked + report_outcome ask) and
|
|
8
|
+
-- 'rejected' (end_state requeued whose settle_json.reason is dispatch-rejected) are their own states;
|
|
9
|
+
-- v_op_history carries why_json, and its `ui` reads 'awaiting-owner' and 'rejected' for those two natives
|
|
10
|
+
-- (every other native still maps through ui_state_map; job_status stays a column).
|
|
11
|
+
ALTER TABLE op_attempts ADD COLUMN why_json TEXT CHECK(why_json IS NULL OR json_valid(why_json));
|
|
12
|
+
DROP VIEW IF EXISTS v_op_history;
|
|
13
|
+
DROP VIEW IF EXISTS v_attempt_state;
|
|
14
|
+
CREATE VIEW v_attempt_state AS
|
|
15
|
+
SELECT a.attempt_id,
|
|
16
|
+
CASE WHEN a.end_state='worker-dead' THEN 'worker-dead' WHEN a.end_state='effect-unknown' THEN 'effect-unknown'
|
|
17
|
+
WHEN a.end_state='requeued' AND json_extract(a.settle_json,'$.reason')='dispatch-rejected' THEN 'rejected'
|
|
18
|
+
WHEN a.end_state='requeued' THEN 'requeued'
|
|
19
|
+
WHEN (a.verdict='blocked' AND a.report_outcome='ask')
|
|
20
|
+
OR (a.verdict IS NOT NULL AND (SELECT j.status FROM jobs j WHERE j.job_id=a.job_id)='awaiting_owner') THEN 'awaiting-owner'
|
|
21
|
+
WHEN a.verdict IS NOT NULL THEN a.verdict
|
|
22
|
+
WHEN a.dispatched_at IS NULL THEN 'routed' ELSE 'in-flight' END AS native
|
|
23
|
+
FROM op_attempts a;
|
|
24
|
+
CREATE VIEW v_op_history AS
|
|
25
|
+
SELECT a.attempt_id, a.workflow_id, a.unit_id, a.job_id, a.op_id, a.try_no, a.dispatch_seq, a.dispatch_id, a.span_id,
|
|
26
|
+
a.agent, a.provider, a.model, a.model_profile, a.pool, a.effort, a.cli_version, a.runtime_rev,
|
|
27
|
+
a.terminal_handle, a.worktree_path, a.branch, a.base_sha, a.head_sha, a.integrated_sha,
|
|
28
|
+
a.routed_at, a.dispatched_at, a.reported_at, a.settled_at, a.released_at, a.worktree_removed_at,
|
|
29
|
+
COALESCE(a.wall_ms, a.settled_at - a.dispatched_at) AS cycle_ms,
|
|
30
|
+
a.report_outcome, a.verdict, a.settled_by, a.failure_class, a.end_state, a.why_json,
|
|
31
|
+
a.tokens_in, a.tokens_out, a.cost_usd, a.usage_source,
|
|
32
|
+
a.prompt_sha, a.transcript_sha, a.session_sha,
|
|
33
|
+
s.native AS attempt_state,
|
|
34
|
+
CASE WHEN s.native IN ('awaiting-owner','rejected') THEN s.native ELSE COALESCE(m.ui,'unknown') END AS ui,
|
|
35
|
+
j.status AS job_status, r.report_id, r.summary AS report_summary,
|
|
36
|
+
(SELECT count(*) FROM check_runs c WHERE c.attempt_id=a.attempt_id) AS checks,
|
|
37
|
+
(SELECT count(*) FROM check_runs c WHERE c.attempt_id=a.attempt_id AND c.status IN ('fail','error')) AS checks_red,
|
|
38
|
+
(SELECT count(*) FROM job_artifacts x WHERE x.attempt_id=a.attempt_id) AS artifacts
|
|
39
|
+
FROM op_attempts a
|
|
40
|
+
JOIN v_attempt_state s ON s.attempt_id=a.attempt_id
|
|
41
|
+
LEFT JOIN ui_state_map m ON m.entity='attempt' AND m.native=s.native
|
|
42
|
+
LEFT JOIN jobs j ON j.job_id=a.job_id
|
|
43
|
+
LEFT JOIN reports r ON r.attempt_id=a.attempt_id;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// plain-object.mjs — the one "is this a non-array object" predicate the runtime asks with.
|
|
2
|
+
// A leaf beside digest.mjs: schema walkers, config readers and JSON consumers all mean the
|
|
3
|
+
// same thing by "a mapping" - own object, never null, never an array - so they share it here.
|
|
4
|
+
/** True for a non-null, non-array object. Does not check the prototype (a JSON.parse result). */
|
|
5
|
+
export const isPlainObject = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
@@ -10,35 +10,35 @@ pins:
|
|
|
10
10
|
# --- @starci packages. Every @starci package is a PUBLISHED npm package (install: registry): a product repository
|
|
11
11
|
# installs the exact pinned version from the npm registry in the root and every workspace package.json, never `file:`.
|
|
12
12
|
'@starci/grammar':
|
|
13
|
-
version: 0.7.
|
|
13
|
+
version: 0.7.2
|
|
14
14
|
group: starci
|
|
15
15
|
install: registry
|
|
16
16
|
side: fe
|
|
17
17
|
source: packages/grammar/package.json
|
|
18
|
-
why: nivo-fe pins 0.4.11 and 0.5.0 in one workspace, starci-next-fe 0.5.1, miamia-fe 0.5.0; the runtime source is 0.7.
|
|
18
|
+
why: nivo-fe pins 0.4.11 and 0.5.0 in one workspace, starci-next-fe 0.5.1, miamia-fe 0.5.0; the runtime source is 0.7.2 (Input tel kind and IconButton disclosure props).
|
|
19
19
|
'@starci/eslint-canon-be':
|
|
20
|
-
version:
|
|
20
|
+
version: 2.0.1
|
|
21
21
|
group: starci
|
|
22
22
|
install: registry
|
|
23
23
|
side: be
|
|
24
24
|
source: packages/eslint/be/package.json
|
|
25
|
-
why: '
|
|
25
|
+
why: '2.0.0 (C0 release): starciBeConfig({ hfs: loadHfs(import.meta.url) }) typed factory and the BE-CONVENTION laws (R36 sql-text-only, R83 no-repository-class, R85/R87/R89 service-deps, R43 config-parsed-in-main, R47/R48 test world, R95 operations, R98-R101 builders).'
|
|
26
26
|
'@starci/eslint-canon-fe':
|
|
27
|
-
version:
|
|
27
|
+
version: 7.0.0
|
|
28
28
|
group: starci
|
|
29
29
|
install: registry
|
|
30
30
|
side: fe
|
|
31
31
|
source: packages/eslint/fe/package.json
|
|
32
|
-
why: '
|
|
32
|
+
why: '7.0.0: the front end has no tests (test rules removed, FE_NO_TESTS R97 in hfs); no-vietnamese-in-source (R91).'
|
|
33
33
|
'@starci/stylelint-canon':
|
|
34
|
-
version:
|
|
34
|
+
version: 2.0.0
|
|
35
35
|
group: starci
|
|
36
36
|
install: registry
|
|
37
37
|
side: fe
|
|
38
38
|
source: packages/stylelint/package.json
|
|
39
|
-
why:
|
|
39
|
+
why: '2.0.0 adds status-contrast (HeroUI soft pairs measured per theme), fixes brand-layer-shape on the shared :root,.light,.dark block and the info soft pair, and derives appTokens with loadAppTokens(import.meta.url) for the managed one-line stylelint.config.mjs.'
|
|
40
40
|
'@starci/tsconfig':
|
|
41
|
-
version:
|
|
41
|
+
version: 2.0.0
|
|
42
42
|
group: starci
|
|
43
43
|
install: registry
|
|
44
44
|
side: both
|
|
@@ -50,31 +50,19 @@ pins:
|
|
|
50
50
|
side: both
|
|
51
51
|
source: packages/prettier-config/package.json
|
|
52
52
|
'@starci/jest-preset':
|
|
53
|
-
version:
|
|
53
|
+
version: 2.1.0
|
|
54
54
|
group: starci
|
|
55
55
|
install: registry
|
|
56
56
|
side: be
|
|
57
57
|
source: packages/jest-preset/package.json
|
|
58
|
-
why:
|
|
59
|
-
'@starci/vitest-preset':
|
|
60
|
-
version: 1.0.0
|
|
61
|
-
group: starci
|
|
62
|
-
install: registry
|
|
63
|
-
side: fe
|
|
64
|
-
source: packages/vitest-preset/package.json
|
|
65
|
-
'@starci/playwright-preset':
|
|
66
|
-
version: 1.0.0
|
|
67
|
-
group: starci
|
|
68
|
-
install: registry
|
|
69
|
-
side: fe
|
|
70
|
-
source: packages/playwright-preset/package.json
|
|
58
|
+
why: '2.1.0: four projects on the test world, the unit kit (mockEntityManager, fakeTransaction, fakeIds, FakeClock, Outcome matchers) and the recordingOutbox claim side.'
|
|
71
59
|
'@starci/hfs':
|
|
72
|
-
version:
|
|
60
|
+
version: 2.0.1
|
|
73
61
|
group: starci
|
|
74
62
|
install: registry
|
|
75
63
|
side: both
|
|
76
64
|
source: packages/hfs/package.json
|
|
77
|
-
why: the
|
|
65
|
+
why: '2.0.0 (C0 release): the BE-CONVENTION machine, emit-contracts (GraphQL SDL and OpenAPI from the typed operation table), the four-project test layout, FE has no tests, repo.scripts slot, secrets guard in work-hygiene, rule ids R<2-3 digits>.'
|
|
78
66
|
# --- tooling
|
|
79
67
|
typescript:
|
|
80
68
|
version: 5.9.3
|
|
@@ -105,7 +93,7 @@ pins:
|
|
|
105
93
|
version: 7.1.1
|
|
106
94
|
group: tooling
|
|
107
95
|
side: fe
|
|
108
|
-
why: '
|
|
96
|
+
why: '2.0.0 (C0 release): the BE-CONVENTION machine, emit-contracts (GraphQL SDL and OpenAPI from the typed operation table), the four-project test layout, FE has no tests, repo.scripts slot, secrets guard in work-hygiene, rule ids R<2-3 digits>.'
|
|
109
97
|
'@types/node':
|
|
110
98
|
version: 22.20.4
|
|
111
99
|
group: tooling
|
|
@@ -124,36 +112,6 @@ pins:
|
|
|
124
112
|
version: 29.5.14
|
|
125
113
|
group: test
|
|
126
114
|
side: be
|
|
127
|
-
vitest:
|
|
128
|
-
version: 3.2.7
|
|
129
|
-
group: test
|
|
130
|
-
side: fe
|
|
131
|
-
'@vitest/coverage-v8':
|
|
132
|
-
version: 3.2.7
|
|
133
|
-
group: test
|
|
134
|
-
side: fe
|
|
135
|
-
'@playwright/test':
|
|
136
|
-
version: 1.63.0
|
|
137
|
-
group: test
|
|
138
|
-
side: fe
|
|
139
|
-
why: nivo-fe pins 1.51.1 and starci-next-fe 1.63.0; the newer wins and the viewport projects need no older API.
|
|
140
|
-
jsdom:
|
|
141
|
-
version: 29.1.1
|
|
142
|
-
group: test
|
|
143
|
-
side: fe
|
|
144
|
-
'@vitejs/plugin-react':
|
|
145
|
-
version: 5.2.0
|
|
146
|
-
group: test
|
|
147
|
-
side: fe
|
|
148
|
-
'@testing-library/react':
|
|
149
|
-
version: 16.3.3
|
|
150
|
-
group: test
|
|
151
|
-
side: fe
|
|
152
|
-
why: nivo-fe resolves 16.3.2, the other two 16.3.3.
|
|
153
|
-
'@testing-library/jest-dom':
|
|
154
|
-
version: 7.0.1
|
|
155
|
-
group: test
|
|
156
|
-
side: fe
|
|
157
115
|
# --- framework
|
|
158
116
|
next:
|
|
159
117
|
version: 16.1.6
|
|
@@ -188,7 +146,7 @@ pins:
|
|
|
188
146
|
version: 11.1.1
|
|
189
147
|
group: framework
|
|
190
148
|
side: be
|
|
191
|
-
why: the
|
|
149
|
+
why: readiness probes with dependency indicators use Terminus (the liveness route of the hfs sync --init skeleton does not, being a thin door over the liveness service); nivo-backend, starci-next and mia-mia-backend all resolve 11.1.1.
|
|
192
150
|
next-intl:
|
|
193
151
|
version: 4.13.6
|
|
194
152
|
group: framework
|
|
@@ -198,7 +156,7 @@ pins:
|
|
|
198
156
|
version: 7.3.0
|
|
199
157
|
group: tooling
|
|
200
158
|
side: be
|
|
201
|
-
why: the
|
|
159
|
+
why: the e2e world of a back end calls the app over HTTP (/health/live in the skeleton); starci-next and mia-mia-backend resolve 7.3.0, nivo-backend 7.2.2.
|
|
202
160
|
# --- ui
|
|
203
161
|
'@heroui/react':
|
|
204
162
|
version: 3.2.6
|