claude-code-session-manager 0.138.0 → 0.139.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/.claude-plugin/marketplace.json +1 -1
- package/README.md +339 -82
- package/dist/assets/{AppSettings-CgDhqrsU.js → AppSettings-CUfWY9vN.js} +2 -2
- package/dist/assets/History-DDnqaLyw.js +2 -0
- package/dist/assets/HomeClaudeConfig-CGD2Onjv.js +3 -0
- package/dist/assets/{Panel-CeDiyuNn.js → Panel-Csyd9HbD.js} +1 -1
- package/dist/assets/ProjectClaudeConfig-C-jlYpC_.js +26 -0
- package/dist/assets/{Scheduler-CkhTvG7C.js → Scheduler-NLs08fx7.js} +9 -9
- package/dist/assets/{SkillReferenceGraph-CFMK8NJh.js → SkillReferenceGraph-DcscPXAG.js} +1 -1
- package/dist/assets/Skills-BpGRKOcY.js +67 -0
- package/dist/assets/{TiptapBody-D1kTj-tn.js → TiptapBody-DSU3769X.js} +60 -54
- package/dist/assets/ViewTabs-C0PRZx4_.js +1 -0
- package/dist/assets/{VoiceButton-CZeyPM31.js → VoiceButton-D2rMurNg.js} +1 -1
- package/dist/assets/{historyTotals-B00l64Jw.js → historyTotals-TcIQs2sh.js} +1 -1
- package/dist/assets/{index-62tyjEQB.css → index-BCySPdtU.css} +1 -1
- package/dist/assets/{index-CgCxpunJ.js → index-C-d0DCre.js} +523 -515
- package/dist/index.html +2 -2
- package/dist-web/app.css +1 -1
- package/dist-web/app.js +469 -450
- package/package.json +13 -5
- package/plugins/session-manager-dev/.claude-plugin/plugin.json +1 -1
- package/plugins/session-manager-dev/skills/builder/SKILL.md +12 -4
- package/plugins/session-manager-dev/skills/builder/scripts/publish-preflight.cjs +255 -0
- package/plugins/session-manager-dev/skills/develop/SKILL.md +12 -5
- package/scripts/README.md +1 -0
- package/scripts/scheduler-mcp-server.cjs +161 -18
- package/src/main/build-info.json +4 -4
- package/src/main/chatRunner.cjs +2 -2
- package/src/main/exchanges.cjs +70 -5
- package/src/main/historyAggregator.cjs +84 -58
- package/src/main/historyDashboard.cjs +18 -13
- package/src/main/index.cjs +22 -2
- package/src/main/ipcSchemas.cjs +122 -5
- package/src/main/lib/claude/effectiveModelInfo.cjs +2 -2
- package/src/main/lib/claude/modelPricing.cjs +148 -0
- package/src/main/lib/epic/epicAdminRoutes.cjs +101 -0
- package/src/main/lib/epic/epicJobReceipt.cjs +87 -0
- package/src/main/lib/epic/epicOutsideRead.cjs +306 -0
- package/src/main/lib/epic/epicOutsideState.cjs +233 -0
- package/src/main/lib/epic/epicSettle.cjs +1 -1
- package/src/main/lib/epic/epicStateWatcher.cjs +157 -0
- package/src/main/lib/epic/externalRef.cjs +37 -0
- package/src/main/lib/epic/externalRefIndex.cjs +136 -0
- package/src/main/lib/epic/restorableSessions.cjs +151 -17
- package/src/main/lib/epic/transcriptUsage.cjs +197 -0
- package/src/main/lib/externalContract.cjs +111 -0
- package/src/main/lib/feedback-remote/crossProjectFeedback.cjs +121 -4
- package/src/main/lib/feedback-remote/crossProjectReply.cjs +83 -1
- package/src/main/lib/feedback-remote/customerFeedbackAdminRoutes.cjs +16 -6
- package/src/main/lib/feedback-remote/customerFeedbackClient.cjs +50 -8
- package/src/main/lib/feedback-remote/customerFeedbackInbox.cjs +218 -4
- package/src/main/lib/feedback-remote/customerFeedbackIpc.cjs +19 -3
- package/src/main/lib/feedback-remote/feedbackImages.cjs +171 -0
- package/src/main/lib/feedback-remote/localAdminHttp.cjs +11 -10
- package/src/main/lib/feedback-remote/macroAdminRoutes.cjs +120 -2
- package/src/main/lib/feedback-remote/needsYouAdminRoutes.cjs +133 -0
- package/src/main/lib/feedback-remote/needsYouIpc.cjs +50 -0
- package/src/main/lib/feedback-remote/needsYouStore.cjs +281 -0
- package/src/main/lib/historyRollup.cjs +32 -5
- package/src/main/lib/mcpToolCatalog.cjs +111 -14
- package/src/main/lib/persona-macro/agentAdminRoutes.cjs +121 -0
- package/src/main/lib/promptSessionSchema.cjs +4 -0
- package/src/main/lib/remoteTranscriptTail.cjs +32 -1
- package/src/main/lib/scheduler/schedulerPaths.cjs +9 -0
- package/src/main/lib/telemetry/auditEvents.cjs +176 -0
- package/src/main/lib/telemetry/eventsAdminRoutes.cjs +45 -0
- package/src/main/loopEfficiencyHandlers.cjs +1 -1
- package/src/main/scheduler.cjs +29 -0
- package/src/main/templates/PRD_AUTHORING.md +1 -0
- package/src/main/transcripts.cjs +62 -7
- package/src/main/webRemote.cjs +122 -18
- package/src/preload/api.d.ts +71 -8
- package/src/preload/apiSurface.cjs +7 -0
- package/src/preload/apiSurface.json +408 -83
- package/src/preload/index.cjs +15 -3
- package/dist/assets/AgentLibrary-C1d_D7uQ.js +0 -2
- package/dist/assets/Button-Bk23rEnZ.js +0 -1
- package/dist/assets/DocumentEditorPane-BqY5Nq6W.js +0 -1
- package/dist/assets/Extensions-CXem-uwI.js +0 -2
- package/dist/assets/History-BwO3coo4.js +0 -2
- package/dist/assets/Library-BDV69fSe.js +0 -32
- package/dist/assets/ListDetail-CD-Fm6mh.js +0 -1
- package/dist/assets/ProjectClaudeConfig-NjdKdwe8.js +0 -25
- package/dist/assets/ProvenanceBadge-Bu8NmI_R.js +0 -1
- package/dist/assets/Settings-COT34hBF.js +0 -2
- package/dist/assets/Skills-BgexoUkQ.js +0 -29
- package/dist/assets/SourceChip-BXjcdeb1.js +0 -1
- package/dist/assets/SystemPrompt-CeeH3EeW.js +0 -1
- package/dist/assets/Toggle-CENi19iK.js +0 -1
- package/dist/assets/ViewTabs-DDBb0x96.js +0 -1
- package/dist/assets/claude-settings-schema-COigsajx.js +0 -3
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* modelPricing.cjs — the current price of each Claude model id, and the dollar cost of one
|
|
5
|
+
* usage bucket. Pure: no I/O, no imports, never throws.
|
|
6
|
+
*
|
|
7
|
+
* Source: the `claude-api` skill's model and prompt-caching reference, cached 2026-11-03,
|
|
8
|
+
* read on 2026-11-21. Prices are dollars per million tokens.
|
|
9
|
+
*
|
|
10
|
+
* Cache writes cost CACHE_WRITE_5M_MULTIPLIER × input for the 5-minute cache and
|
|
11
|
+
* CACHE_WRITE_1H_MULTIPLIER × input for the 1-hour cache, on every model. Cache writes whose split
|
|
12
|
+
* is unknown (cacheCreationUnknownTokens, or all of them when cacheCreation1hTokens is absent) are
|
|
13
|
+
* charged at the 1-hour rate and the result is marked estimated: on 2026-11-21 this machine's last 48 hours of transcripts had 93.5% of
|
|
14
|
+
* cache-write tokens as 1-hour writes.
|
|
15
|
+
*
|
|
16
|
+
* Known limits, deliberately NOT modeled (on 2026-11-21 the last 48 hours of transcripts had no
|
|
17
|
+
* such call):
|
|
18
|
+
* 1. Claude Haiku 5.5 prompts over 100K tokens cost 0.50 / 2.50 (input / output), not the base rate.
|
|
19
|
+
* 2. Fast mode costs more than the rates below.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/** @typedef {{ input: number, output: number, cacheRead: number }} ModelPrice */
|
|
23
|
+
|
|
24
|
+
const row = (input, output, cacheRead) => Object.freeze({ input, output, cacheRead });
|
|
25
|
+
|
|
26
|
+
// cacheRead is stated outright by the reference for Fable 5.2, Fable 5.1, Fable 5, Opus 5.5 and
|
|
27
|
+
// Sonnet 5.5 (and their Mythos twins). Every other row's cacheRead is derived from the general
|
|
28
|
+
// rule, 0.1 × input: opus-5, opus-4-8, opus-4-7, opus-4-6, sonnet-5, sonnet-4-6, haiku-5-5, haiku-4-5.
|
|
29
|
+
const MODEL_PRICES = Object.freeze({
|
|
30
|
+
'claude-fable-5-2': row(8, 40, 0.20),
|
|
31
|
+
'claude-mythos-5-2': row(8, 40, 0.20),
|
|
32
|
+
'claude-fable-5-1': row(10, 50, 0.25),
|
|
33
|
+
'claude-mythos-5-1': row(10, 50, 0.25),
|
|
34
|
+
'claude-fable-5': row(10, 50, 1.00),
|
|
35
|
+
'claude-mythos-5': row(10, 50, 1.00),
|
|
36
|
+
'claude-opus-5-5': row(4, 20, 0.20),
|
|
37
|
+
'claude-opus-5': row(5, 25, 0.50),
|
|
38
|
+
'claude-opus-4-8': row(5, 25, 0.50),
|
|
39
|
+
'claude-opus-4-7': row(5, 25, 0.50),
|
|
40
|
+
'claude-opus-4-6': row(5, 25, 0.50),
|
|
41
|
+
'claude-sonnet-5-5': row(2, 10, 0.10),
|
|
42
|
+
'claude-sonnet-5': row(2, 10, 0.20),
|
|
43
|
+
'claude-sonnet-4-6': row(3, 15, 0.30),
|
|
44
|
+
'claude-haiku-5-5': row(0.10, 0.50, 0.01),
|
|
45
|
+
'claude-haiku-4-5': row(1, 5, 0.10),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const CACHE_WRITE_5M_MULTIPLIER = 1.25;
|
|
49
|
+
const CACHE_WRITE_1H_MULTIPLIER = 2;
|
|
50
|
+
|
|
51
|
+
// Newest row per family, used to price an id that matches no row. Order matters only in that the
|
|
52
|
+
// first family word found wins.
|
|
53
|
+
const FAMILY_FALLBACK = Object.freeze([
|
|
54
|
+
['fable', 'claude-fable-5-2'],
|
|
55
|
+
['mythos', 'claude-mythos-5-2'],
|
|
56
|
+
['opus', 'claude-opus-5-5'],
|
|
57
|
+
['sonnet', 'claude-sonnet-5-5'],
|
|
58
|
+
['haiku', 'claude-haiku-5-5'],
|
|
59
|
+
]);
|
|
60
|
+
const DEFAULT_ID = 'claude-sonnet-5-5';
|
|
61
|
+
|
|
62
|
+
// Bedrock-style provider prefixes: `anthropic.`, `us.anthropic.`, `global.anthropic.`, …
|
|
63
|
+
const PROVIDER_PREFIX_RE = /^(?:[a-z0-9-]+\.)*anthropic\./;
|
|
64
|
+
// What may follow a row id: a -YYYYMMDD date, a `[1m]`-style context tag, or a Vertex `@` version.
|
|
65
|
+
const ROW_CONTINUATION_RE = /^(?:-\d{8}(?!\d)|\[|@)/;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @param {string} rowId
|
|
69
|
+
* @param {boolean} estimated
|
|
70
|
+
*/
|
|
71
|
+
function priced(rowId, estimated) {
|
|
72
|
+
const p = MODEL_PRICES[/** @type {keyof typeof MODEL_PRICES} */ (rowId)];
|
|
73
|
+
return { id: rowId, input: p.input, output: p.output, cacheRead: p.cacheRead, estimated };
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @param {unknown} modelId
|
|
78
|
+
* @returns {{ id: string, input: number, output: number, cacheRead: number, estimated: boolean }}
|
|
79
|
+
*/
|
|
80
|
+
function priceForModel(modelId) {
|
|
81
|
+
const id = typeof modelId === 'string' ? modelId.toLowerCase().replace(PROVIDER_PREFIX_RE, '') : '';
|
|
82
|
+
if (id) {
|
|
83
|
+
for (const rowId of Object.keys(MODEL_PRICES)) {
|
|
84
|
+
if (id === rowId) return priced(rowId, false);
|
|
85
|
+
if (id.startsWith(rowId) && ROW_CONTINUATION_RE.test(id.slice(rowId.length))) return priced(rowId, false);
|
|
86
|
+
}
|
|
87
|
+
for (const [family, rowId] of FAMILY_FALLBACK) {
|
|
88
|
+
if (id.includes(family)) return priced(rowId, true);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return priced(DEFAULT_ID, true);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** @param {unknown} v */
|
|
95
|
+
const num = (v) => (typeof v === 'number' && Number.isFinite(v) ? v : 0);
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Cache writes split three ways:
|
|
99
|
+
* - cacheCreationUnknownTokens: cache-write tokens whose 5-minute / 1-hour split was not
|
|
100
|
+
* recorded. Clamped to [0, cacheCreationTokens], charged at the 1-hour rate, and they mark
|
|
101
|
+
* the result estimated when above zero. It is a plain number so buckets that mix lines with
|
|
102
|
+
* and without a recorded split still sum correctly.
|
|
103
|
+
* - cacheCreation1hTokens: recorded 1-hour writes, clamped to what is left after the unknown part.
|
|
104
|
+
* - the rest is 5-minute writes.
|
|
105
|
+
* When cacheCreation1hTokens is not a number at all, every cache write counts as unknown.
|
|
106
|
+
*
|
|
107
|
+
* @param {unknown} modelId
|
|
108
|
+
* @param {unknown} bucket { inputTokens, outputTokens, cacheReadTokens, cacheCreationTokens, cacheCreation1hTokens?, cacheCreationUnknownTokens? }
|
|
109
|
+
* @returns {{ costUsd: number, cacheSavingsUsd: number, estimated: boolean }}
|
|
110
|
+
*/
|
|
111
|
+
function costOfUsage(modelId, bucket) {
|
|
112
|
+
const price = priceForModel(modelId);
|
|
113
|
+
/** @type {Record<string, unknown>} */
|
|
114
|
+
const b = bucket && typeof bucket === 'object' ? /** @type {Record<string, unknown>} */ (bucket) : {};
|
|
115
|
+
const input = num(b.inputTokens);
|
|
116
|
+
const output = num(b.outputTokens);
|
|
117
|
+
const cacheRead = num(b.cacheReadTokens);
|
|
118
|
+
const cacheWrite = Math.max(0, num(b.cacheCreationTokens));
|
|
119
|
+
let estimated = price.estimated;
|
|
120
|
+
let writeUnknown;
|
|
121
|
+
let write1h;
|
|
122
|
+
if (typeof b.cacheCreation1hTokens === 'number' && Number.isFinite(b.cacheCreation1hTokens)) {
|
|
123
|
+
writeUnknown = Math.min(Math.max(0, num(b.cacheCreationUnknownTokens)), cacheWrite);
|
|
124
|
+
write1h = Math.min(Math.max(0, b.cacheCreation1hTokens), cacheWrite - writeUnknown);
|
|
125
|
+
} else {
|
|
126
|
+
writeUnknown = cacheWrite;
|
|
127
|
+
write1h = 0;
|
|
128
|
+
}
|
|
129
|
+
if (writeUnknown > 0) estimated = true;
|
|
130
|
+
const write5m = cacheWrite - writeUnknown - write1h;
|
|
131
|
+
const costUsd = (
|
|
132
|
+
input * price.input +
|
|
133
|
+
output * price.output +
|
|
134
|
+
cacheRead * price.cacheRead +
|
|
135
|
+
write5m * price.input * CACHE_WRITE_5M_MULTIPLIER +
|
|
136
|
+
(writeUnknown + write1h) * price.input * CACHE_WRITE_1H_MULTIPLIER
|
|
137
|
+
) / 1e6;
|
|
138
|
+
const cacheSavingsUsd = cacheRead * (price.input - price.cacheRead) / 1e6;
|
|
139
|
+
return { costUsd, cacheSavingsUsd, estimated };
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
module.exports = {
|
|
143
|
+
MODEL_PRICES,
|
|
144
|
+
CACHE_WRITE_5M_MULTIPLIER,
|
|
145
|
+
CACHE_WRITE_1H_MULTIPLIER,
|
|
146
|
+
priceForModel,
|
|
147
|
+
costOfUsage,
|
|
148
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* epicAdminRoutes.cjs — read-only admin HTTP routes over epicOutsideRead.cjs,
|
|
3
|
+
* so a script or another project can read an Epic's state without touching
|
|
4
|
+
* Session Manager's files.
|
|
5
|
+
*
|
|
6
|
+
* GET /admin/epics?cwd=<abs>&state=<state>&limit=<1..200>&offset=<0..>
|
|
7
|
+
* → 200 { ok: true, epics, total, limit, offset, hasMore }
|
|
8
|
+
* GET /admin/epic?cwd=<abs>&(id=<epicId> | externalRef=<ref>)[&receipt=1|true]
|
|
9
|
+
* → 200 { ok: true, epic } (epic.receipt = { jobs, chat } only when receipt was asked for) | 404 { ok: false, error: 'not found' }
|
|
10
|
+
*
|
|
11
|
+
* A query the schema rejects → 400 { ok: false, error: 'invalid query', details }.
|
|
12
|
+
* A cwd that is not absolute or has no session-manager-operations folder →
|
|
13
|
+
* 400 { ok: false, error: <reason> }.
|
|
14
|
+
*
|
|
15
|
+
* Writes no file and no audit row. Auth/loopback binding are the injected
|
|
16
|
+
* localAdminHttp.cjs transport's job (see index.cjs).
|
|
17
|
+
*/
|
|
18
|
+
'use strict';
|
|
19
|
+
|
|
20
|
+
const fs = require('node:fs');
|
|
21
|
+
const path = require('node:path');
|
|
22
|
+
const { schemas } = require('../../ipcSchemas.cjs');
|
|
23
|
+
const { sendJson } = require('../feedback-remote/localAdminHttp.cjs');
|
|
24
|
+
const { opsPath } = require('../opsOwnership.cjs');
|
|
25
|
+
const { listOpenEpicRecords, getEpicRecord } = require('./epicOutsideRead.cjs');
|
|
26
|
+
|
|
27
|
+
/** @param {unknown} cwd @returns {string | null} the reason this cwd is not a project, or null. */
|
|
28
|
+
function projectProblem(cwd) {
|
|
29
|
+
if (typeof cwd !== 'string' || !path.isAbsolute(cwd)) return 'cwd must be an absolute path';
|
|
30
|
+
let dir;
|
|
31
|
+
try {
|
|
32
|
+
dir = opsPath(cwd);
|
|
33
|
+
} catch (e) {
|
|
34
|
+
return e instanceof Error ? e.message : String(e);
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
if (!fs.statSync(dir).isDirectory()) return 'cwd has no session-manager-operations folder';
|
|
38
|
+
} catch {
|
|
39
|
+
return 'cwd has no session-manager-operations folder';
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @param {{ registerRoute: Function }} adminHttp
|
|
46
|
+
* @param {{ isTabBusy?: (epicId: string) => boolean | Promise<boolean>, listJobs?: () => any, projectRoots?: () => string[] }} [deps]
|
|
47
|
+
*/
|
|
48
|
+
function registerAdminRoute(adminHttp, deps = {}) {
|
|
49
|
+
/** @type {Record<string, unknown>} */
|
|
50
|
+
const readOpts = {};
|
|
51
|
+
if (typeof deps.isTabBusy === 'function') readOpts.isTabBusy = deps.isTabBusy;
|
|
52
|
+
if (typeof deps.listJobs === 'function') readOpts.listJobs = deps.listJobs;
|
|
53
|
+
if (typeof deps.projectRoots === 'function') readOpts.projectRoots = deps.projectRoots;
|
|
54
|
+
|
|
55
|
+
/** @param {any} schema @param {any} query @param {any} res */
|
|
56
|
+
function parseQuery(schema, query, res) {
|
|
57
|
+
let input;
|
|
58
|
+
try {
|
|
59
|
+
input = schema.parse(Object.fromEntries(query ?? []));
|
|
60
|
+
} catch (e) {
|
|
61
|
+
sendJson(res, 400, { ok: false, error: 'invalid query', details: e?.issues ?? e?.message });
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
const problem = projectProblem(input.cwd);
|
|
65
|
+
if (problem) {
|
|
66
|
+
sendJson(res, 400, { ok: false, error: problem });
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return input;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
adminHttp.registerRoute('GET', '/admin/epics', async (/** @type {any} */ req, /** @type {any} */ res, /** @type {any} */ query) => {
|
|
73
|
+
const input = parseQuery(schemas.adminListEpicsQuery, query, res);
|
|
74
|
+
if (!input) return;
|
|
75
|
+
const { epics, total, limit, offset, hasMore } = await listOpenEpicRecords(input.cwd, {
|
|
76
|
+
...readOpts,
|
|
77
|
+
state: input.state,
|
|
78
|
+
limit: input.limit,
|
|
79
|
+
offset: input.offset,
|
|
80
|
+
});
|
|
81
|
+
sendJson(res, 200, { ok: true, epics, total, limit, offset, hasMore });
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
adminHttp.registerRoute('GET', '/admin/epic', async (/** @type {any} */ req, /** @type {any} */ res, /** @type {any} */ query) => {
|
|
85
|
+
const input = parseQuery(schemas.adminGetEpicQuery, query, res);
|
|
86
|
+
if (!input) return;
|
|
87
|
+
const epic = await getEpicRecord(input.cwd, {
|
|
88
|
+
...readOpts,
|
|
89
|
+
id: input.id,
|
|
90
|
+
externalRef: input.externalRef,
|
|
91
|
+
receipt: input.receipt === true,
|
|
92
|
+
});
|
|
93
|
+
if (!epic) {
|
|
94
|
+
sendJson(res, 404, { ok: false, error: 'not found' });
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
sendJson(res, 200, { ok: true, epic });
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
module.exports = { registerAdminRoute };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* epicJobReceipt.cjs — sums the scheduler run metadata (`<runId>/<slug>.meta.json`)
|
|
3
|
+
* of one Epic's PRDs, every attempt included, into a cost/usage receipt.
|
|
4
|
+
*
|
|
5
|
+
* Complexity: one listing per run dir since sinceMs; only wanted meta files that exist are
|
|
6
|
+
* opened. Never rejects: a missing runs dir, unreadable run dir or malformed meta file is skipped.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
'use strict';
|
|
10
|
+
|
|
11
|
+
const fsp = require('node:fs/promises');
|
|
12
|
+
const path = require('node:path');
|
|
13
|
+
const { runIdToMs } = require('../../loopEfficiencyHandlers.cjs');
|
|
14
|
+
|
|
15
|
+
const META_SUFFIX = '.meta.json';
|
|
16
|
+
const num = (v) => (typeof v === 'number' && Number.isFinite(v) ? v : 0);
|
|
17
|
+
|
|
18
|
+
async function readJson(p) {
|
|
19
|
+
try { return JSON.parse(await fsp.readFile(p, 'utf8')); } catch { return null; }
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @param {{ cwd: string, slugs: string[], sinceMs?: number, runsRoot?: string }} opts
|
|
24
|
+
* @returns {Promise<{ runs: number, costUsd: number, costKnownRuns: number, outputTokens: number,
|
|
25
|
+
* numTurns: number, durationMs: number,
|
|
26
|
+
* byPrd: Array<{ slug: string, runs: number, costUsd: number, lastExitCode: number|null, lastFinishedAt: number|null }> }>}
|
|
27
|
+
*/
|
|
28
|
+
async function gatherEpicJobReceipt({ cwd, slugs, sinceMs, runsRoot } = /** @type {any} */ ({})) {
|
|
29
|
+
const out = { runs: 0, costUsd: 0, costKnownRuns: 0, outputTokens: 0, numTurns: 0, durationMs: 0, byPrd: [] };
|
|
30
|
+
try {
|
|
31
|
+
const root = runsRoot || require('../scheduler/schedulerPaths.cjs').runsDir();
|
|
32
|
+
const since = typeof sinceMs === 'number' && Number.isFinite(sinceMs) ? sinceMs : -Infinity;
|
|
33
|
+
// Slugs name files inside a run dir — reject anything that could escape it.
|
|
34
|
+
const wanted = new Set((Array.isArray(slugs) ? slugs : [])
|
|
35
|
+
.filter((s) => typeof s === 'string' && s && !s.includes('/') && !s.includes('\\') && s !== '.' && s !== '..'));
|
|
36
|
+
/** @type {Map<string, { slug: string, runs: number, costUsd: number, lastExitCode: number|null, lastFinishedAt: number|null, lastAt: number }>} */
|
|
37
|
+
const per = new Map();
|
|
38
|
+
|
|
39
|
+
let dirs = [];
|
|
40
|
+
try { dirs = await fsp.readdir(root); } catch { /* no runs dir */ }
|
|
41
|
+
|
|
42
|
+
for (const runId of dirs) {
|
|
43
|
+
const t = runIdToMs(runId);
|
|
44
|
+
if (!Number.isFinite(t) || t < since) continue;
|
|
45
|
+
const runDir = path.join(root, runId);
|
|
46
|
+
let files;
|
|
47
|
+
try { files = await fsp.readdir(runDir); } catch { continue; }
|
|
48
|
+
for (const f of files) {
|
|
49
|
+
if (!f.endsWith(META_SUFFIX)) continue;
|
|
50
|
+
// Slug comes from the filename and must be in the guarded wanted set.
|
|
51
|
+
const slug = f.slice(0, -META_SUFFIX.length);
|
|
52
|
+
if (!wanted.has(slug)) continue;
|
|
53
|
+
const meta = await readJson(path.join(runDir, f));
|
|
54
|
+
if (!meta || typeof meta !== 'object' || meta.cwd !== cwd) continue;
|
|
55
|
+
let row = per.get(slug);
|
|
56
|
+
if (!row) {
|
|
57
|
+
row = { slug, runs: 0, costUsd: 0, lastExitCode: null, lastFinishedAt: null, lastAt: -Infinity };
|
|
58
|
+
per.set(slug, row);
|
|
59
|
+
}
|
|
60
|
+
out.runs += 1;
|
|
61
|
+
row.runs += 1;
|
|
62
|
+
if (typeof meta.totalCostUsd === 'number' && Number.isFinite(meta.totalCostUsd)) {
|
|
63
|
+
out.costUsd += meta.totalCostUsd;
|
|
64
|
+
out.costKnownRuns += 1;
|
|
65
|
+
row.costUsd += meta.totalCostUsd;
|
|
66
|
+
}
|
|
67
|
+
out.outputTokens += num(meta.outputTokens);
|
|
68
|
+
out.numTurns += num(meta.numTurns);
|
|
69
|
+
out.durationMs += num(meta.durationMs);
|
|
70
|
+
const finishedAt = typeof meta.finishedAt === 'number' ? meta.finishedAt : null;
|
|
71
|
+
const at = finishedAt != null ? finishedAt : t;
|
|
72
|
+
if (at >= row.lastAt) {
|
|
73
|
+
row.lastAt = at;
|
|
74
|
+
row.lastExitCode = typeof meta.exitCode === 'number' ? meta.exitCode : null;
|
|
75
|
+
row.lastFinishedAt = finishedAt;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
out.byPrd = [...per.values()]
|
|
81
|
+
.sort((a, b) => (a.slug < b.slug ? -1 : a.slug > b.slug ? 1 : 0))
|
|
82
|
+
.map(({ slug, runs, costUsd, lastExitCode, lastFinishedAt }) => ({ slug, runs, costUsd, lastExitCode, lastFinishedAt }));
|
|
83
|
+
} catch { /* never reject — return what was gathered */ }
|
|
84
|
+
return out;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
module.exports = { gatherEpicJobReceipt };
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* epicOutsideRead.cjs — the record an outside app reads for one Epic.
|
|
5
|
+
*
|
|
6
|
+
* Joins the project's active index (or, for a completed Epic, its archive
|
|
7
|
+
* file), the scheduler job rows, the awaiting-input reader and
|
|
8
|
+
* computeEpicOutsideState into one plain record. Read-only; every read is
|
|
9
|
+
* guarded so a broken file yields null or an empty list, and nothing throws.
|
|
10
|
+
*
|
|
11
|
+
* Scheduler + chat liveness come in as injected functions (listJobs,
|
|
12
|
+
* isTabBusy) with safe defaults (no jobs, never busy) so this module needs no
|
|
13
|
+
* running scheduler. Open-Epic reads (active index) skip the registration
|
|
14
|
+
* check: it enumerates ~/.claude/projects (11k+ dirs, ~21 s cold). Only the
|
|
15
|
+
* archive path checks it, because readArchived requires a registered project,
|
|
16
|
+
* so a completed Epic in an unregistered project reads as nothing.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const path = require('node:path');
|
|
20
|
+
const { readActiveIndex } = require('./epicMint.cjs');
|
|
21
|
+
const { computeEpicOutsideState, knownPrdSlugs } = require('./epicOutsideState.cjs');
|
|
22
|
+
const { findEpicByExternalRef } = require('./externalRefIndex.cjs');
|
|
23
|
+
const { awaitingInputSessions } = require('../../exchanges.cjs');
|
|
24
|
+
const { readArchived, defaultProjectRoots, makeRegisteredRootsCache } = require('../../promptSessionsIpc.cjs');
|
|
25
|
+
const { gatherEpicJobReceipt } = require('./epicJobReceipt.cjs');
|
|
26
|
+
const { summarizeTranscriptFile } = require('./transcriptUsage.cjs');
|
|
27
|
+
const { resolveEpicTranscriptPath } = require('./epicTranscriptPath.cjs');
|
|
28
|
+
|
|
29
|
+
const DEFAULT_LIMIT = 50;
|
|
30
|
+
const MAX_LIMIT = 200;
|
|
31
|
+
const OPEN_STATUSES = new Set(['proposed', 'active']);
|
|
32
|
+
|
|
33
|
+
const isObj = (v) => v != null && typeof v === 'object' && !Array.isArray(v);
|
|
34
|
+
const str = (v) => (typeof v === 'string' && v !== '' ? v : null);
|
|
35
|
+
const norm = (p) => path.resolve(String(p)).replace(/[\\/]+$/, '');
|
|
36
|
+
|
|
37
|
+
let defaultRootsCache = null;
|
|
38
|
+
|
|
39
|
+
/** Same rule as promptSessionsIpc's assertRegistered, but answers a boolean. */
|
|
40
|
+
function isRegistered(cwd, projectRoots) {
|
|
41
|
+
try {
|
|
42
|
+
if (typeof cwd !== 'string' || !cwd || !path.isAbsolute(cwd)) return false;
|
|
43
|
+
const { projectRootOf } = require('../activeSessions.cjs');
|
|
44
|
+
const want = norm(projectRootOf(cwd) || cwd);
|
|
45
|
+
if (projectRoots === defaultProjectRoots) {
|
|
46
|
+
if (!defaultRootsCache) defaultRootsCache = makeRegisteredRootsCache(defaultProjectRoots);
|
|
47
|
+
return defaultRootsCache.has(want);
|
|
48
|
+
}
|
|
49
|
+
for (const r of projectRoots() || []) {
|
|
50
|
+
if (typeof r !== 'string' || !r) continue;
|
|
51
|
+
if (norm(r) === want || norm(projectRootOf(r) || r) === want) return true;
|
|
52
|
+
}
|
|
53
|
+
return false;
|
|
54
|
+
} catch {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function loadJobs(listJobs) {
|
|
60
|
+
try {
|
|
61
|
+
const out = await listJobs();
|
|
62
|
+
if (Array.isArray(out)) return out;
|
|
63
|
+
if (isObj(out) && Array.isArray(out.jobs)) return out.jobs;
|
|
64
|
+
} catch { /* no jobs */ }
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async function loadAwaiting(cwd) {
|
|
69
|
+
try {
|
|
70
|
+
const set = await awaitingInputSessions(cwd);
|
|
71
|
+
return set instanceof Set ? set : new Set();
|
|
72
|
+
} catch {
|
|
73
|
+
return new Set();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async function busy(isTabBusy, epicId) {
|
|
78
|
+
try {
|
|
79
|
+
return (await isTabBusy(epicId)) === true;
|
|
80
|
+
} catch {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** goalText split at the first blank line → { title, goal }; absent parts are null. */
|
|
86
|
+
function splitGoal(goalText) {
|
|
87
|
+
if (typeof goalText !== 'string') return { title: null, goal: null };
|
|
88
|
+
const m = /\r?\n[ \t]*\r?\n/.exec(goalText);
|
|
89
|
+
const head = (m ? goalText.slice(0, m.index) : goalText).trim();
|
|
90
|
+
const tail = m ? goalText.slice(m.index + m[0].length).trim() : '';
|
|
91
|
+
return { title: head || null, goal: tail || null };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function buildRecord(cwd, epicId, session, events, jobs, needsInput, chatBusy) {
|
|
95
|
+
const computed = computeEpicOutsideState({ session: { ...session, id: epicId }, events, jobs, needsInput, chatBusy });
|
|
96
|
+
const source = isObj(session.source) ? session.source : {};
|
|
97
|
+
const { title, goal } = splitGoal(session.goalText);
|
|
98
|
+
return {
|
|
99
|
+
epicId,
|
|
100
|
+
cwd: str(session.cwd) || cwd,
|
|
101
|
+
title,
|
|
102
|
+
goal,
|
|
103
|
+
tag: str(session.tag),
|
|
104
|
+
agentType: str(session.agentType),
|
|
105
|
+
status: str(session.status),
|
|
106
|
+
state: computed.state,
|
|
107
|
+
blocked: computed.blocked,
|
|
108
|
+
prds: computed.prds,
|
|
109
|
+
verified: computed.verified,
|
|
110
|
+
refuted: computed.refuted,
|
|
111
|
+
unvalidated: computed.unvalidated,
|
|
112
|
+
externalRef: str(source.externalRef),
|
|
113
|
+
source: {
|
|
114
|
+
producer: str(source.producer),
|
|
115
|
+
fromCwd: str(source.fromCwd),
|
|
116
|
+
fromEpicId: str(source.fromEpicId),
|
|
117
|
+
macroId: str(source.macroId),
|
|
118
|
+
},
|
|
119
|
+
createdAt: str(session.createdAt),
|
|
120
|
+
completedAt: str(session.completedAt),
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function eventsOf(index, epicId) {
|
|
125
|
+
const chain = isObj(index.events) ? index.events[epicId] : null;
|
|
126
|
+
return Array.isArray(chain) ? chain : [];
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function openSession(index, epicId) {
|
|
130
|
+
const s = isObj(index.sessions) && Object.prototype.hasOwnProperty.call(index.sessions, epicId)
|
|
131
|
+
? index.sessions[epicId]
|
|
132
|
+
: null;
|
|
133
|
+
return isObj(s) && OPEN_STATUSES.has(s.status) ? s : null;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
async function openRecord(cwd, epicId, session, index, jobs, awaiting, isTabBusy) {
|
|
137
|
+
const claudeSessionId = str(session.claudeSessionId);
|
|
138
|
+
const needsInput = claudeSessionId != null && awaiting.has(claudeSessionId);
|
|
139
|
+
const chatBusy = await busy(isTabBusy, epicId);
|
|
140
|
+
return buildRecord(cwd, epicId, session, eventsOf(index, epicId), jobs, needsInput, chatBusy);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** The archived (completed) session + its events, or null (also for an unregistered project). */
|
|
144
|
+
function archivedEntry(cwd, epicId, projectRoots) {
|
|
145
|
+
try {
|
|
146
|
+
if (!isRegistered(cwd, projectRoots)) return null;
|
|
147
|
+
const res = readArchived(cwd, epicId, { projectRoots });
|
|
148
|
+
const data = res && res.exists ? res.data : null;
|
|
149
|
+
if (!isObj(data) || !str(data.archivedAt) || !isObj(data.session)) return null;
|
|
150
|
+
return {
|
|
151
|
+
session: { ...data.session, status: 'completed' },
|
|
152
|
+
events: Array.isArray(data.events) ? data.events : [],
|
|
153
|
+
};
|
|
154
|
+
} catch {
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Job-run cost for every PRD the Epic is known to have (live rows + check-ins
|
|
161
|
+
* on its chain, so finished PRDs whose rows are gone still count) since the
|
|
162
|
+
* session was created; null on failure.
|
|
163
|
+
*/
|
|
164
|
+
async function jobsReceipt(cwd, epicId, session, events, jobs, runsRoot) {
|
|
165
|
+
try {
|
|
166
|
+
const slugs = knownPrdSlugs({ session: { ...session, id: epicId }, events, jobs });
|
|
167
|
+
const created = Date.parse(session.createdAt);
|
|
168
|
+
return await gatherEpicJobReceipt({
|
|
169
|
+
cwd,
|
|
170
|
+
slugs,
|
|
171
|
+
sinceMs: Number.isFinite(created) ? created : undefined,
|
|
172
|
+
runsRoot,
|
|
173
|
+
});
|
|
174
|
+
} catch {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** Token usage of the Epic's chat transcript; null when no file is found or on failure. */
|
|
180
|
+
async function chatReceipt(cwd, session, resolveTranscriptPath) {
|
|
181
|
+
try {
|
|
182
|
+
const claudeSessionId = str(session.claudeSessionId);
|
|
183
|
+
if (!claudeSessionId) return null;
|
|
184
|
+
const hit = resolveTranscriptPath({ cwd, claudeSessionId });
|
|
185
|
+
// The real resolver hands back its first candidate even when nothing exists.
|
|
186
|
+
if (!isObj(hit) || !str(hit.path) || hit.existsAnywhere === false) return null;
|
|
187
|
+
return await summarizeTranscriptFile(hit.path);
|
|
188
|
+
} catch {
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
async function buildReceipt(cwd, epicId, session, events, jobs, runsRoot, resolveTranscriptPath) {
|
|
194
|
+
const [jobsPart, chatPart] = await Promise.all([
|
|
195
|
+
jobsReceipt(cwd, epicId, session, events, jobs, runsRoot),
|
|
196
|
+
chatReceipt(cwd, session, resolveTranscriptPath),
|
|
197
|
+
]);
|
|
198
|
+
return { jobs: jobsPart, chat: chatPart };
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* One Epic by id or externalRef: open from the active index, else completed
|
|
203
|
+
* from its archive file (only when archivedAt is set). Null on no match.
|
|
204
|
+
*
|
|
205
|
+
* `receipt: true` adds `receipt: { jobs, chat }` — jobs = gatherEpicJobReceipt
|
|
206
|
+
* over the Epic's known PRD slugs (knownPrdSlugs) since createdAt, chat = summarizeTranscriptFile of
|
|
207
|
+
* the resolved transcript (null when none). Each part is null on failure.
|
|
208
|
+
* Without it no run folder or transcript is read. `runsRoot` and
|
|
209
|
+
* `resolveTranscriptPath` are injectable for tests.
|
|
210
|
+
*
|
|
211
|
+
* @param {string} cwd
|
|
212
|
+
* @param {{ id?: string, externalRef?: string, receipt?: boolean, isTabBusy?: (epicId: string) => boolean | Promise<boolean>, listJobs?: () => any, projectRoots?: () => string[], runsRoot?: string, resolveTranscriptPath?: (a: { cwd: string, claudeSessionId: string }) => any }} [opts]
|
|
213
|
+
*/
|
|
214
|
+
async function getEpicRecord(cwd, opts = {}) {
|
|
215
|
+
try {
|
|
216
|
+
const {
|
|
217
|
+
id, externalRef, receipt,
|
|
218
|
+
isTabBusy = () => false,
|
|
219
|
+
listJobs = () => [],
|
|
220
|
+
projectRoots = defaultProjectRoots,
|
|
221
|
+
runsRoot,
|
|
222
|
+
resolveTranscriptPath = resolveEpicTranscriptPath,
|
|
223
|
+
} = isObj(opts) ? opts : {};
|
|
224
|
+
if (typeof cwd !== 'string' || !cwd || !path.isAbsolute(cwd)) return null;
|
|
225
|
+
|
|
226
|
+
let epicId = str(id);
|
|
227
|
+
if (!epicId && str(externalRef)) {
|
|
228
|
+
const hit = await findEpicByExternalRef({ cwd, externalRef });
|
|
229
|
+
epicId = hit ? str(hit.epicId) : null;
|
|
230
|
+
}
|
|
231
|
+
if (!epicId) return null;
|
|
232
|
+
|
|
233
|
+
const index = readActiveIndex(cwd);
|
|
234
|
+
const open = openSession(index, epicId);
|
|
235
|
+
const jobs = await loadJobs(listJobs);
|
|
236
|
+
let session;
|
|
237
|
+
let events;
|
|
238
|
+
let record;
|
|
239
|
+
if (open) {
|
|
240
|
+
session = open;
|
|
241
|
+
events = eventsOf(index, epicId);
|
|
242
|
+
const awaiting = await loadAwaiting(cwd);
|
|
243
|
+
record = await openRecord(cwd, epicId, open, index, jobs, awaiting, isTabBusy);
|
|
244
|
+
} else {
|
|
245
|
+
const archived = archivedEntry(cwd, epicId, projectRoots);
|
|
246
|
+
if (!archived) return null;
|
|
247
|
+
session = archived.session;
|
|
248
|
+
events = archived.events;
|
|
249
|
+
record = buildRecord(cwd, epicId, session, archived.events, jobs, false, false);
|
|
250
|
+
}
|
|
251
|
+
if (receipt !== true) return record;
|
|
252
|
+
return { ...record, receipt: await buildReceipt(cwd, epicId, session, events, jobs, runsRoot, resolveTranscriptPath) };
|
|
253
|
+
} catch {
|
|
254
|
+
return null;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function clampInt(v, dflt, min, max) {
|
|
259
|
+
const n = Number(v);
|
|
260
|
+
if (!Number.isFinite(n)) return dflt;
|
|
261
|
+
return Math.min(max, Math.max(min, Math.floor(n)));
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* A project's open (proposed/active) Epics, newest createdAt first.
|
|
266
|
+
*
|
|
267
|
+
* @param {string} cwd
|
|
268
|
+
* @param {{ state?: string, limit?: number, offset?: number, isTabBusy?: (epicId: string) => boolean | Promise<boolean>, listJobs?: () => any, projectRoots?: () => string[] }} [opts]
|
|
269
|
+
*/
|
|
270
|
+
async function listOpenEpicRecords(cwd, opts = {}) {
|
|
271
|
+
const o = isObj(opts) ? opts : {};
|
|
272
|
+
const limit = o.limit == null ? DEFAULT_LIMIT : clampInt(o.limit, DEFAULT_LIMIT, 1, MAX_LIMIT);
|
|
273
|
+
const offset = o.offset == null ? 0 : clampInt(o.offset, 0, 0, Number.MAX_SAFE_INTEGER);
|
|
274
|
+
const empty = { epics: [], total: 0, limit, offset, hasMore: false };
|
|
275
|
+
try {
|
|
276
|
+
const {
|
|
277
|
+
state,
|
|
278
|
+
isTabBusy = () => false,
|
|
279
|
+
listJobs = () => [],
|
|
280
|
+
} = o;
|
|
281
|
+
if (typeof cwd !== 'string' || !cwd || !path.isAbsolute(cwd)) return empty;
|
|
282
|
+
|
|
283
|
+
const index = readActiveIndex(cwd);
|
|
284
|
+
const open = [];
|
|
285
|
+
for (const epicId of Object.keys(isObj(index.sessions) ? index.sessions : {})) {
|
|
286
|
+
const s = openSession(index, epicId);
|
|
287
|
+
if (s) open.push([epicId, s]);
|
|
288
|
+
}
|
|
289
|
+
const t = (s) => { const n = Date.parse(s.createdAt); return Number.isFinite(n) ? n : -Infinity; };
|
|
290
|
+
open.sort((a, b) => t(b[1]) - t(a[1]) || (a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0));
|
|
291
|
+
|
|
292
|
+
const jobs = await loadJobs(listJobs);
|
|
293
|
+
const awaiting = await loadAwaiting(cwd);
|
|
294
|
+
const records = [];
|
|
295
|
+
for (const [epicId, s] of open) {
|
|
296
|
+
records.push(await openRecord(cwd, epicId, s, index, jobs, awaiting, isTabBusy));
|
|
297
|
+
}
|
|
298
|
+
const filtered = typeof state === 'string' && state ? records.filter((r) => r.state === state) : records;
|
|
299
|
+
const epics = filtered.slice(offset, offset + limit);
|
|
300
|
+
return { epics, total: filtered.length, limit, offset, hasMore: offset + epics.length < filtered.length };
|
|
301
|
+
} catch {
|
|
302
|
+
return empty;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
module.exports = { listOpenEpicRecords, getEpicRecord };
|