@adhdev/daemon-core 0.9.82-rc.436 → 0.9.82-rc.438
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/config/mesh-config.d.ts +21 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +156 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +151 -8
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/mesh-work-queue.d.ts +10 -0
- package/dist/providers/contracts.d.ts +10 -0
- package/dist/repo-mesh-types.d.ts +9 -1
- package/package.json +2 -2
- package/src/commands/cli-manager.ts +28 -1
- package/src/commands/med-family/mesh-crud.ts +42 -0
- package/src/config/mesh-config.ts +99 -1
- package/src/index.ts +1 -0
- package/src/mesh/mesh-queue-assignment.ts +6 -0
- package/src/mesh/mesh-work-queue.ts +11 -0
- package/src/providers/contracts.ts +10 -0
- package/src/providers/sdk/v1/schemas/cli/provider.schema.json +5 -0
- package/src/repo-mesh-types.ts +9 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* uses this file as the single source of truth.
|
|
7
7
|
*/
|
|
8
8
|
import type { LocalMeshEntry, LocalMeshNodeEntry, RepoMeshPolicy, RepoMeshNodePolicy, RepoMeshNodeCapabilities, RepoMeshCoordinatorConfig, RepoMeshHostMetadata, RepoMeshDaemonRole } from '../repo-mesh-types.js';
|
|
9
|
-
import type { MagiPanel } from '@adhdev/mesh-shared';
|
|
9
|
+
import type { MagiPanel, MagiKindPanelMap, MagiSlot } from '@adhdev/mesh-shared';
|
|
10
10
|
/**
|
|
11
11
|
* Normalize a Git remote URL into a stable identity string.
|
|
12
12
|
* e.g. "git@github.com:user/repo.git" → "github.com/user/repo"
|
|
@@ -148,3 +148,23 @@ export declare function upsertMagiPanel(name: string, config: unknown, opts?: {
|
|
|
148
148
|
}): MagiPanel;
|
|
149
149
|
/** Remove a named panel. Returns true when a panel was removed. */
|
|
150
150
|
export declare function removeMagiPanel(name: string): boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Validate + normalize a kind-panel's slots. Mirrors normalizeMagiPanel's member
|
|
153
|
+
* normalization: provider required per slot, trims strings, drops empties, clamps
|
|
154
|
+
* replica counts, and additionally carries an optional per-slot `model`. Throws on
|
|
155
|
+
* structurally invalid input (empty list / no provider) so the write returns a clear
|
|
156
|
+
* error. Returns the normalized slot array.
|
|
157
|
+
*/
|
|
158
|
+
export declare function normalizeMagiSlots(slots: unknown): MagiSlot[];
|
|
159
|
+
/** All configured kind-panels (machine-local), keyed by task_kind. Empty when none. */
|
|
160
|
+
export declare function listMagiKindPanels(): MagiKindPanelMap;
|
|
161
|
+
/** The slot list for one task_kind, or undefined when the kind is not configured. */
|
|
162
|
+
export declare function getMagiKindPanel(kind: string): MagiSlot[] | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* Upsert the slot list for one task_kind. Unlike named panels this ALWAYS overwrites
|
|
165
|
+
* (a kind has exactly one binding) — the editor pushes the full desired slot set.
|
|
166
|
+
* Returns the normalized, persisted slots.
|
|
167
|
+
*/
|
|
168
|
+
export declare function setMagiKindPanel(kind: string, slots: unknown): MagiSlot[];
|
|
169
|
+
/** Remove the binding for one task_kind. Returns true when a binding was removed. */
|
|
170
|
+
export declare function removeMagiKindPanel(kind: string): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export { appendRecentActivity, getRecentActivity } from './config/recent-activit
|
|
|
28
28
|
export type { RecentActivityEntry } from './config/recent-activity.js';
|
|
29
29
|
export { getSavedProviderSessions, upsertSavedProviderSession } from './config/saved-sessions.js';
|
|
30
30
|
export type { SavedProviderSessionEntry } from './config/saved-sessions.js';
|
|
31
|
-
export { listMeshes, getMesh, getMeshByRepo, createMesh, updateMesh, deleteMesh, addNode, removeNode, updateNode, normalizeRepoIdentity, listMagiPanels, getMagiPanel, upsertMagiPanel, removeMagiPanel, normalizeMagiPanel, } from './config/mesh-config.js';
|
|
31
|
+
export { listMeshes, getMesh, getMeshByRepo, createMesh, updateMesh, deleteMesh, addNode, removeNode, updateNode, normalizeRepoIdentity, listMagiPanels, getMagiPanel, upsertMagiPanel, removeMagiPanel, normalizeMagiPanel, listMagiKindPanels, getMagiKindPanel, setMagiKindPanel, removeMagiKindPanel, normalizeMagiSlots, } from './config/mesh-config.js';
|
|
32
32
|
export type { CreateMeshOptions, UpdateMeshOptions, AddNodeOptions } from './config/mesh-config.js';
|
|
33
33
|
export type { MagiPanel, MagiPanelMember, MagiPanelMap, MagiMode, MagiTaskKind, MagiPanelDefaultKind, MagiClaim, MagiClaimStance, MagiAgentResponse, MagiResponseSource, MagiReplicaGitRef, MagiGitSkew, MagiSynthesizedResponse, MagiClusterCategory, MagiClusterMember, MagiClaimCluster, MagiSynthesis, } from '@adhdev/mesh-shared';
|
|
34
34
|
export { MAGI_RAW_ANSWER_CAP } from '@adhdev/mesh-shared';
|
package/dist/index.js
CHANGED
|
@@ -409,10 +409,10 @@ function readInjected(value) {
|
|
|
409
409
|
}
|
|
410
410
|
function getDaemonBuildInfo() {
|
|
411
411
|
if (cached) return cached;
|
|
412
|
-
const commit = readInjected(true ? "
|
|
413
|
-
const commitShort = readInjected(true ? "
|
|
414
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
415
|
-
const builtAt = readInjected(true ? "2026-
|
|
412
|
+
const commit = readInjected(true ? "84f8b9ff2e41b3bbf8375a9e4594c0ec33905b6e" : void 0) ?? "unknown";
|
|
413
|
+
const commitShort = readInjected(true ? "84f8b9ff" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
414
|
+
const version = readInjected(true ? "0.9.82-rc.438" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
415
|
+
const builtAt = readInjected(true ? "2026-07-01T02:03:18.523Z" : void 0);
|
|
416
416
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
417
417
|
return cached;
|
|
418
418
|
}
|
|
@@ -2863,16 +2863,21 @@ __export(mesh_config_exports, {
|
|
|
2863
2863
|
createMesh: () => createMesh,
|
|
2864
2864
|
createMeshHostPairingToken: () => createMeshHostPairingToken,
|
|
2865
2865
|
deleteMesh: () => deleteMesh,
|
|
2866
|
+
getMagiKindPanel: () => getMagiKindPanel,
|
|
2866
2867
|
getMagiPanel: () => getMagiPanel,
|
|
2867
2868
|
getMesh: () => getMesh,
|
|
2868
2869
|
getMeshByRepo: () => getMeshByRepo,
|
|
2870
|
+
listMagiKindPanels: () => listMagiKindPanels,
|
|
2869
2871
|
listMagiPanels: () => listMagiPanels,
|
|
2870
2872
|
listMeshes: () => listMeshes,
|
|
2871
2873
|
markMeshHostPairingJoined: () => markMeshHostPairingJoined,
|
|
2872
2874
|
normalizeMagiPanel: () => normalizeMagiPanel,
|
|
2875
|
+
normalizeMagiSlots: () => normalizeMagiSlots,
|
|
2873
2876
|
normalizeRepoIdentity: () => normalizeRepoIdentity,
|
|
2877
|
+
removeMagiKindPanel: () => removeMagiKindPanel,
|
|
2874
2878
|
removeMagiPanel: () => removeMagiPanel,
|
|
2875
2879
|
removeNode: () => removeNode,
|
|
2880
|
+
setMagiKindPanel: () => setMagiKindPanel,
|
|
2876
2881
|
tokenIdForManualPairing: () => tokenIdForManualPairing,
|
|
2877
2882
|
updateMesh: () => updateMesh,
|
|
2878
2883
|
updateNode: () => updateNode,
|
|
@@ -3288,11 +3293,13 @@ function normalizeMagiPanel(config) {
|
|
|
3288
3293
|
throw new Error(`invalid_magi_panel: member[${idx}].provider is required`);
|
|
3289
3294
|
}
|
|
3290
3295
|
const nodeId = typeof m.nodeId === "string" && m.nodeId.trim() ? m.nodeId.trim() : void 0;
|
|
3296
|
+
const model = typeof m.model === "string" && m.model.trim() ? m.model.trim() : void 0;
|
|
3291
3297
|
const capabilityTags = normalizeCapabilityTags(m.capabilityTags);
|
|
3292
3298
|
const n = normalizeReplicaCount(m.n);
|
|
3293
3299
|
return {
|
|
3294
3300
|
provider,
|
|
3295
3301
|
...nodeId ? { nodeId } : {},
|
|
3302
|
+
...model ? { model } : {},
|
|
3296
3303
|
...capabilityTags ? { capabilityTags } : {},
|
|
3297
3304
|
...n !== void 0 ? { n } : {}
|
|
3298
3305
|
};
|
|
@@ -3345,7 +3352,78 @@ function removeMagiPanel(name) {
|
|
|
3345
3352
|
saveMeshConfig(stored);
|
|
3346
3353
|
return true;
|
|
3347
3354
|
}
|
|
3348
|
-
|
|
3355
|
+
function normalizeMagiTaskKindKey(raw) {
|
|
3356
|
+
const s2 = typeof raw === "string" ? raw.trim().toLowerCase() : "";
|
|
3357
|
+
if (!MAGI_KIND_PANEL_KINDS.includes(s2)) {
|
|
3358
|
+
throw new Error(`invalid_magi_kind_panel: task_kind must be one of ${MAGI_KIND_PANEL_KINDS.join(" / ")} (got '${s2 || "(empty)"}')`);
|
|
3359
|
+
}
|
|
3360
|
+
return s2;
|
|
3361
|
+
}
|
|
3362
|
+
function normalizeMagiSlots(slots) {
|
|
3363
|
+
if (!Array.isArray(slots) || slots.length === 0) {
|
|
3364
|
+
throw new Error("invalid_magi_kind_panel: slots must be a non-empty array");
|
|
3365
|
+
}
|
|
3366
|
+
if (slots.length > MAX_MAGI_KIND_SLOTS) {
|
|
3367
|
+
throw new Error(`invalid_magi_kind_panel: too many slots (max ${MAX_MAGI_KIND_SLOTS})`);
|
|
3368
|
+
}
|
|
3369
|
+
return slots.map((entry, idx) => {
|
|
3370
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
|
|
3371
|
+
throw new Error(`invalid_magi_kind_panel: slot[${idx}] must be an object`);
|
|
3372
|
+
}
|
|
3373
|
+
const s2 = entry;
|
|
3374
|
+
const provider = typeof s2.provider === "string" ? s2.provider.trim() : "";
|
|
3375
|
+
if (!provider) {
|
|
3376
|
+
throw new Error(`invalid_magi_kind_panel: slot[${idx}].provider is required`);
|
|
3377
|
+
}
|
|
3378
|
+
const nodeId = typeof s2.nodeId === "string" && s2.nodeId.trim() ? s2.nodeId.trim() : void 0;
|
|
3379
|
+
const model = typeof s2.model === "string" && s2.model.trim() ? s2.model.trim() : void 0;
|
|
3380
|
+
const capabilityTags = normalizeCapabilityTags(s2.capabilityTags);
|
|
3381
|
+
const n = normalizeReplicaCount(s2.n);
|
|
3382
|
+
return {
|
|
3383
|
+
provider,
|
|
3384
|
+
...nodeId ? { nodeId } : {},
|
|
3385
|
+
...model ? { model } : {},
|
|
3386
|
+
...capabilityTags ? { capabilityTags } : {},
|
|
3387
|
+
...n !== void 0 ? { n } : {}
|
|
3388
|
+
};
|
|
3389
|
+
});
|
|
3390
|
+
}
|
|
3391
|
+
function listMagiKindPanels() {
|
|
3392
|
+
return loadMeshConfig().magiKindPanels ?? {};
|
|
3393
|
+
}
|
|
3394
|
+
function getMagiKindPanel(kind) {
|
|
3395
|
+
let key2;
|
|
3396
|
+
try {
|
|
3397
|
+
key2 = normalizeMagiTaskKindKey(kind);
|
|
3398
|
+
} catch {
|
|
3399
|
+
return void 0;
|
|
3400
|
+
}
|
|
3401
|
+
return loadMeshConfig().magiKindPanels?.[key2];
|
|
3402
|
+
}
|
|
3403
|
+
function setMagiKindPanel(kind, slots) {
|
|
3404
|
+
const key2 = normalizeMagiTaskKindKey(kind);
|
|
3405
|
+
const normalized = normalizeMagiSlots(slots);
|
|
3406
|
+
const stored = loadMeshConfig();
|
|
3407
|
+
const map = stored.magiKindPanels ?? {};
|
|
3408
|
+
map[key2] = normalized;
|
|
3409
|
+
stored.magiKindPanels = map;
|
|
3410
|
+
saveMeshConfig(stored);
|
|
3411
|
+
return normalized;
|
|
3412
|
+
}
|
|
3413
|
+
function removeMagiKindPanel(kind) {
|
|
3414
|
+
let key2;
|
|
3415
|
+
try {
|
|
3416
|
+
key2 = normalizeMagiTaskKindKey(kind);
|
|
3417
|
+
} catch {
|
|
3418
|
+
return false;
|
|
3419
|
+
}
|
|
3420
|
+
const stored = loadMeshConfig();
|
|
3421
|
+
if (!stored.magiKindPanels || !stored.magiKindPanels[key2]) return false;
|
|
3422
|
+
delete stored.magiKindPanels[key2];
|
|
3423
|
+
saveMeshConfig(stored);
|
|
3424
|
+
return true;
|
|
3425
|
+
}
|
|
3426
|
+
var import_fs3, import_path3, import_crypto3, mergeMeshPolicy, MAX_MAGI_PANEL_MEMBERS, MAGI_KIND_PANEL_KINDS, MAX_MAGI_KIND_SLOTS;
|
|
3349
3427
|
var init_mesh_config = __esm({
|
|
3350
3428
|
"src/config/mesh-config.ts"() {
|
|
3351
3429
|
"use strict";
|
|
@@ -3358,6 +3436,8 @@ var init_mesh_config = __esm({
|
|
|
3358
3436
|
init_mesh_host_ownership();
|
|
3359
3437
|
mergeMeshPolicy = mergeAndNormalizePolicy;
|
|
3360
3438
|
MAX_MAGI_PANEL_MEMBERS = 24;
|
|
3439
|
+
MAGI_KIND_PANEL_KINDS = ["claim_audit", "rca", "design", "freeform"];
|
|
3440
|
+
MAX_MAGI_KIND_SLOTS = 24;
|
|
3361
3441
|
}
|
|
3362
3442
|
});
|
|
3363
3443
|
|
|
@@ -5278,6 +5358,7 @@ function enqueueTask(meshId, message, opts) {
|
|
|
5278
5358
|
...dependsOn.length > 0 ? { dependsOn } : {},
|
|
5279
5359
|
...typeof opts?.missionId === "string" && opts.missionId.trim() ? { missionId: opts.missionId.trim() } : {},
|
|
5280
5360
|
...typeof opts?.consensusGroupId === "string" && opts.consensusGroupId.trim() ? { consensusGroupId: opts.consensusGroupId.trim() } : {},
|
|
5361
|
+
...typeof opts?.model === "string" && opts.model.trim() ? { model: opts.model.trim() } : {},
|
|
5281
5362
|
...typeof opts?.sourceCoordinatorSessionId === "string" && opts.sourceCoordinatorSessionId.trim() ? { sourceCoordinatorSessionId: opts.sourceCoordinatorSessionId.trim() } : {},
|
|
5282
5363
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5283
5364
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -12977,7 +13058,10 @@ async function maybeAutoLaunchOneQueueSession(components, meshId, mesh) {
|
|
|
12977
13058
|
launchResult2 = await components.dispatchMeshCommand(launchTarget.daemonId, "launch_cli", {
|
|
12978
13059
|
cliType: resolved.providerType,
|
|
12979
13060
|
dir: node.workspace,
|
|
12980
|
-
settings: remoteSettings
|
|
13061
|
+
settings: remoteSettings,
|
|
13062
|
+
// MAGI-KIND-PANEL model axis: forward the task's model override so the
|
|
13063
|
+
// remote worker session launches with it (initialModel). Best-effort.
|
|
13064
|
+
...typeof task.model === "string" && task.model.trim() ? { initialModel: task.model.trim() } : {}
|
|
12981
13065
|
});
|
|
12982
13066
|
} catch (e) {
|
|
12983
13067
|
markAutoLaunch(meshId, task.id, { status: "failed", reason: `remote_launch_dispatch_failed: ${e?.message || String(e)}`, nodeId, providerType: resolved.providerType });
|
|
@@ -13003,7 +13087,10 @@ async function maybeAutoLaunchOneQueueSession(components, meshId, mesh) {
|
|
|
13003
13087
|
const launchResult = await components.cliManager.handleCliCommand("launch_cli", {
|
|
13004
13088
|
cliType: resolved.providerType,
|
|
13005
13089
|
dir: node.workspace,
|
|
13006
|
-
settings: launchSettings
|
|
13090
|
+
settings: launchSettings,
|
|
13091
|
+
// MAGI-KIND-PANEL model axis: local launch forwards the task's model
|
|
13092
|
+
// override as initialModel (CLI → modelLaunchArgs; ACP → setConfigOption).
|
|
13093
|
+
...typeof task.model === "string" && task.model.trim() ? { initialModel: task.model.trim() } : {}
|
|
13007
13094
|
});
|
|
13008
13095
|
if (!launchResult?.success) {
|
|
13009
13096
|
const reason = launchResult?.error || "launch_cli_failed";
|
|
@@ -18261,6 +18348,11 @@ var init_provider_schema = __esm({
|
|
|
18261
18348
|
minimum: 0,
|
|
18262
18349
|
description: "Delay between pasting prompt text and pressing Enter."
|
|
18263
18350
|
},
|
|
18351
|
+
modelLaunchArgs: {
|
|
18352
|
+
type: "array",
|
|
18353
|
+
items: { type: "string" },
|
|
18354
|
+
description: "Template for expanding an initialModel selection into launch args. '{{model}}' is substituted with the model string (e.g. ['--model', '{{model}}'] \u2192 --model opus). Applied at launch when a model is requested for this CLI provider (MAGI kind-panel model axis). Absent \u2192 no launch-time model selection."
|
|
18355
|
+
},
|
|
18264
18356
|
scriptCallBudgetMs: {
|
|
18265
18357
|
type: "integer",
|
|
18266
18358
|
minimum: 1,
|
|
@@ -23813,6 +23905,7 @@ __export(index_exports, {
|
|
|
23813
23905
|
getLedgerDir: () => getLedgerDir,
|
|
23814
23906
|
getLedgerSummary: () => getLedgerSummary,
|
|
23815
23907
|
getLogLevel: () => getLogLevel,
|
|
23908
|
+
getMagiKindPanel: () => getMagiKindPanel,
|
|
23816
23909
|
getMagiPanel: () => getMagiPanel,
|
|
23817
23910
|
getMesh: () => getMesh,
|
|
23818
23911
|
getMeshByRepo: () => getMeshByRepo,
|
|
@@ -23869,6 +23962,7 @@ __export(index_exports, {
|
|
|
23869
23962
|
launchWithCdp: () => launchWithCdp,
|
|
23870
23963
|
listCoordinatorsForWorkspace: () => listCoordinatorsForWorkspace,
|
|
23871
23964
|
listHostedCliRuntimes: () => listHostedCliRuntimes,
|
|
23965
|
+
listMagiKindPanels: () => listMagiKindPanels,
|
|
23872
23966
|
listMagiPanels: () => listMagiPanels,
|
|
23873
23967
|
listMeshMissionSummaries: () => listMeshMissionSummaries,
|
|
23874
23968
|
listMeshes: () => listMeshes,
|
|
@@ -23904,6 +23998,7 @@ __export(index_exports, {
|
|
|
23904
23998
|
normalizeInteractivePrompt: () => normalizeInteractivePrompt,
|
|
23905
23999
|
normalizeInteractivePromptResponse: () => normalizeInteractivePromptResponse,
|
|
23906
24000
|
normalizeMagiPanel: () => normalizeMagiPanel,
|
|
24001
|
+
normalizeMagiSlots: () => normalizeMagiSlots,
|
|
23907
24002
|
normalizeManagedStatus: () => normalizeManagedStatus,
|
|
23908
24003
|
normalizeMeshCapabilityTags: () => normalizeMeshCapabilityTags,
|
|
23909
24004
|
normalizeMeshDaemonRole: () => normalizeMeshDaemonRole,
|
|
@@ -23941,6 +24036,7 @@ __export(index_exports, {
|
|
|
23941
24036
|
recordMeshToolCall: () => recordMeshToolCall,
|
|
23942
24037
|
registerExtensionProviders: () => registerExtensionProviders,
|
|
23943
24038
|
registerMeshCoordinator: () => registerMeshCoordinator,
|
|
24039
|
+
removeMagiKindPanel: () => removeMagiKindPanel,
|
|
23944
24040
|
removeMagiPanel: () => removeMagiPanel,
|
|
23945
24041
|
removeNode: () => removeNode,
|
|
23946
24042
|
removeWorktree: () => removeWorktree,
|
|
@@ -23975,6 +24071,7 @@ __export(index_exports, {
|
|
|
23975
24071
|
saveState: () => saveState,
|
|
23976
24072
|
setDebugRuntimeConfig: () => setDebugRuntimeConfig,
|
|
23977
24073
|
setLogLevel: () => setLogLevel,
|
|
24074
|
+
setMagiKindPanel: () => setMagiKindPanel,
|
|
23978
24075
|
setupIdeInstance: () => setupIdeInstance,
|
|
23979
24076
|
shouldAutoRestoreHostedSessionsOnStartup: () => shouldAutoRestoreHostedSessionsOnStartup,
|
|
23980
24077
|
shouldCollectTraceCategory: () => shouldCollectTraceCategory,
|
|
@@ -44347,6 +44444,11 @@ function expandResumeArgs(template, sessionId) {
|
|
|
44347
44444
|
if (!Array.isArray(template) || template.length === 0) return void 0;
|
|
44348
44445
|
return template.map((part) => part === "{{id}}" ? sessionId : part);
|
|
44349
44446
|
}
|
|
44447
|
+
function expandModelLaunchArgs(template, model) {
|
|
44448
|
+
const m = typeof model === "string" ? model.trim() : "";
|
|
44449
|
+
if (!m || !Array.isArray(template) || template.length === 0) return void 0;
|
|
44450
|
+
return template.map((part) => part === "{{model}}" ? m : part);
|
|
44451
|
+
}
|
|
44350
44452
|
function readSubcommandSessionId(args, subcommands) {
|
|
44351
44453
|
const resumeIndex = args.findIndex((arg) => subcommands.includes(arg));
|
|
44352
44454
|
if (resumeIndex < 0) return void 0;
|
|
@@ -44739,7 +44841,12 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
44739
44841
|
if (provider) {
|
|
44740
44842
|
console.log(colorize("cyan", ` \u{1F4E6} Using provider: ${provider.name} (${provider.type})`));
|
|
44741
44843
|
}
|
|
44742
|
-
const
|
|
44844
|
+
const modelLaunchArgs = expandModelLaunchArgs(provider?.modelLaunchArgs, initialModel);
|
|
44845
|
+
const cliArgsWithModel = modelLaunchArgs ? [...modelLaunchArgs, ...cliArgs || []] : cliArgs;
|
|
44846
|
+
if (initialModel && !modelLaunchArgs) {
|
|
44847
|
+
LOG.warn("CLI", `[${normalizedType}] initialModel='${initialModel}' requested but provider declares no modelLaunchArgs template \u2014 launching without model selection.`);
|
|
44848
|
+
}
|
|
44849
|
+
const sessionBinding = resolveCliSessionBinding(provider, normalizedType, cliArgsWithModel, options?.resumeSessionId);
|
|
44743
44850
|
const resolvedCliArgs = sessionBinding.cliArgs;
|
|
44744
44851
|
const instanceManager = this.deps.getInstanceManager();
|
|
44745
44852
|
if (provider && instanceManager) {
|
|
@@ -49626,6 +49733,42 @@ var meshCrudHandlers = {
|
|
|
49626
49733
|
return { success: false, error: e.message };
|
|
49627
49734
|
}
|
|
49628
49735
|
},
|
|
49736
|
+
// ─── MAGI kind → panel bindings (MAGI-KIND-PANEL, machine-local config) ───
|
|
49737
|
+
// Per-task_kind slot lists in ~/.adhdev/meshes.json `magiKindPanels`. Same
|
|
49738
|
+
// owner-only gating and structured-error precedent as the magi_panel_* handlers
|
|
49739
|
+
// above (not listed in canPeerUsePrivilegedShareCommand → owner-only). set/remove
|
|
49740
|
+
// are WRITE commands; list is read-only. normalizeMagiSlots (inside setMagiKindPanel)
|
|
49741
|
+
// surfaces invalid_magi_kind_panel: … messages verbatim for the editor.
|
|
49742
|
+
magi_kind_panel_list: async (_ctx, _args) => {
|
|
49743
|
+
try {
|
|
49744
|
+
const { listMagiKindPanels: listMagiKindPanels2 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
|
|
49745
|
+
return { success: true, kindPanels: listMagiKindPanels2() };
|
|
49746
|
+
} catch (e) {
|
|
49747
|
+
return { success: false, error: e.message };
|
|
49748
|
+
}
|
|
49749
|
+
},
|
|
49750
|
+
magi_kind_panel_set: async (_ctx, args) => {
|
|
49751
|
+
const kind = typeof args?.kind === "string" ? args.kind.trim() : "";
|
|
49752
|
+
if (!kind) return { success: false, error: "invalid_magi_kind_panel: task_kind is required" };
|
|
49753
|
+
try {
|
|
49754
|
+
const { setMagiKindPanel: setMagiKindPanel2 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
|
|
49755
|
+
const slots = setMagiKindPanel2(kind, args?.slots);
|
|
49756
|
+
return { success: true, kind, slots };
|
|
49757
|
+
} catch (e) {
|
|
49758
|
+
return { success: false, error: e.message };
|
|
49759
|
+
}
|
|
49760
|
+
},
|
|
49761
|
+
magi_kind_panel_remove: async (_ctx, args) => {
|
|
49762
|
+
const kind = typeof args?.kind === "string" ? args.kind.trim() : "";
|
|
49763
|
+
if (!kind) return { success: false, error: "invalid_magi_kind_panel: task_kind is required" };
|
|
49764
|
+
try {
|
|
49765
|
+
const { removeMagiKindPanel: removeMagiKindPanel2 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
|
|
49766
|
+
const removed = removeMagiKindPanel2(kind);
|
|
49767
|
+
return { success: true, removed };
|
|
49768
|
+
} catch (e) {
|
|
49769
|
+
return { success: false, error: e.message };
|
|
49770
|
+
}
|
|
49771
|
+
},
|
|
49629
49772
|
add_mesh_node: async (ctx, args) => {
|
|
49630
49773
|
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
49631
49774
|
const workspace = typeof args?.workspace === "string" ? args.workspace.trim() : "";
|
|
@@ -65662,6 +65805,7 @@ var V1_CONTRACT_VERSION = "1.0.0";
|
|
|
65662
65805
|
getLedgerDir,
|
|
65663
65806
|
getLedgerSummary,
|
|
65664
65807
|
getLogLevel,
|
|
65808
|
+
getMagiKindPanel,
|
|
65665
65809
|
getMagiPanel,
|
|
65666
65810
|
getMesh,
|
|
65667
65811
|
getMeshByRepo,
|
|
@@ -65718,6 +65862,7 @@ var V1_CONTRACT_VERSION = "1.0.0";
|
|
|
65718
65862
|
launchWithCdp,
|
|
65719
65863
|
listCoordinatorsForWorkspace,
|
|
65720
65864
|
listHostedCliRuntimes,
|
|
65865
|
+
listMagiKindPanels,
|
|
65721
65866
|
listMagiPanels,
|
|
65722
65867
|
listMeshMissionSummaries,
|
|
65723
65868
|
listMeshes,
|
|
@@ -65753,6 +65898,7 @@ var V1_CONTRACT_VERSION = "1.0.0";
|
|
|
65753
65898
|
normalizeInteractivePrompt,
|
|
65754
65899
|
normalizeInteractivePromptResponse,
|
|
65755
65900
|
normalizeMagiPanel,
|
|
65901
|
+
normalizeMagiSlots,
|
|
65756
65902
|
normalizeManagedStatus,
|
|
65757
65903
|
normalizeMeshCapabilityTags,
|
|
65758
65904
|
normalizeMeshDaemonRole,
|
|
@@ -65790,6 +65936,7 @@ var V1_CONTRACT_VERSION = "1.0.0";
|
|
|
65790
65936
|
recordMeshToolCall,
|
|
65791
65937
|
registerExtensionProviders,
|
|
65792
65938
|
registerMeshCoordinator,
|
|
65939
|
+
removeMagiKindPanel,
|
|
65793
65940
|
removeMagiPanel,
|
|
65794
65941
|
removeNode,
|
|
65795
65942
|
removeWorktree,
|
|
@@ -65824,6 +65971,7 @@ var V1_CONTRACT_VERSION = "1.0.0";
|
|
|
65824
65971
|
saveState,
|
|
65825
65972
|
setDebugRuntimeConfig,
|
|
65826
65973
|
setLogLevel,
|
|
65974
|
+
setMagiKindPanel,
|
|
65827
65975
|
setupIdeInstance,
|
|
65828
65976
|
shouldAutoRestoreHostedSessionsOnStartup,
|
|
65829
65977
|
shouldCollectTraceCategory,
|