@codemem/server 0.28.0 → 0.28.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/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/routes/config.d.ts.map +1 -1
- package/package.json +7 -7
- package/static/app.js +14 -28
- package/static/index.html +15 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/routes/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAKN,KAAK,eAAe,EAKpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/routes/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAKN,KAAK,eAAe,EAKpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAuF5B,MAAM,WAAW,kBAAkB;IAClC,UAAU,CAAC,EAAE,MAAM,eAAe,GAAG,IAAI,CAAC;CAC1C;AAuQD,wBAAgB,YAAY,CAAC,IAAI,GAAE,kBAAuB,8EA6GzD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codemem/server",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
"static/"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@hono/node-server": "^
|
|
18
|
+
"@hono/node-server": "^2.0.0",
|
|
19
19
|
"drizzle-orm": "^0.45.2",
|
|
20
|
-
"hono": "^4.12.
|
|
20
|
+
"hono": "^4.12.14",
|
|
21
21
|
"limiter": "^3.0.0",
|
|
22
|
-
"@codemem/core": "^0.28.
|
|
22
|
+
"@codemem/core": "^0.28.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/better-sqlite3": "^7.6.13",
|
|
26
26
|
"@types/node": "^22.15.21",
|
|
27
27
|
"better-sqlite3": "^12.8.0",
|
|
28
28
|
"sqlite-vec": "0.1.7-alpha.2",
|
|
29
|
-
"typescript": "^
|
|
30
|
-
"vite": "^8.0.
|
|
31
|
-
"vitest": "^4.1.
|
|
29
|
+
"typescript": "^6.0.3",
|
|
30
|
+
"vite": "^8.0.9",
|
|
31
|
+
"vitest": "^4.1.5"
|
|
32
32
|
},
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|
package/static/app.js
CHANGED
|
@@ -3270,11 +3270,10 @@
|
|
|
3270
3270
|
return payload;
|
|
3271
3271
|
}
|
|
3272
3272
|
async function triggerSync(address) {
|
|
3273
|
-
const payload = address ? { address } : {};
|
|
3274
3273
|
const resp = await fetch("/api/sync/run", {
|
|
3275
3274
|
method: "POST",
|
|
3276
3275
|
headers: { "Content-Type": "application/json" },
|
|
3277
|
-
body: JSON.stringify(
|
|
3276
|
+
body: JSON.stringify(address ? { address } : {})
|
|
3278
3277
|
});
|
|
3279
3278
|
const { text, payload: body } = await readJsonPayload(resp);
|
|
3280
3279
|
if (!resp.ok) throw new Error(payloadError(body) || text || "request failed");
|
|
@@ -12990,7 +12989,6 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
12990
12989
|
observerSimpleTemperature: "observer_simple_temperature",
|
|
12991
12990
|
observerRichModel: "observer_rich_model",
|
|
12992
12991
|
observerRichTemperature: "observer_rich_temperature",
|
|
12993
|
-
observerRichOpenAIUseResponses: "observer_rich_openai_use_responses",
|
|
12994
12992
|
observerRichReasoningEffort: "observer_rich_reasoning_effort",
|
|
12995
12993
|
observerRichReasoningSummary: "observer_rich_reasoning_summary",
|
|
12996
12994
|
observerRichMaxOutputTokens: "observer_rich_max_output_tokens",
|
|
@@ -13032,7 +13030,6 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
13032
13030
|
observerSimpleTemperature: "",
|
|
13033
13031
|
observerRichModel: "",
|
|
13034
13032
|
observerRichTemperature: "",
|
|
13035
|
-
observerRichOpenAIUseResponses: false,
|
|
13036
13033
|
observerRichReasoningEffort: "",
|
|
13037
13034
|
observerRichReasoningSummary: "",
|
|
13038
13035
|
observerRichMaxOutputTokens: "",
|
|
@@ -13208,8 +13205,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
13208
13205
|
}
|
|
13209
13206
|
case "sync_enabled":
|
|
13210
13207
|
case "sync_mdns":
|
|
13211
|
-
case "observer_tier_routing_enabled":
|
|
13212
|
-
case "observer_rich_openai_use_responses": return asBooleanValue(cfg[key]);
|
|
13208
|
+
case "observer_tier_routing_enabled": return asBooleanValue(cfg[key]);
|
|
13213
13209
|
default: return hasOwn(cfg, key) ? cfg[key] : "";
|
|
13214
13210
|
}
|
|
13215
13211
|
}
|
|
@@ -13280,7 +13276,6 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
13280
13276
|
observer_simple_temperature: simpleTemperature,
|
|
13281
13277
|
observer_rich_model: normalizeTextValue(values.observerRichModel),
|
|
13282
13278
|
observer_rich_temperature: richTemperature,
|
|
13283
|
-
observer_rich_openai_use_responses: values.observerRichOpenAIUseResponses,
|
|
13284
13279
|
observer_rich_reasoning_effort: normalizeTextValue(values.observerRichReasoningEffort),
|
|
13285
13280
|
observer_rich_reasoning_summary: normalizeTextValue(values.observerRichReasoningSummary),
|
|
13286
13281
|
observer_rich_max_output_tokens: richMaxOutputTokens,
|
|
@@ -13326,7 +13321,6 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
13326
13321
|
observerSimpleTemperature: asInputString(effectiveOrConfigured(config, effective, "observer_simple_temperature")),
|
|
13327
13322
|
observerRichModel: asInputString(effectiveOrConfigured(config, effective, "observer_rich_model")),
|
|
13328
13323
|
observerRichTemperature: asInputString(effectiveOrConfigured(config, effective, "observer_rich_temperature")),
|
|
13329
|
-
observerRichOpenAIUseResponses: asBooleanValue(effectiveOrConfigured(config, effective, "observer_rich_openai_use_responses")),
|
|
13330
13324
|
observerRichReasoningEffort: asInputString(effectiveOrConfigured(config, effective, "observer_rich_reasoning_effort")),
|
|
13331
13325
|
observerRichReasoningSummary: asInputString(effectiveOrConfigured(config, effective, "observer_rich_reasoning_summary")),
|
|
13332
13326
|
observerRichMaxOutputTokens: asInputString(effectiveOrConfigured(config, effective, "observer_rich_max_output_tokens")),
|
|
@@ -13364,17 +13358,17 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
13364
13358
|
].some((key) => hasOwn(envOverrides, key)) ? "Env override" : inferred.source}: ${inferred.model}`;
|
|
13365
13359
|
}
|
|
13366
13360
|
function getTieredRoutingHelperText$1(values) {
|
|
13367
|
-
if (!values.observerTierRoutingEnabled) return "Off: codemem uses the base observer settings from the Connection tab for all batches.";
|
|
13368
|
-
return "On: codemem
|
|
13361
|
+
if (!values.observerTierRoutingEnabled) return "Off: codemem uses the base observer settings from the Connection tab for all batches. Explicit user settings always win over built-in routing defaults.";
|
|
13362
|
+
return "On: codemem routes simpler batches to a lighter model and richer batches to a higher-quality configuration. Rich-tier OpenAI requests default to the Responses transport, and Claude sidecar runtimes route both tiers through the local Claude CLI.";
|
|
13369
13363
|
}
|
|
13370
13364
|
function getObserverModelLabel$1(values) {
|
|
13371
13365
|
return values.observerTierRoutingEnabled ? "Base model fallback" : "Model";
|
|
13372
13366
|
}
|
|
13373
13367
|
function getObserverModelTooltip$1(values) {
|
|
13374
|
-
return values.observerTierRoutingEnabled ? "Tiered routing is enabled, so Processing controls the simple/rich models. This base model is only a fallback." : "Leave blank to use a recommended model for your selected mode/provider.";
|
|
13368
|
+
return values.observerTierRoutingEnabled ? "Tiered routing is enabled, so Processing controls the simple/rich models. This base model is only a fallback, and explicit settings override built-in defaults." : "Leave blank to use a recommended model for your selected mode/provider.";
|
|
13375
13369
|
}
|
|
13376
13370
|
function getObserverModelDescription$1(values) {
|
|
13377
|
-
return values.observerTierRoutingEnabled ? "Tiered routing is active. Use this only as a fallback while the Processing tab owns simple/rich model selection." : "Default: `gpt-5.1-codex-mini` for Direct API; `claude-4.5-haiku` for Local Claude session.";
|
|
13371
|
+
return values.observerTierRoutingEnabled ? "Tiered routing is active. Use this only as a fallback while the Processing tab owns simple/rich model selection and explicit tier settings override built-in defaults." : "Default: `gpt-5.1-codex-mini` for Direct API; `claude-4.5-haiku` for Local Claude session.";
|
|
13378
13372
|
}
|
|
13379
13373
|
function hiddenUnlessAdvanced$1(showAdvanced) {
|
|
13380
13374
|
return !showAdvanced;
|
|
@@ -14352,7 +14346,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
14352
14346
|
}),
|
|
14353
14347
|
/* @__PURE__ */ u(SettingsHint, {
|
|
14354
14348
|
hidden: !showTieredRouting || hiddenUnlessAdvanced(),
|
|
14355
|
-
children: "These advanced routing values are only useful when you are tuning model cost, latency, or output quality for a known workload."
|
|
14349
|
+
children: "These advanced routing values are only useful when you are tuning model cost, latency, or output quality for a known workload. If a selected path cannot honor the requested tier settings, codemem falls back visibly instead of silently pretending it worked."
|
|
14356
14350
|
}),
|
|
14357
14351
|
/* @__PURE__ */ u(Field, {
|
|
14358
14352
|
hidden: !showTieredRouting,
|
|
@@ -14365,7 +14359,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
14365
14359
|
}), /* @__PURE__ */ u("button", {
|
|
14366
14360
|
"aria-label": "About simple tier model",
|
|
14367
14361
|
className: "help-icon",
|
|
14368
|
-
"data-tooltip": "Used for lighter replay batches. Leave blank to keep codemem's routing defaults
|
|
14362
|
+
"data-tooltip": "Used for lighter replay batches. Leave blank to keep codemem's routing defaults. Explicit simple-tier values override the built-in defaults.",
|
|
14369
14363
|
type: "button",
|
|
14370
14364
|
children: "?"
|
|
14371
14365
|
})]
|
|
@@ -14393,7 +14387,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
14393
14387
|
}), /* @__PURE__ */ u("button", {
|
|
14394
14388
|
"aria-label": "About rich tier model",
|
|
14395
14389
|
className: "help-icon",
|
|
14396
|
-
"data-tooltip": "Used for larger or more complex replay batches. Leave blank to keep codemem's rich-tier defaults.",
|
|
14390
|
+
"data-tooltip": "Used for larger or more complex replay batches. Leave blank to keep codemem's rich-tier defaults. Explicit rich-tier values override the built-in defaults.",
|
|
14397
14391
|
type: "button",
|
|
14398
14392
|
children: "?"
|
|
14399
14393
|
})]
|
|
@@ -14410,14 +14404,6 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
14410
14404
|
})
|
|
14411
14405
|
]
|
|
14412
14406
|
}),
|
|
14413
|
-
/* @__PURE__ */ u(SettingsSwitchRow, {
|
|
14414
|
-
checked: values.observerRichOpenAIUseResponses,
|
|
14415
|
-
className: "field",
|
|
14416
|
-
hidden: !showTieredRouting,
|
|
14417
|
-
id: "observerRichOpenAIUseResponses",
|
|
14418
|
-
label: "Use OpenAI Responses API for rich tier",
|
|
14419
|
-
onCheckedChange: onSwitchInput("observerRichOpenAIUseResponses")
|
|
14420
|
-
}),
|
|
14421
14407
|
/* @__PURE__ */ u(Field, {
|
|
14422
14408
|
className: "field settings-advanced",
|
|
14423
14409
|
hidden: !showTieredRouting || hiddenUnlessAdvanced(),
|
|
@@ -15464,8 +15450,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
15464
15450
|
onOpenChange,
|
|
15465
15451
|
triggerId: "syncPairingToggle",
|
|
15466
15452
|
triggerClassName: "settings-button",
|
|
15467
|
-
closedLabel: "Show pairing",
|
|
15468
|
-
openLabel: "Hide pairing",
|
|
15453
|
+
closedLabel: "Show pairing command",
|
|
15454
|
+
openLabel: "Hide pairing command",
|
|
15469
15455
|
contentId: "syncPairing",
|
|
15470
15456
|
contentClassName: "pairing-card",
|
|
15471
15457
|
contentHost,
|
|
@@ -16166,7 +16152,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
16166
16152
|
const peerCount = Object.keys(peers).length;
|
|
16167
16153
|
const syncNoPeers = !syncDisabled && peerCount === 0;
|
|
16168
16154
|
if (syncMeta) {
|
|
16169
|
-
const parts = syncDisabled ? ["Advanced sync is off on this device", "Turn on sync in Settings → Device Sync when you want pairing payloads, peer status, and recent attempt details here"] : syncNoPeers ? ["Advanced sync is ready but idle", "Use Show pairing to connect another device, then this panel will start showing live peer status and recent attempts"] : [
|
|
16155
|
+
const parts = syncDisabled ? ["Advanced sync is off on this device", "Turn on sync in Settings → Device Sync when you want pairing payloads, peer status, and recent attempt details here"] : syncNoPeers ? ["Advanced sync is ready but idle", "Use Show pairing command under People & devices to connect another device, then this panel will start showing live peer status and recent attempts"] : [
|
|
16170
16156
|
`Advanced state: ${daemonStateLabel}`,
|
|
16171
16157
|
`Peers: ${peerCount}`,
|
|
16172
16158
|
lastSync ? `Last sync: ${formatAgeShort(secondsSince(lastSync))} ago` : "Last sync: never"
|
|
@@ -17096,7 +17082,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
17096
17082
|
const syncStatus = state.lastSyncStatus;
|
|
17097
17083
|
const syncDisabled = syncStatus?.daemon_state === "disabled" || syncStatus?.enabled === false;
|
|
17098
17084
|
if (!props.peers.length) return /* @__PURE__ */ u(k$3, { children: [/* @__PURE__ */ u(SyncInlineFeedback, { feedback: sectionFeedback }), /* @__PURE__ */ u(SyncEmptyState, {
|
|
17099
|
-
detail: syncDisabled ? "Turn on sync in Settings → Device Sync first, then use Show pairing
|
|
17085
|
+
detail: syncDisabled ? "Turn on sync in Settings → Device Sync first, then use Show pairing command under Connect another device to connect another device." : "Use Show pairing command under Connect another device, run the command on the other device, then come back here to name it and decide who it belongs to.",
|
|
17100
17086
|
title: "No devices connected here yet."
|
|
17101
17087
|
})] });
|
|
17102
17088
|
return /* @__PURE__ */ u(k$3, { children: [/* @__PURE__ */ u(SyncInlineFeedback, { feedback: sectionFeedback }), props.peers.map((peer) => {
|
|
@@ -18716,7 +18702,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
18716
18702
|
try {
|
|
18717
18703
|
const runtime = await loadRuntimeInfo();
|
|
18718
18704
|
if (!runtime?.version) return;
|
|
18719
|
-
setRuntimeLabel(runtime.version, "
|
|
18705
|
+
setRuntimeLabel(runtime.version, "80517a4");
|
|
18720
18706
|
} catch {}
|
|
18721
18707
|
}
|
|
18722
18708
|
var lastAnnouncedRefreshState = null;
|
package/static/index.html
CHANGED
|
@@ -968,12 +968,14 @@
|
|
|
968
968
|
|
|
969
969
|
.feed-controls {
|
|
970
970
|
display: flex;
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
gap: var(--sp-
|
|
974
|
-
flex-wrap: wrap;
|
|
971
|
+
flex-direction: column;
|
|
972
|
+
align-items: stretch;
|
|
973
|
+
gap: var(--sp-2);
|
|
975
974
|
margin-bottom: var(--sp-4);
|
|
976
975
|
}
|
|
976
|
+
.feed-controls > .section-meta {
|
|
977
|
+
margin-bottom: 0;
|
|
978
|
+
}
|
|
977
979
|
|
|
978
980
|
.feed-controls-right {
|
|
979
981
|
display: flex;
|
|
@@ -3092,6 +3094,13 @@
|
|
|
3092
3094
|
<div class="sync-skeleton-block"></div>
|
|
3093
3095
|
</div>
|
|
3094
3096
|
|
|
3097
|
+
<h3 class="settings-group-title" style="margin-top: 20px">Connect another device</h3>
|
|
3098
|
+
<div class="section-meta">Share this command on the new device to join it to the team.</div>
|
|
3099
|
+
<div class="actor-create-row">
|
|
3100
|
+
<div id="syncPairingDisclosureMount" style="display: contents"></div>
|
|
3101
|
+
</div>
|
|
3102
|
+
<div id="syncPairingPanelMount" style="display: contents"></div>
|
|
3103
|
+
|
|
3095
3104
|
<div id="syncSharingReview" hidden>
|
|
3096
3105
|
<h3 class="settings-group-title" style="margin-top: 20px">What teammates will receive</h3>
|
|
3097
3106
|
<div class="section-meta" id="syncSharingReviewMeta"></div>
|
|
@@ -3109,19 +3118,18 @@
|
|
|
3109
3118
|
</div>
|
|
3110
3119
|
</div>
|
|
3111
3120
|
|
|
3112
|
-
<!-- 3. Advanced diagnostics — status,
|
|
3121
|
+
<!-- 3. Advanced diagnostics — status, attempts -->
|
|
3113
3122
|
<div class="card" style="animation-delay: 0.06s">
|
|
3114
3123
|
<div class="section-header">
|
|
3115
3124
|
<h2>Advanced diagnostics</h2>
|
|
3116
3125
|
<div class="section-actions">
|
|
3117
|
-
<div id="syncPairingDisclosureMount" style="display: contents"></div>
|
|
3118
3126
|
<label class="small sync-redact-control">
|
|
3119
3127
|
<span id="syncRedactMount"></span>
|
|
3120
3128
|
<span id="syncRedactLabel">Redact</span>
|
|
3121
3129
|
</label>
|
|
3122
3130
|
</div>
|
|
3123
3131
|
</div>
|
|
3124
|
-
<div class="section-meta" id="syncMeta">Use this section for sync debugging
|
|
3132
|
+
<div class="section-meta" id="syncMeta">Use this section for sync debugging and recent attempt details.</div>
|
|
3125
3133
|
<div class="sync-skeleton" id="syncDiagSkeleton" role="status" aria-label="Loading diagnostics">
|
|
3126
3134
|
<div class="sync-skeleton-line long"></div>
|
|
3127
3135
|
<div class="sync-skeleton-line medium"></div>
|
|
@@ -3130,8 +3138,6 @@
|
|
|
3130
3138
|
<div class="sync-actions" id="syncActions"></div>
|
|
3131
3139
|
<div class="grid-2" id="syncStatusGrid"></div>
|
|
3132
3140
|
|
|
3133
|
-
<div id="syncPairingPanelMount" style="display: contents"></div>
|
|
3134
|
-
|
|
3135
3141
|
<h3 class="settings-group-title" style="margin-top: 20px">Recent sync attempts (advanced)</h3>
|
|
3136
3142
|
<div class="attempts-list" id="syncAttempts"></div>
|
|
3137
3143
|
</div>
|