minicode-ai 0.13.0 → 0.14.0
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/CHANGELOG.md +23 -0
- package/LICENSE +21 -21
- package/README.md +4 -0
- package/cli/args.ts +50 -2
- package/cli/commands/acp.ts +18 -3
- package/cli/commands/daemon.ts +114 -19
- package/cli/commands/exec.ts +95 -7
- package/cli/commands/mcp.ts +66 -5
- package/cli/commands/memory.ts +46 -14
- package/cli/commands.ts +5 -0
- package/cli/index.ts +30 -5
- package/cli/minicode.js +6 -0
- package/cli/setup.ts +365 -24
- package/cli/tui.ts +72 -27
- package/docs/TERMINAL_CONTRACT.md +91 -24
- package/docs/agents.md +2 -2
- package/docs/cli.md +1 -0
- package/docs/environment.md +1 -0
- package/docs/memory-sessions.md +5 -0
- package/package.json +3 -2
- package/src/app/session.ts +153 -35
- package/src/app/tool-layer.ts +67 -61
- package/src/daemon/approvals.ts +25 -1
- package/src/daemon/client.ts +51 -1
- package/src/daemon/control.ts +8 -0
- package/src/daemon/protocol.ts +47 -1
- package/src/daemon/server.ts +45 -9
- package/src/daemon/subscription.ts +25 -1
- package/src/daemon/telemetry.ts +4 -0
- package/src/hooks/run.ts +5 -1
- package/src/mcp/client.ts +349 -90
- package/src/mcp/http-transport.ts +7 -0
- package/src/mcp/transport.ts +5 -0
- package/src/memory/files.ts +69 -3
- package/src/memory/vector.ts +556 -160
- package/src/policy/approval-binding.ts +199 -0
- package/src/policy/context.ts +20 -1
- package/src/policy/executor.ts +44 -5
- package/src/policy/permission.ts +243 -26
- package/src/policy/tool-contract.ts +77 -0
- package/src/policy/usage.ts +3 -1
- package/src/policy/work-mode.ts +49 -1
- package/src/presentation/adapter.ts +157 -7
- package/src/presentation/events.ts +173 -1
- package/src/presentation/model.ts +37 -0
- package/src/presentation/projection.ts +107 -18
- package/src/presentation/reducer.ts +134 -10
- package/src/sandbox/os.ts +18 -1
- package/src/session/persistence.ts +153 -11
- package/src/task/store.ts +43 -3
- package/src/tools/memory.ts +70 -10
- package/src/tools/task.ts +7 -1
- package/src/tools/todo.ts +14 -4
- package/src/ui/approval/prompt.ts +52 -7
- package/src/ui/assistant/simple.ts +160 -57
- package/src/ui/contract.ts +46 -0
- package/src/ui/footer.ts +14 -5
- package/src/ui/i18n/en.ts +9 -0
- package/src/ui/i18n/id.ts +9 -0
- package/src/ui/render/collapse.ts +24 -52
- package/src/ui/render/detail.ts +14 -9
- package/src/ui/render/errors.ts +8 -0
- package/src/ui/render/reasoning.ts +13 -8
- package/src/ui/session-state.ts +243 -0
- package/src/ui/tui/app.ts +7 -3
- package/src/ui/tui/transcript.ts +271 -30
- package/vendor/minicore/src/core/budget.ts +25 -25
- package/vendor/minicore/src/core/compact.ts +75 -75
- package/vendor/minicore/src/core/errors.ts +59 -59
- package/vendor/minicore/src/core/events.ts +73 -73
- package/vendor/minicore/src/core/executor.ts +139 -139
- package/vendor/minicore/src/core/history.ts +31 -31
- package/vendor/minicore/src/core/index.ts +41 -41
- package/vendor/minicore/src/core/loop.ts +355 -355
- package/vendor/minicore/src/core/permission.ts +22 -22
- package/vendor/minicore/src/core/provider.ts +39 -39
- package/vendor/minicore/src/core/recovery.ts +35 -35
- package/vendor/minicore/src/core/session.ts +327 -327
- package/vendor/minicore/src/core/snapshot.ts +146 -146
- package/vendor/minicore/src/core/tokens.ts +107 -107
- package/vendor/minicore/src/core/tool.ts +115 -115
- package/vendor/minicore/src/core/types.ts +50 -50
- package/vendor/minicore/src/providers/openai-compat.ts +417 -417
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
// MiniCore — public surface. Everything the kernel exposes intentionally.
|
|
2
|
-
// Providers, tools, memory, UI, and storage live outside this file.
|
|
3
|
-
|
|
4
|
-
export type { Message, UserMessage, AssistantMessage, ToolResult, ToolCall, Content, ContentPart } from "./types.ts";
|
|
5
|
-
export { AgentError, ProviderError, abortError } from "./errors.ts";
|
|
6
|
-
export type { AgentErrorKind, ProviderErrorCategory, RecoveryAction } from "./errors.ts";
|
|
7
|
-
export type { ModelProvider, StreamRequest, ProviderEvent, FinishReason } from "./provider.ts";
|
|
8
|
-
export type { Tool, ToolSchema, JSONSchema, ToolContext, ToolRegistry, ArgsResult } from "./tool.ts";
|
|
9
|
-
export { validateArgs, createToolRegistry } from "./tool.ts";
|
|
10
|
-
export type { ToolExecutor, ExecutorDeps } from "./executor.ts";
|
|
11
|
-
export { runCall, sequentialExecutor } from "./executor.ts";
|
|
12
|
-
export type { PermissionHandler, Decision } from "./permission.ts";
|
|
13
|
-
export type { TokenEstimator } from "./tokens.ts";
|
|
14
|
-
export {
|
|
15
|
-
defaultTokenEstimator,
|
|
16
|
-
estimateImageTokens,
|
|
17
|
-
estimateMessage,
|
|
18
|
-
estimateMessages,
|
|
19
|
-
estimateTools,
|
|
20
|
-
estimateSystem,
|
|
21
|
-
estimateSessionContext,
|
|
22
|
-
contentToText,
|
|
23
|
-
DEFAULT_CHARS_PER_TOKEN,
|
|
24
|
-
} from "./tokens.ts";
|
|
25
|
-
export type { BudgetPolicy, BudgetState, PressureLevel } from "./budget.ts";
|
|
26
|
-
export { defaultBudgetPolicy } from "./budget.ts";
|
|
27
|
-
export type { CompactionStrategy } from "./compact.ts";
|
|
28
|
-
export { mechanicalCompaction } from "./compact.ts";
|
|
29
|
-
export type { RecoveryPolicy } from "./recovery.ts";
|
|
30
|
-
export { defaultRecoveryPolicy, maxProviderRetries } from "./recovery.ts";
|
|
31
|
-
export type { AgentEvent, AgentEventType, EventBus, EventBusOptions } from "./events.ts";
|
|
32
|
-
export { createEventBus } from "./events.ts";
|
|
33
|
-
export { ContextStore } from "./history.ts";
|
|
34
|
-
export type { Session, SessionConfig, SessionState, TurnResult, Step, Execution } from "./session.ts";
|
|
35
|
-
export {
|
|
36
|
-
createSession,
|
|
37
|
-
DEFAULT_MAX_STEPS,
|
|
38
|
-
DEFAULT_CONTEXT_WINDOW_TOKENS,
|
|
39
|
-
DEFAULT_TOOL_RESULT_MAX_TOKENS,
|
|
40
|
-
DEFAULT_KEEP_RECENT_TURNS,
|
|
41
|
-
DEFAULT_TIMEOUT_MS,
|
|
1
|
+
// MiniCore — public surface. Everything the kernel exposes intentionally.
|
|
2
|
+
// Providers, tools, memory, UI, and storage live outside this file.
|
|
3
|
+
|
|
4
|
+
export type { Message, UserMessage, AssistantMessage, ToolResult, ToolCall, Content, ContentPart } from "./types.ts";
|
|
5
|
+
export { AgentError, ProviderError, abortError } from "./errors.ts";
|
|
6
|
+
export type { AgentErrorKind, ProviderErrorCategory, RecoveryAction } from "./errors.ts";
|
|
7
|
+
export type { ModelProvider, StreamRequest, ProviderEvent, FinishReason } from "./provider.ts";
|
|
8
|
+
export type { Tool, ToolSchema, JSONSchema, ToolContext, ToolRegistry, ArgsResult } from "./tool.ts";
|
|
9
|
+
export { validateArgs, createToolRegistry } from "./tool.ts";
|
|
10
|
+
export type { ToolExecutor, ExecutorDeps } from "./executor.ts";
|
|
11
|
+
export { runCall, sequentialExecutor } from "./executor.ts";
|
|
12
|
+
export type { PermissionHandler, Decision } from "./permission.ts";
|
|
13
|
+
export type { TokenEstimator } from "./tokens.ts";
|
|
14
|
+
export {
|
|
15
|
+
defaultTokenEstimator,
|
|
16
|
+
estimateImageTokens,
|
|
17
|
+
estimateMessage,
|
|
18
|
+
estimateMessages,
|
|
19
|
+
estimateTools,
|
|
20
|
+
estimateSystem,
|
|
21
|
+
estimateSessionContext,
|
|
22
|
+
contentToText,
|
|
23
|
+
DEFAULT_CHARS_PER_TOKEN,
|
|
24
|
+
} from "./tokens.ts";
|
|
25
|
+
export type { BudgetPolicy, BudgetState, PressureLevel } from "./budget.ts";
|
|
26
|
+
export { defaultBudgetPolicy } from "./budget.ts";
|
|
27
|
+
export type { CompactionStrategy } from "./compact.ts";
|
|
28
|
+
export { mechanicalCompaction } from "./compact.ts";
|
|
29
|
+
export type { RecoveryPolicy } from "./recovery.ts";
|
|
30
|
+
export { defaultRecoveryPolicy, maxProviderRetries } from "./recovery.ts";
|
|
31
|
+
export type { AgentEvent, AgentEventType, EventBus, EventBusOptions } from "./events.ts";
|
|
32
|
+
export { createEventBus } from "./events.ts";
|
|
33
|
+
export { ContextStore } from "./history.ts";
|
|
34
|
+
export type { Session, SessionConfig, SessionState, TurnResult, Step, Execution } from "./session.ts";
|
|
35
|
+
export {
|
|
36
|
+
createSession,
|
|
37
|
+
DEFAULT_MAX_STEPS,
|
|
38
|
+
DEFAULT_CONTEXT_WINDOW_TOKENS,
|
|
39
|
+
DEFAULT_TOOL_RESULT_MAX_TOKENS,
|
|
40
|
+
DEFAULT_KEEP_RECENT_TURNS,
|
|
41
|
+
DEFAULT_TIMEOUT_MS,
|
|
42
42
|
} from "./session.ts";
|