@sema-agent/server 7.4.0 → 7.5.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 (133) hide show
  1. package/USAGE.md +43 -0
  2. package/dist/approval-card.d.ts +15 -3
  3. package/dist/approval-card.js +41 -7
  4. package/dist/approval-reconciler.d.ts +108 -11
  5. package/dist/approval-reconciler.js +146 -19
  6. package/dist/boot/coordinators.js +10 -2
  7. package/dist/boot/org-memory.d.ts +6 -0
  8. package/dist/boot/org-memory.js +1 -1
  9. package/dist/boot/reapers.d.ts +2 -0
  10. package/dist/boot/reapers.js +11 -4
  11. package/dist/boot/resolve-spec.d.ts +3 -2
  12. package/dist/boot/resolve-spec.js +132 -32
  13. package/dist/boot/runner-deps.d.ts +23 -1
  14. package/dist/boot/runner-deps.js +8 -11
  15. package/dist/boot/workflow-orchestration.d.ts +8 -3
  16. package/dist/boot/workflow-orchestration.js +23 -1
  17. package/dist/config-center/apply-effective.js +33 -10
  18. package/dist/config-types.d.ts +24 -8
  19. package/dist/config.d.ts +6 -1
  20. package/dist/config.js +56 -11
  21. package/dist/env-facts.d.ts +3 -1
  22. package/dist/env-facts.js +3 -1
  23. package/dist/fleet/fleet-bus.d.ts +6 -1
  24. package/dist/fleet/fleet-bus.js +25 -3
  25. package/dist/governance-ask-marks.d.ts +31 -0
  26. package/dist/governance-ask-marks.js +122 -0
  27. package/dist/hooks/hook-runner.d.ts +28 -0
  28. package/dist/hooks/hook-runner.js +149 -25
  29. package/dist/http/routes/diagnostics.js +10 -5
  30. package/dist/http/routes/memory-policy.d.ts +2 -1
  31. package/dist/http/routes/memory-policy.js +77 -13
  32. package/dist/http/routes/runs.js +1 -1
  33. package/dist/http/routes/tasks.js +59 -22
  34. package/dist/http/server.d.ts +5 -0
  35. package/dist/http/server.js +23 -12
  36. package/dist/http/wire-types.d.ts +7 -2
  37. package/dist/main.js +17 -5
  38. package/dist/observability/fail-open.d.ts +13 -2
  39. package/dist/observability/fail-open.js +15 -4
  40. package/dist/observability/prompt-manifest.d.ts +5 -1
  41. package/dist/orchestration/workflow-notify-journal.d.ts +57 -1
  42. package/dist/orchestration/workflow-notify-journal.js +137 -32
  43. package/dist/parked-decide.js +9 -4
  44. package/dist/plugins/approval-ask-store-memory.d.ts +2 -2
  45. package/dist/plugins/approval-ask-store-memory.js +3 -2
  46. package/dist/plugins/approval-ask-store-sql.d.ts +27 -5
  47. package/dist/plugins/approval-ask-store-sql.js +9 -2
  48. package/dist/plugins/background-shell-support.d.ts +1 -1
  49. package/dist/plugins/background-shell-support.js +2 -2
  50. package/dist/plugins/checkpoint-store-sql.d.ts +62 -6
  51. package/dist/plugins/checkpoint-store-sql.js +71 -11
  52. package/dist/plugins/local-checkpoint-store.d.ts +20 -1
  53. package/dist/plugins/local-checkpoint-store.js +19 -0
  54. package/dist/plugins/mailbox-store-sql.d.ts +4 -10
  55. package/dist/plugins/mailbox-store-sql.js +57 -4
  56. package/dist/runs.d.ts +8 -0
  57. package/dist/runs.js +15 -2
  58. package/dist/runtime-governance.d.ts +18 -0
  59. package/dist/runtime-governance.js +90 -3
  60. package/dist/task-settings.d.ts +3 -9
  61. package/dist/task-settings.js +16 -13
  62. package/dist/tool-approval.d.ts +33 -6
  63. package/dist/tool-approval.js +80 -23
  64. package/dist/trace/core-keyset-guard.d.ts +17 -3
  65. package/package.json +3 -3
  66. package/dist/boot/lexical-path-env.d.ts +0 -10
  67. package/dist/boot/lexical-path-env.js +0 -88
  68. package/dist/capabilities/oa-tools.d.ts +0 -15
  69. package/dist/capabilities/oa-tools.js +0 -54
  70. package/dist/finance/cost-taxonomy.d.ts +0 -34
  71. package/dist/finance/cost-taxonomy.js +0 -26
  72. package/dist/plugins/approval-store-sql.d.ts +0 -116
  73. package/dist/plugins/approval-store-sql.js +0 -151
  74. package/dist/plugins/file-workflow-journal-store.d.ts +0 -12
  75. package/dist/plugins/file-workflow-journal-store.js +0 -12
  76. package/dist/plugins/pg-approval-store.d.ts +0 -9
  77. package/dist/plugins/pg-approval-store.js +0 -9
  78. package/dist/plugins/pg-breaker-state.d.ts +0 -8
  79. package/dist/plugins/pg-breaker-state.js +0 -8
  80. package/dist/plugins/pg-checkpoint-store.d.ts +0 -10
  81. package/dist/plugins/pg-checkpoint-store.js +0 -10
  82. package/dist/plugins/pg-file-snapshot-store.d.ts +0 -8
  83. package/dist/plugins/pg-file-snapshot-store.js +0 -8
  84. package/dist/plugins/pg-image-bake.d.ts +0 -12
  85. package/dist/plugins/pg-image-bake.js +0 -11
  86. package/dist/plugins/pg-image-index.d.ts +0 -12
  87. package/dist/plugins/pg-image-index.js +0 -11
  88. package/dist/plugins/pg-outcome-ledger.d.ts +0 -12
  89. package/dist/plugins/pg-outcome-ledger.js +0 -11
  90. package/dist/plugins/pg-resume-anchor-store.d.ts +0 -7
  91. package/dist/plugins/pg-resume-anchor-store.js +0 -7
  92. package/dist/plugins/pg-run-store.d.ts +0 -9
  93. package/dist/plugins/pg-run-store.js +0 -9
  94. package/dist/plugins/pg-session-policy-store.d.ts +0 -7
  95. package/dist/plugins/pg-session-policy-store.js +0 -7
  96. package/dist/plugins/pg-session-store.d.ts +0 -12
  97. package/dist/plugins/pg-session-store.js +0 -12
  98. package/dist/plugins/pg-tool-result-store.d.ts +0 -9
  99. package/dist/plugins/pg-tool-result-store.js +0 -9
  100. package/dist/plugins/pg-workflow-journal-store.d.ts +0 -9
  101. package/dist/plugins/pg-workflow-journal-store.js +0 -9
  102. package/dist/plugins/pg-workflow-run-store.d.ts +0 -9
  103. package/dist/plugins/pg-workflow-run-store.js +0 -9
  104. package/dist/plugins/tidb-approval-store.d.ts +0 -8
  105. package/dist/plugins/tidb-approval-store.js +0 -8
  106. package/dist/plugins/tidb-breaker-state.d.ts +0 -7
  107. package/dist/plugins/tidb-breaker-state.js +0 -7
  108. package/dist/plugins/tidb-checkpoint-store.d.ts +0 -9
  109. package/dist/plugins/tidb-checkpoint-store.js +0 -9
  110. package/dist/plugins/tidb-file-snapshot-store.d.ts +0 -8
  111. package/dist/plugins/tidb-file-snapshot-store.js +0 -8
  112. package/dist/plugins/tidb-image-bake.d.ts +0 -12
  113. package/dist/plugins/tidb-image-bake.js +0 -11
  114. package/dist/plugins/tidb-image-index.d.ts +0 -12
  115. package/dist/plugins/tidb-image-index.js +0 -11
  116. package/dist/plugins/tidb-outcome-ledger.d.ts +0 -12
  117. package/dist/plugins/tidb-outcome-ledger.js +0 -12
  118. package/dist/plugins/tidb-resume-anchor-store.d.ts +0 -7
  119. package/dist/plugins/tidb-resume-anchor-store.js +0 -7
  120. package/dist/plugins/tidb-run-store.d.ts +0 -10
  121. package/dist/plugins/tidb-run-store.js +0 -9
  122. package/dist/plugins/tidb-session-policy-store.d.ts +0 -7
  123. package/dist/plugins/tidb-session-policy-store.js +0 -7
  124. package/dist/plugins/tidb-tool-result-store.d.ts +0 -8
  125. package/dist/plugins/tidb-tool-result-store.js +0 -10
  126. package/dist/plugins/tidb-workflow-journal-store.d.ts +0 -9
  127. package/dist/plugins/tidb-workflow-journal-store.js +0 -9
  128. package/dist/plugins/tidb-workflow-run-store.d.ts +0 -10
  129. package/dist/plugins/tidb-workflow-run-store.js +0 -10
  130. package/dist/plugins/workflow-journal-limits.d.ts +0 -12
  131. package/dist/plugins/workflow-journal-limits.js +0 -12
  132. package/dist/sema-registry.d.ts +0 -41
  133. package/dist/sema-registry.js +0 -40
@@ -1,9 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 collapse). The real implementation is the single-file dual-dialect
3
- * {@link import("./workflow-journal-store-sql.js").SqlWorkflowJournalStore} — see that file for the durable
4
- * {@link WorkflowJournalStore} contract, the schema, and the TiDB/PG dialect-delta ledger. This name (and ctor
5
- * arity: `(pool: PgPool)`) survives unchanged so every consumer (store-backend.ts, the extreme/integration/
6
- * resume-fork-probe suites) is untouched.
7
- */
8
- export { PgWorkflowJournalStore } from "./workflow-journal-store-sql.js";
9
- //# sourceMappingURL=pg-workflow-journal-store.d.ts.map
@@ -1,9 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 collapse). The real implementation is the single-file dual-dialect
3
- * {@link import("./workflow-journal-store-sql.js").SqlWorkflowJournalStore} — see that file for the durable
4
- * {@link WorkflowJournalStore} contract, the schema, and the TiDB/PG dialect-delta ledger. This name (and ctor
5
- * arity: `(pool: PgPool)`) survives unchanged so every consumer (store-backend.ts, the extreme/integration/
6
- * resume-fork-probe suites) is untouched.
7
- */
8
- export { PgWorkflowJournalStore } from "./workflow-journal-store-sql.js";
9
- //# sourceMappingURL=pg-workflow-journal-store.js.map
@@ -1,9 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 扇出): the PG `WorkflowRunStore`/`WorkflowCompletionInbox`/
3
- * `WorkflowNotifyJournalStore` twins now live collapsed with their TiDB dialect siblings in the
4
- * single-file dual-dialect `workflow-run-store-sql.ts` (design doc + dialect-delta ledger there).
5
- * Class names and ctor arity stay EXACTLY as they were — every consumer (store-backend.ts, the
6
- * DB-integration suite) imports from THIS path unchanged.
7
- */
8
- export { PgWorkflowRunStore, PgWorkflowCompletionInbox, PgWorkflowNotifyJournalStore } from "./workflow-run-store-sql.js";
9
- //# sourceMappingURL=pg-workflow-run-store.d.ts.map
@@ -1,9 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 扇出): the PG `WorkflowRunStore`/`WorkflowCompletionInbox`/
3
- * `WorkflowNotifyJournalStore` twins now live collapsed with their TiDB dialect siblings in the
4
- * single-file dual-dialect `workflow-run-store-sql.ts` (design doc + dialect-delta ledger there).
5
- * Class names and ctor arity stay EXACTLY as they were — every consumer (store-backend.ts, the
6
- * DB-integration suite) imports from THIS path unchanged.
7
- */
8
- export { PgWorkflowRunStore, PgWorkflowCompletionInbox, PgWorkflowNotifyJournalStore } from "./workflow-run-store-sql.js";
9
- //# sourceMappingURL=pg-workflow-run-store.js.map
@@ -1,8 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 收编 — see src/plugins/approval-store-sql.ts for the
3
- * implementation, now SINGLE-FILE DUAL-DIALECT). Class name, ctor arity, and every exported
4
- * type/helper stay EXACTLY as they were so no consumer (store-backend.ts, src/index.ts, the
5
- * approval/audit/security-coverage suites) has to move.
6
- */
7
- export { TiDBApprovalStore, mapRow, type ApprovalRow, type ApprovalStatus, } from "./approval-store-sql.js";
8
- //# sourceMappingURL=tidb-approval-store.d.ts.map
@@ -1,8 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 收编 — see src/plugins/approval-store-sql.ts for the
3
- * implementation, now SINGLE-FILE DUAL-DIALECT). Class name, ctor arity, and every exported
4
- * type/helper stay EXACTLY as they were so no consumer (store-backend.ts, src/index.ts, the
5
- * approval/audit/security-coverage suites) has to move.
6
- */
7
- export { TiDBApprovalStore, mapRow, } from "./approval-store-sql.js";
8
- //# sourceMappingURL=tidb-approval-store.js.map
@@ -1,7 +0,0 @@
1
- /**
2
- * Re-export shim (design/158 A12 收编) — the real implementation moved to breaker-state-sql.ts
3
- * (single-file dual-dialect: `SqlBreakerState` + the `TiDBBreakerState`/`PgBreakerState` ctor subclasses).
4
- * Kept so every consumer's `from "./tidb-breaker-state.js"` import keeps working unchanged.
5
- */
6
- export { TiDBBreakerState } from "./breaker-state-sql.js";
7
- //# sourceMappingURL=tidb-breaker-state.d.ts.map
@@ -1,7 +0,0 @@
1
- /**
2
- * Re-export shim (design/158 A12 收编) — the real implementation moved to breaker-state-sql.ts
3
- * (single-file dual-dialect: `SqlBreakerState` + the `TiDBBreakerState`/`PgBreakerState` ctor subclasses).
4
- * Kept so every consumer's `from "./tidb-breaker-state.js"` import keeps working unchanged.
5
- */
6
- export { TiDBBreakerState } from "./breaker-state-sql.js";
7
- //# sourceMappingURL=tidb-breaker-state.js.map
@@ -1,9 +0,0 @@
1
- /**
2
- * MySQL-protocol (TiDB) `CheckpointStore` — the implementation now lives in the single-file dual-dialect
3
- * `checkpoint-store-sql.ts` (design/158 A12 定型半场). This file is the historical import path: the class
4
- * name, ctor shape and the backend-NEUTRAL helpers the LOCAL twin shares (TERMINAL_BACKSTOP_MS /
5
- * TERMINAL_GRACE_MS / tokenFingerprint / boundedToolInput / PendingCheckpoint) are re-exported unchanged,
6
- * so local-checkpoint-store.ts, store-backend.ts, the dogfood script and every suite are untouched.
7
- */
8
- export { TiDBCheckpointStore, SqlCheckpointStore, TERMINAL_BACKSTOP_MS, TERMINAL_GRACE_MS, tokenFingerprint, boundedToolInput, type PendingCheckpoint, } from "./checkpoint-store-sql.js";
9
- //# sourceMappingURL=tidb-checkpoint-store.d.ts.map
@@ -1,9 +0,0 @@
1
- /**
2
- * MySQL-protocol (TiDB) `CheckpointStore` — the implementation now lives in the single-file dual-dialect
3
- * `checkpoint-store-sql.ts` (design/158 A12 定型半场). This file is the historical import path: the class
4
- * name, ctor shape and the backend-NEUTRAL helpers the LOCAL twin shares (TERMINAL_BACKSTOP_MS /
5
- * TERMINAL_GRACE_MS / tokenFingerprint / boundedToolInput / PendingCheckpoint) are re-exported unchanged,
6
- * so local-checkpoint-store.ts, store-backend.ts, the dogfood script and every suite are untouched.
7
- */
8
- export { TiDBCheckpointStore, SqlCheckpointStore, TERMINAL_BACKSTOP_MS, TERMINAL_GRACE_MS, tokenFingerprint, boundedToolInput, } from "./checkpoint-store-sql.js";
9
- //# sourceMappingURL=tidb-checkpoint-store.js.map
@@ -1,8 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 定型半场) — the real implementation collapsed into
3
- * `file-snapshot-store-sql.ts` (single file, dual dialect). Kept so every existing import path
4
- * (store-backend.ts, the migration script, the contract/integration/minio-equivalence suites) is
5
- * untouched: same class name, same ctor arity, same exported surface.
6
- */
7
- export { TiDBFileSnapshotStore } from "./file-snapshot-store-sql.js";
8
- //# sourceMappingURL=tidb-file-snapshot-store.d.ts.map
@@ -1,8 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 定型半场) — the real implementation collapsed into
3
- * `file-snapshot-store-sql.ts` (single file, dual dialect). Kept so every existing import path
4
- * (store-backend.ts, the migration script, the contract/integration/minio-equivalence suites) is
5
- * untouched: same class name, same ctor arity, same exported surface.
6
- */
7
- export { TiDBFileSnapshotStore } from "./file-snapshot-store-sql.js";
8
- //# sourceMappingURL=tidb-file-snapshot-store.js.map
@@ -1,12 +0,0 @@
1
- /**
2
- * MySQL-protocol (TiDB) BAKE store — the implementation now lives in the single-file dual-dialect
3
- * `image-bake-store-sql.ts` (design/158 A12 定型半场). This file is the historical import path: the
4
- * class name, ctor shape and every re-exported contract are unchanged, so no consumer moved.
5
- *
6
- * New code should import from `./image-bake-store-sql.js` (both dialects) and take its CONTRACTS from
7
- * `./store-contracts.js` (backend-neutral, design/158 A3 沉底).
8
- */
9
- export { TiDBImageBake, SqlImageBake } from "./image-bake-store-sql.js";
10
- export type { BakeStatus, BakeState, BakeErrorCode, BakeRecord, BakeEvent, CreateBakeInput, BakeTerminal, BakeRow, } from "./store-contracts.js";
11
- export { mapBakeRow as mapRow, BAKE_SELECT_COLS as SELECT_COLS } from "./store-contracts.js";
12
- //# sourceMappingURL=tidb-image-bake.d.ts.map
@@ -1,11 +0,0 @@
1
- /**
2
- * MySQL-protocol (TiDB) BAKE store — the implementation now lives in the single-file dual-dialect
3
- * `image-bake-store-sql.ts` (design/158 A12 定型半场). This file is the historical import path: the
4
- * class name, ctor shape and every re-exported contract are unchanged, so no consumer moved.
5
- *
6
- * New code should import from `./image-bake-store-sql.js` (both dialects) and take its CONTRACTS from
7
- * `./store-contracts.js` (backend-neutral, design/158 A3 沉底).
8
- */
9
- export { TiDBImageBake, SqlImageBake } from "./image-bake-store-sql.js";
10
- export { mapBakeRow as mapRow, BAKE_SELECT_COLS as SELECT_COLS } from "./store-contracts.js";
11
- //# sourceMappingURL=tidb-image-bake.js.map
@@ -1,12 +0,0 @@
1
- /**
2
- * Sandbox-image-pool INDEX store (IMAGE-API-DESIGN.md §1, pool design §8).
3
- *
4
- * Thin re-export shim (design/158 A12 定型半场): the real implementation is the single-file dual-dialect
5
- * `image-index-sql.ts` (`SqlImageIndex` + this file's `TiDBImageIndex` ctor subclass). Class name, ctor
6
- * arity, and the exported type/helper surface are UNCHANGED — every consumer (store-backend.ts, the unit +
7
- * real-DB integration suites) imports from here exactly as before.
8
- */
9
- export { TiDBImageIndex } from "./image-index-sql.js";
10
- export type { ImageNestedBuildMode, ImageCapabilities, ImagePodContract, ImageStatus, ImageVisibility, ImageIndexEntry, ImageIndexUpsert, ImageViewer, ImageListFilter, ImageRow, } from "./store-contracts.js";
11
- export { mapImageRow as mapRow } from "./store-contracts.js";
12
- //# sourceMappingURL=tidb-image-index.d.ts.map
@@ -1,11 +0,0 @@
1
- /**
2
- * Sandbox-image-pool INDEX store (IMAGE-API-DESIGN.md §1, pool design §8).
3
- *
4
- * Thin re-export shim (design/158 A12 定型半场): the real implementation is the single-file dual-dialect
5
- * `image-index-sql.ts` (`SqlImageIndex` + this file's `TiDBImageIndex` ctor subclass). Class name, ctor
6
- * arity, and the exported type/helper surface are UNCHANGED — every consumer (store-backend.ts, the unit +
7
- * real-DB integration suites) imports from here exactly as before.
8
- */
9
- export { TiDBImageIndex } from "./image-index-sql.js";
10
- export { mapImageRow as mapRow } from "./store-contracts.js";
11
- //# sourceMappingURL=tidb-image-index.js.map
@@ -1,12 +0,0 @@
1
- /**
2
- * MySQL-protocol (TiDB) outcome ledger — the implementation now lives in the single-file dual-dialect
3
- * `outcome-ledger-sql.ts` (design/158 A12 定型半场), alongside its PG twin so the dialect deltas
4
- * (placeholders, JSON encode, the AVG boolean-coercion divergence) read side by side instead of
5
- * drifting across two files.
6
- *
7
- * This file is the historical import path: class name, ctor shape, the shared types and the pure
8
- * helpers (`taskSignature` / `deriveOutcome` / `coreOutcomeToLedgerRow`) are unchanged, so
9
- * store-backend.ts, the pg twin, and every suite are untouched.
10
- */
11
- export { TiDBOutcomeLedger, taskSignature, deriveOutcome, coreOutcomeToLedgerRow, type MechanicalOutcome, type LlmAssistedOutcome, type SignatureInputs, type RunStatus, type TaskOutcome, } from "./outcome-ledger-sql.js";
12
- //# sourceMappingURL=tidb-outcome-ledger.d.ts.map
@@ -1,12 +0,0 @@
1
- /**
2
- * MySQL-protocol (TiDB) outcome ledger — the implementation now lives in the single-file dual-dialect
3
- * `outcome-ledger-sql.ts` (design/158 A12 定型半场), alongside its PG twin so the dialect deltas
4
- * (placeholders, JSON encode, the AVG boolean-coercion divergence) read side by side instead of
5
- * drifting across two files.
6
- *
7
- * This file is the historical import path: class name, ctor shape, the shared types and the pure
8
- * helpers (`taskSignature` / `deriveOutcome` / `coreOutcomeToLedgerRow`) are unchanged, so
9
- * store-backend.ts, the pg twin, and every suite are untouched.
10
- */
11
- export { TiDBOutcomeLedger, taskSignature, deriveOutcome, coreOutcomeToLedgerRow, } from "./outcome-ledger-sql.js";
12
- //# sourceMappingURL=tidb-outcome-ledger.js.map
@@ -1,7 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 收编) — the real implementation moved to the single-file
3
- * dual-dialect `resume-anchor-store-sql.ts` (shared with the PG twin via `SqlDriver`). Kept so
4
- * consumers importing this path (store-backend.ts, the resume-anchor integration suite) don't move.
5
- */
6
- export { TiDBResumeAnchorStore } from "./resume-anchor-store-sql.js";
7
- //# sourceMappingURL=tidb-resume-anchor-store.d.ts.map
@@ -1,7 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 收编) — the real implementation moved to the single-file
3
- * dual-dialect `resume-anchor-store-sql.ts` (shared with the PG twin via `SqlDriver`). Kept so
4
- * consumers importing this path (store-backend.ts, the resume-anchor integration suite) don't move.
5
- */
6
- export { TiDBResumeAnchorStore } from "./resume-anchor-store-sql.js";
7
- //# sourceMappingURL=tidb-resume-anchor-store.js.map
@@ -1,10 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 定型半场 collapse): the real implementation now lives in
3
- * `run-store-sql.ts` (single-file dual-dialect — TiDB + PG share one `SqlRunStore` body, dialect deltas
4
- * kept EXPLICIT per statement). `TiDBRunStore`'s class name/ctor arity/exported types are unchanged so
5
- * every existing consumer (store-backend.ts, src/index.ts, the run/reaper/session/usage suites) needs
6
- * ZERO changes. New code should import from `run-store-sql.ts` directly.
7
- */
8
- export { TiDBRunStore } from "./run-store-sql.js";
9
- export type { RunRecord, SessionSummary, RunEvent } from "./store-contracts.js";
10
- //# sourceMappingURL=tidb-run-store.d.ts.map
@@ -1,9 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 定型半场 collapse): the real implementation now lives in
3
- * `run-store-sql.ts` (single-file dual-dialect — TiDB + PG share one `SqlRunStore` body, dialect deltas
4
- * kept EXPLICIT per statement). `TiDBRunStore`'s class name/ctor arity/exported types are unchanged so
5
- * every existing consumer (store-backend.ts, src/index.ts, the run/reaper/session/usage suites) needs
6
- * ZERO changes. New code should import from `run-store-sql.ts` directly.
7
- */
8
- export { TiDBRunStore } from "./run-store-sql.js";
9
- //# sourceMappingURL=tidb-run-store.js.map
@@ -1,7 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 收编) — the real implementation lives in the single-file
3
- * dual-dialect `session-policy-store-sql.ts` (`SqlSessionPolicyStore` + this file's historical
4
- * `TiDBSessionPolicyStore` ctor subclass). Kept so every consumer's import path is untouched.
5
- */
6
- export { TiDBSessionPolicyStore } from "./session-policy-store-sql.js";
7
- //# sourceMappingURL=tidb-session-policy-store.d.ts.map
@@ -1,7 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 收编) — the real implementation lives in the single-file
3
- * dual-dialect `session-policy-store-sql.ts` (`SqlSessionPolicyStore` + this file's historical
4
- * `TiDBSessionPolicyStore` ctor subclass). Kept so every consumer's import path is untouched.
5
- */
6
- export { TiDBSessionPolicyStore } from "./session-policy-store-sql.js";
7
- //# sourceMappingURL=tidb-session-policy-store.js.map
@@ -1,8 +0,0 @@
1
- /**
2
- * MySQL-protocol (TiDB) `ToolResultStore` — the implementation now lives in the single-file dual-dialect
3
- * `tool-result-store-sql.ts` (design/158 A12 定型半场). This file is the historical import path: the class
4
- * name and ctor shape are re-exported unchanged, so store-backend.ts and every suite are untouched.
5
- */
6
- export { TiDBToolResultStore, SqlToolResultStore } from "./tool-result-store-sql.js";
7
- export { escapeLike } from "./sql-escape.js";
8
- //# sourceMappingURL=tidb-tool-result-store.d.ts.map
@@ -1,10 +0,0 @@
1
- /**
2
- * MySQL-protocol (TiDB) `ToolResultStore` — the implementation now lives in the single-file dual-dialect
3
- * `tool-result-store-sql.ts` (design/158 A12 定型半场). This file is the historical import path: the class
4
- * name and ctor shape are re-exported unchanged, so store-backend.ts and every suite are untouched.
5
- */
6
- export { TiDBToolResultStore, SqlToolResultStore } from "./tool-result-store-sql.js";
7
- // Back-compat re-export: escapeLike LIVES in sql-escape.ts (design/158 A3, backend-neutral leaf);
8
- // import from there in new code.
9
- export { escapeLike } from "./sql-escape.js";
10
- //# sourceMappingURL=tidb-tool-result-store.js.map
@@ -1,9 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 collapse). The real implementation is the single-file dual-dialect
3
- * {@link import("./workflow-journal-store-sql.js").SqlWorkflowJournalStore} — see that file for the durable
4
- * {@link WorkflowJournalStore} contract, the schema, and the TiDB/PG dialect-delta ledger. This name (and ctor
5
- * arity: `(pool: MySqlPool)`) survives unchanged so every consumer (store-backend.ts, the extreme/integration/
6
- * resume-fork-probe suites) is untouched.
7
- */
8
- export { TiDBWorkflowJournalStore } from "./workflow-journal-store-sql.js";
9
- //# sourceMappingURL=tidb-workflow-journal-store.d.ts.map
@@ -1,9 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 collapse). The real implementation is the single-file dual-dialect
3
- * {@link import("./workflow-journal-store-sql.js").SqlWorkflowJournalStore} — see that file for the durable
4
- * {@link WorkflowJournalStore} contract, the schema, and the TiDB/PG dialect-delta ledger. This name (and ctor
5
- * arity: `(pool: MySqlPool)`) survives unchanged so every consumer (store-backend.ts, the extreme/integration/
6
- * resume-fork-probe suites) is untouched.
7
- */
8
- export { TiDBWorkflowJournalStore } from "./workflow-journal-store-sql.js";
9
- //# sourceMappingURL=tidb-workflow-journal-store.js.map
@@ -1,10 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 扇出): the TiDB `WorkflowRunStore`/`WorkflowCompletionInbox`/
3
- * `WorkflowNotifyJournalStore` twins now live collapsed with their PG dialect siblings in the
4
- * single-file dual-dialect `workflow-run-store-sql.ts`. Class names, ctor arity, and the exported
5
- * `MAX_RUN_BLOB_BYTES` / `slimOversizeRun` / `InboxWarn` surface stay EXACTLY as they were — every
6
- * consumer (store-backend.ts, the DB-integration + slim-oversize-run suites) imports from THIS path
7
- * unchanged.
8
- */
9
- export { MAX_RUN_BLOB_BYTES, slimOversizeRun, type InboxWarn, TiDBWorkflowRunStore, TiDBWorkflowCompletionInbox, TiDBWorkflowNotifyJournalStore, } from "./workflow-run-store-sql.js";
10
- //# sourceMappingURL=tidb-workflow-run-store.d.ts.map
@@ -1,10 +0,0 @@
1
- /**
2
- * Thin re-export shim (design/158 A12 扇出): the TiDB `WorkflowRunStore`/`WorkflowCompletionInbox`/
3
- * `WorkflowNotifyJournalStore` twins now live collapsed with their PG dialect siblings in the
4
- * single-file dual-dialect `workflow-run-store-sql.ts`. Class names, ctor arity, and the exported
5
- * `MAX_RUN_BLOB_BYTES` / `slimOversizeRun` / `InboxWarn` surface stay EXACTLY as they were — every
6
- * consumer (store-backend.ts, the DB-integration + slim-oversize-run suites) imports from THIS path
7
- * unchanged.
8
- */
9
- export { MAX_RUN_BLOB_BYTES, slimOversizeRun, TiDBWorkflowRunStore, TiDBWorkflowCompletionInbox, TiDBWorkflowNotifyJournalStore, } from "./workflow-run-store-sql.js";
10
- //# sourceMappingURL=tidb-workflow-run-store.js.map
@@ -1,12 +0,0 @@
1
- /**
2
- * SVC-2 — the shared size bound for a journaled workflow-agent result, so all THREE backends (tidb/pg SQL
3
- * twins here + core's FileWorkflowJournalStore) DEGRADE IDENTICALLY on an oversize TaskResult: skip-journal
4
- * (a no-op, never insert/throw) — the agent's ordinal is simply not cached and a resume re-runs that one
5
- * agent live. Rationale (TiDB ~6 MiB txn-entry-size-limit vs PG/file no such limit) documented at the source.
6
- *
7
- * Now a RE-EXPORT of core's copy: the constant + helper moved to core with the FileWorkflowJournalStore
8
- * adoption (core 1.223.0 — core inlined them into its store file and exports both).
9
- * The SQL twins import from here unchanged; one source of truth for the byte-match contract.
10
- */
11
- export { MAX_JOURNAL_RESULT_BYTES, oversizeJournalResult } from "@sema-agent/core";
12
- //# sourceMappingURL=workflow-journal-limits.d.ts.map
@@ -1,12 +0,0 @@
1
- /**
2
- * SVC-2 — the shared size bound for a journaled workflow-agent result, so all THREE backends (tidb/pg SQL
3
- * twins here + core's FileWorkflowJournalStore) DEGRADE IDENTICALLY on an oversize TaskResult: skip-journal
4
- * (a no-op, never insert/throw) — the agent's ordinal is simply not cached and a resume re-runs that one
5
- * agent live. Rationale (TiDB ~6 MiB txn-entry-size-limit vs PG/file no such limit) documented at the source.
6
- *
7
- * Now a RE-EXPORT of core's copy: the constant + helper moved to core with the FileWorkflowJournalStore
8
- * adoption (core 1.223.0 — core inlined them into its store file and exports both).
9
- * The SQL twins import from here unchanged; one source of truth for the byte-match contract.
10
- */
11
- export { MAX_JOURNAL_RESULT_BYTES, oversizeJournalResult } from "@sema-agent/core";
12
- //# sourceMappingURL=workflow-journal-limits.js.map
@@ -1,41 +0,0 @@
1
- /**
2
- * Sema-registry adapter — pull the effective config from sema-registry and apply it OVER the
3
- * env-derived defaults (env = fallback, center = override). Follows the "universal internal
4
- * schema → translate at the boundary" pattern, with our security boundary kept:
5
- *
6
- * - the CENTER owns the LOGICAL config: the model roster (names/capabilities/tier), the role map,
7
- * and team templates;
8
- * - the SERVICE env still owns the SECRETS: API keys stay in env (the center never stores a secret);
9
- * keys are per-model via `apiKeyEnv` → `config.modelApiKeyEnv` → the spec's `getApiKeyAndHeaders`
10
- * (core 1.45), so each model/cascade-rung authenticates with its own upstream key.
11
- *
12
- * Per-model `baseUrl` IS transported (a catalog model may live on a different gateway;
13
- * core brain honors model.baseUrl, absent = "" = boot-env endpoint).
14
- *
15
- * Hot-reload status (复审 2026-07-29 P1-11 — 亲读判定,取代此处旧的 "models/roles are restart-to-apply"
16
- * TODO, which went stale when `mutateInPlace` landed):
17
- * - models/roles/roster/teams/projects/autonomy — **HOT**. `applyEffective` mutates `config.models`/
18
- * `config.roles` IN PLACE, and core's Runner reads `this.deps.models/roles` per task off that very
19
- * reference. Both brains re-resolve `model.baseUrl || config.baseUrl` inside `buildRequest()` on every
20
- * call (core 2.1.0 `brain/openai.js` + `brain/anthropic.js`), so a moved gateway takes effect on the
21
- * next task with no restart.
22
- * - the same plane under a **tier-frozen** Runner — deferred, not hot: core expands a PRIVATE catalog copy
23
- * at construction, so `main` defers the whole plane and the `models-tiers` restart slice signals.
24
- * - **`degrade-route`** — the one genuinely boot-frozen catalog consumer left: reactive degrade
25
- * (`MODEL_DEGRADE_REACTIVE`) bakes the target Model + its gateway + its key into the brain composition
26
- * at boot. It cannot be hot-applied without rebuilding the brain, so it is registered on the existing
27
- * restartRequired /health contract instead (see `restart-signal.ts`). Fail-loud beats serving a stale
28
- * gateway silently on the rate-limit path.
29
- * - skills/mcp/scenarios/runtime-gates — restart-to-apply by construction (baked into the boot wiring).
30
- *
31
- * (design/158 A13, internal-lossless) This module is now a FACADE: the implementation lives in
32
- * `src/config-center/` split by responsibility group (HTTP client / EffectiveConfig application /
33
- * restart-signal detection / skills+MCP consumption). Every symbol below is re-exported UNCHANGED —
34
- * existing `from "./sema-registry.js"` / `from "../sema-registry.js"` imports need zero changes.
35
- */
36
- export { fetchEffective, fetchPrincipalCaps, ConfigCenterHttpError, fetchSkillContent, fetchPromptArtifact, fetchPromptBlob, } from "./config-center/http-client.js";
37
- export { mutateInPlace, applyEffective, applyRuntimeGates, applyRuntimeHot, resolveDefaultModelName, logEffectiveDiff, runtimeHasActiveGate, } from "./config-center/apply-effective.js";
38
- export { restartReasons, planeHasActiveTiers, modelPlaneChanged, type RestartSlice, type RestartSliceCtx, type RestartSignal, } from "./config-center/restart-signal.js";
39
- export { applyCenterSkills, resolveMcpServers, mcpForScenario } from "./config-center/skills-mcp.js";
40
- export type { CenterSkillManifest, CenterMcpServer, EffectiveConfig, ExecutionRuling, SessionMirrorRuling, } from "./config-center/types.js";
41
- //# sourceMappingURL=sema-registry.d.ts.map
@@ -1,40 +0,0 @@
1
- /**
2
- * Sema-registry adapter — pull the effective config from sema-registry and apply it OVER the
3
- * env-derived defaults (env = fallback, center = override). Follows the "universal internal
4
- * schema → translate at the boundary" pattern, with our security boundary kept:
5
- *
6
- * - the CENTER owns the LOGICAL config: the model roster (names/capabilities/tier), the role map,
7
- * and team templates;
8
- * - the SERVICE env still owns the SECRETS: API keys stay in env (the center never stores a secret);
9
- * keys are per-model via `apiKeyEnv` → `config.modelApiKeyEnv` → the spec's `getApiKeyAndHeaders`
10
- * (core 1.45), so each model/cascade-rung authenticates with its own upstream key.
11
- *
12
- * Per-model `baseUrl` IS transported (a catalog model may live on a different gateway;
13
- * core brain honors model.baseUrl, absent = "" = boot-env endpoint).
14
- *
15
- * Hot-reload status (复审 2026-07-29 P1-11 — 亲读判定,取代此处旧的 "models/roles are restart-to-apply"
16
- * TODO, which went stale when `mutateInPlace` landed):
17
- * - models/roles/roster/teams/projects/autonomy — **HOT**. `applyEffective` mutates `config.models`/
18
- * `config.roles` IN PLACE, and core's Runner reads `this.deps.models/roles` per task off that very
19
- * reference. Both brains re-resolve `model.baseUrl || config.baseUrl` inside `buildRequest()` on every
20
- * call (core 2.1.0 `brain/openai.js` + `brain/anthropic.js`), so a moved gateway takes effect on the
21
- * next task with no restart.
22
- * - the same plane under a **tier-frozen** Runner — deferred, not hot: core expands a PRIVATE catalog copy
23
- * at construction, so `main` defers the whole plane and the `models-tiers` restart slice signals.
24
- * - **`degrade-route`** — the one genuinely boot-frozen catalog consumer left: reactive degrade
25
- * (`MODEL_DEGRADE_REACTIVE`) bakes the target Model + its gateway + its key into the brain composition
26
- * at boot. It cannot be hot-applied without rebuilding the brain, so it is registered on the existing
27
- * restartRequired /health contract instead (see `restart-signal.ts`). Fail-loud beats serving a stale
28
- * gateway silently on the rate-limit path.
29
- * - skills/mcp/scenarios/runtime-gates — restart-to-apply by construction (baked into the boot wiring).
30
- *
31
- * (design/158 A13, internal-lossless) This module is now a FACADE: the implementation lives in
32
- * `src/config-center/` split by responsibility group (HTTP client / EffectiveConfig application /
33
- * restart-signal detection / skills+MCP consumption). Every symbol below is re-exported UNCHANGED —
34
- * existing `from "./sema-registry.js"` / `from "../sema-registry.js"` imports need zero changes.
35
- */
36
- export { fetchEffective, fetchPrincipalCaps, ConfigCenterHttpError, fetchSkillContent, fetchPromptArtifact, fetchPromptBlob, } from "./config-center/http-client.js";
37
- export { mutateInPlace, applyEffective, applyRuntimeGates, applyRuntimeHot, resolveDefaultModelName, logEffectiveDiff, runtimeHasActiveGate, } from "./config-center/apply-effective.js";
38
- export { restartReasons, planeHasActiveTiers, modelPlaneChanged, } from "./config-center/restart-signal.js";
39
- export { applyCenterSkills, resolveMcpServers, mcpForScenario } from "./config-center/skills-mcp.js";
40
- //# sourceMappingURL=sema-registry.js.map