@alan512/experienceengine 0.2.1 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/.mcp.json +5 -6
- package/README.md +24 -10
- package/README.zh-CN.md +22 -8
- package/dist/adapters/codex/action-registry.d.ts +23 -1
- package/dist/adapters/codex/action-registry.js +73 -0
- package/dist/adapters/codex/action-registry.js.map +1 -1
- package/dist/adapters/codex/behavior-loop.d.ts +80 -0
- package/dist/adapters/codex/behavior-loop.js +189 -0
- package/dist/adapters/codex/behavior-loop.js.map +1 -0
- package/dist/adapters/codex/mcp-server.d.ts +27 -72
- package/dist/adapters/codex/mcp-server.js +36 -160
- package/dist/adapters/codex/mcp-server.js.map +1 -1
- package/dist/cli/commands/claude-hook.d.ts +4 -0
- package/dist/cli/commands/claude-hook.js +105 -21
- package/dist/cli/commands/claude-hook.js.map +1 -1
- package/dist/cli/commands/codex-hook.d.ts +22 -0
- package/dist/cli/commands/codex-hook.js +298 -0
- package/dist/cli/commands/codex-hook.js.map +1 -0
- package/dist/cli/commands/config.js +9 -1
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/doctor.js +63 -1
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/inspect.d.ts +1 -1
- package/dist/cli/commands/inspect.js +325 -1
- package/dist/cli/commands/inspect.js.map +1 -1
- package/dist/cli/commands/install.js +4 -1
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/maintenance.js +4 -0
- package/dist/cli/commands/maintenance.js.map +1 -1
- package/dist/cli/commands/repair.js +35 -3
- package/dist/cli/commands/repair.js.map +1 -1
- package/dist/cli/commands/status.js +27 -0
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/upgrade.js +2 -0
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/dispatch.js +8 -3
- package/dist/cli/dispatch.js.map +1 -1
- package/dist/config/config-schema.d.ts +8 -0
- package/dist/config/config-schema.js +6 -0
- package/dist/config/config-schema.js.map +1 -1
- package/dist/config/default-config.js +1 -0
- package/dist/config/default-config.js.map +1 -1
- package/dist/config/load-config.js +3 -0
- package/dist/config/load-config.js.map +1 -1
- package/dist/controller/candidate-retriever.d.ts +4 -1
- package/dist/controller/candidate-retriever.js +129 -13
- package/dist/controller/candidate-retriever.js.map +1 -1
- package/dist/controller/injection-renderer.d.ts +2 -2
- package/dist/controller/injection-renderer.js +22 -3
- package/dist/controller/injection-renderer.js.map +1 -1
- package/dist/controller/injection-scorecard.js +3 -0
- package/dist/controller/injection-scorecard.js.map +1 -1
- package/dist/controller/intervention-controller.d.ts +2 -2
- package/dist/controller/intervention-controller.js +183 -25
- package/dist/controller/intervention-controller.js.map +1 -1
- package/dist/controller/model-reranker-mode.d.ts +4 -0
- package/dist/controller/model-reranker-mode.js +14 -0
- package/dist/controller/model-reranker-mode.js.map +1 -0
- package/dist/controller/model-reranker.d.ts +0 -1
- package/dist/controller/model-reranker.js +1 -13
- package/dist/controller/model-reranker.js.map +1 -1
- package/dist/controller/policy-enricher.d.ts +2 -1
- package/dist/controller/policy-enricher.js +71 -11
- package/dist/controller/policy-enricher.js.map +1 -1
- package/dist/evaluation/openclaw-scenarios.js +12 -5
- package/dist/evaluation/openclaw-scenarios.js.map +1 -1
- package/dist/experience-management/repo-policy.d.ts +53 -0
- package/dist/experience-management/repo-policy.js +175 -0
- package/dist/experience-management/repo-policy.js.map +1 -0
- package/dist/hybrid/capsule-builder.js +2 -0
- package/dist/hybrid/capsule-builder.js.map +1 -1
- package/dist/input/scope-resolver.js +16 -4
- package/dist/input/scope-resolver.js.map +1 -1
- package/dist/install/claude-cli.js +38 -21
- package/dist/install/claude-cli.js.map +1 -1
- package/dist/install/claude-code-doctor.js +8 -3
- package/dist/install/claude-code-doctor.js.map +1 -1
- package/dist/install/claude-code-installer.js +5 -2
- package/dist/install/claude-code-installer.js.map +1 -1
- package/dist/install/claude-runtime-target.d.ts +5 -0
- package/dist/install/claude-runtime-target.js +32 -2
- package/dist/install/claude-runtime-target.js.map +1 -1
- package/dist/install/codex-cli.d.ts +7 -0
- package/dist/install/codex-cli.js +43 -20
- package/dist/install/codex-cli.js.map +1 -1
- package/dist/install/codex-hooks.d.ts +42 -0
- package/dist/install/codex-hooks.js +280 -0
- package/dist/install/codex-hooks.js.map +1 -0
- package/dist/install/codex-installer.d.ts +21 -3
- package/dist/install/codex-installer.js +98 -9
- package/dist/install/codex-installer.js.map +1 -1
- package/dist/install/codex-runtime-target.d.ts +20 -0
- package/dist/install/codex-runtime-target.js +85 -17
- package/dist/install/codex-runtime-target.js.map +1 -1
- package/dist/install/openclaw-cli.d.ts +1 -0
- package/dist/install/openclaw-cli.js +52 -3
- package/dist/install/openclaw-cli.js.map +1 -1
- package/dist/install/openclaw-installer.d.ts +5 -0
- package/dist/install/openclaw-installer.js +24 -5
- package/dist/install/openclaw-installer.js.map +1 -1
- package/dist/install/public-install.d.ts +1 -0
- package/dist/install/public-install.js +5 -0
- package/dist/install/public-install.js.map +1 -1
- package/dist/interaction/repo-summary.d.ts +17 -0
- package/dist/interaction/repo-summary.js +33 -15
- package/dist/interaction/repo-summary.js.map +1 -1
- package/dist/interaction/retrieval-policy-inspection.d.ts +19 -0
- package/dist/interaction/retrieval-policy-inspection.js +33 -0
- package/dist/interaction/retrieval-policy-inspection.js.map +1 -0
- package/dist/interaction/service.d.ts +24 -1
- package/dist/interaction/service.js +171 -12
- package/dist/interaction/service.js.map +1 -1
- package/dist/maintenance/claude-validate-print.d.ts +8 -1
- package/dist/maintenance/claude-validate-print.js +52 -2
- package/dist/maintenance/claude-validate-print.js.map +1 -1
- package/dist/maintenance/experience-export-drafts.d.ts +56 -0
- package/dist/maintenance/experience-export-drafts.js +217 -0
- package/dist/maintenance/experience-export-drafts.js.map +1 -0
- package/dist/maintenance/experience-hygiene.d.ts +38 -0
- package/dist/maintenance/experience-hygiene.js +266 -0
- package/dist/maintenance/experience-hygiene.js.map +1 -0
- package/dist/maintenance/operator-review-flow.d.ts +81 -0
- package/dist/maintenance/operator-review-flow.js +172 -0
- package/dist/maintenance/operator-review-flow.js.map +1 -0
- package/dist/plugin/openclaw-plugin.d.ts +5 -0
- package/dist/plugin/runtime-helpers.js +43 -1
- package/dist/plugin/runtime-helpers.js.map +1 -1
- package/dist/runtime/prompt-service.d.ts +51 -0
- package/dist/runtime/prompt-service.js +209 -0
- package/dist/runtime/prompt-service.js.map +1 -0
- package/dist/runtime/service.d.ts +7 -2
- package/dist/runtime/service.js +176 -25
- package/dist/runtime/service.js.map +1 -1
- package/dist/store/sqlite/db.js +15 -0
- package/dist/store/sqlite/db.js.map +1 -1
- package/dist/store/sqlite/repositories/attribution-record-repo.d.ts +15 -0
- package/dist/store/sqlite/repositories/attribution-record-repo.js +111 -0
- package/dist/store/sqlite/repositories/attribution-record-repo.js.map +1 -0
- package/dist/store/sqlite/repositories/episode-repo.d.ts +14 -0
- package/dist/store/sqlite/repositories/episode-repo.js +84 -0
- package/dist/store/sqlite/repositories/episode-repo.js.map +1 -0
- package/dist/store/sqlite/repositories/injection-repo.d.ts +2 -0
- package/dist/store/sqlite/repositories/injection-repo.js +32 -5
- package/dist/store/sqlite/repositories/injection-repo.js.map +1 -1
- package/dist/store/sqlite/repositories/input-record-repo.d.ts +1 -0
- package/dist/store/sqlite/repositories/input-record-repo.js +23 -10
- package/dist/store/sqlite/repositories/input-record-repo.js.map +1 -1
- package/dist/store/sqlite/repositories/node-repo.d.ts +1 -0
- package/dist/store/sqlite/repositories/node-repo.js +10 -0
- package/dist/store/sqlite/repositories/node-repo.js.map +1 -1
- package/dist/store/sqlite/repositories/outcome-record-repo.d.ts +1 -0
- package/dist/store/sqlite/repositories/outcome-record-repo.js +11 -2
- package/dist/store/sqlite/repositories/outcome-record-repo.js.map +1 -1
- package/dist/store/sqlite/repositories/repo-policy-repo.d.ts +11 -0
- package/dist/store/sqlite/repositories/repo-policy-repo.js +87 -0
- package/dist/store/sqlite/repositories/repo-policy-repo.js.map +1 -0
- package/dist/store/sqlite/repositories/review-event-repo.d.ts +1 -0
- package/dist/store/sqlite/repositories/review-event-repo.js +11 -2
- package/dist/store/sqlite/repositories/review-event-repo.js.map +1 -1
- package/dist/store/sqlite/repositories/task-run-repo.d.ts +1 -0
- package/dist/store/sqlite/repositories/task-run-repo.js +11 -2
- package/dist/store/sqlite/repositories/task-run-repo.js.map +1 -1
- package/dist/store/sqlite/schema.sql +43 -0
- package/dist/store/vector/api-embedding-provider.js +14 -3
- package/dist/store/vector/api-embedding-provider.js.map +1 -1
- package/dist/store/vector/embeddings.js +5 -51
- package/dist/store/vector/embeddings.js.map +1 -1
- package/dist/store/vector/local-provider.js +14 -3
- package/dist/store/vector/local-provider.js.map +1 -1
- package/dist/types/domain.d.ts +89 -1
- package/dist/utils/text.js +5 -1
- package/dist/utils/text.js.map +1 -1
- package/docs/assets/readme/inspect-last-example.svg +37 -0
- package/docs/releases/v0.2.1.md +9 -0
- package/docs/releases/v0.3.0.md +20 -0
- package/docs/releases/v0.3.1.md +23 -0
- package/docs/user-guide.md +92 -7
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -3
- package/plugins/claude-code-experienceengine/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code-experienceengine/.mcp.json +3 -9
- package/plugins/claude-code-experienceengine/scripts/install-deps.sh +1 -1
- package/plugins/claude-code-experienceengine/scripts/mcp-server.sh +43 -0
- package/scripts/claude-plugin/claude-hook.sh +6 -1
- package/scripts/claude-plugin/mcp-server.sh +45 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-provider.js","sourceRoot":"","sources":["../../../src/store/vector/local-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7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AAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACpC,MAAM,aAAa,GAAG,oBAAoB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAE5D,MAAM,CAAC,aAAa,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,gCAAgC,EAAE,CAAC;IAEnC,IAAI,OAAO,CAAC,MAAM,EAAE,iBAAiB,KAAK,QAAQ,EAAE,CAAC;QACnD,OAAO;YACL,QAAQ,EAAE,aAAa;YACvB,KAAK;YACL,OAAO,EAAE,KAAK;YACd,UAAU,EAAE,IAAI;SACjB,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,yBAAyB,CAAC,OAAO,CAAC,CAAC;IAC1D,OAAO;QACL,QAAQ,EAAE,aAAa;QACvB,KAAK;QACL,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,QAAQ,CAAC,UAAU;KAChC,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/types/domain.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export type ValidationState = "pending_reuse_validation" | "validated_by_reuse"
|
|
|
11
11
|
export type CorrectionScope = "task_local" | "repo_local" | "workflow_local" | "host_local" | "cross_repo_candidate";
|
|
12
12
|
export type CorrectionCategory = "goal_interpretation" | "quality_bar" | "interaction_behavior" | "verification_order" | "implementation_boundary" | "style_constraint";
|
|
13
13
|
export type InjectionMode = "skip" | "inject_conservative" | "inject";
|
|
14
|
+
export type InterventionStrength = "diagnostic_hint" | "soft_recommendation" | "strong_recommendation" | "hard_constraint";
|
|
14
15
|
export type InjectionRiskLevel = "low" | "medium" | "high";
|
|
15
16
|
export type MatchBand = "high" | "medium" | "low";
|
|
16
17
|
export type ScopeMatchBand = "same" | "related" | "cross" | "none";
|
|
@@ -31,6 +32,11 @@ export type SyncSecondOpinionDecision = "allow" | "allow_conservative" | "skip";
|
|
|
31
32
|
export type SyncSecondOpinionTrigger = "conservative_delivery_state" | "harm_history" | "close_score_margin" | "expectation_correction";
|
|
32
33
|
export type EvaluationMode = "live" | "shadow" | "holdout";
|
|
33
34
|
export type OutcomeSignal = "success" | "failure" | "unknown";
|
|
35
|
+
export type AttributionVerdict = "strong_helped" | "weak_helped" | "neutral" | "unknown" | "weak_harmed" | "strong_harmed";
|
|
36
|
+
export type AttributionConfidence = "low" | "medium" | "high";
|
|
37
|
+
export type AttributionSource = "automatic" | "manual_override" | "diagnostic_record";
|
|
38
|
+
export type RepoExperienceMode = "safe" | "fast_learning" | "strict";
|
|
39
|
+
export type RepoCircuitState = "clear" | "tripped";
|
|
34
40
|
export type ToolEventStatus = "success" | "failure" | "unknown";
|
|
35
41
|
export type CandidateLifecycleState = "pending" | "distilled" | "failed" | "discarded";
|
|
36
42
|
export type DistillationJobState = "pending" | "processing" | "succeeded" | "failed" | "discarded";
|
|
@@ -82,8 +88,27 @@ export type RetrievalContext = {
|
|
|
82
88
|
modulePaths?: string[];
|
|
83
89
|
expectationCorrectionIntent?: boolean;
|
|
84
90
|
};
|
|
91
|
+
export type RetrievalPolicyStageName = "retrieval_context" | "hard_filter" | "shortlist" | "semantic_rerank_backfill" | "policy_enrichment" | "decision_assembly";
|
|
92
|
+
export type RetrievalPolicyStageDiagnostic = {
|
|
93
|
+
stage: RetrievalPolicyStageName;
|
|
94
|
+
acceptedCount?: number;
|
|
95
|
+
rejectedCount?: number;
|
|
96
|
+
passedCount?: number;
|
|
97
|
+
reasonCodes: string[];
|
|
98
|
+
};
|
|
99
|
+
export type RetrievalPolicyDiagnostics = {
|
|
100
|
+
stages: RetrievalPolicyStageDiagnostic[];
|
|
101
|
+
};
|
|
102
|
+
export type PolicyEnrichmentComponentCategory = "family_fit" | "specificity" | "feedback" | "maturity" | "penalty" | "expectation_correction" | "task_alignment" | "retrieval_context";
|
|
103
|
+
export type PolicyEnrichmentComponent = {
|
|
104
|
+
name: string;
|
|
105
|
+
category: PolicyEnrichmentComponentCategory;
|
|
106
|
+
value: number;
|
|
107
|
+
reason: string;
|
|
108
|
+
};
|
|
85
109
|
export type ExperienceInputRecord = {
|
|
86
110
|
record_id: string;
|
|
111
|
+
episode_id?: string;
|
|
87
112
|
scope_id: string;
|
|
88
113
|
session_id?: string;
|
|
89
114
|
task_type: ResolvedTaskType;
|
|
@@ -96,6 +121,7 @@ export type ExperienceInputRecord = {
|
|
|
96
121
|
};
|
|
97
122
|
export type TaskRun = {
|
|
98
123
|
id: string;
|
|
124
|
+
episode_id?: string;
|
|
99
125
|
host: "openclaw" | "claude-code" | "codex";
|
|
100
126
|
scope_id: string;
|
|
101
127
|
session_id?: string;
|
|
@@ -114,6 +140,7 @@ export type TaskRun = {
|
|
|
114
140
|
};
|
|
115
141
|
export type OutcomeRecord = {
|
|
116
142
|
id: string;
|
|
143
|
+
episode_id?: string;
|
|
117
144
|
task_run_id: string;
|
|
118
145
|
outcome_signal: OutcomeSignal;
|
|
119
146
|
failure_signature?: string;
|
|
@@ -122,6 +149,7 @@ export type OutcomeRecord = {
|
|
|
122
149
|
};
|
|
123
150
|
export type ReviewEvent = {
|
|
124
151
|
id: string;
|
|
152
|
+
episode_id?: string;
|
|
125
153
|
node_id: string;
|
|
126
154
|
task_run_id?: string;
|
|
127
155
|
event_type: "mark_helped" | "mark_harmed" | "mark_uncertain" | "cool" | "retire" | "quarantine" | "restore_conservative" | "restore_eligible" | "promote_eligible";
|
|
@@ -221,6 +249,7 @@ export type ExperienceNode = {
|
|
|
221
249
|
};
|
|
222
250
|
export type InjectionEvent = {
|
|
223
251
|
injection_id: string;
|
|
252
|
+
episode_id?: string;
|
|
224
253
|
session_id?: string;
|
|
225
254
|
scope_id: string;
|
|
226
255
|
task_type: TaskType;
|
|
@@ -237,6 +266,58 @@ export type InjectionEvent = {
|
|
|
237
266
|
created_at: string;
|
|
238
267
|
resolved_at?: string;
|
|
239
268
|
};
|
|
269
|
+
export type AttributionRecord = {
|
|
270
|
+
id: string;
|
|
271
|
+
injection_id?: string;
|
|
272
|
+
node_id: string;
|
|
273
|
+
episode_id?: string;
|
|
274
|
+
intervention_strength?: InterventionStrength;
|
|
275
|
+
injection_mode?: InjectionMode;
|
|
276
|
+
delivery_mode?: EvaluationMode;
|
|
277
|
+
delivered: boolean;
|
|
278
|
+
outcome: OutcomeSignal;
|
|
279
|
+
attribution_verdict: AttributionVerdict;
|
|
280
|
+
confidence: AttributionConfidence;
|
|
281
|
+
evidence_refs: string[];
|
|
282
|
+
user_override?: "helped" | "harmed" | "neutral";
|
|
283
|
+
source: AttributionSource;
|
|
284
|
+
attribution_reason?: FeedbackAttributionReason | "manual_override" | "diagnostic_record";
|
|
285
|
+
created_at: string;
|
|
286
|
+
resolved_at?: string;
|
|
287
|
+
};
|
|
288
|
+
export type RepoPolicy = {
|
|
289
|
+
scope_id: string;
|
|
290
|
+
configured_mode: RepoExperienceMode;
|
|
291
|
+
effective_mode: RepoExperienceMode;
|
|
292
|
+
circuit_state: RepoCircuitState;
|
|
293
|
+
circuit_reason?: string;
|
|
294
|
+
live_diagnostics_disabled: boolean;
|
|
295
|
+
created_at: string;
|
|
296
|
+
updated_at: string;
|
|
297
|
+
last_tripped_at?: string;
|
|
298
|
+
restored_at?: string;
|
|
299
|
+
};
|
|
300
|
+
export type EpisodeProjection = {
|
|
301
|
+
episode_id: string;
|
|
302
|
+
scope_id?: string;
|
|
303
|
+
session_id?: string;
|
|
304
|
+
task_run?: TaskRun;
|
|
305
|
+
input_records: ExperienceInputRecord[];
|
|
306
|
+
outcome_records: OutcomeRecord[];
|
|
307
|
+
injection_events: InjectionEvent[];
|
|
308
|
+
attribution_records: AttributionRecord[];
|
|
309
|
+
review_events: ReviewEvent[];
|
|
310
|
+
};
|
|
311
|
+
export type EpisodeSummary = {
|
|
312
|
+
episode_id: string;
|
|
313
|
+
scope_id: string;
|
|
314
|
+
session_id?: string;
|
|
315
|
+
task_type?: ResolvedTaskType;
|
|
316
|
+
task_summary?: string;
|
|
317
|
+
outcome?: OutcomeSignal;
|
|
318
|
+
created_at: string;
|
|
319
|
+
updated_at: string;
|
|
320
|
+
};
|
|
240
321
|
export type InjectionScorecardNode = {
|
|
241
322
|
id: string;
|
|
242
323
|
nodeType: ExperienceNodeType;
|
|
@@ -265,6 +346,7 @@ export type InjectionScorecardCandidate = {
|
|
|
265
346
|
rerankSource?: "heuristic" | "model";
|
|
266
347
|
retrievalReasons?: string[];
|
|
267
348
|
policyReasons?: string[];
|
|
349
|
+
policyComponents?: PolicyEnrichmentComponent[];
|
|
268
350
|
taskFamilyMatch: boolean;
|
|
269
351
|
};
|
|
270
352
|
export type InterventionRejectedCandidate = {
|
|
@@ -275,6 +357,9 @@ export type InterventionRejectedCandidate = {
|
|
|
275
357
|
totalScore?: number;
|
|
276
358
|
};
|
|
277
359
|
export type InterventionDecisionDiagnostics = {
|
|
360
|
+
interventionStrength?: InterventionStrength;
|
|
361
|
+
recordOnlyDiagnosticCandidateIds?: string[];
|
|
362
|
+
retrievalPolicyDiagnostics?: RetrievalPolicyDiagnostics;
|
|
278
363
|
topCandidates: InjectionScorecardCandidate[];
|
|
279
364
|
topCandidateScore?: number;
|
|
280
365
|
scoreMargin?: number;
|
|
@@ -300,7 +385,8 @@ export type InjectionScorecard = {
|
|
|
300
385
|
scopeId: string;
|
|
301
386
|
taskType: TaskType;
|
|
302
387
|
taskSummary: string;
|
|
303
|
-
mode:
|
|
388
|
+
mode: InjectionMode;
|
|
389
|
+
interventionStrength?: InterventionStrength;
|
|
304
390
|
riskLevel: InjectionRiskLevel;
|
|
305
391
|
recommendation: string;
|
|
306
392
|
reasons: string[];
|
|
@@ -322,6 +408,8 @@ export type InjectionScorecard = {
|
|
|
322
408
|
secondOpinionReason?: string;
|
|
323
409
|
secondOpinionTrigger?: SyncSecondOpinionTrigger;
|
|
324
410
|
selectedCandidateIds?: string[];
|
|
411
|
+
recordOnlyDiagnosticCandidateIds?: string[];
|
|
412
|
+
retrievalPolicyDiagnostics?: RetrievalPolicyDiagnostics;
|
|
325
413
|
rejectedCandidates?: InterventionRejectedCandidate[];
|
|
326
414
|
nodes: InjectionScorecardNode[];
|
|
327
415
|
createdAt: string;
|
package/dist/utils/text.js
CHANGED
|
@@ -13,7 +13,11 @@ export const tokenize = (value) => normalizeWhitespace(value)
|
|
|
13
13
|
.filter(Boolean);
|
|
14
14
|
const EXPERIENCE_INJECTION_HEADINGS = [
|
|
15
15
|
"Execution hints from prior similar tasks:",
|
|
16
|
-
"Conservative execution hints:"
|
|
16
|
+
"Conservative execution hints:",
|
|
17
|
+
"Diagnostic lead from prior experience:",
|
|
18
|
+
"Relevant prior experience:",
|
|
19
|
+
"Validated prior experience:",
|
|
20
|
+
"Project constraint or explicit instruction:"
|
|
17
21
|
];
|
|
18
22
|
export const stripLeadingExperienceInjection = (value) => {
|
|
19
23
|
let next = value.trimStart();
|
package/dist/utils/text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/utils/text.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,GAAG,GAAG,GAAG,EAAU,EAAE,CAC3D,KAAK,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC;AAE1E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAEhG,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAa,EAAU,EAAE;IAClD,MAAM,UAAU,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC9C,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO,QAAQ,CAA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IACL,MAAM;IACN,KAAK;IACL,MAAM;IACN,SAAS;IACT,QAAQ;IACR,MAAM;IACN,YAAY;IACZ,KAAK;IACL,IAAI;IACJ,MAAM;IACN,SAAS;CACV,CAAC;AAEF,MAAM,iBAAiB,GAAG;IACxB,cAAc;IACd,aAAa;IACb,oBAAoB;IACpB,qDAAqD;CACtD,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,KAAa,EAAW,EAAE;IACtD,MAAM,UAAU,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC9C,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,KAAK,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;IACvC,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAa,EAAU,EAAE,CAClE,mBAAmB,CACjB,KAAK,CAAC,OAAO,CACX,4DAA4D,EAC5D,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CACrF,CACF,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<svg width="1200" height="920" viewBox="0 0 1200 920" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="1200" height="920" rx="20" fill="#0B1020"/>
|
|
3
|
+
<rect x="24" y="24" width="1152" height="64" rx="14" fill="#131A2E"/>
|
|
4
|
+
<circle cx="60" cy="56" r="9" fill="#FF5F57"/>
|
|
5
|
+
<circle cx="88" cy="56" r="9" fill="#FEBB2E"/>
|
|
6
|
+
<circle cx="116" cy="56" r="9" fill="#28C840"/>
|
|
7
|
+
<text x="600" y="62" text-anchor="middle" fill="#DDE7FF" font-family="DejaVu Sans Mono, monospace" font-size="24">ee inspect --last --verbose</text>
|
|
8
|
+
|
|
9
|
+
<rect x="24" y="104" width="1152" height="792" rx="14" fill="#0F172A"/>
|
|
10
|
+
|
|
11
|
+
<g font-family="DejaVu Sans Mono, monospace" font-size="24">
|
|
12
|
+
<text x="48" y="152" fill="#93C5FD">$ ee inspect --last --verbose</text>
|
|
13
|
+
|
|
14
|
+
<text x="48" y="198" fill="#E5E7EB">Session: session_last</text>
|
|
15
|
+
<text x="48" y="232" fill="#E5E7EB">Scope: scope_current_repo</text>
|
|
16
|
+
<text x="48" y="266" fill="#E5E7EB">Task type: test_debug</text>
|
|
17
|
+
<text x="48" y="300" fill="#E5E7EB">Intervention: inject</text>
|
|
18
|
+
<text x="48" y="334" fill="#E5E7EB">Delivery style: normal hint delivery</text>
|
|
19
|
+
<text x="48" y="368" fill="#E5E7EB">Automatic feedback: helped</text>
|
|
20
|
+
|
|
21
|
+
<text x="48" y="426" fill="#A7F3D0">Injected nodes:</text>
|
|
22
|
+
<text x="72" y="460" fill="#E5E7EB">- node_inspect strategy active system_derived</text>
|
|
23
|
+
<text x="96" y="494" fill="#E5E7EB">Trigger: Fix the failing auth test</text>
|
|
24
|
+
<text x="96" y="528" fill="#E5E7EB">Quality: strong</text>
|
|
25
|
+
<text x="96" y="562" fill="#E5E7EB">Best fit: test_debug tasks in this repo scope</text>
|
|
26
|
+
|
|
27
|
+
<text x="48" y="620" fill="#FDE68A">Scorecard:</text>
|
|
28
|
+
<text x="72" y="654" fill="#E5E7EB">- Risk: low</text>
|
|
29
|
+
<text x="72" y="688" fill="#E5E7EB">- Recommendation: Apply these hints, then mark helped or harmed.</text>
|
|
30
|
+
<text x="72" y="722" fill="#E5E7EB">- Why ExperienceEngine acted: best reusable guidance for this task.</text>
|
|
31
|
+
<text x="72" y="756" fill="#E5E7EB">- Trust summary: low-risk active guidance with helped signals.</text>
|
|
32
|
+
|
|
33
|
+
<text x="48" y="814" fill="#67E8F9">Hints:</text>
|
|
34
|
+
<text x="72" y="848" fill="#E5E7EB">- Run the failing auth test before editing and verify after the fix.</text>
|
|
35
|
+
<text x="48" y="882" fill="#C4B5FD">Outcome: success</text>
|
|
36
|
+
</g>
|
|
37
|
+
</svg>
|
package/docs/releases/v0.2.1.md
CHANGED
|
@@ -14,8 +14,17 @@ This development slice tightens Codex-era live-delivery quality after reviewing
|
|
|
14
14
|
- high-match same-scope conservative experience can promote to normal eligible delivery after successful reuse
|
|
15
15
|
- cross-scope reuse is available only through conservative candidates, not direct injection
|
|
16
16
|
- `ee status` and `ee doctor codex` now report whether the `ee` CLI fallback is available on `PATH`
|
|
17
|
+
- Codex managed setup now targets Codex-native hooks plus MCP: `codex_hooks` is enabled, ExperienceEngine-owned Codex hook entries are installed, and stale `experienceengine-claude-hook` drift can be repaired safely.
|
|
18
|
+
- Codex project hooks now support the practical Windows Codex App + WSL Codex CLI split: repo hooks are shared through `.codex/hooks.json`, while MCP registration stays owned by each runtime's Codex home.
|
|
19
|
+
- Codex hook runtime is leaner on the prompt path: prompt-time lookup uses a light runtime, full runtime/provider loading is deferred, and `PostToolUse` / `Stop` are queued for background processing.
|
|
20
|
+
- Codex hook launchers use a fast path for hook execution so missing local embedding fallback dependencies do not block normal host interaction.
|
|
21
|
+
- Source-repo host validation now covers Windows Codex App, WSL Codex CLI, Claude Code, and WSL OpenClaw writing to the same project scope.
|
|
22
|
+
- OpenClaw prompt payloads now resolve the real project root from explicit host fields or nearby repo markers before scope selection; unresolved global OpenClaw workspace payloads are session-isolated instead of being reused as a broad project scope.
|
|
17
23
|
|
|
18
24
|
## Notes
|
|
19
25
|
|
|
20
26
|
- LLM usage remains in the existing places: posttask distillation and selective second-opinion review.
|
|
21
27
|
- The new routing layer is deterministic and is intended to reduce both over-conservative same-scope skips and harmful broad reuse.
|
|
28
|
+
- `UserPromptSubmit` remains intentionally synchronous because it owns live injection. The async queue applies to follow-up capture and finalize hooks.
|
|
29
|
+
- Host validation statements in this release note refer to source-repo validation, not published npm package or host marketplace validation.
|
|
30
|
+
- OpenClaw validation used the OpenClaw-compatible `openrouter/tencent/hy3-preview:free` model id. The bare `tencent/hy3-preview:free` id matched the Claude Code spelling but is marked missing by OpenClaw's model registry.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# ExperienceEngine v0.3.0
|
|
2
|
+
|
|
3
|
+
v0.3.0 focuses on making the same project-level EE experience state usable across the current host set without leaking host-specific installation details into the published package.
|
|
4
|
+
|
|
5
|
+
## Highlights
|
|
6
|
+
|
|
7
|
+
- Added cross-runtime Codex hook launchers so a shared project can work from both Windows Codex App and WSL Codex CLI while writing to the same configured EE home.
|
|
8
|
+
- Added cross-runtime Claude Code hook launchers and plugin MCP startup flow so marketplace installs no longer depend on local source-repo paths.
|
|
9
|
+
- Improved Claude Code validation by checking both the Claude print transcript and the underlying EE MCP server tool list.
|
|
10
|
+
- Improved OpenClaw repair diagnostics so a loaded, matching host-native plugin is not reported as needing restart.
|
|
11
|
+
- Removed the local Hugging Face embedding runtime from the default npm dependency graph; API embeddings now fall back directly to legacy retrieval, while fully local embeddings remain an explicit optional setup.
|
|
12
|
+
- Kept Codex `PreToolUse` disabled by default; Codex live injection remains on `UserPromptSubmit`, with `PostToolUse` and `Stop` used for learning and finalization.
|
|
13
|
+
|
|
14
|
+
## Upgrade Notes
|
|
15
|
+
|
|
16
|
+
- New npm users should install with `npm install -g @alan512/experienceengine@0.3.0`, then run `ee install <host>` or `ee upgrade <host>` for the hosts they use.
|
|
17
|
+
- Existing users should run `ee upgrade codex`, `ee upgrade claude-code`, or `ee upgrade openclaw` after updating the npm package so host wiring is regenerated with the current launchers.
|
|
18
|
+
- Mixed Windows App and WSL CLI Codex use should keep `EXPERIENCE_ENGINE_HOME` pointed at the same shared EE data directory if the user wants both hosts to share one project experience store.
|
|
19
|
+
- Codex users may need to approve project hooks once after install or upgrade. In Codex App or Codex CLI, open `/hooks` and approve ExperienceEngine's `UserPromptSubmit`, `PostToolUse`, and `Stop` hooks. Approve `PreToolUse` only when `EXPERIENCE_ENGINE_CODEX_PRETOOL_HOOK_ENABLED=1` was used.
|
|
20
|
+
- Users who need offline semantic retrieval should install `@huggingface/transformers` separately and set `embeddingProvider = "local"`; default installs no longer download `sharp` / `onnxruntime` through that path.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# ExperienceEngine v0.3.1
|
|
2
|
+
|
|
3
|
+
Release date: 2026-05-08
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
|
|
7
|
+
v0.3.1 is a patch release for smoother Codex installs on fresh machines and clearer first-run hook approval.
|
|
8
|
+
|
|
9
|
+
## Included
|
|
10
|
+
|
|
11
|
+
- Removed `@huggingface/transformers` from the default npm dependency graph so new installs no longer pull `sharp` / `onnxruntime` unless local embeddings are explicitly configured.
|
|
12
|
+
- Changed default API embedding fallback to legacy hash-based retrieval when no API provider is available or the selected API provider fails.
|
|
13
|
+
- Kept fully local semantic embeddings available as an optional setup: install `@huggingface/transformers` separately and set `embeddingProvider = "local"`.
|
|
14
|
+
- Updated Codex project hook feature wiring from deprecated `[features].codex_hooks` to `[features].hooks`.
|
|
15
|
+
- Added migration support so existing `codex_hooks = true` project configs are rewritten to `hooks = true`.
|
|
16
|
+
- Added Codex install, upgrade, and repair output telling users to open `/hooks` and approve ExperienceEngine's `UserPromptSubmit`, `PostToolUse`, and `Stop` hooks.
|
|
17
|
+
- Clarified that Codex App and Codex CLI both load repo-level project hooks when they open the same repo; the hook review step is not CLI-only.
|
|
18
|
+
|
|
19
|
+
## Upgrade Notes
|
|
20
|
+
|
|
21
|
+
- Existing npm users should update to `@alan512/experienceengine@0.3.1`, then run `ee upgrade codex` in each Codex-enabled repo.
|
|
22
|
+
- After the first Codex session restart, open `/hooks` if Codex reports hooks need review.
|
|
23
|
+
- Approve `UserPromptSubmit`, `PostToolUse`, and `Stop`. Approve `PreToolUse` only if `EXPERIENCE_ENGINE_CODEX_PRETOOL_HOOK_ENABLED=1` was used.
|
package/docs/user-guide.md
CHANGED
|
@@ -107,7 +107,8 @@ Install ExperienceEngine through the host setup flow for:
|
|
|
107
107
|
- `ee install codex`
|
|
108
108
|
- native/manual fallback:
|
|
109
109
|
- `codex mcp add experienceengine --env EXPERIENCE_ENGINE_HOME=$HOME/.experienceengine -- npx -y @alan512/experienceengine codex-mcp-server`
|
|
110
|
-
- after
|
|
110
|
+
- after the managed path, start a new Codex session in this repo so Codex-native hooks, MCP wiring, and the `AGENTS.md` instruction block are picked up
|
|
111
|
+
- the manual MCP fallback only installs the tool surface; use `ee install codex` or `ee repair codex` when hook lifecycle capture/injection is needed
|
|
111
112
|
- `Claude Code`
|
|
112
113
|
- host-native marketplace install:
|
|
113
114
|
- add the bundled marketplace from GitHub:
|
|
@@ -253,6 +254,53 @@ When you inspect a specific node, ExperienceEngine now also shows a lightweight
|
|
|
253
254
|
- the short drivers behind that judgment
|
|
254
255
|
- a compact applicability profile covering best fit, scope validity, confidence, risk, and when to avoid reuse
|
|
255
256
|
|
|
257
|
+
### Operator Review Workflow
|
|
258
|
+
|
|
259
|
+
Use the operator review workflow when you want one read-only checkpoint across the current repo before deciding what to inspect next.
|
|
260
|
+
|
|
261
|
+
The fallback CLI entry point is:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
ee inspect review
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
For a specific workspace and a smaller checklist:
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
ee inspect review --cwd /path/to/repo --limit 3
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
The review report summarizes:
|
|
274
|
+
|
|
275
|
+
- repo policy health and circuit state
|
|
276
|
+
- hygiene finding counts
|
|
277
|
+
- export draft counts
|
|
278
|
+
- recommended review order
|
|
279
|
+
- prioritized review items
|
|
280
|
+
- review-only next actions
|
|
281
|
+
- drill-down commands for detailed read-only reports
|
|
282
|
+
|
|
283
|
+
The drill-down commands are manual inspection steps:
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
ee inspect repo
|
|
287
|
+
ee inspect hygiene
|
|
288
|
+
ee inspect export-drafts
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
In MCP-capable hosts, ask the host agent to inspect the ExperienceEngine operator review or read `experienceengine://review`. The structured payload uses the same source names as the CLI: `repo_policy`, `hygiene`, and `export_drafts`.
|
|
292
|
+
|
|
293
|
+
This workflow is intentionally read-only. It does not:
|
|
294
|
+
|
|
295
|
+
- restore repo policy
|
|
296
|
+
- cool or retire nodes
|
|
297
|
+
- write attribution or review events
|
|
298
|
+
- create backups or snapshots
|
|
299
|
+
- write instruction files, skills, or docs
|
|
300
|
+
- export guidance automatically
|
|
301
|
+
- open a console or mutation dashboard
|
|
302
|
+
- coordinate team workflows
|
|
303
|
+
|
|
256
304
|
## How MCP Interaction Works
|
|
257
305
|
|
|
258
306
|
For `Codex` and `Claude Code`, ExperienceEngine is designed to keep routine review and management inside the host session first.
|
|
@@ -380,8 +428,8 @@ Default behavior (`embeddingProvider = "api"`):
|
|
|
380
428
|
- if `OPENAI_API_KEY` is present, it prefers OpenAI `text-embedding-3-small`
|
|
381
429
|
- otherwise it tries Gemini `gemini-embedding-001` when `GEMINI_API_KEY` is present
|
|
382
430
|
- otherwise it tries Jina `jina-embeddings-v3` when `JINA_API_KEY` is present
|
|
383
|
-
- if the API provider fails, ExperienceEngine falls back to
|
|
384
|
-
-
|
|
431
|
+
- if no API provider is available, or the selected API provider fails, ExperienceEngine falls back to legacy hash-based retrieval
|
|
432
|
+
- the managed local model is optional and is no longer installed by default
|
|
385
433
|
|
|
386
434
|
Prompt-time behavior:
|
|
387
435
|
|
|
@@ -391,6 +439,7 @@ Prompt-time behavior:
|
|
|
391
439
|
|
|
392
440
|
Offline behavior (`embeddingProvider = "local"`):
|
|
393
441
|
|
|
442
|
+
- install the optional local runtime first: `npm install -g @huggingface/transformers`
|
|
394
443
|
- the default local model is `Xenova/multilingual-e5-small`
|
|
395
444
|
- the default dtype is `q8`, so ExperienceEngine prefers the quantized ONNX artifact
|
|
396
445
|
- the first semantic retrieval may trigger a one-time model download
|
|
@@ -410,7 +459,7 @@ Environment variables:
|
|
|
410
459
|
|
|
411
460
|
Notes:
|
|
412
461
|
|
|
413
|
-
- The default embedding strategy on this branch is now `api` instead of `local`. Users who want fully local retrieval should set `embeddingProvider = "local"` explicitly.
|
|
462
|
+
- The default embedding strategy on this branch is now `api` instead of `local`. Users who want fully local retrieval should install the optional local runtime and set `embeddingProvider = "local"` explicitly.
|
|
414
463
|
- `ee install ...` and `ee doctor ...` warn when `npm` or `pnpm` is pointed at a non-official registry
|
|
415
464
|
- the recommended registry for managed model downloads is `https://registry.npmjs.org`
|
|
416
465
|
- `ee doctor ...` reports a first-value readiness summary so users can see how much captured evidence exists before the first durable node is promoted
|
|
@@ -522,10 +571,13 @@ ee install codex
|
|
|
522
571
|
What happens:
|
|
523
572
|
- ExperienceEngine registers its shared MCP server with Codex
|
|
524
573
|
- new Codex MCP sessions can use ExperienceEngine interaction surfaces
|
|
574
|
+
- ExperienceEngine writes Codex-native project hooks and enables the `hooks` feature
|
|
575
|
+
- first use after managed setup may require manual Codex hook approval; open `/hooks` and approve `UserPromptSubmit`, `PostToolUse`, and `Stop`
|
|
525
576
|
- install ends with a short cold-start note so users know capture is active before the first formal hint appears
|
|
526
577
|
|
|
527
578
|
Local state changes:
|
|
528
|
-
-
|
|
579
|
+
- project hook config in `.codex/hooks.json`
|
|
580
|
+
- Codex MCP config in the active runtime's `~/.codex/config.toml`
|
|
529
581
|
- ExperienceEngine-managed product state under `~/.experienceengine`
|
|
530
582
|
|
|
531
583
|
Useful commands:
|
|
@@ -548,12 +600,20 @@ codex mcp get experienceengine
|
|
|
548
600
|
Success looks like:
|
|
549
601
|
- doctor reports the adapter as installed
|
|
550
602
|
- `codex mcp get experienceengine` shows the server as enabled
|
|
603
|
+
- doctor reports Codex hooks as healthy and the hooks feature as enabled
|
|
551
604
|
- a new `codex exec` session can call ExperienceEngine MCP resources or tools
|
|
552
605
|
|
|
553
606
|
Host note:
|
|
554
607
|
- ExperienceEngine installs a longer `startup_timeout_sec` for Codex automatically
|
|
555
608
|
- this avoids MCP handshake failures on slower local startups
|
|
556
|
-
-
|
|
609
|
+
- ExperienceEngine installs Codex-native hooks for prompt-time guidance, tool-result capture, and stop/finalize writeback
|
|
610
|
+
- `UserPromptSubmit` is synchronous because it decides prompt-time injection
|
|
611
|
+
- `PostToolUse` and `Stop` are queued for background processing by default
|
|
612
|
+
- `PreToolUse` is not registered by default; set `EXPERIENCE_ENGINE_CODEX_PRETOOL_HOOK_ENABLED=1` only for synchronous gating experiments
|
|
613
|
+
- in a Windows Codex App + WSL Codex CLI repo, `.codex/hooks.json` is shared project hook wiring, while MCP config is owned by each runtime's Codex home
|
|
614
|
+
- Codex hook review is not CLI-only: any Codex surface that loads the repo project hooks can ask for approval; approve `UserPromptSubmit`, `PostToolUse`, and `Stop`, plus `PreToolUse` only when explicitly enabled
|
|
615
|
+
- `ee repair codex` refreshes project hooks and removes stale project-scoped ExperienceEngine MCP config
|
|
616
|
+
- if Codex still cannot see ExperienceEngine or doctor reports hook drift, run `ee repair codex`
|
|
557
617
|
- `ee codex exec` is a deterministic wrapper for non-interactive runs
|
|
558
618
|
- the wrapper owns `lookup -> child codex exec -> record -> finalize` outside the child process
|
|
559
619
|
- for wrapped runs, ExperienceEngine removes the nested `experienceengine` MCP server from the child Codex config temporarily so lifecycle evidence is not double-written
|
|
@@ -561,6 +621,27 @@ Host note:
|
|
|
561
621
|
- use `--ee-session-id <id>` when CI or debugging needs a stable ExperienceEngine session id
|
|
562
622
|
- `codex exec review` is not wrapped yet; keep using native Codex review or the MCP/CLI surfaces for review workflows
|
|
563
623
|
|
|
624
|
+
Diagnostics note:
|
|
625
|
+
- `ee doctor codex` separates project hook health, hooks feature enablement, MCP registration, and PATH-visible `ee` CLI fallback
|
|
626
|
+
- Windows Codex App can have healthy project hooks even when a Windows `codex` CLI is not installed
|
|
627
|
+
- WSL Codex CLI must have its own MCP registration in the WSL Codex home; it can still reuse the same repo `.codex/hooks.json`
|
|
628
|
+
- on WSL, `ee doctor codex` also warns when `codex` resolves to a WindowsApps shim instead of the Linux Codex CLI
|
|
629
|
+
|
|
630
|
+
Developer source-repo host validation lives at:
|
|
631
|
+
|
|
632
|
+
- [docs/development/source-repo-host-validation.md](development/source-repo-host-validation.md)
|
|
633
|
+
|
|
634
|
+
Source-repo host validation matrix:
|
|
635
|
+
|
|
636
|
+
| Host path | Source-repo validation status | Notes |
|
|
637
|
+
| --- | --- | --- |
|
|
638
|
+
| Windows Codex App | Validated | Project hooks are healthy, default events are `UserPromptSubmit`, `PostToolUse`, and `Stop`, and task runs write to the shared project scope. |
|
|
639
|
+
| WSL Codex CLI | Validated | WSL `codex exec` with shared `.codex/hooks.json` writes to the same ExperienceEngine home and `scope_id` as Windows Codex App. |
|
|
640
|
+
| Claude Code on Windows | Validated | Real hooks fired `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, and `SessionEnd`; `SessionEnd` drained through the background queue and wrote to the shared project scope. |
|
|
641
|
+
| OpenClaw on WSL | Validated | WSL OpenClaw gateway loaded the current ExperienceEngine plugin and wrote task runs to the shared ExperienceEngine home. ExperienceEngine now resolves the real project root from OpenClaw hook payloads or nearby repo markers before scope resolution. If OpenClaw only reports its global workspace, ExperienceEngine isolates that session instead of reusing unrelated global-workspace experience. OpenClaw validated with `openrouter/tencent/hy3-preview:free`; the bare `tencent/hy3-preview:free` id is marked missing by OpenClaw's model registry. |
|
|
642
|
+
|
|
643
|
+
This matrix is source-repo validation only. Published npm package validation and host-native marketplace validation must be called out separately during release preparation.
|
|
644
|
+
|
|
564
645
|
Developer validation docs:
|
|
565
646
|
|
|
566
647
|
- [docs/development/codex-runtime-validation.md](development/codex-runtime-validation.md)
|
|
@@ -591,6 +672,10 @@ Useful fallback commands:
|
|
|
591
672
|
```bash
|
|
592
673
|
ee inspect --last
|
|
593
674
|
ee inspect recent injected 10
|
|
675
|
+
ee inspect review
|
|
676
|
+
ee inspect repo
|
|
677
|
+
ee inspect hygiene
|
|
678
|
+
ee inspect export-drafts
|
|
594
679
|
ee inspect backups
|
|
595
680
|
ee inspect active
|
|
596
681
|
ee inspect node <id>
|
|
@@ -864,7 +949,7 @@ Claude Code:
|
|
|
864
949
|
Codex:
|
|
865
950
|
- run `ee doctor codex`
|
|
866
951
|
- verify `codex mcp get experienceengine`
|
|
867
|
-
- if
|
|
952
|
+
- if doctor reports disabled hooks, stale Claude hook entries, WSL path drift, or missing MCP wiring, run `ee repair codex`
|
|
868
953
|
- then start a new Codex session so the MCP connection is recreated
|
|
869
954
|
|
|
870
955
|
### What ExperienceEngine does not back up
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alan512/experienceengine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Experience governance for coding agents: learn from real task outcomes, inject reusable hints, and retire low-value guidance.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/Alan-512/ExperienceEngine.git"
|
|
9
|
+
"url": "git+https://github.com/Alan-512/ExperienceEngine.git"
|
|
10
10
|
},
|
|
11
11
|
"openclaw": {
|
|
12
12
|
"extensions": [
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"hooks",
|
|
35
35
|
"plugins/claude-code-experienceengine",
|
|
36
36
|
"README.md",
|
|
37
|
+
"docs/assets/readme",
|
|
37
38
|
"docs/user-guide.md",
|
|
38
39
|
"docs/releases",
|
|
39
40
|
"openclaw.plugin.json",
|
|
@@ -55,7 +56,6 @@
|
|
|
55
56
|
"check": "pnpm typecheck && pnpm test && pnpm build"
|
|
56
57
|
},
|
|
57
58
|
"dependencies": {
|
|
58
|
-
"@huggingface/transformers": "^3.8.1",
|
|
59
59
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
60
60
|
"zod": "^3.25.76"
|
|
61
61
|
},
|
|
@@ -2,16 +2,10 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"experienceengine": {
|
|
4
4
|
"type": "stdio",
|
|
5
|
-
"command": "
|
|
5
|
+
"command": "bash",
|
|
6
6
|
"args": [
|
|
7
|
-
"${CLAUDE_PLUGIN_ROOT}/
|
|
8
|
-
|
|
9
|
-
],
|
|
10
|
-
"env": {
|
|
11
|
-
"NODE_PATH": "${CLAUDE_PLUGIN_ROOT}/node_modules",
|
|
12
|
-
"EXPERIENCE_ENGINE_HOME": "${CLAUDE_PLUGIN_ROOT}/experienceengine-home",
|
|
13
|
-
"EXPERIENCE_ENGINE_CLAUDE_HOOK_SOURCE": "marketplace"
|
|
14
|
-
}
|
|
7
|
+
"${CLAUDE_PLUGIN_ROOT}/scripts/mcp-server.sh"
|
|
8
|
+
]
|
|
15
9
|
}
|
|
16
10
|
}
|
|
17
11
|
}
|
|
@@ -11,7 +11,7 @@ PACKAGE_ENTRY="${PACKAGE_DIR}/dist/cli/index.js"
|
|
|
11
11
|
STAMP_PATH="${PLUGIN_DATA}/.experienceengine-plugin-version"
|
|
12
12
|
EXPERIENCE_ENGINE_HOME_PATH="${EXPERIENCE_ENGINE_HOME:-${PLUGIN_DATA}/experienceengine-home}"
|
|
13
13
|
STATE_PATH="${EXPERIENCE_ENGINE_HOME_PATH}/claude-marketplace-state.json"
|
|
14
|
-
PACKAGE_VERSION="0.
|
|
14
|
+
PACKAGE_VERSION="0.3.0"
|
|
15
15
|
PACKAGE_SPEC="${EXPERIENCE_ENGINE_PLUGIN_PACKAGE_SPEC:-@alan512/experienceengine@${PACKAGE_VERSION}}"
|
|
16
16
|
|
|
17
17
|
mkdir -p "${PLUGIN_DATA}"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
PLUGIN_DATA="${CLAUDE_PLUGIN_DATA:-${CLAUDE_PLUGIN_ROOT:-}}"
|
|
5
|
+
if [[ -z "${PLUGIN_DATA}" ]]; then
|
|
6
|
+
echo "CLAUDE_PLUGIN_DATA or CLAUDE_PLUGIN_ROOT is required" >&2
|
|
7
|
+
exit 1
|
|
8
|
+
fi
|
|
9
|
+
|
|
10
|
+
INSTALL_SCRIPT="${PLUGIN_DATA}/scripts/install-deps.sh"
|
|
11
|
+
if [[ -x "${INSTALL_SCRIPT}" ]]; then
|
|
12
|
+
"${INSTALL_SCRIPT}" >&2
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
export NODE_PATH="${PLUGIN_DATA}/node_modules${NODE_PATH:+:${NODE_PATH}}"
|
|
16
|
+
export EXPERIENCE_ENGINE_HOME="${EXPERIENCE_ENGINE_HOME:-${PLUGIN_DATA}/experienceengine-home}"
|
|
17
|
+
STATE_PATH="${EXPERIENCE_ENGINE_HOME}/claude-marketplace-state.json"
|
|
18
|
+
|
|
19
|
+
node - "${STATE_PATH}" <<'NODE'
|
|
20
|
+
const fs = require("node:fs");
|
|
21
|
+
const path = require("node:path");
|
|
22
|
+
|
|
23
|
+
const [statePath] = process.argv.slice(2);
|
|
24
|
+
let current = {};
|
|
25
|
+
try {
|
|
26
|
+
current = JSON.parse(fs.readFileSync(statePath, "utf8"));
|
|
27
|
+
} catch {}
|
|
28
|
+
|
|
29
|
+
const next = {
|
|
30
|
+
adapter: "claude-code",
|
|
31
|
+
install_mode: "marketplace",
|
|
32
|
+
hook_source: "marketplace",
|
|
33
|
+
package_version: current.package_version,
|
|
34
|
+
written_at: current.written_at ?? new Date().toISOString(),
|
|
35
|
+
last_hook_seen_at: current.last_hook_seen_at,
|
|
36
|
+
last_mcp_seen_at: new Date().toISOString()
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
fs.mkdirSync(path.dirname(statePath), { recursive: true });
|
|
40
|
+
fs.writeFileSync(statePath, `${JSON.stringify(next, null, 2)}\n`);
|
|
41
|
+
NODE
|
|
42
|
+
|
|
43
|
+
exec node --no-warnings "${PLUGIN_DATA}/node_modules/@alan512/experienceengine/dist/cli/index.js" mcp-server "$@"
|