mu-harness 0.16.15 → 0.16.16
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 +14 -8
- package/esm/core/src/agent.d.ts +0 -39
- package/esm/core/src/agent.js +0 -96
- package/esm/core/src/index.d.ts +0 -4
- package/esm/core/src/index.js +0 -2
- package/esm/core/src/types.d.ts +0 -59
- package/esm/core/src/types.js +0 -3
- package/esm/harness/src/agents/index.d.ts +0 -4
- package/esm/harness/src/agents/index.js +0 -3
- package/esm/harness/src/agents/loader.d.ts +0 -2
- package/esm/harness/src/agents/loader.js +0 -24
- package/esm/harness/src/agents/parser.d.ts +0 -2
- package/esm/harness/src/agents/parser.js +0 -46
- package/esm/harness/src/agents/registry.d.ts +0 -9
- package/esm/harness/src/agents/registry.js +0 -88
- package/esm/harness/src/agents/types.js +0 -1
- package/esm/harness/src/channels/channel.d.ts +0 -7
- package/esm/harness/src/channels/channel.js +0 -25
- package/esm/harness/src/channels/index.d.ts +0 -3
- package/esm/harness/src/channels/index.js +0 -2
- package/esm/harness/src/channels/manager.d.ts +0 -6
- package/esm/harness/src/channels/manager.js +0 -28
- package/esm/harness/src/channels/types.d.ts +0 -30
- package/esm/harness/src/channels/types.js +0 -1
- package/esm/harness/src/commands/defaults.d.ts +0 -11
- package/esm/harness/src/commands/defaults.js +0 -53
- package/esm/harness/src/commands/index.d.ts +0 -3
- package/esm/harness/src/commands/index.js +0 -2
- package/esm/harness/src/commands/registry.d.ts +0 -2
- package/esm/harness/src/commands/registry.js +0 -59
- package/esm/harness/src/commands/types.js +0 -1
- package/esm/harness/src/common/frontmatter.js +0 -18
- package/esm/harness/src/common/index.d.ts +0 -2
- package/esm/harness/src/common/index.js +0 -2
- package/esm/harness/src/common/utils.js +0 -22
- package/esm/harness/src/config/index.d.ts +0 -2
- package/esm/harness/src/config/index.js +0 -1
- package/esm/harness/src/config/resolve.d.ts +0 -2
- package/esm/harness/src/config/resolve.js +0 -10
- package/esm/harness/src/config/types.js +0 -1
- package/esm/harness/src/harness/create.d.ts +0 -2
- package/esm/harness/src/harness/create.js +0 -167
- package/esm/harness/src/harness/index.d.ts +0 -3
- package/esm/harness/src/harness/index.js +0 -2
- package/esm/harness/src/harness/models.js +0 -30
- package/esm/harness/src/harness/types.d.ts +0 -50
- package/esm/harness/src/harness/types.js +0 -1
- package/esm/harness/src/hooks/index.d.ts +0 -3
- package/esm/harness/src/hooks/index.js +0 -2
- package/esm/harness/src/hooks/merge-hooks.d.ts +0 -2
- package/esm/harness/src/hooks/merge-hooks.js +0 -46
- package/esm/harness/src/hooks/types.js +0 -1
- package/esm/harness/src/hooks/with-hooks.d.ts +0 -3
- package/esm/harness/src/hooks/with-hooks.js +0 -12
- package/esm/harness/src/index.d.ts +0 -14
- package/esm/harness/src/index.js +0 -14
- package/esm/harness/src/permissions/allow-list.d.ts +0 -4
- package/esm/harness/src/permissions/allow-list.js +0 -8
- package/esm/harness/src/permissions/approval-manager.d.ts +0 -31
- package/esm/harness/src/permissions/approval-manager.js +0 -55
- package/esm/harness/src/permissions/approval.d.ts +0 -17
- package/esm/harness/src/permissions/approval.js +0 -13
- package/esm/harness/src/permissions/glob.js +0 -2
- package/esm/harness/src/permissions/index.d.ts +0 -4
- package/esm/harness/src/permissions/index.js +0 -4
- package/esm/harness/src/plugin/define.d.ts +0 -2
- package/esm/harness/src/plugin/define.js +0 -1
- package/esm/harness/src/plugin/import-ts.js +0 -85
- package/esm/harness/src/plugin/index.d.ts +0 -5
- package/esm/harness/src/plugin/index.js +0 -4
- package/esm/harness/src/plugin/resolve.d.ts +0 -13
- package/esm/harness/src/plugin/resolve.js +0 -17
- package/esm/harness/src/plugin/store.js +0 -26
- package/esm/harness/src/plugin/types.d.ts +0 -11
- package/esm/harness/src/plugin/types.js +0 -1
- package/esm/harness/src/scheduler/command.d.ts +0 -3
- package/esm/harness/src/scheduler/command.js +0 -19
- package/esm/harness/src/scheduler/engine/index.d.ts +0 -4
- package/esm/harness/src/scheduler/engine/index.js +0 -3
- package/esm/harness/src/scheduler/engine/memory-store.d.ts +0 -2
- package/esm/harness/src/scheduler/engine/memory-store.js +0 -23
- package/esm/harness/src/scheduler/engine/scheduler.d.ts +0 -13
- package/esm/harness/src/scheduler/engine/scheduler.js +0 -73
- package/esm/harness/src/scheduler/engine/store.d.ts +0 -4
- package/esm/harness/src/scheduler/engine/store.js +0 -55
- package/esm/harness/src/scheduler/engine/types.js +0 -1
- package/esm/harness/src/scheduler/index.d.ts +0 -4
- package/esm/harness/src/scheduler/index.js +0 -3
- package/esm/harness/src/scheduler/tool.d.ts +0 -8
- package/esm/harness/src/scheduler/tool.js +0 -48
- package/esm/harness/src/session/agent-session.d.ts +0 -15
- package/esm/harness/src/session/agent-session.js +0 -83
- package/esm/harness/src/session/catalog.js +0 -55
- package/esm/harness/src/session/index.d.ts +0 -7
- package/esm/harness/src/session/index.js +0 -6
- package/esm/harness/src/session/manager.d.ts +0 -39
- package/esm/harness/src/session/manager.js +0 -65
- package/esm/harness/src/session/persist.d.ts +0 -3
- package/esm/harness/src/session/persist.js +0 -24
- package/esm/harness/src/session/store.js +0 -24
- package/esm/harness/src/session/title.js +0 -24
- package/esm/harness/src/session/types.js +0 -1
- package/esm/harness/src/skills/index.d.ts +0 -8
- package/esm/harness/src/skills/index.js +0 -7
- package/esm/harness/src/skills/loader.d.ts +0 -10
- package/esm/harness/src/skills/loader.js +0 -59
- package/esm/harness/src/skills/parser.d.ts +0 -2
- package/esm/harness/src/skills/parser.js +0 -16
- package/esm/harness/src/skills/platform.js +0 -14
- package/esm/harness/src/skills/registry.d.ts +0 -8
- package/esm/harness/src/skills/registry.js +0 -16
- package/esm/harness/src/skills/run.d.ts +0 -14
- package/esm/harness/src/skills/run.js +0 -44
- package/esm/harness/src/skills/tool.d.ts +0 -3
- package/esm/harness/src/skills/tool.js +0 -31
- package/esm/harness/src/skills/types.js +0 -1
- package/esm/harness/src/skills/writer.d.ts +0 -8
- package/esm/harness/src/skills/writer.js +0 -55
- package/esm/harness/src/subAgents/index.d.ts +0 -4
- package/esm/harness/src/subAgents/index.js +0 -3
- package/esm/harness/src/subAgents/registry.d.ts +0 -2
- package/esm/harness/src/subAgents/registry.js +0 -18
- package/esm/harness/src/subAgents/runner.d.ts +0 -15
- package/esm/harness/src/subAgents/runner.js +0 -33
- package/esm/harness/src/subAgents/tool.d.ts +0 -6
- package/esm/harness/src/subAgents/tool.js +0 -64
- package/esm/harness/src/subAgents/types.d.ts +0 -18
- package/esm/harness/src/subAgents/types.js +0 -1
- package/esm/harness/src/tui/chat/ChatApp.d.ts +0 -188
- package/esm/harness/src/tui/chat/ChatApp.js +0 -1306
- package/esm/harness/src/tui/chat/commands.js +0 -21
- package/esm/harness/src/tui/chat/editor.js +0 -147
- package/esm/harness/src/tui/chat/index.d.ts +0 -9
- package/esm/harness/src/tui/chat/index.js +0 -7
- package/esm/harness/src/tui/chat/markdown.d.ts +0 -9
- package/esm/harness/src/tui/chat/markdown.js +0 -295
- package/esm/harness/src/tui/chat/picker.js +0 -123
- package/esm/harness/src/tui/chat/status.d.ts +0 -15
- package/esm/harness/src/tui/chat/status.js +0 -48
- package/esm/harness/src/tui/chat/theme.js +0 -201
- package/esm/harness/src/tui/chat/transcript.d.ts +0 -79
- package/esm/harness/src/tui/chat/transcript.js +0 -422
- package/esm/harness/src/tui/index.d.ts +0 -8
- package/esm/harness/src/tui/index.js +0 -12
- package/esm/tui/src/capabilities.d.ts +0 -72
- package/esm/tui/src/capabilities.js +0 -90
- package/esm/tui/src/components/command-palette.d.ts +0 -24
- package/esm/tui/src/components/command-palette.js +0 -60
- package/esm/tui/src/components/editor.d.ts +0 -26
- package/esm/tui/src/components/editor.js +0 -111
- package/esm/tui/src/components/scroll-view.d.ts +0 -26
- package/esm/tui/src/components/scroll-view.js +0 -70
- package/esm/tui/src/components/select-list.d.ts +0 -24
- package/esm/tui/src/components/select-list.js +0 -71
- package/esm/tui/src/events.d.ts +0 -56
- package/esm/tui/src/events.js +0 -6
- package/esm/tui/src/index.d.ts +0 -17
- package/esm/tui/src/index.js +0 -13
- package/esm/tui/src/inputRouter.d.ts +0 -28
- package/esm/tui/src/inputRouter.js +0 -128
- package/esm/tui/src/keybinds.d.ts +0 -13
- package/esm/tui/src/keybinds.js +0 -15
- package/esm/tui/src/keyboard.d.ts +0 -2
- package/esm/tui/src/keyboard.js +0 -319
- package/esm/tui/src/layout/ansi.d.ts +0 -3
- package/esm/tui/src/layout/ansi.js +0 -330
- package/esm/tui/src/layout/cell.d.ts +0 -24
- package/esm/tui/src/layout/cell.js +0 -46
- package/esm/tui/src/layout/cellbuffer.d.ts +0 -29
- package/esm/tui/src/layout/cellbuffer.js +0 -306
- package/esm/tui/src/layout/color.d.ts +0 -22
- package/esm/tui/src/layout/color.js +0 -163
- package/esm/tui/src/layout/insets.d.ts +0 -8
- package/esm/tui/src/layout/insets.js +0 -55
- package/esm/tui/src/layout/types.d.ts +0 -33
- package/esm/tui/src/layout/types.js +0 -8
- package/esm/tui/src/parser.d.ts +0 -18
- package/esm/tui/src/parser.js +0 -136
- package/esm/tui/src/renderer.d.ts +0 -32
- package/esm/tui/src/renderer.js +0 -168
- package/esm/tui/src/surface.d.ts +0 -27
- package/esm/tui/src/surface.js +0 -110
- package/esm/tui/src/terminal.d.ts +0 -48
- package/esm/tui/src/terminal.js +0 -255
- package/esm/tui/src/tui.d.ts +0 -60
- package/esm/tui/src/tui.js +0 -194
- package/esm/tui/src/types/terminal.d.ts +0 -20
- package/esm/tui/src/types/terminal.js +0 -1
- package/esm/tui/src/utils.d.ts +0 -6
- package/esm/tui/src/utils.js +0 -292
- package/esm/tui/src/views.d.ts +0 -35
- package/esm/tui/src/views.js +0 -112
- package/script/core/src/agent.d.ts +0 -39
- package/script/core/src/agent.js +0 -101
- package/script/core/src/index.d.ts +0 -4
- package/script/core/src/index.js +0 -10
- package/script/core/src/types.d.ts +0 -59
- package/script/core/src/types.js +0 -9
- package/script/harness/npm/src/agents/types.d.ts +0 -12
- package/script/harness/npm/src/commands/types.d.ts +0 -23
- package/script/harness/npm/src/common/frontmatter.d.ts +0 -6
- package/script/harness/npm/src/common/utils.d.ts +0 -7
- package/script/harness/npm/src/config/types.d.ts +0 -15
- package/script/harness/npm/src/harness/models.d.ts +0 -16
- package/script/harness/npm/src/hooks/types.d.ts +0 -21
- package/script/harness/npm/src/permissions/glob.d.ts +0 -1
- package/script/harness/npm/src/plugin/import-ts.d.ts +0 -1
- package/script/harness/npm/src/plugin/store.d.ts +0 -8
- package/script/harness/npm/src/scheduler/engine/types.d.ts +0 -55
- package/script/harness/npm/src/session/catalog.d.ts +0 -24
- package/script/harness/npm/src/session/store.d.ts +0 -13
- package/script/harness/npm/src/session/title.d.ts +0 -9
- package/script/harness/npm/src/session/types.d.ts +0 -18
- package/script/harness/npm/src/skills/platform.d.ts +0 -6
- package/script/harness/npm/src/skills/types.d.ts +0 -8
- package/script/harness/npm/src/tui/chat/commands.d.ts +0 -16
- package/script/harness/npm/src/tui/chat/editor.d.ts +0 -31
- package/script/harness/npm/src/tui/chat/picker.d.ts +0 -13
- package/script/harness/npm/src/tui/chat/theme.d.ts +0 -97
- package/script/harness/src/agents/index.d.ts +0 -4
- package/script/harness/src/agents/index.js +0 -12
- package/script/harness/src/agents/loader.d.ts +0 -2
- package/script/harness/src/agents/loader.js +0 -28
- package/script/harness/src/agents/parser.d.ts +0 -2
- package/script/harness/src/agents/parser.js +0 -50
- package/script/harness/src/agents/registry.d.ts +0 -9
- package/script/harness/src/agents/registry.js +0 -95
- package/script/harness/src/agents/types.d.ts +0 -12
- package/script/harness/src/agents/types.js +0 -2
- package/script/harness/src/channels/channel.d.ts +0 -7
- package/script/harness/src/channels/channel.js +0 -29
- package/script/harness/src/channels/index.d.ts +0 -3
- package/script/harness/src/channels/index.js +0 -7
- package/script/harness/src/channels/manager.d.ts +0 -6
- package/script/harness/src/channels/manager.js +0 -32
- package/script/harness/src/channels/types.d.ts +0 -30
- package/script/harness/src/channels/types.js +0 -2
- package/script/harness/src/commands/defaults.d.ts +0 -11
- package/script/harness/src/commands/defaults.js +0 -61
- package/script/harness/src/commands/index.d.ts +0 -3
- package/script/harness/src/commands/index.js +0 -11
- package/script/harness/src/commands/registry.d.ts +0 -2
- package/script/harness/src/commands/registry.js +0 -63
- package/script/harness/src/commands/types.d.ts +0 -23
- package/script/harness/src/commands/types.js +0 -2
- package/script/harness/src/common/frontmatter.d.ts +0 -6
- package/script/harness/src/common/frontmatter.js +0 -23
- package/script/harness/src/common/index.d.ts +0 -2
- package/script/harness/src/common/index.js +0 -9
- package/script/harness/src/common/utils.d.ts +0 -7
- package/script/harness/src/common/utils.js +0 -27
- package/script/harness/src/config/index.d.ts +0 -2
- package/script/harness/src/config/index.js +0 -5
- package/script/harness/src/config/resolve.d.ts +0 -2
- package/script/harness/src/config/resolve.js +0 -14
- package/script/harness/src/config/types.d.ts +0 -15
- package/script/harness/src/config/types.js +0 -2
- package/script/harness/src/harness/create.d.ts +0 -2
- package/script/harness/src/harness/create.js +0 -174
- package/script/harness/src/harness/index.d.ts +0 -3
- package/script/harness/src/harness/index.js +0 -7
- package/script/harness/src/harness/models.d.ts +0 -16
- package/script/harness/src/harness/models.js +0 -34
- package/script/harness/src/harness/types.d.ts +0 -50
- package/script/harness/src/harness/types.js +0 -2
- package/script/harness/src/hooks/index.d.ts +0 -3
- package/script/harness/src/hooks/index.js +0 -7
- package/script/harness/src/hooks/merge-hooks.d.ts +0 -2
- package/script/harness/src/hooks/merge-hooks.js +0 -50
- package/script/harness/src/hooks/types.d.ts +0 -21
- package/script/harness/src/hooks/types.js +0 -2
- package/script/harness/src/hooks/with-hooks.d.ts +0 -3
- package/script/harness/src/hooks/with-hooks.js +0 -16
- package/script/harness/src/index.d.ts +0 -14
- package/script/harness/src/index.js +0 -30
- package/script/harness/src/permissions/allow-list.d.ts +0 -4
- package/script/harness/src/permissions/allow-list.js +0 -13
- package/script/harness/src/permissions/approval-manager.d.ts +0 -31
- package/script/harness/src/permissions/approval-manager.js +0 -59
- package/script/harness/src/permissions/approval.d.ts +0 -17
- package/script/harness/src/permissions/approval.js +0 -17
- package/script/harness/src/permissions/glob.d.ts +0 -1
- package/script/harness/src/permissions/glob.js +0 -6
- package/script/harness/src/permissions/index.d.ts +0 -4
- package/script/harness/src/permissions/index.js +0 -12
- package/script/harness/src/plugin/define.d.ts +0 -2
- package/script/harness/src/plugin/define.js +0 -5
- package/script/harness/src/plugin/import-ts.d.ts +0 -1
- package/script/harness/src/plugin/import-ts.js +0 -122
- package/script/harness/src/plugin/index.d.ts +0 -5
- package/script/harness/src/plugin/index.js +0 -11
- package/script/harness/src/plugin/resolve.d.ts +0 -13
- package/script/harness/src/plugin/resolve.js +0 -21
- package/script/harness/src/plugin/store.d.ts +0 -8
- package/script/harness/src/plugin/store.js +0 -30
- package/script/harness/src/plugin/types.d.ts +0 -11
- package/script/harness/src/plugin/types.js +0 -2
- package/script/harness/src/scheduler/command.d.ts +0 -3
- package/script/harness/src/scheduler/command.js +0 -23
- package/script/harness/src/scheduler/engine/index.d.ts +0 -4
- package/script/harness/src/scheduler/engine/index.js +0 -9
- package/script/harness/src/scheduler/engine/memory-store.d.ts +0 -2
- package/script/harness/src/scheduler/engine/memory-store.js +0 -27
- package/script/harness/src/scheduler/engine/scheduler.d.ts +0 -13
- package/script/harness/src/scheduler/engine/scheduler.js +0 -77
- package/script/harness/src/scheduler/engine/store.d.ts +0 -4
- package/script/harness/src/scheduler/engine/store.js +0 -59
- package/script/harness/src/scheduler/engine/types.d.ts +0 -55
- package/script/harness/src/scheduler/engine/types.js +0 -2
- package/script/harness/src/scheduler/index.d.ts +0 -4
- package/script/harness/src/scheduler/index.js +0 -11
- package/script/harness/src/scheduler/tool.d.ts +0 -8
- package/script/harness/src/scheduler/tool.js +0 -52
- package/script/harness/src/session/agent-session.d.ts +0 -15
- package/script/harness/src/session/agent-session.js +0 -87
- package/script/harness/src/session/catalog.d.ts +0 -24
- package/script/harness/src/session/catalog.js +0 -59
- package/script/harness/src/session/index.d.ts +0 -7
- package/script/harness/src/session/index.js +0 -17
- package/script/harness/src/session/manager.d.ts +0 -39
- package/script/harness/src/session/manager.js +0 -69
- package/script/harness/src/session/persist.d.ts +0 -3
- package/script/harness/src/session/persist.js +0 -28
- package/script/harness/src/session/store.d.ts +0 -13
- package/script/harness/src/session/store.js +0 -28
- package/script/harness/src/session/title.d.ts +0 -9
- package/script/harness/src/session/title.js +0 -30
- package/script/harness/src/session/types.d.ts +0 -18
- package/script/harness/src/session/types.js +0 -2
- package/script/harness/src/skills/index.d.ts +0 -8
- package/script/harness/src/skills/index.js +0 -18
- package/script/harness/src/skills/loader.d.ts +0 -10
- package/script/harness/src/skills/loader.js +0 -63
- package/script/harness/src/skills/parser.d.ts +0 -2
- package/script/harness/src/skills/parser.js +0 -20
- package/script/harness/src/skills/platform.d.ts +0 -6
- package/script/harness/src/skills/platform.js +0 -18
- package/script/harness/src/skills/registry.d.ts +0 -8
- package/script/harness/src/skills/registry.js +0 -20
- package/script/harness/src/skills/run.d.ts +0 -14
- package/script/harness/src/skills/run.js +0 -49
- package/script/harness/src/skills/tool.d.ts +0 -3
- package/script/harness/src/skills/tool.js +0 -35
- package/script/harness/src/skills/types.d.ts +0 -8
- package/script/harness/src/skills/types.js +0 -2
- package/script/harness/src/skills/writer.d.ts +0 -8
- package/script/harness/src/skills/writer.js +0 -59
- package/script/harness/src/subAgents/index.d.ts +0 -4
- package/script/harness/src/subAgents/index.js +0 -9
- package/script/harness/src/subAgents/registry.d.ts +0 -2
- package/script/harness/src/subAgents/registry.js +0 -22
- package/script/harness/src/subAgents/runner.d.ts +0 -15
- package/script/harness/src/subAgents/runner.js +0 -37
- package/script/harness/src/subAgents/tool.d.ts +0 -6
- package/script/harness/src/subAgents/tool.js +0 -68
- package/script/harness/src/subAgents/types.d.ts +0 -18
- package/script/harness/src/subAgents/types.js +0 -2
- package/script/harness/src/tui/chat/ChatApp.d.ts +0 -188
- package/script/harness/src/tui/chat/ChatApp.js +0 -1310
- package/script/harness/src/tui/chat/commands.d.ts +0 -16
- package/script/harness/src/tui/chat/commands.js +0 -25
- package/script/harness/src/tui/chat/editor.d.ts +0 -31
- package/script/harness/src/tui/chat/editor.js +0 -151
- package/script/harness/src/tui/chat/index.d.ts +0 -9
- package/script/harness/src/tui/chat/index.js +0 -25
- package/script/harness/src/tui/chat/markdown.d.ts +0 -9
- package/script/harness/src/tui/chat/markdown.js +0 -300
- package/script/harness/src/tui/chat/picker.d.ts +0 -13
- package/script/harness/src/tui/chat/picker.js +0 -129
- package/script/harness/src/tui/chat/status.d.ts +0 -15
- package/script/harness/src/tui/chat/status.js +0 -55
- package/script/harness/src/tui/chat/theme.d.ts +0 -97
- package/script/harness/src/tui/chat/theme.js +0 -209
- package/script/harness/src/tui/chat/transcript.d.ts +0 -79
- package/script/harness/src/tui/chat/transcript.js +0 -430
- package/script/harness/src/tui/index.d.ts +0 -8
- package/script/harness/src/tui/index.js +0 -30
- package/script/tui/src/capabilities.d.ts +0 -72
- package/script/tui/src/capabilities.js +0 -98
- package/script/tui/src/components/command-palette.d.ts +0 -24
- package/script/tui/src/components/command-palette.js +0 -65
- package/script/tui/src/components/editor.d.ts +0 -26
- package/script/tui/src/components/editor.js +0 -116
- package/script/tui/src/components/scroll-view.d.ts +0 -26
- package/script/tui/src/components/scroll-view.js +0 -75
- package/script/tui/src/components/select-list.d.ts +0 -24
- package/script/tui/src/components/select-list.js +0 -76
- package/script/tui/src/events.d.ts +0 -56
- package/script/tui/src/events.js +0 -9
- package/script/tui/src/index.d.ts +0 -17
- package/script/tui/src/index.js +0 -46
- package/script/tui/src/inputRouter.d.ts +0 -28
- package/script/tui/src/inputRouter.js +0 -132
- package/script/tui/src/keybinds.d.ts +0 -13
- package/script/tui/src/keybinds.js +0 -18
- package/script/tui/src/keyboard.d.ts +0 -2
- package/script/tui/src/keyboard.js +0 -322
- package/script/tui/src/layout/ansi.d.ts +0 -3
- package/script/tui/src/layout/ansi.js +0 -334
- package/script/tui/src/layout/cell.d.ts +0 -24
- package/script/tui/src/layout/cell.js +0 -54
- package/script/tui/src/layout/cellbuffer.d.ts +0 -29
- package/script/tui/src/layout/cellbuffer.js +0 -321
- package/script/tui/src/layout/color.d.ts +0 -22
- package/script/tui/src/layout/color.js +0 -174
- package/script/tui/src/layout/insets.d.ts +0 -8
- package/script/tui/src/layout/insets.js +0 -64
- package/script/tui/src/layout/types.d.ts +0 -33
- package/script/tui/src/layout/types.js +0 -11
- package/script/tui/src/parser.d.ts +0 -18
- package/script/tui/src/parser.js +0 -140
- package/script/tui/src/renderer.d.ts +0 -32
- package/script/tui/src/renderer.js +0 -175
- package/script/tui/src/surface.d.ts +0 -27
- package/script/tui/src/surface.js +0 -115
- package/script/tui/src/terminal.d.ts +0 -48
- package/script/tui/src/terminal.js +0 -262
- package/script/tui/src/tui.d.ts +0 -60
- package/script/tui/src/tui.js +0 -198
- package/script/tui/src/types/terminal.d.ts +0 -20
- package/script/tui/src/types/terminal.js +0 -2
- package/script/tui/src/utils.d.ts +0 -6
- package/script/tui/src/utils.js +0 -300
- package/script/tui/src/views.d.ts +0 -35
- package/script/tui/src/views.js +0 -123
- /package/esm/{harness/npm/src/_dnt.polyfills.d.ts → _dnt.polyfills.d.ts} +0 -0
- /package/esm/{harness/npm/src/_dnt.polyfills.js → _dnt.polyfills.js} +0 -0
- /package/esm/{harness/npm/src/agents → agents}/index.d.ts +0 -0
- /package/esm/{harness/npm/src/agents → agents}/index.js +0 -0
- /package/esm/{harness/npm/src/agents → agents}/loader.d.ts +0 -0
- /package/esm/{harness/npm/src/agents → agents}/loader.js +0 -0
- /package/esm/{harness/npm/src/agents → agents}/parser.d.ts +0 -0
- /package/esm/{harness/npm/src/agents → agents}/parser.js +0 -0
- /package/esm/{harness/npm/src/agents → agents}/registry.d.ts +0 -0
- /package/esm/{harness/npm/src/agents → agents}/registry.js +0 -0
- /package/esm/{harness/npm/src/agents → agents}/types.d.ts +0 -0
- /package/esm/{harness/npm/src/agents → agents}/types.js +0 -0
- /package/esm/{harness/npm/src/channels → channels}/channel.d.ts +0 -0
- /package/esm/{harness/npm/src/channels → channels}/channel.js +0 -0
- /package/esm/{harness/npm/src/channels → channels}/index.d.ts +0 -0
- /package/esm/{harness/npm/src/channels → channels}/index.js +0 -0
- /package/esm/{harness/npm/src/channels → channels}/manager.d.ts +0 -0
- /package/esm/{harness/npm/src/channels → channels}/manager.js +0 -0
- /package/esm/{harness/npm/src/channels → channels}/types.d.ts +0 -0
- /package/esm/{harness/npm/src/channels → channels}/types.js +0 -0
- /package/esm/{harness/npm/src/commands → commands}/defaults.d.ts +0 -0
- /package/esm/{harness/npm/src/commands → commands}/defaults.js +0 -0
- /package/esm/{harness/npm/src/commands → commands}/index.d.ts +0 -0
- /package/esm/{harness/npm/src/commands → commands}/index.js +0 -0
- /package/esm/{harness/npm/src/commands → commands}/registry.d.ts +0 -0
- /package/esm/{harness/npm/src/commands → commands}/registry.js +0 -0
- /package/esm/{harness/npm/src/commands → commands}/types.d.ts +0 -0
- /package/esm/{harness/npm/src/commands → commands}/types.js +0 -0
- /package/esm/{harness/npm/src/common → common}/frontmatter.d.ts +0 -0
- /package/esm/{harness/npm/src/common → common}/frontmatter.js +0 -0
- /package/esm/{harness/npm/src/common → common}/index.d.ts +0 -0
- /package/esm/{harness/npm/src/common → common}/index.js +0 -0
- /package/esm/{harness/npm/src/common → common}/utils.d.ts +0 -0
- /package/esm/{harness/npm/src/common → common}/utils.js +0 -0
- /package/esm/{harness/npm/src/config → config}/index.d.ts +0 -0
- /package/esm/{harness/npm/src/config → config}/index.js +0 -0
- /package/esm/{harness/npm/src/config → config}/resolve.d.ts +0 -0
- /package/esm/{harness/npm/src/config → config}/resolve.js +0 -0
- /package/esm/{harness/npm/src/config → config}/types.d.ts +0 -0
- /package/esm/{harness/npm/src/config → config}/types.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_chars.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_chars.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_dumper_state.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_dumper_state.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_loader_state.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_loader_state.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_schema.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_schema.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/binary.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/binary.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/bool.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/bool.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/float.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/float.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/int.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/int.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/map.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/map.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/merge.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/merge.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/nil.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/nil.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/omap.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/omap.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/pairs.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/pairs.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/regexp.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/regexp.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/seq.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/seq.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/set.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/set.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/str.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/str.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/timestamp.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/timestamp.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/undefined.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/undefined.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_utils.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_utils.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/mod.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/mod.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/parse.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/parse.js +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/stringify.d.ts +0 -0
- /package/esm/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/stringify.js +0 -0
- /package/esm/harness/{npm/src/harness/create.d.ts → create.d.ts} +0 -0
- /package/esm/harness/{npm/src/harness/create.js → create.js} +0 -0
- /package/esm/harness/{npm/src/harness/index.d.ts → index.d.ts} +0 -0
- /package/esm/harness/{npm/src/harness/index.js → index.js} +0 -0
- /package/esm/harness/{npm/src/harness/models.d.ts → models.d.ts} +0 -0
- /package/esm/harness/{npm/src/harness/models.js → models.js} +0 -0
- /package/esm/harness/{npm/src/harness/types.d.ts → types.d.ts} +0 -0
- /package/esm/harness/{npm/src/harness/types.js → types.js} +0 -0
- /package/esm/{harness/npm/src/hooks → hooks}/index.d.ts +0 -0
- /package/esm/{harness/npm/src/hooks → hooks}/index.js +0 -0
- /package/esm/{harness/npm/src/hooks → hooks}/merge-hooks.d.ts +0 -0
- /package/esm/{harness/npm/src/hooks → hooks}/merge-hooks.js +0 -0
- /package/esm/{harness/npm/src/hooks → hooks}/types.d.ts +0 -0
- /package/esm/{harness/npm/src/hooks → hooks}/types.js +0 -0
- /package/esm/{harness/npm/src/hooks → hooks}/with-hooks.d.ts +0 -0
- /package/esm/{harness/npm/src/hooks → hooks}/with-hooks.js +0 -0
- /package/esm/{harness/npm/src/index.d.ts → index.d.ts} +0 -0
- /package/esm/{harness/npm/src/index.js → index.js} +0 -0
- /package/esm/{harness/npm/src/permissions → permissions}/allow-list.d.ts +0 -0
- /package/esm/{harness/npm/src/permissions → permissions}/allow-list.js +0 -0
- /package/esm/{harness/npm/src/permissions → permissions}/approval-manager.d.ts +0 -0
- /package/esm/{harness/npm/src/permissions → permissions}/approval-manager.js +0 -0
- /package/esm/{harness/npm/src/permissions → permissions}/approval.d.ts +0 -0
- /package/esm/{harness/npm/src/permissions → permissions}/approval.js +0 -0
- /package/esm/{harness/npm/src/permissions → permissions}/glob.d.ts +0 -0
- /package/esm/{harness/npm/src/permissions → permissions}/glob.js +0 -0
- /package/esm/{harness/npm/src/permissions → permissions}/index.d.ts +0 -0
- /package/esm/{harness/npm/src/permissions → permissions}/index.js +0 -0
- /package/esm/{harness/npm/src/plugin → plugin}/define.d.ts +0 -0
- /package/esm/{harness/npm/src/plugin → plugin}/define.js +0 -0
- /package/esm/{harness/npm/src/plugin → plugin}/import-ts.d.ts +0 -0
- /package/esm/{harness/npm/src/plugin → plugin}/import-ts.js +0 -0
- /package/esm/{harness/npm/src/plugin → plugin}/index.d.ts +0 -0
- /package/esm/{harness/npm/src/plugin → plugin}/index.js +0 -0
- /package/esm/{harness/npm/src/plugin → plugin}/resolve.d.ts +0 -0
- /package/esm/{harness/npm/src/plugin → plugin}/resolve.js +0 -0
- /package/esm/{harness/npm/src/plugin → plugin}/store.d.ts +0 -0
- /package/esm/{harness/npm/src/plugin → plugin}/store.js +0 -0
- /package/esm/{harness/npm/src/plugin → plugin}/types.d.ts +0 -0
- /package/esm/{harness/npm/src/plugin → plugin}/types.js +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/command.d.ts +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/command.js +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/engine/index.d.ts +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/engine/index.js +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/engine/memory-store.d.ts +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/engine/memory-store.js +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/engine/scheduler.d.ts +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/engine/scheduler.js +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/engine/store.d.ts +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/engine/store.js +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/engine/types.d.ts +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/engine/types.js +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/index.d.ts +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/index.js +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/tool.d.ts +0 -0
- /package/esm/{harness/npm/src/scheduler → scheduler}/tool.js +0 -0
- /package/esm/{harness/npm/src/session → session}/agent-session.d.ts +0 -0
- /package/esm/{harness/npm/src/session → session}/agent-session.js +0 -0
- /package/esm/{harness/npm/src/session → session}/catalog.d.ts +0 -0
- /package/esm/{harness/npm/src/session → session}/catalog.js +0 -0
- /package/esm/{harness/npm/src/session → session}/index.d.ts +0 -0
- /package/esm/{harness/npm/src/session → session}/index.js +0 -0
- /package/esm/{harness/npm/src/session → session}/manager.d.ts +0 -0
- /package/esm/{harness/npm/src/session → session}/manager.js +0 -0
- /package/esm/{harness/npm/src/session → session}/persist.d.ts +0 -0
- /package/esm/{harness/npm/src/session → session}/persist.js +0 -0
- /package/esm/{harness/npm/src/session → session}/store.d.ts +0 -0
- /package/esm/{harness/npm/src/session → session}/store.js +0 -0
- /package/esm/{harness/npm/src/session → session}/title.d.ts +0 -0
- /package/esm/{harness/npm/src/session → session}/title.js +0 -0
- /package/esm/{harness/npm/src/session → session}/types.d.ts +0 -0
- /package/esm/{harness/npm/src/session → session}/types.js +0 -0
- /package/esm/{harness/npm/src/skills → skills}/index.d.ts +0 -0
- /package/esm/{harness/npm/src/skills → skills}/index.js +0 -0
- /package/esm/{harness/npm/src/skills → skills}/loader.d.ts +0 -0
- /package/esm/{harness/npm/src/skills → skills}/loader.js +0 -0
- /package/esm/{harness/npm/src/skills → skills}/parser.d.ts +0 -0
- /package/esm/{harness/npm/src/skills → skills}/parser.js +0 -0
- /package/esm/{harness/npm/src/skills → skills}/platform.d.ts +0 -0
- /package/esm/{harness/npm/src/skills → skills}/platform.js +0 -0
- /package/esm/{harness/npm/src/skills → skills}/registry.d.ts +0 -0
- /package/esm/{harness/npm/src/skills → skills}/registry.js +0 -0
- /package/esm/{harness/npm/src/skills → skills}/run.d.ts +0 -0
- /package/esm/{harness/npm/src/skills → skills}/run.js +0 -0
- /package/esm/{harness/npm/src/skills → skills}/tool.d.ts +0 -0
- /package/esm/{harness/npm/src/skills → skills}/tool.js +0 -0
- /package/esm/{harness/npm/src/skills → skills}/types.d.ts +0 -0
- /package/esm/{harness/npm/src/skills → skills}/types.js +0 -0
- /package/esm/{harness/npm/src/skills → skills}/writer.d.ts +0 -0
- /package/esm/{harness/npm/src/skills → skills}/writer.js +0 -0
- /package/esm/{harness/npm/src/subAgents → subAgents}/index.d.ts +0 -0
- /package/esm/{harness/npm/src/subAgents → subAgents}/index.js +0 -0
- /package/esm/{harness/npm/src/subAgents → subAgents}/registry.d.ts +0 -0
- /package/esm/{harness/npm/src/subAgents → subAgents}/registry.js +0 -0
- /package/esm/{harness/npm/src/subAgents → subAgents}/runner.d.ts +0 -0
- /package/esm/{harness/npm/src/subAgents → subAgents}/runner.js +0 -0
- /package/esm/{harness/npm/src/subAgents → subAgents}/tool.d.ts +0 -0
- /package/esm/{harness/npm/src/subAgents → subAgents}/tool.js +0 -0
- /package/esm/{harness/npm/src/subAgents → subAgents}/types.d.ts +0 -0
- /package/esm/{harness/npm/src/subAgents → subAgents}/types.js +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/ChatApp.d.ts +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/ChatApp.js +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/commands.d.ts +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/commands.js +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/editor.d.ts +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/editor.js +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/index.d.ts +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/index.js +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/markdown.d.ts +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/markdown.js +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/picker.d.ts +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/picker.js +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/status.d.ts +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/status.js +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/theme.d.ts +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/theme.js +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/transcript.d.ts +0 -0
- /package/esm/{harness/npm/src/tui → tui}/chat/transcript.js +0 -0
- /package/esm/{harness/npm/src/tui → tui}/index.d.ts +0 -0
- /package/esm/{harness/npm/src/tui → tui}/index.js +0 -0
- /package/script/{harness/npm/src/_dnt.polyfills.d.ts → _dnt.polyfills.d.ts} +0 -0
- /package/script/{harness/npm/src/_dnt.polyfills.js → _dnt.polyfills.js} +0 -0
- /package/script/{harness/npm/src/agents → agents}/index.d.ts +0 -0
- /package/script/{harness/npm/src/agents → agents}/index.js +0 -0
- /package/script/{harness/npm/src/agents → agents}/loader.d.ts +0 -0
- /package/script/{harness/npm/src/agents → agents}/loader.js +0 -0
- /package/script/{harness/npm/src/agents → agents}/parser.d.ts +0 -0
- /package/script/{harness/npm/src/agents → agents}/parser.js +0 -0
- /package/script/{harness/npm/src/agents → agents}/registry.d.ts +0 -0
- /package/script/{harness/npm/src/agents → agents}/registry.js +0 -0
- /package/{esm/harness/src → script}/agents/types.d.ts +0 -0
- /package/script/{harness/npm/src/agents → agents}/types.js +0 -0
- /package/script/{harness/npm/src/channels → channels}/channel.d.ts +0 -0
- /package/script/{harness/npm/src/channels → channels}/channel.js +0 -0
- /package/script/{harness/npm/src/channels → channels}/index.d.ts +0 -0
- /package/script/{harness/npm/src/channels → channels}/index.js +0 -0
- /package/script/{harness/npm/src/channels → channels}/manager.d.ts +0 -0
- /package/script/{harness/npm/src/channels → channels}/manager.js +0 -0
- /package/script/{harness/npm/src/channels → channels}/types.d.ts +0 -0
- /package/script/{harness/npm/src/channels → channels}/types.js +0 -0
- /package/script/{harness/npm/src/commands → commands}/defaults.d.ts +0 -0
- /package/script/{harness/npm/src/commands → commands}/defaults.js +0 -0
- /package/script/{harness/npm/src/commands → commands}/index.d.ts +0 -0
- /package/script/{harness/npm/src/commands → commands}/index.js +0 -0
- /package/script/{harness/npm/src/commands → commands}/registry.d.ts +0 -0
- /package/script/{harness/npm/src/commands → commands}/registry.js +0 -0
- /package/{esm/harness/src → script}/commands/types.d.ts +0 -0
- /package/script/{harness/npm/src/commands → commands}/types.js +0 -0
- /package/{esm/harness/src → script}/common/frontmatter.d.ts +0 -0
- /package/script/{harness/npm/src/common → common}/frontmatter.js +0 -0
- /package/script/{harness/npm/src/common → common}/index.d.ts +0 -0
- /package/script/{harness/npm/src/common → common}/index.js +0 -0
- /package/{esm/harness/src → script}/common/utils.d.ts +0 -0
- /package/script/{harness/npm/src/common → common}/utils.js +0 -0
- /package/script/{harness/npm/src/config → config}/index.d.ts +0 -0
- /package/script/{harness/npm/src/config → config}/index.js +0 -0
- /package/script/{harness/npm/src/config → config}/resolve.d.ts +0 -0
- /package/script/{harness/npm/src/config → config}/resolve.js +0 -0
- /package/{esm/harness/src → script}/config/types.d.ts +0 -0
- /package/script/{harness/npm/src/config → config}/types.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_chars.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_chars.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_dumper_state.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_dumper_state.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_loader_state.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_loader_state.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_schema.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_schema.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/binary.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/binary.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/bool.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/bool.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/float.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/float.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/int.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/int.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/map.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/map.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/merge.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/merge.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/nil.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/nil.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/omap.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/omap.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/pairs.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/pairs.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/regexp.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/regexp.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/seq.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/seq.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/set.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/set.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/str.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/str.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/timestamp.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/timestamp.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/undefined.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type/undefined.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_type.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_utils.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/_utils.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/mod.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/mod.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/parse.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/parse.js +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/stringify.d.ts +0 -0
- /package/script/{harness/npm/src/deps → deps}/jsr.io/@std/yaml/1.1.0/stringify.js +0 -0
- /package/script/harness/{npm/src/harness/create.d.ts → create.d.ts} +0 -0
- /package/script/harness/{npm/src/harness/create.js → create.js} +0 -0
- /package/script/harness/{npm/src/harness/index.d.ts → index.d.ts} +0 -0
- /package/script/harness/{npm/src/harness/index.js → index.js} +0 -0
- /package/{esm/harness/src → script}/harness/models.d.ts +0 -0
- /package/script/harness/{npm/src/harness/models.js → models.js} +0 -0
- /package/script/harness/{npm/src/harness/types.d.ts → types.d.ts} +0 -0
- /package/script/harness/{npm/src/harness/types.js → types.js} +0 -0
- /package/script/{harness/npm/src/hooks → hooks}/index.d.ts +0 -0
- /package/script/{harness/npm/src/hooks → hooks}/index.js +0 -0
- /package/script/{harness/npm/src/hooks → hooks}/merge-hooks.d.ts +0 -0
- /package/script/{harness/npm/src/hooks → hooks}/merge-hooks.js +0 -0
- /package/{esm/harness/src → script}/hooks/types.d.ts +0 -0
- /package/script/{harness/npm/src/hooks → hooks}/types.js +0 -0
- /package/script/{harness/npm/src/hooks → hooks}/with-hooks.d.ts +0 -0
- /package/script/{harness/npm/src/hooks → hooks}/with-hooks.js +0 -0
- /package/script/{harness/npm/src/index.d.ts → index.d.ts} +0 -0
- /package/script/{harness/npm/src/index.js → index.js} +0 -0
- /package/script/{harness/npm/src/permissions → permissions}/allow-list.d.ts +0 -0
- /package/script/{harness/npm/src/permissions → permissions}/allow-list.js +0 -0
- /package/script/{harness/npm/src/permissions → permissions}/approval-manager.d.ts +0 -0
- /package/script/{harness/npm/src/permissions → permissions}/approval-manager.js +0 -0
- /package/script/{harness/npm/src/permissions → permissions}/approval.d.ts +0 -0
- /package/script/{harness/npm/src/permissions → permissions}/approval.js +0 -0
- /package/{esm/harness/src → script}/permissions/glob.d.ts +0 -0
- /package/script/{harness/npm/src/permissions → permissions}/glob.js +0 -0
- /package/script/{harness/npm/src/permissions → permissions}/index.d.ts +0 -0
- /package/script/{harness/npm/src/permissions → permissions}/index.js +0 -0
- /package/script/{harness/npm/src/plugin → plugin}/define.d.ts +0 -0
- /package/script/{harness/npm/src/plugin → plugin}/define.js +0 -0
- /package/{esm/harness/src → script}/plugin/import-ts.d.ts +0 -0
- /package/script/{harness/npm/src/plugin → plugin}/import-ts.js +0 -0
- /package/script/{harness/npm/src/plugin → plugin}/index.d.ts +0 -0
- /package/script/{harness/npm/src/plugin → plugin}/index.js +0 -0
- /package/script/{harness/npm/src/plugin → plugin}/resolve.d.ts +0 -0
- /package/script/{harness/npm/src/plugin → plugin}/resolve.js +0 -0
- /package/{esm/harness/src → script}/plugin/store.d.ts +0 -0
- /package/script/{harness/npm/src/plugin → plugin}/store.js +0 -0
- /package/script/{harness/npm/src/plugin → plugin}/types.d.ts +0 -0
- /package/script/{harness/npm/src/plugin → plugin}/types.js +0 -0
- /package/script/{harness/npm/src/scheduler → scheduler}/command.d.ts +0 -0
- /package/script/{harness/npm/src/scheduler → scheduler}/command.js +0 -0
- /package/script/{harness/npm/src/scheduler → scheduler}/engine/index.d.ts +0 -0
- /package/script/{harness/npm/src/scheduler → scheduler}/engine/index.js +0 -0
- /package/script/{harness/npm/src/scheduler → scheduler}/engine/memory-store.d.ts +0 -0
- /package/script/{harness/npm/src/scheduler → scheduler}/engine/memory-store.js +0 -0
- /package/script/{harness/npm/src/scheduler → scheduler}/engine/scheduler.d.ts +0 -0
- /package/script/{harness/npm/src/scheduler → scheduler}/engine/scheduler.js +0 -0
- /package/script/{harness/npm/src/scheduler → scheduler}/engine/store.d.ts +0 -0
- /package/script/{harness/npm/src/scheduler → scheduler}/engine/store.js +0 -0
- /package/{esm/harness/src → script}/scheduler/engine/types.d.ts +0 -0
- /package/script/{harness/npm/src/scheduler → scheduler}/engine/types.js +0 -0
- /package/script/{harness/npm/src/scheduler → scheduler}/index.d.ts +0 -0
- /package/script/{harness/npm/src/scheduler → scheduler}/index.js +0 -0
- /package/script/{harness/npm/src/scheduler → scheduler}/tool.d.ts +0 -0
- /package/script/{harness/npm/src/scheduler → scheduler}/tool.js +0 -0
- /package/script/{harness/npm/src/session → session}/agent-session.d.ts +0 -0
- /package/script/{harness/npm/src/session → session}/agent-session.js +0 -0
- /package/{esm/harness/src → script}/session/catalog.d.ts +0 -0
- /package/script/{harness/npm/src/session → session}/catalog.js +0 -0
- /package/script/{harness/npm/src/session → session}/index.d.ts +0 -0
- /package/script/{harness/npm/src/session → session}/index.js +0 -0
- /package/script/{harness/npm/src/session → session}/manager.d.ts +0 -0
- /package/script/{harness/npm/src/session → session}/manager.js +0 -0
- /package/script/{harness/npm/src/session → session}/persist.d.ts +0 -0
- /package/script/{harness/npm/src/session → session}/persist.js +0 -0
- /package/{esm/harness/src → script}/session/store.d.ts +0 -0
- /package/script/{harness/npm/src/session → session}/store.js +0 -0
- /package/{esm/harness/src → script}/session/title.d.ts +0 -0
- /package/script/{harness/npm/src/session → session}/title.js +0 -0
- /package/{esm/harness/src → script}/session/types.d.ts +0 -0
- /package/script/{harness/npm/src/session → session}/types.js +0 -0
- /package/script/{harness/npm/src/skills → skills}/index.d.ts +0 -0
- /package/script/{harness/npm/src/skills → skills}/index.js +0 -0
- /package/script/{harness/npm/src/skills → skills}/loader.d.ts +0 -0
- /package/script/{harness/npm/src/skills → skills}/loader.js +0 -0
- /package/script/{harness/npm/src/skills → skills}/parser.d.ts +0 -0
- /package/script/{harness/npm/src/skills → skills}/parser.js +0 -0
- /package/{esm/harness/src → script}/skills/platform.d.ts +0 -0
- /package/script/{harness/npm/src/skills → skills}/platform.js +0 -0
- /package/script/{harness/npm/src/skills → skills}/registry.d.ts +0 -0
- /package/script/{harness/npm/src/skills → skills}/registry.js +0 -0
- /package/script/{harness/npm/src/skills → skills}/run.d.ts +0 -0
- /package/script/{harness/npm/src/skills → skills}/run.js +0 -0
- /package/script/{harness/npm/src/skills → skills}/tool.d.ts +0 -0
- /package/script/{harness/npm/src/skills → skills}/tool.js +0 -0
- /package/{esm/harness/src → script}/skills/types.d.ts +0 -0
- /package/script/{harness/npm/src/skills → skills}/types.js +0 -0
- /package/script/{harness/npm/src/skills → skills}/writer.d.ts +0 -0
- /package/script/{harness/npm/src/skills → skills}/writer.js +0 -0
- /package/script/{harness/npm/src/subAgents → subAgents}/index.d.ts +0 -0
- /package/script/{harness/npm/src/subAgents → subAgents}/index.js +0 -0
- /package/script/{harness/npm/src/subAgents → subAgents}/registry.d.ts +0 -0
- /package/script/{harness/npm/src/subAgents → subAgents}/registry.js +0 -0
- /package/script/{harness/npm/src/subAgents → subAgents}/runner.d.ts +0 -0
- /package/script/{harness/npm/src/subAgents → subAgents}/runner.js +0 -0
- /package/script/{harness/npm/src/subAgents → subAgents}/tool.d.ts +0 -0
- /package/script/{harness/npm/src/subAgents → subAgents}/tool.js +0 -0
- /package/script/{harness/npm/src/subAgents → subAgents}/types.d.ts +0 -0
- /package/script/{harness/npm/src/subAgents → subAgents}/types.js +0 -0
- /package/script/{harness/npm/src/tui → tui}/chat/ChatApp.d.ts +0 -0
- /package/script/{harness/npm/src/tui → tui}/chat/ChatApp.js +0 -0
- /package/{esm/harness/src → script}/tui/chat/commands.d.ts +0 -0
- /package/script/{harness/npm/src/tui → tui}/chat/commands.js +0 -0
- /package/{esm/harness/src → script}/tui/chat/editor.d.ts +0 -0
- /package/script/{harness/npm/src/tui → tui}/chat/editor.js +0 -0
- /package/script/{harness/npm/src/tui → tui}/chat/index.d.ts +0 -0
- /package/script/{harness/npm/src/tui → tui}/chat/index.js +0 -0
- /package/script/{harness/npm/src/tui → tui}/chat/markdown.d.ts +0 -0
- /package/script/{harness/npm/src/tui → tui}/chat/markdown.js +0 -0
- /package/{esm/harness/src → script}/tui/chat/picker.d.ts +0 -0
- /package/script/{harness/npm/src/tui → tui}/chat/picker.js +0 -0
- /package/script/{harness/npm/src/tui → tui}/chat/status.d.ts +0 -0
- /package/script/{harness/npm/src/tui → tui}/chat/status.js +0 -0
- /package/{esm/harness/src → script}/tui/chat/theme.d.ts +0 -0
- /package/script/{harness/npm/src/tui → tui}/chat/theme.js +0 -0
- /package/script/{harness/npm/src/tui → tui}/chat/transcript.d.ts +0 -0
- /package/script/{harness/npm/src/tui → tui}/chat/transcript.js +0 -0
- /package/script/{harness/npm/src/tui → tui}/index.d.ts +0 -0
- /package/script/{harness/npm/src/tui → tui}/index.js +0 -0
package/package.json
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mu-harness",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.16",
|
|
4
4
|
"description": "Agent harness: createHarness wires mu-core into a host — XDG paths, model registry, plugins, disk-loaded agents & skills, sub-agents, sessions (JSONL + SQLite catalog), slash commands, permission/approval hooks, an optional scheduler, and a composable TUI chat app",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./script/index.js",
|
|
7
7
|
"module": "./esm/index.js",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"import":
|
|
11
|
-
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./esm/index.d.ts",
|
|
12
|
+
"default": "./esm/index.js"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./script/index.d.ts",
|
|
16
|
+
"default": "./script/index.js"
|
|
17
|
+
}
|
|
12
18
|
}
|
|
13
19
|
},
|
|
14
20
|
"scripts": {},
|
|
@@ -17,9 +23,9 @@
|
|
|
17
23
|
"@swc/wasm-typescript": "^1.15.0",
|
|
18
24
|
"cli-highlight": "^2.1.11",
|
|
19
25
|
"croner": "^9.0.0",
|
|
20
|
-
"mu-core": "^0.16.
|
|
21
|
-
"mu-
|
|
22
|
-
"mu-tui": "^0.16.15"
|
|
26
|
+
"mu-core": "^0.16.16",
|
|
27
|
+
"mu-tui": "^0.16.16"
|
|
23
28
|
},
|
|
24
|
-
"_generatedBy": "dnt@dev"
|
|
25
|
-
|
|
29
|
+
"_generatedBy": "dnt@dev",
|
|
30
|
+
"types": "./esm/index.d.ts"
|
|
31
|
+
}
|
package/esm/core/src/agent.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { ContentPart, Message, Provider, Tool, Usage } from './types';
|
|
2
|
-
export type LoopEvent = ContentPart | {
|
|
3
|
-
type: 'usage';
|
|
4
|
-
usage: Usage;
|
|
5
|
-
} | {
|
|
6
|
-
type: 'reasoning';
|
|
7
|
-
text: string;
|
|
8
|
-
} | {
|
|
9
|
-
type: 'message';
|
|
10
|
-
message: Message;
|
|
11
|
-
} | {
|
|
12
|
-
type: 'done';
|
|
13
|
-
messages: Message[];
|
|
14
|
-
};
|
|
15
|
-
export interface RunOptions {
|
|
16
|
-
provider: Provider;
|
|
17
|
-
model: string;
|
|
18
|
-
messages: Message[];
|
|
19
|
-
tools?: Tool[];
|
|
20
|
-
signal?: AbortSignal;
|
|
21
|
-
}
|
|
22
|
-
export declare function run(opts: RunOptions): AsyncIterable<LoopEvent>;
|
|
23
|
-
export interface AgentConfig {
|
|
24
|
-
provider: Provider;
|
|
25
|
-
model: string;
|
|
26
|
-
tools?: Tool[];
|
|
27
|
-
system?: string;
|
|
28
|
-
signal?: AbortSignal;
|
|
29
|
-
}
|
|
30
|
-
export type Input = string | ContentPart[] | Message[];
|
|
31
|
-
export interface AgentResult {
|
|
32
|
-
message: Message;
|
|
33
|
-
messages: Message[];
|
|
34
|
-
}
|
|
35
|
-
export interface Agent {
|
|
36
|
-
stream(input: Input): AsyncIterable<LoopEvent>;
|
|
37
|
-
run(input: Input): Promise<AgentResult>;
|
|
38
|
-
}
|
|
39
|
-
export declare const createAgent: (config: AgentConfig) => Agent;
|
package/esm/core/src/agent.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
const append = (parts, part) => {
|
|
2
|
-
const last = parts[parts.length - 1];
|
|
3
|
-
if (part.type === 'text' && last?.type === 'text') {
|
|
4
|
-
last.text += part.text;
|
|
5
|
-
}
|
|
6
|
-
else if (part.type === 'audio' && last?.type === 'audio' && last.mime === part.mime) {
|
|
7
|
-
const merged = new Uint8Array(last.data.length + part.data.length);
|
|
8
|
-
merged.set(last.data);
|
|
9
|
-
merged.set(part.data, last.data.length);
|
|
10
|
-
last.data = merged;
|
|
11
|
-
}
|
|
12
|
-
else if (part.type === 'text') {
|
|
13
|
-
parts.push({ type: 'text', text: part.text });
|
|
14
|
-
}
|
|
15
|
-
else if (part.type === 'audio') {
|
|
16
|
-
parts.push({ type: 'audio', mime: part.mime, data: part.data });
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
parts.push(part);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
const execute = async (tools, call, signal) => {
|
|
23
|
-
const tool = tools.get(call.name);
|
|
24
|
-
if (!tool)
|
|
25
|
-
return [{ type: 'text', text: `Unknown tool: ${call.name}` }];
|
|
26
|
-
try {
|
|
27
|
-
return await tool.run(call.input, { signal });
|
|
28
|
-
}
|
|
29
|
-
catch (err) {
|
|
30
|
-
return [{ type: 'text', text: err instanceof Error ? err.message : String(err) }];
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
export async function* run(opts) {
|
|
34
|
-
const { provider, model, signal } = opts;
|
|
35
|
-
const tools = opts.tools ?? [];
|
|
36
|
-
const registry = new Map(tools.map((t) => [t.name, t]));
|
|
37
|
-
const messages = [...opts.messages];
|
|
38
|
-
while (true) {
|
|
39
|
-
const content = [];
|
|
40
|
-
const calls = [];
|
|
41
|
-
for await (const event of provider.stream({ model, messages, tools, signal })) {
|
|
42
|
-
if (event.type === 'usage' || event.type === 'reasoning') {
|
|
43
|
-
yield event;
|
|
44
|
-
continue;
|
|
45
|
-
}
|
|
46
|
-
yield event;
|
|
47
|
-
append(content, event);
|
|
48
|
-
if (event.type === 'tool_call')
|
|
49
|
-
calls.push(event);
|
|
50
|
-
}
|
|
51
|
-
const message = { role: 'assistant', content };
|
|
52
|
-
messages.push(message);
|
|
53
|
-
yield { type: 'message', message };
|
|
54
|
-
if (calls.length === 0)
|
|
55
|
-
break;
|
|
56
|
-
const results = await Promise.all(calls.map(async (call) => ({
|
|
57
|
-
type: 'tool_result',
|
|
58
|
-
id: call.id,
|
|
59
|
-
content: await execute(registry, call, signal),
|
|
60
|
-
})));
|
|
61
|
-
const toolMessage = { role: 'user', content: results };
|
|
62
|
-
messages.push(toolMessage);
|
|
63
|
-
yield { type: 'message', message: toolMessage };
|
|
64
|
-
}
|
|
65
|
-
yield { type: 'done', messages };
|
|
66
|
-
}
|
|
67
|
-
const isMessages = (input) => input.length > 0 && 'role' in input[0];
|
|
68
|
-
const toMessages = (input) => {
|
|
69
|
-
if (typeof input === 'string')
|
|
70
|
-
return [{ role: 'user', content: [{ type: 'text', text: input }] }];
|
|
71
|
-
if (isMessages(input))
|
|
72
|
-
return input;
|
|
73
|
-
return [{ role: 'user', content: input }];
|
|
74
|
-
};
|
|
75
|
-
export const createAgent = (config) => {
|
|
76
|
-
const tools = config.tools ?? [];
|
|
77
|
-
const build = (input) => {
|
|
78
|
-
const messages = toMessages(input);
|
|
79
|
-
if (!config.system)
|
|
80
|
-
return messages;
|
|
81
|
-
return [{ role: 'system', content: [{ type: 'text', text: config.system }] }, ...messages];
|
|
82
|
-
};
|
|
83
|
-
const stream = (input) => run({ provider: config.provider, model: config.model, tools, messages: build(input), signal: config.signal });
|
|
84
|
-
const runToEnd = async (input) => {
|
|
85
|
-
let message = { role: 'assistant', content: [] };
|
|
86
|
-
let messages = [];
|
|
87
|
-
for await (const event of stream(input)) {
|
|
88
|
-
if (event.type === 'message' && event.message.role === 'assistant')
|
|
89
|
-
message = event.message;
|
|
90
|
-
else if (event.type === 'done')
|
|
91
|
-
messages = event.messages;
|
|
92
|
-
}
|
|
93
|
-
return { message, messages };
|
|
94
|
-
};
|
|
95
|
-
return { stream, run: runToEnd };
|
|
96
|
-
};
|
package/esm/core/src/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export type { ContentPart, Message, Provider, Role, StreamEvent, Tool, Usage } from './types';
|
|
2
|
-
export { audio, image, text } from './types';
|
|
3
|
-
export type { Agent, AgentConfig, AgentResult, Input, LoopEvent, RunOptions } from './agent';
|
|
4
|
-
export { createAgent, run } from './agent';
|
package/esm/core/src/index.js
DELETED
package/esm/core/src/types.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
export type ContentPart = {
|
|
2
|
-
type: 'text';
|
|
3
|
-
text: string;
|
|
4
|
-
} | {
|
|
5
|
-
type: 'image';
|
|
6
|
-
mime: string;
|
|
7
|
-
data: Uint8Array;
|
|
8
|
-
} | {
|
|
9
|
-
type: 'audio';
|
|
10
|
-
mime: string;
|
|
11
|
-
data: Uint8Array;
|
|
12
|
-
} | {
|
|
13
|
-
type: 'tool_call';
|
|
14
|
-
id: string;
|
|
15
|
-
name: string;
|
|
16
|
-
input: unknown;
|
|
17
|
-
} | {
|
|
18
|
-
type: 'tool_result';
|
|
19
|
-
id: string;
|
|
20
|
-
content: ContentPart[];
|
|
21
|
-
};
|
|
22
|
-
export type Role = 'system' | 'user' | 'assistant';
|
|
23
|
-
export type Message = {
|
|
24
|
-
role: Role;
|
|
25
|
-
content: ContentPart[];
|
|
26
|
-
};
|
|
27
|
-
export declare const text: (value: string) => ContentPart;
|
|
28
|
-
export declare const image: (mime: string, data: Uint8Array) => ContentPart;
|
|
29
|
-
export declare const audio: (mime: string, data: Uint8Array) => ContentPart;
|
|
30
|
-
export interface Tool {
|
|
31
|
-
name: string;
|
|
32
|
-
description: string;
|
|
33
|
-
parameters: Record<string, unknown>;
|
|
34
|
-
prompt?: string;
|
|
35
|
-
run(input: unknown, ctx: {
|
|
36
|
-
signal?: AbortSignal;
|
|
37
|
-
}): Promise<ContentPart[]>;
|
|
38
|
-
}
|
|
39
|
-
export interface Usage {
|
|
40
|
-
input?: number;
|
|
41
|
-
output?: number;
|
|
42
|
-
total?: number;
|
|
43
|
-
contextWindow?: number;
|
|
44
|
-
}
|
|
45
|
-
export type StreamEvent = ContentPart | {
|
|
46
|
-
type: 'usage';
|
|
47
|
-
usage: Usage;
|
|
48
|
-
} | {
|
|
49
|
-
type: 'reasoning';
|
|
50
|
-
text: string;
|
|
51
|
-
};
|
|
52
|
-
export interface Provider {
|
|
53
|
-
stream(req: {
|
|
54
|
-
model: string;
|
|
55
|
-
messages: Message[];
|
|
56
|
-
tools: Tool[];
|
|
57
|
-
signal?: AbortSignal;
|
|
58
|
-
}): AsyncIterable<StreamEvent>;
|
|
59
|
-
}
|
package/esm/core/src/types.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { readdir, readFile } from 'node:fs/promises';
|
|
2
|
-
import { basename, join } from 'node:path';
|
|
3
|
-
import { parseAgent } from './parser';
|
|
4
|
-
export const loadAgents = async (dir) => {
|
|
5
|
-
let entries;
|
|
6
|
-
try {
|
|
7
|
-
entries = await readdir(dir);
|
|
8
|
-
}
|
|
9
|
-
catch {
|
|
10
|
-
return [];
|
|
11
|
-
}
|
|
12
|
-
const files = entries.filter((name) => name.endsWith('.md')).sort();
|
|
13
|
-
const agents = [];
|
|
14
|
-
for (const file of files) {
|
|
15
|
-
try {
|
|
16
|
-
const source = await readFile(join(dir, file), 'utf-8');
|
|
17
|
-
agents.push(parseAgent(source, basename(file, '.md')));
|
|
18
|
-
}
|
|
19
|
-
catch {
|
|
20
|
-
continue;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return agents;
|
|
24
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { parseFrontmatter, str } from '../common';
|
|
2
|
-
const DECISIONS = new Set(['allow', 'ask', 'deny']);
|
|
3
|
-
const isDecision = (value) => typeof value === 'string' && DECISIONS.has(value);
|
|
4
|
-
const parseStringList = (raw) => (Array.isArray(raw) ? raw : raw.split(','))
|
|
5
|
-
.filter((entry) => typeof entry === 'string')
|
|
6
|
-
.map((entry) => entry.trim())
|
|
7
|
-
.filter(Boolean);
|
|
8
|
-
const parseDecisionMap = (raw) => {
|
|
9
|
-
const out = {};
|
|
10
|
-
for (const [key, value] of Object.entries(raw))
|
|
11
|
-
if (isDecision(value))
|
|
12
|
-
out[key] = value;
|
|
13
|
-
return Object.keys(out).length > 0 ? out : undefined;
|
|
14
|
-
};
|
|
15
|
-
const parseTools = (raw) => {
|
|
16
|
-
if (Array.isArray(raw) || typeof raw === 'string') {
|
|
17
|
-
const list = parseStringList(raw);
|
|
18
|
-
return list.length > 0 ? list : undefined;
|
|
19
|
-
}
|
|
20
|
-
if (raw && typeof raw === 'object') {
|
|
21
|
-
const out = {};
|
|
22
|
-
for (const [tool, value] of Object.entries(raw)) {
|
|
23
|
-
if (isDecision(value))
|
|
24
|
-
out[tool] = value;
|
|
25
|
-
else if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
26
|
-
const nested = parseDecisionMap(value);
|
|
27
|
-
if (nested)
|
|
28
|
-
out[tool] = nested;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return Object.keys(out).length > 0 ? out : undefined;
|
|
32
|
-
}
|
|
33
|
-
return undefined;
|
|
34
|
-
};
|
|
35
|
-
export const parseAgent = (source, fallbackName) => {
|
|
36
|
-
const { fields, body } = parseFrontmatter(source);
|
|
37
|
-
return {
|
|
38
|
-
name: str(fields.name) ?? fallbackName,
|
|
39
|
-
description: str(fields.description) ?? '',
|
|
40
|
-
prompt: body,
|
|
41
|
-
tools: parseTools(fields.tools),
|
|
42
|
-
model: str(fields.model),
|
|
43
|
-
color: str(fields.color),
|
|
44
|
-
extends: str(fields.extends),
|
|
45
|
-
};
|
|
46
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Agent, ToolDecision } from './types';
|
|
2
|
-
export interface AgentRegistry {
|
|
3
|
-
list(): Agent[];
|
|
4
|
-
get(name: string): Agent | undefined;
|
|
5
|
-
}
|
|
6
|
-
export declare const grantArg: (tool: string, input: unknown) => string | undefined;
|
|
7
|
-
export declare const toolDecision: (agent: Agent, tool: string, arg?: string) => ToolDecision;
|
|
8
|
-
export declare const toolNames: (agent: Agent) => string[] | undefined;
|
|
9
|
-
export declare const createAgentRegistry: (agents?: Agent[]) => AgentRegistry;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { matchesGlob } from 'node:path';
|
|
2
|
-
const asMap = (grants) => {
|
|
3
|
-
if (!grants)
|
|
4
|
-
return undefined;
|
|
5
|
-
if (Array.isArray(grants))
|
|
6
|
-
return Object.fromEntries(grants.map((name) => [name, 'allow']));
|
|
7
|
-
return grants;
|
|
8
|
-
};
|
|
9
|
-
const matchKey = (keys, name) => {
|
|
10
|
-
if (keys.includes(name))
|
|
11
|
-
return name;
|
|
12
|
-
let glob;
|
|
13
|
-
for (const key of keys) {
|
|
14
|
-
if (key === '*' || key === name)
|
|
15
|
-
continue;
|
|
16
|
-
if (matchesGlob(name, key) && (glob === undefined || key.length > glob.length))
|
|
17
|
-
glob = key;
|
|
18
|
-
}
|
|
19
|
-
if (glob !== undefined)
|
|
20
|
-
return glob;
|
|
21
|
-
return keys.includes('*') ? '*' : undefined;
|
|
22
|
-
};
|
|
23
|
-
const resolveGrant = (grants, tool, arg) => {
|
|
24
|
-
const map = asMap(grants);
|
|
25
|
-
if (!map)
|
|
26
|
-
return 'allow';
|
|
27
|
-
const key = matchKey(Object.keys(map), tool);
|
|
28
|
-
if (key === undefined)
|
|
29
|
-
return 'deny';
|
|
30
|
-
const value = map[key];
|
|
31
|
-
if (typeof value === 'string')
|
|
32
|
-
return value;
|
|
33
|
-
if (arg === undefined)
|
|
34
|
-
return 'allow';
|
|
35
|
-
const inner = matchKey(Object.keys(value), arg);
|
|
36
|
-
return inner === undefined ? 'deny' : value[inner];
|
|
37
|
-
};
|
|
38
|
-
const grantNames = (grants) => {
|
|
39
|
-
const map = asMap(grants);
|
|
40
|
-
if (!map)
|
|
41
|
-
return undefined;
|
|
42
|
-
const wildcard = map['*'];
|
|
43
|
-
if (wildcard !== undefined && wildcard !== 'deny')
|
|
44
|
-
return ['*'];
|
|
45
|
-
return Object.entries(map).filter(([, value]) => value !== 'deny').map(([name]) => name);
|
|
46
|
-
};
|
|
47
|
-
const GRANT_ARG = { skill: 'name', bash: 'command' };
|
|
48
|
-
export const grantArg = (tool, input) => {
|
|
49
|
-
const field = GRANT_ARG[tool];
|
|
50
|
-
if (!field || typeof input !== 'object' || input === null)
|
|
51
|
-
return undefined;
|
|
52
|
-
const value = input[field];
|
|
53
|
-
return typeof value === 'string' ? value : undefined;
|
|
54
|
-
};
|
|
55
|
-
export const toolDecision = (agent, tool, arg) => resolveGrant(agent.tools, tool, arg);
|
|
56
|
-
export const toolNames = (agent) => grantNames(agent.tools);
|
|
57
|
-
const merge = (base, child) => ({
|
|
58
|
-
name: child.name,
|
|
59
|
-
description: child.description || base.description,
|
|
60
|
-
prompt: child.prompt || base.prompt,
|
|
61
|
-
tools: child.tools ?? base.tools,
|
|
62
|
-
model: child.model ?? base.model,
|
|
63
|
-
color: child.color ?? base.color,
|
|
64
|
-
});
|
|
65
|
-
export const createAgentRegistry = (agents = []) => {
|
|
66
|
-
const raw = new Map();
|
|
67
|
-
for (const agent of agents)
|
|
68
|
-
if (!raw.has(agent.name))
|
|
69
|
-
raw.set(agent.name, agent);
|
|
70
|
-
const resolve = (name, seen) => {
|
|
71
|
-
const agent = raw.get(name);
|
|
72
|
-
if (!agent.extends)
|
|
73
|
-
return agent;
|
|
74
|
-
if (seen.has(name))
|
|
75
|
-
throw new Error(`AgentRegistry: "extends" cycle at "${name}"`);
|
|
76
|
-
const base = raw.get(agent.extends);
|
|
77
|
-
if (!base)
|
|
78
|
-
throw new Error(`AgentRegistry: "${name}" extends unknown agent "${agent.extends}"`);
|
|
79
|
-
return merge(resolve(agent.extends, new Set(seen).add(name)), agent);
|
|
80
|
-
};
|
|
81
|
-
const byName = new Map();
|
|
82
|
-
for (const name of raw.keys())
|
|
83
|
-
byName.set(name, resolve(name, new Set()));
|
|
84
|
-
return {
|
|
85
|
-
list: () => [...byName.values()],
|
|
86
|
-
get: (name) => byName.get(name),
|
|
87
|
-
};
|
|
88
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { createEmitter } from '../common';
|
|
2
|
-
export const createChannel = (config) => {
|
|
3
|
-
let session;
|
|
4
|
-
const emitter = createEmitter();
|
|
5
|
-
const ensure = () => {
|
|
6
|
-
if (!session) {
|
|
7
|
-
session = config.createSession();
|
|
8
|
-
session.subscribe(emitter.emit);
|
|
9
|
-
}
|
|
10
|
-
return session;
|
|
11
|
-
};
|
|
12
|
-
return {
|
|
13
|
-
id: config.id,
|
|
14
|
-
title: config.title,
|
|
15
|
-
get started() {
|
|
16
|
-
return session !== undefined;
|
|
17
|
-
},
|
|
18
|
-
get messages() {
|
|
19
|
-
return session?.messages ?? [];
|
|
20
|
-
},
|
|
21
|
-
send: (input) => ensure().send(input),
|
|
22
|
-
abort: () => session?.abort(),
|
|
23
|
-
subscribe: emitter.subscribe,
|
|
24
|
-
};
|
|
25
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { createEmitter } from '../common';
|
|
2
|
-
import { createChannel } from './channel';
|
|
3
|
-
export const createChannelManager = (config) => {
|
|
4
|
-
const channels = new Map();
|
|
5
|
-
const unsubs = new Map();
|
|
6
|
-
const emitter = createEmitter();
|
|
7
|
-
const idGen = config.idGen ?? (() => crypto.randomUUID());
|
|
8
|
-
return {
|
|
9
|
-
open(opts) {
|
|
10
|
-
const id = opts?.id ?? idGen();
|
|
11
|
-
const title = opts?.title ?? id;
|
|
12
|
-
const channel = createChannel({ id, title, createSession: config.createSession });
|
|
13
|
-
channels.set(id, channel);
|
|
14
|
-
unsubs.set(id, channel.subscribe((event) => emitter.emit({ channelId: id, ...event })));
|
|
15
|
-
emitter.emit({ channelId: id, type: 'channel_open', title });
|
|
16
|
-
return channel;
|
|
17
|
-
},
|
|
18
|
-
get: (id) => channels.get(id),
|
|
19
|
-
list: () => [...channels.values()],
|
|
20
|
-
close(id) {
|
|
21
|
-
unsubs.get(id)?.();
|
|
22
|
-
unsubs.delete(id);
|
|
23
|
-
if (channels.delete(id))
|
|
24
|
-
emitter.emit({ channelId: id, type: 'channel_close' });
|
|
25
|
-
},
|
|
26
|
-
subscribe: emitter.subscribe,
|
|
27
|
-
};
|
|
28
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { ContentPart, Message } from 'mu-core';
|
|
2
|
-
import type { AgentSessionEvent } from '../session';
|
|
3
|
-
export type ChannelEvent = AgentSessionEvent | {
|
|
4
|
-
type: 'channel_open';
|
|
5
|
-
title: string;
|
|
6
|
-
} | {
|
|
7
|
-
type: 'channel_close';
|
|
8
|
-
};
|
|
9
|
-
export type ChannelManagerEvent = {
|
|
10
|
-
channelId: string;
|
|
11
|
-
} & ChannelEvent;
|
|
12
|
-
export interface Channel {
|
|
13
|
-
readonly id: string;
|
|
14
|
-
readonly title: string;
|
|
15
|
-
readonly started: boolean;
|
|
16
|
-
readonly messages: readonly Message[];
|
|
17
|
-
send(input: string | ContentPart[]): Promise<void>;
|
|
18
|
-
abort(): void;
|
|
19
|
-
subscribe(listener: (event: AgentSessionEvent) => void): () => void;
|
|
20
|
-
}
|
|
21
|
-
export interface ChannelManager {
|
|
22
|
-
open(opts?: {
|
|
23
|
-
id?: string;
|
|
24
|
-
title?: string;
|
|
25
|
-
}): Channel;
|
|
26
|
-
get(id: string): Channel | undefined;
|
|
27
|
-
list(): Channel[];
|
|
28
|
-
close(id: string): void;
|
|
29
|
-
subscribe(listener: (event: ChannelManagerEvent) => void): () => void;
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { AgentRegistry } from '../agents';
|
|
2
|
-
import type { SessionManager } from '../session';
|
|
3
|
-
import type { SkillRegistry } from '../skills';
|
|
4
|
-
import type { Command } from './types';
|
|
5
|
-
export declare const createAgentsCommand: (agents: AgentRegistry) => Command;
|
|
6
|
-
export declare const createSkillsCommand: (skills: SkillRegistry) => Command;
|
|
7
|
-
export declare const createSessionsCommand: (sessions: SessionManager, options?: {
|
|
8
|
-
cwd?: string;
|
|
9
|
-
}) => Command;
|
|
10
|
-
export declare const createQuitCommand: (onQuit: () => void | Promise<void>) => Command;
|
|
11
|
-
export declare const createHelpCommand: (list: () => Command[]) => Command;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export const createAgentsCommand = (agents) => ({
|
|
2
|
-
name: 'agents',
|
|
3
|
-
description: 'List available agents',
|
|
4
|
-
run: () => {
|
|
5
|
-
const list = agents.list();
|
|
6
|
-
if (list.length === 0)
|
|
7
|
-
return { ok: true, output: 'No agents configured.' };
|
|
8
|
-
const lines = list.map((a) => `- ${a.name}${a.description ? ` — ${a.description}` : ''}`);
|
|
9
|
-
return { ok: true, output: lines.join('\n') };
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
export const createSkillsCommand = (skills) => ({
|
|
13
|
-
name: 'skills',
|
|
14
|
-
description: 'List available skills',
|
|
15
|
-
run: () => {
|
|
16
|
-
const list = skills.list();
|
|
17
|
-
if (list.length === 0)
|
|
18
|
-
return { ok: true, output: 'No skills configured.' };
|
|
19
|
-
const lines = list.map((s) => `- ${s.name}${s.description ? ` — ${s.description}` : ''}`);
|
|
20
|
-
return { ok: true, output: lines.join('\n') };
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
export const createSessionsCommand = (sessions, options) => ({
|
|
24
|
-
name: 'sessions',
|
|
25
|
-
description: 'List saved sessions',
|
|
26
|
-
run: async () => {
|
|
27
|
-
const list = await sessions.list(options?.cwd ? { cwd: options.cwd } : undefined);
|
|
28
|
-
if (list.length === 0)
|
|
29
|
-
return { ok: true, output: 'No sessions yet.' };
|
|
30
|
-
const lines = list.map((s) => `- ${s.title || s.id}`);
|
|
31
|
-
return { ok: true, output: lines.join('\n') };
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
export const createQuitCommand = (onQuit) => ({
|
|
35
|
-
name: 'quit',
|
|
36
|
-
description: 'Exit the session',
|
|
37
|
-
aliases: ['q'],
|
|
38
|
-
run: async () => {
|
|
39
|
-
await onQuit();
|
|
40
|
-
return { ok: true };
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
export const createHelpCommand = (list) => ({
|
|
44
|
-
name: 'help',
|
|
45
|
-
description: 'Show available commands',
|
|
46
|
-
run: () => {
|
|
47
|
-
const commands = list();
|
|
48
|
-
if (commands.length === 0)
|
|
49
|
-
return { ok: true, output: 'No commands registered.' };
|
|
50
|
-
const lines = commands.map((c) => `/${c.name} — ${c.description}`);
|
|
51
|
-
return { ok: true, output: lines.join('\n') };
|
|
52
|
-
},
|
|
53
|
-
});
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { createAgentsCommand, createHelpCommand, createQuitCommand, createSessionsCommand, createSkillsCommand, } from './defaults';
|
|
2
|
-
export { createCommandRegistry } from './registry';
|
|
3
|
-
export type { Command, CommandContext, CommandRegistry, CommandResult } from './types';
|