monomind 1.11.9 → 1.11.10
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/agents/github/issue-tracker.md +5 -5
- package/.claude/agents/github/pr-manager.md +5 -5
- package/.claude/agents/github/release-manager.md +3 -3
- package/.claude/agents/github/repo-architect.md +3 -3
- package/.claude/agents/github/swarm-issue.md +1 -1
- package/.claude/agents/github/sync-coordinator.md +1 -1
- package/.claude/agents/github/workflow-automation.md +1 -1
- package/.claude/commands/github/repo-architect.md +1 -1
- package/.claude/commands/github/sync-coordinator.md +1 -1
- package/.claude/commands/mastermind/createorg.md +4 -1
- package/.claude/commands/mastermind/help.md +2 -2
- package/.claude/commands/mastermind/orgs.md +21 -0
- package/.claude/commands/mastermind/orgstatus.md +59 -0
- package/.claude/commands/mastermind/runorg.md +4 -2
- package/.claude/commands/mastermind/stoporg.md +78 -0
- package/.claude/commands/mastermind/swarm.md +1 -1
- package/.claude/helpers/handlers/gates-handler.cjs +135 -0
- package/.claude/helpers/handlers/task-handler.cjs +7 -3
- package/.claude/helpers/hook-handler.cjs +11 -2
- package/.claude/helpers/intelligence.cjs +87 -0
- package/.claude/helpers/learning-service.mjs +60 -0
- package/.claude/helpers/memory.cjs +69 -0
- package/.claude/helpers/router.cjs +68 -0
- package/.claude/helpers/session.cjs +63 -0
- package/.claude/helpers/utils/monograph.cjs +4 -2
- package/.claude/helpers/utils/telemetry.cjs +3 -2
- package/.claude/scheduled_tasks.lock +1 -1
- package/.claude/settings.json +12 -2
- package/.claude/skills/agentic-jujutsu/SKILL.md +1 -1
- package/.claude/skills/hive-mind-advanced/SKILL.md +4 -4
- package/.claude/skills/mastermind/_agent-select.md +2 -2
- package/.claude/skills/mastermind/access.md +11 -11
- package/.claude/skills/mastermind/adapter-manager.md +13 -13
- package/.claude/skills/mastermind/adapters.md +7 -7
- package/.claude/skills/mastermind/agent-detail.md +1 -1
- package/.claude/skills/mastermind/agents.md +5 -5
- package/.claude/skills/mastermind/approval-detail.md +6 -6
- package/.claude/skills/mastermind/approve.md +9 -10
- package/.claude/skills/mastermind/backup.md +2 -2
- package/.claude/skills/mastermind/bootstrap.md +2 -2
- package/.claude/skills/mastermind/companies.md +7 -7
- package/.claude/skills/mastermind/createorg.md +213 -8
- package/.claude/skills/mastermind/diagnose.md +4 -4
- package/.claude/skills/mastermind/env.md +1 -1
- package/.claude/skills/mastermind/environments.md +8 -8
- package/.claude/skills/mastermind/export.md +12 -3
- package/.claude/skills/mastermind/goal-detail.md +9 -9
- package/.claude/skills/mastermind/goals.md +4 -4
- package/.claude/skills/mastermind/heartbeat.md +1 -1
- package/.claude/skills/mastermind/idea.md +4 -4
- package/.claude/skills/mastermind/import.md +8 -8
- package/.claude/skills/mastermind/inbox.md +4 -4
- package/.claude/skills/mastermind/instance-settings.md +9 -9
- package/.claude/skills/mastermind/instance.md +9 -7
- package/.claude/skills/mastermind/invite-landing.md +5 -5
- package/.claude/skills/mastermind/invites.md +12 -12
- package/.claude/skills/mastermind/issue-detail.md +8 -8
- package/.claude/skills/mastermind/monitor.md +11 -11
- package/.claude/skills/mastermind/my-issues.md +6 -6
- package/.claude/skills/mastermind/new-agent.md +4 -4
- package/.claude/skills/mastermind/org-chart.md +8 -6
- package/.claude/skills/mastermind/org-settings.md +58 -21
- package/.claude/skills/mastermind/orgs.md +98 -0
- package/.claude/skills/mastermind/orgstatus.md +194 -0
- package/.claude/skills/mastermind/plan-to-tasks.md +1 -1
- package/.claude/skills/mastermind/plugin-manager.md +12 -12
- package/.claude/skills/mastermind/plugin-settings.md +5 -5
- package/.claude/skills/mastermind/plugins.md +5 -5
- package/.claude/skills/mastermind/profile.md +2 -2
- package/.claude/skills/mastermind/project-detail.md +12 -12
- package/.claude/skills/mastermind/project-workspace.md +4 -4
- package/.claude/skills/mastermind/projects.md +4 -4
- package/.claude/skills/mastermind/review.md +50 -0
- package/.claude/skills/mastermind/routine-detail.md +3 -3
- package/.claude/skills/mastermind/routines.md +7 -6
- package/.claude/skills/mastermind/runorg.md +178 -8
- package/.claude/skills/mastermind/search.md +6 -6
- package/.claude/skills/mastermind/secrets.md +6 -6
- package/.claude/skills/mastermind/skills.md +4 -4
- package/.claude/skills/mastermind/stoporg.md +138 -0
- package/.claude/skills/mastermind/workspace-detail.md +5 -5
- package/.claude/skills/mastermind/workspaces.md +9 -9
- package/.claude/skills/performance-analysis/SKILL.md +3 -3
- package/.claude/skills/sparc-methodology/SKILL.md +2 -2
- package/.claude/skills/swarm-advanced/SKILL.md +4 -4
- package/.claude-plugin/README.md +10 -10
- package/.claude-plugin/docs/INSTALLATION.md +6 -6
- package/.claude-plugin/docs/PLUGIN_SUMMARY.md +9 -9
- package/.claude-plugin/docs/QUICKSTART.md +2 -2
- package/.claude-plugin/docs/STRUCTURE.md +1 -1
- package/.claude-plugin/marketplace.json +5 -5
- package/.claude-plugin/plugin.json +3 -3
- package/README.md +129 -376
- package/package.json +4 -8
- package/packages/@monomind/cli/README.md +129 -376
- package/packages/@monomind/cli/dist/src/agents/registry-builder.d.ts +27 -1
- package/packages/@monomind/cli/dist/src/agents/registry-builder.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/agent.js +4 -9
- package/packages/@monomind/cli/dist/src/commands/analyze.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/analyze.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/claims.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/claims.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/cleanup.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/cleanup.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/completions.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/completions.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/deployment.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/deployment.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/doctor.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/doctor.js +69 -4
- package/packages/@monomind/cli/dist/src/commands/guidance.js +129 -0
- package/packages/@monomind/cli/dist/src/commands/index.js +4 -0
- package/packages/@monomind/cli/dist/src/commands/init.js +18 -0
- package/packages/@monomind/cli/dist/src/commands/monovector/import.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/monovector/import.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/monovector/index.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/monovector/index.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/monovector/setup.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/monovector/setup.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/neural.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/neural.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/performance.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/performance.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/platforms.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/platforms.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/plugins.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/plugins.js +2 -4
- package/packages/@monomind/cli/dist/src/commands/providers.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/providers.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/route.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/route.js +5 -11
- package/packages/@monomind/cli/dist/src/commands/security.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/security.js +140 -91
- package/packages/@monomind/cli/dist/src/dlq/dlq-replayer.d.ts +7 -1
- package/packages/@monomind/cli/dist/src/index.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/index.js +10 -26
- package/packages/@monomind/cli/dist/src/init/claudemd-generator.js +2 -2
- package/packages/@monomind/cli/dist/src/init/executor.js +3 -3
- package/packages/@monomind/cli/dist/src/init/settings-generator.js +2 -2
- package/packages/@monomind/cli/dist/src/mcp-client.d.ts +5 -0
- package/packages/@monomind/cli/dist/src/mcp-client.js +7 -0
- package/packages/@monomind/cli/dist/src/mcp-server.js +17 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/a2a-tools.js +6 -6
- package/packages/@monomind/cli/dist/src/mcp-tools/auto-install.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/auto-install.js +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +1 -52
- package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +4 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/index.js +4 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-compat.js +1 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +107 -5
- package/packages/@monomind/cli/dist/src/mcp-tools/security-tools.d.ts +6 -6
- package/packages/@monomind/cli/dist/src/mcp-tools/security-tools.js +48 -61
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +0 -1
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +232 -57
- package/packages/@monomind/cli/dist/src/memory/memory-initializer.js +3 -32
- package/packages/@monomind/cli/dist/src/plugins/store/discovery.js +0 -69
- package/packages/@monomind/cli/dist/src/routing/embed-worker.d.ts +2 -0
- package/packages/@monomind/cli/dist/src/routing/embed-worker.js +55 -0
- package/packages/@monomind/cli/dist/src/routing/embedder.d.ts +31 -0
- package/packages/@monomind/cli/dist/src/routing/embedder.js +0 -0
- package/packages/@monomind/cli/dist/src/routing/llm-caller.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/routing/llm-caller.js +18 -3
- package/packages/@monomind/cli/dist/src/routing/route-layer-factory.d.ts +9 -0
- package/packages/@monomind/cli/dist/src/routing/route-layer-factory.js +151 -0
- package/packages/@monomind/cli/dist/src/services/worker-daemon.js +0 -1
- package/packages/@monomind/cli/dist/src/suggest.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/suggest.js +1 -1
- package/packages/@monomind/cli/package.json +9 -10
- package/packages/@monomind/cli/scripts/understand-analyze.mjs +1 -1
- package/packages/@monomind/guidance/README.md +6 -6
- package/packages/@monomind/guidance/package.json +9 -1
- package/scripts/install.sh +7 -7
- package/scripts/ua-enrich.mjs +3 -2
- package/packages/@monomind/shared/dist/agent-contract.d.ts +0 -28
- package/packages/@monomind/shared/dist/agent-contract.js +0 -57
- package/packages/@monomind/shared/dist/agent-error-result.d.ts +0 -17
- package/packages/@monomind/shared/dist/agent-error-result.js +0 -23
- package/packages/@monomind/shared/dist/core/config/defaults.d.ts +0 -41
- package/packages/@monomind/shared/dist/core/config/defaults.js +0 -186
- package/packages/@monomind/shared/dist/core/config/index.d.ts +0 -8
- package/packages/@monomind/shared/dist/core/config/index.js +0 -12
- package/packages/@monomind/shared/dist/core/config/loader.d.ts +0 -45
- package/packages/@monomind/shared/dist/core/config/loader.js +0 -238
- package/packages/@monomind/shared/dist/core/config/schema.d.ts +0 -324
- package/packages/@monomind/shared/dist/core/config/schema.js +0 -160
- package/packages/@monomind/shared/dist/core/config/validator.d.ts +0 -92
- package/packages/@monomind/shared/dist/core/config/validator.js +0 -147
- package/packages/@monomind/shared/dist/core/event-bus.d.ts +0 -31
- package/packages/@monomind/shared/dist/core/event-bus.js +0 -197
- package/packages/@monomind/shared/dist/core/index.d.ts +0 -15
- package/packages/@monomind/shared/dist/core/index.js +0 -19
- package/packages/@monomind/shared/dist/core/interfaces/agent.interface.d.ts +0 -200
- package/packages/@monomind/shared/dist/core/interfaces/agent.interface.js +0 -6
- package/packages/@monomind/shared/dist/core/interfaces/coordinator.interface.d.ts +0 -310
- package/packages/@monomind/shared/dist/core/interfaces/coordinator.interface.js +0 -7
- package/packages/@monomind/shared/dist/core/interfaces/event.interface.d.ts +0 -224
- package/packages/@monomind/shared/dist/core/interfaces/event.interface.js +0 -46
- package/packages/@monomind/shared/dist/core/interfaces/index.d.ts +0 -10
- package/packages/@monomind/shared/dist/core/interfaces/index.js +0 -15
- package/packages/@monomind/shared/dist/core/interfaces/memory.interface.d.ts +0 -298
- package/packages/@monomind/shared/dist/core/interfaces/memory.interface.js +0 -7
- package/packages/@monomind/shared/dist/core/interfaces/task.interface.d.ts +0 -185
- package/packages/@monomind/shared/dist/core/interfaces/task.interface.js +0 -6
- package/packages/@monomind/shared/dist/core/orchestrator/event-coordinator.d.ts +0 -35
- package/packages/@monomind/shared/dist/core/orchestrator/event-coordinator.js +0 -101
- package/packages/@monomind/shared/dist/core/orchestrator/health-monitor.d.ts +0 -60
- package/packages/@monomind/shared/dist/core/orchestrator/health-monitor.js +0 -166
- package/packages/@monomind/shared/dist/core/orchestrator/index.d.ts +0 -46
- package/packages/@monomind/shared/dist/core/orchestrator/index.js +0 -64
- package/packages/@monomind/shared/dist/core/orchestrator/lifecycle-manager.d.ts +0 -56
- package/packages/@monomind/shared/dist/core/orchestrator/lifecycle-manager.js +0 -195
- package/packages/@monomind/shared/dist/core/orchestrator/session-manager.d.ts +0 -83
- package/packages/@monomind/shared/dist/core/orchestrator/session-manager.js +0 -193
- package/packages/@monomind/shared/dist/core/orchestrator/task-manager.d.ts +0 -49
- package/packages/@monomind/shared/dist/core/orchestrator/task-manager.js +0 -253
- package/packages/@monomind/shared/dist/events/domain-events.d.ts +0 -282
- package/packages/@monomind/shared/dist/events/domain-events.js +0 -165
- package/packages/@monomind/shared/dist/events/event-store.d.ts +0 -126
- package/packages/@monomind/shared/dist/events/event-store.js +0 -416
- package/packages/@monomind/shared/dist/events/event-store.test.d.ts +0 -8
- package/packages/@monomind/shared/dist/events/event-store.test.js +0 -293
- package/packages/@monomind/shared/dist/events/example-usage.d.ts +0 -10
- package/packages/@monomind/shared/dist/events/example-usage.js +0 -193
- package/packages/@monomind/shared/dist/events/index.d.ts +0 -21
- package/packages/@monomind/shared/dist/events/index.js +0 -22
- package/packages/@monomind/shared/dist/events/projections.d.ts +0 -177
- package/packages/@monomind/shared/dist/events/projections.js +0 -421
- package/packages/@monomind/shared/dist/events/rvf-event-log.d.ts +0 -82
- package/packages/@monomind/shared/dist/events/rvf-event-log.js +0 -340
- package/packages/@monomind/shared/dist/events/state-reconstructor.d.ts +0 -101
- package/packages/@monomind/shared/dist/events/state-reconstructor.js +0 -263
- package/packages/@monomind/shared/dist/events.d.ts +0 -80
- package/packages/@monomind/shared/dist/events.js +0 -249
- package/packages/@monomind/shared/dist/hooks/example-usage.d.ts +0 -42
- package/packages/@monomind/shared/dist/hooks/example-usage.js +0 -351
- package/packages/@monomind/shared/dist/hooks/executor.d.ts +0 -100
- package/packages/@monomind/shared/dist/hooks/executor.js +0 -264
- package/packages/@monomind/shared/dist/hooks/hooks.test.d.ts +0 -9
- package/packages/@monomind/shared/dist/hooks/hooks.test.js +0 -322
- package/packages/@monomind/shared/dist/hooks/index.d.ts +0 -52
- package/packages/@monomind/shared/dist/hooks/index.js +0 -51
- package/packages/@monomind/shared/dist/hooks/registry.d.ts +0 -133
- package/packages/@monomind/shared/dist/hooks/registry.js +0 -277
- package/packages/@monomind/shared/dist/hooks/safety/bash-safety.d.ts +0 -105
- package/packages/@monomind/shared/dist/hooks/safety/bash-safety.js +0 -481
- package/packages/@monomind/shared/dist/hooks/safety/file-organization.d.ts +0 -144
- package/packages/@monomind/shared/dist/hooks/safety/file-organization.js +0 -328
- package/packages/@monomind/shared/dist/hooks/safety/git-commit.d.ts +0 -158
- package/packages/@monomind/shared/dist/hooks/safety/git-commit.js +0 -450
- package/packages/@monomind/shared/dist/hooks/safety/index.d.ts +0 -17
- package/packages/@monomind/shared/dist/hooks/safety/index.js +0 -17
- package/packages/@monomind/shared/dist/hooks/session-hooks.d.ts +0 -234
- package/packages/@monomind/shared/dist/hooks/session-hooks.js +0 -334
- package/packages/@monomind/shared/dist/hooks/task-hooks.d.ts +0 -163
- package/packages/@monomind/shared/dist/hooks/task-hooks.js +0 -326
- package/packages/@monomind/shared/dist/hooks/types.d.ts +0 -267
- package/packages/@monomind/shared/dist/hooks/types.js +0 -62
- package/packages/@monomind/shared/dist/hooks/verify-exports.test.d.ts +0 -9
- package/packages/@monomind/shared/dist/hooks/verify-exports.test.js +0 -93
- package/packages/@monomind/shared/dist/index.d.ts +0 -46
- package/packages/@monomind/shared/dist/index.js +0 -77
- package/packages/@monomind/shared/dist/mcp/connection-pool.d.ts +0 -98
- package/packages/@monomind/shared/dist/mcp/connection-pool.js +0 -364
- package/packages/@monomind/shared/dist/mcp/index.d.ts +0 -69
- package/packages/@monomind/shared/dist/mcp/index.js +0 -84
- package/packages/@monomind/shared/dist/mcp/server.d.ts +0 -166
- package/packages/@monomind/shared/dist/mcp/server.js +0 -593
- package/packages/@monomind/shared/dist/mcp/session-manager.d.ts +0 -136
- package/packages/@monomind/shared/dist/mcp/session-manager.js +0 -335
- package/packages/@monomind/shared/dist/mcp/tool-registry.d.ts +0 -178
- package/packages/@monomind/shared/dist/mcp/tool-registry.js +0 -439
- package/packages/@monomind/shared/dist/mcp/transport/http.d.ts +0 -104
- package/packages/@monomind/shared/dist/mcp/transport/http.js +0 -476
- package/packages/@monomind/shared/dist/mcp/transport/index.d.ts +0 -102
- package/packages/@monomind/shared/dist/mcp/transport/index.js +0 -238
- package/packages/@monomind/shared/dist/mcp/transport/stdio.d.ts +0 -104
- package/packages/@monomind/shared/dist/mcp/transport/stdio.js +0 -263
- package/packages/@monomind/shared/dist/mcp/transport/websocket.d.ts +0 -133
- package/packages/@monomind/shared/dist/mcp/transport/websocket.js +0 -396
- package/packages/@monomind/shared/dist/mcp/types.d.ts +0 -438
- package/packages/@monomind/shared/dist/mcp/types.js +0 -54
- package/packages/@monomind/shared/dist/plugin-interface.d.ts +0 -544
- package/packages/@monomind/shared/dist/plugin-interface.js +0 -23
- package/packages/@monomind/shared/dist/plugin-loader.d.ts +0 -139
- package/packages/@monomind/shared/dist/plugin-loader.js +0 -434
- package/packages/@monomind/shared/dist/plugin-registry.d.ts +0 -183
- package/packages/@monomind/shared/dist/plugin-registry.js +0 -457
- package/packages/@monomind/shared/dist/plugins/index.d.ts +0 -10
- package/packages/@monomind/shared/dist/plugins/index.js +0 -10
- package/packages/@monomind/shared/dist/plugins/official/hive-mind-plugin.d.ts +0 -106
- package/packages/@monomind/shared/dist/plugins/official/hive-mind-plugin.js +0 -241
- package/packages/@monomind/shared/dist/plugins/official/index.d.ts +0 -10
- package/packages/@monomind/shared/dist/plugins/official/index.js +0 -10
- package/packages/@monomind/shared/dist/plugins/official/maestro-plugin.d.ts +0 -121
- package/packages/@monomind/shared/dist/plugins/official/maestro-plugin.js +0 -355
- package/packages/@monomind/shared/dist/plugins/types.d.ts +0 -93
- package/packages/@monomind/shared/dist/plugins/types.js +0 -9
- package/packages/@monomind/shared/dist/reducers.d.ts +0 -33
- package/packages/@monomind/shared/dist/reducers.js +0 -89
- package/packages/@monomind/shared/dist/resilience/bulkhead.d.ts +0 -105
- package/packages/@monomind/shared/dist/resilience/bulkhead.js +0 -206
- package/packages/@monomind/shared/dist/resilience/circuit-breaker.d.ts +0 -132
- package/packages/@monomind/shared/dist/resilience/circuit-breaker.js +0 -233
- package/packages/@monomind/shared/dist/resilience/index.d.ts +0 -19
- package/packages/@monomind/shared/dist/resilience/index.js +0 -19
- package/packages/@monomind/shared/dist/resilience/rate-limiter.d.ts +0 -168
- package/packages/@monomind/shared/dist/resilience/rate-limiter.js +0 -314
- package/packages/@monomind/shared/dist/resilience/retry.d.ts +0 -91
- package/packages/@monomind/shared/dist/resilience/retry.js +0 -159
- package/packages/@monomind/shared/dist/retry-policy.d.ts +0 -14
- package/packages/@monomind/shared/dist/retry-policy.js +0 -23
- package/packages/@monomind/shared/dist/retry-runner.d.ts +0 -21
- package/packages/@monomind/shared/dist/retry-runner.js +0 -57
- package/packages/@monomind/shared/dist/schema-validator.d.ts +0 -46
- package/packages/@monomind/shared/dist/schema-validator.js +0 -133
- package/packages/@monomind/shared/dist/scratchpad.d.ts +0 -23
- package/packages/@monomind/shared/dist/scratchpad.js +0 -32
- package/packages/@monomind/shared/dist/security/index.d.ts +0 -10
- package/packages/@monomind/shared/dist/security/index.js +0 -12
- package/packages/@monomind/shared/dist/security/input-validation.d.ts +0 -73
- package/packages/@monomind/shared/dist/security/input-validation.js +0 -201
- package/packages/@monomind/shared/dist/security/secure-random.d.ts +0 -92
- package/packages/@monomind/shared/dist/security/secure-random.js +0 -142
- package/packages/@monomind/shared/dist/services/index.d.ts +0 -7
- package/packages/@monomind/shared/dist/services/index.js +0 -7
- package/packages/@monomind/shared/dist/services/progress.service.d.ts +0 -124
- package/packages/@monomind/shared/dist/services/progress.service.js +0 -402
- package/packages/@monomind/shared/dist/state-manager.d.ts +0 -34
- package/packages/@monomind/shared/dist/state-manager.js +0 -73
- package/packages/@monomind/shared/dist/state-validator.d.ts +0 -20
- package/packages/@monomind/shared/dist/state-validator.js +0 -49
- package/packages/@monomind/shared/dist/swarm-state.d.ts +0 -52
- package/packages/@monomind/shared/dist/swarm-state.js +0 -18
- package/packages/@monomind/shared/dist/testing/fixture-builder.d.ts +0 -14
- package/packages/@monomind/shared/dist/testing/fixture-builder.js +0 -32
- package/packages/@monomind/shared/dist/testing/index.d.ts +0 -2
- package/packages/@monomind/shared/dist/testing/index.js +0 -2
- package/packages/@monomind/shared/dist/testing/test-model.d.ts +0 -29
- package/packages/@monomind/shared/dist/testing/test-model.js +0 -53
- package/packages/@monomind/shared/dist/types/agent-registry.d.ts +0 -62
- package/packages/@monomind/shared/dist/types/agent-registry.js +0 -8
- package/packages/@monomind/shared/dist/types/agent-version.d.ts +0 -49
- package/packages/@monomind/shared/dist/types/agent-version.js +0 -7
- package/packages/@monomind/shared/dist/types/agent.types.d.ts +0 -137
- package/packages/@monomind/shared/dist/types/agent.types.js +0 -6
- package/packages/@monomind/shared/dist/types/benchmark.d.ts +0 -39
- package/packages/@monomind/shared/dist/types/benchmark.js +0 -6
- package/packages/@monomind/shared/dist/types/communication-flow.d.ts +0 -25
- package/packages/@monomind/shared/dist/types/communication-flow.js +0 -7
- package/packages/@monomind/shared/dist/types/consensus-audit.d.ts +0 -40
- package/packages/@monomind/shared/dist/types/consensus-audit.js +0 -7
- package/packages/@monomind/shared/dist/types/dlq.d.ts +0 -40
- package/packages/@monomind/shared/dist/types/dlq.js +0 -7
- package/packages/@monomind/shared/dist/types/eval.d.ts +0 -59
- package/packages/@monomind/shared/dist/types/eval.js +0 -6
- package/packages/@monomind/shared/dist/types/index.d.ts +0 -19
- package/packages/@monomind/shared/dist/types/index.js +0 -33
- package/packages/@monomind/shared/dist/types/mcp.types.d.ts +0 -266
- package/packages/@monomind/shared/dist/types/mcp.types.js +0 -7
- package/packages/@monomind/shared/dist/types/memory.types.d.ts +0 -236
- package/packages/@monomind/shared/dist/types/memory.types.js +0 -7
- package/packages/@monomind/shared/dist/types/retry.d.ts +0 -72
- package/packages/@monomind/shared/dist/types/retry.js +0 -40
- package/packages/@monomind/shared/dist/types/specialization.d.ts +0 -27
- package/packages/@monomind/shared/dist/types/specialization.js +0 -8
- package/packages/@monomind/shared/dist/types/swarm.types.d.ts +0 -186
- package/packages/@monomind/shared/dist/types/swarm.types.js +0 -65
- package/packages/@monomind/shared/dist/types/task.types.d.ts +0 -178
- package/packages/@monomind/shared/dist/types/task.types.js +0 -32
- package/packages/@monomind/shared/dist/types/termination.d.ts +0 -29
- package/packages/@monomind/shared/dist/types/termination.js +0 -14
- package/packages/@monomind/shared/dist/types/tool-version.d.ts +0 -41
- package/packages/@monomind/shared/dist/types/tool-version.js +0 -8
- package/packages/@monomind/shared/dist/types/trigger.d.ts +0 -40
- package/packages/@monomind/shared/dist/types/trigger.js +0 -8
- package/packages/@monomind/shared/dist/types.d.ts +0 -197
- package/packages/@monomind/shared/dist/types.js +0 -21
- package/packages/@monomind/shared/dist/utils/secure-logger.d.ts +0 -69
- package/packages/@monomind/shared/dist/utils/secure-logger.js +0 -208
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* Intelligence context module for hook-handler.cjs
|
|
4
|
+
* Provides context injection, trajectory logging, and feedback recording.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const path = require('path');
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
|
|
10
|
+
const CWD = process.env.CLAUDE_PROJECT_DIR || process.cwd();
|
|
11
|
+
const INTEL_DIR = path.join(CWD, '.monomind', 'intelligence');
|
|
12
|
+
const PATTERNS_FILE = path.join(INTEL_DIR, 'patterns.json');
|
|
13
|
+
const TRAJECTORY_FILE = path.join(INTEL_DIR, 'trajectory.json');
|
|
14
|
+
|
|
15
|
+
var _initialized = false;
|
|
16
|
+
var _patterns = [];
|
|
17
|
+
var _trajectory = [];
|
|
18
|
+
|
|
19
|
+
function ensureDir() {
|
|
20
|
+
try { fs.mkdirSync(INTEL_DIR, { recursive: true }); } catch (_) {}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function loadPatterns() {
|
|
24
|
+
try {
|
|
25
|
+
if (fs.existsSync(PATTERNS_FILE)) {
|
|
26
|
+
_patterns = JSON.parse(fs.readFileSync(PATTERNS_FILE, 'utf-8'));
|
|
27
|
+
}
|
|
28
|
+
} catch (_) { _patterns = []; }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function init() {
|
|
32
|
+
if (_initialized) return { ok: true, patternCount: _patterns.length };
|
|
33
|
+
ensureDir();
|
|
34
|
+
loadPatterns();
|
|
35
|
+
_initialized = true;
|
|
36
|
+
return { ok: true, patternCount: _patterns.length };
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function getContext(prompt) {
|
|
40
|
+
if (!prompt || typeof prompt !== 'string') return null;
|
|
41
|
+
if (!_initialized) init();
|
|
42
|
+
// Match patterns against prompt
|
|
43
|
+
var matches = _patterns.filter(function(p) {
|
|
44
|
+
return p.keywords && p.keywords.some(function(kw) {
|
|
45
|
+
return prompt.toLowerCase().includes(kw.toLowerCase());
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
if (matches.length === 0) return null;
|
|
49
|
+
var top = matches[0];
|
|
50
|
+
return '[INTELLIGENCE] Pattern match: ' + (top.name || top.id || 'pattern') +
|
|
51
|
+
(top.suggestion ? ' — ' + top.suggestion : '');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function logTrajectory(step) {
|
|
55
|
+
ensureDir();
|
|
56
|
+
_trajectory.push(Object.assign({ ts: new Date().toISOString() }, step || {}));
|
|
57
|
+
// Flush every 10 steps to avoid excessive writes
|
|
58
|
+
if (_trajectory.length % 10 === 0) {
|
|
59
|
+
try {
|
|
60
|
+
fs.writeFileSync(TRAJECTORY_FILE, JSON.stringify(_trajectory.slice(-200), null, 2), 'utf-8');
|
|
61
|
+
} catch (_) {}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function feedback(success) {
|
|
66
|
+
// Record outcome for last trajectory step
|
|
67
|
+
if (_trajectory.length > 0) {
|
|
68
|
+
_trajectory[_trajectory.length - 1].outcome = success ? 'success' : 'failure';
|
|
69
|
+
}
|
|
70
|
+
// Persist
|
|
71
|
+
ensureDir();
|
|
72
|
+
try {
|
|
73
|
+
fs.writeFileSync(TRAJECTORY_FILE, JSON.stringify(_trajectory.slice(-200), null, 2), 'utf-8');
|
|
74
|
+
} catch (_) {}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function storePattern(pattern) {
|
|
78
|
+
ensureDir();
|
|
79
|
+
loadPatterns();
|
|
80
|
+
_patterns = _patterns.filter(function(p) { return p.id !== pattern.id; });
|
|
81
|
+
_patterns.push(Object.assign({ storedAt: new Date().toISOString() }, pattern));
|
|
82
|
+
try {
|
|
83
|
+
fs.writeFileSync(PATTERNS_FILE, JSON.stringify(_patterns.slice(-500), null, 2), 'utf-8');
|
|
84
|
+
} catch (_) {}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
module.exports = { init, getContext, logTrajectory, feedback, storePattern };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LearningService — session-scoped learning consolidation
|
|
3
|
+
* Used as a module-level singleton by hook-handler.cjs (getLearningService()).
|
|
4
|
+
*
|
|
5
|
+
* Contract:
|
|
6
|
+
* new LearningService()
|
|
7
|
+
* await svc.initialize() — open DB / load state
|
|
8
|
+
* await svc.consolidate() — flush accumulated learnings to persistent store
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import path from 'path';
|
|
12
|
+
import fs from 'fs/promises';
|
|
13
|
+
import { existsSync, mkdirSync } from 'fs';
|
|
14
|
+
|
|
15
|
+
const CWD = process.env.CLAUDE_PROJECT_DIR || process.cwd();
|
|
16
|
+
const LEARN_DIR = path.join(CWD, '.monomind', 'learning');
|
|
17
|
+
const LEARN_FILE = path.join(LEARN_DIR, 'session-learnings.json');
|
|
18
|
+
|
|
19
|
+
export class LearningService {
|
|
20
|
+
constructor() {
|
|
21
|
+
this._entries = [];
|
|
22
|
+
this._initialized = false;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async initialize() {
|
|
26
|
+
try {
|
|
27
|
+
mkdirSync(LEARN_DIR, { recursive: true });
|
|
28
|
+
if (existsSync(LEARN_FILE)) {
|
|
29
|
+
const raw = await fs.readFile(LEARN_FILE, 'utf-8');
|
|
30
|
+
const data = JSON.parse(raw);
|
|
31
|
+
this._entries = Array.isArray(data) ? data : [];
|
|
32
|
+
}
|
|
33
|
+
} catch (_) {
|
|
34
|
+
this._entries = [];
|
|
35
|
+
}
|
|
36
|
+
this._initialized = true;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
record(entry) {
|
|
40
|
+
if (!this._initialized) return;
|
|
41
|
+
this._entries.push(Object.assign({ ts: new Date().toISOString() }, entry));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async consolidate() {
|
|
45
|
+
if (!this._initialized || this._entries.length === 0) return;
|
|
46
|
+
try {
|
|
47
|
+
mkdirSync(LEARN_DIR, { recursive: true });
|
|
48
|
+
// Keep last 1000 entries
|
|
49
|
+
const trimmed = this._entries.slice(-1000);
|
|
50
|
+
await fs.writeFile(LEARN_FILE, JSON.stringify(trimmed, null, 2), 'utf-8');
|
|
51
|
+
this._entries = trimmed;
|
|
52
|
+
} catch (_) {}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
getEntries() {
|
|
56
|
+
return this._entries.slice();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default { LearningService };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* Memory context bridge for hook-handler.cjs
|
|
4
|
+
* Bridges to the CLI memory subsystem via file-based storage fallback.
|
|
5
|
+
* Used by handlers to retrieve relevant context and store outcomes.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const path = require('path');
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
|
|
11
|
+
const CWD = process.env.CLAUDE_PROJECT_DIR || process.cwd();
|
|
12
|
+
const MEMORY_DIR = path.join(CWD, '.monomind', 'memory');
|
|
13
|
+
const MEMORY_INDEX = path.join(MEMORY_DIR, 'hook-memory.json');
|
|
14
|
+
|
|
15
|
+
function ensureDir() {
|
|
16
|
+
try { fs.mkdirSync(MEMORY_DIR, { recursive: true }); } catch (_) {}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function loadIndex() {
|
|
20
|
+
try {
|
|
21
|
+
if (!fs.existsSync(MEMORY_INDEX)) return [];
|
|
22
|
+
return JSON.parse(fs.readFileSync(MEMORY_INDEX, 'utf-8'));
|
|
23
|
+
} catch (_) {
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function saveIndex(entries) {
|
|
29
|
+
ensureDir();
|
|
30
|
+
try {
|
|
31
|
+
// Keep most recent 500 entries
|
|
32
|
+
var trimmed = entries.slice(-500);
|
|
33
|
+
fs.writeFileSync(MEMORY_INDEX, JSON.stringify(trimmed, null, 2), 'utf-8');
|
|
34
|
+
} catch (_) {}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function store(key, value, namespace) {
|
|
38
|
+
var entries = loadIndex();
|
|
39
|
+
var ns = namespace || 'default';
|
|
40
|
+
// Remove existing entry with same key+namespace
|
|
41
|
+
entries = entries.filter(function(e) { return !(e.key === key && e.namespace === ns); });
|
|
42
|
+
entries.push({ key: key, value: value, namespace: ns, storedAt: new Date().toISOString() });
|
|
43
|
+
saveIndex(entries);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function retrieve(query, namespace) {
|
|
47
|
+
var entries = loadIndex();
|
|
48
|
+
var ns = namespace || null;
|
|
49
|
+
if (ns) entries = entries.filter(function(e) { return e.namespace === ns; });
|
|
50
|
+
if (!query) return entries.slice(-10);
|
|
51
|
+
// Simple keyword search
|
|
52
|
+
var q = String(query).toLowerCase();
|
|
53
|
+
var scored = entries.map(function(e) {
|
|
54
|
+
var text = (e.key + ' ' + JSON.stringify(e.value || '')).toLowerCase();
|
|
55
|
+
var score = 0;
|
|
56
|
+
var words = q.split(/\s+/);
|
|
57
|
+
for (var i = 0; i < words.length; i++) {
|
|
58
|
+
if (words[i] && text.includes(words[i])) score++;
|
|
59
|
+
}
|
|
60
|
+
return { entry: e, score: score };
|
|
61
|
+
});
|
|
62
|
+
return scored
|
|
63
|
+
.filter(function(s) { return s.score > 0; })
|
|
64
|
+
.sort(function(a, b) { return b.score - a.score; })
|
|
65
|
+
.slice(0, 10)
|
|
66
|
+
.map(function(s) { return s.entry; });
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
module.exports = { store, retrieve };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* Keyword-based task router for hook-handler.cjs
|
|
4
|
+
* Returns: { agent, agentSlug, confidence, reason, semanticRouting, specificAgents, skillMatches, extrasMatches }
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const KEYWORD_ROUTES = [
|
|
8
|
+
{ pattern: /\b(bug|fix|error|exception|crash|broken|fail|regression|null pointer|undefined)\b/i, agent: 'coder', confidence: 0.85 },
|
|
9
|
+
{ pattern: /\b(test|spec|coverage|vitest|jest|mocha|unit test|integration test|e2e)\b/i, agent: 'tester', confidence: 0.85 },
|
|
10
|
+
{ pattern: /\b(review|audit|code quality|lint|smell|refactor|clean up|cleanup)\b/i, agent: 'reviewer', confidence: 0.82 },
|
|
11
|
+
{ pattern: /\b(architect|design|system design|ADR|domain|bounded context|microservice|pattern)\b/i, agent: 'system-architect', confidence: 0.85 },
|
|
12
|
+
{ pattern: /\b(security|vulnerability|CVE|injection|XSS|CSRF|auth|permissions|OWASP)\b/i, agent: 'Security Engineer', confidence: 0.90 },
|
|
13
|
+
{ pattern: /\b(performance|optimiz|slow|bottleneck|profil|benchmark|latency|throughput)\b/i, agent: 'coder', confidence: 0.80 },
|
|
14
|
+
{ pattern: /\b(deploy|CI\/CD|pipeline|docker|kubernetes|infra|devops|helm|terraform)\b/i, agent: 'DevOps Automator', confidence: 0.85 },
|
|
15
|
+
{ pattern: /\b(document|readme|docs|api reference|jsdoc|write up)\b/i, agent: 'Technical Writer', confidence: 0.82 },
|
|
16
|
+
{ pattern: /\b(feature|implement|add|build|create|develop|new)\b/i, agent: 'coder', confidence: 0.75 },
|
|
17
|
+
{ pattern: /\b(research|investigate|explore|analyze|survey|compare)\b/i, agent: 'researcher', confidence: 0.78 },
|
|
18
|
+
{ pattern: /\b(plan|roadmap|strategy|prioritize|breakdown|estimate)\b/i, agent: 'planner', confidence: 0.80 },
|
|
19
|
+
{ pattern: /\b(memory|vector|embedding|HNSW|sqlite|database|query)\b/i, agent: 'coder', confidence: 0.82 },
|
|
20
|
+
{ pattern: /\b(hook|swarm|agent|mcp|cli|routing|monomind)\b/i, agent: 'coder', confidence: 0.80 },
|
|
21
|
+
{ pattern: /\b(mobile|ios|android|react native|flutter)\b/i, agent: 'mobile-dev', confidence: 0.88 },
|
|
22
|
+
{ pattern: /\b(ml|machine learning|AI|model|training|inference|neural)\b/i, agent: 'AI Engineer', confidence: 0.85 },
|
|
23
|
+
{ pattern: /\b(api|rest|graphql|endpoint|http|websocket|grpc)\b/i, agent: 'backend-dev', confidence: 0.80 },
|
|
24
|
+
{ pattern: /\b(ui|frontend|react|vue|component|css|layout|design)\b/i, agent: 'Frontend Developer', confidence: 0.80 },
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const DEFAULT_RESULT = {
|
|
28
|
+
agent: 'coder',
|
|
29
|
+
agentSlug: 'coder',
|
|
30
|
+
confidence: 0.60,
|
|
31
|
+
reason: 'Default routing — no strong keyword match',
|
|
32
|
+
semanticRouting: false,
|
|
33
|
+
specificAgents: [],
|
|
34
|
+
skillMatches: [],
|
|
35
|
+
extrasMatches: [],
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
function routeTask(prompt) {
|
|
39
|
+
if (!prompt || typeof prompt !== 'string') return DEFAULT_RESULT;
|
|
40
|
+
|
|
41
|
+
var best = null;
|
|
42
|
+
for (var i = 0; i < KEYWORD_ROUTES.length; i++) {
|
|
43
|
+
var rule = KEYWORD_ROUTES[i];
|
|
44
|
+
if (rule.pattern.test(prompt)) {
|
|
45
|
+
if (!best || rule.confidence > best.confidence) {
|
|
46
|
+
best = rule;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (!best) return DEFAULT_RESULT;
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
agent: best.agent,
|
|
55
|
+
agentSlug: best.agent.toLowerCase().replace(/\s+/g, '-'),
|
|
56
|
+
confidence: best.confidence,
|
|
57
|
+
reason: 'Keyword match: ' + best.pattern.toString().slice(1, 40),
|
|
58
|
+
semanticRouting: false,
|
|
59
|
+
specificAgents: [],
|
|
60
|
+
skillMatches: [],
|
|
61
|
+
extrasMatches: [],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
module.exports = {
|
|
66
|
+
routeTask: routeTask,
|
|
67
|
+
routeTaskSemantic: routeTask,
|
|
68
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* Session state management for hook-handler.cjs
|
|
4
|
+
* Persists session data to .monomind/session-state.json
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const path = require('path');
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
|
|
10
|
+
const CWD = process.env.CLAUDE_PROJECT_DIR || process.cwd();
|
|
11
|
+
const SESSION_FILE = path.join(CWD, '.monomind', 'session-state.json');
|
|
12
|
+
|
|
13
|
+
function ensureDir() {
|
|
14
|
+
try { fs.mkdirSync(path.dirname(SESSION_FILE), { recursive: true }); } catch (_) {}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function restore() {
|
|
18
|
+
try {
|
|
19
|
+
if (!fs.existsSync(SESSION_FILE)) return null;
|
|
20
|
+
var raw = fs.readFileSync(SESSION_FILE, 'utf-8');
|
|
21
|
+
var data = JSON.parse(raw);
|
|
22
|
+
if (!data || !data.sessionId) return null;
|
|
23
|
+
console.log('[OK] Session restored: ' + data.sessionId);
|
|
24
|
+
return data;
|
|
25
|
+
} catch (_) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function start() {
|
|
31
|
+
ensureDir();
|
|
32
|
+
var sessionId = 'session-' + Date.now();
|
|
33
|
+
var data = { sessionId: sessionId, startedAt: new Date().toISOString(), editCount: 0, taskCount: 0 };
|
|
34
|
+
try {
|
|
35
|
+
fs.writeFileSync(SESSION_FILE, JSON.stringify(data, null, 2), 'utf-8');
|
|
36
|
+
console.log('[OK] Session started: ' + sessionId);
|
|
37
|
+
} catch (_) {}
|
|
38
|
+
return data;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function update(patch) {
|
|
42
|
+
ensureDir();
|
|
43
|
+
try {
|
|
44
|
+
var existing = restore() || start();
|
|
45
|
+
var merged = Object.assign({}, existing, patch, { updatedAt: new Date().toISOString() });
|
|
46
|
+
fs.writeFileSync(SESSION_FILE, JSON.stringify(merged, null, 2), 'utf-8');
|
|
47
|
+
return merged;
|
|
48
|
+
} catch (_) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function end() {
|
|
54
|
+
try {
|
|
55
|
+
var data = restore();
|
|
56
|
+
if (data) {
|
|
57
|
+
update({ endedAt: new Date().toISOString() });
|
|
58
|
+
console.log('[OK] Session ended: ' + data.sessionId);
|
|
59
|
+
}
|
|
60
|
+
} catch (_) {}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
module.exports = { restore, start, update, end };
|
|
@@ -157,13 +157,15 @@ function _injectCompactGraphMap() {
|
|
|
157
157
|
var recentEdits = _getRecentEdits();
|
|
158
158
|
for (var ri = 0; ri < Math.min(recentEdits.length, 5); ri++) {
|
|
159
159
|
var rfile = recentEdits[ri].file;
|
|
160
|
-
|
|
160
|
+
// Resolve to absolute for DB lookup (DB stores absolute paths); also keep relative for OR clause
|
|
161
|
+
var rabs = path.isAbsolute(rfile) ? rfile : path.join(CWD, rfile);
|
|
162
|
+
var rrel = (rabs.indexOf(CWD) === 0) ? rabs.slice(CWD.length + 1) : rabs;
|
|
161
163
|
try {
|
|
162
164
|
var rnode = db.prepare(
|
|
163
165
|
'SELECT n.name, n.label, n.file_path, ' +
|
|
164
166
|
'(SELECT COUNT(*) FROM edges WHERE source_id=n.id OR target_id=n.id) AS deg ' +
|
|
165
167
|
'FROM nodes n WHERE n.label=\'File\' AND (n.file_path=? OR n.file_path=?) LIMIT 1'
|
|
166
|
-
).get(
|
|
168
|
+
).get(rabs, rrel);
|
|
167
169
|
if (rnode && !seenPaths[rnode.file_path]) {
|
|
168
170
|
seenPaths[rnode.file_path] = 1;
|
|
169
171
|
anchors.push({ name: rnode.name, label: rnode.label, file_path: rnode.file_path, deg: rnode.deg, tag: '✎' });
|
|
@@ -10,13 +10,14 @@ const CWD = process.env.CLAUDE_PROJECT_DIR || process.cwd();
|
|
|
10
10
|
function _recordRecentEdit(filePath) {
|
|
11
11
|
if (!filePath) return;
|
|
12
12
|
try {
|
|
13
|
+
var relPath = path.isAbsolute(filePath) ? path.relative(CWD, filePath) : filePath;
|
|
13
14
|
var f = path.join(CWD, '.monomind', 'metrics', 'recent-edits.json');
|
|
14
15
|
fs.mkdirSync(path.dirname(f), { recursive: true });
|
|
15
16
|
var d = { edits: [] };
|
|
16
17
|
try { d = JSON.parse(fs.readFileSync(f, 'utf-8')); } catch (_) {}
|
|
17
18
|
if (!Array.isArray(d.edits)) d.edits = [];
|
|
18
|
-
d.edits = d.edits.filter(function(e) { return e.file !==
|
|
19
|
-
d.edits.unshift({ file:
|
|
19
|
+
d.edits = d.edits.filter(function(e) { return e.file !== relPath; });
|
|
20
|
+
d.edits.unshift({ file: relPath, editedAt: Date.now() });
|
|
20
21
|
if (d.edits.length > 10) d.edits = d.edits.slice(0, 10);
|
|
21
22
|
fs.writeFileSync(f, JSON.stringify(d));
|
|
22
23
|
} catch (e) { /* non-fatal */ }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"sessionId":"
|
|
1
|
+
{"sessionId":"64f579c5-48a4-4db0-a746-46a7f3fab6ab","pid":6041,"procStart":"Tue Jun 9 11:59:20 2026","acquiredAt":1781035942894}
|
package/.claude/settings.json
CHANGED
|
@@ -55,6 +55,16 @@
|
|
|
55
55
|
"timeout": 4000
|
|
56
56
|
}
|
|
57
57
|
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"matcher": "Write|Edit|MultiEdit",
|
|
61
|
+
"hooks": [
|
|
62
|
+
{
|
|
63
|
+
"type": "command",
|
|
64
|
+
"command": "node \"$CLAUDE_PROJECT_DIR/.claude/helpers/hook-handler.cjs\" pre-write",
|
|
65
|
+
"timeout": 3000
|
|
66
|
+
}
|
|
67
|
+
]
|
|
58
68
|
}
|
|
59
69
|
],
|
|
60
70
|
"PostToolUse": [
|
|
@@ -229,7 +239,7 @@
|
|
|
229
239
|
},
|
|
230
240
|
"attribution": {
|
|
231
241
|
"commit": "Co-Authored-By: nokhodian <nokhodian@gmail.com>",
|
|
232
|
-
"pr": "\ud83e\udd16 Generated with [monomind](https://github.com/
|
|
242
|
+
"pr": "\ud83e\udd16 Generated with [monomind](https://github.com/monoes/monomind)"
|
|
233
243
|
},
|
|
234
244
|
"monomind": {
|
|
235
245
|
"version": "3.5.2",
|
|
@@ -345,4 +355,4 @@
|
|
|
345
355
|
"enabledMcpjsonServers": [
|
|
346
356
|
"monomind"
|
|
347
357
|
]
|
|
348
|
-
}
|
|
358
|
+
}
|
|
@@ -625,7 +625,7 @@ async function agentSwarm(taskList) {
|
|
|
625
625
|
## Related Documentation
|
|
626
626
|
|
|
627
627
|
- **NPM Package**: https://npmjs.com/package/agentic-jujutsu
|
|
628
|
-
- **GitHub**: https://github.com/
|
|
628
|
+
- **GitHub**: https://github.com/monoes/monomind
|
|
629
629
|
- **Full README**: See package README.md
|
|
630
630
|
- **Validation Guide**: docs/VALIDATION_FIXES_v2.3.1.md
|
|
631
631
|
- **AgentDB Guide**: docs/AGENTDB_GUIDE.md
|
|
@@ -696,10 +696,10 @@ npx monomind hive-mind spawn "Review PR #456" \
|
|
|
696
696
|
|
|
697
697
|
## References
|
|
698
698
|
|
|
699
|
-
- [Hive Mind Documentation](https://github.com/
|
|
700
|
-
- [Collective Intelligence Patterns](https://github.com/
|
|
701
|
-
- [Byzantine Consensus](https://github.com/
|
|
702
|
-
- [Memory Optimization](https://github.com/
|
|
699
|
+
- [Hive Mind Documentation](https://github.com/monoes/monomind/docs/hive-mind)
|
|
700
|
+
- [Collective Intelligence Patterns](https://github.com/monoes/monomind/docs/patterns)
|
|
701
|
+
- [Byzantine Consensus](https://github.com/monoes/monomind/docs/consensus)
|
|
702
|
+
- [Memory Optimization](https://github.com/monoes/monomind/docs/memory)
|
|
703
703
|
|
|
704
704
|
---
|
|
705
705
|
|
|
@@ -25,7 +25,7 @@ REGISTRY="${REGISTRY:-.monomind/registry.json}"
|
|
|
25
25
|
# 1. Extract candidates from the registry filtered by category
|
|
26
26
|
candidates=$(jq -r \
|
|
27
27
|
--arg cats "$CATEGORIES" \
|
|
28
|
-
'[ .agents[]
|
|
28
|
+
'[ (.agents // [])[]
|
|
29
29
|
| select(.deprecated != true)
|
|
30
30
|
| select(
|
|
31
31
|
.category as $c |
|
|
@@ -95,7 +95,7 @@ CATS="engineering development"
|
|
|
95
95
|
best_agent=$(jq -r \
|
|
96
96
|
--arg cats "$CATS" \
|
|
97
97
|
--arg task "$(echo "$TASK_DESC" | tr '[:upper:]' '[:lower:]')" \
|
|
98
|
-
'[ .agents[]
|
|
98
|
+
'[ (.agents // [])[]
|
|
99
99
|
| select(.deprecated != true)
|
|
100
100
|
| select(.category as $c | ($cats | split(" ") | any(. == $c)))
|
|
101
101
|
| {name: .name, slug: .slug,
|
|
@@ -79,7 +79,7 @@ count=$(jq '.members | length' "$membersFile")
|
|
|
79
79
|
if [ "$count" -eq 0 ]; then
|
|
80
80
|
echo " No members. Use --action invite to add the first member."
|
|
81
81
|
else
|
|
82
|
-
jq -r '.members[] |
|
|
82
|
+
jq -r '(.members // [])[] |
|
|
83
83
|
[.id, (.role // "viewer"), (.status // "active"),
|
|
84
84
|
((.grants // []) | join(", ") | if . == "" then "(none)" else . end)]
|
|
85
85
|
| @tsv' "$membersFile" | while IFS=$'\t' read -r id role status grants; do
|
|
@@ -88,7 +88,7 @@ else
|
|
|
88
88
|
fi
|
|
89
89
|
|
|
90
90
|
# Show pending join requests
|
|
91
|
-
pending=$(jq '[.join_requests[] | select(.status == "pending")] | length' "$membersFile")
|
|
91
|
+
pending=$(jq '[(.join_requests // [])[] | select(.status == "pending")] | length' "$membersFile")
|
|
92
92
|
[ "$pending" -gt 0 ] && echo "" && echo " ⚠ $pending pending join request(s). Run --action join-requests to review."
|
|
93
93
|
```
|
|
94
94
|
|
|
@@ -130,7 +130,7 @@ esac
|
|
|
130
130
|
|
|
131
131
|
tmp="${membersFile}.tmp"
|
|
132
132
|
jq --arg id "$member_id" --arg role "$role" \
|
|
133
|
-
'.members = [.members[] | if .id == $id then .role = $role else . end]' \
|
|
133
|
+
'.members = [(.members // [])[] | if .id == $id then .role = $role else . end]' \
|
|
134
134
|
"$membersFile" > "$tmp" && mv "$tmp" "$membersFile"
|
|
135
135
|
echo "Member '$member_id' role → $role"
|
|
136
136
|
```
|
|
@@ -147,12 +147,12 @@ echo "$validKeys" | grep -qw "$permission" || { echo "ERROR: Unknown permission
|
|
|
147
147
|
tmp="${membersFile}.tmp"
|
|
148
148
|
if [ "$action" = "grant" ]; then
|
|
149
149
|
jq --arg id "$member_id" --arg perm "$permission" \
|
|
150
|
-
'.members = [.members[] | if .id == $id then .grants = ((.grants // []) + [$perm] | unique) else . end]' \
|
|
150
|
+
'.members = [(.members // [])[] | if .id == $id then .grants = ((.grants // []) + [$perm] | unique) else . end]' \
|
|
151
151
|
"$membersFile" > "$tmp" && mv "$tmp" "$membersFile"
|
|
152
152
|
echo "Granted: $permission → $member_id"
|
|
153
153
|
else
|
|
154
154
|
jq --arg id "$member_id" --arg perm "$permission" \
|
|
155
|
-
'.members = [.members[] | if .id == $id then .grants = ((.grants // []) | map(select(. != $perm))) else . end]' \
|
|
155
|
+
'.members = [(.members // [])[] | if .id == $id then .grants = ((.grants // []) | map(select(. != $perm))) else . end]' \
|
|
156
156
|
"$membersFile" > "$tmp" && mv "$tmp" "$membersFile"
|
|
157
157
|
echo "Revoked: $permission from $member_id"
|
|
158
158
|
fi
|
|
@@ -163,7 +163,7 @@ fi
|
|
|
163
163
|
```bash
|
|
164
164
|
[ -z "$member_id" ] && { echo "ERROR: --member-id required."; exit 1; }
|
|
165
165
|
tmp="${membersFile}.tmp"
|
|
166
|
-
jq --arg id "$member_id" '.members = [.members[] | select(.id != $id)]' \
|
|
166
|
+
jq --arg id "$member_id" '.members = [(.members // [])[] | select(.id != $id)]' \
|
|
167
167
|
"$membersFile" > "$tmp" && mv "$tmp" "$membersFile"
|
|
168
168
|
echo "Removed member: $member_id"
|
|
169
169
|
```
|
|
@@ -174,7 +174,7 @@ echo "Removed member: $member_id"
|
|
|
174
174
|
[ -z "$member_id" ] && { echo "ERROR: --member-id required."; exit 1; }
|
|
175
175
|
tmp="${membersFile}.tmp"
|
|
176
176
|
jq --arg id "$member_id" \
|
|
177
|
-
'.members = [.members[] | if .id == $id then .status = "suspended" else . end]' \
|
|
177
|
+
'.members = [(.members // [])[] | if .id == $id then .status = "suspended" else . end]' \
|
|
178
178
|
"$membersFile" > "$tmp" && mv "$tmp" "$membersFile"
|
|
179
179
|
echo "Member '$member_id' suspended. They cannot perform org actions until reinstated."
|
|
180
180
|
```
|
|
@@ -186,7 +186,7 @@ List pending join requests:
|
|
|
186
186
|
```bash
|
|
187
187
|
echo "JOIN REQUESTS — org: $org_name"
|
|
188
188
|
echo "────────────────────────────────────────────────────────"
|
|
189
|
-
jq -r '.join_requests[] | select(.status == "pending") |
|
|
189
|
+
jq -r '(.join_requests // [])[] | select(.status == "pending") |
|
|
190
190
|
"[\(.id)] type=\(.type // "join") role=\(.role // "viewer") created=\(.createdAt // "?")
|
|
191
191
|
→ /mastermind:access --org '"$org_name"' --action approve-join --request-id \(.id)
|
|
192
192
|
→ /mastermind:access --org '"$org_name"' --action reject-join --request-id \(.id)"
|
|
@@ -202,15 +202,15 @@ newStatus=$([ "$action" = "approve-join" ] && echo "approved" || echo "rejected"
|
|
|
202
202
|
tmp="${membersFile}.tmp"
|
|
203
203
|
if [ "$action" = "approve-join" ]; then
|
|
204
204
|
# Get role from request, create member record
|
|
205
|
-
requestRole=$(jq -r --arg id "$request_id" '.join_requests[] | select(.id == $id) | .role // "viewer"' "$membersFile")
|
|
205
|
+
requestRole=$(jq -r --arg id "$request_id" '(.join_requests // [])[] | select(.id == $id) | .role // "viewer"' "$membersFile")
|
|
206
206
|
jq --arg id "$request_id" --arg status "$newStatus" --arg role "$requestRole" --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
|
|
207
|
-
'.join_requests = [.join_requests[] | if .id == $id then .status = $status | .resolvedAt = $ts else . end] |
|
|
207
|
+
'.join_requests = [(.join_requests // [])[] | if .id == $id then .status = $status | .resolvedAt = $ts else . end] |
|
|
208
208
|
.members += [{"id":$id,"role":$role,"status":"active","grants":[],"joinedAt":$ts}]' \
|
|
209
209
|
"$membersFile" > "$tmp" && mv "$tmp" "$membersFile"
|
|
210
210
|
echo "Approved join request $request_id (role: $requestRole). Member added."
|
|
211
211
|
else
|
|
212
212
|
jq --arg id "$request_id" --arg status "$newStatus" --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
|
|
213
|
-
'.join_requests = [.join_requests[] | if .id == $id then .status = $status | .resolvedAt = $ts else . end]' \
|
|
213
|
+
'.join_requests = [(.join_requests // [])[] | if .id == $id then .status = $status | .resolvedAt = $ts else . end]' \
|
|
214
214
|
"$membersFile" > "$tmp" && mv "$tmp" "$membersFile"
|
|
215
215
|
echo "Rejected join request $request_id."
|
|
216
216
|
fi
|
|
@@ -97,7 +97,7 @@ echo "────────────────────────
|
|
|
97
97
|
printf "%-20s %-22s %-10s %-8s %-8s %s\n" "TYPE" "LABEL" "SOURCE" "MODELS" "STATUS" "VERSION"
|
|
98
98
|
echo "────────────────────────────────────────────────────────"
|
|
99
99
|
|
|
100
|
-
jq -r '.adapters[] |
|
|
100
|
+
jq -r '(.adapters // [])[] |
|
|
101
101
|
[.type, (.label // .type), (.source // "built-in"),
|
|
102
102
|
((.modelsCount // 0) | tostring),
|
|
103
103
|
(if .disabled then "disabled" else "enabled" end),
|
|
@@ -107,7 +107,7 @@ jq -r '.adapters[] |
|
|
|
107
107
|
done
|
|
108
108
|
|
|
109
109
|
total=$(jq '.adapters | length' "$adapterFile")
|
|
110
|
-
enabled=$(jq '[.adapters[] | select(.disabled == false or .disabled == null)] | length' "$adapterFile")
|
|
110
|
+
enabled=$(jq '[(.adapters // [])[] | select(.disabled == false or .disabled == null)] | length' "$adapterFile")
|
|
111
111
|
echo ""
|
|
112
112
|
echo " Total: $total | Enabled: $enabled | Disabled: $((total - enabled))"
|
|
113
113
|
echo ""
|
|
@@ -119,12 +119,12 @@ echo " To add a custom HTTP adapter: --action add-http --http-url http://localh
|
|
|
119
119
|
```bash
|
|
120
120
|
[ -z "$adapter_type" ] && { echo "ERROR: --adapter-type required."; exit 1; }
|
|
121
121
|
|
|
122
|
-
exists=$(jq -r --arg t "$adapter_type" '[.adapters[] | select(.type == $t)] | length' "$adapterFile")
|
|
122
|
+
exists=$(jq -r --arg t "$adapter_type" '[(.adapters // [])[] | select(.type == $t)] | length' "$adapterFile")
|
|
123
123
|
[ "$exists" -eq 0 ] && { echo "ERROR: Adapter '$adapter_type' not found. Use --action list to see available adapters."; exit 1; }
|
|
124
124
|
|
|
125
125
|
tmp="${adapterFile}.tmp"
|
|
126
126
|
jq --arg t "$adapter_type" \
|
|
127
|
-
'.adapters = [.adapters[] | if .type == $t then .disabled = false else . end]' \
|
|
127
|
+
'.adapters = [(.adapters // [])[] | if .type == $t then .disabled = false else . end]' \
|
|
128
128
|
"$adapterFile" > "$tmp" && mv "$tmp" "$adapterFile"
|
|
129
129
|
|
|
130
130
|
echo "Adapter '$adapter_type' ENABLED — will appear in agent model menus."
|
|
@@ -135,11 +135,11 @@ echo "Adapter '$adapter_type' ENABLED — will appear in agent model menus."
|
|
|
135
135
|
```bash
|
|
136
136
|
[ -z "$adapter_type" ] && { echo "ERROR: --adapter-type required."; exit 1; }
|
|
137
137
|
|
|
138
|
-
isBuiltIn=$(jq -r --arg t "$adapter_type" '.adapters[] | select(.type == $t) | .isBuiltIn // false' "$adapterFile")
|
|
138
|
+
isBuiltIn=$(jq -r --arg t "$adapter_type" '(.adapters // [])[] | select(.type == $t) | .isBuiltIn // false' "$adapterFile")
|
|
139
139
|
|
|
140
140
|
tmp="${adapterFile}.tmp"
|
|
141
141
|
jq --arg t "$adapter_type" \
|
|
142
|
-
'.adapters = [.adapters[] | if .type == $t then .disabled = true else . end]' \
|
|
142
|
+
'.adapters = [(.adapters // [])[] | if .type == $t then .disabled = true else . end]' \
|
|
143
143
|
"$adapterFile" > "$tmp" && mv "$tmp" "$adapterFile"
|
|
144
144
|
|
|
145
145
|
echo "Adapter '$adapter_type' DISABLED — hidden from model menus."
|
|
@@ -151,7 +151,7 @@ echo "Adapter '$adapter_type' DISABLED — hidden from model menus."
|
|
|
151
151
|
```bash
|
|
152
152
|
[ -z "$adapter_type" ] && { echo "ERROR: --adapter-type required."; exit 1; }
|
|
153
153
|
|
|
154
|
-
pkg=$(jq -r --arg t "$adapter_type" '.adapters[] | select(.type == $t) | .packageName // ""' "$adapterFile")
|
|
154
|
+
pkg=$(jq -r --arg t "$adapter_type" '(.adapters // [])[] | select(.type == $t) | .packageName // ""' "$adapterFile")
|
|
155
155
|
[ -z "$pkg" ] && { echo "ERROR: Adapter '$adapter_type' has no packageName — cannot reinstall. Only npm-installed adapters support reinstall."; exit 1; }
|
|
156
156
|
|
|
157
157
|
echo "REINSTALL — $adapter_type from $pkg"
|
|
@@ -163,7 +163,7 @@ if npm install "$pkg" 2>&1 | tail -5; then
|
|
|
163
163
|
ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
164
164
|
tmp="${adapterFile}.tmp"
|
|
165
165
|
jq --arg t "$adapter_type" --arg v "$newVer" --arg ts "$ts" \
|
|
166
|
-
'.adapters = [.adapters[] | if .type == $t then .version = $v | .reinstalledAt = $ts else . end]' \
|
|
166
|
+
'.adapters = [(.adapters // [])[] | if .type == $t then .version = $v | .reinstalledAt = $ts else . end]' \
|
|
167
167
|
"$adapterFile" > "$tmp" && mv "$tmp" "$adapterFile"
|
|
168
168
|
echo " Reinstalled: $adapter_type @ $newVer"
|
|
169
169
|
else
|
|
@@ -185,7 +185,7 @@ slug=$(echo "${http_name}" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-' |
|
|
|
185
185
|
slug="http-${slug}"
|
|
186
186
|
|
|
187
187
|
# Check for duplicate
|
|
188
|
-
dup=$(jq -r --arg t "$slug" '[.adapters[] | select(.type == $t)] | length' "$adapterFile")
|
|
188
|
+
dup=$(jq -r --arg t "$slug" '[(.adapters // [])[] | select(.type == $t)] | length' "$adapterFile")
|
|
189
189
|
[ "$dup" -gt 0 ] && { echo "ERROR: Adapter slug '$slug' already exists. Remove first: --action remove --adapter-type $slug"; exit 1; }
|
|
190
190
|
|
|
191
191
|
ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
@@ -209,12 +209,12 @@ echo " Status: enabled"
|
|
|
209
209
|
```bash
|
|
210
210
|
[ -z "$adapter_type" ] && { echo "ERROR: --adapter-type required."; exit 1; }
|
|
211
211
|
|
|
212
|
-
isBuiltIn=$(jq -r --arg t "$adapter_type" '.adapters[] | select(.type == $t) | .isBuiltIn // false' "$adapterFile")
|
|
212
|
+
isBuiltIn=$(jq -r --arg t "$adapter_type" '(.adapters // [])[] | select(.type == $t) | .isBuiltIn // false' "$adapterFile")
|
|
213
213
|
[ "$isBuiltIn" = "true" ] && { echo "ERROR: Cannot remove built-in adapter '$adapter_type'. Use --action disable instead."; exit 1; }
|
|
214
214
|
|
|
215
215
|
tmp="${adapterFile}.tmp"
|
|
216
216
|
jq --arg t "$adapter_type" \
|
|
217
|
-
'.adapters = [.adapters[] | select(.type != $t)]' \
|
|
217
|
+
'.adapters = [(.adapters // [])[] | select(.type != $t)]' \
|
|
218
218
|
"$adapterFile" > "$tmp" && mv "$tmp" "$adapterFile"
|
|
219
219
|
|
|
220
220
|
echo "Adapter '$adapter_type' removed from registry."
|
|
@@ -226,7 +226,7 @@ echo "Adapter '$adapter_type' removed from registry."
|
|
|
226
226
|
echo "CHECKING FOR ADAPTER UPDATES"
|
|
227
227
|
echo "────────────────────────────────────────────────────────"
|
|
228
228
|
|
|
229
|
-
jq -r '.adapters[] | select(.packageName != null and .packageName != "") |
|
|
229
|
+
jq -r '(.adapters // [])[] | select(.packageName != null and .packageName != "") |
|
|
230
230
|
[.type, .packageName, (.version // "unknown")] | @tsv' \
|
|
231
231
|
"$adapterFile" | while IFS=$'\t' read -r type pkg ver; do
|
|
232
232
|
latest=$(curl -sf "https://registry.npmjs.org/${pkg}/latest" 2>/dev/null | jq -r '.version // "?"' 2>/dev/null || echo "?")
|
|
@@ -237,7 +237,7 @@ jq -r '.adapters[] | select(.packageName != null and .packageName != "") |
|
|
|
237
237
|
fi
|
|
238
238
|
done
|
|
239
239
|
|
|
240
|
-
npmCount=$(jq '[.adapters[] | select(.packageName != null)] | length' "$adapterFile")
|
|
240
|
+
npmCount=$(jq '[(.adapters // [])[] | select(.packageName != null)] | length' "$adapterFile")
|
|
241
241
|
[ "$npmCount" -eq 0 ] && echo " No npm-installed adapters to check."
|
|
242
242
|
```
|
|
243
243
|
|