@descryy/core 0.3.0 → 0.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.
- package/dist/budget/reply.d.ts +11 -46
- package/dist/budget/reply.d.ts.map +1 -1
- package/dist/budget/reply.js +10 -39
- package/dist/budget/reply.js.map +1 -1
- package/dist/budget/size.d.ts +2 -21
- package/dist/budget/size.d.ts.map +1 -1
- package/dist/budget/size.js +3 -24
- package/dist/budget/size.js.map +1 -1
- package/dist/capabilities/preconditions.d.ts +7 -68
- package/dist/capabilities/preconditions.d.ts.map +1 -1
- package/dist/capabilities/preconditions.js +6 -57
- package/dist/capabilities/preconditions.js.map +1 -1
- package/dist/contracts/engine.d.ts +26 -12
- package/dist/contracts/engine.d.ts.map +1 -1
- package/dist/contracts/engine.js +28 -11
- package/dist/contracts/engine.js.map +1 -1
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/orphans.d.ts +28 -77
- package/dist/contracts/orphans.d.ts.map +1 -1
- package/dist/contracts/orphans.js +124 -94
- package/dist/contracts/orphans.js.map +1 -1
- package/dist/contracts/paths.d.ts +4 -114
- package/dist/contracts/paths.d.ts.map +1 -1
- package/dist/contracts/paths.js +7 -140
- package/dist/contracts/paths.js.map +1 -1
- package/dist/contracts/shapes.d.ts +13 -66
- package/dist/contracts/shapes.d.ts.map +1 -1
- package/dist/contracts/shapes.js +20 -91
- package/dist/contracts/shapes.js.map +1 -1
- package/dist/governance/budget.d.ts +12 -48
- package/dist/governance/budget.d.ts.map +1 -1
- package/dist/governance/budget.js +12 -48
- package/dist/governance/budget.js.map +1 -1
- package/dist/governance/candidate-boundary.d.ts +4 -32
- package/dist/governance/candidate-boundary.d.ts.map +1 -1
- package/dist/governance/candidate-boundary.js +4 -32
- package/dist/governance/candidate-boundary.js.map +1 -1
- package/dist/governance/escalation.d.ts +7 -45
- package/dist/governance/escalation.d.ts.map +1 -1
- package/dist/governance/escalation.js +7 -45
- package/dist/governance/escalation.js.map +1 -1
- package/dist/governance/fact-boundary.d.ts +7 -49
- package/dist/governance/fact-boundary.d.ts.map +1 -1
- package/dist/governance/fact-boundary.js +5 -43
- package/dist/governance/fact-boundary.js.map +1 -1
- package/dist/governance/finding-funnel.d.ts +11 -72
- package/dist/governance/finding-funnel.d.ts.map +1 -1
- package/dist/governance/finding-funnel.js +9 -68
- package/dist/governance/finding-funnel.js.map +1 -1
- package/dist/graph/build.d.ts +13 -75
- package/dist/graph/build.d.ts.map +1 -1
- package/dist/graph/build.js +0 -0
- package/dist/graph/build.js.map +1 -1
- package/dist/graph/cross-language.d.ts +4 -43
- package/dist/graph/cross-language.d.ts.map +1 -1
- package/dist/graph/cross-language.js +9 -77
- package/dist/graph/cross-language.js.map +1 -1
- package/dist/graph/index.d.ts +1 -1
- package/dist/graph/index.d.ts.map +1 -1
- package/dist/graph/merge.d.ts +8 -76
- package/dist/graph/merge.d.ts.map +1 -1
- package/dist/graph/merge.js +27 -77
- package/dist/graph/merge.js.map +1 -1
- package/dist/graph/observed-tests.d.ts +7 -68
- package/dist/graph/observed-tests.d.ts.map +1 -1
- package/dist/graph/observed-tests.js +5 -60
- package/dist/graph/observed-tests.js.map +1 -1
- package/dist/graph/persist.d.ts +2 -25
- package/dist/graph/persist.d.ts.map +1 -1
- package/dist/graph/persist.js +2 -25
- package/dist/graph/persist.js.map +1 -1
- package/dist/graph/runtime-confirmation.d.ts +14 -91
- package/dist/graph/runtime-confirmation.d.ts.map +1 -1
- package/dist/graph/runtime-confirmation.js +19 -103
- package/dist/graph/runtime-confirmation.js.map +1 -1
- package/dist/ledger/mint.d.ts +9 -43
- package/dist/ledger/mint.d.ts.map +1 -1
- package/dist/ledger/mint.js +15 -65
- package/dist/ledger/mint.js.map +1 -1
- package/dist/ledger/resolve.d.ts +13 -81
- package/dist/ledger/resolve.d.ts.map +1 -1
- package/dist/ledger/resolve.js +13 -76
- package/dist/ledger/resolve.js.map +1 -1
- package/dist/multipr/fingerprint.d.ts +5 -46
- package/dist/multipr/fingerprint.d.ts.map +1 -1
- package/dist/multipr/fingerprint.js +22 -74
- package/dist/multipr/fingerprint.js.map +1 -1
- package/dist/multipr/hidden-dependency.d.ts +13 -73
- package/dist/multipr/hidden-dependency.d.ts.map +1 -1
- package/dist/multipr/hidden-dependency.js +12 -63
- package/dist/multipr/hidden-dependency.js.map +1 -1
- package/dist/multipr/mechanical.d.ts +25 -160
- package/dist/multipr/mechanical.d.ts.map +1 -1
- package/dist/multipr/mechanical.js +21 -137
- package/dist/multipr/mechanical.js.map +1 -1
- package/dist/multipr/migration-heads.d.ts +18 -105
- package/dist/multipr/migration-heads.d.ts.map +1 -1
- package/dist/multipr/migration-heads.js +15 -84
- package/dist/multipr/migration-heads.js.map +1 -1
- package/dist/multipr/overlap.d.ts +16 -94
- package/dist/multipr/overlap.d.ts.map +1 -1
- package/dist/multipr/overlap.js +25 -105
- package/dist/multipr/overlap.js.map +1 -1
- package/dist/multipr/scope-store.d.ts +15 -80
- package/dist/multipr/scope-store.d.ts.map +1 -1
- package/dist/multipr/scope-store.js +17 -87
- package/dist/multipr/scope-store.js.map +1 -1
- package/dist/multipr/superseded.d.ts +10 -95
- package/dist/multipr/superseded.d.ts.map +1 -1
- package/dist/multipr/superseded.js +7 -60
- package/dist/multipr/superseded.js.map +1 -1
- package/dist/query/confirmed-facts.d.ts +12 -58
- package/dist/query/confirmed-facts.d.ts.map +1 -1
- package/dist/query/confirmed-facts.js +8 -47
- package/dist/query/confirmed-facts.js.map +1 -1
- package/dist/query/declared-value-closure.d.ts +13 -104
- package/dist/query/declared-value-closure.d.ts.map +1 -1
- package/dist/query/declared-value-closure.js +15 -104
- package/dist/query/declared-value-closure.js.map +1 -1
- package/dist/query/memory.d.ts +5 -9
- package/dist/query/memory.d.ts.map +1 -1
- package/dist/query/memory.js +31 -15
- package/dist/query/memory.js.map +1 -1
- package/dist/query/prominence.d.ts +6 -55
- package/dist/query/prominence.d.ts.map +1 -1
- package/dist/query/prominence.js +6 -55
- package/dist/query/prominence.js.map +1 -1
- package/dist/query/provider.d.ts +28 -81
- package/dist/query/provider.d.ts.map +1 -1
- package/dist/query/provider.js +8 -29
- package/dist/query/provider.js.map +1 -1
- package/dist/query/queries.d.ts +15 -65
- package/dist/query/queries.d.ts.map +1 -1
- package/dist/query/queries.js +43 -100
- package/dist/query/queries.js.map +1 -1
- package/dist/query/refusal-fetch.d.ts +8 -85
- package/dist/query/refusal-fetch.d.ts.map +1 -1
- package/dist/query/refusal-fetch.js +11 -93
- package/dist/query/refusal-fetch.js.map +1 -1
- package/dist/query/refusal-questions.d.ts +17 -92
- package/dist/query/refusal-questions.d.ts.map +1 -1
- package/dist/query/refusal-questions.js +14 -78
- package/dist/query/refusal-questions.js.map +1 -1
- package/dist/query/resolution-floor.d.ts +3 -23
- package/dist/query/resolution-floor.d.ts.map +1 -1
- package/dist/query/resolution-floor.js +3 -23
- package/dist/query/resolution-floor.js.map +1 -1
- package/dist/query/root-cause-score.d.ts +11 -161
- package/dist/query/root-cause-score.d.ts.map +1 -1
- package/dist/query/root-cause-score.js +6 -137
- package/dist/query/root-cause-score.js.map +1 -1
- package/dist/query/row-closure-picture.d.ts +5 -67
- package/dist/query/row-closure-picture.d.ts.map +1 -1
- package/dist/query/row-closure-picture.js +6 -67
- package/dist/query/row-closure-picture.js.map +1 -1
- package/dist/query/similar-incidents.d.ts +6 -41
- package/dist/query/similar-incidents.d.ts.map +1 -1
- package/dist/query/similar-incidents.js +15 -69
- package/dist/query/similar-incidents.js.map +1 -1
- package/dist/query/sqlite.d.ts +3 -7
- package/dist/query/sqlite.d.ts.map +1 -1
- package/dist/query/sqlite.js +13 -16
- package/dist/query/sqlite.js.map +1 -1
- package/dist/query/test-coverage.d.ts +5 -45
- package/dist/query/test-coverage.d.ts.map +1 -1
- package/dist/query/test-coverage.js +10 -53
- package/dist/query/test-coverage.js.map +1 -1
- package/dist/query/traverse.d.ts +22 -126
- package/dist/query/traverse.d.ts.map +1 -1
- package/dist/query/traverse.js +0 -0
- package/dist/query/traverse.js.map +1 -1
- package/dist/query/unresolved.d.ts +19 -164
- package/dist/query/unresolved.d.ts.map +1 -1
- package/dist/query/unresolved.js +11 -138
- package/dist/query/unresolved.js.map +1 -1
- package/dist/query/verification-status.d.ts +12 -109
- package/dist/query/verification-status.d.ts.map +1 -1
- package/dist/query/verification-status.js +9 -99
- package/dist/query/verification-status.js.map +1 -1
- package/dist/recording/migrate.d.ts +4 -10
- package/dist/recording/migrate.d.ts.map +1 -1
- package/dist/recording/migrate.js +4 -10
- package/dist/recording/migrate.js.map +1 -1
- package/dist/recording/reader.d.ts +2 -7
- package/dist/recording/reader.d.ts.map +1 -1
- package/dist/recording/reader.js +2 -7
- package/dist/recording/reader.js.map +1 -1
- package/dist/recording/redact.d.ts +6 -57
- package/dist/recording/redact.d.ts.map +1 -1
- package/dist/recording/redact.js +8 -64
- package/dist/recording/redact.js.map +1 -1
- package/dist/recording/schema.d.ts +3 -38
- package/dist/recording/schema.d.ts.map +1 -1
- package/dist/recording/schema.js +3 -38
- package/dist/recording/schema.js.map +1 -1
- package/dist/recording/writer.d.ts +11 -74
- package/dist/recording/writer.d.ts.map +1 -1
- package/dist/recording/writer.js +3 -43
- package/dist/recording/writer.js.map +1 -1
- package/dist/scoping/fanout.d.ts +6 -68
- package/dist/scoping/fanout.d.ts.map +1 -1
- package/dist/scoping/fanout.js +6 -68
- package/dist/scoping/fanout.js.map +1 -1
- package/dist/scoping/score.d.ts +20 -70
- package/dist/scoping/score.d.ts.map +1 -1
- package/dist/scoping/score.js +20 -70
- package/dist/scoping/score.js.map +1 -1
- package/dist/scoping/tiers.d.ts +4 -16
- package/dist/scoping/tiers.d.ts.map +1 -1
- package/dist/scoping/tiers.js +4 -16
- package/dist/scoping/tiers.js.map +1 -1
- package/dist/scoping/traverse.d.ts +3 -25
- package/dist/scoping/traverse.d.ts.map +1 -1
- package/dist/scoping/traverse.js +14 -49
- package/dist/scoping/traverse.js.map +1 -1
- package/dist/scoping/weights.d.ts +10 -74
- package/dist/scoping/weights.d.ts.map +1 -1
- package/dist/scoping/weights.js +14 -86
- package/dist/scoping/weights.js.map +1 -1
- package/dist/sources/confirmed/incidents.d.ts +5 -35
- package/dist/sources/confirmed/incidents.d.ts.map +1 -1
- package/dist/sources/confirmed/incidents.js +14 -48
- package/dist/sources/confirmed/incidents.js.map +1 -1
- package/dist/sources/git/diff.d.ts +71 -65
- package/dist/sources/git/diff.d.ts.map +1 -1
- package/dist/sources/git/diff.js +136 -83
- package/dist/sources/git/diff.js.map +1 -1
- package/dist/sources/git/env.d.ts +7 -0
- package/dist/sources/git/env.d.ts.map +1 -1
- package/dist/sources/git/env.js +10 -11
- package/dist/sources/git/env.js.map +1 -1
- package/dist/sources/git/history.d.ts +64 -84
- package/dist/sources/git/history.d.ts.map +1 -1
- package/dist/sources/git/history.js +141 -112
- package/dist/sources/git/history.js.map +1 -1
- package/dist/sources/git/incidents.d.ts +13 -75
- package/dist/sources/git/incidents.d.ts.map +1 -1
- package/dist/sources/git/incidents.js +21 -91
- package/dist/sources/git/incidents.js.map +1 -1
- package/dist/sources/git/index.d.ts +5 -3
- package/dist/sources/git/index.d.ts.map +1 -1
- package/dist/sources/git/index.js +3 -2
- package/dist/sources/git/index.js.map +1 -1
- package/dist/sources/git/source.d.ts +9 -79
- package/dist/sources/git/source.d.ts.map +1 -1
- package/dist/sources/git/source.js +0 -0
- package/dist/sources/git/source.js.map +1 -1
- package/dist/sources/migrations/across-change.d.ts +94 -0
- package/dist/sources/migrations/across-change.d.ts.map +1 -0
- package/dist/sources/migrations/across-change.js +278 -0
- package/dist/sources/migrations/across-change.js.map +1 -0
- package/dist/sources/migrations/dialects.d.ts +20 -36
- package/dist/sources/migrations/dialects.d.ts.map +1 -1
- package/dist/sources/migrations/dialects.js +11 -36
- package/dist/sources/migrations/dialects.js.map +1 -1
- package/dist/sources/migrations/index.d.ts +3 -1
- package/dist/sources/migrations/index.d.ts.map +1 -1
- package/dist/sources/migrations/index.js +2 -1
- package/dist/sources/migrations/index.js.map +1 -1
- package/dist/sources/migrations/read.d.ts +14 -79
- package/dist/sources/migrations/read.d.ts.map +1 -1
- package/dist/sources/migrations/read.js +14 -89
- package/dist/sources/migrations/read.js.map +1 -1
- package/dist/sources/workspace/workspace.d.ts +6 -42
- package/dist/sources/workspace/workspace.d.ts.map +1 -1
- package/dist/sources/workspace/workspace.js +10 -53
- package/dist/sources/workspace/workspace.js.map +1 -1
- package/dist/store/driver/driver.d.ts +9 -38
- package/dist/store/driver/driver.d.ts.map +1 -1
- package/dist/store/driver/driver.js +4 -22
- package/dist/store/driver/driver.js.map +1 -1
- package/dist/store/driver/node-sqlite.d.ts +3 -12
- package/dist/store/driver/node-sqlite.d.ts.map +1 -1
- package/dist/store/driver/node-sqlite.js +4 -18
- package/dist/store/driver/node-sqlite.js.map +1 -1
- package/dist/store/index.d.ts +2 -7
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +4 -10
- package/dist/store/index.js.map +1 -1
- package/dist/store/migrate.d.ts +14 -50
- package/dist/store/migrate.d.ts.map +1 -1
- package/dist/store/migrate.js +15 -52
- package/dist/store/migrate.js.map +1 -1
- package/dist/store/reader.d.ts +19 -84
- package/dist/store/reader.d.ts.map +1 -1
- package/dist/store/reader.js +25 -92
- package/dist/store/reader.js.map +1 -1
- package/dist/store/schema.d.ts +14 -76
- package/dist/store/schema.d.ts.map +1 -1
- package/dist/store/schema.js +14 -76
- package/dist/store/schema.js.map +1 -1
- package/dist/store/writer.d.ts +14 -88
- package/dist/store/writer.d.ts.map +1 -1
- package/dist/store/writer.js +29 -123
- package/dist/store/writer.js.map +1 -1
- package/dist/tiers/certify.d.ts +46 -281
- package/dist/tiers/certify.d.ts.map +1 -1
- package/dist/tiers/certify.js +46 -226
- package/dist/tiers/certify.js.map +1 -1
- package/dist/tiers/ladder.d.ts +7 -51
- package/dist/tiers/ladder.d.ts.map +1 -1
- package/dist/tiers/ladder.js +13 -89
- package/dist/tiers/ladder.js.map +1 -1
- package/dist/validation/attributes.d.ts +47 -0
- package/dist/validation/attributes.d.ts.map +1 -0
- package/dist/validation/attributes.js +130 -0
- package/dist/validation/attributes.js.map +1 -0
- package/dist/validation/config-graph.d.ts +7 -56
- package/dist/validation/config-graph.d.ts.map +1 -1
- package/dist/validation/config-graph.js +15 -61
- package/dist/validation/config-graph.js.map +1 -1
- package/dist/validation/env.d.ts +53 -2
- package/dist/validation/env.d.ts.map +1 -1
- package/dist/validation/env.js +99 -4
- package/dist/validation/env.js.map +1 -1
- package/dist/validation/index.d.ts +5 -1
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +3 -1
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/join-substitution.d.ts +22 -120
- package/dist/validation/join-substitution.d.ts.map +1 -1
- package/dist/validation/join-substitution.js +13 -90
- package/dist/validation/join-substitution.js.map +1 -1
- package/dist/validation/migration-integrity.d.ts +72 -0
- package/dist/validation/migration-integrity.d.ts.map +1 -0
- package/dist/validation/migration-integrity.js +238 -0
- package/dist/validation/migration-integrity.js.map +1 -0
- package/dist/validation/migrations.d.ts +23 -88
- package/dist/validation/migrations.d.ts.map +1 -1
- package/dist/validation/migrations.js +20 -79
- package/dist/validation/migrations.js.map +1 -1
- package/dist/validation/nodes.d.ts +3 -1
- package/dist/validation/nodes.d.ts.map +1 -1
- package/dist/validation/nodes.js +3 -1
- package/dist/validation/nodes.js.map +1 -1
- package/dist/validation/rollback.d.ts +10 -73
- package/dist/validation/rollback.d.ts.map +1 -1
- package/dist/validation/rollback.js +23 -81
- package/dist/validation/rollback.js.map +1 -1
- package/dist/validation/route-drift.d.ts +9 -62
- package/dist/validation/route-drift.d.ts.map +1 -1
- package/dist/validation/route-drift.js +7 -52
- package/dist/validation/route-drift.js.map +1 -1
- package/dist/validation/sources.d.ts +16 -94
- package/dist/validation/sources.d.ts.map +1 -1
- package/dist/validation/sources.js +51 -147
- package/dist/validation/sources.js.map +1 -1
- package/dist/worker/pool.d.ts +6 -45
- package/dist/worker/pool.d.ts.map +1 -1
- package/dist/worker/pool.js +5 -42
- package/dist/worker/pool.js.map +1 -1
- package/dist/worker/protocol.d.ts +7 -20
- package/dist/worker/protocol.d.ts.map +1 -1
- package/dist/worker/protocol.js +3 -10
- package/dist/worker/protocol.js.map +1 -1
- package/dist/worker/traversal.worker.d.ts +2 -21
- package/dist/worker/traversal.worker.d.ts.map +1 -1
- package/dist/worker/traversal.worker.js +4 -23
- package/dist/worker/traversal.worker.js.map +1 -1
- package/package.json +11 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unresolved.js","sourceRoot":"","sources":["../../src/query/unresolved.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"unresolved.js","sourceRoot":"","sources":["../../src/query/unresolved.ts"],"names":[],"mappings":"AAAA;;;;uDAIuD;AAevD,MAAM,QAAQ,GAAG,+BAA+B,CAAC;AAEjD,2GAA2G;AAC3G,SAAS,MAAM,CAAC,SAAiB;IAC/B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3C,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;IACnD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;qFACqF;AACrF,SAAS,QAAQ,CAAC,SAAiB;IACjC,MAAM,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;IAC3B,IAAI,CAAC,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IAC1B,gFAAgF;IAChF,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAClC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IACpC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CAAC,EAAE,CAAC;QAC5B,UAAU,CAAC,IAAI,CACb,GAAG,MAAM,CAAC,YAAY,uEAAuE;YAC3F,kHAAkH;YAClH,sEAAsE,CACzE,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClD,UAAU,CAAC,IAAI,CACb,iFAAiF;YAC/E,6DAA6D,MAAM,CAAC,KAAK;iBACtE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;iBACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC;iBACpC,IAAI,CAAC,IAAI,CAAC,GAAG,CACnB,CAAC;IACJ,CAAC;IACD,IAAI,qBAAqB,KAAK,CAAC,EAAE,CAAC;QAChC,UAAU,CAAC,IAAI,CAAC,wEAAwE,CAAC,CAAC;IAC5F,CAAC;IAED,OAAO;QACL,IAAI;QACJ,MAAM;QACN,cAAc,EAAE,qBAAqB,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,qBAAqB;QACjF,YAAY,EAAE,mBAAmB,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,mBAAmB;QAC3E,UAAU;KACX,CAAC;AACJ,CAAC"}
|
|
@@ -1,105 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* technique 6 (a dedicated tool, not appended to every response).
|
|
6
|
-
*
|
|
7
|
-
* ## Scope boundary — read this before assuming more than this module builds
|
|
8
|
-
*
|
|
9
|
-
* A complete `Verification status` also depends on **which pipeline stages
|
|
10
|
-
* ran under which trigger mask** (`ai-layer-plan.md` §2: the fast path skips
|
|
11
|
-
* stages 8-13 entirely) — that is runtime information about one specific
|
|
12
|
-
* run, and it does not exist in `descry-core`. This repo is the static
|
|
13
|
-
* knowledge plane; there is no live run here to ask "did stage 9 actually
|
|
14
|
-
* execute against this file." **This module builds the static half only:**
|
|
15
|
-
* what a static reading of the graph and a language's declared capabilities
|
|
16
|
-
* can determine about analysability and resolution. Combining that with the
|
|
17
|
-
* runtime half — which stages actually ran — is `descry-runtime`/the
|
|
18
|
-
* pipeline's job, not this one's.
|
|
19
|
-
*
|
|
20
|
-
* ## Output shape: `@descryy/ir`'s `VerificationStatus`, not a parallel one
|
|
21
|
-
*
|
|
22
|
-
* `packages/ir/src/finding.ts` already defines the shared shape two
|
|
23
|
-
* repositories (the pipeline and the desktop golden-report test) assert
|
|
24
|
-
* against — `{ exercised: string[], notExercised: UntestedScope[] }`. This
|
|
25
|
-
* module produces exactly that, deliberately, rather than a second
|
|
26
|
-
* "coverage" record: two structures answering the same question would be
|
|
27
|
-
* exactly the kind of divergence `finding.ts`'s own module doc warns about
|
|
28
|
-
* for `Finding` itself, one level down.
|
|
29
|
-
*
|
|
30
|
-
* An `exercised` entry is `"<ref> (R<resolution>)"` — the scope item's
|
|
31
|
-
* identifier plus the real resolution level the graph actually holds for it,
|
|
32
|
-
* because a present node's resolution is a fact worth keeping even though
|
|
33
|
-
* `VerificationStatus.exercised` is typed as bare strings; see
|
|
34
|
-
* {@link formatExercised} for the exact grammar and
|
|
35
|
-
* {@link resolutionOfExercised} for the matching parser. A present item's
|
|
36
|
-
* resolution is reported as-is and is **never filtered against the
|
|
37
|
-
* requested check's `minResolution`** — whether R1 is "enough" for a given
|
|
38
|
-
* claim is a judgement for something above this layer (rule 3's cap, or G4),
|
|
39
|
-
* not a fact this function may assert.
|
|
40
|
-
*
|
|
41
|
-
* ## Hard constraint: no report category, ever
|
|
42
|
-
*
|
|
43
|
-
* §19's five report categories (`confirmed` / `strongly supported` /
|
|
44
|
-
* `unconfirmed` / `not analysable` / `unsupported`) are assigned at G4,
|
|
45
|
-
* above this surface (`ai-tool-contract.md` §1.2 draws the same line for
|
|
46
|
-
* result states). This module returns only the raw coverage facts —
|
|
47
|
-
* reachable-or-not, resolution, a named reason — and never the literal
|
|
48
|
-
* category vocabulary; a test asserts none of the five strings ever appear
|
|
49
|
-
* in the output.
|
|
50
|
-
*
|
|
51
|
-
* ## Reuses `tiers/certify.ts`'s capability comparison, not a second one
|
|
52
|
-
*
|
|
53
|
-
* "Does this language's declared `CapabilityMatrix` cover what a check
|
|
54
|
-
* needs" is the same question `certify.ts`'s `checkCapability` already
|
|
55
|
-
* answers for a whole adapter's tier. {@link capabilityGaps} restates that
|
|
56
|
-
* comparison — declared node/edge types, declared `maxResolution` — at
|
|
57
|
-
* per-scope-item granularity rather than adapter-wide, so the two never
|
|
58
|
-
* quietly disagree about what "this language's capabilities satisfy this
|
|
59
|
-
* requirement" means. It is a restatement rather than an import because
|
|
60
|
-
* `certify.ts`'s function also folds in precision-draw attestation and
|
|
61
|
-
* corpus conformance, both properties of a *published tier*, not of one live
|
|
62
|
-
* scope item — pulling those in here would answer a different question than
|
|
63
|
-
* the one being asked.
|
|
64
|
-
*
|
|
65
|
-
* ## Why this never looks up capabilities by language itself
|
|
66
|
-
*
|
|
67
|
-
* `ScopeItem.capabilities` is supplied by the caller, already resolved, per
|
|
68
|
-
* item — never looked up here from a `language` string. A `Map.get(item.
|
|
69
|
-
* language)` shape inside `packages/core/src/query/` would be exactly the
|
|
70
|
-
* IR-boundary leak `descry-boundary/no-language-branch` exists to catch
|
|
71
|
-
* (architecture principle 7 / `CLAUDE.md` rule 1): deciding behaviour from
|
|
72
|
-
* *which* language a node came from, not merely from whether one is known.
|
|
73
|
-
* `certify.ts` holds the same discipline one layer up — it takes one
|
|
74
|
-
* `GateEvidence` per call and never builds a language-keyed registry inside
|
|
75
|
-
* `packages/core` either. Resolving "which capabilities apply to this
|
|
76
|
-
* item's language" is the caller's job, done above this boundary; `language`
|
|
77
|
-
* is read here only for disclosure (naming it in a reason string), never for
|
|
78
|
-
* a branch, comparison or lookup.
|
|
2
|
+
* Static half of `verification_status` (AI layer §19/§20: coverage is separate from
|
|
3
|
+
* confidence). Builds `@descryy/ir`'s `VerificationStatus` directly, not a parallel shape; never the runtime half (which stages ran) or the five report-category strings — both assigned above this layer (G4).
|
|
4
|
+
* `capabilityGaps` restates `tiers/certify.ts`'s comparison at per-item granularity. `language` is read only for disclosure, never a branch/lookup — capabilities come pre-resolved from the caller (IR-boundary rule 1).
|
|
79
5
|
*/
|
|
80
6
|
import type { CapabilityMatrix, EdgeType, IRNode, NodeType, ResolutionLevel, VerificationStatus } from "@descryy/ir";
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* uses (`nodeTypes`/`edgeTypes`/`minResolution`), restated rather than
|
|
85
|
-
* imported: a live per-scope-item check is not a tier-ladder promotion row
|
|
86
|
-
* and carries none of `Requirement`'s `id`/`kind`/`statement`. Every field
|
|
87
|
-
* omitted asks only "was this item reached at all".
|
|
88
|
-
*/
|
|
7
|
+
/** Mirrors `tiers/ladder.ts`'s `Requirement` targeting fields, restated (not
|
|
8
|
+
* imported — this isn't a tier-ladder promotion row). Every field omitted
|
|
9
|
+
* asks only "was this item reached at all". */
|
|
89
10
|
export interface CoverageCheck {
|
|
90
11
|
readonly nodeTypes?: readonly NodeType[];
|
|
91
12
|
readonly edgeTypes?: readonly EdgeType[];
|
|
92
13
|
readonly minResolution?: ResolutionLevel;
|
|
93
14
|
}
|
|
94
|
-
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* `node` is the strongest fact available: when the graph holds real,
|
|
98
|
-
* analysed content for this item, its own `resolution` is reported as-is,
|
|
99
|
-
* never re-derived. `capabilities` is consulted only when `node` is `null`,
|
|
100
|
-
* to explain *why* nothing is there — `undefined` means no adapter is
|
|
101
|
-
* registered for whatever this item is at all.
|
|
102
|
-
*/
|
|
15
|
+
/** One scope item (file or node). `node`'s own `resolution` is reported as-is,
|
|
16
|
+
* never re-derived; `capabilities` is consulted only when `node` is null, to
|
|
17
|
+
* explain why — `undefined` means no adapter is registered. */
|
|
103
18
|
export interface ScopeItem {
|
|
104
19
|
/** The identifier this item is reported under — a node id or a file path. Opaque to this module. */
|
|
105
20
|
readonly ref: string;
|
|
@@ -115,20 +30,8 @@ export declare function resolutionOfExercised(entry: string): {
|
|
|
115
30
|
readonly ref: string;
|
|
116
31
|
readonly resolution: ResolutionLevel;
|
|
117
32
|
} | null;
|
|
118
|
-
/**
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
* Per item, one of three outcomes — see the module header for the full
|
|
122
|
-
* reasoning:
|
|
123
|
-
*
|
|
124
|
-
* 1. **Present in the graph** → `exercised`, carrying its real resolution.
|
|
125
|
-
* 2. **Absent, no capabilities supplied** → `notExercised`, naming the
|
|
126
|
-
* language (or that none could be determined).
|
|
127
|
-
* 3. **Absent, capabilities supplied** → `notExercised`, naming the specific
|
|
128
|
-
* declared gap against `check` when there is one, or — the honest edge
|
|
129
|
-
* case — that a registered adapter declares everything asked for and a
|
|
130
|
-
* static capability comparison alone cannot say why the item is still
|
|
131
|
-
* absent.
|
|
132
|
-
*/
|
|
33
|
+
/** Per item: present → `exercised` with real resolution; absent + no capabilities →
|
|
34
|
+
* `notExercised` naming the language; absent + capabilities → `notExercised` naming
|
|
35
|
+
* the gap, or that a registered adapter declares everything and the absence is unexplained. */
|
|
133
36
|
export declare function computeVerificationStatus(scope: readonly ScopeItem[], check?: CoverageCheck): VerificationStatus;
|
|
134
37
|
//# sourceMappingURL=verification-status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-status.d.ts","sourceRoot":"","sources":["../../src/query/verification-status.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"verification-status.d.ts","sourceRoot":"","sources":["../../src/query/verification-status.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,eAAe,EAEf,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAErB;;gDAEgD;AAChD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IACzC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IACzC,QAAQ,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC;CAC1C;AAED;;gEAEgE;AAChE,MAAM,WAAW,SAAS;IACxB,oGAAoG;IACpG,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,2HAA2H;IAC3H,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,uGAAuG;IACvG,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,kJAAkJ;IAClJ,QAAQ,CAAC,YAAY,EAAE,gBAAgB,GAAG,SAAS,CAAC;CACrD;AAmCD,mIAAmI;AACnI,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAA;CAAE,GAAG,IAAI,CAI1H;AAED;;gGAEgG;AAChG,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,SAAS,SAAS,EAAE,EAC3B,KAAK,GAAE,aAAkB,GACxB,kBAAkB,CAkCpB"}
|
|
@@ -1,81 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* technique 6 (a dedicated tool, not appended to every response).
|
|
6
|
-
*
|
|
7
|
-
* ## Scope boundary — read this before assuming more than this module builds
|
|
8
|
-
*
|
|
9
|
-
* A complete `Verification status` also depends on **which pipeline stages
|
|
10
|
-
* ran under which trigger mask** (`ai-layer-plan.md` §2: the fast path skips
|
|
11
|
-
* stages 8-13 entirely) — that is runtime information about one specific
|
|
12
|
-
* run, and it does not exist in `descry-core`. This repo is the static
|
|
13
|
-
* knowledge plane; there is no live run here to ask "did stage 9 actually
|
|
14
|
-
* execute against this file." **This module builds the static half only:**
|
|
15
|
-
* what a static reading of the graph and a language's declared capabilities
|
|
16
|
-
* can determine about analysability and resolution. Combining that with the
|
|
17
|
-
* runtime half — which stages actually ran — is `descry-runtime`/the
|
|
18
|
-
* pipeline's job, not this one's.
|
|
19
|
-
*
|
|
20
|
-
* ## Output shape: `@descryy/ir`'s `VerificationStatus`, not a parallel one
|
|
21
|
-
*
|
|
22
|
-
* `packages/ir/src/finding.ts` already defines the shared shape two
|
|
23
|
-
* repositories (the pipeline and the desktop golden-report test) assert
|
|
24
|
-
* against — `{ exercised: string[], notExercised: UntestedScope[] }`. This
|
|
25
|
-
* module produces exactly that, deliberately, rather than a second
|
|
26
|
-
* "coverage" record: two structures answering the same question would be
|
|
27
|
-
* exactly the kind of divergence `finding.ts`'s own module doc warns about
|
|
28
|
-
* for `Finding` itself, one level down.
|
|
29
|
-
*
|
|
30
|
-
* An `exercised` entry is `"<ref> (R<resolution>)"` — the scope item's
|
|
31
|
-
* identifier plus the real resolution level the graph actually holds for it,
|
|
32
|
-
* because a present node's resolution is a fact worth keeping even though
|
|
33
|
-
* `VerificationStatus.exercised` is typed as bare strings; see
|
|
34
|
-
* {@link formatExercised} for the exact grammar and
|
|
35
|
-
* {@link resolutionOfExercised} for the matching parser. A present item's
|
|
36
|
-
* resolution is reported as-is and is **never filtered against the
|
|
37
|
-
* requested check's `minResolution`** — whether R1 is "enough" for a given
|
|
38
|
-
* claim is a judgement for something above this layer (rule 3's cap, or G4),
|
|
39
|
-
* not a fact this function may assert.
|
|
40
|
-
*
|
|
41
|
-
* ## Hard constraint: no report category, ever
|
|
42
|
-
*
|
|
43
|
-
* §19's five report categories (`confirmed` / `strongly supported` /
|
|
44
|
-
* `unconfirmed` / `not analysable` / `unsupported`) are assigned at G4,
|
|
45
|
-
* above this surface (`ai-tool-contract.md` §1.2 draws the same line for
|
|
46
|
-
* result states). This module returns only the raw coverage facts —
|
|
47
|
-
* reachable-or-not, resolution, a named reason — and never the literal
|
|
48
|
-
* category vocabulary; a test asserts none of the five strings ever appear
|
|
49
|
-
* in the output.
|
|
50
|
-
*
|
|
51
|
-
* ## Reuses `tiers/certify.ts`'s capability comparison, not a second one
|
|
52
|
-
*
|
|
53
|
-
* "Does this language's declared `CapabilityMatrix` cover what a check
|
|
54
|
-
* needs" is the same question `certify.ts`'s `checkCapability` already
|
|
55
|
-
* answers for a whole adapter's tier. {@link capabilityGaps} restates that
|
|
56
|
-
* comparison — declared node/edge types, declared `maxResolution` — at
|
|
57
|
-
* per-scope-item granularity rather than adapter-wide, so the two never
|
|
58
|
-
* quietly disagree about what "this language's capabilities satisfy this
|
|
59
|
-
* requirement" means. It is a restatement rather than an import because
|
|
60
|
-
* `certify.ts`'s function also folds in precision-draw attestation and
|
|
61
|
-
* corpus conformance, both properties of a *published tier*, not of one live
|
|
62
|
-
* scope item — pulling those in here would answer a different question than
|
|
63
|
-
* the one being asked.
|
|
64
|
-
*
|
|
65
|
-
* ## Why this never looks up capabilities by language itself
|
|
66
|
-
*
|
|
67
|
-
* `ScopeItem.capabilities` is supplied by the caller, already resolved, per
|
|
68
|
-
* item — never looked up here from a `language` string. A `Map.get(item.
|
|
69
|
-
* language)` shape inside `packages/core/src/query/` would be exactly the
|
|
70
|
-
* IR-boundary leak `descry-boundary/no-language-branch` exists to catch
|
|
71
|
-
* (architecture principle 7 / `CLAUDE.md` rule 1): deciding behaviour from
|
|
72
|
-
* *which* language a node came from, not merely from whether one is known.
|
|
73
|
-
* `certify.ts` holds the same discipline one layer up — it takes one
|
|
74
|
-
* `GateEvidence` per call and never builds a language-keyed registry inside
|
|
75
|
-
* `packages/core` either. Resolving "which capabilities apply to this
|
|
76
|
-
* item's language" is the caller's job, done above this boundary; `language`
|
|
77
|
-
* is read here only for disclosure (naming it in a reason string), never for
|
|
78
|
-
* a branch, comparison or lookup.
|
|
2
|
+
* Static half of `verification_status` (AI layer §19/§20: coverage is separate from
|
|
3
|
+
* confidence). Builds `@descryy/ir`'s `VerificationStatus` directly, not a parallel shape; never the runtime half (which stages ran) or the five report-category strings — both assigned above this layer (G4).
|
|
4
|
+
* `capabilityGaps` restates `tiers/certify.ts`'s comparison at per-item granularity. `language` is read only for disclosure, never a branch/lookup — capabilities come pre-resolved from the caller (IR-boundary rule 1).
|
|
79
5
|
*/
|
|
80
6
|
/** `certify.ts`'s own `missing()`, restated: what `wanted` names that `have` does not declare. */
|
|
81
7
|
function missing(wanted, have) {
|
|
@@ -84,13 +10,9 @@ function missing(wanted, have) {
|
|
|
84
10
|
const present = new Set(have);
|
|
85
11
|
return wanted.filter((w) => !present.has(w));
|
|
86
12
|
}
|
|
87
|
-
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* item's granularity. Empty when `caps` declares everything `check` asks
|
|
91
|
-
* for (which does not, by itself, mean the item was reachable — see the
|
|
92
|
-
* caller in {@link computeVerificationStatus}).
|
|
93
|
-
*/
|
|
13
|
+
/** Same comparison as `tiers/certify.ts`'s `checkCapability`, restated per-item.
|
|
14
|
+
* Empty when `caps` covers everything `check` asks — not itself proof the
|
|
15
|
+
* item was reachable, see {@link computeVerificationStatus}. */
|
|
94
16
|
function capabilityGaps(caps, check) {
|
|
95
17
|
const gaps = [];
|
|
96
18
|
const nodeGap = missing(check.nodeTypes, caps.nodeTypes);
|
|
@@ -116,21 +38,9 @@ export function resolutionOfExercised(entry) {
|
|
|
116
38
|
return null;
|
|
117
39
|
return { ref: m[1], resolution: Number(m[2]) };
|
|
118
40
|
}
|
|
119
|
-
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* Per item, one of three outcomes — see the module header for the full
|
|
123
|
-
* reasoning:
|
|
124
|
-
*
|
|
125
|
-
* 1. **Present in the graph** → `exercised`, carrying its real resolution.
|
|
126
|
-
* 2. **Absent, no capabilities supplied** → `notExercised`, naming the
|
|
127
|
-
* language (or that none could be determined).
|
|
128
|
-
* 3. **Absent, capabilities supplied** → `notExercised`, naming the specific
|
|
129
|
-
* declared gap against `check` when there is one, or — the honest edge
|
|
130
|
-
* case — that a registered adapter declares everything asked for and a
|
|
131
|
-
* static capability comparison alone cannot say why the item is still
|
|
132
|
-
* absent.
|
|
133
|
-
*/
|
|
41
|
+
/** Per item: present → `exercised` with real resolution; absent + no capabilities →
|
|
42
|
+
* `notExercised` naming the language; absent + capabilities → `notExercised` naming
|
|
43
|
+
* the gap, or that a registered adapter declares everything and the absence is unexplained. */
|
|
134
44
|
export function computeVerificationStatus(scope, check = {}) {
|
|
135
45
|
const exercised = [];
|
|
136
46
|
const notExercised = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-status.js","sourceRoot":"","sources":["../../src/query/verification-status.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"verification-status.js","sourceRoot":"","sources":["../../src/query/verification-status.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmCH,kGAAkG;AAClG,SAAS,OAAO,CAAI,MAAgC,EAAE,IAAkB;IACtE,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACpC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED;;iEAEiE;AACjE,SAAS,cAAc,CAAC,IAAsB,EAAE,KAAoB;IAClE,MAAM,IAAI,GAAa,EAAE,CAAC;IAE1B,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACzD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,IAAI,CAAC,IAAI,CAAC,8BAA8B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,E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CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAChE,SAAS;QACX,CAAC;QAED,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;YACpC,YAAY,CAAC,IAAI,CAAC;gBAChB,KAAK,EAAE,IAAI,CAAC,GAAG;gBACf,MAAM,EACJ,IAAI,CAAC,QAAQ,KAAK,IAAI;oBACpB,CAAC,CAAC,qFAAqF;oBACvF,CAAC,CAAC,iCAAiC,IAAI,CAAC,QAAQ,GAAG;aACxD,CAAC,CAAC;YACH,SAAS;QACX,CAAC;QAED,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACtD,YAAY,CAAC,IAAI,CAAC;YAChB,KAAK,EAAE,IAAI,CAAC,GAAG;YACf,MAAM,EACJ,IAAI,CAAC,MAAM,GAAG,CAAC;gBACb,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBACjB,CAAC,CAAC,2BAA2B,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,QAAQ,GAAG,gBAAgB;oBAClG,iGAAiG;oBACjG,2BAA2B;SAClC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;AACrC,CAAC"}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* verify) but not its recovery path: the graph store's `dropDerived()` exists
|
|
6
|
-
* because a version mismatch there means "rebuild from source." There is no
|
|
7
|
-
* source to rebuild a recorded call from, so a mismatch here has exactly one
|
|
8
|
-
* safe response — refuse to open — and no `dropDerived` equivalent is
|
|
9
|
-
* provided.
|
|
10
|
-
*/
|
|
1
|
+
/** Schema creation and version enforcement for the recording store. Mirrors
|
|
2
|
+
* `../store/migrate.ts` (create-if-absent, then verify) but not its
|
|
3
|
+
* recovery: there's no source to rebuild a recorded call from, so a
|
|
4
|
+
* mismatch here refuses to open — no `dropDerived` equivalent exists. */
|
|
11
5
|
import { type SqlDriver } from "../store/driver/driver.ts";
|
|
12
6
|
export declare class RecordingSchemaVersionError extends Error {
|
|
13
7
|
readonly name = "RecordingSchemaVersionError";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/recording/migrate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/recording/migrate.ts"],"names":[],"mappings":"AAAA;;;0EAG0E;AAE1E,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGxE,qBAAa,2BAA4B,SAAQ,KAAK;IACpD,SAAkB,IAAI,iCAAiC;IACvD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;gBAEd,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAS5C;AAmBD,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAkBxE"}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* verify) but not its recovery path: the graph store's `dropDerived()` exists
|
|
6
|
-
* because a version mismatch there means "rebuild from source." There is no
|
|
7
|
-
* source to rebuild a recorded call from, so a mismatch here has exactly one
|
|
8
|
-
* safe response — refuse to open — and no `dropDerived` equivalent is
|
|
9
|
-
* provided.
|
|
10
|
-
*/
|
|
1
|
+
/** Schema creation and version enforcement for the recording store. Mirrors
|
|
2
|
+
* `../store/migrate.ts` (create-if-absent, then verify) but not its
|
|
3
|
+
* recovery: there's no source to rebuild a recorded call from, so a
|
|
4
|
+
* mismatch here refuses to open — no `dropDerived` equivalent exists. */
|
|
11
5
|
import { DriverError } from "../store/driver/driver.js";
|
|
12
6
|
import { RECORDING_SCHEMA_VERSION, SCHEMA_SQL } from "./schema.js";
|
|
13
7
|
export class RecordingSchemaVersionError extends Error {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/recording/migrate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/recording/migrate.ts"],"names":[],"mappings":"AAAA;;;0EAG0E;AAE1E,OAAO,EAAE,WAAW,EAAkB,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEnE,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IAClC,IAAI,GAAG,6BAA6B,CAAC;IAC9C,KAAK,CAAS;IACd,QAAQ,CAAS;IAE1B,YAAY,KAAa,EAAE,QAAgB;QACzC,KAAK,CACH,oDAAoD,KAAK,wBAAwB,QAAQ,IAAI;YAC3F,4FAA4F;YAC5F,4BAA4B,CAC/B,CAAC;QACF,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF;AAOD,SAAS,QAAQ,CAAC,MAAiB,EAAE,GAAW;IAC9C,OAAO,MAAM,CAAC,OAAO,CAAU,qDAAqD,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC;AACxG,CAAC;AAED,SAAS,SAAS,CAAC,MAAiB,EAAE,GAAW,EAAE,KAAa;IAC9D,MAAM;SACH,OAAO,CACN,6GAA6G,CAC9G;SACA,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AACrB,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,gBAAgB,CAAC,MAAiB;IAChD,OAAO,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE;QAC7B,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAExB,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;QAClD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,SAAS,CAAC,MAAM,EAAE,gBAAgB,EAAE,MAAM,CAAC,wBAAwB,CAAC,CAAC,CAAC;YACtE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,WAAW,CAAC,oDAAoD,MAAM,EAAE,CAAC,CAAC;QACtF,CAAC;QACD,IAAI,KAAK,KAAK,wBAAwB;YAAE,MAAM,IAAI,2BAA2B,CAAC,KAAK,EAAE,wBAAwB,CAAC,CAAC;QAE/G,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* `readRun` is deliberately the only read here: replay needs the whole run,
|
|
5
|
-
* in order, with nothing summarised out. A caller wanting "just the last
|
|
6
|
-
* call" or "just this tool's calls" can filter `readRun`'s result; a second
|
|
7
|
-
* entry point that pre-filters would be a second place the ordering guarantee
|
|
8
|
-
* has to be re-proven.
|
|
2
|
+
* The replay path. `readRun` is deliberately the only read — a pre-filtering entry point would be a
|
|
3
|
+
* second place the ordering guarantee has to be re-proven; callers filter its result instead.
|
|
9
4
|
*/
|
|
10
5
|
import type { SqlDriver } from "../store/driver/driver.ts";
|
|
11
6
|
import type { RunStamp, ToolCallRecord } from "./writer.ts";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reader.d.ts","sourceRoot":"","sources":["../../src/recording/reader.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"reader.d.ts","sourceRoot":"","sources":["../../src/recording/reader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE5D,MAAM,WAAW,YAAa,SAAQ,cAAc;IAClD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;CACzC;AA4CD,oFAAoF;AACpF,wBAAgB,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CA4BjF"}
|
package/dist/recording/reader.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* `readRun` is deliberately the only read here: replay needs the whole run,
|
|
5
|
-
* in order, with nothing summarised out. A caller wanting "just the last
|
|
6
|
-
* call" or "just this tool's calls" can filter `readRun`'s result; a second
|
|
7
|
-
* entry point that pre-filters would be a second place the ordering guarantee
|
|
8
|
-
* has to be re-proven.
|
|
2
|
+
* The replay path. `readRun` is deliberately the only read — a pre-filtering entry point would be a
|
|
3
|
+
* second place the ordering guarantee has to be re-proven; callers filter its result instead.
|
|
9
4
|
*/
|
|
10
5
|
import { isToolClass } from "@descryy/ir";
|
|
11
6
|
function rowToCall(row) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reader.js","sourceRoot":"","sources":["../../src/recording/reader.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"reader.js","sourceRoot":"","sources":["../../src/recording/reader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAkB,MAAM,aAAa,CAAC;AA0C1D,SAAS,SAAS,CAAC,GAAY;IAC7B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,wEAAwE;QACxE,yDAAyD;QACzD,MAAM,IAAI,KAAK,CAAC,wBAAwB,GAAG,CAAC,GAAG,0BAA0B,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;IACxF,CAAC;IACD,MAAM,SAAS,GAAc,GAAG,CAAC,KAAK,CAAC;IACvC,OAAO;QACL,GAAG,EAAE,GAAG,CAAC,GAAG;QACZ,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,WAAW,EAAE,GAAG,CAAC,YAAY;QAC7B,KAAK,EAAE,SAAS;QAChB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAY;QAC/C,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAY;QACzC,UAAU,EAAE,GAAG,CAAC,WAAW;QAC3B,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,UAAU,EAAE,GAAG,CAAC,WAAW;KAC5B,CAAC;AACJ,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,OAAO,CAAC,MAAiB,EAAE,KAAa;IACtD,MAAM,GAAG,GAAG,MAAM;SACf,OAAO,CACN;yCACmC,CACpC;SACA,GAAG,CAAC,KAAK,CAAC,CAAC;IACd,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAExC,MAAM,IAAI,GAAG,MAAM;SAChB,OAAO,CACN;+DACyD,CAC1D;SACA,GAAG,CAAC,KAAK,CAAC,CAAC;IAEd,OAAO;QACL,KAAK,EAAE,GAAG,CAAC,EAAE;QACb,SAAS,EAAE,GAAG,CAAC,UAAU;QACzB,KAAK,EAAE;YACL,SAAS,EAAE,GAAG,CAAC,UAAU;YACzB,OAAO,EAAE,GAAG,CAAC,QAAQ;YACrB,eAAe,EAAE,GAAG,CAAC,iBAAiB;SACvC;QACD,aAAa,EAAE,GAAG,CAAC,cAAc;QACjC,OAAO,EAAE,GAAG,CAAC,QAAQ;QACrB,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;KAC3B,CAAC;AACJ,CAAC"}
|
|
@@ -1,63 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* ## Why this exists
|
|
5
|
-
*
|
|
6
|
-
* `schema.ts` and `writer.ts`'s module headers both say the same thing: the
|
|
7
|
-
* `redact` option is a documented seam, and until something is plugged into
|
|
8
|
-
* it every row this store writes is exactly what the tool call carried,
|
|
9
|
-
* including secrets. That was true because nothing in this repository ever
|
|
10
|
-
* built a redactor — not because building one needs work outside this
|
|
11
|
-
* repo's scope. This file is that redactor.
|
|
12
|
-
*
|
|
13
|
-
* ## Literal substring replacement, never a pattern
|
|
14
|
-
*
|
|
15
|
-
* Ported from descry-desktop's `packages/session/src/redact.ts`
|
|
16
|
-
* (`redactSecrets`) — the model-client redaction seam's own implementation,
|
|
17
|
-
* the one place in the four-repo split this logic already existed and was
|
|
18
|
-
* already tested. That file's doc comment states the reason plainly and it
|
|
19
|
-
* applies here unchanged: **a secret is arbitrary text and must never be
|
|
20
|
-
* interpreted as a pattern.** A regex-based "looks like an API key" detector
|
|
21
|
-
* is a recall play — it guesses, and a wrong guess either redacts real data
|
|
22
|
-
* that was not a secret or misses a secret shaped unlike the pattern.
|
|
23
|
-
* `CLAUDE.md`'s "precision over recall, when in doubt omit" applies to
|
|
24
|
-
* redaction exactly as it applies to a graph edge: only redact a value the
|
|
25
|
-
* caller can actually name as a secret.
|
|
26
|
-
*
|
|
27
|
-
* There is no shared package between `descry-core` and `descry-desktop`
|
|
28
|
-
* today (DEC-001's four-repo split names no fifth "shared utilities" repo),
|
|
29
|
-
* so this is a deliberate duplication of the minimal literal-substitution
|
|
30
|
-
* logic rather than a new cross-repo dependency edge. If a third call site
|
|
31
|
-
* needs this, that is the trigger to extract a shared package — not before.
|
|
32
|
-
*
|
|
33
|
-
* ## Why this is still opt-in, not automatic inside `recordCall`
|
|
34
|
-
*
|
|
35
|
-
* `recordCall` has no way to know, on its own, which strings in an
|
|
36
|
-
* arbitrary `arguments`/`result` payload are secrets — that is exactly the
|
|
37
|
-
* "arbitrary text, not a pattern" problem above. Only a caller holding the
|
|
38
|
-
* deployment's actual configured secret values (an API key, a token, a DB
|
|
39
|
-
* password) can supply that list, the same division of responsibility
|
|
40
|
-
* `createPromptRedactor` uses on the model-client side. Wiring this
|
|
41
|
-
* redactor into a live `recordCall` call site — the MCP server's tool
|
|
42
|
-
* dispatch, or `descry-runtime`'s — with real configured secret values is
|
|
43
|
-
* separate work (the same "P3, the tool boundary" wiring the module headers
|
|
44
|
-
* already point at), not something this file can do for a caller that does
|
|
45
|
-
* not exist yet in this repo.
|
|
2
|
+
* Concrete implementation for writer.ts's RecordCallOptions.redact seam. Literal substring replacement only, never a pattern-based detector — a secret is arbitrary text (precision over recall, per CLAUDE.md).
|
|
3
|
+
* Ported from descry-desktop's redact.ts rather than shared (DEC-001 names no fifth repo). Opt-in, not automatic — only a caller holding actual configured secret values can supply what to redact.
|
|
46
4
|
*/
|
|
47
5
|
import type { ToolCallRecord } from "./writer.ts";
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
* marker. Literal substring replacement, not regex — see this file's module
|
|
51
|
-
* header for why.
|
|
52
|
-
*/
|
|
6
|
+
/** Replace every occurrence of each secret value in `text` with a fixed
|
|
7
|
+
* marker. Literal substring replacement, not regex — see module header. */
|
|
53
8
|
export declare function redactSecretsInText(text: string, secretValues: readonly string[]): string;
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* given the secret values known at the call site — whatever the caller's own
|
|
57
|
-
* configuration surface can name as sensitive. Walks both `arguments` and
|
|
58
|
-
* `result` in full, since a secret passed in can just as easily be echoed
|
|
59
|
-
* back in a tool's result (an error message quoting the bad input, for
|
|
60
|
-
* instance) as it can appear in the arguments themselves.
|
|
61
|
-
*/
|
|
9
|
+
/** Builds a redact function for recordCall's seam. Walks both arguments and
|
|
10
|
+
* result in full — a secret can just as easily be echoed back in a result. */
|
|
62
11
|
export declare function createRecordingRedactor(secretValues: readonly string[]): (call: ToolCallRecord) => ToolCallRecord;
|
|
63
12
|
//# sourceMappingURL=redact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../../src/recording/redact.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../../src/recording/redact.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD;4EAC4E;AAC5E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAOzF;AAiBD;+EAC+E;AAC/E,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,SAAS,MAAM,EAAE,GAC9B,CAAC,IAAI,EAAE,cAAc,KAAK,cAAc,CAM1C"}
|
package/dist/recording/redact.js
CHANGED
|
@@ -1,55 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* ## Why this exists
|
|
5
|
-
*
|
|
6
|
-
* `schema.ts` and `writer.ts`'s module headers both say the same thing: the
|
|
7
|
-
* `redact` option is a documented seam, and until something is plugged into
|
|
8
|
-
* it every row this store writes is exactly what the tool call carried,
|
|
9
|
-
* including secrets. That was true because nothing in this repository ever
|
|
10
|
-
* built a redactor — not because building one needs work outside this
|
|
11
|
-
* repo's scope. This file is that redactor.
|
|
12
|
-
*
|
|
13
|
-
* ## Literal substring replacement, never a pattern
|
|
14
|
-
*
|
|
15
|
-
* Ported from descry-desktop's `packages/session/src/redact.ts`
|
|
16
|
-
* (`redactSecrets`) — the model-client redaction seam's own implementation,
|
|
17
|
-
* the one place in the four-repo split this logic already existed and was
|
|
18
|
-
* already tested. That file's doc comment states the reason plainly and it
|
|
19
|
-
* applies here unchanged: **a secret is arbitrary text and must never be
|
|
20
|
-
* interpreted as a pattern.** A regex-based "looks like an API key" detector
|
|
21
|
-
* is a recall play — it guesses, and a wrong guess either redacts real data
|
|
22
|
-
* that was not a secret or misses a secret shaped unlike the pattern.
|
|
23
|
-
* `CLAUDE.md`'s "precision over recall, when in doubt omit" applies to
|
|
24
|
-
* redaction exactly as it applies to a graph edge: only redact a value the
|
|
25
|
-
* caller can actually name as a secret.
|
|
26
|
-
*
|
|
27
|
-
* There is no shared package between `descry-core` and `descry-desktop`
|
|
28
|
-
* today (DEC-001's four-repo split names no fifth "shared utilities" repo),
|
|
29
|
-
* so this is a deliberate duplication of the minimal literal-substitution
|
|
30
|
-
* logic rather than a new cross-repo dependency edge. If a third call site
|
|
31
|
-
* needs this, that is the trigger to extract a shared package — not before.
|
|
32
|
-
*
|
|
33
|
-
* ## Why this is still opt-in, not automatic inside `recordCall`
|
|
34
|
-
*
|
|
35
|
-
* `recordCall` has no way to know, on its own, which strings in an
|
|
36
|
-
* arbitrary `arguments`/`result` payload are secrets — that is exactly the
|
|
37
|
-
* "arbitrary text, not a pattern" problem above. Only a caller holding the
|
|
38
|
-
* deployment's actual configured secret values (an API key, a token, a DB
|
|
39
|
-
* password) can supply that list, the same division of responsibility
|
|
40
|
-
* `createPromptRedactor` uses on the model-client side. Wiring this
|
|
41
|
-
* redactor into a live `recordCall` call site — the MCP server's tool
|
|
42
|
-
* dispatch, or `descry-runtime`'s — with real configured secret values is
|
|
43
|
-
* separate work (the same "P3, the tool boundary" wiring the module headers
|
|
44
|
-
* already point at), not something this file can do for a caller that does
|
|
45
|
-
* not exist yet in this repo.
|
|
2
|
+
* Concrete implementation for writer.ts's RecordCallOptions.redact seam. Literal substring replacement only, never a pattern-based detector — a secret is arbitrary text (precision over recall, per CLAUDE.md).
|
|
3
|
+
* Ported from descry-desktop's redact.ts rather than shared (DEC-001 names no fifth repo). Opt-in, not automatic — only a caller holding actual configured secret values can supply what to redact.
|
|
46
4
|
*/
|
|
47
5
|
const REDACTED = "[REDACTED]";
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
* marker. Literal substring replacement, not regex — see this file's module
|
|
51
|
-
* header for why.
|
|
52
|
-
*/
|
|
6
|
+
/** Replace every occurrence of each secret value in `text` with a fixed
|
|
7
|
+
* marker. Literal substring replacement, not regex — see module header. */
|
|
53
8
|
export function redactSecretsInText(text, secretValues) {
|
|
54
9
|
let result = text;
|
|
55
10
|
for (const value of secretValues) {
|
|
@@ -59,13 +14,8 @@ export function redactSecretsInText(text, secretValues) {
|
|
|
59
14
|
}
|
|
60
15
|
return result;
|
|
61
16
|
}
|
|
62
|
-
/**
|
|
63
|
-
*
|
|
64
|
-
* and `.result` are typed as (`unknown`) — replacing every string leaf via
|
|
65
|
-
* `redactSecretsInText`. Non-string leaves (numbers, booleans, null) pass
|
|
66
|
-
* through untouched: a secret value the caller supplied is text, by
|
|
67
|
-
* definition, so there is nothing to compare a number against.
|
|
68
|
-
*/
|
|
17
|
+
/** Walks arbitrary JSON-shaped data, redacting every string leaf. Non-string
|
|
18
|
+
* leaves pass through — a secret value is text by definition. */
|
|
69
19
|
function redactDeep(value, secretValues) {
|
|
70
20
|
if (typeof value === "string")
|
|
71
21
|
return redactSecretsInText(value, secretValues);
|
|
@@ -80,14 +30,8 @@ function redactDeep(value, secretValues) {
|
|
|
80
30
|
}
|
|
81
31
|
return value;
|
|
82
32
|
}
|
|
83
|
-
/**
|
|
84
|
-
*
|
|
85
|
-
* given the secret values known at the call site — whatever the caller's own
|
|
86
|
-
* configuration surface can name as sensitive. Walks both `arguments` and
|
|
87
|
-
* `result` in full, since a secret passed in can just as easily be echoed
|
|
88
|
-
* back in a tool's result (an error message quoting the bad input, for
|
|
89
|
-
* instance) as it can appear in the arguments themselves.
|
|
90
|
-
*/
|
|
33
|
+
/** Builds a redact function for recordCall's seam. Walks both arguments and
|
|
34
|
+
* result in full — a secret can just as easily be echoed back in a result. */
|
|
91
35
|
export function createRecordingRedactor(secretValues) {
|
|
92
36
|
return (call) => ({
|
|
93
37
|
...call,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redact.js","sourceRoot":"","sources":["../../src/recording/redact.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"redact.js","sourceRoot":"","sources":["../../src/recording/redact.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,QAAQ,GAAG,YAAY,CAAC;AAE9B;4EAC4E;AAC5E,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,YAA+B;IAC/E,IAAI,MAAM,GAAG,IAAI,CAAC;IAClB,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,CAAC;QACjC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS,CAAC,gDAAgD;QAClF,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;kEACkE;AAClE,SAAS,UAAU,CAAC,KAAc,EAAE,YAA+B;IACjE,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,mBAAmB,CAAC,KAAK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