@honeybee-ai/hivemind-sdk 0.2.1 → 0.2.2
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/auth.d.ts +1 -0
- package/dist/auth.js +9 -31
- package/dist/auth.js.map +1 -1
- package/dist/config/auth.d.ts +11 -0
- package/dist/config/auth.js +59 -0
- package/dist/config/auth.js.map +1 -0
- package/dist/config/constants.d.ts +38 -0
- package/dist/config/constants.js +71 -0
- package/dist/config/constants.js.map +1 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.js +9 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +88 -0
- package/dist/config/loader.js +474 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/migration.d.ts +25 -0
- package/dist/config/migration.js +151 -0
- package/dist/config/migration.js.map +1 -0
- package/dist/config/types.d.ts +100 -0
- package/dist/config/types.js +9 -0
- package/dist/config/types.js.map +1 -0
- package/dist/platform.d.ts +1 -1
- package/dist/platform.js.map +1 -1
- package/package.json +5 -1
package/dist/auth.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AuthProfile, AuthStore } from './types.js';
|
|
2
|
+
/** @deprecated Use getHomeDir() from @honeybee-ai/hivemind-sdk/config */
|
|
2
3
|
export declare function getWglDir(): string;
|
|
3
4
|
export declare function loadAuthStore(): AuthStore;
|
|
4
5
|
export declare function saveAuthStore(store: AuthStore): void;
|
package/dist/auth.js
CHANGED
|
@@ -1,48 +1,26 @@
|
|
|
1
|
-
import { readFileSync, writeFileSync, existsSync, mkdirSync, chmodSync } from 'node:fs';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
import { homedir } from 'node:os';
|
|
4
1
|
import { httpReq } from './http.js';
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { LEGACY_WGL_DIR, loadAuthStoreNew, saveAuthStoreNew, getActiveProfileNew, setProfileNew, removeProfileNew, listProfilesNew, } from './config/index.js';
|
|
3
|
+
/** @deprecated Use getHomeDir() from @honeybee-ai/hivemind-sdk/config */
|
|
7
4
|
export function getWglDir() {
|
|
8
|
-
return
|
|
5
|
+
return LEGACY_WGL_DIR;
|
|
9
6
|
}
|
|
10
7
|
export function loadAuthStore() {
|
|
11
|
-
|
|
12
|
-
return { profiles: {} };
|
|
13
|
-
try {
|
|
14
|
-
return JSON.parse(readFileSync(AUTH_PATH, 'utf8'));
|
|
15
|
-
}
|
|
16
|
-
catch {
|
|
17
|
-
return { profiles: {} };
|
|
18
|
-
}
|
|
8
|
+
return loadAuthStoreNew();
|
|
19
9
|
}
|
|
20
10
|
export function saveAuthStore(store) {
|
|
21
|
-
|
|
22
|
-
mkdirSync(WGL_DIR, { recursive: true });
|
|
23
|
-
writeFileSync(AUTH_PATH, JSON.stringify(store, null, 2) + '\n', { mode: 0o600 });
|
|
24
|
-
chmodSync(AUTH_PATH, 0o600);
|
|
11
|
+
saveAuthStoreNew(store);
|
|
25
12
|
}
|
|
26
13
|
export function getActiveProfile(profileName) {
|
|
27
|
-
|
|
28
|
-
return store.profiles[profileName] || null;
|
|
14
|
+
return getActiveProfileNew(profileName);
|
|
29
15
|
}
|
|
30
16
|
export function setProfile(name, profile) {
|
|
31
|
-
|
|
32
|
-
store.profiles[name] = profile;
|
|
33
|
-
saveAuthStore(store);
|
|
17
|
+
setProfileNew(name, profile);
|
|
34
18
|
}
|
|
35
19
|
export function removeProfile(name) {
|
|
36
|
-
|
|
37
|
-
if (!(name in store.profiles))
|
|
38
|
-
return false;
|
|
39
|
-
delete store.profiles[name];
|
|
40
|
-
saveAuthStore(store);
|
|
41
|
-
return true;
|
|
20
|
+
return removeProfileNew(name);
|
|
42
21
|
}
|
|
43
22
|
export function listProfiles() {
|
|
44
|
-
|
|
45
|
-
return Object.keys(store.profiles);
|
|
23
|
+
return listProfilesNew();
|
|
46
24
|
}
|
|
47
25
|
export function isTokenExpired(profile) {
|
|
48
26
|
return Date.now() / 1000 > profile.expiresAt - 60; // 60s buffer
|
package/dist/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAEL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,eAAe,GAEhB,MAAM,mBAAmB,CAAC;AAE3B,yEAAyE;AACzE,MAAM,UAAU,SAAS;IACvB,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,OAAO,gBAAgB,EAAE,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAgB;IAC5C,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,WAAmB;IAClD,OAAO,mBAAmB,CAAC,WAAW,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,OAAoB;IAC3D,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,eAAe,EAAE,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAAoB;IACjD,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,OAAO,CAAC,SAAS,GAAG,EAAE,CAAC,CAAC,aAAa;AAClE,CAAC;AAkBD,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAEhD,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,MAAM,GAAG,GA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S,EAAE,SAAS;QACpB,aAAa,EAAE,iBAAiB;QAChC,UAAU,EAAE,eAAe;KAC5B,CAAC,CAAC;IACH,IAAI,CAAC,GAAG,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACrD,OAAO,GAAG,CAAC,IAAqB,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth store management — reads/writes ~/.honeyb/auth.json.
|
|
3
|
+
* Falls back to ~/.wgl/auth.json during migration.
|
|
4
|
+
*/
|
|
5
|
+
import type { AuthStore, AuthProfile } from '../types.js';
|
|
6
|
+
export declare function loadAuthStore(): AuthStore;
|
|
7
|
+
export declare function saveAuthStore(store: AuthStore): void;
|
|
8
|
+
export declare function getActiveProfile(profileName: string): AuthProfile | null;
|
|
9
|
+
export declare function setProfile(name: string, profile: AuthProfile): void;
|
|
10
|
+
export declare function removeProfile(name: string): boolean;
|
|
11
|
+
export declare function listProfiles(): string[];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth store management — reads/writes ~/.honeyb/auth.json.
|
|
3
|
+
* Falls back to ~/.wgl/auth.json during migration.
|
|
4
|
+
*/
|
|
5
|
+
import { readFileSync, writeFileSync, existsSync, mkdirSync, chmodSync } from 'node:fs';
|
|
6
|
+
import { join } from 'node:path';
|
|
7
|
+
import { HONEYB_DIR, LEGACY_WGL_DIR, AUTH_FILE } from './constants.js';
|
|
8
|
+
function getAuthPath() {
|
|
9
|
+
const newPath = join(HONEYB_DIR, AUTH_FILE);
|
|
10
|
+
if (existsSync(newPath))
|
|
11
|
+
return newPath;
|
|
12
|
+
// Fallback to legacy
|
|
13
|
+
const legacyPath = join(LEGACY_WGL_DIR, 'auth.json');
|
|
14
|
+
if (existsSync(legacyPath))
|
|
15
|
+
return legacyPath;
|
|
16
|
+
// Default to new path (will be created on first save)
|
|
17
|
+
return newPath;
|
|
18
|
+
}
|
|
19
|
+
export function loadAuthStore() {
|
|
20
|
+
const path = getAuthPath();
|
|
21
|
+
if (!existsSync(path))
|
|
22
|
+
return { profiles: {} };
|
|
23
|
+
try {
|
|
24
|
+
return JSON.parse(readFileSync(path, 'utf8'));
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return { profiles: {} };
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export function saveAuthStore(store) {
|
|
31
|
+
// Always write to new path
|
|
32
|
+
if (!existsSync(HONEYB_DIR))
|
|
33
|
+
mkdirSync(HONEYB_DIR, { recursive: true });
|
|
34
|
+
const path = join(HONEYB_DIR, AUTH_FILE);
|
|
35
|
+
writeFileSync(path, JSON.stringify(store, null, 2) + '\n', { mode: 0o600 });
|
|
36
|
+
chmodSync(path, 0o600);
|
|
37
|
+
}
|
|
38
|
+
export function getActiveProfile(profileName) {
|
|
39
|
+
const store = loadAuthStore();
|
|
40
|
+
return store.profiles[profileName] || null;
|
|
41
|
+
}
|
|
42
|
+
export function setProfile(name, profile) {
|
|
43
|
+
const store = loadAuthStore();
|
|
44
|
+
store.profiles[name] = profile;
|
|
45
|
+
saveAuthStore(store);
|
|
46
|
+
}
|
|
47
|
+
export function removeProfile(name) {
|
|
48
|
+
const store = loadAuthStore();
|
|
49
|
+
if (!(name in store.profiles))
|
|
50
|
+
return false;
|
|
51
|
+
delete store.profiles[name];
|
|
52
|
+
saveAuthStore(store);
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
export function listProfiles() {
|
|
56
|
+
const store = loadAuthStore();
|
|
57
|
+
return Object.keys(store.profiles);
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/config/auth.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,E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IAC5E,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,WAAmB;IAClD,MAAM,KAAK,GAAG,aAAa,EAAE,CAAC;IAC9B,OAAO,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,OAAoB;IAC3D,MAAM,KAAK,GAAG,aAAa,EAAE,CAAC;IAC9B,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;IAC/B,aAAa,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,MAAM,KAAK,GAAG,aAAa,EAAE,CAAC;IAC9B,IAAI,CAAC,CAAC,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5B,aAAa,CAAC,KAAK,CAAC,CAAC;IACrB,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,MAAM,KAAK,GAAG,aAAa,EAAE,CAAC;IAC9B,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared constants for the Honeybee config system.
|
|
3
|
+
*/
|
|
4
|
+
import type { ResolvedConfig } from './types.js';
|
|
5
|
+
/** Global state directory (~/.honeyb/) */
|
|
6
|
+
export declare const HONEYB_DIR: string;
|
|
7
|
+
/** Legacy global directory (~/.wgl/) — read as fallback during migration */
|
|
8
|
+
export declare const LEGACY_WGL_DIR: string;
|
|
9
|
+
/** Auth store filename (inside HONEYB_DIR) */
|
|
10
|
+
export declare const AUTH_FILE = "auth.json";
|
|
11
|
+
/** Integrations registry filename */
|
|
12
|
+
export declare const INTEGRATIONS_FILE = "integrations.json";
|
|
13
|
+
/** MCP servers filename */
|
|
14
|
+
export declare const SERVERS_FILE = "servers.json";
|
|
15
|
+
/** Global specs directory */
|
|
16
|
+
export declare const SPECS_DIR = "specs";
|
|
17
|
+
/** Global dances directory */
|
|
18
|
+
export declare const DANCES_DIR = "dances";
|
|
19
|
+
/** Project state directory name */
|
|
20
|
+
export declare const PROJECT_STATE_DIR = ".honeyb";
|
|
21
|
+
/** Legacy project state directory name */
|
|
22
|
+
export declare const LEGACY_PROJECT_STATE_DIR = ".honeybee";
|
|
23
|
+
/** RC file names in priority order (first found wins per directory) */
|
|
24
|
+
export declare const RC_FILENAMES: readonly [".wglrc.yaml", ".wglrc.json", ".wglrc"];
|
|
25
|
+
/** Legacy project config filename */
|
|
26
|
+
export declare const LEGACY_CONFIG_FILE = ".wgl.json";
|
|
27
|
+
/** Session state filename (inside .honeyb/) */
|
|
28
|
+
export declare const SESSION_FILE = "session.json";
|
|
29
|
+
/** Brood state filename (inside .honeyb/) */
|
|
30
|
+
export declare const BROOD_STATE_FILE = "brood.state.json";
|
|
31
|
+
/** Per-project log directory name (inside .honeyb/) */
|
|
32
|
+
export declare const LOGS_DIR = "logs";
|
|
33
|
+
/** Max log files to keep per project */
|
|
34
|
+
export declare const MAX_LOG_FILES = 10;
|
|
35
|
+
/** Env var → config path mapping */
|
|
36
|
+
export declare const ENV_MAP: Record<string, string>;
|
|
37
|
+
/** Default config values */
|
|
38
|
+
export declare const DEFAULTS: ResolvedConfig;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared constants for the Honeybee config system.
|
|
3
|
+
*/
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { homedir } from 'node:os';
|
|
6
|
+
/** Global state directory (~/.honeyb/) */
|
|
7
|
+
export const HONEYB_DIR = join(homedir(), '.honeyb');
|
|
8
|
+
/** Legacy global directory (~/.wgl/) — read as fallback during migration */
|
|
9
|
+
export const LEGACY_WGL_DIR = join(homedir(), '.wgl');
|
|
10
|
+
/** Auth store filename (inside HONEYB_DIR) */
|
|
11
|
+
export const AUTH_FILE = 'auth.json';
|
|
12
|
+
/** Integrations registry filename */
|
|
13
|
+
export const INTEGRATIONS_FILE = 'integrations.json';
|
|
14
|
+
/** MCP servers filename */
|
|
15
|
+
export const SERVERS_FILE = 'servers.json';
|
|
16
|
+
/** Global specs directory */
|
|
17
|
+
export const SPECS_DIR = 'specs';
|
|
18
|
+
/** Global dances directory */
|
|
19
|
+
export const DANCES_DIR = 'dances';
|
|
20
|
+
/** Project state directory name */
|
|
21
|
+
export const PROJECT_STATE_DIR = '.honeyb';
|
|
22
|
+
/** Legacy project state directory name */
|
|
23
|
+
export const LEGACY_PROJECT_STATE_DIR = '.honeybee';
|
|
24
|
+
/** RC file names in priority order (first found wins per directory) */
|
|
25
|
+
export const RC_FILENAMES = ['.wglrc.yaml', '.wglrc.json', '.wglrc'];
|
|
26
|
+
/** Legacy project config filename */
|
|
27
|
+
export const LEGACY_CONFIG_FILE = '.wgl.json';
|
|
28
|
+
/** Session state filename (inside .honeyb/) */
|
|
29
|
+
export const SESSION_FILE = 'session.json';
|
|
30
|
+
/** Brood state filename (inside .honeyb/) */
|
|
31
|
+
export const BROOD_STATE_FILE = 'brood.state.json';
|
|
32
|
+
/** Per-project log directory name (inside .honeyb/) */
|
|
33
|
+
export const LOGS_DIR = 'logs';
|
|
34
|
+
/** Max log files to keep per project */
|
|
35
|
+
export const MAX_LOG_FILES = 10;
|
|
36
|
+
/** Env var → config path mapping */
|
|
37
|
+
export const ENV_MAP = {
|
|
38
|
+
HONEYB_PLATFORM: 'platform',
|
|
39
|
+
CARAPACE_PORT: 'carapace.proxyPort',
|
|
40
|
+
CARAPACE_UPSTREAM: 'carapace.upstream',
|
|
41
|
+
CARAPACE_MODE: 'carapace.mode',
|
|
42
|
+
CARAPACE_THRESHOLD: 'carapace.threshold',
|
|
43
|
+
TELEMETRY_ENDPOINT: 'telemetry.endpoint',
|
|
44
|
+
TELEMETRY_API_KEY: 'telemetry.apiKey',
|
|
45
|
+
INCUBATOR_PORT: 'incubator.port',
|
|
46
|
+
};
|
|
47
|
+
/** Default config values */
|
|
48
|
+
export const DEFAULTS = {
|
|
49
|
+
platform: 'https://hivemind.honeyb.dev',
|
|
50
|
+
activeProfile: 'personal',
|
|
51
|
+
cli: {
|
|
52
|
+
editor: 'nano',
|
|
53
|
+
hookTimeout: 10,
|
|
54
|
+
autoClaimFiles: true,
|
|
55
|
+
},
|
|
56
|
+
incubator: {
|
|
57
|
+
port: 3100,
|
|
58
|
+
backend: 'memory',
|
|
59
|
+
verbose: false,
|
|
60
|
+
guard: true,
|
|
61
|
+
},
|
|
62
|
+
carapace: {
|
|
63
|
+
mode: 'block',
|
|
64
|
+
threshold: 100,
|
|
65
|
+
proxyPort: 8888,
|
|
66
|
+
},
|
|
67
|
+
telemetry: {},
|
|
68
|
+
pricing: {},
|
|
69
|
+
servers: {},
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/config/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC,0CAA0C;AAC1C,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;AAErD,4EAA4E;AAC5E,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC;AAEtD,8CAA8C;AAC9C,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AAErC,qCAAqC;AACrC,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAErD,2BAA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IACD,SAAS,EAAE;QACT,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,QAAQ;QACjB,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,IAAI;KACZ;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,IAAI;KAChB;IACD,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;CACZ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { WglRcConfig, McpServerDef, SessionState, BroodState, ResolvedConfig, } from './types.js';
|
|
2
|
+
export { HONEYB_DIR, LEGACY_WGL_DIR, AUTH_FILE, INTEGRATIONS_FILE, SERVERS_FILE, SPECS_DIR, DANCES_DIR, PROJECT_STATE_DIR, LEGACY_PROJECT_STATE_DIR, RC_FILENAMES, LEGACY_CONFIG_FILE, SESSION_FILE, BROOD_STATE_FILE, LOGS_DIR, MAX_LOG_FILES, ENV_MAP, DEFAULTS, } from './constants.js';
|
|
3
|
+
export { findRcFile, findGlobalRcFile, parseRcFile, setNestedValue, getNestedValue, deepMerge, resolveConfig, loadProjectRc, loadGlobalRc, getHomeDir, getProjectSlug, getGlobalProjectDir, getProjectStateDir, loadSessionState, saveSessionState, loadBroodState, saveBroodState, clearBroodState, getLogDir, getLogPath, rotateLogs, getSpecsDir, getDancesDir, resolveSpecPath, } from './loader.js';
|
|
4
|
+
export { loadAuthStore as loadAuthStoreNew, saveAuthStore as saveAuthStoreNew, getActiveProfile as getActiveProfileNew, setProfile as setProfileNew, removeProfile as removeProfileNew, listProfiles as listProfilesNew, } from './auth.js';
|
|
5
|
+
export { migrateGlobal, migrateProject, _resetMigrationState } from './migration.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Constants
|
|
2
|
+
export { HONEYB_DIR, LEGACY_WGL_DIR, AUTH_FILE, INTEGRATIONS_FILE, SERVERS_FILE, SPECS_DIR, DANCES_DIR, PROJECT_STATE_DIR, LEGACY_PROJECT_STATE_DIR, RC_FILENAMES, LEGACY_CONFIG_FILE, SESSION_FILE, BROOD_STATE_FILE, LOGS_DIR, MAX_LOG_FILES, ENV_MAP, DEFAULTS, } from './constants.js';
|
|
3
|
+
// Loader
|
|
4
|
+
export { findRcFile, findGlobalRcFile, parseRcFile, setNestedValue, getNestedValue, deepMerge, resolveConfig, loadProjectRc, loadGlobalRc, getHomeDir, getProjectSlug, getGlobalProjectDir, getProjectStateDir, loadSessionState, saveSessionState, loadBroodState, saveBroodState, clearBroodState, getLogDir, getLogPath, rotateLogs, getSpecsDir, getDancesDir, resolveSpecPath, } from './loader.js';
|
|
5
|
+
// Auth (new paths)
|
|
6
|
+
export { loadAuthStore as loadAuthStoreNew, saveAuthStore as saveAuthStoreNew, getActiveProfile as getActiveProfileNew, setProfile as setProfileNew, removeProfile as removeProfileNew, listProfiles as listProfilesNew, } from './auth.js';
|
|
7
|
+
// Migration
|
|
8
|
+
export { migrateGlobal, migrateProject, _resetMigrationState } from './migration.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AASA,YAAY;AACZ,OAAO,EACL,UAAU,EACV,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,aAAa,EACb,OAAO,EACP,QAAQ,GACT,MAAM,gBAAgB,CAAC;AAExB,SAAS;AACT,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,cAAc,EACd,SAAS,EACT,aAAa,EACb,aAAa,EACb,YAAY,EACZ,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,eAAe,EACf,SAAS,EACT,UAAU,EACV,UAAU,EACV,WAAW,EACX,YAAY,EACZ,eAAe,GAChB,MAAM,aAAa,CAAC;AAErB,mBAAmB;AACnB,OAAO,EACL,aAAa,IAAI,gBAAgB,EACjC,aAAa,IAAI,gBAAgB,EACjC,gBAAgB,IAAI,mBAAmB,EACvC,UAAU,IAAI,aAAa,EAC3B,aAAa,IAAI,gBAAgB,EACjC,YAAY,IAAI,eAAe,GAChC,MAAM,WAAW,CAAC;AAEnB,YAAY;AACZ,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config loader — reads .wglrc files, merges with env vars, returns frozen ResolvedConfig.
|
|
3
|
+
*
|
|
4
|
+
* Precedence (highest → lowest):
|
|
5
|
+
* CLI flags (not handled here — caller merges)
|
|
6
|
+
* env vars
|
|
7
|
+
* project .wglrc (closest ancestor)
|
|
8
|
+
* global ~/.wglrc
|
|
9
|
+
* defaults
|
|
10
|
+
*/
|
|
11
|
+
import type { WglRcConfig, ResolvedConfig, SessionState, BroodState } from './types.js';
|
|
12
|
+
/**
|
|
13
|
+
* Find the closest .wglrc file by walking up from startDir.
|
|
14
|
+
* Returns the full path or null if none found.
|
|
15
|
+
*/
|
|
16
|
+
export declare function findRcFile(startDir?: string): string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Find the global RC file (~/.wglrc, ~/.wglrc.json, or ~/.wglrc.yaml).
|
|
19
|
+
*/
|
|
20
|
+
export declare function findGlobalRcFile(): string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Parse an RC file. Detects format by extension:
|
|
23
|
+
* .yaml → YAML (js-yaml optional, falls back to JSON attempt)
|
|
24
|
+
* .json → JSON
|
|
25
|
+
* no extension (.wglrc) → key=value with dotted paths
|
|
26
|
+
*/
|
|
27
|
+
export declare function parseRcFile(filePath: string): WglRcConfig;
|
|
28
|
+
/**
|
|
29
|
+
* Set a value at a dotted path: setNestedValue(obj, "a.b.c", 1) → { a: { b: { c: 1 } } }
|
|
30
|
+
*/
|
|
31
|
+
export declare function setNestedValue(obj: Record<string, unknown>, path: string, value: unknown): void;
|
|
32
|
+
/**
|
|
33
|
+
* Get a value at a dotted path: getNestedValue(obj, "a.b.c") → value
|
|
34
|
+
*/
|
|
35
|
+
export declare function getNestedValue(obj: Record<string, unknown>, path: string): unknown;
|
|
36
|
+
/**
|
|
37
|
+
* Deep merge two objects. Rules:
|
|
38
|
+
* - Null/undefined in override clears the key
|
|
39
|
+
* - Arrays replace (no concat)
|
|
40
|
+
* - Objects merge recursively
|
|
41
|
+
* - Primitives replace
|
|
42
|
+
*/
|
|
43
|
+
export declare function deepMerge<T extends Record<string, unknown>>(base: T, override: Partial<T>): T;
|
|
44
|
+
/**
|
|
45
|
+
* Resolve the full config by merging all sources.
|
|
46
|
+
* Returns a frozen ResolvedConfig.
|
|
47
|
+
*
|
|
48
|
+
* Precedence: defaults → global rc → project rc → env vars
|
|
49
|
+
* (CLI flags are merged by the caller)
|
|
50
|
+
*/
|
|
51
|
+
export declare function resolveConfig(startDir?: string): ResolvedConfig;
|
|
52
|
+
/**
|
|
53
|
+
* Load just the project RC (no global, no defaults, no env).
|
|
54
|
+
* Useful for commands that need to read/write project config.
|
|
55
|
+
*/
|
|
56
|
+
export declare function loadProjectRc(startDir?: string): WglRcConfig | null;
|
|
57
|
+
/**
|
|
58
|
+
* Load just the global RC (no project, no defaults, no env).
|
|
59
|
+
*/
|
|
60
|
+
export declare function loadGlobalRc(): WglRcConfig | null;
|
|
61
|
+
/** Get the global state directory (~/.honeyb/), creating if needed */
|
|
62
|
+
export declare function getHomeDir(): string;
|
|
63
|
+
/** Get project slug for per-project state in ~/.honeyb/projects/ */
|
|
64
|
+
export declare function getProjectSlug(projectRoot?: string): string;
|
|
65
|
+
/** Get or create the project-specific state directory inside ~/.honeyb/projects/ */
|
|
66
|
+
export declare function getGlobalProjectDir(projectRoot?: string): string;
|
|
67
|
+
/** Get or create the local project state directory (.honeyb/) */
|
|
68
|
+
export declare function getProjectStateDir(projectRoot?: string): string;
|
|
69
|
+
export declare function loadSessionState(projectRoot?: string): SessionState;
|
|
70
|
+
export declare function saveSessionState(state: SessionState, projectRoot?: string): void;
|
|
71
|
+
export declare function loadBroodState(projectRoot?: string): BroodState | null;
|
|
72
|
+
export declare function saveBroodState(state: BroodState, projectRoot?: string): void;
|
|
73
|
+
export declare function clearBroodState(projectRoot?: string): void;
|
|
74
|
+
/** Get the log directory for a project */
|
|
75
|
+
export declare function getLogDir(projectRoot?: string): string;
|
|
76
|
+
/** Generate a timestamped log file path */
|
|
77
|
+
export declare function getLogPath(projectRoot?: string): string;
|
|
78
|
+
/** Rotate logs — keep only the most recent MAX_LOG_FILES */
|
|
79
|
+
export declare function rotateLogs(projectRoot?: string): void;
|
|
80
|
+
/** Get the global specs directory (~/.honeyb/specs/) */
|
|
81
|
+
export declare function getSpecsDir(): string;
|
|
82
|
+
/** Get the global dances directory (~/.honeyb/dances/) */
|
|
83
|
+
export declare function getDancesDir(): string;
|
|
84
|
+
/**
|
|
85
|
+
* Resolve a spec reference: absolute path, relative path, URL, or global name.
|
|
86
|
+
* Returns the resolved path or URL.
|
|
87
|
+
*/
|
|
88
|
+
export declare function resolveSpecPath(ref: string, baseDir?: string): string;
|
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config loader — reads .wglrc files, merges with env vars, returns frozen ResolvedConfig.
|
|
3
|
+
*
|
|
4
|
+
* Precedence (highest → lowest):
|
|
5
|
+
* CLI flags (not handled here — caller merges)
|
|
6
|
+
* env vars
|
|
7
|
+
* project .wglrc (closest ancestor)
|
|
8
|
+
* global ~/.wglrc
|
|
9
|
+
* defaults
|
|
10
|
+
*/
|
|
11
|
+
import { readFileSync, writeFileSync, existsSync, mkdirSync, readdirSync, unlinkSync } from 'node:fs';
|
|
12
|
+
import { join, dirname, resolve, sep } from 'node:path';
|
|
13
|
+
import { homedir } from 'node:os';
|
|
14
|
+
import { HONEYB_DIR, RC_FILENAMES, ENV_MAP, DEFAULTS, PROJECT_STATE_DIR, LEGACY_CONFIG_FILE, SESSION_FILE, BROOD_STATE_FILE, LOGS_DIR, MAX_LOG_FILES, SPECS_DIR, DANCES_DIR, } from './constants.js';
|
|
15
|
+
import { migrateGlobal, migrateProject } from './migration.js';
|
|
16
|
+
// ─── RC file discovery ───────────────────────────────────────────────
|
|
17
|
+
/**
|
|
18
|
+
* Find the closest .wglrc file by walking up from startDir.
|
|
19
|
+
* Returns the full path or null if none found.
|
|
20
|
+
*/
|
|
21
|
+
export function findRcFile(startDir) {
|
|
22
|
+
let dir = resolve(startDir || process.cwd());
|
|
23
|
+
const root = (sep === '/' ? '/' : dir.slice(0, 3)); // Unix root or Windows drive
|
|
24
|
+
while (true) {
|
|
25
|
+
for (const name of RC_FILENAMES) {
|
|
26
|
+
const candidate = join(dir, name);
|
|
27
|
+
if (existsSync(candidate))
|
|
28
|
+
return candidate;
|
|
29
|
+
}
|
|
30
|
+
const parent = dirname(dir);
|
|
31
|
+
if (parent === dir || dir === root)
|
|
32
|
+
return null;
|
|
33
|
+
dir = parent;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Find the global RC file (~/.wglrc, ~/.wglrc.json, or ~/.wglrc.yaml).
|
|
38
|
+
*/
|
|
39
|
+
export function findGlobalRcFile() {
|
|
40
|
+
const home = homedir();
|
|
41
|
+
for (const name of RC_FILENAMES) {
|
|
42
|
+
const candidate = join(home, name);
|
|
43
|
+
if (existsSync(candidate))
|
|
44
|
+
return candidate;
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
// ─── RC file parsing ─────────────────────────────────────────────────
|
|
49
|
+
/**
|
|
50
|
+
* Parse an RC file. Detects format by extension:
|
|
51
|
+
* .yaml → YAML (js-yaml optional, falls back to JSON attempt)
|
|
52
|
+
* .json → JSON
|
|
53
|
+
* no extension (.wglrc) → key=value with dotted paths
|
|
54
|
+
*/
|
|
55
|
+
export function parseRcFile(filePath) {
|
|
56
|
+
const raw = readFileSync(filePath, 'utf8').trim();
|
|
57
|
+
if (!raw)
|
|
58
|
+
return {};
|
|
59
|
+
if (filePath.endsWith('.yaml')) {
|
|
60
|
+
return parseYaml(raw);
|
|
61
|
+
}
|
|
62
|
+
if (filePath.endsWith('.json')) {
|
|
63
|
+
return parseJson(raw);
|
|
64
|
+
}
|
|
65
|
+
// Plain .wglrc → key=value format
|
|
66
|
+
return parseKeyValue(raw);
|
|
67
|
+
}
|
|
68
|
+
function parseJson(raw) {
|
|
69
|
+
try {
|
|
70
|
+
const parsed = JSON.parse(raw);
|
|
71
|
+
if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed))
|
|
72
|
+
return {};
|
|
73
|
+
return parsed;
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
return {};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function parseYaml(raw) {
|
|
80
|
+
// Try dynamic import of js-yaml (available when bundled in CLI)
|
|
81
|
+
// Fall back to JSON parse if YAML looks like JSON
|
|
82
|
+
try {
|
|
83
|
+
// Simple YAML subset parser for common config patterns
|
|
84
|
+
// Handles: key: value, nested objects via indentation, quoted strings
|
|
85
|
+
return parseSimpleYaml(raw);
|
|
86
|
+
}
|
|
87
|
+
catch {
|
|
88
|
+
return parseJson(raw);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Minimal YAML parser for config files.
|
|
93
|
+
* Handles flat keys, dotted expansion, nested objects, and basic types.
|
|
94
|
+
* Does NOT handle arrays, multi-line strings, anchors, or YAML tags.
|
|
95
|
+
*/
|
|
96
|
+
function parseSimpleYaml(raw) {
|
|
97
|
+
const result = {};
|
|
98
|
+
const lines = raw.split('\n');
|
|
99
|
+
const stack = [
|
|
100
|
+
{ indent: -1, obj: result },
|
|
101
|
+
];
|
|
102
|
+
for (const line of lines) {
|
|
103
|
+
// Skip comments and empty lines
|
|
104
|
+
const trimmed = line.replace(/#.*$/, '').trimEnd();
|
|
105
|
+
if (!trimmed)
|
|
106
|
+
continue;
|
|
107
|
+
const indent = line.length - line.trimStart().length;
|
|
108
|
+
const match = trimmed.match(/^(\s*)([^:]+):\s*(.*)$/);
|
|
109
|
+
if (!match)
|
|
110
|
+
continue;
|
|
111
|
+
const key = match[2].trim();
|
|
112
|
+
const rawVal = match[3].trim();
|
|
113
|
+
// Pop stack to find parent at correct indentation
|
|
114
|
+
while (stack.length > 1 && stack[stack.length - 1].indent >= indent) {
|
|
115
|
+
stack.pop();
|
|
116
|
+
}
|
|
117
|
+
const parent = stack[stack.length - 1].obj;
|
|
118
|
+
if (rawVal === '') {
|
|
119
|
+
// Start of nested object
|
|
120
|
+
const child = {};
|
|
121
|
+
parent[key] = child;
|
|
122
|
+
stack.push({ indent, obj: child });
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
parent[key] = coerceValue(rawVal);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return result;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Parse key=value format (like .npmrc).
|
|
132
|
+
* Supports dotted paths: `carapace.mode=warn` → { carapace: { mode: "warn" } }
|
|
133
|
+
*/
|
|
134
|
+
function parseKeyValue(raw) {
|
|
135
|
+
const result = {};
|
|
136
|
+
for (const line of raw.split('\n')) {
|
|
137
|
+
const trimmed = line.trim();
|
|
138
|
+
if (!trimmed || trimmed.startsWith('#'))
|
|
139
|
+
continue;
|
|
140
|
+
const eqIdx = trimmed.indexOf('=');
|
|
141
|
+
if (eqIdx < 1)
|
|
142
|
+
continue;
|
|
143
|
+
const key = trimmed.slice(0, eqIdx).trim();
|
|
144
|
+
const val = trimmed.slice(eqIdx + 1).trim();
|
|
145
|
+
setNestedValue(result, key, coerceValue(val));
|
|
146
|
+
}
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
149
|
+
/** Coerce string values to appropriate JS types */
|
|
150
|
+
function coerceValue(val) {
|
|
151
|
+
// Remove quotes
|
|
152
|
+
if ((val.startsWith('"') && val.endsWith('"')) || (val.startsWith("'") && val.endsWith("'"))) {
|
|
153
|
+
return val.slice(1, -1);
|
|
154
|
+
}
|
|
155
|
+
if (val === 'true')
|
|
156
|
+
return true;
|
|
157
|
+
if (val === 'false')
|
|
158
|
+
return false;
|
|
159
|
+
if (val === 'null' || val === '')
|
|
160
|
+
return '';
|
|
161
|
+
const num = Number(val);
|
|
162
|
+
if (!Number.isNaN(num) && val !== '')
|
|
163
|
+
return num;
|
|
164
|
+
return val;
|
|
165
|
+
}
|
|
166
|
+
// ─── Deep merge + nested access ──────────────────────────────────────
|
|
167
|
+
/**
|
|
168
|
+
* Set a value at a dotted path: setNestedValue(obj, "a.b.c", 1) → { a: { b: { c: 1 } } }
|
|
169
|
+
*/
|
|
170
|
+
export function setNestedValue(obj, path, value) {
|
|
171
|
+
const parts = path.split('.');
|
|
172
|
+
let current = obj;
|
|
173
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
174
|
+
const key = parts[i];
|
|
175
|
+
if (typeof current[key] !== 'object' || current[key] === null) {
|
|
176
|
+
current[key] = {};
|
|
177
|
+
}
|
|
178
|
+
current = current[key];
|
|
179
|
+
}
|
|
180
|
+
current[parts[parts.length - 1]] = value;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Get a value at a dotted path: getNestedValue(obj, "a.b.c") → value
|
|
184
|
+
*/
|
|
185
|
+
export function getNestedValue(obj, path) {
|
|
186
|
+
const parts = path.split('.');
|
|
187
|
+
let current = obj;
|
|
188
|
+
for (const part of parts) {
|
|
189
|
+
if (typeof current !== 'object' || current === null)
|
|
190
|
+
return undefined;
|
|
191
|
+
current = current[part];
|
|
192
|
+
}
|
|
193
|
+
return current;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Deep merge two objects. Rules:
|
|
197
|
+
* - Null/undefined in override clears the key
|
|
198
|
+
* - Arrays replace (no concat)
|
|
199
|
+
* - Objects merge recursively
|
|
200
|
+
* - Primitives replace
|
|
201
|
+
*/
|
|
202
|
+
export function deepMerge(base, override) {
|
|
203
|
+
const result = { ...base };
|
|
204
|
+
for (const key of Object.keys(override)) {
|
|
205
|
+
const overrideVal = override[key];
|
|
206
|
+
const baseVal = result[key];
|
|
207
|
+
if (overrideVal === null || overrideVal === undefined) {
|
|
208
|
+
delete result[key];
|
|
209
|
+
}
|
|
210
|
+
else if (typeof baseVal === 'object' && baseVal !== null && !Array.isArray(baseVal) &&
|
|
211
|
+
typeof overrideVal === 'object' && overrideVal !== null && !Array.isArray(overrideVal)) {
|
|
212
|
+
result[key] = deepMerge(baseVal, overrideVal);
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
result[key] = overrideVal;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
return result;
|
|
219
|
+
}
|
|
220
|
+
// ─── Env var reading ─────────────────────────────────────────────────
|
|
221
|
+
/** Read env vars and map to WglRcConfig structure */
|
|
222
|
+
function readEnvOverrides() {
|
|
223
|
+
const result = {};
|
|
224
|
+
for (const [envKey, configPath] of Object.entries(ENV_MAP)) {
|
|
225
|
+
const val = process.env[envKey];
|
|
226
|
+
if (val !== undefined && val !== '') {
|
|
227
|
+
setNestedValue(result, configPath, coerceValue(val));
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return result;
|
|
231
|
+
}
|
|
232
|
+
// ─── Main API ────────────────────────────────────────────────────────
|
|
233
|
+
/**
|
|
234
|
+
* Resolve the full config by merging all sources.
|
|
235
|
+
* Returns a frozen ResolvedConfig.
|
|
236
|
+
*
|
|
237
|
+
* Precedence: defaults → global rc → project rc → env vars
|
|
238
|
+
* (CLI flags are merged by the caller)
|
|
239
|
+
*/
|
|
240
|
+
export function resolveConfig(startDir) {
|
|
241
|
+
// Run one-time migrations (no-op if already done)
|
|
242
|
+
migrateGlobal();
|
|
243
|
+
migrateProject(startDir);
|
|
244
|
+
// Layer 1: defaults
|
|
245
|
+
let config = structuredClone(DEFAULTS);
|
|
246
|
+
// Layer 2: global RC
|
|
247
|
+
const globalRc = findGlobalRcFile();
|
|
248
|
+
if (globalRc) {
|
|
249
|
+
config = deepMerge(config, parseRcFile(globalRc));
|
|
250
|
+
}
|
|
251
|
+
// Layer 3: project RC
|
|
252
|
+
const projectRc = findRcFile(startDir);
|
|
253
|
+
if (projectRc) {
|
|
254
|
+
config = deepMerge(config, parseRcFile(projectRc));
|
|
255
|
+
}
|
|
256
|
+
// Layer 3.5: legacy .wgl.json fallback (read-only, never written)
|
|
257
|
+
if (!projectRc) {
|
|
258
|
+
const legacyPath = findLegacyConfig(startDir);
|
|
259
|
+
if (legacyPath) {
|
|
260
|
+
const legacy = parseLegacyWglJson(legacyPath);
|
|
261
|
+
if (legacy) {
|
|
262
|
+
config = deepMerge(config, legacy);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
// Layer 4: env vars
|
|
267
|
+
config = deepMerge(config, readEnvOverrides());
|
|
268
|
+
return Object.freeze(config);
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Load just the project RC (no global, no defaults, no env).
|
|
272
|
+
* Useful for commands that need to read/write project config.
|
|
273
|
+
*/
|
|
274
|
+
export function loadProjectRc(startDir) {
|
|
275
|
+
const rcPath = findRcFile(startDir);
|
|
276
|
+
if (rcPath)
|
|
277
|
+
return parseRcFile(rcPath);
|
|
278
|
+
return null;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Load just the global RC (no project, no defaults, no env).
|
|
282
|
+
*/
|
|
283
|
+
export function loadGlobalRc() {
|
|
284
|
+
const rcPath = findGlobalRcFile();
|
|
285
|
+
if (rcPath)
|
|
286
|
+
return parseRcFile(rcPath);
|
|
287
|
+
return null;
|
|
288
|
+
}
|
|
289
|
+
// ─── Home directory ──────────────────────────────────────────────────
|
|
290
|
+
/** Get the global state directory (~/.honeyb/), creating if needed */
|
|
291
|
+
export function getHomeDir() {
|
|
292
|
+
if (!existsSync(HONEYB_DIR)) {
|
|
293
|
+
mkdirSync(HONEYB_DIR, { recursive: true });
|
|
294
|
+
}
|
|
295
|
+
return HONEYB_DIR;
|
|
296
|
+
}
|
|
297
|
+
/** Get project slug for per-project state in ~/.honeyb/projects/ */
|
|
298
|
+
export function getProjectSlug(projectRoot) {
|
|
299
|
+
const root = resolve(projectRoot || process.cwd());
|
|
300
|
+
// Replace path separators with dashes, strip leading slash
|
|
301
|
+
return root.replace(/^\//, '').replace(/\//g, '-');
|
|
302
|
+
}
|
|
303
|
+
/** Get or create the project-specific state directory inside ~/.honeyb/projects/ */
|
|
304
|
+
export function getGlobalProjectDir(projectRoot) {
|
|
305
|
+
const slug = getProjectSlug(projectRoot);
|
|
306
|
+
const dir = join(getHomeDir(), 'projects', slug);
|
|
307
|
+
if (!existsSync(dir)) {
|
|
308
|
+
mkdirSync(dir, { recursive: true });
|
|
309
|
+
}
|
|
310
|
+
return dir;
|
|
311
|
+
}
|
|
312
|
+
/** Get or create the local project state directory (.honeyb/) */
|
|
313
|
+
export function getProjectStateDir(projectRoot) {
|
|
314
|
+
const root = resolve(projectRoot || process.cwd());
|
|
315
|
+
const dir = join(root, PROJECT_STATE_DIR);
|
|
316
|
+
if (!existsSync(dir)) {
|
|
317
|
+
mkdirSync(dir, { recursive: true });
|
|
318
|
+
}
|
|
319
|
+
return dir;
|
|
320
|
+
}
|
|
321
|
+
// ─── Session state (.honeyb/session.json) ────────────────────────────
|
|
322
|
+
export function loadSessionState(projectRoot) {
|
|
323
|
+
const dir = join(resolve(projectRoot || process.cwd()), PROJECT_STATE_DIR);
|
|
324
|
+
const path = join(dir, SESSION_FILE);
|
|
325
|
+
if (!existsSync(path))
|
|
326
|
+
return {};
|
|
327
|
+
try {
|
|
328
|
+
return JSON.parse(readFileSync(path, 'utf8'));
|
|
329
|
+
}
|
|
330
|
+
catch {
|
|
331
|
+
return {};
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
export function saveSessionState(state, projectRoot) {
|
|
335
|
+
const dir = getProjectStateDir(projectRoot);
|
|
336
|
+
const path = join(dir, SESSION_FILE);
|
|
337
|
+
writeFileSync(path, JSON.stringify(state, null, 2) + '\n');
|
|
338
|
+
}
|
|
339
|
+
// ─── Brood state (.honeyb/brood.state.json) ──────────────────────────
|
|
340
|
+
export function loadBroodState(projectRoot) {
|
|
341
|
+
const dir = join(resolve(projectRoot || process.cwd()), PROJECT_STATE_DIR);
|
|
342
|
+
const path = join(dir, BROOD_STATE_FILE);
|
|
343
|
+
if (!existsSync(path))
|
|
344
|
+
return null;
|
|
345
|
+
try {
|
|
346
|
+
return JSON.parse(readFileSync(path, 'utf8'));
|
|
347
|
+
}
|
|
348
|
+
catch {
|
|
349
|
+
return null;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
export function saveBroodState(state, projectRoot) {
|
|
353
|
+
const dir = getProjectStateDir(projectRoot);
|
|
354
|
+
const path = join(dir, BROOD_STATE_FILE);
|
|
355
|
+
writeFileSync(path, JSON.stringify(state, null, 2) + '\n');
|
|
356
|
+
}
|
|
357
|
+
export function clearBroodState(projectRoot) {
|
|
358
|
+
const dir = join(resolve(projectRoot || process.cwd()), PROJECT_STATE_DIR);
|
|
359
|
+
const path = join(dir, BROOD_STATE_FILE);
|
|
360
|
+
if (existsSync(path))
|
|
361
|
+
unlinkSync(path);
|
|
362
|
+
}
|
|
363
|
+
// ─── Log directory ───────────────────────────────────────────────────
|
|
364
|
+
/** Get the log directory for a project */
|
|
365
|
+
export function getLogDir(projectRoot) {
|
|
366
|
+
const dir = join(getGlobalProjectDir(projectRoot), LOGS_DIR);
|
|
367
|
+
if (!existsSync(dir)) {
|
|
368
|
+
mkdirSync(dir, { recursive: true });
|
|
369
|
+
}
|
|
370
|
+
return dir;
|
|
371
|
+
}
|
|
372
|
+
/** Generate a timestamped log file path */
|
|
373
|
+
export function getLogPath(projectRoot) {
|
|
374
|
+
const dir = getLogDir(projectRoot);
|
|
375
|
+
const ts = new Date().toISOString().replace(/[:.]/g, '-');
|
|
376
|
+
return join(dir, `${ts}.jsonl`);
|
|
377
|
+
}
|
|
378
|
+
/** Rotate logs — keep only the most recent MAX_LOG_FILES */
|
|
379
|
+
export function rotateLogs(projectRoot) {
|
|
380
|
+
const dir = getLogDir(projectRoot);
|
|
381
|
+
try {
|
|
382
|
+
const files = readdirSync(dir)
|
|
383
|
+
.filter(f => f.endsWith('.jsonl'))
|
|
384
|
+
.sort()
|
|
385
|
+
.reverse();
|
|
386
|
+
for (let i = MAX_LOG_FILES; i < files.length; i++) {
|
|
387
|
+
unlinkSync(join(dir, files[i]));
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
catch {
|
|
391
|
+
// Ignore rotation errors
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
// ─── Global specs/dances ─────────────────────────────────────────────
|
|
395
|
+
/** Get the global specs directory (~/.honeyb/specs/) */
|
|
396
|
+
export function getSpecsDir() {
|
|
397
|
+
const dir = join(getHomeDir(), SPECS_DIR);
|
|
398
|
+
if (!existsSync(dir)) {
|
|
399
|
+
mkdirSync(dir, { recursive: true });
|
|
400
|
+
}
|
|
401
|
+
return dir;
|
|
402
|
+
}
|
|
403
|
+
/** Get the global dances directory (~/.honeyb/dances/) */
|
|
404
|
+
export function getDancesDir() {
|
|
405
|
+
const dir = join(getHomeDir(), DANCES_DIR);
|
|
406
|
+
if (!existsSync(dir)) {
|
|
407
|
+
mkdirSync(dir, { recursive: true });
|
|
408
|
+
}
|
|
409
|
+
return dir;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Resolve a spec reference: absolute path, relative path, URL, or global name.
|
|
413
|
+
* Returns the resolved path or URL.
|
|
414
|
+
*/
|
|
415
|
+
export function resolveSpecPath(ref, baseDir) {
|
|
416
|
+
// URL
|
|
417
|
+
if (ref.startsWith('http://') || ref.startsWith('https://'))
|
|
418
|
+
return ref;
|
|
419
|
+
// Absolute path
|
|
420
|
+
if (ref.startsWith('/'))
|
|
421
|
+
return ref;
|
|
422
|
+
// Relative path — resolve against baseDir
|
|
423
|
+
const base = baseDir || process.cwd();
|
|
424
|
+
const local = join(base, ref);
|
|
425
|
+
if (existsSync(local))
|
|
426
|
+
return local;
|
|
427
|
+
// Global install
|
|
428
|
+
const globalPath = join(getHomeDir(), SPECS_DIR, ref.endsWith('.acp.yaml') ? ref : `${ref}.acp.yaml`);
|
|
429
|
+
if (existsSync(globalPath))
|
|
430
|
+
return globalPath;
|
|
431
|
+
// Return original (caller handles error)
|
|
432
|
+
return local;
|
|
433
|
+
}
|
|
434
|
+
// ─── Legacy support ──────────────────────────────────────────────────
|
|
435
|
+
function findLegacyConfig(startDir) {
|
|
436
|
+
let dir = resolve(startDir || process.cwd());
|
|
437
|
+
const root = '/';
|
|
438
|
+
while (true) {
|
|
439
|
+
const candidate = join(dir, LEGACY_CONFIG_FILE);
|
|
440
|
+
if (existsSync(candidate))
|
|
441
|
+
return candidate;
|
|
442
|
+
const parent = dirname(dir);
|
|
443
|
+
if (parent === dir || dir === root)
|
|
444
|
+
return null;
|
|
445
|
+
dir = parent;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Parse legacy .wgl.json and map to WglRcConfig structure.
|
|
450
|
+
* server/namespace/role → top-level, autoClaimFiles/hookTimeout → cli.*
|
|
451
|
+
*/
|
|
452
|
+
function parseLegacyWglJson(filePath) {
|
|
453
|
+
try {
|
|
454
|
+
const raw = JSON.parse(readFileSync(filePath, 'utf8'));
|
|
455
|
+
const config = {};
|
|
456
|
+
if (raw.server)
|
|
457
|
+
config.server = raw.server;
|
|
458
|
+
if (raw.namespace)
|
|
459
|
+
config.namespace = raw.namespace;
|
|
460
|
+
if (raw.role)
|
|
461
|
+
config.role = raw.role;
|
|
462
|
+
if (raw.autoClaimFiles !== undefined) {
|
|
463
|
+
config.cli = { ...config.cli, autoClaimFiles: raw.autoClaimFiles };
|
|
464
|
+
}
|
|
465
|
+
if (raw.hookTimeout !== undefined) {
|
|
466
|
+
config.cli = { ...config.cli, hookTimeout: raw.hookTimeout };
|
|
467
|
+
}
|
|
468
|
+
return config;
|
|
469
|
+
}
|
|
470
|
+
catch {
|
|
471
|
+
return null;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
//# sourceMappingURL=loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/config/loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACtG,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EACL,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAC3C,iBAAiB,EAAE,kBAAkB,EAAE,YAAY,EACnD,gBAAgB,EAAE,QAAQ,EAAE,aAAa,EACzC,SAAS,EAAE,UAAU,GACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE/D,wEAAwE;AAExE;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,QAAiB;IAC1C,IAAI,GAAG,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7C,MAAM,IAAI,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,6BAA6B;IAEjF,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,QAAgB;IAC1C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;QACvD,MAAM,MAAM,GAAgB,EAAE,CAAC;QAC/B,IAAI,GAAG,CAAC,MAAM;YAAE,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QAC3C,IAAI,GAAG,CAAC,SAAS;YAAE,MAAM,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;QACpD,IAAI,GAAG,CAAC,IAAI;YAAE,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;QACrC,IAAI,GAAG,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;YACrC,MAAM,CAAC,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,CAAC,cAAc,EAAE,CAAC;QACrE,CAAC;QACD,IAAI,GAAG,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,CAAC,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,CAAC,WAAW,EAAE,CAAC;QAC/D,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One-time migration from legacy paths to unified config.
|
|
3
|
+
*
|
|
4
|
+
* Migrations are non-destructive: old files remain as fallback.
|
|
5
|
+
* Each migration checks for completion before running.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Migration 1: Global paths
|
|
9
|
+
* ~/.wgl/auth.json → ~/.honeyb/auth.json
|
|
10
|
+
* ~/.wgl/config.json → ~/.wglrc.json
|
|
11
|
+
*
|
|
12
|
+
* Migration 4: Integrations
|
|
13
|
+
* ~/.config/honeybee/integrations.json → ~/.honeyb/integrations.json
|
|
14
|
+
*/
|
|
15
|
+
export declare function migrateGlobal(): void;
|
|
16
|
+
/**
|
|
17
|
+
* Migration 2: Project-level
|
|
18
|
+
* .wgl.json → .wglrc.json (preferences) + .honeyb/session.json (state)
|
|
19
|
+
*
|
|
20
|
+
* Migration 3: Project state directory
|
|
21
|
+
* .honeybee/brood.state.json → .honeyb/brood.state.json
|
|
22
|
+
*/
|
|
23
|
+
export declare function migrateProject(startDir?: string): void;
|
|
24
|
+
/** Reset migration state (for testing) */
|
|
25
|
+
export declare function _resetMigrationState(): void;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One-time migration from legacy paths to unified config.
|
|
3
|
+
*
|
|
4
|
+
* Migrations are non-destructive: old files remain as fallback.
|
|
5
|
+
* Each migration checks for completion before running.
|
|
6
|
+
*/
|
|
7
|
+
import { readFileSync, writeFileSync, existsSync, mkdirSync, copyFileSync, chmodSync, } from 'node:fs';
|
|
8
|
+
import { join, resolve } from 'node:path';
|
|
9
|
+
import { homedir } from 'node:os';
|
|
10
|
+
import { HONEYB_DIR, LEGACY_WGL_DIR, AUTH_FILE, INTEGRATIONS_FILE, PROJECT_STATE_DIR, LEGACY_PROJECT_STATE_DIR, LEGACY_CONFIG_FILE, SESSION_FILE, BROOD_STATE_FILE, } from './constants.js';
|
|
11
|
+
let globalMigrated = false;
|
|
12
|
+
const projectMigrated = new Set();
|
|
13
|
+
/**
|
|
14
|
+
* Migration 1: Global paths
|
|
15
|
+
* ~/.wgl/auth.json → ~/.honeyb/auth.json
|
|
16
|
+
* ~/.wgl/config.json → ~/.wglrc.json
|
|
17
|
+
*
|
|
18
|
+
* Migration 4: Integrations
|
|
19
|
+
* ~/.config/honeybee/integrations.json → ~/.honeyb/integrations.json
|
|
20
|
+
*/
|
|
21
|
+
export function migrateGlobal() {
|
|
22
|
+
if (globalMigrated)
|
|
23
|
+
return;
|
|
24
|
+
globalMigrated = true;
|
|
25
|
+
// Auth migration
|
|
26
|
+
const legacyAuth = join(LEGACY_WGL_DIR, 'auth.json');
|
|
27
|
+
const newAuth = join(HONEYB_DIR, AUTH_FILE);
|
|
28
|
+
if (existsSync(legacyAuth) && !existsSync(newAuth)) {
|
|
29
|
+
if (!existsSync(HONEYB_DIR))
|
|
30
|
+
mkdirSync(HONEYB_DIR, { recursive: true });
|
|
31
|
+
copyFileSync(legacyAuth, newAuth);
|
|
32
|
+
chmodSync(newAuth, 0o600);
|
|
33
|
+
console.error('[honeyb] Migrated auth store: ~/.wgl/auth.json → ~/.honeyb/auth.json');
|
|
34
|
+
}
|
|
35
|
+
// Config migration: ~/.wgl/config.json → ~/.wglrc.json
|
|
36
|
+
const legacyConfig = join(LEGACY_WGL_DIR, 'config.json');
|
|
37
|
+
const home = homedir();
|
|
38
|
+
const newRcPath = join(home, '.wglrc.json');
|
|
39
|
+
if (existsSync(legacyConfig) && !existsSync(newRcPath)) {
|
|
40
|
+
try {
|
|
41
|
+
const raw = JSON.parse(readFileSync(legacyConfig, 'utf8'));
|
|
42
|
+
const rc = {};
|
|
43
|
+
// Map old field names to new structure
|
|
44
|
+
if (raw.defaultPlatform)
|
|
45
|
+
rc.platform = raw.defaultPlatform;
|
|
46
|
+
if (raw.defaultRole)
|
|
47
|
+
rc.role = raw.defaultRole;
|
|
48
|
+
if (raw.activeProfile)
|
|
49
|
+
rc.activeProfile = raw.activeProfile;
|
|
50
|
+
if (raw.editor)
|
|
51
|
+
rc.cli = { ...rc.cli, editor: raw.editor };
|
|
52
|
+
// Copy unknown keys to top-level (extensible config)
|
|
53
|
+
const knownKeys = new Set(['defaultPlatform', 'defaultRole', 'activeProfile', 'editor']);
|
|
54
|
+
for (const [k, v] of Object.entries(raw)) {
|
|
55
|
+
if (!knownKeys.has(k) && typeof v === 'string') {
|
|
56
|
+
rc[k] = v;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (Object.keys(rc).length > 0) {
|
|
60
|
+
writeFileSync(newRcPath, JSON.stringify(rc, null, 2) + '\n');
|
|
61
|
+
console.error('[honeyb] Migrated global config: ~/.wgl/config.json → ~/.wglrc.json');
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
// Config migration failed — not critical, defaults will be used
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// Integrations migration
|
|
69
|
+
const legacyIntegrations = join(homedir(), '.config', 'honeybee', 'integrations.json');
|
|
70
|
+
const newIntegrations = join(HONEYB_DIR, INTEGRATIONS_FILE);
|
|
71
|
+
if (existsSync(legacyIntegrations) && !existsSync(newIntegrations)) {
|
|
72
|
+
if (!existsSync(HONEYB_DIR))
|
|
73
|
+
mkdirSync(HONEYB_DIR, { recursive: true });
|
|
74
|
+
copyFileSync(legacyIntegrations, newIntegrations);
|
|
75
|
+
console.error('[honeyb] Migrated integrations: ~/.config/honeybee/integrations.json → ~/.honeyb/integrations.json');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Migration 2: Project-level
|
|
80
|
+
* .wgl.json → .wglrc.json (preferences) + .honeyb/session.json (state)
|
|
81
|
+
*
|
|
82
|
+
* Migration 3: Project state directory
|
|
83
|
+
* .honeybee/brood.state.json → .honeyb/brood.state.json
|
|
84
|
+
*/
|
|
85
|
+
export function migrateProject(startDir) {
|
|
86
|
+
const root = resolve(startDir || process.cwd());
|
|
87
|
+
if (projectMigrated.has(root))
|
|
88
|
+
return;
|
|
89
|
+
projectMigrated.add(root);
|
|
90
|
+
// Migration 2: .wgl.json → split
|
|
91
|
+
const legacyWglJson = join(root, LEGACY_CONFIG_FILE);
|
|
92
|
+
const newRcPath = join(root, '.wglrc.json');
|
|
93
|
+
const newStateDir = join(root, PROJECT_STATE_DIR);
|
|
94
|
+
const newSessionPath = join(newStateDir, SESSION_FILE);
|
|
95
|
+
if (existsSync(legacyWglJson) && !existsSync(newRcPath)) {
|
|
96
|
+
try {
|
|
97
|
+
const raw = JSON.parse(readFileSync(legacyWglJson, 'utf8'));
|
|
98
|
+
// Preferences → .wglrc.json
|
|
99
|
+
const rc = {};
|
|
100
|
+
if (raw.server)
|
|
101
|
+
rc.server = raw.server;
|
|
102
|
+
if (raw.namespace)
|
|
103
|
+
rc.namespace = raw.namespace;
|
|
104
|
+
if (raw.role)
|
|
105
|
+
rc.role = raw.role;
|
|
106
|
+
if (raw.autoClaimFiles !== undefined || raw.hookTimeout !== undefined) {
|
|
107
|
+
rc.cli = {};
|
|
108
|
+
if (raw.autoClaimFiles !== undefined)
|
|
109
|
+
rc.cli.autoClaimFiles = raw.autoClaimFiles;
|
|
110
|
+
if (raw.hookTimeout !== undefined)
|
|
111
|
+
rc.cli.hookTimeout = raw.hookTimeout;
|
|
112
|
+
}
|
|
113
|
+
if (Object.keys(rc).length > 0) {
|
|
114
|
+
writeFileSync(newRcPath, JSON.stringify(rc, null, 2) + '\n');
|
|
115
|
+
}
|
|
116
|
+
// Runtime state → .honeyb/session.json
|
|
117
|
+
const session = {};
|
|
118
|
+
if (raw.agentId)
|
|
119
|
+
session.agentId = raw.agentId;
|
|
120
|
+
if (raw.lastEventCursor !== undefined)
|
|
121
|
+
session.lastEventCursor = raw.lastEventCursor;
|
|
122
|
+
if (raw.autoPublishDiscoveries !== undefined)
|
|
123
|
+
session.autoPublishDiscoveries = raw.autoPublishDiscoveries;
|
|
124
|
+
if (Object.keys(session).length > 0) {
|
|
125
|
+
if (!existsSync(newStateDir))
|
|
126
|
+
mkdirSync(newStateDir, { recursive: true });
|
|
127
|
+
writeFileSync(newSessionPath, JSON.stringify(session, null, 2) + '\n');
|
|
128
|
+
}
|
|
129
|
+
console.error('[honeyb] Migrated project config: .wgl.json → .wglrc.json + .honeyb/session.json');
|
|
130
|
+
}
|
|
131
|
+
catch {
|
|
132
|
+
// Migration failed — not critical, .wgl.json still read as fallback
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
// Migration 3: .honeybee/ → .honeyb/
|
|
136
|
+
const legacyStateDir = join(root, LEGACY_PROJECT_STATE_DIR);
|
|
137
|
+
const legacyBroodState = join(legacyStateDir, 'brood.state.json');
|
|
138
|
+
const newBroodState = join(newStateDir, BROOD_STATE_FILE);
|
|
139
|
+
if (existsSync(legacyBroodState) && !existsSync(newBroodState)) {
|
|
140
|
+
if (!existsSync(newStateDir))
|
|
141
|
+
mkdirSync(newStateDir, { recursive: true });
|
|
142
|
+
copyFileSync(legacyBroodState, newBroodState);
|
|
143
|
+
console.error('[honeyb] Migrated brood state: .honeybee/brood.state.json → .honeyb/brood.state.json');
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/** Reset migration state (for testing) */
|
|
147
|
+
export function _resetMigrationState() {
|
|
148
|
+
globalMigrated = false;
|
|
149
|
+
projectMigrated.clear();
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.js","sourceRoot":"","sources":["../../src/config/migration.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAClD,YAAY,EAAE,SAAS,GACxB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EACL,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,iBAAiB,EACxD,iBAAiB,EAAE,wBAAwB,EAAE,kBAAkB,EAC/D,YAAY,EAAE,gBAAgB,GAC/B,MAAM,gBAAgB,CAAC;AAGxB,IAAI,cAAc,GAAG,KAAK,CAAC;AAC3B,MAAM,eAAe,GAAG,IAAI,GAAG,EAAU,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa;IAC3B,IAAI,cAAc;QAAE,OAAO;IAC3B,cAAc,GAAG,IAAI,CAAC;IAEtB,iBAAiB;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CAAC;QAAC,MAAM,CAAC;YACP,oEAAoE;QACtE,CAAC;IACH,CAAC;IAED,qCAAqC;IACrC,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,EAAE,wBAAwB,CAAC,CAAC;IAC5D,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;IAClE,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;IAE1D,IAAI,UAAU,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QAC/D,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;YAAE,SAAS,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1E,YAAY,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;QAC9C,OAAO,CAAC,KAAK,CAAC,sFAAsF,CAAC,CAAC;IACxG,CAAC;AACH,CAAC;AAED,0CAA0C;AAC1C,MAAM,UAAU,oBAAoB;IAClC,cAAc,GAAG,KAAK,CAAC;IACvB,eAAe,CAAC,KAAK,EAAE,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified config types for the Honeybee toolchain.
|
|
3
|
+
*
|
|
4
|
+
* Two scopes, two mechanisms:
|
|
5
|
+
* .wglrc (user-editable, committable) — preferences
|
|
6
|
+
* .honeyb/ (tool-managed, gitignored) — runtime state
|
|
7
|
+
*/
|
|
8
|
+
/** User preferences stored in .wglrc files */
|
|
9
|
+
export interface WglRcConfig {
|
|
10
|
+
platform?: string;
|
|
11
|
+
activeProfile?: string;
|
|
12
|
+
server?: string;
|
|
13
|
+
namespace?: string;
|
|
14
|
+
role?: string;
|
|
15
|
+
brood?: string;
|
|
16
|
+
cli?: {
|
|
17
|
+
editor?: string;
|
|
18
|
+
hookTimeout?: number;
|
|
19
|
+
autoClaimFiles?: boolean;
|
|
20
|
+
};
|
|
21
|
+
incubator?: {
|
|
22
|
+
port?: number;
|
|
23
|
+
backend?: 'memory' | 'sqlite' | 'redis';
|
|
24
|
+
dbPath?: string;
|
|
25
|
+
verbose?: boolean;
|
|
26
|
+
guard?: boolean;
|
|
27
|
+
};
|
|
28
|
+
carapace?: {
|
|
29
|
+
mode?: 'block' | 'warn' | 'log' | 'pass';
|
|
30
|
+
threshold?: number;
|
|
31
|
+
proxyPort?: number;
|
|
32
|
+
upstream?: string;
|
|
33
|
+
};
|
|
34
|
+
telemetry?: {
|
|
35
|
+
endpoint?: string;
|
|
36
|
+
apiKey?: string;
|
|
37
|
+
};
|
|
38
|
+
pricing?: Record<string, {
|
|
39
|
+
input: number;
|
|
40
|
+
output: number;
|
|
41
|
+
}>;
|
|
42
|
+
servers?: Record<string, McpServerDef>;
|
|
43
|
+
}
|
|
44
|
+
/** MCP server definition for carapace proxy */
|
|
45
|
+
export interface McpServerDef {
|
|
46
|
+
command: string;
|
|
47
|
+
args?: string[];
|
|
48
|
+
env?: Record<string, string>;
|
|
49
|
+
enabled?: boolean;
|
|
50
|
+
}
|
|
51
|
+
/** Runtime state in .honeyb/session.json (NOT committable) */
|
|
52
|
+
export interface SessionState {
|
|
53
|
+
agentId?: string;
|
|
54
|
+
lastEventCursor?: number;
|
|
55
|
+
autoPublishDiscoveries?: boolean;
|
|
56
|
+
}
|
|
57
|
+
/** Brood runtime state in .honeyb/brood.state.json */
|
|
58
|
+
export interface BroodState {
|
|
59
|
+
id: string;
|
|
60
|
+
pids: number[];
|
|
61
|
+
ports: number[];
|
|
62
|
+
socketPath?: string;
|
|
63
|
+
startedAt: string;
|
|
64
|
+
}
|
|
65
|
+
/** Fully resolved config (all sources merged, frozen) */
|
|
66
|
+
export interface ResolvedConfig {
|
|
67
|
+
readonly platform: string;
|
|
68
|
+
readonly activeProfile: string;
|
|
69
|
+
readonly server?: string;
|
|
70
|
+
readonly namespace?: string;
|
|
71
|
+
readonly role?: string;
|
|
72
|
+
readonly brood?: string;
|
|
73
|
+
readonly cli: {
|
|
74
|
+
readonly editor: string;
|
|
75
|
+
readonly hookTimeout: number;
|
|
76
|
+
readonly autoClaimFiles: boolean;
|
|
77
|
+
};
|
|
78
|
+
readonly incubator: {
|
|
79
|
+
readonly port: number;
|
|
80
|
+
readonly backend: 'memory' | 'sqlite' | 'redis';
|
|
81
|
+
readonly dbPath?: string;
|
|
82
|
+
readonly verbose: boolean;
|
|
83
|
+
readonly guard: boolean;
|
|
84
|
+
};
|
|
85
|
+
readonly carapace: {
|
|
86
|
+
readonly mode: 'block' | 'warn' | 'log' | 'pass';
|
|
87
|
+
readonly threshold: number;
|
|
88
|
+
readonly proxyPort: number;
|
|
89
|
+
readonly upstream?: string;
|
|
90
|
+
};
|
|
91
|
+
readonly telemetry: {
|
|
92
|
+
readonly endpoint?: string;
|
|
93
|
+
readonly apiKey?: string;
|
|
94
|
+
};
|
|
95
|
+
readonly pricing: Readonly<Record<string, {
|
|
96
|
+
input: number;
|
|
97
|
+
output: number;
|
|
98
|
+
}>>;
|
|
99
|
+
readonly servers: Readonly<Record<string, McpServerDef>>;
|
|
100
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
package/dist/platform.d.ts
CHANGED
package/dist/platform.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAqBvF,MAAM,UAAU,oBAAoB,CAAC,OAA8B;IACjE,MAAM,WAAW,GAAG,OAAO,EAAE,WAAW,IAAI,UAAU,CAAC;IACvD,MAAM,YAAY,GAAG,gB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A4B,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC;QAEnF,oBAAoB;QAEpB,iBAAiB,EAAE,CAAC,IAAa,EAAE,EAAE,CACnC,WAAW,CAAoB,KAAK,EAAE,mCAAmC,IAAI,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAEzG,iBAAiB,EAAE,CAAC,IAAa,EAAE,EAAE,CACnC,WAAW,CAAwF,KAAK,EAAE,mCAAmC,IAAI,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAE7K,eAAe,EAAE,CAAC,IAA0C,EAAE,EAAE;YAC9D,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;YACrC,IAAI,IAAI,EAAE,KAAK;gBAAE,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YACzD,IAAI,IAAI,EAAE,MAAM;gBAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YAC5D,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;YAC7B,OAAO,WAAW,CAAsB,KAAK,EAAE,iCAAiC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACxG,CAAC;QAED,eAAe;QAEf,KAAK,EAAE,GAAG,EAAE,CACV,WAAW,CAA6C,KAAK,EAAE,UAAU,CAAC;KAC7E,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@honeybee-ai/hivemind-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Hivemind platform SDK — auth, marketplace, colony, carapace, contracts, integrations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
"./telemetry": {
|
|
22
22
|
"types": "./dist/telemetry/index.d.ts",
|
|
23
23
|
"import": "./dist/telemetry/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./config": {
|
|
26
|
+
"types": "./dist/config/index.d.ts",
|
|
27
|
+
"import": "./dist/config/index.js"
|
|
24
28
|
}
|
|
25
29
|
},
|
|
26
30
|
"files": [
|