mu-harness 0.16.15 → 0.16.17
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/{script/harness/npm/src → esm}/tui/chat/ChatApp.d.ts +12 -2
- package/esm/{harness/npm/src/tui → tui}/chat/ChatApp.js +36 -19
- package/{script/harness/npm/src → esm}/tui/chat/status.d.ts +2 -2
- package/esm/{harness/npm/src/tui → tui}/chat/status.js +2 -4
- package/package.json +14 -8
- package/{esm/harness/npm/src → script}/tui/chat/ChatApp.d.ts +12 -2
- package/script/{harness/npm/src/tui → tui}/chat/ChatApp.js +36 -19
- package/{esm/harness/npm/src → script}/tui/chat/status.d.ts +2 -2
- package/script/{harness/npm/src/tui → tui}/chat/status.js +2 -4
- 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/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/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/{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/{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
|
@@ -53,6 +53,15 @@ export interface ChatHost {
|
|
|
53
53
|
* (a splash). Cleared once the conversation starts.
|
|
54
54
|
*/
|
|
55
55
|
banner?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Lean input presentation: drop the surface-background input frame, the
|
|
58
|
+
* model/provider/agent footer inside the input, and the context readout on
|
|
59
|
+
* the status bar — leaving a bare prompt + editor. The {@link ChatHost.banner}
|
|
60
|
+
* splash is independent and still shown if set. Hosts that want the full
|
|
61
|
+
* information-rich input (surface frame, model · provider · @agent footer,
|
|
62
|
+
* token/context usage in the status line) leave this unset (the default).
|
|
63
|
+
*/
|
|
64
|
+
minimal?: boolean;
|
|
56
65
|
onExit(code: number): void;
|
|
57
66
|
}
|
|
58
67
|
export declare class ChatApp {
|
|
@@ -69,6 +78,7 @@ export declare class ChatApp {
|
|
|
69
78
|
private session;
|
|
70
79
|
private readonly features;
|
|
71
80
|
private readonly banner;
|
|
81
|
+
private readonly minimal;
|
|
72
82
|
private unsubscribe;
|
|
73
83
|
private unsubscribeTheme;
|
|
74
84
|
private unsubscribeSubAgents;
|
|
@@ -161,8 +171,8 @@ export declare class ChatApp {
|
|
|
161
171
|
private startSpinner;
|
|
162
172
|
private stopSpinner;
|
|
163
173
|
private loadModels;
|
|
164
|
-
/**
|
|
165
|
-
private
|
|
174
|
+
/** Styled model id + provider + active agent, shown in the input container footer. */
|
|
175
|
+
private modelLabel;
|
|
166
176
|
private updateSpeaker;
|
|
167
177
|
private promptGlyph;
|
|
168
178
|
private inputPanel;
|
|
@@ -77,13 +77,14 @@ export class ChatApp {
|
|
|
77
77
|
session;
|
|
78
78
|
features;
|
|
79
79
|
banner;
|
|
80
|
+
minimal;
|
|
80
81
|
unsubscribe;
|
|
81
82
|
unsubscribeTheme;
|
|
82
83
|
unsubscribeSubAgents;
|
|
83
84
|
runUnsubs = new Set();
|
|
84
85
|
activeRuns = new Set();
|
|
85
86
|
mentionAc;
|
|
86
|
-
status = { label: 'ready', busy: false, spinnerTick: 0, context: ''
|
|
87
|
+
status = { label: 'ready', busy: false, spinnerTick: 0, context: '' };
|
|
87
88
|
running = false;
|
|
88
89
|
queue = [];
|
|
89
90
|
pendingShell = [];
|
|
@@ -113,6 +114,7 @@ export class ChatApp {
|
|
|
113
114
|
this.session = host.session;
|
|
114
115
|
this.features = host.features ?? {};
|
|
115
116
|
this.banner = host.banner;
|
|
117
|
+
this.minimal = host.minimal ?? false;
|
|
116
118
|
this.transcript.thinkingVisible = host.initialThinking;
|
|
117
119
|
this.history = host.history?.load() ?? [];
|
|
118
120
|
this.historyIndex = this.history.length;
|
|
@@ -1051,15 +1053,24 @@ export class ChatApp {
|
|
|
1051
1053
|
// backend may be unreachable; surfaced on first send
|
|
1052
1054
|
}
|
|
1053
1055
|
}
|
|
1054
|
-
/**
|
|
1055
|
-
|
|
1056
|
+
/** Styled model id + provider + active agent, shown in the input container footer. */
|
|
1057
|
+
modelLabel() {
|
|
1056
1058
|
const ref = this.host.modelRef();
|
|
1057
1059
|
const slash = ref.indexOf('/');
|
|
1058
1060
|
const id = slash >= 0 ? ref.slice(slash + 1) : ref;
|
|
1059
1061
|
const providerName = slash >= 0 ? ref.slice(0, slash) : '';
|
|
1060
1062
|
const model = this.models.find((m) => m.id === id);
|
|
1061
1063
|
const provider = model?.ownedBy ?? providerName;
|
|
1062
|
-
|
|
1064
|
+
const theme = this.theme();
|
|
1065
|
+
const bold = styleToAnsi({ fg: theme.colors.text, bold: true });
|
|
1066
|
+
const dim = styleToAnsi({ fg: theme.colors.textMuted });
|
|
1067
|
+
const head = provider ? `${bold}${id}${RESET} ${dim}${provider}${RESET}` : `${bold}${id}${RESET}`;
|
|
1068
|
+
const agent = this.host.agentRef();
|
|
1069
|
+
if (!agent)
|
|
1070
|
+
return head;
|
|
1071
|
+
const hex = asHexColor(this.host.agentColor());
|
|
1072
|
+
const agentSgr = hex ? styleToAnsi({ fg: hex, bold: true }) : dim;
|
|
1073
|
+
return `${head} ${dim}·${RESET} ${agentSgr}@${agent}${RESET}`;
|
|
1063
1074
|
}
|
|
1064
1075
|
updateSpeaker() {
|
|
1065
1076
|
this.transcript.speaker = { name: this.host.agentRef(), color: asHexColor(this.host.agentColor()) };
|
|
@@ -1078,19 +1089,27 @@ export class ChatApp {
|
|
|
1078
1089
|
}
|
|
1079
1090
|
inputPanel() {
|
|
1080
1091
|
const inner = this.approvalView() ?? this.editorInner();
|
|
1092
|
+
if (this.minimal)
|
|
1093
|
+
return box(inner, { padding: 0 });
|
|
1081
1094
|
return box(inner, { background: this.theme().colors.surface, padding: 1 });
|
|
1082
1095
|
}
|
|
1083
1096
|
editorInner() {
|
|
1084
1097
|
const prompt = this.promptGlyph();
|
|
1085
1098
|
const editor = this.editor;
|
|
1086
1099
|
const editorRows = editor.rows();
|
|
1100
|
+
const label = this.minimal ? '' : this.modelLabel();
|
|
1087
1101
|
return {
|
|
1088
1102
|
render: (s) => {
|
|
1089
1103
|
if (s.width <= 0 || s.height <= 0)
|
|
1090
1104
|
return;
|
|
1091
1105
|
s.text(0, 0, prompt);
|
|
1092
|
-
const
|
|
1106
|
+
const reserve = label ? 2 : 1;
|
|
1107
|
+
const rows = Math.min(editorRows, Math.max(1, s.height - reserve));
|
|
1093
1108
|
s.child(editor, { x: PROMPT_WIDTH, y: 0, width: Math.max(1, s.width - PROMPT_WIDTH), height: rows });
|
|
1109
|
+
if (label) {
|
|
1110
|
+
const labelRow = rows + 1;
|
|
1111
|
+
s.text(0, labelRow, visibleWidth(label) > s.width ? truncateToWidth(label, s.width) : label);
|
|
1112
|
+
}
|
|
1094
1113
|
},
|
|
1095
1114
|
};
|
|
1096
1115
|
}
|
|
@@ -1150,7 +1169,7 @@ export class ChatApp {
|
|
|
1150
1169
|
return children;
|
|
1151
1170
|
}
|
|
1152
1171
|
statusBar() {
|
|
1153
|
-
this.status.
|
|
1172
|
+
this.status.minimal = this.minimal;
|
|
1154
1173
|
return statusComponent(this.status, this.theme());
|
|
1155
1174
|
}
|
|
1156
1175
|
dock() {
|
|
@@ -1279,19 +1298,17 @@ export class ChatApp {
|
|
|
1279
1298
|
const focused = this.focusedSub();
|
|
1280
1299
|
const showBanner = this.banner !== undefined && this.transcript.entries.length === 0 && !focused;
|
|
1281
1300
|
const spacer = { render: () => { } };
|
|
1282
|
-
const inner = focused
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
// Conversation: transcript fills, input docked at the bottom.
|
|
1294
|
-
: column([flex(this.scroll), this.dock()]);
|
|
1301
|
+
const inner = focused ? this.subAgentView(focused) : showBanner
|
|
1302
|
+
// Splash: banner + a centered, width-limited minimal input; status pinned at the bottom.
|
|
1303
|
+
? column([
|
|
1304
|
+
flex(spacer),
|
|
1305
|
+
this.bannerBlock(),
|
|
1306
|
+
this.centered(column(this.inputGroup()), SPLASH_INPUT_WIDTH),
|
|
1307
|
+
flex(spacer),
|
|
1308
|
+
this.statusBar(),
|
|
1309
|
+
])
|
|
1310
|
+
// Conversation: transcript fills, input docked at the bottom.
|
|
1311
|
+
: column([flex(this.scroll), this.dock()]);
|
|
1295
1312
|
return {
|
|
1296
1313
|
render: (s) => {
|
|
1297
1314
|
s.fill({ x: 0, y: 0, width: s.width, height: s.height }, this.theme().colors.background);
|
|
@@ -8,8 +8,8 @@ export interface StatusState {
|
|
|
8
8
|
busy: boolean;
|
|
9
9
|
spinnerTick: number;
|
|
10
10
|
context: string;
|
|
11
|
-
/**
|
|
12
|
-
|
|
11
|
+
/** Lean mode: hide the context readout, leaving only a busy spinner. */
|
|
12
|
+
minimal?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export declare function statusFromEvent(event: AgentSessionEvent): string | undefined;
|
|
15
15
|
export declare function statusComponent(state: StatusState, theme: Theme): Component;
|
|
@@ -32,10 +32,8 @@ export function statusComponent(state, theme) {
|
|
|
32
32
|
return;
|
|
33
33
|
const muted = styleToAnsi(theme.styles.muted);
|
|
34
34
|
const spinner = `${muted}${spinnerFrame(state.spinnerTick)}${RESET}`;
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const left = [model, activity].filter(Boolean).join(`${muted} · ${RESET}`);
|
|
38
|
-
const right = state.context ? `${muted}${state.context}${RESET}` : '';
|
|
35
|
+
const left = state.busy ? (state.label ? `${spinner} ${muted}${state.label}${RESET}` : spinner) : '';
|
|
36
|
+
const right = state.minimal ? '' : (state.context ? `${muted}${state.context}${RESET}` : '');
|
|
39
37
|
if (!left && !right) {
|
|
40
38
|
s.text(0, 0, '');
|
|
41
39
|
return;
|
package/package.json
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mu-harness",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.17",
|
|
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.17",
|
|
27
|
+
"mu-tui": "^0.16.17"
|
|
23
28
|
},
|
|
24
|
-
"_generatedBy": "dnt@dev"
|
|
25
|
-
|
|
29
|
+
"_generatedBy": "dnt@dev",
|
|
30
|
+
"types": "./esm/index.d.ts"
|
|
31
|
+
}
|
|
@@ -53,6 +53,15 @@ export interface ChatHost {
|
|
|
53
53
|
* (a splash). Cleared once the conversation starts.
|
|
54
54
|
*/
|
|
55
55
|
banner?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Lean input presentation: drop the surface-background input frame, the
|
|
58
|
+
* model/provider/agent footer inside the input, and the context readout on
|
|
59
|
+
* the status bar — leaving a bare prompt + editor. The {@link ChatHost.banner}
|
|
60
|
+
* splash is independent and still shown if set. Hosts that want the full
|
|
61
|
+
* information-rich input (surface frame, model · provider · @agent footer,
|
|
62
|
+
* token/context usage in the status line) leave this unset (the default).
|
|
63
|
+
*/
|
|
64
|
+
minimal?: boolean;
|
|
56
65
|
onExit(code: number): void;
|
|
57
66
|
}
|
|
58
67
|
export declare class ChatApp {
|
|
@@ -69,6 +78,7 @@ export declare class ChatApp {
|
|
|
69
78
|
private session;
|
|
70
79
|
private readonly features;
|
|
71
80
|
private readonly banner;
|
|
81
|
+
private readonly minimal;
|
|
72
82
|
private unsubscribe;
|
|
73
83
|
private unsubscribeTheme;
|
|
74
84
|
private unsubscribeSubAgents;
|
|
@@ -161,8 +171,8 @@ export declare class ChatApp {
|
|
|
161
171
|
private startSpinner;
|
|
162
172
|
private stopSpinner;
|
|
163
173
|
private loadModels;
|
|
164
|
-
/**
|
|
165
|
-
private
|
|
174
|
+
/** Styled model id + provider + active agent, shown in the input container footer. */
|
|
175
|
+
private modelLabel;
|
|
166
176
|
private updateSpeaker;
|
|
167
177
|
private promptGlyph;
|
|
168
178
|
private inputPanel;
|
|
@@ -80,13 +80,14 @@ class ChatApp {
|
|
|
80
80
|
session;
|
|
81
81
|
features;
|
|
82
82
|
banner;
|
|
83
|
+
minimal;
|
|
83
84
|
unsubscribe;
|
|
84
85
|
unsubscribeTheme;
|
|
85
86
|
unsubscribeSubAgents;
|
|
86
87
|
runUnsubs = new Set();
|
|
87
88
|
activeRuns = new Set();
|
|
88
89
|
mentionAc;
|
|
89
|
-
status = { label: 'ready', busy: false, spinnerTick: 0, context: ''
|
|
90
|
+
status = { label: 'ready', busy: false, spinnerTick: 0, context: '' };
|
|
90
91
|
running = false;
|
|
91
92
|
queue = [];
|
|
92
93
|
pendingShell = [];
|
|
@@ -116,6 +117,7 @@ class ChatApp {
|
|
|
116
117
|
this.session = host.session;
|
|
117
118
|
this.features = host.features ?? {};
|
|
118
119
|
this.banner = host.banner;
|
|
120
|
+
this.minimal = host.minimal ?? false;
|
|
119
121
|
this.transcript.thinkingVisible = host.initialThinking;
|
|
120
122
|
this.history = host.history?.load() ?? [];
|
|
121
123
|
this.historyIndex = this.history.length;
|
|
@@ -1054,15 +1056,24 @@ class ChatApp {
|
|
|
1054
1056
|
// backend may be unreachable; surfaced on first send
|
|
1055
1057
|
}
|
|
1056
1058
|
}
|
|
1057
|
-
/**
|
|
1058
|
-
|
|
1059
|
+
/** Styled model id + provider + active agent, shown in the input container footer. */
|
|
1060
|
+
modelLabel() {
|
|
1059
1061
|
const ref = this.host.modelRef();
|
|
1060
1062
|
const slash = ref.indexOf('/');
|
|
1061
1063
|
const id = slash >= 0 ? ref.slice(slash + 1) : ref;
|
|
1062
1064
|
const providerName = slash >= 0 ? ref.slice(0, slash) : '';
|
|
1063
1065
|
const model = this.models.find((m) => m.id === id);
|
|
1064
1066
|
const provider = model?.ownedBy ?? providerName;
|
|
1065
|
-
|
|
1067
|
+
const theme = this.theme();
|
|
1068
|
+
const bold = (0, theme_js_1.styleToAnsi)({ fg: theme.colors.text, bold: true });
|
|
1069
|
+
const dim = (0, theme_js_1.styleToAnsi)({ fg: theme.colors.textMuted });
|
|
1070
|
+
const head = provider ? `${bold}${id}${RESET} ${dim}${provider}${RESET}` : `${bold}${id}${RESET}`;
|
|
1071
|
+
const agent = this.host.agentRef();
|
|
1072
|
+
if (!agent)
|
|
1073
|
+
return head;
|
|
1074
|
+
const hex = (0, theme_js_1.asHexColor)(this.host.agentColor());
|
|
1075
|
+
const agentSgr = hex ? (0, theme_js_1.styleToAnsi)({ fg: hex, bold: true }) : dim;
|
|
1076
|
+
return `${head} ${dim}·${RESET} ${agentSgr}@${agent}${RESET}`;
|
|
1066
1077
|
}
|
|
1067
1078
|
updateSpeaker() {
|
|
1068
1079
|
this.transcript.speaker = { name: this.host.agentRef(), color: (0, theme_js_1.asHexColor)(this.host.agentColor()) };
|
|
@@ -1081,19 +1092,27 @@ class ChatApp {
|
|
|
1081
1092
|
}
|
|
1082
1093
|
inputPanel() {
|
|
1083
1094
|
const inner = this.approvalView() ?? this.editorInner();
|
|
1095
|
+
if (this.minimal)
|
|
1096
|
+
return (0, mu_tui_1.box)(inner, { padding: 0 });
|
|
1084
1097
|
return (0, mu_tui_1.box)(inner, { background: this.theme().colors.surface, padding: 1 });
|
|
1085
1098
|
}
|
|
1086
1099
|
editorInner() {
|
|
1087
1100
|
const prompt = this.promptGlyph();
|
|
1088
1101
|
const editor = this.editor;
|
|
1089
1102
|
const editorRows = editor.rows();
|
|
1103
|
+
const label = this.minimal ? '' : this.modelLabel();
|
|
1090
1104
|
return {
|
|
1091
1105
|
render: (s) => {
|
|
1092
1106
|
if (s.width <= 0 || s.height <= 0)
|
|
1093
1107
|
return;
|
|
1094
1108
|
s.text(0, 0, prompt);
|
|
1095
|
-
const
|
|
1109
|
+
const reserve = label ? 2 : 1;
|
|
1110
|
+
const rows = Math.min(editorRows, Math.max(1, s.height - reserve));
|
|
1096
1111
|
s.child(editor, { x: PROMPT_WIDTH, y: 0, width: Math.max(1, s.width - PROMPT_WIDTH), height: rows });
|
|
1112
|
+
if (label) {
|
|
1113
|
+
const labelRow = rows + 1;
|
|
1114
|
+
s.text(0, labelRow, (0, mu_tui_1.visibleWidth)(label) > s.width ? (0, mu_tui_1.truncateToWidth)(label, s.width) : label);
|
|
1115
|
+
}
|
|
1097
1116
|
},
|
|
1098
1117
|
};
|
|
1099
1118
|
}
|
|
@@ -1153,7 +1172,7 @@ class ChatApp {
|
|
|
1153
1172
|
return children;
|
|
1154
1173
|
}
|
|
1155
1174
|
statusBar() {
|
|
1156
|
-
this.status.
|
|
1175
|
+
this.status.minimal = this.minimal;
|
|
1157
1176
|
return (0, status_js_1.statusComponent)(this.status, this.theme());
|
|
1158
1177
|
}
|
|
1159
1178
|
dock() {
|
|
@@ -1282,19 +1301,17 @@ class ChatApp {
|
|
|
1282
1301
|
const focused = this.focusedSub();
|
|
1283
1302
|
const showBanner = this.banner !== undefined && this.transcript.entries.length === 0 && !focused;
|
|
1284
1303
|
const spacer = { render: () => { } };
|
|
1285
|
-
const inner = focused
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
// Conversation: transcript fills, input docked at the bottom.
|
|
1297
|
-
: (0, mu_tui_1.column)([(0, mu_tui_1.flex)(this.scroll), this.dock()]);
|
|
1304
|
+
const inner = focused ? this.subAgentView(focused) : showBanner
|
|
1305
|
+
// Splash: banner + a centered, width-limited minimal input; status pinned at the bottom.
|
|
1306
|
+
? (0, mu_tui_1.column)([
|
|
1307
|
+
(0, mu_tui_1.flex)(spacer),
|
|
1308
|
+
this.bannerBlock(),
|
|
1309
|
+
this.centered((0, mu_tui_1.column)(this.inputGroup()), SPLASH_INPUT_WIDTH),
|
|
1310
|
+
(0, mu_tui_1.flex)(spacer),
|
|
1311
|
+
this.statusBar(),
|
|
1312
|
+
])
|
|
1313
|
+
// Conversation: transcript fills, input docked at the bottom.
|
|
1314
|
+
: (0, mu_tui_1.column)([(0, mu_tui_1.flex)(this.scroll), this.dock()]);
|
|
1298
1315
|
return {
|
|
1299
1316
|
render: (s) => {
|
|
1300
1317
|
s.fill({ x: 0, y: 0, width: s.width, height: s.height }, this.theme().colors.background);
|
|
@@ -8,8 +8,8 @@ export interface StatusState {
|
|
|
8
8
|
busy: boolean;
|
|
9
9
|
spinnerTick: number;
|
|
10
10
|
context: string;
|
|
11
|
-
/**
|
|
12
|
-
|
|
11
|
+
/** Lean mode: hide the context readout, leaving only a busy spinner. */
|
|
12
|
+
minimal?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export declare function statusFromEvent(event: AgentSessionEvent): string | undefined;
|
|
15
15
|
export declare function statusComponent(state: StatusState, theme: Theme): Component;
|
|
@@ -39,10 +39,8 @@ function statusComponent(state, theme) {
|
|
|
39
39
|
return;
|
|
40
40
|
const muted = (0, theme_js_1.styleToAnsi)(theme.styles.muted);
|
|
41
41
|
const spinner = `${muted}${(0, exports.spinnerFrame)(state.spinnerTick)}${RESET}`;
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const left = [model, activity].filter(Boolean).join(`${muted} · ${RESET}`);
|
|
45
|
-
const right = state.context ? `${muted}${state.context}${RESET}` : '';
|
|
42
|
+
const left = state.busy ? (state.label ? `${spinner} ${muted}${state.label}${RESET}` : spinner) : '';
|
|
43
|
+
const right = state.minimal ? '' : (state.context ? `${muted}${state.context}${RESET}` : '');
|
|
46
44
|
if (!left && !right) {
|
|
47
45
|
s.text(0, 0, '');
|
|
48
46
|
return;
|
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
|
-
};
|