@rulemetric/cli 0.14.1 → 0.14.2
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/base-command.js +1 -1
- package/dist/{chunk-POEMCITL.js → chunk-3NWJ7CZ2.js} +1 -1
- package/dist/{chunk-RMRVUI7B.js → chunk-5PMTNNA6.js} +1 -1
- package/dist/{chunk-EMLLGASZ.js → chunk-5TM7AOH2.js} +1 -1
- package/dist/{chunk-QAMHZY2P.js → chunk-5VNEHPGC.js} +1 -1
- package/dist/{chunk-HNYHZO2J.js → chunk-6AAAHV2B.js} +1 -1
- package/dist/{chunk-3FNTV2TW.js → chunk-6T6YFPBW.js} +1 -1
- package/dist/{chunk-XGMOVQ5G.js → chunk-6TGFU6RU.js} +1 -1
- package/dist/chunk-77FH6UZP.js +111 -0
- package/dist/{chunk-N4YPDZJF.js → chunk-7BCZDVIU.js} +1 -1
- package/dist/{chunk-WWQWHC4K.js → chunk-BDQTVYYF.js} +1 -1
- package/dist/chunk-CQD2R3BA.js +3 -0
- package/dist/{chunk-I6ZQOMZS.js → chunk-CVPAKEEZ.js} +1 -1
- package/dist/{chunk-QRIJ3AHP.js → chunk-CYCH2EQC.js} +1 -1
- package/dist/{chunk-AGEZAKCC.js → chunk-CZBO3A6B.js} +1 -1
- package/dist/{chunk-JTYVBR5H.js → chunk-DANMUHNW.js} +1 -1
- package/dist/{chunk-4FJYVYCU.js → chunk-DX6IPDED.js} +1 -1
- package/dist/{chunk-OP4U3XBZ.js → chunk-DXNUCWUX.js} +1 -1
- package/dist/{chunk-BMT5WMEV.js → chunk-EBWV4SUS.js} +1 -1
- package/dist/{chunk-NYNHX7OX.js → chunk-F5PJN2EY.js} +1 -1
- package/dist/{chunk-MMLRWCBW.js → chunk-FS3TAQAE.js} +1 -1
- package/dist/{chunk-RXZLBSDO.js → chunk-FXQS7AEZ.js} +1 -1
- package/dist/{chunk-LJRJ2RAC.js → chunk-FZMO7XSN.js} +3 -3
- package/dist/{chunk-XMTKP74H.js → chunk-GDLQNY4V.js} +1 -1
- package/dist/{chunk-76UKAFNM.js → chunk-GIXHG5FK.js} +1 -1
- package/dist/{chunk-XJ25HFIT.js → chunk-GLBWNB2N.js} +1 -1
- package/dist/{chunk-IO46ICZY.js → chunk-H2FMAJUJ.js} +1 -1
- package/dist/{chunk-BAITMD76.js → chunk-H33XYL7O.js} +1 -1
- package/dist/{chunk-6ANODRDT.js → chunk-H4QPAEEA.js} +1 -1
- package/dist/{chunk-V55ROUNP.js → chunk-HM63AB2C.js} +1 -1
- package/dist/{chunk-B5X6HCBK.js → chunk-ISYU5BMU.js} +1 -1
- package/dist/{chunk-AIYFT4P6.js → chunk-J6RQ5AH2.js} +1 -1
- package/dist/{chunk-YK2IEHLB.js → chunk-KE5K3F7J.js} +1 -1
- package/dist/{chunk-VIFOLTZT.js → chunk-KEVDLLHT.js} +1 -1
- package/dist/{chunk-OVS7ZDJ4.js → chunk-L562Y4RN.js} +1 -1
- package/dist/chunk-MOJY6S5J.js +1 -0
- package/dist/{chunk-IQEZ3T5A.js → chunk-MYGVN6X4.js} +1 -1
- package/dist/{chunk-44TYRMIS.js → chunk-NWV66NMA.js} +1 -1
- package/dist/{chunk-43VKTVM3.js → chunk-O4K4M5G6.js} +1 -1
- package/dist/{chunk-5Z3H5JHK.js → chunk-PJ4RIUI3.js} +1 -1
- package/dist/{chunk-XMA6SWOT.js → chunk-PXYK4MBX.js} +1 -1
- package/dist/{chunk-EUHRTEVJ.js → chunk-QENSCK77.js} +1 -1
- package/dist/{chunk-5BT375C7.js → chunk-QNSIBPWG.js} +1 -1
- package/dist/{chunk-3IMRLHJJ.js → chunk-QPAOX7P2.js} +1 -1
- package/dist/{chunk-RG3R4EAB.js → chunk-QPVUGTDP.js} +1 -1
- package/dist/{chunk-2UK4DZFW.js → chunk-RE7RAZQ5.js} +1 -1
- package/dist/{chunk-MXHAXY66.js → chunk-RR7V5CK5.js} +1 -1
- package/dist/{chunk-SCQK52SL.js → chunk-RSVNQ2XI.js} +1 -1
- package/dist/{chunk-35YVHBLL.js → chunk-RYCVPQYK.js} +1 -1
- package/dist/{chunk-VU24IH5S.js → chunk-SFZPFNC6.js} +1 -1
- package/dist/{chunk-H6FVXVGG.js → chunk-T47SFA5X.js} +1 -1
- package/dist/{chunk-BFQVAU6N.js → chunk-UVCVJKEN.js} +1 -1
- package/dist/{chunk-GKVHFXUQ.js → chunk-VCUW2NAP.js} +1 -1
- package/dist/{chunk-CT6GJQIR.js → chunk-VXNICAVG.js} +1 -1
- package/dist/{chunk-FYZ6HHCV.js → chunk-WIKCYUZC.js} +1 -1
- package/dist/{chunk-FKTT7A4H.js → chunk-WL5ZWQAS.js} +1 -1
- package/dist/{chunk-MU7KKU3O.js → chunk-WUCACPGC.js} +1 -1
- package/dist/{chunk-42A4PUW7.js → chunk-X6CF5KTW.js} +4 -4
- package/dist/{chunk-VXL5H3VZ.js → chunk-XIOYV5A7.js} +1 -1
- package/dist/{chunk-W23OYQXI.js → chunk-XXPWPKTD.js} +1 -1
- package/dist/chunk-XZW5ZHFC.js +15 -0
- package/dist/{chunk-RAQLVO2X.js → chunk-ZTQUGAZG.js} +1 -1
- package/dist/commands/antigravity/backfill.js +1 -1
- package/dist/commands/auth/create-key.js +1 -1
- package/dist/commands/auth/login.js +1 -1
- package/dist/commands/auth/logout.js +1 -1
- package/dist/commands/auth/revoke-key.js +1 -1
- package/dist/commands/auth/signup.js +1 -1
- package/dist/commands/auth/status.js +1 -1
- package/dist/commands/capture/scope.js +1 -1
- package/dist/commands/catalog/index.js +1 -1
- package/dist/commands/catalog/recommend.js +1 -1
- package/dist/commands/crons/list.js +1 -1
- package/dist/commands/crons/run.js +1 -1
- package/dist/commands/dashboard.js +1 -1
- package/dist/commands/diagnostics.js +1 -1
- package/dist/commands/eval-targets/create.js +1 -1
- package/dist/commands/eval-targets/list.js +1 -1
- package/dist/commands/evals/agent.js +1 -1
- package/dist/commands/evals/auto-run.js +1 -1
- package/dist/commands/evals/benchmark.js +1 -1
- package/dist/commands/evals/compare.js +1 -1
- package/dist/commands/evals/create.js +1 -1
- package/dist/commands/evals/optimize-description.js +1 -1
- package/dist/commands/evals/optimize.js +1 -1
- package/dist/commands/evals/refine-cases.js +1 -1
- package/dist/commands/evals/run.js +1 -1
- package/dist/commands/evals/validate-judge.js +1 -1
- package/dist/commands/experiments/list.js +1 -1
- package/dist/commands/gateway/ensure.js +1 -1
- package/dist/commands/hooks/install.js +1 -1
- package/dist/commands/hooks/run.js +1 -1
- package/dist/commands/hooks/uninstall.js +1 -1
- package/dist/commands/instructions/create.js +1 -1
- package/dist/commands/instructions/dedupe.js +1 -1
- package/dist/commands/instructions/delete.js +1 -1
- package/dist/commands/instructions/fork.js +1 -1
- package/dist/commands/instructions/get.js +1 -1
- package/dist/commands/instructions/list.js +1 -1
- package/dist/commands/instructions/promote.js +1 -1
- package/dist/commands/instructions/pull.js +1 -1
- package/dist/commands/instructions/restore.js +1 -1
- package/dist/commands/instructions/retract.js +1 -1
- package/dist/commands/instructions/upstream.js +1 -1
- package/dist/commands/instructions/versions.js +1 -1
- package/dist/commands/launcher.js +1 -1
- package/dist/commands/local/down.js +1 -1
- package/dist/commands/local/up.js +1 -1
- package/dist/commands/org/current.js +1 -1
- package/dist/commands/org/list.js +1 -1
- package/dist/commands/org/switch.js +1 -1
- package/dist/commands/packs/add-instruction.js +1 -1
- package/dist/commands/packs/apply.js +1 -1
- package/dist/commands/packs/create.js +1 -1
- package/dist/commands/packs/fork.js +1 -1
- package/dist/commands/packs/get.js +1 -1
- package/dist/commands/packs/list.js +1 -1
- package/dist/commands/packs/remove-instruction.js +1 -1
- package/dist/commands/proxy/env.js +1 -1
- package/dist/commands/proxy/logs.js +1 -1
- package/dist/commands/proxy/restart.js +1 -1
- package/dist/commands/proxy/setup.js +1 -1
- package/dist/commands/proxy/start.js +1 -1
- package/dist/commands/proxy/status.js +1 -1
- package/dist/commands/proxy/stop.js +1 -1
- package/dist/commands/research/backfill.js +1 -1
- package/dist/commands/research/tail-transcript.js +1 -1
- package/dist/commands/service/install.js +1 -1
- package/dist/commands/service/status.js +1 -1
- package/dist/commands/service/uninstall.js +1 -1
- package/dist/commands/sessions/analyze.js +1 -1
- package/dist/commands/sessions/delete.js +1 -1
- package/dist/commands/sessions/end.js +1 -1
- package/dist/commands/sessions/import.js +1 -1
- package/dist/commands/sessions/list.js +1 -1
- package/dist/commands/sessions/start.js +1 -1
- package/dist/commands/setup.js +1 -1
- package/dist/commands/skills/export-approved.js +1 -1
- package/dist/commands/skills/install.js +1 -1
- package/dist/commands/skills/list.js +1 -1
- package/dist/commands/skills/publish.js +1 -1
- package/dist/commands/skills/search.js +1 -1
- package/dist/commands/skills/update.js +1 -1
- package/dist/commands/suggestions/accept.js +1 -1
- package/dist/commands/suggestions/auto.js +1 -1
- package/dist/commands/suggestions/dismiss.js +1 -1
- package/dist/commands/suggestions/list.js +1 -1
- package/dist/commands/suggestions/refresh.js +1 -1
- package/dist/commands/suggestions/undo.js +1 -1
- package/dist/dashboard/Dashboard.js +1 -1
- package/dist/dashboard/data.js +1 -1
- package/dist/dashboard/launcher/LauncherOverlay.js +1 -1
- package/dist/dashboard/launcher/api.js +1 -1
- package/dist/dashboard/launcher/useLaunchJobs.js +1 -1
- package/dist/dashboard/panels/measurement.js +1 -1
- package/dist/lib/active-org-refresh.js +1 -1
- package/dist/lib/agent-loop.js +1 -1
- package/dist/lib/antigravity-transcript.js +1 -1
- package/dist/lib/api-client.js +1 -1
- package/dist/lib/ensure-api-key.js +1 -1
- package/dist/lib/ensure-fresh-token.js +1 -1
- package/dist/lib/eval-benchmark.js +1 -1
- package/dist/lib/eval-candidate-run.js +1 -1
- package/dist/lib/eval-case-generator.js +1 -1
- package/dist/lib/eval-conversation-handler.js +1 -1
- package/dist/lib/eval-resume.js +1 -1
- package/dist/lib/eval-run-batch.js +1 -1
- package/dist/lib/evolution-enrolment.js +1 -1
- package/dist/lib/insights/generation/installed-asks.js +1 -1
- package/dist/lib/insights/generation/project-evidence.js +1 -0
- package/dist/lib/insights/generation/prompts.js +1 -1
- package/dist/lib/insights/nomination/nominate.js +1 -1
- package/dist/lib/instruction-proposer.js +1 -1
- package/dist/lib/instructions/acceptance/accept-events.js +1 -1
- package/dist/lib/instructions/acceptance/accept-hook.js +1 -1
- package/dist/lib/instructions/acceptance/hook-install.js +1 -1
- package/dist/lib/instructions/acceptance/reverse-applications.js +1 -1
- package/dist/lib/instructions/acceptance/suggestion-accept.js +1 -1
- package/dist/lib/jobs/handlers/cron-auto-accept-suggestions.js +1 -1
- package/dist/lib/jobs/handlers/cron-eval-autorun.js +1 -1
- package/dist/lib/jobs/handlers/cron-instruction-evolution.js +1 -1
- package/dist/lib/jobs/handlers/cron-instruction-training.js +1 -1
- package/dist/lib/jobs/handlers/cron-reconcile-attribution.js +1 -1
- package/dist/lib/jobs/handlers/cron-refine-cases.js +1 -1
- package/dist/lib/jobs/handlers/cron-refresh-pricing.js +1 -1
- package/dist/lib/jobs/handlers/cron-retire-unused-skills.js +1 -1
- package/dist/lib/jobs/handlers/cron-suggest-instructions.js +1 -1
- package/dist/lib/jobs/handlers/distill-memories.js +1 -1
- package/dist/lib/jobs/handlers/harbor-ab-verdict.js +1 -1
- package/dist/lib/jobs/handlers/harbor-ab.js +1 -1
- package/dist/lib/jobs/handlers/process-changelog.js +1 -1
- package/dist/lib/jobs/handlers/process-conversation.js +1 -1
- package/dist/lib/jobs/handlers/process-eval.js +1 -1
- package/dist/lib/jobs/handlers/process-insights.js +1 -1
- package/dist/lib/jobs/handlers/process-judge-review.js +1 -1
- package/dist/lib/jobs/handlers/process-launch.js +1 -1
- package/dist/lib/jobs/handlers/process-memory-ab.js +1 -1
- package/dist/lib/jobs/handlers/process-run-cleanup.js +1 -1
- package/dist/lib/jobs/handlers/process-session-goal.js +1 -1
- package/dist/lib/jobs/shed-retry.js +1 -1
- package/dist/lib/judge-review-runner.js +1 -1
- package/dist/lib/llm-client.js +1 -1
- package/dist/lib/manual-tasks.js +1 -1
- package/dist/lib/refine-cases.js +1 -1
- package/dist/lib/research-client.js +1 -1
- package/dist/lib/retraction.js +1 -1
- package/dist/lib/setup-steps.js +1 -1
- package/dist/lib/telemetry.js +1 -1
- package/dist/lib/terminal-target-heartbeat.js +1 -1
- package/dist/lib/work-report.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
- package/dist/chunk-DHX4U6EC.js +0 -13
- package/dist/chunk-E7GQJML3.js +0 -1
- package/dist/chunk-SJKS3PYX.js +0 -109
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulemetric/cli",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
"postgres": "^3.4.0",
|
|
81
81
|
"react": "^19.0.0",
|
|
82
82
|
"zod": "^3.24.0",
|
|
83
|
-
"@rulemetric/hooks": "0.14.
|
|
84
|
-
"@rulemetric/proxy": "0.14.
|
|
85
|
-
"@rulemetric/skills-registry": "0.14.
|
|
83
|
+
"@rulemetric/hooks": "0.14.2",
|
|
84
|
+
"@rulemetric/proxy": "0.14.2",
|
|
85
|
+
"@rulemetric/skills-registry": "0.14.2"
|
|
86
86
|
},
|
|
87
87
|
"//deps": "Worker (`evals agent`) runtime deps: the @opentelemetry/* set, @sentry/node, and postgres are STATIC top-level imports loaded at worker startup (via bundled @rulemetric/{telemetry,db}) — they MUST be runtime deps or a clean `npm i -g` crashes with ModuleLoadError. `better-sqlite3` is optionalDependencies (below): it's a native module, lazy `require()`'d inside a try/catch (packages/session providers cursor/opencode) so a missing binary degrades gracefully — making it a hard dep would break `npm i -g` on platforms without prebuilt binaries. `resend` stays a devDep: lazy `await import('resend')` guarded by RESEND_API_KEY, which end-user workers never set (provider falls back to noop). Classification verified via import-graph scan of dist/commands/evals/agent.js + per-importer static/lazy check.",
|
|
88
88
|
"optionalDependencies": {
|
package/dist/chunk-DHX4U6EC.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{a as A}from"./chunk-5RBLIVBF.js";import{a as I,d as M}from"./chunk-3UKZJAFS.js";import{c as W}from"./chunk-XJ25HFIT.js";import{a as T,b as k,c as U,d as O}from"./chunk-SJKS3PYX.js";import{a as B}from"./chunk-YK2IEHLB.js";import{b as x,e as H,g as R}from"./chunk-N4YPDZJF.js";import{e as _,f as L,h as d}from"./chunk-76UKAFNM.js";import{a as F,b as J}from"./chunk-42A4PUW7.js";import{a as f}from"./chunk-ZLLER3HP.js";var V=f((l,{limit:i,sort:n,eventTypes:s})=>_(`/api/sessions/${l}/events?limit=${i}&sort=${n}&eventType=${encodeURIComponent(s.join(","))}&hasContent=true`),"fetchTranscriptTurns");async function is(l,i){let{mirrorId:n,projectPath:s,projectId:r,config:g}=l,t=f(e=>i.logger.info(e),"log");if(g?.sessionId)return Y({mirrorId:n,sessionId:g.sessionId},t);t(`Processing insights job ${n}...`),await d(`/api/insights-jobs/${n}/progress`,{status:"running",progress:{step:"reading_data"}});try{let{repaired:e}=await L("/api/sessions/repair-analyzed-at",{});e>0&&t(` Repaired analyzed_at on ${e} orphan session(s).`)}catch(e){t(` Warning: analyzed_at repair failed: ${e instanceof Error?e.message:String(e)}`)}let p=20,w=200,D=15*6e4,N=3,E=Date.now()+D,C=H()==="none"?"no-llm-backend":null;if(C&&i.logger.warn?.("[process-insights] no LLM backend (no claude/codex CLI and no ANTHROPIC_API_KEY) \u2014 facet grading SKIPPED for this run; the summary below is computed from already-graded sessions only"),!C){let e=0,o=0;try{for(;e<w&&Date.now()<E;){let c=await _(`/api/sessions?needsFacets=true&graderVersion=${2}&limit=${p}&offset=${o}`);if(c.length===0)break;t(` Generating facets for ${c.length} un-analyzed sessions (drained ${e} so far)...`);for(let $=0;$<c.length&&!(e>=w||Date.now()>=E);$+=N){let S=c.slice($,$+N);await Promise.all(S.map(async m=>{if(!(e>=w||Date.now()>=E))try{let u=await M(K=>V(m.id,K));if(u.turnCount<2){e++,o++;return}let j=await R(O,u.text,4096);j&&typeof j.outcome=="string"?(await d(`/api/sessions/${m.id}/enrich`,{analysis:{source:"generated_facets",...j,graderVersion:2},...m.eventCount!=null?{analyzedEventCount:m.eventCount}:{},analyzedTurnCount:u.turnCount}),t(` Generated facets for session ${m.id} (${m.tool}, ${u.turnCount} turns)`)):o++,e++}catch(u){t(` Failed to generate facets for session ${m.id}: ${u instanceof Error?u.message:String(u)}`),e++,o++}}))}if(c.length<p)break}}catch(c){t(` Warning: facet generation failed after ${e} sessions: ${c instanceof Error?c.message:String(c)}`)}if(e>0){let c=Date.now()>=E?`time budget (${Math.round(D/6e4)}m)`:e>=w?`hard cap (${w})`:"queue empty";t(` Facet drain stopped on ${c} after ${e} session(s); the rest resume next run.`)}}let b=await Q(s,r);if(!b)throw new A("No session data found \u2014 ensure sessions are captured and enriched.");t(` Found ${b.stats.sessions} sessions, generating recommendations...`);let P=await Z(s,t);P&&t(` Generator memory: ${P.split(`
|
|
2
|
-
`).length} lines of prior-advice context`);let a={},y=[],h=k.length+1;for(let e=0;e<k.length;e++){let o=k[e];t(` [${e+1}/${h}] Generating ${o.name}...`);try{await d(`/api/insights-jobs/${n}/progress`,{status:"running",progress:{step:o.name,current:e+1,total:h,partial:{...a}}})}catch(u){t(` Warning: progress update failed for ${o.name}: ${u instanceof Error?u.message:String(u)}`)}t(` Running LLM prompt for ${o.name}...`);let c=o.usesGeneratorMemory&&P?`${b.summary}
|
|
3
|
-
${P}`:b.summary,$=Date.now(),S=await R(o.prompt,c,o.maxTokens,{timeoutMs:o.timeoutMs}),m=Date.now()-$;S?(a[o.name]=S,t(` Got result for ${o.name} (${Math.round(m/1e3)}s)`)):(y.push(o.name),t(` No result for ${o.name} after ${Math.round(m/1e3)}s (budget ${Math.round((o.timeoutMs??12e4)/1e3)}s) \u2014 section DROPPED`))}t(` [${h}/${h}] Generating at_a_glance...`),await d(`/api/insights-jobs/${n}/progress`,{status:"running",progress:{step:"at_a_glance",current:h,total:h,partial:{...a}}});let q=[b.summary,a.what_works?`
|
|
4
|
-
## What Works
|
|
5
|
-
${JSON.stringify(a.what_works)}`:"",a.friction_analysis?`
|
|
6
|
-
## Friction
|
|
7
|
-
${JSON.stringify(a.friction_analysis)}`:"",a.suggestions?`
|
|
8
|
-
## Suggestions
|
|
9
|
-
${JSON.stringify(a.suggestions)}`:"",a.on_the_horizon?`
|
|
10
|
-
## On the Horizon
|
|
11
|
-
${JSON.stringify(a.on_the_horizon)}`:""].join(`
|
|
12
|
-
`),G=await R(U,q,8192);G&&(a.at_a_glance=G),t(" Uploading results..."),t(` Done! Recommendations generated for job ${n}`),J(a),F(a);let z={recommendations:a,...y.length>0?{sectionsFailed:y}:{},...C?{facetsSkipped:C}:{}};return y.length>0&&t(` \u26A0 ${y.length} section(s) produced nothing: ${y.join(", ")}`),await d(`/api/insights-jobs/${n}/state`,{result:z}).catch(e=>{t(`result persist failed: ${e instanceof Error?e.message:String(e)}`)}),await B(a,s,t),z}f(is,"processInsights");async function Y(l,i){let{mirrorId:n,sessionId:s}=l;i(`Analyzing session ${s} via tool CLI...`),await d(`/api/insights-jobs/${n}/progress`,{status:"running",progress:{step:"fetching_session"}});let r=await _(`/api/sessions/${s}`);if(r.analysis&&r.analysis.source==="session_analysis")return i(` Session ${s} already analyzed \u2014 skipping (idempotency guard)`),{sessionId:s,skipped:!0,reason:"already_analyzed"};let g=await M(p=>V(s,p));if(g.turnCount<2)throw new A("Session has too few conversation turns to analyze");await d(`/api/insights-jobs/${n}/progress`,{status:"running",progress:{step:"running_analysis",tool:r.tool}});let t=await x(r.tool,O,g.text);if(!t.ok)throw new Error(`Analysis failed \u2014 ${t.reason}`);return await d(`/api/sessions/${s}/enrich`,{analysis:{source:"session_analysis",tool:r.tool,...t.value,graderVersion:2},...r.eventCount!=null?{analyzedEventCount:r.eventCount}:{},analyzedTurnCount:g.turnCount}),i(` Session ${s} analyzed via ${r.tool}`),{sessionId:s,tool:r.tool,facets:t.value}}f(Y,"processSessionAnalysisInline");async function Z(l,i,n=_,s=W){let{asks:r,omitted:g}=s(l);try{let t=await n(`/api/insights/recommendations/history?projectPath=${encodeURIComponent(l??"")}`);return!t||!Array.isArray(t.dismissed)||!Array.isArray(t.repeated)?T({dismissed:[],repeated:[],installed:r,installedOmitted:g}):T({...t,installed:r,installedOmitted:g})}catch(t){return i(` Warning: generator memory unavailable (${t instanceof Error?t.message:String(t)}) \u2014 generating without it`),T({dismissed:[],repeated:[],installed:r,installedOmitted:g})}}f(Z,"fetchGeneratorMemory");async function Q(l,i){try{let n=new URLSearchParams;i?n.set("projectId",i):l&&n.set("projectPath",l);let s=await _(`/api/insights/compute?${n}`);if(!s||s.total_sessions===0)return null;let r=Object.entries(s.tool_counts??{}).sort((t,p)=>p[1]-t[1]).slice(0,10).map(([t,p])=>`${t}: ${p}`).join(", ");return{summary:[`Sessions: ${s.total_sessions}, Messages: ${s.total_messages}, Session-hours: ${Math.round(s.total_duration_hours)} (sum of per-session spans across ${s.sessions_with_meta} measured sessions; concurrent sessions counted separately, so this exceeds elapsed time)`,`Top tools: ${r}`,s.goal_categories&&Object.keys(s.goal_categories).length>0?`Goals: ${JSON.stringify(s.goal_categories)}`:"",s.friction&&Object.keys(s.friction).length>0?`Friction: ${JSON.stringify(s.friction)}`:"",s.outcomes&&Object.keys(s.outcomes).length>0?`Outcomes: ${JSON.stringify(s.outcomes)}`:"",s.projects&&Object.keys(s.projects).length>0?`Projects: ${JSON.stringify(s.projects)}`:""].filter(Boolean).join(`
|
|
13
|
-
`),stats:{sessions:s.total_sessions,totalMessages:s.total_messages,totalSessionHours:s.total_duration_hours,measuredSessions:s.sessions_with_meta,toolCounts:s.tool_counts,goalCounts:s.goal_categories,frictionCounts:s.friction}}}catch(n){throw new v(n instanceof Error?n.message:String(n))}}f(Q,"buildDataSummaryFromApi");var v=class extends Error{static{f(this,"InsightsSummaryUnavailableError")}constructor(i){super(`Could not read session summary (retryable): ${i}`),this.name="InsightsSummaryUnavailableError"}};export{is as a,Z as b};
|
package/dist/chunk-E7GQJML3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk-ZLLER3HP.js";var N=25;function $(e,s,r=1.959964){let n=1+r*r/s,c=(e+r*r/(2*s))/n,d=r*Math.sqrt(e*(1-e)/s+r*r/(4*s*s))/n;return[c-d,c+d]}l($,"wilson");function x(e,s,r,n){let[c,d]=$(e,s),[m,i]=$(r,n);return[m-d,i-c]}l(x,"newcombe");var w=l(e=>`${e>=0?"+":""}${e.toFixed(3)}`,"fmt"),f=l(e=>`${e.passes}/${e.n}`,"counts");function _(e){let s=e.provenance;if(s&&!s.comparable)return{decision:"incomparable",reason:`the two arms were not the same harness, so this is not an A/B of the rule: ${s.reasons.join("; ")}. Nothing here is evidence about the instruction \u2014 re-run both arms on one harness before reading anything into the numbers.`,reward:{delta:null,ci:null}};let r=v(e);return s?.pooled_across.length?{...r,reason:`${r.reason} [pooled across ${s.pooled_across.join(", ")} by explicit --allow-cross]`}:r}l(_,"judgeSweep");function v(e){let s=e.minN??25,{baseline:r,with:n}=e;if(r.passes==null||n.passes==null||r.n===0||n.n===0)return{decision:"unmeasured",reason:`no reward recorded for the ${[r.passes==null||r.n===0?"baseline":null,n.passes==null||n.n===0?"with-arm":null].filter(Boolean).join(" and ")} arm \u2014 nothing to decide on; check the job dir for a harness error before reading this as a result`,reward:{delta:null,ci:null}};let c=r.passes/r.n,d=n.passes/n.n,m=d-c,i=x(c,r.n,d,n.n),b=i[0]>0||i[1]<0,u=r.n<s||n.n<s,a=`baseline ${f(r)} \u2192 with ${f(n)}, delta ${w(m)}, 95% CI [${w(i[0])}, ${w(i[1])}]`,t={delta:m,ci:i},h=u?` (n=${r.n}/${n.n}, below the ${s}/arm floor)`:"";if(e.taskClass==="unvalidated")return{decision:u?"undecided":"measured",reason:`calibration on an unvalidated engine/model${h}: ${a}. No regression or graduation claim against another model's catalogue.`,reward:t};if(e.taskClass==="proven"&&e.axis==="reward")return i[0]>0?{decision:"holds",reason:`still discriminates: ${a}`,reward:t}:u?{decision:"undecided",reason:`interval does not exclude zero${h}: ${a}`,reward:t}:{decision:"regression",reason:`a PROVEN discriminator went flat: ${a}. At this depth a flat result is a real change \u2014 the rule, the model, or the harness (the last observed cause was a harness permission change nobody thought was under test). Do not pool this run with earlier ones.`,reward:t};if(e.taskClass==="proven"&&e.axis==="cost"){let o=e.cost;if(!o)return{decision:"unmeasured",reason:`no per-trial cost measured \u2014 a cost task with no cost telemetry is UNKNOWN, not $0 (${a})`,reward:t};let p=`cost ${o.delta_pct==null?"n/a":`${o.delta_pct>=0?"+":""}${o.delta_pct.toFixed(1)}%`}/trial, 95% CI [${o.ci_usd[0].toFixed(4)}, ${o.ci_usd[1].toFixed(4)}] USD`;return o.decision==="cheaper"&&!o.reward.regressed?{decision:"holds",reason:`still cheaper at equal reward: ${p}; reward ${a}`,reward:t}:o.decision==="undecided"&&u?{decision:"undecided",reason:`cost interval spans zero${h}: ${p}`,reward:t}:o.reward.regressed?{decision:"regression",reason:`the with-arm solved LESS (${a}) \u2014 a cheaper arm that solves less is not a saving; ${p}`,reward:t}:{decision:"regression",reason:`a PROVEN cost saving did not reproduce: ${p} (decision ${o.decision}); reward ${a}`,reward:t}}let g=e.cost?.decision==="cheaper"&&!e.cost.reward.regressed;return b||g?{decision:"now_discriminates",reason:`a task measured as a NEGATIVE started discriminating \u2014 ${b?`reward now discriminates: ${a}`:`cost now discriminates at equal reward: ${e.cost.delta_pct?.toFixed(1)}%/trial`}. Re-measure by hand before moving it to the proven set; the 08-31 scorecard was wrong once already.`,reward:t}:u?{decision:"undecided",reason:`flat, but${h}: ${a}`,reward:t}:{decision:"flat",reason:`still flat, as measured: ${a}`,reward:t}}l(v,"judgeMeasured");export{N as a,$ as b,x as c,_ as d};
|
package/dist/chunk-SJKS3PYX.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-ZLLER3HP.js";function r(o){let s=o.dismissed.filter(e=>e.label.trim()!==""),n=o.repeated.filter(e=>e.label.trim()!==""),i=(o.installed??[]).filter(e=>e.trim()!=="");if(s.length===0&&n.length===0&&i.length===0)return"";let t=[];return(s.length>0||n.length>0)&&t.push("","## ADVICE YOU HAVE ALREADY GIVEN THIS USER","This is your own prior output for this project. Use it to say something NEW."),s.length>0&&t.push("","DISMISSED by the user \u2014 do NOT propose these again, and do not propose a","reworded version of them. A paraphrase of a dismissed suggestion is still","the dismissed suggestion:",...s.map(e=>`- [${e.category}] ${e.label}`)),n.length>0&&t.push("","ALREADY GENERATED, sometimes repeatedly. Repeat one ONLY if it is still","the single most important finding in the data \u2014 otherwise prefer a new","observation over restating these:",...n.map(e=>`- [${e.category}] ${e.label} (generated ${e.timesGenerated}x)`)),i.length>0&&(t.push("","## ALREADY INSTALLED IN THIS PROJECT'S INSTRUCTION FILES","The agent reads these on every session in this project. They are the","user's own rules, not your suggestions. Do not propose them, and do not","propose a reworded version of one.","","If an idea is PARTLY here, propose only the part that is not \u2014 a block","mixing new asks with restatements is refused whole and its new asks are","lost with it. One ask per proposal is always safe.","",...i.map(e=>`- ${e}`)),(o.installedOmitted??0)>0&&t.push(`- (+${o.installedOmitted} more not shown \u2014 this project has more rules than fit here,`," so treat the list as a sample rather than the full set.)")),t.join(`
|
|
2
|
-
`)}a(r,"renderGeneratorMemory");var d=[{name:"project_areas",usesGeneratorMemory:!0,prompt:`Analyze this Claude Code usage data and identify project areas.
|
|
3
|
-
RESPOND WITH ONLY A VALID JSON OBJECT:
|
|
4
|
-
{
|
|
5
|
-
"areas": [
|
|
6
|
-
{"name": "Area name", "session_count": N, "description": "2-3 sentences about what was worked on and how Claude Code was used."}
|
|
7
|
-
]
|
|
8
|
-
}
|
|
9
|
-
Include 4-5 areas. Skip internal CC operations.`,maxTokens:8192},{name:"interaction_style",prompt:`Analyze this Claude Code usage data and describe the user's interaction style.
|
|
10
|
-
RESPOND WITH ONLY A VALID JSON OBJECT:
|
|
11
|
-
{
|
|
12
|
-
"narrative": "2-3 paragraphs analyzing HOW the user interacts with Claude Code. Use second person 'you'. Describe patterns: iterate quickly vs detailed upfront specs? Interrupt often or let Claude run? Include specific examples. Use **bold** for key insights.",
|
|
13
|
-
"key_pattern": "One sentence summary of most distinctive interaction style"
|
|
14
|
-
}`,maxTokens:8192},{name:"what_works",usesGeneratorMemory:!0,prompt:`Analyze this Claude Code usage data and identify what's working well for this user. Use second person ("you").
|
|
15
|
-
RESPOND WITH ONLY A VALID JSON OBJECT:
|
|
16
|
-
{
|
|
17
|
-
"intro": "1 sentence of context",
|
|
18
|
-
"impressive_workflows": [
|
|
19
|
-
{"title": "Short title (3-6 words)", "description": "2-3 sentences describing the impressive workflow or approach. Use 'you' not 'the user'."}
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
Include 3 impressive workflows.`,maxTokens:8192},{name:"friction_analysis",usesGeneratorMemory:!0,prompt:`Analyze this Claude Code usage data and identify friction points for this user. Use second person ("you").
|
|
23
|
-
RESPOND WITH ONLY A VALID JSON OBJECT:
|
|
24
|
-
{
|
|
25
|
-
"intro": "1 sentence summarizing friction patterns",
|
|
26
|
-
"categories": [
|
|
27
|
-
{"category": "Concrete category name", "description": "1-2 sentences explaining this category and what could be done differently. Use 'you' not 'the user'.", "examples": ["Specific example with consequence", "Another example"]}
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
Include 3 friction categories with 2 examples each.`,maxTokens:8192},{name:"suggestions",usesGeneratorMemory:!0,timeoutMs:42e4,prompt:`Analyze this cross-harness coding-agent usage data and suggest the smallest changes that address the evidence.
|
|
31
|
-
|
|
32
|
-
Choose the artifact honestly:
|
|
33
|
-
- "instruction": durable behavioral guidance for CLAUDE.md / AGENTS.md.
|
|
34
|
-
- "skill": a reusable, user-invoked markdown workflow.
|
|
35
|
-
- "hook": lifecycle enforcement that runs a command.
|
|
36
|
-
- "script": a repeated command chain worth making deterministic.
|
|
37
|
-
- "mcp": an external tool, database, or API integration.
|
|
38
|
-
- "subagent": a delegated specialist or multi-agent workflow.
|
|
39
|
-
- "routine": periodic work or a scheduled check.
|
|
40
|
-
- "feature": human-facing advice that does not fit the types above.
|
|
41
|
-
|
|
42
|
-
Executable artifacts (hook, script, mcp, subagent, routine) are proposals for human review, never silent installs. Do not translate Codex evidence into Claude-only commands.
|
|
43
|
-
Write each proposal ONCE, as one candidate. Do not repeat a proposal in another form.
|
|
44
|
-
RESPOND WITH ONLY A VALID JSON OBJECT:
|
|
45
|
-
{
|
|
46
|
-
"recommendation_candidates": [
|
|
47
|
-
{
|
|
48
|
-
"title": "Short stable title",
|
|
49
|
-
"artifact": "instruction|skill|hook|script|mcp|subagent|routine|feature",
|
|
50
|
-
"canonicalBody": "Harness-neutral meaning, or the complete proposed artifact",
|
|
51
|
-
"rationale": "Why the evidence supports this change",
|
|
52
|
-
"evidence": [{"sessionId": "optional session id", "finding": "Observed behavior"}],
|
|
53
|
-
"outcomeMetric": "The outcome or recurrence metric this change should improve"
|
|
54
|
-
}
|
|
55
|
-
],
|
|
56
|
-
"usage_patterns": [
|
|
57
|
-
{"title": "Short title", "suggestion": "1-2 sentence summary", "detail": "3-4 sentences explaining how this applies", "copyable_prompt": "A specific prompt to copy and try"}
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
Include 3-6 candidates. Per-harness renderings are derived from canonicalBody \u2014 do not write them.`,maxTokens:8192},{name:"on_the_horizon",usesGeneratorMemory:!0,timeoutMs:24e4,prompt:`Analyze this Claude Code usage data and identify future opportunities.
|
|
61
|
-
RESPOND WITH ONLY A VALID JSON OBJECT:
|
|
62
|
-
{
|
|
63
|
-
"intro": "1 sentence about evolving AI-assisted development",
|
|
64
|
-
"opportunities": [
|
|
65
|
-
{"title": "Short title (4-8 words)", "whats_possible": "2-3 ambitious sentences about autonomous workflows", "how_to_try": "1-2 sentences mentioning relevant tooling", "copyable_prompt": "Detailed prompt to try"}
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
Include 3 opportunities. Think BIG - autonomous workflows, parallel agents, iterating against tests.`,maxTokens:8192},{name:"fun_ending",prompt:`Analyze this Claude Code usage data and find a memorable moment.
|
|
69
|
-
RESPOND WITH ONLY A VALID JSON OBJECT:
|
|
70
|
-
{
|
|
71
|
-
"headline": "A memorable QUALITATIVE moment from the transcripts - not a statistic. Something human, funny, or surprising.",
|
|
72
|
-
"detail": "Brief context about when/where this happened"
|
|
73
|
-
}
|
|
74
|
-
Find something genuinely interesting or amusing from the session summaries.`,maxTokens:8192}],l=`You're writing an "At a Glance" summary for a Claude Code usage insights report.
|
|
75
|
-
Use this 4-part structure:
|
|
76
|
-
1. **What's working** - What is the user's unique style and what impactful things have they done? Don't be fluffy.
|
|
77
|
-
2. **What's hindering you** - Split into (a) Claude's fault and (b) user-side friction. Be honest but constructive.
|
|
78
|
-
3. **Quick wins to try** - Specific Claude Code features they could try, or a compelling workflow technique.
|
|
79
|
-
4. **Ambitious workflows for better models** - As models improve, what workflows should they prepare for?
|
|
80
|
-
Keep each section to 2-3 sentences. Use a coaching tone.
|
|
81
|
-
RESPOND WITH ONLY A VALID JSON OBJECT:
|
|
82
|
-
{
|
|
83
|
-
"whats_working": "(refer to instructions above)",
|
|
84
|
-
"whats_hindering": "(refer to instructions above)",
|
|
85
|
-
"quick_wins": "(refer to instructions above)",
|
|
86
|
-
"ambitious_workflows": "(refer to instructions above)"
|
|
87
|
-
}`,c=`Analyze this coding session and produce a structured analysis.
|
|
88
|
-
The session is from a non-Claude-Code tool, so analyze the conversation and tool usage patterns.
|
|
89
|
-
|
|
90
|
-
RESPOND WITH ONLY A VALID JSON OBJECT:
|
|
91
|
-
{
|
|
92
|
-
"underlying_goal": "1-2 sentence description of what the user was trying to accomplish",
|
|
93
|
-
"goal_categories": {"category": count},
|
|
94
|
-
"outcome": "achieved|mostly_achieved|partially_achieved|not_achieved|abandoned",
|
|
95
|
-
"session_type": "quick_task|iterative_refinement|exploration|debugging|greenfield",
|
|
96
|
-
"friction": {"wrong_approach": 0, "tool_failure": 0, "excessive_changes": 0, "misunderstanding": 0},
|
|
97
|
-
"friction_detail": "Brief description of any friction encountered, or empty string",
|
|
98
|
-
"primary_success": "Brief description of main achievement, or empty string",
|
|
99
|
-
"brief_summary": "2-3 sentence summary of the session"
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
Goal categories to use: debugging, feature_development, refactoring, testing, documentation, investigation, exploration, code_review, deployment, configuration, end_to_end_testing, logging_documentation, ui_testing.
|
|
103
|
-
|
|
104
|
-
Outcome guide:
|
|
105
|
-
- achieved: Task completed successfully
|
|
106
|
-
- mostly_achieved: Main goal done but minor items remain
|
|
107
|
-
- partially_achieved: Some progress but significant work left
|
|
108
|
-
- not_achieved: Attempted but failed
|
|
109
|
-
- abandoned: User gave up or switched tasks`;export{r as a,d as b,l as c,c as d};
|