-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
129 lines (123 loc) · 3.75 KB
/
Copy pathindex.ts
File metadata and controls
129 lines (123 loc) · 3.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/**
* [LAYER: CORE]
* Modern JoyRide execution cache API — typed decisions only (frozen contract).
*
* @license MIT
* Copyright (c) CardSorting
* @see JoyRideContract.ts for export/import boundary rules.
* @see CONTRIBUTING.md for contributor workflow.
* Legacy APIs were removed. Use typed decision APIs only.
*/
export type { JoyRideCacheHitAudit } from "./JoyRideAudit"
export { getJoyRideCacheHitAuditCount, getJoyRideCacheHitAuditTrail } from "./JoyRideAudit"
export type { JoyRideCommandClassification, JoyRideCommandTier } from "./JoyRideCommandClassifier"
export {
canCommandSkipExecution,
classifyCommand,
isCommandCacheEligible,
isEnvAlteringCommand,
isReadOnlyCacheableCommand,
isVerificationCommand,
} from "./JoyRideCommandClassifier"
export type { JoyRideOperationalConfig, JoyRideOperationalMode } from "./JoyRideConfig"
export {
explainJoyRideConfig,
getJoyRideConfig,
getJoyRideDegradedReason,
isCommandReuseEnabled,
isDiagnosticsOnly,
isJoyRideDegraded,
isJoyRideDisabled,
isScratchCacheEnabled,
isSearchCacheEnabled,
isVerificationCacheEnabled,
loadJoyRideConfigFromEnv,
resetJoyRideConfig,
setJoyRideConfig,
} from "./JoyRideConfig"
export { buildJoyRideWorkspaceSnapshot } from "./JoyRideContext"
export {
clearJoyRideDecisionLog,
explainJoyRideDecision,
getJoyRideDecisionLog,
getLastJoyRideDecision,
} from "./JoyRideDecisionLog"
export type {
JoyRideCacheDecision,
JoyRideCommandLookupDecision,
JoyRideDecisionContext,
JoyRideDecisionType,
JoyRideDegradedDecision,
JoyRideDiagnosticOnlyDecision,
JoyRideDisabledDecision,
JoyRideFallbackBehavior,
JoyRideHitDecision,
JoyRideMissDecision,
JoyRideRejectedDecision,
JoyRideSearchLookupDecision,
JoyRideStaleDecision,
} from "./JoyRideDecisions"
export { isJoyRideHitDecision } from "./JoyRideDecisions"
export type { JoyRideDiagnosticReport } from "./JoyRideDiagnostics"
export {
buildJoyRideDiagnosticReport,
createJoyRideBugReportSnapshot,
dumpJoyRideDiagnostics,
formatJoyRideDiagnosticReport,
getJoyRideStats,
logJoyRideDiagnostics,
summarizeJoyRideHealth,
} from "./JoyRideDiagnostics"
export {
createJoyRideTaskScope,
lookupSafeCommandResult,
lookupSearchResult,
lookupVerificationProof,
storeCommandDiagnostic,
storeFailedVerificationDiagnostic,
storeReusableCommandResult,
storeSearchResult,
storeVerificationProof,
} from "./JoyRideHotPath"
export type {
JoyRideCommandCacheEntry,
JoyRideGrepCacheEntry,
JoyRideSearchLookupOptions,
} from "./JoyRideHotPathTypes"
export {
bumpTaskGeneration,
flushTaskGeneration,
flushWorkspace,
registerTaskLifecycle,
shutdownJoyRide,
withTaskCacheScope,
} from "./JoyRideLifecycle"
export type { JoyRideReasonCode } from "./JoyRideReasonCodes"
export { JOYRIDE_REASON } from "./JoyRideReasonCodes"
export type { ScratchArtifactEntry, ScratchArtifactSpec } from "./JoyRideScratch"
export {
createScratchArtifactEntry,
disposeScratchArtifact,
flushScratchForTask,
rejectUnsafeArtifact,
storeScratchArtifactWithCleanup,
} from "./JoyRideScratch"
export type { VerificationProofInput } from "./JoyRideVerification"
export {
buildVerificationFingerprint,
explainVerificationMiss,
lookupVerificationProofWithExplain,
validateVerificationProof,
} from "./JoyRideVerification"
import { JoyRideCache } from "./JoyRideCache"
import { shutdownJoyRide } from "./JoyRideLifecycle"
const joyRideCache = new JoyRideCache()
/** Singleton JoyRide cache instance — pass to modern lookup/store helpers only. */
export function getJoyRideCache(): JoyRideCache {
return joyRideCache
}
/** Extension deactivate shutdown — delegates to lifecycle helper. */
export function shutdownJoyRideCache(): number {
return shutdownJoyRide(joyRideCache, "workspace_closed")
}
export { clearJoyRideDecisionLog as clearJoyRideDiagnostics } from "./JoyRideDecisionLog"