@adhdev/daemon-core 0.9.82-rc.482 → 0.9.82-rc.484
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/commands/cli-manager.d.ts +20 -0
- package/dist/config/mesh-config.d.ts +19 -1
- package/dist/index.js +398 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +398 -19
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/contracts.d.ts +27 -4
- package/dist/mesh/mesh-events-pending.d.ts +12 -0
- package/dist/mesh/mesh-runtime-store.d.ts +14 -0
- package/dist/mesh/mesh-work-queue.d.ts +17 -0
- package/dist/providers/cli-provider-instance.d.ts +14 -0
- package/dist/providers/contracts.d.ts +47 -0
- package/dist/repo-mesh-types.d.ts +11 -2
- package/dist/shared-types.d.ts +4 -0
- package/package.json +3 -3
- package/src/commands/cli-manager.ts +64 -3
- package/src/commands/low-family/coordinator-prompt.ts +53 -0
- package/src/commands/med-family/mesh-crud.ts +35 -0
- package/src/config/mesh-config.ts +42 -1
- package/src/mesh/contracts.ts +42 -7
- package/src/mesh/coordinator-prompt.ts +55 -0
- package/src/mesh/mesh-events-pending.ts +54 -0
- package/src/mesh/mesh-queue-assignment.ts +46 -4
- package/src/mesh/mesh-reconcile-loop.ts +69 -1
- package/src/mesh/mesh-runtime-store.ts +22 -0
- package/src/mesh/mesh-work-queue.ts +36 -3
- package/src/providers/cli-provider-instance.ts +46 -0
- package/src/providers/contracts.ts +47 -0
- package/src/providers/provider-schema.ts +6 -0
- package/src/providers/sdk/v1/schemas/cli/provider.schema.json +29 -0
- package/src/repo-mesh-types.ts +11 -2
- package/src/shared-types.ts +4 -0
- package/src/status/snapshot.ts +4 -0
|
@@ -604,6 +604,53 @@ export interface ProviderModule {
|
|
|
604
604
|
* request never fails a launch). Absent → no launch-time model selection for CLI.
|
|
605
605
|
*/
|
|
606
606
|
modelLaunchArgs?: string[];
|
|
607
|
+
/**
|
|
608
|
+
* BRAIN-ROUTING (model axis): suggested model values for this provider, surfaced
|
|
609
|
+
* as dropdown options in the new-session dialog (e.g. claude ['opus','sonnet',
|
|
610
|
+
* 'haiku']; codex ['gpt-5.5','gpt-5-codex']). Advisory only — the UI allows free
|
|
611
|
+
* text too, so the list going stale never blocks a model the provider accepts.
|
|
612
|
+
*/
|
|
613
|
+
modelOptions?: string[];
|
|
614
|
+
/**
|
|
615
|
+
* BRAIN-ROUTING (thinking axis): template for expanding an `initialThinkingLevel`
|
|
616
|
+
* selection into launch args for a CLI provider, parallel to modelLaunchArgs.
|
|
617
|
+
* `{{level}}` is substituted with the provider-appropriate reasoning-effort value
|
|
618
|
+
* (already mapped from the standard low|medium|high level, see thinkingLevelMap).
|
|
619
|
+
* Examples: claude-cli `['--effort', '{{level}}']` → `--effort high`; codex-cli
|
|
620
|
+
* `['-c', 'model_reasoning_effort={{level}}']`. Applied at session launch when
|
|
621
|
+
* `initialThinkingLevel` is passed AND this provider is a plain CLI. A CLI provider
|
|
622
|
+
* with no template silently ignores the thinking level (best-effort; never fails a
|
|
623
|
+
* launch). ACP providers instead route thinking through setConfigOption('thought_level').
|
|
624
|
+
*/
|
|
625
|
+
thinkingLaunchArgs?: string[];
|
|
626
|
+
/**
|
|
627
|
+
* BRAIN-ROUTING (thinking axis): optional per-provider mapping from the standard
|
|
628
|
+
* thinking levels (`low`|`medium`|`high`) to this provider's own reasoning-effort
|
|
629
|
+
* vocabulary, used to fill `{{level}}` in thinkingLaunchArgs. e.g. claude-cli might
|
|
630
|
+
* map `{ high: 'max' }`; codex-cli `{ high: 'xhigh' }`. A level absent from the map
|
|
631
|
+
* passes through unchanged (so `medium` → `medium` by default).
|
|
632
|
+
*/
|
|
633
|
+
thinkingLevelMap?: Partial<Record<'low' | 'medium' | 'high', string>>;
|
|
634
|
+
/**
|
|
635
|
+
* BRAIN-ROUTING (thinking axis): the reasoning-effort values this provider actually
|
|
636
|
+
* accepts, surfaced as the thinking-level dropdown options in the new-session
|
|
637
|
+
* dialog (e.g. claude ['low','medium','high','max']; codex ['minimal','low',
|
|
638
|
+
* 'medium','high','xhigh']). Absent → the UI falls back to the standard
|
|
639
|
+
* low/medium/high. These are the provider's OWN vocabulary and are passed through
|
|
640
|
+
* verbatim as initialThinkingLevel (not remapped by thinkingLevelMap, which only
|
|
641
|
+
* translates the mesh's standard low/medium/high presets).
|
|
642
|
+
*/
|
|
643
|
+
thinkingLevelOptions?: string[];
|
|
644
|
+
/**
|
|
645
|
+
* BRAIN-ROUTING (thinking axis, runtime-control providers): the `controls[].id`
|
|
646
|
+
* of a runtime reasoning-effort control to drive for the thinking level when the
|
|
647
|
+
* provider has no `thinkingLaunchArgs` (e.g. hermes-cli's `reasoning` select,
|
|
648
|
+
* which types `/reasoning <level>` into the PTY via its setScript). At launch,
|
|
649
|
+
* initialThinkingLevel (after thinkingLevelMap) is applied by invoking that
|
|
650
|
+
* control's setScript with `{ value: <level> }`. Ignored if the id doesn't match a
|
|
651
|
+
* control. Providers that use thinkingLaunchArgs don't need this.
|
|
652
|
+
*/
|
|
653
|
+
thinkingControlId?: string;
|
|
607
654
|
/** Delay before submitting typed CLI input (provider-specific TUI tuning) */
|
|
608
655
|
sendDelayMs?: number;
|
|
609
656
|
/** Submit key used after typing into CLI PTY (default: carriage return) */
|
|
@@ -66,6 +66,12 @@ const KNOWN_PROVIDER_FIELDS = new Set<string>([
|
|
|
66
66
|
'providerVersion',
|
|
67
67
|
'status',
|
|
68
68
|
'details',
|
|
69
|
+
'modelLaunchArgs',
|
|
70
|
+
'modelOptions',
|
|
71
|
+
'thinkingLaunchArgs',
|
|
72
|
+
'thinkingLevelMap',
|
|
73
|
+
'thinkingLevelOptions',
|
|
74
|
+
'thinkingControlId',
|
|
69
75
|
'sendDelayMs',
|
|
70
76
|
'sendKey',
|
|
71
77
|
'submitStrategy',
|
|
@@ -129,6 +129,35 @@
|
|
|
129
129
|
"items": { "type": "string" },
|
|
130
130
|
"description": "Template for expanding an initialModel selection into launch args. '{{model}}' is substituted with the model string (e.g. ['--model', '{{model}}'] → --model opus). Applied at launch when a model is requested for this CLI provider (MAGI kind-panel model axis). Absent → no launch-time model selection."
|
|
131
131
|
},
|
|
132
|
+
"modelOptions": {
|
|
133
|
+
"type": "array",
|
|
134
|
+
"items": { "type": "string" },
|
|
135
|
+
"description": "Suggested model values shown as dropdown options in the new-session dialog (brain-routing model axis), e.g. ['opus','sonnet','haiku']. Advisory — the UI still accepts free text, so a stale list never blocks an accepted model."
|
|
136
|
+
},
|
|
137
|
+
"thinkingLaunchArgs": {
|
|
138
|
+
"type": "array",
|
|
139
|
+
"items": { "type": "string" },
|
|
140
|
+
"description": "Template for expanding an initialThinkingLevel selection into launch args (brain-routing thinking axis, parallel to modelLaunchArgs). '{{level}}' is substituted with the provider-mapped reasoning-effort value (e.g. ['--effort', '{{level}}'] → --effort high; ['-c', 'model_reasoning_effort={{level}}']). Applied at launch when a thinking level is requested. Absent → no launch-time thinking selection."
|
|
141
|
+
},
|
|
142
|
+
"thinkingLevelMap": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"properties": {
|
|
145
|
+
"low": { "type": "string" },
|
|
146
|
+
"medium": { "type": "string" },
|
|
147
|
+
"high": { "type": "string" }
|
|
148
|
+
},
|
|
149
|
+
"additionalProperties": false,
|
|
150
|
+
"description": "Optional map from the standard thinking levels (low/medium/high) to this provider's own reasoning-effort vocabulary, used to fill {{level}} in thinkingLaunchArgs. A level absent from the map passes through unchanged."
|
|
151
|
+
},
|
|
152
|
+
"thinkingLevelOptions": {
|
|
153
|
+
"type": "array",
|
|
154
|
+
"items": { "type": "string" },
|
|
155
|
+
"description": "Reasoning-effort values this provider accepts, shown as the thinking-level dropdown in the new-session dialog (e.g. ['low','medium','high','max']). Absent → the UI falls back to standard low/medium/high. Provider's own vocabulary, passed through verbatim."
|
|
156
|
+
},
|
|
157
|
+
"thinkingControlId": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"description": "For a provider with no thinkingLaunchArgs but a runtime reasoning-effort control (e.g. hermes 'reasoning'), the controls[].id to drive at launch for the thinking level. The control's setScript is invoked with { value: <mapped level> }."
|
|
160
|
+
},
|
|
132
161
|
"scriptCallBudgetMs": {
|
|
133
162
|
"type": "integer",
|
|
134
163
|
"minimum": 1,
|
package/src/repo-mesh-types.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
import type { GitRepoStatus, GitCompactSummary } from './git/git-types.js';
|
|
15
15
|
import type { MeshMissionSummary, MeshMissionSlimSummary } from './mesh/mesh-missions.js';
|
|
16
16
|
import type { MeshMagiActivitySummary } from './mesh/mesh-magi-status.js';
|
|
17
|
-
import type { MagiKindPanelMap } from '@adhdev/mesh-shared';
|
|
17
|
+
import type { MagiKindPanelMap, DifficultyBrainMap } from '@adhdev/mesh-shared';
|
|
18
18
|
|
|
19
19
|
// ─── Core Mesh Types ────────────────────────────
|
|
20
20
|
|
|
@@ -527,7 +527,7 @@ const DIRTY_WORKSPACE_BEHAVIORS = new Set<RepoMeshPolicy['dirtyWorkspaceBehavior
|
|
|
527
527
|
|
|
528
528
|
/** Min/max bounds for the global write-task parallel cap. */
|
|
529
529
|
export const MESH_MAX_PARALLEL_TASKS_MIN = 1;
|
|
530
|
-
export const MESH_MAX_PARALLEL_TASKS_MAX =
|
|
530
|
+
export const MESH_MAX_PARALLEL_TASKS_MAX = 64;
|
|
531
531
|
|
|
532
532
|
/**
|
|
533
533
|
* Default multiplier applied to the write cap to derive the read-only diagnosis
|
|
@@ -822,6 +822,15 @@ export interface LocalMeshConfig {
|
|
|
822
822
|
* Optional; absent on pre-feature configs.
|
|
823
823
|
*/
|
|
824
824
|
magiKindPanels?: MagiKindPanelMap;
|
|
825
|
+
/**
|
|
826
|
+
* BRAIN-ROUTING: per-task-difficulty brain presets (machine-local), sibling of
|
|
827
|
+
* magiKindPanels. Keyed by difficulty (easy / medium / difficult / freeform);
|
|
828
|
+
* each maps to a BrainSlot (provider? / model? / thinkingLevel?). The coordinator
|
|
829
|
+
* classifies a task's difficulty at enqueue; the matching preset fills in the
|
|
830
|
+
* task's model / thinking level (an explicit task value wins). Optional; a mesh
|
|
831
|
+
* with none seeded uses DEFAULT_DIFFICULTY_BRAINS on first read.
|
|
832
|
+
*/
|
|
833
|
+
difficultyBrains?: DifficultyBrainMap;
|
|
825
834
|
}
|
|
826
835
|
|
|
827
836
|
export interface LocalMeshEntry {
|
package/src/shared-types.ts
CHANGED
|
@@ -555,6 +555,10 @@ export interface AvailableProviderInfo {
|
|
|
555
555
|
lastVerification?: MachineProviderCheckResult;
|
|
556
556
|
/** Provider-declared Repo Mesh coordinator/MCP behavior. */
|
|
557
557
|
meshCoordinator?: ProviderMeshCoordinatorConfig;
|
|
558
|
+
/** BRAIN-ROUTING: suggested model values for the new-session model dropdown. */
|
|
559
|
+
modelOptions?: string[];
|
|
560
|
+
/** BRAIN-ROUTING: reasoning-effort values for the new-session thinking dropdown. */
|
|
561
|
+
thinkingLevelOptions?: string[];
|
|
558
562
|
/**
|
|
559
563
|
* Provider trust classification — derived from the on-disk layer the
|
|
560
564
|
* manifest came from and the shape of the manifest. Dashboards use
|
package/src/status/snapshot.ts
CHANGED
|
@@ -153,6 +153,8 @@ function buildAvailableProviders(
|
|
|
153
153
|
status?: string;
|
|
154
154
|
details?: string;
|
|
155
155
|
links?: Record<string, string>;
|
|
156
|
+
modelOptions?: string[];
|
|
157
|
+
thinkingLevelOptions?: string[];
|
|
156
158
|
}> = providerLoader.getAvailableProviderInfos?.() || providerLoader.getAll();
|
|
157
159
|
// Trust helpers come from daemon-core; resolve them lazily so the
|
|
158
160
|
// status snapshot path stays loadable in older bundles that don't
|
|
@@ -189,6 +191,8 @@ function buildAvailableProviders(
|
|
|
189
191
|
...(sourceLayer ? { sourceLayer } : {}),
|
|
190
192
|
...(sourceName ? { sourceName } : {}),
|
|
191
193
|
...(provider.providerVersion ? { providerVersion: provider.providerVersion } : {}),
|
|
194
|
+
...(Array.isArray(provider.modelOptions) && provider.modelOptions.length ? { modelOptions: provider.modelOptions } : {}),
|
|
195
|
+
...(Array.isArray(provider.thinkingLevelOptions) && provider.thinkingLevelOptions.length ? { thinkingLevelOptions: provider.thinkingLevelOptions } : {}),
|
|
192
196
|
...(provider.binary ? { binary: provider.binary } : {}),
|
|
193
197
|
...(provider.status ? { status: provider.status } : {}),
|
|
194
198
|
...(provider.details ? { details: provider.details } : {}),
|