@askexenow/exe-os 0.9.64 → 0.9.66
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/deploy/stack-manifests/v0.9.json +4 -4
- package/dist/bin/backfill-conversations.js +22 -0
- package/dist/bin/backfill-responses.js +22 -0
- package/dist/bin/backfill-vectors.js +22 -0
- package/dist/bin/cleanup-stale-review-tasks.js +22 -0
- package/dist/bin/cli.js +2280 -1199
- package/dist/bin/exe-agent-config.js +4 -0
- package/dist/bin/exe-agent.js +16 -0
- package/dist/bin/exe-assign.js +22 -0
- package/dist/bin/exe-boot.js +116 -7
- package/dist/bin/exe-call.js +16 -0
- package/dist/bin/exe-cloud.js +6671 -464
- package/dist/bin/exe-dispatch.js +24 -0
- package/dist/bin/exe-doctor.js +2845 -1223
- package/dist/bin/exe-export-behaviors.js +24 -0
- package/dist/bin/exe-forget.js +22 -0
- package/dist/bin/exe-gateway.js +24 -0
- package/dist/bin/exe-heartbeat.js +23 -0
- package/dist/bin/exe-kill.js +22 -0
- package/dist/bin/exe-launch-agent.js +24 -0
- package/dist/bin/exe-link.js +310 -178
- package/dist/bin/exe-new-employee.js +127 -1
- package/dist/bin/exe-pending-messages.js +22 -0
- package/dist/bin/exe-pending-notifications.js +22 -0
- package/dist/bin/exe-pending-reviews.js +22 -0
- package/dist/bin/exe-rename.js +22 -0
- package/dist/bin/exe-review.js +22 -0
- package/dist/bin/exe-search.js +24 -0
- package/dist/bin/exe-session-cleanup.js +24 -0
- package/dist/bin/exe-settings.js +10 -0
- package/dist/bin/exe-start-codex.js +135 -1
- package/dist/bin/exe-start-opencode.js +149 -1
- package/dist/bin/exe-status.js +22 -0
- package/dist/bin/exe-team.js +22 -0
- package/dist/bin/git-sweep.js +24 -0
- package/dist/bin/graph-backfill.js +22 -0
- package/dist/bin/graph-export.js +22 -0
- package/dist/bin/install.js +115 -1
- package/dist/bin/intercom-check.js +24 -0
- package/dist/bin/scan-tasks.js +24 -0
- package/dist/bin/setup.js +412 -157
- package/dist/bin/shard-migrate.js +22 -0
- package/dist/bin/update.js +4 -0
- package/dist/gateway/index.js +24 -0
- package/dist/hooks/bug-report-worker.js +135 -42
- package/dist/hooks/codex-stop-task-finalizer.js +24 -0
- package/dist/hooks/commit-complete.js +24 -0
- package/dist/hooks/error-recall.js +24 -0
- package/dist/hooks/exe-heartbeat-hook.js +4 -0
- package/dist/hooks/ingest-worker.js +4 -0
- package/dist/hooks/ingest.js +23 -0
- package/dist/hooks/instructions-loaded.js +22 -0
- package/dist/hooks/notification.js +22 -0
- package/dist/hooks/post-compact.js +22 -0
- package/dist/hooks/post-tool-combined.js +24 -0
- package/dist/hooks/pre-compact.js +260 -109
- package/dist/hooks/pre-tool-use.js +22 -0
- package/dist/hooks/prompt-submit.js +24 -0
- package/dist/hooks/session-end.js +161 -122
- package/dist/hooks/session-start.js +142 -0
- package/dist/hooks/stop.js +23 -0
- package/dist/hooks/subagent-stop.js +22 -0
- package/dist/hooks/summary-worker.js +195 -79
- package/dist/index.js +24 -0
- package/dist/lib/agent-config.js +4 -0
- package/dist/lib/cloud-sync.js +50 -6
- package/dist/lib/config.js +12 -0
- package/dist/lib/consolidation.js +4 -0
- package/dist/lib/database.js +4 -0
- package/dist/lib/db-daemon-client.js +4 -0
- package/dist/lib/db.js +4 -0
- package/dist/lib/device-registry.js +4 -0
- package/dist/lib/embedder.js +12 -0
- package/dist/lib/employee-templates.js +16 -0
- package/dist/lib/employees.js +4 -0
- package/dist/lib/exe-daemon-client.js +4 -0
- package/dist/lib/exe-daemon.js +1144 -480
- package/dist/lib/hybrid-search.js +24 -0
- package/dist/lib/identity.js +4 -0
- package/dist/lib/license.js +4 -0
- package/dist/lib/messaging.js +4 -0
- package/dist/lib/reminders.js +4 -0
- package/dist/lib/schedules.js +22 -0
- package/dist/lib/skill-learning.js +12 -0
- package/dist/lib/status-brief.js +39 -0
- package/dist/lib/store.js +22 -0
- package/dist/lib/task-router.js +4 -0
- package/dist/lib/tasks.js +12 -0
- package/dist/lib/tmux-routing.js +12 -0
- package/dist/lib/token-spend.js +4 -0
- package/dist/mcp/server.js +1045 -427
- package/dist/mcp/tools/complete-reminder.js +4 -0
- package/dist/mcp/tools/create-reminder.js +4 -0
- package/dist/mcp/tools/create-task.js +12 -0
- package/dist/mcp/tools/deactivate-behavior.js +4 -0
- package/dist/mcp/tools/list-reminders.js +4 -0
- package/dist/mcp/tools/list-tasks.js +4 -0
- package/dist/mcp/tools/send-message.js +4 -0
- package/dist/mcp/tools/update-task.js +12 -0
- package/dist/runtime/index.js +24 -0
- package/dist/tui/App.js +24 -0
- package/package.json +3 -2
- package/src/commands/exe/cloud.md +15 -8
- package/src/commands/exe/link.md +7 -6
- package/stack.release.json +2 -2
package/dist/bin/exe-agent.js
CHANGED
|
@@ -100,6 +100,10 @@ var init_config = __esm({
|
|
|
100
100
|
checkOnBoot: true,
|
|
101
101
|
autoInstall: false,
|
|
102
102
|
checkIntervalMs: 24 * 60 * 60 * 1e3
|
|
103
|
+
},
|
|
104
|
+
orchestration: {
|
|
105
|
+
phase: "phase_1_coo",
|
|
106
|
+
phaseSetBy: "default"
|
|
103
107
|
}
|
|
104
108
|
};
|
|
105
109
|
}
|
|
@@ -1325,6 +1329,12 @@ var PLATFORM_PROCEDURES = [
|
|
|
1325
1329
|
priority: "p0",
|
|
1326
1330
|
content: "Founder -> coordinator (the executive agent, internally routed as 'COO') -> CTO/CMO. CTO -> engineers. CMO -> content production. Never skip levels: the coordinator does not bypass managers for specialist work. Specialists report to their manager. If you need cross-team info, use ask_team_memory \u2014 don't read other agents' task folders. Each level owns dispatch downward and review upward."
|
|
1327
1331
|
},
|
|
1332
|
+
{
|
|
1333
|
+
title: "Customer orchestration maturity \u2014 recommend, never trap",
|
|
1334
|
+
domain: "workflow",
|
|
1335
|
+
priority: "p1",
|
|
1336
|
+
content: "New customers start best in Phase 1: founder \u2194 coordinator/Chief of Staff, building company context. Suggest Phase 2 executives when domain work repeats; suggest Phase 3 parallel execution only when review/permission gates are ready. This is guidance, not a blocker: users may jump phases anytime. Never overwrite their phase, role titles, identities, or custom org design."
|
|
1337
|
+
},
|
|
1328
1338
|
{
|
|
1329
1339
|
title: "Single dispatch path \u2014 create_task only",
|
|
1330
1340
|
domain: "workflow",
|
|
@@ -1383,6 +1393,12 @@ var PLATFORM_PROCEDURES = [
|
|
|
1383
1393
|
priority: "p0",
|
|
1384
1394
|
content: "exe-build-adv is MANDATORY for ALL work touching 3+ files. Run /exe-build-adv --auto BEFORE implementation. Pipeline: Spec \u2192 AC \u2192 Tests \u2192 Evaluate \u2192 Fix. No multi-file feature ships without pipeline artifacts. No exceptions \u2014 managers reject work without them."
|
|
1385
1395
|
},
|
|
1396
|
+
{
|
|
1397
|
+
title: "Commit discipline \u2014 never leave verified work floating",
|
|
1398
|
+
domain: "workflow",
|
|
1399
|
+
priority: "p1",
|
|
1400
|
+
content: "After any code-change batch passes typecheck/tests/build, run git status, summarize changed files, and commit with a clear message before ending the session. If work must remain uncommitted for review/dogfood, explicitly say so, list the files, and state the blocker. Never imply work is complete while verified changes are still floating locally."
|
|
1401
|
+
},
|
|
1386
1402
|
{
|
|
1387
1403
|
title: "Desktop and TUI are the same product",
|
|
1388
1404
|
domain: "architecture",
|
package/dist/bin/exe-assign.js
CHANGED
|
@@ -124,6 +124,11 @@ function normalizeAutoUpdate(raw) {
|
|
|
124
124
|
const userAU = raw.autoUpdate ?? {};
|
|
125
125
|
raw.autoUpdate = { ...defaultAU, ...userAU };
|
|
126
126
|
}
|
|
127
|
+
function normalizeOrchestration(raw) {
|
|
128
|
+
const defaultOrg = DEFAULT_CONFIG.orchestration;
|
|
129
|
+
const userOrg = raw.orchestration ?? {};
|
|
130
|
+
raw.orchestration = { ...defaultOrg, ...userOrg };
|
|
131
|
+
}
|
|
127
132
|
async function loadConfig() {
|
|
128
133
|
const dir = process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? EXE_AI_DIR;
|
|
129
134
|
await ensurePrivateDir(dir);
|
|
@@ -148,6 +153,7 @@ async function loadConfig() {
|
|
|
148
153
|
normalizeScalingRoadmap(migratedCfg);
|
|
149
154
|
normalizeSessionLifecycle(migratedCfg);
|
|
150
155
|
normalizeAutoUpdate(migratedCfg);
|
|
156
|
+
normalizeOrchestration(migratedCfg);
|
|
151
157
|
const config = { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db"), ...migratedCfg };
|
|
152
158
|
if (config.dbPath.startsWith("~")) {
|
|
153
159
|
config.dbPath = config.dbPath.replace(/^~/, os.homedir());
|
|
@@ -223,6 +229,10 @@ var init_config = __esm({
|
|
|
223
229
|
checkOnBoot: true,
|
|
224
230
|
autoInstall: false,
|
|
225
231
|
checkIntervalMs: 24 * 60 * 60 * 1e3
|
|
232
|
+
},
|
|
233
|
+
orchestration: {
|
|
234
|
+
phase: "phase_1_coo",
|
|
235
|
+
phaseSetBy: "default"
|
|
226
236
|
}
|
|
227
237
|
};
|
|
228
238
|
CONFIG_MIGRATIONS = [
|
|
@@ -3301,6 +3311,12 @@ var init_platform_procedures = __esm({
|
|
|
3301
3311
|
priority: "p0",
|
|
3302
3312
|
content: "Founder -> coordinator (the executive agent, internally routed as 'COO') -> CTO/CMO. CTO -> engineers. CMO -> content production. Never skip levels: the coordinator does not bypass managers for specialist work. Specialists report to their manager. If you need cross-team info, use ask_team_memory \u2014 don't read other agents' task folders. Each level owns dispatch downward and review upward."
|
|
3303
3313
|
},
|
|
3314
|
+
{
|
|
3315
|
+
title: "Customer orchestration maturity \u2014 recommend, never trap",
|
|
3316
|
+
domain: "workflow",
|
|
3317
|
+
priority: "p1",
|
|
3318
|
+
content: "New customers start best in Phase 1: founder \u2194 coordinator/Chief of Staff, building company context. Suggest Phase 2 executives when domain work repeats; suggest Phase 3 parallel execution only when review/permission gates are ready. This is guidance, not a blocker: users may jump phases anytime. Never overwrite their phase, role titles, identities, or custom org design."
|
|
3319
|
+
},
|
|
3304
3320
|
{
|
|
3305
3321
|
title: "Single dispatch path \u2014 create_task only",
|
|
3306
3322
|
domain: "workflow",
|
|
@@ -3359,6 +3375,12 @@ var init_platform_procedures = __esm({
|
|
|
3359
3375
|
priority: "p0",
|
|
3360
3376
|
content: "exe-build-adv is MANDATORY for ALL work touching 3+ files. Run /exe-build-adv --auto BEFORE implementation. Pipeline: Spec \u2192 AC \u2192 Tests \u2192 Evaluate \u2192 Fix. No multi-file feature ships without pipeline artifacts. No exceptions \u2014 managers reject work without them."
|
|
3361
3377
|
},
|
|
3378
|
+
{
|
|
3379
|
+
title: "Commit discipline \u2014 never leave verified work floating",
|
|
3380
|
+
domain: "workflow",
|
|
3381
|
+
priority: "p1",
|
|
3382
|
+
content: "After any code-change batch passes typecheck/tests/build, run git status, summarize changed files, and commit with a clear message before ending the session. If work must remain uncommitted for review/dogfood, explicitly say so, list the files, and state the blocker. Never imply work is complete while verified changes are still floating locally."
|
|
3383
|
+
},
|
|
3362
3384
|
{
|
|
3363
3385
|
title: "Desktop and TUI are the same product",
|
|
3364
3386
|
domain: "architecture",
|
package/dist/bin/exe-boot.js
CHANGED
|
@@ -150,6 +150,11 @@ function normalizeAutoUpdate(raw) {
|
|
|
150
150
|
const userAU = raw.autoUpdate ?? {};
|
|
151
151
|
raw.autoUpdate = { ...defaultAU, ...userAU };
|
|
152
152
|
}
|
|
153
|
+
function normalizeOrchestration(raw) {
|
|
154
|
+
const defaultOrg = DEFAULT_CONFIG.orchestration;
|
|
155
|
+
const userOrg = raw.orchestration ?? {};
|
|
156
|
+
raw.orchestration = { ...defaultOrg, ...userOrg };
|
|
157
|
+
}
|
|
153
158
|
async function loadConfig() {
|
|
154
159
|
const dir = process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? EXE_AI_DIR;
|
|
155
160
|
await ensurePrivateDir(dir);
|
|
@@ -174,6 +179,7 @@ async function loadConfig() {
|
|
|
174
179
|
normalizeScalingRoadmap(migratedCfg);
|
|
175
180
|
normalizeSessionLifecycle(migratedCfg);
|
|
176
181
|
normalizeAutoUpdate(migratedCfg);
|
|
182
|
+
normalizeOrchestration(migratedCfg);
|
|
177
183
|
const config = { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db"), ...migratedCfg };
|
|
178
184
|
if (config.dbPath.startsWith("~")) {
|
|
179
185
|
config.dbPath = config.dbPath.replace(/^~/, os.homedir());
|
|
@@ -197,6 +203,7 @@ function loadConfigSync() {
|
|
|
197
203
|
normalizeScalingRoadmap(migratedCfg);
|
|
198
204
|
normalizeSessionLifecycle(migratedCfg);
|
|
199
205
|
normalizeAutoUpdate(migratedCfg);
|
|
206
|
+
normalizeOrchestration(migratedCfg);
|
|
200
207
|
return { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db"), ...migratedCfg };
|
|
201
208
|
} catch {
|
|
202
209
|
return { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db") };
|
|
@@ -218,6 +225,7 @@ async function loadConfigFrom(configPath) {
|
|
|
218
225
|
normalizeScalingRoadmap(migratedCfg);
|
|
219
226
|
normalizeSessionLifecycle(migratedCfg);
|
|
220
227
|
normalizeAutoUpdate(migratedCfg);
|
|
228
|
+
normalizeOrchestration(migratedCfg);
|
|
221
229
|
return { ...DEFAULT_CONFIG, ...migratedCfg };
|
|
222
230
|
} catch {
|
|
223
231
|
return { ...DEFAULT_CONFIG };
|
|
@@ -289,6 +297,10 @@ var init_config = __esm({
|
|
|
289
297
|
checkOnBoot: true,
|
|
290
298
|
autoInstall: false,
|
|
291
299
|
checkIntervalMs: 24 * 60 * 60 * 1e3
|
|
300
|
+
},
|
|
301
|
+
orchestration: {
|
|
302
|
+
phase: "phase_1_coo",
|
|
303
|
+
phaseSetBy: "default"
|
|
292
304
|
}
|
|
293
305
|
};
|
|
294
306
|
CONFIG_MIGRATIONS = [
|
|
@@ -3028,6 +3040,12 @@ var init_platform_procedures = __esm({
|
|
|
3028
3040
|
priority: "p0",
|
|
3029
3041
|
content: "Founder -> coordinator (the executive agent, internally routed as 'COO') -> CTO/CMO. CTO -> engineers. CMO -> content production. Never skip levels: the coordinator does not bypass managers for specialist work. Specialists report to their manager. If you need cross-team info, use ask_team_memory \u2014 don't read other agents' task folders. Each level owns dispatch downward and review upward."
|
|
3030
3042
|
},
|
|
3043
|
+
{
|
|
3044
|
+
title: "Customer orchestration maturity \u2014 recommend, never trap",
|
|
3045
|
+
domain: "workflow",
|
|
3046
|
+
priority: "p1",
|
|
3047
|
+
content: "New customers start best in Phase 1: founder \u2194 coordinator/Chief of Staff, building company context. Suggest Phase 2 executives when domain work repeats; suggest Phase 3 parallel execution only when review/permission gates are ready. This is guidance, not a blocker: users may jump phases anytime. Never overwrite their phase, role titles, identities, or custom org design."
|
|
3048
|
+
},
|
|
3031
3049
|
{
|
|
3032
3050
|
title: "Single dispatch path \u2014 create_task only",
|
|
3033
3051
|
domain: "workflow",
|
|
@@ -3086,6 +3104,12 @@ var init_platform_procedures = __esm({
|
|
|
3086
3104
|
priority: "p0",
|
|
3087
3105
|
content: "exe-build-adv is MANDATORY for ALL work touching 3+ files. Run /exe-build-adv --auto BEFORE implementation. Pipeline: Spec \u2192 AC \u2192 Tests \u2192 Evaluate \u2192 Fix. No multi-file feature ships without pipeline artifacts. No exceptions \u2014 managers reject work without them."
|
|
3088
3106
|
},
|
|
3107
|
+
{
|
|
3108
|
+
title: "Commit discipline \u2014 never leave verified work floating",
|
|
3109
|
+
domain: "workflow",
|
|
3110
|
+
priority: "p1",
|
|
3111
|
+
content: "After any code-change batch passes typecheck/tests/build, run git status, summarize changed files, and commit with a clear message before ending the session. If work must remain uncommitted for review/dogfood, explicitly say so, list the files, and state the blocker. Never imply work is complete while verified changes are still floating locally."
|
|
3112
|
+
},
|
|
3089
3113
|
{
|
|
3090
3114
|
title: "Desktop and TUI are the same product",
|
|
3091
3115
|
domain: "architecture",
|
|
@@ -9020,8 +9044,10 @@ var init_db_backup = __esm({
|
|
|
9020
9044
|
// src/lib/cloud-sync.ts
|
|
9021
9045
|
var cloud_sync_exports = {};
|
|
9022
9046
|
__export(cloud_sync_exports, {
|
|
9047
|
+
CLOUD_RELINK_REQUIRED_MESSAGE: () => CLOUD_RELINK_REQUIRED_MESSAGE,
|
|
9023
9048
|
assertSecureEndpoint: () => assertSecureEndpoint,
|
|
9024
9049
|
buildRosterBlob: () => buildRosterBlob,
|
|
9050
|
+
clearCloudRelinkRequired: () => clearCloudRelinkRequired,
|
|
9025
9051
|
cloudPull: () => cloudPull,
|
|
9026
9052
|
cloudPullBehaviors: () => cloudPullBehaviors,
|
|
9027
9053
|
cloudPullBlob: () => cloudPullBlob,
|
|
@@ -9041,6 +9067,7 @@ __export(cloud_sync_exports, {
|
|
|
9041
9067
|
cloudPushRoster: () => cloudPushRoster,
|
|
9042
9068
|
cloudPushTasks: () => cloudPushTasks,
|
|
9043
9069
|
cloudSync: () => cloudSync,
|
|
9070
|
+
getCloudRelinkRequired: () => getCloudRelinkRequired,
|
|
9044
9071
|
mergeConfig: () => mergeConfig,
|
|
9045
9072
|
mergeRosterFromRemote: () => mergeRosterFromRemote,
|
|
9046
9073
|
pushToPostgres: () => pushToPostgres,
|
|
@@ -9061,31 +9088,43 @@ function logError(msg) {
|
|
|
9061
9088
|
} catch {
|
|
9062
9089
|
}
|
|
9063
9090
|
}
|
|
9091
|
+
function isTruthyEnv(value) {
|
|
9092
|
+
return /^(1|true|yes|on)$/i.test(value ?? "");
|
|
9093
|
+
}
|
|
9064
9094
|
function loadPgClient() {
|
|
9065
9095
|
if (_pgFailed) return null;
|
|
9066
|
-
const postgresUrl = process.env.DATABASE_URL;
|
|
9067
9096
|
const configPath = path25.join(EXE_AI_DIR, "config.json");
|
|
9068
9097
|
let cloudPostgresUrl;
|
|
9098
|
+
let configEnabled = false;
|
|
9069
9099
|
try {
|
|
9070
9100
|
if (existsSync21(configPath)) {
|
|
9071
9101
|
const cfg = JSON.parse(readFileSync15(configPath, "utf8"));
|
|
9072
9102
|
cloudPostgresUrl = cfg.cloud?.postgresUrl;
|
|
9073
|
-
|
|
9074
|
-
_pgFailed = true;
|
|
9075
|
-
return null;
|
|
9076
|
-
}
|
|
9103
|
+
configEnabled = cfg.cloud?.syncToPostgres === true;
|
|
9077
9104
|
}
|
|
9078
9105
|
} catch {
|
|
9079
9106
|
}
|
|
9080
|
-
const
|
|
9107
|
+
const envEnabled = isTruthyEnv(process.env.EXE_CLOUD_SYNC_TO_POSTGRES);
|
|
9108
|
+
if (!envEnabled && !configEnabled) {
|
|
9109
|
+
return null;
|
|
9110
|
+
}
|
|
9111
|
+
const url = process.env.DATABASE_URL || cloudPostgresUrl;
|
|
9081
9112
|
if (!url) {
|
|
9082
9113
|
_pgFailed = true;
|
|
9083
9114
|
return null;
|
|
9084
9115
|
}
|
|
9085
9116
|
if (!_pgPromise) {
|
|
9086
9117
|
_pgPromise = (async () => {
|
|
9118
|
+
if (!process.env.DATABASE_URL) process.env.DATABASE_URL = url;
|
|
9087
9119
|
const { createRequire: createRequire3 } = await import("module");
|
|
9088
9120
|
const { pathToFileURL: pathToFileURL3 } = await import("url");
|
|
9121
|
+
const explicitPath = process.env.EXE_OS_PRISMA_CLIENT_PATH;
|
|
9122
|
+
if (explicitPath) {
|
|
9123
|
+
const mod2 = await import(pathToFileURL3(explicitPath).href);
|
|
9124
|
+
const Ctor2 = mod2.PrismaClient ?? mod2.default?.PrismaClient;
|
|
9125
|
+
if (!Ctor2) throw new Error(`No PrismaClient at ${explicitPath}`);
|
|
9126
|
+
return new Ctor2();
|
|
9127
|
+
}
|
|
9089
9128
|
const exeDbRoot = process.env.EXE_DB_ROOT ?? path25.join(homedir2(), "exe-db");
|
|
9090
9129
|
const req = createRequire3(path25.join(exeDbRoot, "package.json"));
|
|
9091
9130
|
const entry = req.resolve("@prisma/client");
|
|
@@ -9262,6 +9301,24 @@ async function cloudPull(sinceVersion, config) {
|
|
|
9262
9301
|
return { records: [], maxVersion: sinceVersion };
|
|
9263
9302
|
}
|
|
9264
9303
|
}
|
|
9304
|
+
async function getCloudRelinkRequired(client = getClient()) {
|
|
9305
|
+
try {
|
|
9306
|
+
await client.execute("CREATE TABLE IF NOT EXISTS sync_meta (key TEXT PRIMARY KEY, value TEXT NOT NULL)");
|
|
9307
|
+
const relink = await client.execute("SELECT value FROM sync_meta WHERE key = 'cloud_relink_required' LIMIT 1");
|
|
9308
|
+
return String(relink.rows[0]?.value ?? "") === "1";
|
|
9309
|
+
} catch {
|
|
9310
|
+
return false;
|
|
9311
|
+
}
|
|
9312
|
+
}
|
|
9313
|
+
async function clearCloudRelinkRequired(client = getClient()) {
|
|
9314
|
+
await client.execute("CREATE TABLE IF NOT EXISTS sync_meta (key TEXT PRIMARY KEY, value TEXT NOT NULL)");
|
|
9315
|
+
await client.execute("INSERT OR REPLACE INTO sync_meta (key, value) VALUES ('cloud_relink_required', '0')");
|
|
9316
|
+
await client.execute({
|
|
9317
|
+
sql: "INSERT OR REPLACE INTO sync_meta (key, value) VALUES ('cloud_relinked_at', ?)",
|
|
9318
|
+
args: [(/* @__PURE__ */ new Date()).toISOString()]
|
|
9319
|
+
});
|
|
9320
|
+
await client.execute("DELETE FROM sync_meta WHERE key IN ('last_cloud_pull_version', 'last_cloud_push_version')");
|
|
9321
|
+
}
|
|
9265
9322
|
async function cloudSync(config) {
|
|
9266
9323
|
if (!isSyncCryptoInitialized()) {
|
|
9267
9324
|
try {
|
|
@@ -9282,6 +9339,12 @@ async function cloudSync(config) {
|
|
|
9282
9339
|
} catch {
|
|
9283
9340
|
throw new Error("[cloud-sync] Database not initialized. Call initStore() before cloudSync().");
|
|
9284
9341
|
}
|
|
9342
|
+
try {
|
|
9343
|
+
if (await getCloudRelinkRequired(client)) throw new Error(CLOUD_RELINK_REQUIRED_MESSAGE);
|
|
9344
|
+
} catch (err) {
|
|
9345
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
9346
|
+
if (msg.includes("Paused after key rotation")) throw err;
|
|
9347
|
+
}
|
|
9285
9348
|
try {
|
|
9286
9349
|
const { getRawClient: getRawClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
9287
9350
|
await getRawClient2().execute("PRAGMA wal_checkpoint(PASSIVE)");
|
|
@@ -10209,7 +10272,7 @@ async function cloudPullDocuments(config) {
|
|
|
10209
10272
|
}
|
|
10210
10273
|
return { pulled };
|
|
10211
10274
|
}
|
|
10212
|
-
var LOCALHOST_PATTERNS, FETCH_TIMEOUT_MS, PUSH_BATCH_SIZE, ROSTER_LOCK_PATH, LOCK_STALE_MS, _pgPromise, _pgFailed, ROSTER_DELETIONS_PATH;
|
|
10275
|
+
var LOCALHOST_PATTERNS, FETCH_TIMEOUT_MS, PUSH_BATCH_SIZE, ROSTER_LOCK_PATH, LOCK_STALE_MS, _pgPromise, _pgFailed, CLOUD_RELINK_REQUIRED_MESSAGE, ROSTER_DELETIONS_PATH;
|
|
10213
10276
|
var init_cloud_sync = __esm({
|
|
10214
10277
|
"src/lib/cloud-sync.ts"() {
|
|
10215
10278
|
"use strict";
|
|
@@ -10228,6 +10291,7 @@ var init_cloud_sync = __esm({
|
|
|
10228
10291
|
LOCK_STALE_MS = 3e4;
|
|
10229
10292
|
_pgPromise = null;
|
|
10230
10293
|
_pgFailed = false;
|
|
10294
|
+
CLOUD_RELINK_REQUIRED_MESSAGE = "[cloud-sync] Paused after key rotation. Run `exe-os cloud relink --dry-run` for the safe relink checklist.";
|
|
10231
10295
|
ROSTER_DELETIONS_PATH = path25.join(EXE_AI_DIR, "roster-deletions.json");
|
|
10232
10296
|
}
|
|
10233
10297
|
});
|
|
@@ -10655,6 +10719,8 @@ async function generateStatusBrief(employees, data, _activeAgentIds) {
|
|
|
10655
10719
|
}
|
|
10656
10720
|
const sections = [];
|
|
10657
10721
|
sections.push([` EXE STATUS BRIEF \u2014 ${dateStr}${sessionTag}`]);
|
|
10722
|
+
const orchestrationLines = buildOrchestrationPhase(data, employees);
|
|
10723
|
+
if (orchestrationLines.length > 0) sections.push(orchestrationLines);
|
|
10658
10724
|
const reminderLines = buildReminders(data);
|
|
10659
10725
|
if (reminderLines.length > 0) sections.push(reminderLines);
|
|
10660
10726
|
const actionLines = buildActionRequired(data);
|
|
@@ -10697,6 +10763,11 @@ function buildFirstBootBrief(employees, dateStr, sessionTag) {
|
|
|
10697
10763
|
bodyLines.push(` ${emoji} ${emp.name}${role}`);
|
|
10698
10764
|
}
|
|
10699
10765
|
bodyLines.push("");
|
|
10766
|
+
bodyLines.push(" \u{1F9ED} Orchestration:");
|
|
10767
|
+
bodyLines.push(" \u2022 Phase 1 \u2014 COO / Chief of Staff mode");
|
|
10768
|
+
bodyLines.push(" \u2022 Recommended start: build company context first");
|
|
10769
|
+
bodyLines.push(" \u2022 You can unlock executives or parallel mode anytime");
|
|
10770
|
+
bodyLines.push("");
|
|
10700
10771
|
bodyLines.push(" \u{1F4A1} Quick start:");
|
|
10701
10772
|
bodyLines.push(" \u2022 Run `exe-os backfill-conversations` to import Claude Code history");
|
|
10702
10773
|
bodyLines.push(" \u2022 Say `/exe` to launch your COO with a full status brief");
|
|
@@ -10727,6 +10798,38 @@ function buildReminders(data) {
|
|
|
10727
10798
|
}
|
|
10728
10799
|
return lines;
|
|
10729
10800
|
}
|
|
10801
|
+
function buildOrchestrationPhase(data, employees) {
|
|
10802
|
+
if (!data.orchestrationPhase) return [];
|
|
10803
|
+
const phase = data.orchestrationPhase;
|
|
10804
|
+
const hasExecutiveBench = employees.some((e) => ["cto", "cmo"].includes(e.role.toLowerCase()));
|
|
10805
|
+
const openWorkCount = data.globalTasks.filter((t) => t.status === "open" || t.status === "in_progress").length;
|
|
10806
|
+
const domainKeywordHits = data.globalTasks.filter(
|
|
10807
|
+
(t) => /\b(api|bug|code|repo|build|deploy|design|brand|copy|content|marketing|legal|finance|sales|crm)\b/i.test(t.title)
|
|
10808
|
+
).length;
|
|
10809
|
+
const phase1Signal = !hasExecutiveBench && (openWorkCount >= 3 || domainKeywordHits >= 2);
|
|
10810
|
+
if (phase === "phase_2_executives") {
|
|
10811
|
+
return [
|
|
10812
|
+
"\u{1F9ED} ORCHESTRATION",
|
|
10813
|
+
" Phase 2 \u2014 Executive bench",
|
|
10814
|
+
" Focus: COO works with CTO/CMO/domain executives before specialist fan-out",
|
|
10815
|
+
" You can switch phases anytime: exe-os org phase"
|
|
10816
|
+
];
|
|
10817
|
+
}
|
|
10818
|
+
if (phase === "phase_3_parallel_org") {
|
|
10819
|
+
return [
|
|
10820
|
+
"\u{1F9ED} ORCHESTRATION",
|
|
10821
|
+
" Phase 3 \u2014 Parallel execution org",
|
|
10822
|
+
" Focus: executives can delegate to specialists in parallel with review gates",
|
|
10823
|
+
" You can switch phases anytime: exe-os org phase"
|
|
10824
|
+
];
|
|
10825
|
+
}
|
|
10826
|
+
return [
|
|
10827
|
+
"\u{1F9ED} ORCHESTRATION",
|
|
10828
|
+
" Phase 1 \u2014 COO / Chief of Staff mode",
|
|
10829
|
+
" Focus: building company context before delegation",
|
|
10830
|
+
phase1Signal ? " Signal: repeated domain work detected. Consider: exe-os org unlock executives" : " Ready later? exe-os org unlock executives"
|
|
10831
|
+
];
|
|
10832
|
+
}
|
|
10730
10833
|
function buildActionRequired(data) {
|
|
10731
10834
|
const lines = [];
|
|
10732
10835
|
let hasIssues = false;
|
|
@@ -11038,6 +11141,12 @@ async function boot(options) {
|
|
|
11038
11141
|
plan: licensePlan,
|
|
11039
11142
|
employeeLimit
|
|
11040
11143
|
};
|
|
11144
|
+
try {
|
|
11145
|
+
const config = await loadConfig();
|
|
11146
|
+
briefData.orchestrationPhase = config.orchestration?.phase;
|
|
11147
|
+
} catch {
|
|
11148
|
+
briefData.orchestrationPhase = "phase_1_coo";
|
|
11149
|
+
}
|
|
11041
11150
|
if (!briefOnly) {
|
|
11042
11151
|
await migrateJsonNotifications();
|
|
11043
11152
|
await markDoneTaskNotificationsAsRead();
|
package/dist/bin/exe-call.js
CHANGED
|
@@ -121,6 +121,10 @@ var init_config = __esm({
|
|
|
121
121
|
checkOnBoot: true,
|
|
122
122
|
autoInstall: false,
|
|
123
123
|
checkIntervalMs: 24 * 60 * 60 * 1e3
|
|
124
|
+
},
|
|
125
|
+
orchestration: {
|
|
126
|
+
phase: "phase_1_coo",
|
|
127
|
+
phaseSetBy: "default"
|
|
124
128
|
}
|
|
125
129
|
};
|
|
126
130
|
}
|
|
@@ -263,6 +267,12 @@ var init_platform_procedures = __esm({
|
|
|
263
267
|
priority: "p0",
|
|
264
268
|
content: "Founder -> coordinator (the executive agent, internally routed as 'COO') -> CTO/CMO. CTO -> engineers. CMO -> content production. Never skip levels: the coordinator does not bypass managers for specialist work. Specialists report to their manager. If you need cross-team info, use ask_team_memory \u2014 don't read other agents' task folders. Each level owns dispatch downward and review upward."
|
|
265
269
|
},
|
|
270
|
+
{
|
|
271
|
+
title: "Customer orchestration maturity \u2014 recommend, never trap",
|
|
272
|
+
domain: "workflow",
|
|
273
|
+
priority: "p1",
|
|
274
|
+
content: "New customers start best in Phase 1: founder \u2194 coordinator/Chief of Staff, building company context. Suggest Phase 2 executives when domain work repeats; suggest Phase 3 parallel execution only when review/permission gates are ready. This is guidance, not a blocker: users may jump phases anytime. Never overwrite their phase, role titles, identities, or custom org design."
|
|
275
|
+
},
|
|
266
276
|
{
|
|
267
277
|
title: "Single dispatch path \u2014 create_task only",
|
|
268
278
|
domain: "workflow",
|
|
@@ -321,6 +331,12 @@ var init_platform_procedures = __esm({
|
|
|
321
331
|
priority: "p0",
|
|
322
332
|
content: "exe-build-adv is MANDATORY for ALL work touching 3+ files. Run /exe-build-adv --auto BEFORE implementation. Pipeline: Spec \u2192 AC \u2192 Tests \u2192 Evaluate \u2192 Fix. No multi-file feature ships without pipeline artifacts. No exceptions \u2014 managers reject work without them."
|
|
323
333
|
},
|
|
334
|
+
{
|
|
335
|
+
title: "Commit discipline \u2014 never leave verified work floating",
|
|
336
|
+
domain: "workflow",
|
|
337
|
+
priority: "p1",
|
|
338
|
+
content: "After any code-change batch passes typecheck/tests/build, run git status, summarize changed files, and commit with a clear message before ending the session. If work must remain uncommitted for review/dogfood, explicitly say so, list the files, and state the blocker. Never imply work is complete while verified changes are still floating locally."
|
|
339
|
+
},
|
|
324
340
|
{
|
|
325
341
|
title: "Desktop and TUI are the same product",
|
|
326
342
|
domain: "architecture",
|