@adhdev/daemon-core 0.9.82-rc.483 → 0.9.82-rc.485
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/cli-adapters/provider-cli-adapter.d.ts +3 -0
- package/dist/commands/cli-manager.d.ts +20 -0
- package/dist/config/mesh-config.d.ts +14 -1
- package/dist/index.js +365 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +365 -19
- package/dist/index.mjs.map +1 -1
- 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 +10 -1
- package/dist/shared-types.d.ts +4 -0
- package/package.json +3 -3
- package/src/cli-adapters/provider-cli-adapter.ts +70 -1
- package/src/commands/cli-manager.ts +64 -3
- package/src/commands/med-family/mesh-crud.ts +24 -0
- package/src/config/mesh-config.ts +30 -1
- package/src/mesh/coordinator-prompt.ts +36 -0
- package/src/mesh/mesh-events-pending.ts +35 -1
- package/src/mesh/mesh-queue-assignment.ts +96 -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 +10 -1
- package/src/shared-types.ts +4 -0
- package/src/status/snapshot.ts +4 -0
|
@@ -57,6 +57,7 @@ export declare class ProviderCliAdapter implements CliAdapter {
|
|
|
57
57
|
private lastScreenSnapshot;
|
|
58
58
|
private lastScreenText;
|
|
59
59
|
private lastScreenSnapshotReadAt;
|
|
60
|
+
private staticIdlePollStreak;
|
|
60
61
|
private serverConn;
|
|
61
62
|
private logBuffer;
|
|
62
63
|
private pendingOutboundQueue;
|
|
@@ -106,6 +107,7 @@ export declare class ProviderCliAdapter implements CliAdapter {
|
|
|
106
107
|
private static readonly MAX_ACCUMULATED_BUFFER;
|
|
107
108
|
private parsedStatusCache;
|
|
108
109
|
private static readonly SCREEN_SNAPSHOT_MIN_INTERVAL_MS;
|
|
110
|
+
private static readonly STATIC_IDLE_POLL_CONFIRM_COUNT;
|
|
109
111
|
private readonly providerResolutionMeta;
|
|
110
112
|
private getBufferState;
|
|
111
113
|
private recordBoundedAppendDrop;
|
|
@@ -119,6 +121,7 @@ export declare class ProviderCliAdapter implements CliAdapter {
|
|
|
119
121
|
private shouldUseFullProviderTranscriptContext;
|
|
120
122
|
private getIdleFinishConfirmMs;
|
|
121
123
|
private getStatusActivityHoldMs;
|
|
124
|
+
private isAutonomousMeshSession;
|
|
122
125
|
private readonly timeouts;
|
|
123
126
|
private readonly approvalKeys;
|
|
124
127
|
private readonly sendDelayMs;
|
|
@@ -80,6 +80,10 @@ type CliStartOptions = {
|
|
|
80
80
|
resumeSessionId?: string;
|
|
81
81
|
settingsOverride?: Record<string, any>;
|
|
82
82
|
extraEnv?: Record<string, string>;
|
|
83
|
+
/** BRAIN-ROUTING thinking axis: standard level ('low'|'medium'|'high') applied
|
|
84
|
+
* at launch via the provider's thinkingLaunchArgs (CLI) or setConfigOption
|
|
85
|
+
* ('thought_level', ACP). Best-effort — ignored by providers with no support. */
|
|
86
|
+
initialThinkingLevel?: string;
|
|
83
87
|
};
|
|
84
88
|
export interface CoordinatorDelegatedCliLaunchOptionsInput {
|
|
85
89
|
cliType: string;
|
|
@@ -111,6 +115,22 @@ export interface CoordinatorDelegatedCliLaunchOptions {
|
|
|
111
115
|
*/
|
|
112
116
|
export declare function resolveHostedSpawnedAtMs(attachExisting: boolean, attachStartedAtMs: number | undefined, nowMs: number): number;
|
|
113
117
|
export declare function buildCoordinatorDelegatedCliLaunchOptions(input: CoordinatorDelegatedCliLaunchOptionsInput): CoordinatorDelegatedCliLaunchOptions;
|
|
118
|
+
/**
|
|
119
|
+
* Expand a provider's `modelLaunchArgs` template with the requested model, mirroring
|
|
120
|
+
* expandResumeArgs. `{{model}}` → the trimmed model string. Returns undefined when
|
|
121
|
+
* there is no template or no model (a model request without a template is a no-op —
|
|
122
|
+
* see startSession, where the caller logs the skip). MAGI kind-panel model axis.
|
|
123
|
+
*/
|
|
124
|
+
export declare function expandModelLaunchArgs(template: string[] | undefined, model: string | undefined): string[] | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Expand a provider's `thinkingLaunchArgs` template with the requested thinking
|
|
127
|
+
* level, parallel to expandModelLaunchArgs. The standard level ('low'|'medium'|
|
|
128
|
+
* 'high') is first mapped through the provider's `thinkingLevelMap` (a level absent
|
|
129
|
+
* from the map passes through unchanged), then substituted into every `{{level}}`
|
|
130
|
+
* token. Returns undefined when there is no template or no level (best-effort; a
|
|
131
|
+
* thinking request without a template is a no-op). BRAIN-ROUTING thinking axis.
|
|
132
|
+
*/
|
|
133
|
+
export declare function expandThinkingLaunchArgs(template: string[] | undefined, level: string | undefined, levelMap: Partial<Record<string, string>> | undefined): string[] | undefined;
|
|
114
134
|
export declare function supportsExplicitSessionResume(resume?: ProviderResumeCapability): boolean;
|
|
115
135
|
export declare function resolveCliSessionBinding(provider: ProviderModule | undefined, normalizedType: string, cliArgs?: string[], requestedResumeSessionId?: string): CliSessionBinding;
|
|
116
136
|
export declare class DaemonCliManager {
|
|
@@ -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 { MagiKindPanelMap, MagiSlot } from '@adhdev/mesh-shared';
|
|
9
|
+
import type { MagiKindPanelMap, MagiSlot, DifficultyBrainMap } 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"
|
|
@@ -166,3 +166,16 @@ export declare function getMagiKindPanel(kind: string): MagiSlot[] | undefined;
|
|
|
166
166
|
export declare function setMagiKindPanel(kind: string, slots: unknown): MagiSlot[];
|
|
167
167
|
/** Remove the binding for one task_kind. Returns true when a binding was removed. */
|
|
168
168
|
export declare function removeMagiKindPanel(kind: string): boolean;
|
|
169
|
+
/**
|
|
170
|
+
* The difficulty→brain presets, machine-local. When nothing is configured yet,
|
|
171
|
+
* returns the sensible DEFAULT_DIFFICULTY_BRAINS so the coordinator always has a
|
|
172
|
+
* usable mapping (the operator can override via setDifficultyBrains). Returns a
|
|
173
|
+
* normalized copy — never the stored reference.
|
|
174
|
+
*/
|
|
175
|
+
export declare function getDifficultyBrains(): DifficultyBrainMap;
|
|
176
|
+
/**
|
|
177
|
+
* Replace the difficulty→brain presets wholesale (the editor pushes the full map).
|
|
178
|
+
* Passing an empty/normalized-empty map clears the override, so getDifficultyBrains
|
|
179
|
+
* falls back to the defaults again. Returns the normalized, persisted map.
|
|
180
|
+
*/
|
|
181
|
+
export declare function setDifficultyBrains(map: unknown): DifficultyBrainMap;
|