monomind 2.5.0 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/packages/@monomind/cli/.claude/agents/design/design-monodesign.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/_repeat.md +4 -4
- package/packages/@monomind/cli/.claude/commands/mastermind/approvev1.md +4 -4
- package/packages/@monomind/cli/.claude/commands/mastermind/architect.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/autodev.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/brain.md +2 -2
- package/packages/@monomind/cli/.claude/commands/mastermind/build.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/code-review.md +2 -2
- package/packages/@monomind/cli/.claude/commands/mastermind/content.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/createorg.md +4 -4
- package/packages/@monomind/cli/.claude/commands/mastermind/createtask.md +3 -3
- package/packages/@monomind/cli/.claude/commands/mastermind/debug.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/design.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/do.md +2 -2
- package/packages/@monomind/cli/.claude/commands/mastermind/execute.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/finance.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/finish.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/idea.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/ideate.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/improve.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/marketing.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/master.md +54 -54
- package/packages/@monomind/cli/.claude/commands/mastermind/ops.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/orgs.md +2 -2
- package/packages/@monomind/cli/.claude/commands/mastermind/orgstatus.md +2 -2
- package/packages/@monomind/cli/.claude/commands/mastermind/plan.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/receive-review.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/release.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/research.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/review.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/runorg.md +4 -4
- package/packages/@monomind/cli/.claude/commands/mastermind/runorgv1.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/sales.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/skill-builder.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/stoporg.md +3 -3
- package/packages/@monomind/cli/.claude/commands/mastermind/taskdev.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/tdd.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/techport.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/verify.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/worktree.md +5 -5
- package/packages/@monomind/cli/.claude/helpers/control-start.cjs +30 -0
- package/packages/@monomind/cli/.claude/helpers/utils/monograph.cjs +44 -12
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/access.md → mastermind-access/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/activity.md → mastermind-activity/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/adapter-manager.md → mastermind-adapter-manager/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/adapters.md → mastermind-adapters/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/agent-detail.md → mastermind-agent-detail/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/agents.md → mastermind-agents/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/approval-detail.md → mastermind-approval-detail/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/approvev1.md → mastermind-approvev1/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/architect.md → mastermind-architect/SKILL.md} +7 -7
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/autodev.md → mastermind-autodev/SKILL.md} +10 -10
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/backup.md → mastermind-backup/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/bootstrap.md → mastermind-bootstrap/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/budgets.md → mastermind-budgets/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/build.md → mastermind-build/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/companies.md → mastermind-companies/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/content.md → mastermind-content/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/costs.md → mastermind-costs/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/createorg.md → mastermind-createorg/SKILL.md} +3 -3
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/debug.md → mastermind-debug/SKILL.md} +4 -4
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/_delegation.md → mastermind-delegation/SKILL.md} +1 -1
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/design.md → mastermind-design/SKILL.md} +9 -9
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/diagnose.md → mastermind-diagnose/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/env.md → mastermind-env/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/environments.md → mastermind-environments/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/execute.md → mastermind-execute/SKILL.md} +10 -10
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/export.md → mastermind-export/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/finance.md → mastermind-finance/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/goal-detail.md → mastermind-goal-detail/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/goals.md → mastermind-goals/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/heartbeatv1.md → mastermind-heartbeatv1/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/idea.md → mastermind-idea/SKILL.md} +7 -7
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/import.md → mastermind-import/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/inbox.md → mastermind-inbox/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/instance.md → mastermind-instance/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/instance-settings.md → mastermind-instance-settings/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/invite-landing.md → mastermind-invite-landing/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/invites.md → mastermind-invites/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/issue-detail.md → mastermind-issue-detail/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/issues.md → mastermind-issues/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/join-queue.md → mastermind-join-queue/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/liveness.md → mastermind-liveness/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/marketing.md → mastermind-marketing/SKILL.md} +8 -8
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/memory.md → mastermind-memory/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/monitor.md → mastermind-monitor/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/my-issues.md → mastermind-my-issues/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/new-agent.md → mastermind-new-agent/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/ops.md → mastermind-ops/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/org-chart.md → mastermind-org-chart/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/org-settings.md → mastermind-org-settings/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/orgs.md → mastermind-orgs/SKILL.md} +1 -1
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/orgstatus.md → mastermind-orgstatus/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/plan.md → mastermind-plan/SKILL.md} +7 -7
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/plan-to-tasks.md → mastermind-plan-to-tasks/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/plugin-manager.md → mastermind-plugin-manager/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/plugin-settings.md → mastermind-plugin-settings/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/plugins.md → mastermind-plugins/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/profile.md → mastermind-profile/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/project-detail.md → mastermind-project-detail/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/project-workspace.md → mastermind-project-workspace/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/projects.md → mastermind-projects/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/_protocol.md → mastermind-protocol/SKILL.md} +3 -3
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/release.md → mastermind-release/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/_repeat.md → mastermind-repeat/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/research.md → mastermind-research/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/review.md → mastermind-review/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/routine-detail.md → mastermind-routine-detail/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/routines.md → mastermind-routines/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/runorgv1.md → mastermind-runorgv1/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/sales.md → mastermind-sales/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/search.md → mastermind-search/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/secrets.md → mastermind-secrets/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/skill-builder.md → mastermind-skill-builder/SKILL.md} +16 -14
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/{skills.md → SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/stoporg.md → mastermind-stoporg/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/taskdev.md → mastermind-taskdev/SKILL.md} +6 -6
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-taskdev}/implementer-prompt.md +1 -1
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/tasks.md → mastermind-tasks/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/tdd.md → mastermind-tdd/SKILL.md} +4 -4
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/techport.md → mastermind-techport/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/threads.md → mastermind-threads/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/tree-control.md → mastermind-tree-control/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/verify.md → mastermind-verify/SKILL.md} +1 -1
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/wiki.md → mastermind-wiki/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/workspace-detail.md → mastermind-workspace-detail/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/workspaces.md → mastermind-workspaces/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/monodesign/SKILL.md +114 -190
- package/packages/@monomind/cli/.claude/skills/monodesign/adapt.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/agents/monodesign-asset-producer.md +4 -4
- package/packages/@monomind/cli/.claude/skills/monodesign/agents/monodesign-manual-edit-applier.md +103 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/audit.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/craft.md +2 -2
- package/packages/@monomind/cli/.claude/skills/monodesign/critique.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/init.md +30 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/layout.md +36 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/live.md +19 -44
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/adapt.md +122 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/adapt.native.md +58 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/android.md +40 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/animate.md +39 -11
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/antipatterns-catalog.md +22 -16
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/audit.md +5 -3
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/audit.native.md +139 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/bolder.md +71 -64
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/brand.md +12 -18
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/clarify.md +114 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/codex.md +4 -6
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/colorize.md +108 -5
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/craft.md +70 -143
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/critique.md +635 -68
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/delight.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/distill.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/document.md +24 -22
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/extract.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/hooks.md +22 -29
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/init.md +221 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/interaction-design.md +0 -6
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/ios.md +45 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/layout.md +57 -13
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/live.md +159 -63
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/overdrive.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/personas.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/polish.md +16 -8
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/pre-delivery-checklist.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/product.md +1 -3
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/quieter.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/shape.md +27 -13
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/teach.md +6 -152
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/typeset.md +180 -3
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/command-metadata.json +94 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/context-signals.mjs +227 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/context.mjs +1062 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/critique-storage.mjs +243 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detect-csp.mjs +199 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detect.mjs +34 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/browser/injected/index.mjs +1938 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/cli/main.mjs +322 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/design-system.mjs +815 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/detect-antipatterns-browser.js +5246 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/detect-antipatterns.mjs +51 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/browser/detect-url.mjs +260 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/browser/drivers.mjs +259 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/regex/detect-text.mjs +574 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/static-html/css-cascade.mjs +1016 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/static-html/detect-html.mjs +235 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/visual/screenshot-contrast.mjs +199 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/findings.mjs +13 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/node/file-system.mjs +199 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/profile/profiler.mjs +167 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/registry/antipatterns.mjs +515 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/rules/checks.mjs +2704 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/shared/color.mjs +125 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/shared/constants.mjs +102 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/shared/fonts.mjs +31 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/shared/inline-ignores.mjs +149 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/shared/page.mjs +8 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/hook-admin.mjs +662 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/hook-before-edit.mjs +517 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/hook-lib.mjs +1777 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/hook.mjs +62 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/design-parser.mjs +843 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/is-generated.mjs +70 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/monodesign-config.mjs +641 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/monodesign-paths.mjs +130 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/provider.mjs +5 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/target-args.mjs +43 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/browser-script-parts.mjs +51 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/completion.mjs +20 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/event-validation.mjs +138 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/insert-ui.mjs +459 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/manual-apply.mjs +940 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/manual-edit-routes.mjs +358 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/manual-edits-buffer.mjs +153 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/session-store.mjs +290 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/svelte-component.mjs +827 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/sveltekit-adapter.mjs +275 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/ui-core.mjs +181 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/vocabulary.mjs +37 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-accept.mjs +813 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-browser-dom.js +147 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-browser-session.js +124 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-browser.js +11241 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-commit-manual-edits.mjs +1242 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-complete.mjs +76 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-copy-edit-agent.mjs +684 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-discard-manual-edits.mjs +52 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-inject.mjs +584 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-insert.mjs +273 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-manual-edit-evidence.mjs +364 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-poll.mjs +385 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-resume.mjs +95 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-server.mjs +1138 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-status.mjs +62 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-target.mjs +31 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-wrap.mjs +895 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live.mjs +298 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/modern-screenshot.umd.js +15 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/palette.mjs +634 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/pin.mjs +222 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/teach.md +7 -58
- package/packages/@monomind/cli/dist/src/commands/design-detect.d.ts +7 -1
- package/packages/@monomind/cli/dist/src/commands/design-detect.js +70 -38
- package/packages/@monomind/cli/dist/src/commands/design-palette.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/design-palette.js +3 -3
- package/packages/@monomind/cli/dist/src/commands/doc.js +72 -15
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.d.ts +4 -0
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.js +23 -0
- package/packages/@monomind/cli/dist/src/commands/doctor.js +3 -3
- package/packages/@monomind/cli/dist/src/commands/org.js +109 -9
- package/packages/@monomind/cli/dist/src/init/executor.js +14 -3
- package/packages/@monomind/cli/dist/src/knowledge/document-pipeline.d.ts +2 -0
- package/packages/@monomind/cli/dist/src/knowledge/document-pipeline.js +1 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/knowledge-tools.js +38 -7
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.d.ts +8 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +193 -31
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +33 -0
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +169 -18
- package/packages/@monomind/cli/dist/src/memory/memory-kg.d.ts +185 -0
- package/packages/@monomind/cli/dist/src/memory/memory-kg.js +449 -0
- package/packages/@monomind/cli/dist/src/memory/query-router.d.ts +44 -0
- package/packages/@monomind/cli/dist/src/memory/query-router.js +113 -0
- package/packages/@monomind/cli/dist/src/orgrt/daemon.d.ts +18 -0
- package/packages/@monomind/cli/dist/src/orgrt/daemon.js +249 -12
- package/packages/@monomind/cli/dist/src/orgrt/migrate.js +7 -0
- package/packages/@monomind/cli/dist/src/orgrt/policy.js +7 -0
- package/packages/@monomind/cli/dist/src/orgrt/session.d.ts +24 -1
- package/packages/@monomind/cli/dist/src/orgrt/session.js +18 -3
- package/packages/@monomind/cli/dist/src/orgrt/templates.d.ts +1 -0
- package/packages/@monomind/cli/dist/src/orgrt/templates.js +9 -4
- package/packages/@monomind/cli/dist/src/orgrt/types.d.ts +15 -0
- package/packages/@monomind/cli/dist/src/orgrt/types.js +2 -0
- package/packages/@monomind/cli/dist/src/ui/dashboard.html +154 -6
- package/packages/@monomind/cli/dist/src/ui/orgs.html +24 -0
- package/packages/@monomind/cli/dist/src/ui/server.mjs +211 -13
- package/packages/@monomind/cli/package.json +6 -4
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/_agent-select.md → mastermind-agent-select/SKILL.md} +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/finish.md → mastermind-finish/SKILL.md} +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/_intake.md → mastermind-intake/SKILL.md} +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-marketing}/references/copywriting-frameworks.md +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-marketing}/references/persuasion-psychology.md +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/monotask.md → mastermind-monotask/SKILL.md} +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/receive-review.md → mastermind-receive-review/SKILL.md} +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/runorg.md → mastermind-runorg/SKILL.md} +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-taskdev}/code-quality-reviewer-prompt.md +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-taskdev}/final-reviewer-prompt.md +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-taskdev}/spec-reviewer-prompt.md +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/worktree.md → mastermind-worktree/SKILL.md} +0 -0
|
@@ -19,6 +19,8 @@ export class OrgDaemon {
|
|
|
19
19
|
globalSubscribers = new Set();
|
|
20
20
|
leases = new Map();
|
|
21
21
|
forwarders = new Map();
|
|
22
|
+
watchdogs = new Map();
|
|
23
|
+
stopping = new Map();
|
|
22
24
|
constructor(root, opts = {}) {
|
|
23
25
|
this.root = root;
|
|
24
26
|
this.opts = opts;
|
|
@@ -51,10 +53,26 @@ export class OrgDaemon {
|
|
|
51
53
|
// Write's captured content snapshot alone can be up to 200KB (policy.ts).
|
|
52
54
|
const MAX_COLLECTED = 5000;
|
|
53
55
|
const collected = [];
|
|
56
|
+
let lastActivity = Date.now();
|
|
54
57
|
bus.subscribe(e => {
|
|
55
58
|
collected.push(e);
|
|
56
59
|
if (collected.length > MAX_COLLECTED)
|
|
57
60
|
collected.splice(0, collected.length - MAX_COLLECTED);
|
|
61
|
+
// The watchdog's own nudge event must not count as org activity, or a
|
|
62
|
+
// hung boss would never trip the "nudge produced no activity" stop.
|
|
63
|
+
if (e.reason !== 'idle-nudge')
|
|
64
|
+
lastActivity = Date.now();
|
|
65
|
+
// org_complete IS the end of the run — self-stop instead of sitting
|
|
66
|
+
// "running" forever after a recorded outcome. Deferred (unref'd) so the
|
|
67
|
+
// tool call's receipt reaches the boss and its final turn text still
|
|
68
|
+
// lands on the bus before mailboxes close; stopOrg is reentrant-safe
|
|
69
|
+
// against a concurrent manual stop.
|
|
70
|
+
if (e.type === 'status' && e.reason === 'org-complete') {
|
|
71
|
+
const t = setTimeout(() => {
|
|
72
|
+
this.stopOrg(name).catch(err => console.error(`org ${name}: auto-stop after org_complete failed:`, err instanceof Error ? err.message : err));
|
|
73
|
+
}, 1000);
|
|
74
|
+
t.unref?.();
|
|
75
|
+
}
|
|
58
76
|
for (const fn of this.globalSubscribers)
|
|
59
77
|
fn(e);
|
|
60
78
|
});
|
|
@@ -69,6 +87,19 @@ export class OrgDaemon {
|
|
|
69
87
|
// fallback-selected boss could be told to call org_complete without having
|
|
70
88
|
// the tool.
|
|
71
89
|
const bossRole = def.roles.find(r => r.type === 'boss' || r.reports_to === null) ?? def.roles[0];
|
|
90
|
+
// Canonical entity names from the org KG — injected into the coordinator
|
|
91
|
+
// prompt so org_learn extractions reuse them instead of minting duplicates.
|
|
92
|
+
const glossary = await (async () => {
|
|
93
|
+
try {
|
|
94
|
+
if (!(await this.orgMemoryUsable()))
|
|
95
|
+
return [];
|
|
96
|
+
const kg = await import('../memory/memory-kg.js');
|
|
97
|
+
return await kg.kgGlossary({ dbPath: this.orgMemoryDbPath() });
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
102
|
+
})();
|
|
72
103
|
for (const role of def.roles) {
|
|
73
104
|
const mailbox = new Mailbox();
|
|
74
105
|
const policy = new PolicyEngine(role.id, { maxTokens: perRoleBudget, ...(role.policy ?? {}) }, bus, cwd);
|
|
@@ -84,7 +115,7 @@ export class OrgDaemon {
|
|
|
84
115
|
}
|
|
85
116
|
: undefined,
|
|
86
117
|
recall: async (r, q) => {
|
|
87
|
-
const answer = await this.recallOrgMemory(name, def, q);
|
|
118
|
+
const answer = await this.recallOrgMemory(name, def, q, r);
|
|
88
119
|
bus.emit({ type: 'status', from: r, reason: 'org-recall', msg: `recall: ${q.slice(0, 80)}`, data: { hits: answer.hits } });
|
|
89
120
|
return answer.text;
|
|
90
121
|
},
|
|
@@ -93,6 +124,20 @@ export class OrgDaemon {
|
|
|
93
124
|
bus.emit({ type: 'status', from: r, reason: 'knowledge-search', msg: `knowledge: ${q.slice(0, 80)}`, data: { hits: answer.hits } });
|
|
94
125
|
return answer.text;
|
|
95
126
|
},
|
|
127
|
+
glossary,
|
|
128
|
+
remember: async (r, content, scope) => {
|
|
129
|
+
const text = await this.rememberOrgMemory(name, def, r, content, scope, run);
|
|
130
|
+
bus.emit({ type: 'status', from: r, reason: 'org-remember', msg: `remember (${scope}): ${content.slice(0, 80)}`, data: { scope } });
|
|
131
|
+
return text;
|
|
132
|
+
},
|
|
133
|
+
learn: async (r, payload) => {
|
|
134
|
+
const text = await this.learnOrgKnowledge(name, run, payload);
|
|
135
|
+
bus.emit({
|
|
136
|
+
type: 'status', from: r, reason: 'org-learn', msg: `learn: ${text.slice(0, 120)}`,
|
|
137
|
+
data: { nodes: payload.nodes?.length ?? 0, edges: payload.edges?.length ?? 0, rules: payload.rules?.length ?? 0 },
|
|
138
|
+
});
|
|
139
|
+
return text;
|
|
140
|
+
},
|
|
96
141
|
queryFn: this.opts.queryFn,
|
|
97
142
|
};
|
|
98
143
|
// Supervised session: transient crashes (provider blips, network) restart
|
|
@@ -163,6 +208,50 @@ export class OrgDaemon {
|
|
|
163
208
|
`Coordinate your team via org_send. When the goal is achieved (or clearly can't be), record it with org_complete, then end your turn.${prevBrief}`);
|
|
164
209
|
bus.emit({ type: 'status', msg: `org started (${def.roles.length} agents)`, data: { goal: taskOverride ?? def.goal } });
|
|
165
210
|
this.persistState(name, 'running', run);
|
|
211
|
+
// Idle watchdog: a hung tool call (or a run that quietly finished without
|
|
212
|
+
// org_complete) produces no bus events, and every agent just waits. After
|
|
213
|
+
// idle_minutes of silence, nudge the boss to complete or reassign; if the
|
|
214
|
+
// nudge itself produces no activity (boss hung/crashed), or the org keeps
|
|
215
|
+
// going idle after MAX_IDLE_NUDGES nudges, stop the run instead of letting
|
|
216
|
+
// it freeze forever. idle_minutes: 0 disables.
|
|
217
|
+
const idleMs = (def.run_config.idle_minutes ?? 10) * 60_000;
|
|
218
|
+
if (idleMs > 0) {
|
|
219
|
+
const MAX_IDLE_NUDGES = 3;
|
|
220
|
+
let nudgedAt = 0;
|
|
221
|
+
let nudges = 0;
|
|
222
|
+
const idleStop = (msg) => {
|
|
223
|
+
bus.emit({ type: 'audit', reason: 'idle-stop', msg });
|
|
224
|
+
this.stopOrg(name).catch(err => console.error(`org ${name}: idle-stop failed:`, err instanceof Error ? err.message : err));
|
|
225
|
+
};
|
|
226
|
+
const wd = setInterval(() => {
|
|
227
|
+
const idleFor = Date.now() - lastActivity;
|
|
228
|
+
if (idleFor < idleMs) {
|
|
229
|
+
nudgedAt = 0;
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (nudgedAt === 0) {
|
|
233
|
+
if (nudges >= MAX_IDLE_NUDGES) {
|
|
234
|
+
idleStop(`org idle again after ${nudges} nudges — stopping run`);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
const bossRt = running.agents.get(bossRole.id);
|
|
238
|
+
if (!bossRt || bossRt.status !== 'running' || bossRt.mailbox.isClosed) {
|
|
239
|
+
idleStop(`org idle for ${Math.round(idleFor / 60_000)}m and boss "${bossRole.id}" is unreachable — stopping run`);
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
nudges++;
|
|
243
|
+
nudgedAt = Date.now();
|
|
244
|
+
bus.emit({ type: 'audit', from: bossRole.id, reason: 'idle-nudge', msg: `no org activity for ${Math.round(idleFor / 60_000)}m — nudging boss (${nudges}/${MAX_IDLE_NUDGES})` });
|
|
245
|
+
bossRt.mailbox.push(`[watchdog] No activity in org "${name}" for ${Math.round(idleFor / 60_000)} minute(s). ` +
|
|
246
|
+
`If the goal is achieved (or clearly can't be), call org_complete now. Otherwise check on your team via org_send and reassign stalled work.`);
|
|
247
|
+
}
|
|
248
|
+
else if (Date.now() - nudgedAt >= idleMs) {
|
|
249
|
+
idleStop(`nudge produced no activity for another ${Math.round(idleMs / 60_000)}m — boss appears hung, stopping run`);
|
|
250
|
+
}
|
|
251
|
+
}, Math.max(200, Math.min(idleMs / 2, 30_000)));
|
|
252
|
+
wd.unref?.();
|
|
253
|
+
this.watchdogs.set(name, wd);
|
|
254
|
+
}
|
|
166
255
|
if (this.opts.crossProcess && this.opts.inboxUrl) {
|
|
167
256
|
const lease = new BrokerLease(name, this.opts.inboxUrl, this.opts.brokerDir);
|
|
168
257
|
lease.start();
|
|
@@ -383,19 +472,42 @@ export class OrgDaemon {
|
|
|
383
472
|
.finally(() => { this.waking.delete(name); });
|
|
384
473
|
}
|
|
385
474
|
async stopOrg(name) {
|
|
475
|
+
// Join an in-flight stop instead of no-oping: the self-stop paths
|
|
476
|
+
// (org_complete, idle watchdog) run detached, and a caller like
|
|
477
|
+
// `org run`'s final stopAll() must not resolve — letting the process
|
|
478
|
+
// exit — while that stop is still flushing the bus and writing
|
|
479
|
+
// history/runtime.json.
|
|
480
|
+
const inflight = this.stopping.get(name);
|
|
481
|
+
if (inflight)
|
|
482
|
+
return inflight;
|
|
386
483
|
const org = this.orgs.get(name);
|
|
387
484
|
if (!org)
|
|
388
|
-
return; // already stopped
|
|
485
|
+
return; // already stopped
|
|
389
486
|
// Remove immediately (not at the end) so a concurrent stopOrg(name) call —
|
|
390
|
-
// e.g. stopAll() racing a scheduler-triggered stop on SIGINT —
|
|
391
|
-
//
|
|
487
|
+
// e.g. stopAll() racing a scheduler-triggered stop on SIGINT — joins this
|
|
488
|
+
// shutdown via `stopping` instead of re-running the whole sequence and
|
|
392
489
|
// double-emitting 'org stopped' (duplicate org:complete/session:complete).
|
|
393
490
|
this.orgs.delete(name);
|
|
491
|
+
const p = this.finishStop(name, org);
|
|
492
|
+
this.stopping.set(name, p);
|
|
493
|
+
try {
|
|
494
|
+
await p;
|
|
495
|
+
}
|
|
496
|
+
finally {
|
|
497
|
+
this.stopping.delete(name);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
async finishStop(name, org) {
|
|
394
501
|
// Capture THIS run's forwarder now: an autoWake-restart of the same org
|
|
395
502
|
// during the long tail below (agent wait, flush, history write) would
|
|
396
503
|
// register a NEW forwarder under the same name — settling/unsubscribing
|
|
397
504
|
// that one would sever the new run's dashboard stream.
|
|
398
505
|
const forwarder = this.forwarders.get(name);
|
|
506
|
+
const wd = this.watchdogs.get(name);
|
|
507
|
+
if (wd) {
|
|
508
|
+
clearInterval(wd);
|
|
509
|
+
this.watchdogs.delete(name);
|
|
510
|
+
}
|
|
399
511
|
this.leases.get(name)?.stop();
|
|
400
512
|
this.leases.delete(name);
|
|
401
513
|
for (const a of org.agents.values())
|
|
@@ -453,7 +565,10 @@ export class OrgDaemon {
|
|
|
453
565
|
this.persistState(name, 'stopped', org.run);
|
|
454
566
|
}
|
|
455
567
|
async stopAll() {
|
|
456
|
-
await Promise.all([
|
|
568
|
+
await Promise.all([
|
|
569
|
+
...[...this.orgs.keys()].map(n => this.stopOrg(n)),
|
|
570
|
+
...this.stopping.values(), // detached self-stops still flushing
|
|
571
|
+
]);
|
|
457
572
|
}
|
|
458
573
|
orgMemoryNamespace(name, def) {
|
|
459
574
|
return def.run_config.memory_namespace ?? `org:${name}`;
|
|
@@ -486,21 +601,82 @@ export class OrgDaemon {
|
|
|
486
601
|
return false;
|
|
487
602
|
}
|
|
488
603
|
}
|
|
604
|
+
/** Namespace for a role's PRIVATE memories, inside the org memory DB. */
|
|
605
|
+
agentMemoryNamespace(name, def, role) {
|
|
606
|
+
return `agent:${this.orgMemoryNamespace(name, def)}:${role}`;
|
|
607
|
+
}
|
|
608
|
+
/** org_remember implementation: a deliberate write to org-shared or
|
|
609
|
+
* role-private memory (both in the org memory DB, split by namespace). */
|
|
610
|
+
async rememberOrgMemory(name, def, role, content, scope, run) {
|
|
611
|
+
try {
|
|
612
|
+
if (!(await this.orgMemoryUsable()))
|
|
613
|
+
return 'org memory is not available in this environment.';
|
|
614
|
+
const { bridgeStoreEntry } = await import('../memory/memory-bridge.js');
|
|
615
|
+
const namespace = scope === 'agent' ? this.agentMemoryNamespace(name, def, role) : this.orgMemoryNamespace(name, def);
|
|
616
|
+
const res = await bridgeStoreEntry({
|
|
617
|
+
key: `mem-${run}-${Date.now().toString(36)}`,
|
|
618
|
+
value: content.slice(0, 20_000),
|
|
619
|
+
namespace,
|
|
620
|
+
dbPath: this.orgMemoryDbPath(),
|
|
621
|
+
tags: [scope, role],
|
|
622
|
+
metadata: { origin_refs: [`run:${run}`], by: role },
|
|
623
|
+
});
|
|
624
|
+
if (res?.duplicate)
|
|
625
|
+
return `Already remembered (near-duplicate exists) — reinforced instead.`;
|
|
626
|
+
return res?.success ? `Remembered (${scope} scope).` : `Could not store memory${res?.error ? `: ${res.error}` : ''}.`;
|
|
627
|
+
}
|
|
628
|
+
catch (err) {
|
|
629
|
+
return `org_remember failed (${err instanceof Error ? err.message : 'error'})`;
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
/** Entry IDs served by org_recall during the current run, per org. This is
|
|
633
|
+
* the usage record the run-outcome auto-rating consumes (cognee's
|
|
634
|
+
* used_graph_element_ids pattern) — recall renders text to the agent, so
|
|
635
|
+
* the IDs must be captured here or they're gone. */
|
|
636
|
+
recallUsage = new Map();
|
|
489
637
|
/** org_recall implementation: search the org's memory namespace via the
|
|
490
638
|
* memory bridge (semantic when the local model is available, tokenized
|
|
491
639
|
* keyword otherwise). Failures return a message, never throw into the tool. */
|
|
492
|
-
async recallOrgMemory(name, def, query) {
|
|
640
|
+
async recallOrgMemory(name, def, query, role) {
|
|
493
641
|
try {
|
|
494
642
|
if (!(await this.orgMemoryUsable()))
|
|
495
643
|
return { text: 'org memory is not available in this environment.', hits: 0 };
|
|
496
|
-
const
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
644
|
+
const bridge = await import('../memory/memory-bridge.js');
|
|
645
|
+
// Shared org memory plus the caller's private agent scope, merged by score.
|
|
646
|
+
const [shared, priv] = await Promise.all([
|
|
647
|
+
bridge.bridgeSearchEntries({
|
|
648
|
+
query, namespace: this.orgMemoryNamespace(name, def), limit: 5, dbPath: this.orgMemoryDbPath(),
|
|
649
|
+
}),
|
|
650
|
+
role ? bridge.bridgeSearchEntries({
|
|
651
|
+
query, namespace: this.agentMemoryNamespace(name, def, role), limit: 3, dbPath: this.orgMemoryDbPath(),
|
|
652
|
+
}) : null,
|
|
653
|
+
]);
|
|
654
|
+
const results = [
|
|
655
|
+
...(shared?.results ?? []),
|
|
656
|
+
...(priv?.results ?? []).map(r => ({ ...r, key: `${r.key} (private)` })),
|
|
657
|
+
].sort((a, b) => b.score - a.score).slice(0, 6);
|
|
501
658
|
if (!results.length)
|
|
502
659
|
return { text: 'No matching org memory found — this may be the first run covering this topic.', hits: 0 };
|
|
503
|
-
const
|
|
660
|
+
const ids = results.map(r => r.id).filter(Boolean);
|
|
661
|
+
let used = this.recallUsage.get(name);
|
|
662
|
+
if (!used) {
|
|
663
|
+
used = new Set();
|
|
664
|
+
this.recallUsage.set(name, used);
|
|
665
|
+
}
|
|
666
|
+
for (const id of ids)
|
|
667
|
+
used.add(id);
|
|
668
|
+
// Frequency reinforcement is immediate; the feedback rating waits for the
|
|
669
|
+
// run outcome (positive-only — see storeRunMemory).
|
|
670
|
+
bridge.bridgeRecordUsage({ entryIds: ids, dbPath: this.orgMemoryDbPath() }).catch(() => { });
|
|
671
|
+
let text = results.map((r, i) => `${i + 1}. [${r.key}] ${r.content}`).join('\n\n');
|
|
672
|
+
// Structured knowledge: relationship triplets from the org KG, when any.
|
|
673
|
+
try {
|
|
674
|
+
const kg = await import('../memory/memory-kg.js');
|
|
675
|
+
const graph = await kg.kgSearch({ query, dbPath: this.orgMemoryDbPath(), limit: 5 });
|
|
676
|
+
if (graph.context)
|
|
677
|
+
text += `\n\nKnowledge graph:\n${graph.context}`;
|
|
678
|
+
}
|
|
679
|
+
catch { /* best effort */ }
|
|
504
680
|
return { text, hits: results.length };
|
|
505
681
|
}
|
|
506
682
|
catch (err) {
|
|
@@ -524,6 +700,38 @@ export class OrgDaemon {
|
|
|
524
700
|
return { text: `knowledge search unavailable (${err instanceof Error ? err.message : 'error'})`, hits: 0 };
|
|
525
701
|
}
|
|
526
702
|
}
|
|
703
|
+
/** org_learn implementation: merge coordinator-extracted entities/relations/
|
|
704
|
+
* rules into the org's knowledge graph (LLM extraction happens inside the
|
|
705
|
+
* agent's own subscription-auth SDK session — no separate LLM call here). */
|
|
706
|
+
orgLearnedRuns = new Set();
|
|
707
|
+
async learnOrgKnowledge(name, run, payload) {
|
|
708
|
+
try {
|
|
709
|
+
if (!(await this.orgMemoryUsable()))
|
|
710
|
+
return 'org memory is not available in this environment.';
|
|
711
|
+
const kg = await import('../memory/memory-kg.js');
|
|
712
|
+
const dbPath = this.orgMemoryDbPath();
|
|
713
|
+
const originRef = `run:${run}`;
|
|
714
|
+
const graph = await kg.kgIngest({
|
|
715
|
+
nodes: (payload.nodes ?? []),
|
|
716
|
+
edges: (payload.edges ?? []),
|
|
717
|
+
originRef, dbPath,
|
|
718
|
+
});
|
|
719
|
+
const rules = Array.isArray(payload.rules) && payload.rules.length
|
|
720
|
+
? await kg.kgIngestRules({ rules: payload.rules, originRef, dbPath })
|
|
721
|
+
: null;
|
|
722
|
+
this.orgLearnedRuns.add(`${name}:${run}`);
|
|
723
|
+
const parts = [
|
|
724
|
+
`entities: +${graph.nodesAdded} new, ${graph.nodesMerged} merged`,
|
|
725
|
+
`relations: +${graph.edgesAdded} new, ${graph.edgesMerged} merged`,
|
|
726
|
+
];
|
|
727
|
+
if (rules)
|
|
728
|
+
parts.push(`rules: ${rules.accepted} accepted, ${rules.verdicts.filter(v => v.verdict === 'already_known').length} already known`);
|
|
729
|
+
return `Recorded in org knowledge graph — ${parts.join('; ')}. Rollback ref: ${originRef}.`;
|
|
730
|
+
}
|
|
731
|
+
catch (err) {
|
|
732
|
+
return `org_learn failed (${err instanceof Error ? err.message : 'error'})`;
|
|
733
|
+
}
|
|
734
|
+
}
|
|
527
735
|
/** Persist the run's outcome into cross-run org memory so org_recall (and
|
|
528
736
|
* future runs) can find it by meaning, not just recency. Best-effort. */
|
|
529
737
|
async storeRunMemory(name, def, run, summary) {
|
|
@@ -547,6 +755,35 @@ export class OrgDaemon {
|
|
|
547
755
|
dbPath: this.orgMemoryDbPath(),
|
|
548
756
|
upsert: true,
|
|
549
757
|
});
|
|
758
|
+
// Heuristic KG fallback: if the coordinator never called org_learn this
|
|
759
|
+
// run, extract lower-trust entities from the outcome summary so the
|
|
760
|
+
// graph still accumulates something. LLM-quality extraction only comes
|
|
761
|
+
// from org_learn (the agent's own session).
|
|
762
|
+
if (!this.orgLearnedRuns.delete(`${name}:${run}`)) {
|
|
763
|
+
try {
|
|
764
|
+
const kg = await import('../memory/memory-kg.js');
|
|
765
|
+
const extracted = kg.heuristicExtract(lines.join('\n'), { sourceName: `run:${run}` });
|
|
766
|
+
if (extracted.nodes.length) {
|
|
767
|
+
await kg.kgIngest({ ...extracted, originRef: `run:${run}`, dbPath: this.orgMemoryDbPath() });
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
catch { /* best effort */ }
|
|
771
|
+
}
|
|
772
|
+
// Auto-rate the memories this run recalled — POSITIVE-ONLY: a failed run
|
|
773
|
+
// proves nothing about the recalled memories (the failure may be entirely
|
|
774
|
+
// unrelated), so failure never rates them down. Idempotent per run via
|
|
775
|
+
// the feedback ledger, so a retried stopOrg can't double-apply.
|
|
776
|
+
const used = this.recallUsage.get(name);
|
|
777
|
+
this.recallUsage.delete(name);
|
|
778
|
+
if (used?.size && summary.outcome?.status === 'achieved') {
|
|
779
|
+
const { bridgeApplyFeedback } = await import('../memory/memory-bridge.js');
|
|
780
|
+
await bridgeApplyFeedback({
|
|
781
|
+
entryIds: [...used],
|
|
782
|
+
score: 0.9,
|
|
783
|
+
ledgerKey: `org-${name}-${run}`,
|
|
784
|
+
dbPath: this.orgMemoryDbPath(),
|
|
785
|
+
}).catch(() => { });
|
|
786
|
+
}
|
|
550
787
|
}
|
|
551
788
|
catch (err) {
|
|
552
789
|
if (process.env.DEBUG || process.env.MONOMIND_DEBUG)
|
|
@@ -59,6 +59,13 @@ export function migrateOrgConfig(raw) {
|
|
|
59
59
|
const roleKeysDropped = new Set();
|
|
60
60
|
def['roles'] = def['roles'].map(role => {
|
|
61
61
|
const r = { ...role };
|
|
62
|
+
// Legacy serialization artifact: some v1 writers stringified a missing
|
|
63
|
+
// manager as the literal "undefined". Treat it as unset (schema
|
|
64
|
+
// defaults to null); structural validation still enforces one root.
|
|
65
|
+
if (r['reports_to'] === 'undefined') {
|
|
66
|
+
delete r['reports_to'];
|
|
67
|
+
notes.push(`role ${String(r['id'])}: reports_to "undefined" → unset`);
|
|
68
|
+
}
|
|
62
69
|
if (typeof r['agent_type'] === 'string') {
|
|
63
70
|
if (r['type'] == null || r['type'] === 'specialist') {
|
|
64
71
|
r['type'] = r['agent_type'];
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
// packages/@monomind/cli/src/orgrt/policy.ts
|
|
2
2
|
import { relative, resolve } from 'node:path';
|
|
3
3
|
const WRITE_TOOLS = new Set(['Write', 'Edit', 'NotebookEdit']);
|
|
4
|
+
/** Harness messaging tools that bypass the org bus. Always denied: an agent
|
|
5
|
+
* that picks one gets the SDK's misleading "no agent named X is reachable"
|
|
6
|
+
* error, concludes its teammate is down, and deadlocks the run (observed in
|
|
7
|
+
* the field). org_send is the only inter-agent channel. */
|
|
8
|
+
const HARNESS_MESSAGING_TOOLS = new Set(['SendMessage']);
|
|
4
9
|
const READ_TOOLS = new Set(['Read', 'Glob', 'Grep']);
|
|
5
10
|
const WEB_TOOLS = new Set(['WebFetch', 'WebSearch']);
|
|
6
11
|
/** Cap for inline content snapshots on 'asset' events (bytes, UTF-16 chars) — keeps
|
|
@@ -83,6 +88,8 @@ export class PolicyEngine {
|
|
|
83
88
|
}
|
|
84
89
|
return { behavior: 'allow', updatedInput: input };
|
|
85
90
|
};
|
|
91
|
+
if (HARNESS_MESSAGING_TOOLS.has(tool))
|
|
92
|
+
return deny(`${tool} does not reach org agents — inter-agent messaging goes through the org_send tool only; resend via org_send (to, subject, message)`);
|
|
86
93
|
if (this.overBudget)
|
|
87
94
|
return deny(`token budget exhausted (${this.used}/${this.policy.maxTokens})`);
|
|
88
95
|
if (this.policy.denyTools?.includes(tool))
|
|
@@ -17,6 +17,29 @@ export interface SessionOpts {
|
|
|
17
17
|
onComplete?: (role: string, outcome: 'achieved' | 'partial' | 'failed', summary: string) => void;
|
|
18
18
|
/** Search the org's accumulated cross-run memory (memory_namespace). */
|
|
19
19
|
recall?: (role: string, query: string) => Promise<string>;
|
|
20
|
+
/** Write a memory deliberately: scope 'org' (shared, default) or 'agent' (private to this role). */
|
|
21
|
+
remember?: (role: string, content: string, scope: 'org' | 'agent') => Promise<string>;
|
|
22
|
+
/** Persist extracted entities/relations/rules into the org's knowledge graph. */
|
|
23
|
+
learn?: (role: string, payload: {
|
|
24
|
+
nodes?: {
|
|
25
|
+
name: string;
|
|
26
|
+
type?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
}[];
|
|
29
|
+
edges?: {
|
|
30
|
+
source: string;
|
|
31
|
+
target: string;
|
|
32
|
+
relation: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
}[];
|
|
35
|
+
rules?: {
|
|
36
|
+
rule: string;
|
|
37
|
+
context?: string;
|
|
38
|
+
}[];
|
|
39
|
+
}) => Promise<string>;
|
|
40
|
+
/** Top existing KG entity names — injected into the coordinator prompt so
|
|
41
|
+
* extraction reuses canonical names instead of minting near-duplicates. */
|
|
42
|
+
glossary?: string[];
|
|
20
43
|
/** Search the user's Second Brain (project documents + personal global brain). */
|
|
21
44
|
searchKnowledge?: (role: string, query: string) => Promise<string>;
|
|
22
45
|
def?: OrgDef;
|
|
@@ -24,7 +47,7 @@ export interface SessionOpts {
|
|
|
24
47
|
queryFn?: typeof query;
|
|
25
48
|
}
|
|
26
49
|
/** Role briefing given to each agent session (SDK systemPrompt option). */
|
|
27
|
-
export declare function buildRolePrompt(role: OrgRole, def: Pick<OrgDef, 'name' | 'goal'>, roster: string[]): string;
|
|
50
|
+
export declare function buildRolePrompt(role: OrgRole, def: Pick<OrgDef, 'name' | 'goal'>, roster: string[], glossary?: string[]): string;
|
|
28
51
|
/**
|
|
29
52
|
* Runs a role for the life of the org, transparently restarting the
|
|
30
53
|
* underlying SDK session whenever it ends on its own (`maxTurns` reached)
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
import { query, tool, createSdkMcpServer } from '@anthropic-ai/claude-agent-sdk';
|
|
4
4
|
import { resolveProviderEnv } from './provider.js';
|
|
5
5
|
/** Role briefing given to each agent session (SDK systemPrompt option). */
|
|
6
|
-
export function buildRolePrompt(role, def, roster) {
|
|
6
|
+
export function buildRolePrompt(role, def, roster, glossary) {
|
|
7
7
|
const isCoordinator = role.reports_to == null;
|
|
8
8
|
return [
|
|
9
9
|
`You are agent "${role.id}" (${role.title || role.type}) in the org "${def.name}".`,
|
|
@@ -18,8 +18,11 @@ export function buildRolePrompt(role, def, roster) {
|
|
|
18
18
|
`The user's documents (notes, handbooks, specs) are searchable with knowledge_search — ground your work in them instead of guessing; results labeled [global] come from the user's personal cross-project brain.`,
|
|
19
19
|
`When you receive a message, act on it, then org_send your result to the requester.`,
|
|
20
20
|
isCoordinator
|
|
21
|
-
? `When the org's goal for this run is achieved (or clearly can't be)
|
|
21
|
+
? `When the org's goal for this run is achieved (or clearly can't be): first call org_learn ONCE with the durable knowledge this run produced — key entities (basic types, fullest names), their relationships (snake_case, one-sentence facts), and any reusable rules ("when X, do Y") worth keeping. Then call org_complete exactly once with the outcome and a concise summary. Then end your turn.`
|
|
22
22
|
: `When your current work is complete and no reply is needed, end your turn without further tool calls.`,
|
|
23
|
+
isCoordinator && glossary?.length
|
|
24
|
+
? `Known entities (reuse these EXACT names in org_learn instead of near-duplicates): ${glossary.slice(0, 40).join(', ')}`
|
|
25
|
+
: '',
|
|
23
26
|
].filter(Boolean).join('\n\n');
|
|
24
27
|
}
|
|
25
28
|
/**
|
|
@@ -65,6 +68,18 @@ async function runOneSession(opts) {
|
|
|
65
68
|
const text = await opts.recall(role.id, args.query);
|
|
66
69
|
return { content: [{ type: 'text', text }] };
|
|
67
70
|
})] : []),
|
|
71
|
+
...(opts.remember ? [tool('org_remember', 'Save a memory for future runs. scope "org" (default) shares it with the whole org; scope "agent" keeps it private to your role. Use for decisions, findings, and state worth recalling later — org_recall searches both.', { content: z.string(), scope: z.enum(['org', 'agent']).optional() }, async (args) => {
|
|
72
|
+
const text = await opts.remember(role.id, args.content, args.scope ?? 'org');
|
|
73
|
+
return { content: [{ type: 'text', text }] };
|
|
74
|
+
})] : []),
|
|
75
|
+
...(opts.learn ? [tool('org_learn', 'Persist durable knowledge from this run into the org\'s knowledge graph: entities ({name, type?, description?}), relationships ({source, target, relation, description?}) and reusable rules ({rule, context?}). Entities merge by name across runs — reuse the exact names listed in your briefing. Call once, before org_complete.', {
|
|
76
|
+
nodes: z.array(z.object({ name: z.string(), type: z.string().optional(), description: z.string().optional() })).optional(),
|
|
77
|
+
edges: z.array(z.object({ source: z.string(), target: z.string(), relation: z.string(), description: z.string().optional() })).optional(),
|
|
78
|
+
rules: z.array(z.object({ rule: z.string(), context: z.string().optional() })).optional(),
|
|
79
|
+
}, async (args) => {
|
|
80
|
+
const text = await opts.learn(role.id, args);
|
|
81
|
+
return { content: [{ type: 'text', text }] };
|
|
82
|
+
})] : []),
|
|
68
83
|
// Gate purely on onComplete: the daemon passes it only to the role its
|
|
69
84
|
// boss-selection rule picked, so tool availability always matches the
|
|
70
85
|
// kickoff instruction (reports_to may be non-null for a fallback boss).
|
|
@@ -90,7 +105,7 @@ async function runOneSession(opts) {
|
|
|
90
105
|
const stream = queryFn({
|
|
91
106
|
prompt: mailbox.stream(),
|
|
92
107
|
options: {
|
|
93
|
-
systemPrompt: buildRolePrompt(role, (opts.def ?? { name: org, goal: '' }), opts.def?.roles.map(r => r.id) ?? [role.id]),
|
|
108
|
+
systemPrompt: buildRolePrompt(role, (opts.def ?? { name: org, goal: '' }), opts.def?.roles.map(r => r.id) ?? [role.id], opts.glossary),
|
|
94
109
|
model: role.adapter_config?.model,
|
|
95
110
|
cwd,
|
|
96
111
|
env: resolveProviderEnv(role.provider),
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
// Each validates against OrgDefSchema; goal is a placeholder the user edits
|
|
4
4
|
// (or supplies via --goal).
|
|
5
5
|
import { OrgDefSchema } from './types.js';
|
|
6
|
+
// Per-role model hints keep scheduled-org economics sane: coordinators keep
|
|
7
|
+
// the default (strongest) model since they synthesize and decide; verification
|
|
8
|
+
// and mechanical roles run on Haiku — the dogfooded release-desk run showed
|
|
9
|
+
// review/QA roles spend a third of the tokens for checklist-shaped work.
|
|
10
|
+
const FAST_MODEL = 'claude-haiku-4-5-20251001';
|
|
6
11
|
export const ORG_TEMPLATES = {
|
|
7
12
|
'content-team': {
|
|
8
13
|
goal: 'Produce and publish high-quality content on a steady cadence',
|
|
@@ -11,7 +16,7 @@ export const ORG_TEMPLATES = {
|
|
|
11
16
|
responsibilities: ['Own the content calendar and quality bar', 'Assign pieces to the writer and route drafts to review', 'Approve final drafts for publishing'] },
|
|
12
17
|
{ id: 'writer', title: 'Staff Writer', type: 'specialist', reports_to: 'editor-in-chief',
|
|
13
18
|
responsibilities: ['Draft articles from assigned briefs', 'Incorporate review feedback', 'Hand finished drafts to the reviewer'] },
|
|
14
|
-
{ id: 'reviewer', title: 'Content Reviewer', type: 'reviewer', reports_to: 'editor-in-chief',
|
|
19
|
+
{ id: 'reviewer', title: 'Content Reviewer', type: 'reviewer', reports_to: 'editor-in-chief', model: FAST_MODEL,
|
|
15
20
|
responsibilities: ['Review drafts for accuracy, clarity, and tone', 'Return actionable feedback to the writer', 'Flag anything needing human judgment via ask_human'] },
|
|
16
21
|
],
|
|
17
22
|
},
|
|
@@ -24,7 +29,7 @@ export const ORG_TEMPLATES = {
|
|
|
24
29
|
responsibilities: ['Implement assigned tasks with tests', 'Keep changes small and focused', 'Send diffs to the reviewer before reporting done'] },
|
|
25
30
|
{ id: 'code-reviewer', title: 'Code Reviewer', type: 'reviewer', reports_to: 'tech-lead',
|
|
26
31
|
responsibilities: ['Review diffs for correctness and maintainability', 'Verify claimed test results', 'Reject unverified work'] },
|
|
27
|
-
{ id: 'qa', title: 'QA Engineer', type: 'specialist', reports_to: 'tech-lead',
|
|
32
|
+
{ id: 'qa', title: 'QA Engineer', type: 'specialist', reports_to: 'tech-lead', model: FAST_MODEL,
|
|
28
33
|
responsibilities: ['Exercise delivered features end-to-end', 'File precise reproduction steps for defects'] },
|
|
29
34
|
],
|
|
30
35
|
},
|
|
@@ -35,7 +40,7 @@ export const ORG_TEMPLATES = {
|
|
|
35
40
|
responsibilities: ['Define research questions for each cycle', 'Synthesize findings into the final brief', 'Decide what merits deeper follow-up'] },
|
|
36
41
|
{ id: 'researcher', title: 'Researcher', type: 'researcher', reports_to: 'lead-analyst',
|
|
37
42
|
responsibilities: ['Gather primary sources on assigned questions', 'Separate observed facts from inference', 'Deliver structured findings with citations'] },
|
|
38
|
-
{ id: 'fact-checker', title: 'Fact Checker', type: 'reviewer', reports_to: 'lead-analyst',
|
|
43
|
+
{ id: 'fact-checker', title: 'Fact Checker', type: 'reviewer', reports_to: 'lead-analyst', model: FAST_MODEL,
|
|
39
44
|
responsibilities: ['Verify claims in draft briefs against sources', 'Flag unverifiable claims for removal or hedging'] },
|
|
40
45
|
],
|
|
41
46
|
},
|
|
@@ -51,7 +56,7 @@ export function buildFromTemplate(templateName, orgName, goal) {
|
|
|
51
56
|
status: 'stopped',
|
|
52
57
|
schedule: null,
|
|
53
58
|
run_config: { max_concurrent_agents: 4, budget_tokens: 1_000_000, memory_namespace: `org:${orgName}`, max_turns_per_message: 30 },
|
|
54
|
-
roles: t.roles,
|
|
59
|
+
roles: t.roles.map(({ model, ...r }) => model ? { ...r, adapter_config: { model } } : r),
|
|
55
60
|
});
|
|
56
61
|
}
|
|
57
62
|
//# sourceMappingURL=templates.js.map
|
|
@@ -222,18 +222,22 @@ export declare const OrgDefSchema: z.ZodObject<{
|
|
|
222
222
|
budget_tokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
223
223
|
memory_namespace: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
224
224
|
max_turns_per_message: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
225
|
+
idle_minutes: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
225
226
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
226
227
|
max_concurrent_agents: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
227
228
|
budget_tokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
228
229
|
memory_namespace: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
229
230
|
max_turns_per_message: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
231
|
+
idle_minutes: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
230
232
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
231
233
|
max_concurrent_agents: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
232
234
|
budget_tokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
233
235
|
memory_namespace: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
234
236
|
max_turns_per_message: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
237
|
+
idle_minutes: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
235
238
|
}, z.ZodTypeAny, "passthrough">>>, {
|
|
236
239
|
memory_namespace?: string | undefined;
|
|
240
|
+
idle_minutes?: number | undefined;
|
|
237
241
|
max_concurrent_agents: number;
|
|
238
242
|
budget_tokens: number;
|
|
239
243
|
max_turns_per_message: number;
|
|
@@ -242,6 +246,7 @@ export declare const OrgDefSchema: z.ZodObject<{
|
|
|
242
246
|
budget_tokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
243
247
|
memory_namespace: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
244
248
|
max_turns_per_message: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
249
|
+
idle_minutes: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
245
250
|
}, z.ZodTypeAny, "passthrough"> | undefined>;
|
|
246
251
|
roles: z.ZodArray<z.ZodObject<{
|
|
247
252
|
id: z.ZodString;
|
|
@@ -425,18 +430,22 @@ export declare const OrgDefSchema: z.ZodObject<{
|
|
|
425
430
|
budget_tokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
426
431
|
memory_namespace: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
427
432
|
max_turns_per_message: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
433
|
+
idle_minutes: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
428
434
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
429
435
|
max_concurrent_agents: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
430
436
|
budget_tokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
431
437
|
memory_namespace: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
432
438
|
max_turns_per_message: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
439
|
+
idle_minutes: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
433
440
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
434
441
|
max_concurrent_agents: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
435
442
|
budget_tokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
436
443
|
memory_namespace: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
437
444
|
max_turns_per_message: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
445
|
+
idle_minutes: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
438
446
|
}, z.ZodTypeAny, "passthrough">>>, {
|
|
439
447
|
memory_namespace?: string | undefined;
|
|
448
|
+
idle_minutes?: number | undefined;
|
|
440
449
|
max_concurrent_agents: number;
|
|
441
450
|
budget_tokens: number;
|
|
442
451
|
max_turns_per_message: number;
|
|
@@ -445,6 +454,7 @@ export declare const OrgDefSchema: z.ZodObject<{
|
|
|
445
454
|
budget_tokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
446
455
|
memory_namespace: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
447
456
|
max_turns_per_message: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
457
|
+
idle_minutes: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
448
458
|
}, z.ZodTypeAny, "passthrough"> | undefined>;
|
|
449
459
|
roles: z.ZodArray<z.ZodObject<{
|
|
450
460
|
id: z.ZodString;
|
|
@@ -628,18 +638,22 @@ export declare const OrgDefSchema: z.ZodObject<{
|
|
|
628
638
|
budget_tokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
629
639
|
memory_namespace: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
630
640
|
max_turns_per_message: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
641
|
+
idle_minutes: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
631
642
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
632
643
|
max_concurrent_agents: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
633
644
|
budget_tokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
634
645
|
memory_namespace: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
635
646
|
max_turns_per_message: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
647
|
+
idle_minutes: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
636
648
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
637
649
|
max_concurrent_agents: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
638
650
|
budget_tokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
639
651
|
memory_namespace: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
640
652
|
max_turns_per_message: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
653
|
+
idle_minutes: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
641
654
|
}, z.ZodTypeAny, "passthrough">>>, {
|
|
642
655
|
memory_namespace?: string | undefined;
|
|
656
|
+
idle_minutes?: number | undefined;
|
|
643
657
|
max_concurrent_agents: number;
|
|
644
658
|
budget_tokens: number;
|
|
645
659
|
max_turns_per_message: number;
|
|
@@ -648,6 +662,7 @@ export declare const OrgDefSchema: z.ZodObject<{
|
|
|
648
662
|
budget_tokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
649
663
|
memory_namespace: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
650
664
|
max_turns_per_message: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
665
|
+
idle_minutes: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
651
666
|
}, z.ZodTypeAny, "passthrough"> | undefined>;
|
|
652
667
|
roles: z.ZodArray<z.ZodObject<{
|
|
653
668
|
id: z.ZodString;
|
|
@@ -43,6 +43,8 @@ export const OrgDefSchema = z.object({
|
|
|
43
43
|
budget_tokens: z.number().int().positive().default(1_000_000),
|
|
44
44
|
memory_namespace: z.string().optional(),
|
|
45
45
|
max_turns_per_message: z.number().int().positive().default(30),
|
|
46
|
+
/** idle watchdog window in minutes (fractions allowed); 0 disables. Default 10. */
|
|
47
|
+
idle_minutes: z.number().nonnegative().optional(),
|
|
46
48
|
}).partial().passthrough().default({})
|
|
47
49
|
.transform(rc => ({ max_concurrent_agents: 4, budget_tokens: 1_000_000, max_turns_per_message: 30, ...rc })),
|
|
48
50
|
roles: z.array(RoleSchema).min(1),
|