monomind 1.11.12 → 1.11.13
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/.claude/commands/mastermind/idea.md +1 -1
- package/.claude/commands/mastermind/master.md +1 -1
- package/.claude/skills/mastermind/_protocol.md +4 -4
- package/.claude/skills/mastermind/build.md +3 -3
- package/.claude/skills/mastermind/content.md +3 -3
- package/.claude/skills/mastermind/createorg.md +2 -2
- package/.claude/skills/mastermind/finance.md +3 -3
- package/.claude/skills/mastermind/marketing.md +3 -3
- package/.claude/skills/mastermind/ops.md +3 -3
- package/.claude/skills/mastermind/release.md +3 -3
- package/.claude/skills/mastermind/research.md +3 -3
- package/.claude/skills/mastermind/review.md +3 -3
- package/.claude/skills/mastermind/sales.md +3 -3
- package/package.json +1 -1
- package/packages/@monomind/cli/dist/src/init/statusline-generator.js +3 -3
- package/packages/@monomind/cli/dist/src/observability/replay-reader.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/update/checker.js +24 -7
- package/packages/@monomind/cli/dist/src/update/index.js +3 -6
- package/packages/@monomind/cli/package.json +1 -1
- package/packages/@monomind/cli/dist/src/agents/halt-signal.d.ts +0 -25
- package/packages/@monomind/cli/dist/src/agents/halt-signal.js +0 -76
- package/packages/@monomind/cli/dist/src/agents/index.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/agents/index.js +0 -13
- package/packages/@monomind/cli/dist/src/agents/managed-agent.d.ts +0 -41
- package/packages/@monomind/cli/dist/src/agents/managed-agent.js +0 -69
- package/packages/@monomind/cli/dist/src/agents/prompt-experiment.d.ts +0 -23
- package/packages/@monomind/cli/dist/src/agents/prompt-experiment.js +0 -49
- package/packages/@monomind/cli/dist/src/agents/prompt-version-manager.d.ts +0 -22
- package/packages/@monomind/cli/dist/src/agents/prompt-version-manager.js +0 -80
- package/packages/@monomind/cli/dist/src/agents/registry-query.d.ts +0 -71
- package/packages/@monomind/cli/dist/src/agents/registry-query.js +0 -125
- package/packages/@monomind/cli/dist/src/agents/score-decay.d.ts +0 -19
- package/packages/@monomind/cli/dist/src/agents/score-decay.js +0 -22
- package/packages/@monomind/cli/dist/src/agents/shared-instructions-loader.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/agents/shared-instructions-loader.js +0 -40
- package/packages/@monomind/cli/dist/src/agents/specialization-scorer.d.ts +0 -54
- package/packages/@monomind/cli/dist/src/agents/specialization-scorer.js +0 -212
- package/packages/@monomind/cli/dist/src/agents/termination-watcher.d.ts +0 -30
- package/packages/@monomind/cli/dist/src/agents/termination-watcher.js +0 -84
- package/packages/@monomind/cli/dist/src/agents/trigger-index.d.ts +0 -20
- package/packages/@monomind/cli/dist/src/agents/trigger-index.js +0 -38
- package/packages/@monomind/cli/dist/src/agents/trigger-scanner.d.ts +0 -64
- package/packages/@monomind/cli/dist/src/agents/trigger-scanner.js +0 -308
- package/packages/@monomind/cli/dist/src/agents/version-diff.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/agents/version-diff.js +0 -64
- package/packages/@monomind/cli/dist/src/agents/version-store.d.ts +0 -60
- package/packages/@monomind/cli/dist/src/agents/version-store.js +0 -235
- package/packages/@monomind/cli/dist/src/benchmarks/pretrain/index.d.ts +0 -45
- package/packages/@monomind/cli/dist/src/benchmarks/pretrain/index.js +0 -404
- package/packages/@monomind/cli/dist/src/commands/agent-wasm.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/commands/agent-wasm.js +0 -333
- package/packages/@monomind/cli/dist/src/commands/ui.js +0 -68
- package/packages/@monomind/cli/dist/src/consensus/index.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/consensus/index.js +0 -6
- package/packages/@monomind/cli/dist/src/context/context-provider.d.ts +0 -44
- package/packages/@monomind/cli/dist/src/context/context-provider.js +0 -25
- package/packages/@monomind/cli/dist/src/context/git-state-provider.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/context/git-state-provider.js +0 -34
- package/packages/@monomind/cli/dist/src/context/index.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/context/index.js +0 -12
- package/packages/@monomind/cli/dist/src/context/project-conventions-provider.d.ts +0 -15
- package/packages/@monomind/cli/dist/src/context/project-conventions-provider.js +0 -19
- package/packages/@monomind/cli/dist/src/context/prompt-assembler.d.ts +0 -26
- package/packages/@monomind/cli/dist/src/context/prompt-assembler.js +0 -93
- package/packages/@monomind/cli/dist/src/context/task-history-provider.d.ts +0 -24
- package/packages/@monomind/cli/dist/src/context/task-history-provider.js +0 -32
- package/packages/@monomind/cli/dist/src/context/user-preferences-provider.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/context/user-preferences-provider.js +0 -27
- package/packages/@monomind/cli/dist/src/dlq/dlq-reader.d.ts +0 -31
- package/packages/@monomind/cli/dist/src/dlq/dlq-reader.js +0 -81
- package/packages/@monomind/cli/dist/src/dlq/dlq-writer.d.ts +0 -24
- package/packages/@monomind/cli/dist/src/dlq/dlq-writer.js +0 -65
- package/packages/@monomind/cli/dist/src/dlq/index.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/dlq/index.js +0 -7
- package/packages/@monomind/cli/dist/src/eval/dataset-manager.d.ts +0 -33
- package/packages/@monomind/cli/dist/src/eval/dataset-manager.js +0 -107
- package/packages/@monomind/cli/dist/src/eval/dataset-runner.d.ts +0 -23
- package/packages/@monomind/cli/dist/src/eval/dataset-runner.js +0 -59
- package/packages/@monomind/cli/dist/src/eval/index.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/eval/index.js +0 -7
- package/packages/@monomind/cli/dist/src/eval/trace-collector.d.ts +0 -40
- package/packages/@monomind/cli/dist/src/eval/trace-collector.js +0 -102
- package/packages/@monomind/cli/dist/src/infrastructure/in-memory-repositories.d.ts +0 -68
- package/packages/@monomind/cli/dist/src/infrastructure/in-memory-repositories.js +0 -264
- package/packages/@monomind/cli/dist/src/interactive/interrupt.d.ts +0 -22
- package/packages/@monomind/cli/dist/src/interactive/interrupt.js +0 -71
- package/packages/@monomind/cli/dist/src/mcp/deprecation-injector.d.ts +0 -25
- package/packages/@monomind/cli/dist/src/mcp/deprecation-injector.js +0 -48
- package/packages/@monomind/cli/dist/src/mcp/tool-registry.d.ts +0 -61
- package/packages/@monomind/cli/dist/src/mcp/tool-registry.js +0 -246
- package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.js +0 -230
- package/packages/@monomind/cli/dist/src/model/complexity-scorer.d.ts +0 -21
- package/packages/@monomind/cli/dist/src/model/complexity-scorer.js +0 -106
- package/packages/@monomind/cli/dist/src/model/index.d.ts +0 -4
- package/packages/@monomind/cli/dist/src/model/index.js +0 -4
- package/packages/@monomind/cli/dist/src/model/model-settings.d.ts +0 -22
- package/packages/@monomind/cli/dist/src/model/model-settings.js +0 -33
- package/packages/@monomind/cli/dist/src/model/model-tier-resolver.d.ts +0 -24
- package/packages/@monomind/cli/dist/src/model/model-tier-resolver.js +0 -65
- package/packages/@monomind/cli/dist/src/monovector/capabilities.d.ts +0 -34
- package/packages/@monomind/cli/dist/src/monovector/capabilities.js +0 -37
- package/packages/@monomind/cli/dist/src/orchestration/index.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/orchestration/index.js +0 -6
- package/packages/@monomind/cli/dist/src/orchestration/mode-dispatcher.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/orchestration/mode-dispatcher.js +0 -31
- package/packages/@monomind/cli/dist/src/orchestration/routing-modes.d.ts +0 -68
- package/packages/@monomind/cli/dist/src/orchestration/routing-modes.js +0 -180
- package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.js +0 -126
- package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.js +0 -188
- package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.js +0 -206
- package/packages/@monomind/cli/dist/src/runtime/headless.d.ts +0 -60
- package/packages/@monomind/cli/dist/src/runtime/headless.js +0 -284
- package/packages/@monomind/cli/dist/src/services/agentic-flow-bridge.d.ts +0 -50
- package/packages/@monomind/cli/dist/src/services/agentic-flow-bridge.js +0 -95
- package/packages/@monomind/cli/dist/src/services/container-worker-pool.d.ts +0 -197
- package/packages/@monomind/cli/dist/src/services/container-worker-pool.js +0 -623
- package/packages/@monomind/cli/dist/src/services/index.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/services/index.js +0 -11
- package/packages/@monomind/cli/dist/src/services/worker-queue.d.ts +0 -201
- package/packages/@monomind/cli/dist/src/services/worker-queue.js +0 -594
- package/packages/@monomind/cli/dist/src/swarm/communication-graph.d.ts +0 -25
- package/packages/@monomind/cli/dist/src/swarm/communication-graph.js +0 -77
- package/packages/@monomind/cli/dist/src/swarm/flow-enforcer.d.ts +0 -31
- package/packages/@monomind/cli/dist/src/swarm/flow-enforcer.js +0 -61
- package/packages/@monomind/cli/dist/src/swarm/flow-visualizer.d.ts +0 -19
- package/packages/@monomind/cli/dist/src/swarm/flow-visualizer.js +0 -68
- package/packages/@monomind/cli/dist/src/transfer/deploy-seraphine.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/transfer/deploy-seraphine.js +0 -205
- package/packages/@monomind/cli/dist/src/transfer/store/tests/standalone-test.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/transfer/store/tests/standalone-test.js +0 -190
- package/packages/@monomind/cli/dist/src/transfer/test-seraphine.d.ts +0 -6
- package/packages/@monomind/cli/dist/src/transfer/test-seraphine.js +0 -105
- package/packages/@monomind/cli/dist/src/transfer/tests/test-store.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/transfer/tests/test-store.js +0 -214
- package/packages/@monomind/cli/dist/src/workflow/condition-evaluator.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/workflow/condition-evaluator.js +0 -82
- package/packages/@monomind/cli/dist/src/workflow/context-resolver.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/workflow/context-resolver.js +0 -23
- package/packages/@monomind/cli/dist/src/workflow/dag-builder.d.ts +0 -17
- package/packages/@monomind/cli/dist/src/workflow/dag-builder.js +0 -129
- package/packages/@monomind/cli/dist/src/workflow/dag-executor.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/workflow/dag-executor.js +0 -116
- package/packages/@monomind/cli/dist/src/workflow/dag-types.d.ts +0 -41
- package/packages/@monomind/cli/dist/src/workflow/dag-types.js +0 -8
- package/packages/@monomind/cli/dist/src/workflow/dsl-parser.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/workflow/dsl-parser.js +0 -20
- package/packages/@monomind/cli/dist/src/workflow/dsl-schema.d.ts +0 -165
- package/packages/@monomind/cli/dist/src/workflow/dsl-schema.js +0 -82
- package/packages/@monomind/cli/dist/src/workflow/index.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/workflow/index.js +0 -11
- package/packages/@monomind/cli/dist/src/workflow/template-engine.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/workflow/template-engine.js +0 -40
- package/packages/@monomind/cli/dist/src/workflow/workflow-executor.d.ts +0 -29
- package/packages/@monomind/cli/dist/src/workflow/workflow-executor.js +0 -227
- package/packages/@monomind/guidance/dist/adversarial.d.ts +0 -284
- package/packages/@monomind/guidance/dist/adversarial.js +0 -572
- package/packages/@monomind/guidance/dist/analyzer.d.ts +0 -530
- package/packages/@monomind/guidance/dist/analyzer.js +0 -2518
- package/packages/@monomind/guidance/dist/artifacts.d.ts +0 -283
- package/packages/@monomind/guidance/dist/artifacts.js +0 -356
- package/packages/@monomind/guidance/dist/authority.d.ts +0 -290
- package/packages/@monomind/guidance/dist/authority.js +0 -558
- package/packages/@monomind/guidance/dist/capabilities.d.ts +0 -209
- package/packages/@monomind/guidance/dist/capabilities.js +0 -485
- package/packages/@monomind/guidance/dist/coherence.d.ts +0 -233
- package/packages/@monomind/guidance/dist/coherence.js +0 -372
- package/packages/@monomind/guidance/dist/compiler.d.ts +0 -87
- package/packages/@monomind/guidance/dist/compiler.js +0 -419
- package/packages/@monomind/guidance/dist/conformance-kit.d.ts +0 -225
- package/packages/@monomind/guidance/dist/conformance-kit.js +0 -629
- package/packages/@monomind/guidance/dist/continue-gate.d.ts +0 -214
- package/packages/@monomind/guidance/dist/continue-gate.js +0 -353
- package/packages/@monomind/guidance/dist/crypto-utils.d.ts +0 -17
- package/packages/@monomind/guidance/dist/crypto-utils.js +0 -24
- package/packages/@monomind/guidance/dist/evolution.d.ts +0 -282
- package/packages/@monomind/guidance/dist/evolution.js +0 -500
- package/packages/@monomind/guidance/dist/gates.d.ts +0 -79
- package/packages/@monomind/guidance/dist/gates.js +0 -302
- package/packages/@monomind/guidance/dist/gateway.d.ts +0 -206
- package/packages/@monomind/guidance/dist/gateway.js +0 -452
- package/packages/@monomind/guidance/dist/generators.d.ts +0 -153
- package/packages/@monomind/guidance/dist/generators.js +0 -682
- package/packages/@monomind/guidance/dist/headless.d.ts +0 -177
- package/packages/@monomind/guidance/dist/headless.js +0 -342
- package/packages/@monomind/guidance/dist/hooks.d.ts +0 -109
- package/packages/@monomind/guidance/dist/hooks.js +0 -347
- package/packages/@monomind/guidance/dist/index.d.ts +0 -205
- package/packages/@monomind/guidance/dist/index.js +0 -321
- package/packages/@monomind/guidance/dist/ledger.d.ts +0 -162
- package/packages/@monomind/guidance/dist/ledger.js +0 -375
- package/packages/@monomind/guidance/dist/manifest-validator.d.ts +0 -289
- package/packages/@monomind/guidance/dist/manifest-validator.js +0 -838
- package/packages/@monomind/guidance/dist/memory-gate.d.ts +0 -222
- package/packages/@monomind/guidance/dist/memory-gate.js +0 -382
- package/packages/@monomind/guidance/dist/meta-governance.d.ts +0 -265
- package/packages/@monomind/guidance/dist/meta-governance.js +0 -348
- package/packages/@monomind/guidance/dist/optimizer.d.ts +0 -104
- package/packages/@monomind/guidance/dist/optimizer.js +0 -329
- package/packages/@monomind/guidance/dist/persistence.d.ts +0 -189
- package/packages/@monomind/guidance/dist/persistence.js +0 -464
- package/packages/@monomind/guidance/dist/proof.d.ts +0 -185
- package/packages/@monomind/guidance/dist/proof.js +0 -238
- package/packages/@monomind/guidance/dist/retriever.d.ts +0 -116
- package/packages/@monomind/guidance/dist/retriever.js +0 -394
- package/packages/@monomind/guidance/dist/ruvbot-integration.d.ts +0 -370
- package/packages/@monomind/guidance/dist/ruvbot-integration.js +0 -738
- package/packages/@monomind/guidance/dist/temporal.d.ts +0 -426
- package/packages/@monomind/guidance/dist/temporal.js +0 -658
- package/packages/@monomind/guidance/dist/trust.d.ts +0 -283
- package/packages/@monomind/guidance/dist/trust.js +0 -473
- package/packages/@monomind/guidance/dist/truth-anchors.d.ts +0 -276
- package/packages/@monomind/guidance/dist/truth-anchors.js +0 -488
- package/packages/@monomind/guidance/dist/types.d.ts +0 -378
- package/packages/@monomind/guidance/dist/types.js +0 -10
- package/packages/@monomind/guidance/dist/uncertainty.d.ts +0 -372
- package/packages/@monomind/guidance/dist/uncertainty.js +0 -619
- package/packages/@monomind/guidance/dist/wasm-kernel.d.ts +0 -48
- package/packages/@monomind/guidance/dist/wasm-kernel.js +0 -158
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Headless Runtime for Background Workers
|
|
4
|
-
* Runs without TTY for daemon processes and scheduled tasks
|
|
5
|
-
*
|
|
6
|
-
* Usage:
|
|
7
|
-
* npx @monomind/cli headless --worker <type>
|
|
8
|
-
* npx @monomind/cli headless --daemon
|
|
9
|
-
* npx @monomind/cli headless --benchmark
|
|
10
|
-
*
|
|
11
|
-
* Environment:
|
|
12
|
-
* MONOMIND_HEADLESS=true
|
|
13
|
-
* CLAUDE_CODE_HEADLESS=true
|
|
14
|
-
*
|
|
15
|
-
* @module v1/cli/runtime/headless
|
|
16
|
-
*/
|
|
17
|
-
import { HeadlessWorkerExecutor, HEADLESS_WORKER_TYPES } from '../services/headless-worker-executor.js';
|
|
18
|
-
import { getDaemon, startDaemon, stopDaemon } from '../services/worker-daemon.js';
|
|
19
|
-
import { initializeIntelligence, benchmarkAdaptation, getIntelligenceStats } from '../memory/intelligence.js';
|
|
20
|
-
import { getHNSWStatus, batchCosineSim, flashAttentionSearch } from '../memory/memory-initializer.js';
|
|
21
|
-
// ============================================================================
|
|
22
|
-
// Main Runtime
|
|
23
|
-
// ============================================================================
|
|
24
|
-
/**
|
|
25
|
-
* Parse command line arguments
|
|
26
|
-
*/
|
|
27
|
-
function parseArgs() {
|
|
28
|
-
const args = process.argv.slice(2);
|
|
29
|
-
const config = {
|
|
30
|
-
mode: 'status',
|
|
31
|
-
verbose: false
|
|
32
|
-
};
|
|
33
|
-
for (let i = 0; i < args.length; i++) {
|
|
34
|
-
const arg = args[i];
|
|
35
|
-
if (arg === '--worker' || arg === '-w') {
|
|
36
|
-
config.mode = 'worker';
|
|
37
|
-
config.workerType = args[++i];
|
|
38
|
-
}
|
|
39
|
-
else if (arg === '--daemon' || arg === '-d') {
|
|
40
|
-
config.mode = 'daemon';
|
|
41
|
-
}
|
|
42
|
-
else if (arg === '--benchmark' || arg === '-b') {
|
|
43
|
-
config.mode = 'benchmark';
|
|
44
|
-
}
|
|
45
|
-
else if (arg === '--status' || arg === '-s') {
|
|
46
|
-
config.mode = 'status';
|
|
47
|
-
}
|
|
48
|
-
else if (arg === '--timeout' || arg === '-t') {
|
|
49
|
-
config.timeout = parseInt(args[++i], 10) || 60000;
|
|
50
|
-
}
|
|
51
|
-
else if (arg === '--verbose' || arg === '-v') {
|
|
52
|
-
config.verbose = true;
|
|
53
|
-
}
|
|
54
|
-
else if (arg === '--help' || arg === '-h') {
|
|
55
|
-
showHelp();
|
|
56
|
-
process.exit(0);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return config;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Show help message
|
|
63
|
-
*/
|
|
64
|
-
function showHelp() {
|
|
65
|
-
console.log(`
|
|
66
|
-
Headless Runtime for Monomind
|
|
67
|
-
|
|
68
|
-
Usage:
|
|
69
|
-
headless --worker <type> Run a specific worker
|
|
70
|
-
headless --daemon Start background daemon
|
|
71
|
-
headless --benchmark Run performance benchmarks
|
|
72
|
-
headless --status Show system status
|
|
73
|
-
|
|
74
|
-
Workers: ${HEADLESS_WORKER_TYPES.join(', ')}
|
|
75
|
-
|
|
76
|
-
Options:
|
|
77
|
-
-w, --worker <type> Worker type to run
|
|
78
|
-
-d, --daemon Run as daemon
|
|
79
|
-
-b, --benchmark Run benchmarks
|
|
80
|
-
-s, --status Show status
|
|
81
|
-
-t, --timeout <ms> Execution timeout (default: 60000)
|
|
82
|
-
-v, --verbose Verbose output
|
|
83
|
-
-h, --help Show help
|
|
84
|
-
|
|
85
|
-
Environment:
|
|
86
|
-
MONOMIND_HEADLESS=true Enable headless mode
|
|
87
|
-
CLAUDE_CODE_HEADLESS=true Enable Claude Code headless
|
|
88
|
-
|
|
89
|
-
Examples:
|
|
90
|
-
headless --worker audit --timeout 120000
|
|
91
|
-
headless --daemon
|
|
92
|
-
headless --benchmark
|
|
93
|
-
`);
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Run a specific worker
|
|
97
|
-
*/
|
|
98
|
-
async function runWorker(workerType, timeout) {
|
|
99
|
-
console.log(`[Headless] Starting worker: ${workerType}`);
|
|
100
|
-
const executor = new HeadlessWorkerExecutor(process.cwd(), {
|
|
101
|
-
maxConcurrent: 1,
|
|
102
|
-
defaultTimeoutMs: timeout
|
|
103
|
-
});
|
|
104
|
-
try {
|
|
105
|
-
const result = await executor.execute(workerType, {
|
|
106
|
-
timeoutMs: timeout,
|
|
107
|
-
model: 'sonnet',
|
|
108
|
-
sandbox: 'permissive'
|
|
109
|
-
});
|
|
110
|
-
if (result.success) {
|
|
111
|
-
console.log(`[Headless] Worker ${workerType} completed successfully`);
|
|
112
|
-
console.log(`[Headless] Duration: ${result.durationMs}ms`);
|
|
113
|
-
if (result.output) {
|
|
114
|
-
console.log(`[Headless] Output: ${JSON.stringify(result.output).slice(0, 500)}...`);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
console.error(`[Headless] Worker ${workerType} failed: ${result.error}`);
|
|
119
|
-
process.exit(1);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
finally {
|
|
123
|
-
// executor doesn't have shutdown, just let it be garbage collected
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Run daemon mode
|
|
128
|
-
*/
|
|
129
|
-
async function runDaemon() {
|
|
130
|
-
console.log('[Headless] Starting daemon mode...');
|
|
131
|
-
// Start the daemon
|
|
132
|
-
const daemon = await startDaemon(process.cwd());
|
|
133
|
-
console.log('[Headless] Daemon started');
|
|
134
|
-
console.log('[Headless] Press Ctrl+C to stop');
|
|
135
|
-
// Handle shutdown
|
|
136
|
-
process.on('SIGINT', async () => {
|
|
137
|
-
console.log('\n[Headless] Shutting down daemon...');
|
|
138
|
-
await stopDaemon();
|
|
139
|
-
process.exit(0);
|
|
140
|
-
});
|
|
141
|
-
process.on('SIGTERM', async () => {
|
|
142
|
-
console.log('\n[Headless] Received SIGTERM, shutting down...');
|
|
143
|
-
await stopDaemon();
|
|
144
|
-
process.exit(0);
|
|
145
|
-
});
|
|
146
|
-
// Keep process running
|
|
147
|
-
await new Promise(() => { });
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Run benchmarks
|
|
151
|
-
*/
|
|
152
|
-
async function runBenchmarks() {
|
|
153
|
-
console.log('=== Monomind Performance Benchmarks ===\n');
|
|
154
|
-
// Initialize intelligence
|
|
155
|
-
await initializeIntelligence();
|
|
156
|
-
// SONA Benchmark
|
|
157
|
-
console.log('1. SONA Adaptation Benchmark (10,000 iterations)...');
|
|
158
|
-
const sonaResult = benchmarkAdaptation(10000);
|
|
159
|
-
console.log(` Average: ${sonaResult.avgMs.toFixed(4)}ms`);
|
|
160
|
-
console.log(` Target (<0.05ms): ${sonaResult.targetMet ? '✅ ACHIEVED' : '❌ NOT MET'}`);
|
|
161
|
-
// Flash Attention Benchmark
|
|
162
|
-
console.log('\n2. Flash Attention Search Benchmark...');
|
|
163
|
-
const dim = 384;
|
|
164
|
-
const count = 10000;
|
|
165
|
-
const query = new Float32Array(dim).map(() => Math.random() - 0.5);
|
|
166
|
-
const vectors = Array.from({ length: count }, () => new Float32Array(dim).map(() => Math.random() - 0.5));
|
|
167
|
-
// Warmup
|
|
168
|
-
flashAttentionSearch(query, vectors, { k: 10 });
|
|
169
|
-
const flashStart = performance.now();
|
|
170
|
-
for (let i = 0; i < 10; i++) {
|
|
171
|
-
flashAttentionSearch(query, vectors, { k: 10 });
|
|
172
|
-
}
|
|
173
|
-
const flashTime = (performance.now() - flashStart) / 10;
|
|
174
|
-
const throughput = count / flashTime;
|
|
175
|
-
// Brute force comparison
|
|
176
|
-
const bruteStart = performance.now();
|
|
177
|
-
for (let i = 0; i < 10; i++) {
|
|
178
|
-
const scores = batchCosineSim(query, vectors);
|
|
179
|
-
Array.from({ length: count }, (_, i) => i)
|
|
180
|
-
.sort((a, b) => scores[b] - scores[a])
|
|
181
|
-
.slice(0, 10);
|
|
182
|
-
}
|
|
183
|
-
const bruteTime = (performance.now() - bruteStart) / 10;
|
|
184
|
-
const speedup = bruteTime / flashTime;
|
|
185
|
-
console.log(` Throughput: ${throughput.toFixed(0)} vectors/ms`);
|
|
186
|
-
console.log(` Time for 10k vectors: ${flashTime.toFixed(2)}ms`);
|
|
187
|
-
console.log(` Speedup vs brute force: ${speedup.toFixed(2)}x`);
|
|
188
|
-
// HNSW Status
|
|
189
|
-
console.log('\n3. HNSW Index Status...');
|
|
190
|
-
const hnswStatus = getHNSWStatus();
|
|
191
|
-
console.log(` Entries indexed: ${hnswStatus.entryCount}`);
|
|
192
|
-
console.log(` Initialized: ${hnswStatus.initialized}`);
|
|
193
|
-
// Intelligence Stats
|
|
194
|
-
console.log('\n4. Intelligence System Stats...');
|
|
195
|
-
const stats = getIntelligenceStats();
|
|
196
|
-
console.log(` SONA enabled: ${stats.sonaEnabled}`);
|
|
197
|
-
console.log(` Patterns learned: ${stats.patternsLearned}`);
|
|
198
|
-
console.log(` Avg adaptation time: ${stats.avgAdaptationTime.toFixed(4)}ms`);
|
|
199
|
-
console.log('\n=== Benchmark Complete ===');
|
|
200
|
-
return {
|
|
201
|
-
sona: {
|
|
202
|
-
avgMs: sonaResult.avgMs,
|
|
203
|
-
targetMet: sonaResult.targetMet
|
|
204
|
-
},
|
|
205
|
-
flashAttention: {
|
|
206
|
-
throughputPerMs: throughput,
|
|
207
|
-
speedup
|
|
208
|
-
},
|
|
209
|
-
hnsw: {
|
|
210
|
-
entriesIndexed: hnswStatus.entryCount,
|
|
211
|
-
searchTime: flashTime
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Show system status
|
|
217
|
-
*/
|
|
218
|
-
async function showStatus() {
|
|
219
|
-
console.log('=== Monomind System Status ===\n');
|
|
220
|
-
// Check daemon
|
|
221
|
-
const daemon = getDaemon();
|
|
222
|
-
console.log('Daemon:');
|
|
223
|
-
if (daemon) {
|
|
224
|
-
const status = daemon.getStatus();
|
|
225
|
-
console.log(` Running: ${status.running}`);
|
|
226
|
-
console.log(` PID: ${status.pid}`);
|
|
227
|
-
console.log(` Workers: ${status.workers.size}`);
|
|
228
|
-
}
|
|
229
|
-
else {
|
|
230
|
-
console.log(' Not initialized');
|
|
231
|
-
}
|
|
232
|
-
// Intelligence
|
|
233
|
-
const stats = getIntelligenceStats();
|
|
234
|
-
console.log('\nIntelligence:');
|
|
235
|
-
console.log(` SONA enabled: ${stats.sonaEnabled}`);
|
|
236
|
-
console.log(` ReasoningBank size: ${stats.reasoningBankSize}`);
|
|
237
|
-
console.log(` Patterns learned: ${stats.patternsLearned}`);
|
|
238
|
-
// HNSW
|
|
239
|
-
const hnsw = getHNSWStatus();
|
|
240
|
-
console.log('\nHNSW Index:');
|
|
241
|
-
console.log(` Initialized: ${hnsw.initialized}`);
|
|
242
|
-
console.log(` Entries: ${hnsw.entryCount}`);
|
|
243
|
-
console.log('\nEnvironment:');
|
|
244
|
-
console.log(` MONOMIND_HEADLESS: ${process.env.MONOMIND_HEADLESS || 'not set'}`);
|
|
245
|
-
console.log(` CLAUDE_CODE_HEADLESS: ${process.env.CLAUDE_CODE_HEADLESS || 'not set'}`);
|
|
246
|
-
console.log(` NODE_ENV: ${process.env.NODE_ENV || 'development'}`);
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Main entry point
|
|
250
|
-
*/
|
|
251
|
-
async function main() {
|
|
252
|
-
// Set headless environment
|
|
253
|
-
process.env.MONOMIND_HEADLESS = 'true';
|
|
254
|
-
const config = parseArgs();
|
|
255
|
-
try {
|
|
256
|
-
switch (config.mode) {
|
|
257
|
-
case 'worker':
|
|
258
|
-
if (!config.workerType || !HEADLESS_WORKER_TYPES.includes(config.workerType)) {
|
|
259
|
-
console.error(`Invalid worker type. Available: ${HEADLESS_WORKER_TYPES.join(', ')}`);
|
|
260
|
-
process.exit(1);
|
|
261
|
-
}
|
|
262
|
-
await runWorker(config.workerType, config.timeout || 60000);
|
|
263
|
-
break;
|
|
264
|
-
case 'daemon':
|
|
265
|
-
await runDaemon();
|
|
266
|
-
break;
|
|
267
|
-
case 'benchmark':
|
|
268
|
-
await runBenchmarks();
|
|
269
|
-
break;
|
|
270
|
-
case 'status':
|
|
271
|
-
default:
|
|
272
|
-
await showStatus();
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
catch (error) {
|
|
277
|
-
console.error('[Headless] Error:', error instanceof Error ? error.message : String(error));
|
|
278
|
-
process.exit(1);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
// Run if executed directly
|
|
282
|
-
main().catch(console.error);
|
|
283
|
-
export { main, runWorker, runDaemon, runBenchmarks, showStatus };
|
|
284
|
-
//# sourceMappingURL=headless.js.map
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* agentic-flow v1 integration bridge
|
|
3
|
-
*
|
|
4
|
-
* Provides a single lazy-loading entry point for all agentic-flow v1
|
|
5
|
-
* subpath exports. Every accessor returns `null` when agentic-flow is
|
|
6
|
-
* not installed — callers never throw on missing optional dependency.
|
|
7
|
-
*
|
|
8
|
-
* @module agentic-flow-bridge
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Load the ReasoningBank module (4-step learning pipeline).
|
|
12
|
-
* Returns null if agentic-flow is not installed.
|
|
13
|
-
* Race-safe: concurrent callers share the same import Promise.
|
|
14
|
-
*/
|
|
15
|
-
export declare function getReasoningBank(): Promise<typeof import("agentic-flow/reasoningbank") | null>;
|
|
16
|
-
/**
|
|
17
|
-
* Load the ModelRouter module (multi-provider LLM routing).
|
|
18
|
-
* Returns null if agentic-flow is not installed.
|
|
19
|
-
*/
|
|
20
|
-
export declare function getRouter(): Promise<typeof import("agentic-flow/router") | null>;
|
|
21
|
-
/**
|
|
22
|
-
* Load the Orchestration module (workflow engine).
|
|
23
|
-
* Returns null if agentic-flow is not installed.
|
|
24
|
-
*/
|
|
25
|
-
export declare function getOrchestration(): Promise<typeof import("agentic-flow/orchestration") | null>;
|
|
26
|
-
/**
|
|
27
|
-
* Compute an embedding vector via ReasoningBank, falling back to null.
|
|
28
|
-
*/
|
|
29
|
-
export declare function computeEmbedding(text: string): Promise<number[] | null>;
|
|
30
|
-
/**
|
|
31
|
-
* Retrieve memories matching a query via ReasoningBank.
|
|
32
|
-
*/
|
|
33
|
-
export declare function retrieveMemories(query: string, opts?: {
|
|
34
|
-
k?: number;
|
|
35
|
-
}): Promise<any[]>;
|
|
36
|
-
/**
|
|
37
|
-
* Check whether agentic-flow v1 is available at runtime.
|
|
38
|
-
*/
|
|
39
|
-
export declare function isAvailable(): Promise<boolean>;
|
|
40
|
-
/**
|
|
41
|
-
* Return a summary of available agentic-flow v1 capabilities.
|
|
42
|
-
*/
|
|
43
|
-
export declare function capabilities(): Promise<{
|
|
44
|
-
available: boolean;
|
|
45
|
-
reasoningBank: boolean;
|
|
46
|
-
router: boolean;
|
|
47
|
-
orchestration: boolean;
|
|
48
|
-
version: string | null;
|
|
49
|
-
}>;
|
|
50
|
-
//# sourceMappingURL=agentic-flow-bridge.d.ts.map
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* agentic-flow v1 integration bridge
|
|
3
|
-
*
|
|
4
|
-
* Provides a single lazy-loading entry point for all agentic-flow v1
|
|
5
|
-
* subpath exports. Every accessor returns `null` when agentic-flow is
|
|
6
|
-
* not installed — callers never throw on missing optional dependency.
|
|
7
|
-
*
|
|
8
|
-
* @module agentic-flow-bridge
|
|
9
|
-
*/
|
|
10
|
-
// ---------------------------------------------------------------------------
|
|
11
|
-
// Cached module handles (Promise-based to prevent TOCTOU races)
|
|
12
|
-
// ---------------------------------------------------------------------------
|
|
13
|
-
let _reasoningBankP = null;
|
|
14
|
-
let _routerP = null;
|
|
15
|
-
let _orchestrationP = null;
|
|
16
|
-
// ---------------------------------------------------------------------------
|
|
17
|
-
// Public loaders
|
|
18
|
-
// ---------------------------------------------------------------------------
|
|
19
|
-
/**
|
|
20
|
-
* Load the ReasoningBank module (4-step learning pipeline).
|
|
21
|
-
* Returns null if agentic-flow is not installed.
|
|
22
|
-
* Race-safe: concurrent callers share the same import Promise.
|
|
23
|
-
*/
|
|
24
|
-
export function getReasoningBank() {
|
|
25
|
-
if (_reasoningBankP === null) {
|
|
26
|
-
_reasoningBankP = import('agentic-flow/reasoningbank').catch(() => null);
|
|
27
|
-
}
|
|
28
|
-
return _reasoningBankP;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Load the ModelRouter module (multi-provider LLM routing).
|
|
32
|
-
* Returns null if agentic-flow is not installed.
|
|
33
|
-
*/
|
|
34
|
-
export function getRouter() {
|
|
35
|
-
if (_routerP === null) {
|
|
36
|
-
_routerP = import('agentic-flow/router').catch(() => null);
|
|
37
|
-
}
|
|
38
|
-
return _routerP;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Load the Orchestration module (workflow engine).
|
|
42
|
-
* Returns null if agentic-flow is not installed.
|
|
43
|
-
*/
|
|
44
|
-
export function getOrchestration() {
|
|
45
|
-
if (_orchestrationP === null) {
|
|
46
|
-
_orchestrationP = import('agentic-flow/orchestration').catch(() => null);
|
|
47
|
-
}
|
|
48
|
-
return _orchestrationP;
|
|
49
|
-
}
|
|
50
|
-
// ---------------------------------------------------------------------------
|
|
51
|
-
// Convenience helpers
|
|
52
|
-
// ---------------------------------------------------------------------------
|
|
53
|
-
/**
|
|
54
|
-
* Compute an embedding vector via ReasoningBank, falling back to null.
|
|
55
|
-
*/
|
|
56
|
-
export async function computeEmbedding(text) {
|
|
57
|
-
const rb = await getReasoningBank();
|
|
58
|
-
if (!rb?.computeEmbedding)
|
|
59
|
-
return null;
|
|
60
|
-
return rb.computeEmbedding(text);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Retrieve memories matching a query via ReasoningBank.
|
|
64
|
-
*/
|
|
65
|
-
export async function retrieveMemories(query, opts) {
|
|
66
|
-
const rb = await getReasoningBank();
|
|
67
|
-
if (!rb?.retrieveMemories)
|
|
68
|
-
return [];
|
|
69
|
-
return rb.retrieveMemories(query, opts);
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Check whether agentic-flow v1 is available at runtime.
|
|
73
|
-
*/
|
|
74
|
-
export async function isAvailable() {
|
|
75
|
-
const rb = await getReasoningBank();
|
|
76
|
-
return rb !== null;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Return a summary of available agentic-flow v1 capabilities.
|
|
80
|
-
*/
|
|
81
|
-
export async function capabilities() {
|
|
82
|
-
const [rb, router, orch] = await Promise.all([
|
|
83
|
-
getReasoningBank(),
|
|
84
|
-
getRouter(),
|
|
85
|
-
getOrchestration(),
|
|
86
|
-
]);
|
|
87
|
-
return {
|
|
88
|
-
available: rb !== null || router !== null || orch !== null,
|
|
89
|
-
reasoningBank: rb !== null,
|
|
90
|
-
router: router !== null,
|
|
91
|
-
orchestration: orch !== null,
|
|
92
|
-
version: rb?.VERSION ?? null,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
//# sourceMappingURL=agentic-flow-bridge.js.map
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Container Worker Pool
|
|
3
|
-
* Docker-based worker pool for high-throughput headless execution.
|
|
4
|
-
*
|
|
5
|
-
* ADR-020: Headless Worker Integration Architecture - Phase 3
|
|
6
|
-
* - Manages pool of Docker containers for isolated worker execution
|
|
7
|
-
* - Supports dynamic scaling based on workload
|
|
8
|
-
* - Provides container lifecycle management
|
|
9
|
-
* - Integrates with WorkerQueue for task distribution
|
|
10
|
-
*
|
|
11
|
-
* Key Features:
|
|
12
|
-
* - Container pooling with configurable size
|
|
13
|
-
* - Health checking and auto-recovery
|
|
14
|
-
* - Resource limits (CPU, memory)
|
|
15
|
-
* - Volume mounting for workspace access
|
|
16
|
-
* - Network isolation per worker type
|
|
17
|
-
*/
|
|
18
|
-
import { EventEmitter } from 'events';
|
|
19
|
-
import type { HeadlessWorkerType, HeadlessExecutionResult, SandboxMode } from './headless-worker-executor.js';
|
|
20
|
-
/**
|
|
21
|
-
* Container state
|
|
22
|
-
*/
|
|
23
|
-
export type ContainerState = 'creating' | 'ready' | 'busy' | 'unhealthy' | 'terminated';
|
|
24
|
-
/**
|
|
25
|
-
* Container info
|
|
26
|
-
*/
|
|
27
|
-
export interface ContainerInfo {
|
|
28
|
-
id: string;
|
|
29
|
-
name: string;
|
|
30
|
-
state: ContainerState;
|
|
31
|
-
createdAt: Date;
|
|
32
|
-
lastUsedAt?: Date;
|
|
33
|
-
workerType?: HeadlessWorkerType;
|
|
34
|
-
executionCount: number;
|
|
35
|
-
healthCheckFailures: number;
|
|
36
|
-
pid?: number;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Container pool configuration
|
|
40
|
-
*/
|
|
41
|
-
export interface ContainerPoolConfig {
|
|
42
|
-
/** Maximum number of containers in the pool */
|
|
43
|
-
maxContainers: number;
|
|
44
|
-
/** Minimum number of containers to keep warm */
|
|
45
|
-
minContainers: number;
|
|
46
|
-
/** Docker image to use */
|
|
47
|
-
image: string;
|
|
48
|
-
/** Container resource limits */
|
|
49
|
-
resources: {
|
|
50
|
-
cpus: string;
|
|
51
|
-
memory: string;
|
|
52
|
-
};
|
|
53
|
-
/** Health check interval in ms */
|
|
54
|
-
healthCheckIntervalMs: number;
|
|
55
|
-
/** Container idle timeout in ms */
|
|
56
|
-
idleTimeoutMs: number;
|
|
57
|
-
/** Workspace volume mount path */
|
|
58
|
-
workspacePath: string;
|
|
59
|
-
/** State persistence path */
|
|
60
|
-
statePath: string;
|
|
61
|
-
/** Network name for container isolation */
|
|
62
|
-
network?: string;
|
|
63
|
-
/** Environment variables for containers */
|
|
64
|
-
env?: Record<string, string>;
|
|
65
|
-
/** Default sandbox mode */
|
|
66
|
-
defaultSandbox: SandboxMode;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Container execution options
|
|
70
|
-
*/
|
|
71
|
-
export interface ContainerExecutionOptions {
|
|
72
|
-
workerType: HeadlessWorkerType;
|
|
73
|
-
prompt: string;
|
|
74
|
-
contextPatterns?: string[];
|
|
75
|
-
sandbox?: SandboxMode;
|
|
76
|
-
model?: string;
|
|
77
|
-
timeoutMs?: number;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Pool status
|
|
81
|
-
*/
|
|
82
|
-
export interface ContainerPoolStatus {
|
|
83
|
-
totalContainers: number;
|
|
84
|
-
readyContainers: number;
|
|
85
|
-
busyContainers: number;
|
|
86
|
-
unhealthyContainers: number;
|
|
87
|
-
queuedTasks: number;
|
|
88
|
-
containers: ContainerInfo[];
|
|
89
|
-
dockerAvailable: boolean;
|
|
90
|
-
lastHealthCheck?: Date;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* ContainerWorkerPool - Manages Docker containers for headless worker execution
|
|
94
|
-
*/
|
|
95
|
-
export declare class ContainerWorkerPool extends EventEmitter {
|
|
96
|
-
private config;
|
|
97
|
-
private projectRoot;
|
|
98
|
-
private containers;
|
|
99
|
-
private taskQueue;
|
|
100
|
-
private healthCheckTimer?;
|
|
101
|
-
private idleCheckTimer?;
|
|
102
|
-
private dockerAvailable;
|
|
103
|
-
private initialized;
|
|
104
|
-
private isShuttingDown;
|
|
105
|
-
private exitHandlersRegistered;
|
|
106
|
-
constructor(projectRoot: string, config?: Partial<ContainerPoolConfig>);
|
|
107
|
-
/**
|
|
108
|
-
* Initialize the container pool
|
|
109
|
-
*/
|
|
110
|
-
initialize(): Promise<boolean>;
|
|
111
|
-
/**
|
|
112
|
-
* Register process exit handlers to clean up containers
|
|
113
|
-
*/
|
|
114
|
-
private registerExitHandlers;
|
|
115
|
-
/**
|
|
116
|
-
* Execute a worker in a container
|
|
117
|
-
*/
|
|
118
|
-
execute(options: ContainerExecutionOptions): Promise<HeadlessExecutionResult>;
|
|
119
|
-
/**
|
|
120
|
-
* Scale pool for batch execution
|
|
121
|
-
*/
|
|
122
|
-
scaleForBatch(workerCount: number): Promise<void>;
|
|
123
|
-
/**
|
|
124
|
-
* Get pool status
|
|
125
|
-
*/
|
|
126
|
-
getStatus(): ContainerPoolStatus;
|
|
127
|
-
/**
|
|
128
|
-
* Shutdown the pool
|
|
129
|
-
*/
|
|
130
|
-
shutdown(): Promise<void>;
|
|
131
|
-
/**
|
|
132
|
-
* Check if Docker is available (async)
|
|
133
|
-
*/
|
|
134
|
-
private checkDockerAvailable;
|
|
135
|
-
/**
|
|
136
|
-
* Ensure the container image exists (async)
|
|
137
|
-
*/
|
|
138
|
-
private ensureImage;
|
|
139
|
-
/**
|
|
140
|
-
* Create a new container
|
|
141
|
-
*/
|
|
142
|
-
private createContainer;
|
|
143
|
-
/**
|
|
144
|
-
* Terminate a container (async)
|
|
145
|
-
*/
|
|
146
|
-
private terminateContainer;
|
|
147
|
-
/**
|
|
148
|
-
* Get a ready container
|
|
149
|
-
*/
|
|
150
|
-
private getReadyContainer;
|
|
151
|
-
/**
|
|
152
|
-
* Scale to minimum containers
|
|
153
|
-
*/
|
|
154
|
-
private scaleToMinimum;
|
|
155
|
-
/**
|
|
156
|
-
* Execute worker in a specific container
|
|
157
|
-
*/
|
|
158
|
-
private executeInContainer;
|
|
159
|
-
/**
|
|
160
|
-
* Execute command in container
|
|
161
|
-
*/
|
|
162
|
-
private execInContainer;
|
|
163
|
-
/**
|
|
164
|
-
* Build worker command for container execution
|
|
165
|
-
*/
|
|
166
|
-
private buildWorkerCommand;
|
|
167
|
-
/**
|
|
168
|
-
* Process queued tasks
|
|
169
|
-
*/
|
|
170
|
-
private processQueue;
|
|
171
|
-
/**
|
|
172
|
-
* Start health check timer
|
|
173
|
-
*/
|
|
174
|
-
private startHealthChecks;
|
|
175
|
-
/**
|
|
176
|
-
* Run health checks on all containers
|
|
177
|
-
*/
|
|
178
|
-
private runHealthChecks;
|
|
179
|
-
/**
|
|
180
|
-
* Start idle check timer
|
|
181
|
-
*/
|
|
182
|
-
private startIdleChecks;
|
|
183
|
-
/**
|
|
184
|
-
* Terminate idle containers above minimum
|
|
185
|
-
*/
|
|
186
|
-
private runIdleChecks;
|
|
187
|
-
/**
|
|
188
|
-
* Try to parse JSON from output
|
|
189
|
-
*/
|
|
190
|
-
private tryParseJson;
|
|
191
|
-
/**
|
|
192
|
-
* Create an error result
|
|
193
|
-
*/
|
|
194
|
-
private createErrorResult;
|
|
195
|
-
}
|
|
196
|
-
export default ContainerWorkerPool;
|
|
197
|
-
//# sourceMappingURL=container-worker-pool.d.ts.map
|