@phuetz/code-buddy 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.codebuddy/skills/bundled/brave-search/SKILL.md +490 -0
- package/.codebuddy/skills/bundled/exa-search/SKILL.md +1122 -0
- package/.codebuddy/skills/bundled/perplexity/SKILL.md +748 -0
- package/.codebuddy/skills/bundled/playwright/SKILL.md +520 -0
- package/.codebuddy/skills/bundled/puppeteer/SKILL.md +708 -0
- package/.codebuddy/skills/bundled/web-fetch/SKILL.md +1003 -0
- package/README.md +56 -0
- package/dist/agent/agent-state.d.ts +3 -3
- package/dist/agent/agent-state.js +6 -6
- package/dist/agent/agent-state.js.map +1 -1
- package/dist/agent/base-agent.d.ts +4 -4
- package/dist/agent/base-agent.js +22 -9
- package/dist/agent/base-agent.js.map +1 -1
- package/dist/agent/cache-trace.d.ts +56 -0
- package/dist/agent/cache-trace.js +98 -0
- package/dist/agent/cache-trace.js.map +1 -0
- package/dist/agent/codebuddy-agent.js +4 -2
- package/dist/agent/codebuddy-agent.js.map +1 -1
- package/dist/agent/execution/agent-executor.d.ts +4 -4
- package/dist/agent/execution/agent-executor.js +46 -14
- package/dist/agent/execution/agent-executor.js.map +1 -1
- package/dist/agent/facades/agent-context-facade.js +1 -3
- package/dist/agent/facades/agent-context-facade.js.map +1 -1
- package/dist/agent/facades/message-history-manager.js +14 -12
- package/dist/agent/facades/message-history-manager.js.map +1 -1
- package/dist/agent/facades/session-facade.d.ts +3 -3
- package/dist/agent/facades/session-facade.js +6 -6
- package/dist/agent/facades/session-facade.js.map +1 -1
- package/dist/agent/history-repair.d.ts +37 -0
- package/dist/agent/history-repair.js +124 -0
- package/dist/agent/history-repair.js.map +1 -0
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +3 -3
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/isolation/agent-workspace.d.ts +1 -0
- package/dist/agent/isolation/agent-workspace.js +10 -0
- package/dist/agent/isolation/agent-workspace.js.map +1 -1
- package/dist/agent/specialized/archive-agent.d.ts +3 -0
- package/dist/agent/specialized/archive-agent.js +71 -31
- package/dist/agent/specialized/archive-agent.js.map +1 -1
- package/dist/agent/specialized/index.d.ts +9 -8
- package/dist/agent/specialized/index.js +16 -8
- package/dist/agent/specialized/index.js.map +1 -1
- package/dist/agent/specialized/security-review/agent.js +19 -8
- package/dist/agent/specialized/security-review/agent.js.map +1 -1
- package/dist/agent/tool-executor.js +5 -0
- package/dist/agent/tool-executor.js.map +1 -1
- package/dist/agent/turn-diff-tracker.d.ts +79 -0
- package/dist/agent/turn-diff-tracker.js +195 -0
- package/dist/agent/turn-diff-tracker.js.map +1 -0
- package/dist/browser/controller.js +8 -4
- package/dist/browser/controller.js.map +1 -1
- package/dist/browser-automation/browser-manager.js +8 -1
- package/dist/browser-automation/browser-manager.js.map +1 -1
- package/dist/checkpoints/checkpoint-versioning.js +78 -20
- package/dist/checkpoints/checkpoint-versioning.js.map +1 -1
- package/dist/cli/config-loader.js +2 -4
- package/dist/cli/config-loader.js.map +1 -1
- package/dist/codebuddy/client.js +70 -11
- package/dist/codebuddy/client.js.map +1 -1
- package/dist/codebuddy/tools.d.ts +1 -7
- package/dist/codebuddy/tools.js +2 -30
- package/dist/codebuddy/tools.js.map +1 -1
- package/dist/commands/cli/daemon-commands.d.ts +14 -0
- package/dist/commands/cli/daemon-commands.js +166 -0
- package/dist/commands/cli/daemon-commands.js.map +1 -0
- package/dist/commands/cli/speak-command.d.ts +10 -0
- package/dist/commands/cli/speak-command.js +97 -0
- package/dist/commands/cli/speak-command.js.map +1 -0
- package/dist/commands/cli/utility-commands.d.ts +10 -0
- package/dist/commands/cli/utility-commands.js +88 -0
- package/dist/commands/cli/utility-commands.js.map +1 -0
- package/dist/commands/handlers/fcs-handlers.js +1 -1
- package/dist/commands/handlers/fcs-handlers.js.map +1 -1
- package/dist/commands/handlers/memory-handlers.js +2 -1
- package/dist/commands/handlers/memory-handlers.js.map +1 -1
- package/dist/commands/handlers/vibe-handlers.js +0 -1
- package/dist/commands/handlers/vibe-handlers.js.map +1 -1
- package/dist/commands/handlers/worktree-handlers.js +11 -0
- package/dist/commands/handlers/worktree-handlers.js.map +1 -1
- package/dist/commands/index.d.ts +8 -7
- package/dist/commands/index.js +10 -8
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/mcp.d.ts +1 -0
- package/dist/commands/mcp.js +66 -7
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/pipeline.js +25 -13
- package/dist/commands/pipeline.js.map +1 -1
- package/dist/config/hot-reload/watcher.js +4 -4
- package/dist/config/hot-reload/watcher.js.map +1 -1
- package/dist/config/model-tools.d.ts +41 -0
- package/dist/config/model-tools.js +194 -0
- package/dist/config/model-tools.js.map +1 -0
- package/dist/context/context-manager-v2.d.ts +2 -1
- package/dist/context/context-manager-v2.js +34 -5
- package/dist/context/context-manager-v2.js.map +1 -1
- package/dist/context/index.d.ts +12 -12
- package/dist/context/index.js +25 -12
- package/dist/context/index.js.map +1 -1
- package/dist/daemon/daemon-manager.js +23 -19
- package/dist/daemon/daemon-manager.js.map +1 -1
- package/dist/database/database-manager.d.ts +4 -0
- package/dist/database/database-manager.js +16 -7
- package/dist/database/database-manager.js.map +1 -1
- package/dist/desktop-automation/nutjs-provider.js +89 -0
- package/dist/desktop-automation/nutjs-provider.js.map +1 -1
- package/dist/errors/index.d.ts +4 -4
- package/dist/errors/index.js +8 -4
- package/dist/errors/index.js.map +1 -1
- package/dist/fcs/builtins.d.ts +2 -6
- package/dist/fcs/builtins.js +2 -568
- package/dist/fcs/builtins.js.map +1 -1
- package/dist/fcs/codebuddy-bindings.d.ts +3 -43
- package/dist/fcs/codebuddy-bindings.js +2 -606
- package/dist/fcs/codebuddy-bindings.js.map +1 -1
- package/dist/fcs/index.d.ts +2 -27
- package/dist/fcs/index.js +2 -53
- package/dist/fcs/index.js.map +1 -1
- package/dist/fcs/lexer.d.ts +2 -37
- package/dist/fcs/lexer.js +2 -459
- package/dist/fcs/lexer.js.map +1 -1
- package/dist/fcs/parser.d.ts +2 -68
- package/dist/fcs/parser.js +2 -893
- package/dist/fcs/parser.js.map +1 -1
- package/dist/fcs/runtime.d.ts +2 -59
- package/dist/fcs/runtime.js +2 -623
- package/dist/fcs/runtime.js.map +1 -1
- package/dist/fcs/script-registry.d.ts +3 -69
- package/dist/fcs/script-registry.js +2 -219
- package/dist/fcs/script-registry.js.map +1 -1
- package/dist/fcs/sync-bindings.d.ts +3 -101
- package/dist/fcs/sync-bindings.js +2 -410
- package/dist/fcs/sync-bindings.js.map +1 -1
- package/dist/fcs/types.d.ts +2 -285
- package/dist/fcs/types.js +2 -103
- package/dist/fcs/types.js.map +1 -1
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/index.js +4 -4
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/use-input-handler.d.ts +1 -1
- package/dist/index.js +20 -330
- package/dist/index.js.map +1 -1
- package/dist/input/voice-control.js +11 -5
- package/dist/input/voice-control.js.map +1 -1
- package/dist/integrations/json-rpc/server.d.ts +9 -0
- package/dist/integrations/json-rpc/server.js +43 -13
- package/dist/integrations/json-rpc/server.js.map +1 -1
- package/dist/integrations/mcp/mcp-server.js +1 -1
- package/dist/integrations/mcp/mcp-server.js.map +1 -1
- package/dist/integrations/notification-integrations.d.ts +1 -0
- package/dist/integrations/notification-integrations.js +6 -1
- package/dist/integrations/notification-integrations.js.map +1 -1
- package/dist/mcp/client.js +2 -1
- package/dist/mcp/client.js.map +1 -1
- package/dist/mcp/config.js +89 -5
- package/dist/mcp/config.js.map +1 -1
- package/dist/mcp/mcp-client.js +65 -14
- package/dist/mcp/mcp-client.js.map +1 -1
- package/dist/mcp/transports.d.ts +0 -1
- package/dist/mcp/transports.js +1 -5
- package/dist/mcp/transports.js.map +1 -1
- package/dist/mcp/types.d.ts +2 -0
- package/dist/memory/index.d.ts +2 -2
- package/dist/memory/index.js +2 -2
- package/dist/memory/index.js.map +1 -1
- package/dist/persistence/session-lock.d.ts +42 -0
- package/dist/persistence/session-lock.js +165 -0
- package/dist/persistence/session-lock.js.map +1 -0
- package/dist/persistence/session-store.d.ts +18 -3
- package/dist/persistence/session-store.js +90 -21
- package/dist/persistence/session-store.js.map +1 -1
- package/dist/plugins/conflict-detection.js +2 -1
- package/dist/plugins/conflict-detection.js.map +1 -1
- package/dist/plugins/index.d.ts +3 -3
- package/dist/plugins/index.js +3 -3
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/isolated-plugin-runner.d.ts +6 -0
- package/dist/plugins/isolated-plugin-runner.js +19 -1
- package/dist/plugins/isolated-plugin-runner.js.map +1 -1
- package/dist/providers/local-llm-provider.js +28 -8
- package/dist/providers/local-llm-provider.js.map +1 -1
- package/dist/sandbox/docker-sandbox.js +7 -4
- package/dist/sandbox/docker-sandbox.js.map +1 -1
- package/dist/scripting/builtins.d.ts +8 -3
- package/dist/scripting/builtins.js +506 -355
- package/dist/scripting/builtins.js.map +1 -1
- package/dist/scripting/codebuddy-bindings.d.ts +47 -0
- package/dist/scripting/codebuddy-bindings.js +488 -0
- package/dist/scripting/codebuddy-bindings.js.map +1 -0
- package/dist/scripting/index.d.ts +33 -30
- package/dist/scripting/index.js +41 -36
- package/dist/scripting/index.js.map +1 -1
- package/dist/scripting/lexer.d.ts +31 -13
- package/dist/scripting/lexer.js +379 -292
- package/dist/scripting/lexer.js.map +1 -1
- package/dist/scripting/parser.d.ts +63 -44
- package/dist/scripting/parser.js +700 -473
- package/dist/scripting/parser.js.map +1 -1
- package/dist/scripting/runtime.d.ts +55 -24
- package/dist/scripting/runtime.js +600 -288
- package/dist/scripting/runtime.js.map +1 -1
- package/dist/scripting/script-registry.d.ts +54 -0
- package/dist/scripting/script-registry.js +202 -0
- package/dist/scripting/script-registry.js.map +1 -0
- package/dist/scripting/sync-bindings.d.ts +105 -0
- package/dist/scripting/sync-bindings.js +353 -0
- package/dist/scripting/sync-bindings.js.map +1 -0
- package/dist/scripting/types.d.ts +297 -199
- package/dist/scripting/types.js +86 -60
- package/dist/scripting/types.js.map +1 -1
- package/dist/search/usearch-index.js +42 -7
- package/dist/search/usearch-index.js.map +1 -1
- package/dist/security/bash-parser.d.ts +51 -0
- package/dist/security/bash-parser.js +327 -0
- package/dist/security/bash-parser.js.map +1 -0
- package/dist/security/index.d.ts +7 -5
- package/dist/security/index.js +8 -7
- package/dist/security/index.js.map +1 -1
- package/dist/security/skill-scanner.d.ts +36 -0
- package/dist/security/skill-scanner.js +149 -0
- package/dist/security/skill-scanner.js.map +1 -0
- package/dist/security/trust-folders.d.ts +1 -0
- package/dist/security/trust-folders.js +19 -1
- package/dist/security/trust-folders.js.map +1 -1
- package/dist/server/auth/index.d.ts +2 -2
- package/dist/server/auth/index.js +2 -2
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/middleware/index.d.ts +5 -5
- package/dist/server/middleware/index.js +5 -5
- package/dist/server/middleware/index.js.map +1 -1
- package/dist/server/middleware/rate-limit.js +15 -3
- package/dist/server/middleware/rate-limit.js.map +1 -1
- package/dist/server/websocket/handler.js +54 -6
- package/dist/server/websocket/handler.js.map +1 -1
- package/dist/skills/eligibility.js +26 -4
- package/dist/skills/eligibility.js.map +1 -1
- package/dist/tasks/background-tasks.js +5 -1
- package/dist/tasks/background-tasks.js.map +1 -1
- package/dist/tools/apply-patch.d.ts +55 -0
- package/dist/tools/apply-patch.js +273 -0
- package/dist/tools/apply-patch.js.map +1 -0
- package/dist/tools/hooks/default-hooks.d.ts +1 -1
- package/dist/tools/hooks/default-hooks.js +2 -1
- package/dist/tools/hooks/default-hooks.js.map +1 -1
- package/dist/tools/index.d.ts +10 -10
- package/dist/tools/index.js +11 -11
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/registry/bash-tools.js +6 -3
- package/dist/tools/registry/bash-tools.js.map +1 -1
- package/dist/tools/registry/misc-tools.js +1 -2
- package/dist/tools/registry/misc-tools.js.map +1 -1
- package/dist/tools/registry/search-tools.js +1 -1
- package/dist/tools/registry/search-tools.js.map +1 -1
- package/dist/tools/registry/text-editor-tools.js +1 -1
- package/dist/tools/registry/text-editor-tools.js.map +1 -1
- package/dist/tools/registry/todo-tools.js +37 -5
- package/dist/tools/registry/todo-tools.js.map +1 -1
- package/dist/tools/registry/tool-registry.js +5 -4
- package/dist/tools/registry/tool-registry.js.map +1 -1
- package/dist/tools/registry/web-tools.d.ts +1 -1
- package/dist/tools/registry/web-tools.js +28 -8
- package/dist/tools/registry/web-tools.js.map +1 -1
- package/dist/tools/text-editor.d.ts +1 -1
- package/dist/tools/text-editor.js +23 -5
- package/dist/tools/text-editor.js.map +1 -1
- package/dist/tools/web-search.d.ts +52 -37
- package/dist/tools/web-search.js +368 -163
- package/dist/tools/web-search.js.map +1 -1
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/errors.js +2 -8
- package/dist/types/errors.js.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.js +1 -2
- package/dist/types/index.js.map +1 -1
- package/dist/ui/components/ChatInterface.d.ts +1 -1
- package/dist/ui/index.d.ts +17 -21
- package/dist/ui/index.js +25 -22
- package/dist/ui/index.js.map +1 -1
- package/dist/utils/config-validation/schema.d.ts +15 -15
- package/dist/utils/head-tail-truncation.d.ts +34 -0
- package/dist/utils/head-tail-truncation.js +98 -0
- package/dist/utils/head-tail-truncation.js.map +1 -0
- package/dist/utils/logger.js +3 -9
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/sanitize.d.ts +5 -0
- package/dist/utils/sanitize.js +19 -0
- package/dist/utils/sanitize.js.map +1 -1
- package/dist/utils/settings-manager.js +4 -4
- package/dist/utils/settings-manager.js.map +1 -1
- package/dist/workflows/index.d.ts +4 -279
- package/dist/workflows/index.js +8 -822
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/state-manager.d.ts +77 -0
- package/dist/workflows/state-manager.js +198 -0
- package/dist/workflows/state-manager.js.map +1 -0
- package/dist/workflows/step-manager.d.ts +39 -0
- package/dist/workflows/step-manager.js +196 -0
- package/dist/workflows/step-manager.js.map +1 -0
- package/dist/workflows/types.d.ts +87 -0
- package/dist/workflows/types.js +5 -0
- package/dist/workflows/types.js.map +1 -0
- package/dist/workflows/workflow-engine.d.ts +34 -0
- package/dist/workflows/workflow-engine.js +354 -0
- package/dist/workflows/workflow-engine.js.map +1 -0
- package/package.json +5 -1
package/dist/fcs/types.d.ts
CHANGED
|
@@ -1,287 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* 100% compatible with FileCommander Enhanced Script language
|
|
2
|
+
* @deprecated Use src/scripting/types.ts instead. This file re-exports for backward compatibility.
|
|
5
3
|
*/
|
|
6
|
-
export
|
|
7
|
-
Number = "Number",
|
|
8
|
-
String = "String",
|
|
9
|
-
Boolean = "Boolean",
|
|
10
|
-
Null = "Null",
|
|
11
|
-
Regex = "Regex",
|
|
12
|
-
Identifier = "Identifier",
|
|
13
|
-
Keyword = "Keyword",
|
|
14
|
-
Plus = "Plus",// +
|
|
15
|
-
Minus = "Minus",// -
|
|
16
|
-
Multiply = "Multiply",// *
|
|
17
|
-
Divide = "Divide",// /
|
|
18
|
-
Modulo = "Modulo",// %
|
|
19
|
-
Power = "Power",// **
|
|
20
|
-
Equal = "Equal",// ==
|
|
21
|
-
NotEqual = "NotEqual",// !=
|
|
22
|
-
Less = "Less",// <
|
|
23
|
-
Greater = "Greater",// >
|
|
24
|
-
LessEqual = "LessEqual",// <=
|
|
25
|
-
GreaterEqual = "GreaterEqual",// >=
|
|
26
|
-
And = "And",// &&
|
|
27
|
-
Or = "Or",// ||
|
|
28
|
-
Not = "Not",// !
|
|
29
|
-
Assign = "Assign",// =
|
|
30
|
-
PlusAssign = "PlusAssign",// +=
|
|
31
|
-
MinusAssign = "MinusAssign",// -=
|
|
32
|
-
MultiplyAssign = "MultiplyAssign",// *=
|
|
33
|
-
DivideAssign = "DivideAssign",// /=
|
|
34
|
-
LeftParen = "LeftParen",// (
|
|
35
|
-
RightParen = "RightParen",// )
|
|
36
|
-
LeftBrace = "LeftBrace",// {
|
|
37
|
-
RightBrace = "RightBrace",// }
|
|
38
|
-
LeftBracket = "LeftBracket",// [
|
|
39
|
-
RightBracket = "RightBracket",// ]
|
|
40
|
-
Semicolon = "Semicolon",// ;
|
|
41
|
-
Comma = "Comma",// ,
|
|
42
|
-
Dot = "Dot",// .
|
|
43
|
-
Colon = "Colon",// :
|
|
44
|
-
Arrow = "Arrow",// =>
|
|
45
|
-
Pipeline = "Pipeline",// |>
|
|
46
|
-
Comment = "Comment",
|
|
47
|
-
Newline = "Newline",
|
|
48
|
-
Indent = "Indent",
|
|
49
|
-
Dedent = "Dedent",
|
|
50
|
-
EOF = "EOF",
|
|
51
|
-
Decorator = "Decorator"
|
|
52
|
-
}
|
|
53
|
-
export interface Token {
|
|
54
|
-
type: TokenType;
|
|
55
|
-
value: string;
|
|
56
|
-
line: number;
|
|
57
|
-
column: number;
|
|
58
|
-
position: number;
|
|
59
|
-
length: number;
|
|
60
|
-
}
|
|
61
|
-
export declare const FCS_KEYWORDS: Set<string>;
|
|
62
|
-
export interface AstNode {
|
|
63
|
-
type: string;
|
|
64
|
-
line?: number;
|
|
65
|
-
column?: number;
|
|
66
|
-
}
|
|
67
|
-
export interface Program extends AstNode {
|
|
68
|
-
type: 'Program';
|
|
69
|
-
statements: AstNode[];
|
|
70
|
-
}
|
|
71
|
-
export interface LiteralExpr extends AstNode {
|
|
72
|
-
type: 'Literal';
|
|
73
|
-
value: unknown;
|
|
74
|
-
tokenType: TokenType;
|
|
75
|
-
}
|
|
76
|
-
export interface IdentifierExpr extends AstNode {
|
|
77
|
-
type: 'Identifier';
|
|
78
|
-
name: string;
|
|
79
|
-
}
|
|
80
|
-
export interface BinaryExpr extends AstNode {
|
|
81
|
-
type: 'Binary';
|
|
82
|
-
left: AstNode;
|
|
83
|
-
operator: TokenType;
|
|
84
|
-
right: AstNode;
|
|
85
|
-
}
|
|
86
|
-
export interface UnaryExpr extends AstNode {
|
|
87
|
-
type: 'Unary';
|
|
88
|
-
operator: TokenType;
|
|
89
|
-
operand: AstNode;
|
|
90
|
-
}
|
|
91
|
-
export interface AssignmentExpr extends AstNode {
|
|
92
|
-
type: 'Assignment';
|
|
93
|
-
target: AstNode;
|
|
94
|
-
operator: TokenType;
|
|
95
|
-
value: AstNode;
|
|
96
|
-
}
|
|
97
|
-
export interface CallExpr extends AstNode {
|
|
98
|
-
type: 'Call';
|
|
99
|
-
callee: AstNode;
|
|
100
|
-
arguments: AstNode[];
|
|
101
|
-
namedArgs?: Record<string, AstNode>;
|
|
102
|
-
}
|
|
103
|
-
export interface MemberExpr extends AstNode {
|
|
104
|
-
type: 'Member';
|
|
105
|
-
object: AstNode;
|
|
106
|
-
member: string;
|
|
107
|
-
computed: boolean;
|
|
108
|
-
}
|
|
109
|
-
export interface IndexExpr extends AstNode {
|
|
110
|
-
type: 'Index';
|
|
111
|
-
object: AstNode;
|
|
112
|
-
index: AstNode;
|
|
113
|
-
}
|
|
114
|
-
export interface ArrayExpr extends AstNode {
|
|
115
|
-
type: 'Array';
|
|
116
|
-
elements: AstNode[];
|
|
117
|
-
}
|
|
118
|
-
export interface DictExpr extends AstNode {
|
|
119
|
-
type: 'Dict';
|
|
120
|
-
elements: Map<string, AstNode>;
|
|
121
|
-
}
|
|
122
|
-
export interface LambdaExpr extends AstNode {
|
|
123
|
-
type: 'Lambda';
|
|
124
|
-
parameters: string[];
|
|
125
|
-
body: AstNode;
|
|
126
|
-
}
|
|
127
|
-
export interface InterpolationExpr extends AstNode {
|
|
128
|
-
type: 'Interpolation';
|
|
129
|
-
parts: AstNode[];
|
|
130
|
-
}
|
|
131
|
-
export interface PipelineExpr extends AstNode {
|
|
132
|
-
type: 'Pipeline';
|
|
133
|
-
left: AstNode;
|
|
134
|
-
right: AstNode;
|
|
135
|
-
}
|
|
136
|
-
export interface TernaryExpr extends AstNode {
|
|
137
|
-
type: 'Ternary';
|
|
138
|
-
condition: AstNode;
|
|
139
|
-
consequent: AstNode;
|
|
140
|
-
alternate: AstNode;
|
|
141
|
-
}
|
|
142
|
-
export interface BlockStmt extends AstNode {
|
|
143
|
-
type: 'Block';
|
|
144
|
-
statements: AstNode[];
|
|
145
|
-
}
|
|
146
|
-
export interface ExpressionStmt extends AstNode {
|
|
147
|
-
type: 'ExpressionStmt';
|
|
148
|
-
expression: AstNode;
|
|
149
|
-
}
|
|
150
|
-
export interface VarDeclaration extends AstNode {
|
|
151
|
-
type: 'VarDeclaration';
|
|
152
|
-
name: string;
|
|
153
|
-
initializer: AstNode | null;
|
|
154
|
-
isConst: boolean;
|
|
155
|
-
varType?: string;
|
|
156
|
-
}
|
|
157
|
-
export interface FunctionDeclaration extends AstNode {
|
|
158
|
-
type: 'FunctionDeclaration';
|
|
159
|
-
name: string;
|
|
160
|
-
parameters: Parameter[];
|
|
161
|
-
body: BlockStmt;
|
|
162
|
-
isAsync: boolean;
|
|
163
|
-
returnType?: string;
|
|
164
|
-
}
|
|
165
|
-
export interface Parameter {
|
|
166
|
-
name: string;
|
|
167
|
-
type?: string;
|
|
168
|
-
defaultValue?: AstNode;
|
|
169
|
-
}
|
|
170
|
-
export interface ClassDeclaration extends AstNode {
|
|
171
|
-
type: 'ClassDeclaration';
|
|
172
|
-
name: string;
|
|
173
|
-
baseClass?: string;
|
|
174
|
-
members: AstNode[];
|
|
175
|
-
}
|
|
176
|
-
export interface IfStmt extends AstNode {
|
|
177
|
-
type: 'If';
|
|
178
|
-
condition: AstNode;
|
|
179
|
-
thenBranch: AstNode;
|
|
180
|
-
elseBranch: AstNode | null;
|
|
181
|
-
}
|
|
182
|
-
export interface WhileStmt extends AstNode {
|
|
183
|
-
type: 'While';
|
|
184
|
-
condition: AstNode;
|
|
185
|
-
body: AstNode;
|
|
186
|
-
}
|
|
187
|
-
export interface ForStmt extends AstNode {
|
|
188
|
-
type: 'For';
|
|
189
|
-
variable: string;
|
|
190
|
-
iterable: AstNode;
|
|
191
|
-
body: AstNode;
|
|
192
|
-
}
|
|
193
|
-
export interface ReturnStmt extends AstNode {
|
|
194
|
-
type: 'Return';
|
|
195
|
-
value: AstNode | null;
|
|
196
|
-
}
|
|
197
|
-
export interface BreakStmt extends AstNode {
|
|
198
|
-
type: 'Break';
|
|
199
|
-
}
|
|
200
|
-
export interface ContinueStmt extends AstNode {
|
|
201
|
-
type: 'Continue';
|
|
202
|
-
}
|
|
203
|
-
export interface TryStmt extends AstNode {
|
|
204
|
-
type: 'Try';
|
|
205
|
-
tryBlock: BlockStmt;
|
|
206
|
-
catchClauses: CatchClause[];
|
|
207
|
-
finallyBlock: BlockStmt | null;
|
|
208
|
-
}
|
|
209
|
-
export interface CatchClause {
|
|
210
|
-
variable?: string;
|
|
211
|
-
type?: string;
|
|
212
|
-
body: BlockStmt;
|
|
213
|
-
}
|
|
214
|
-
export interface ThrowStmt extends AstNode {
|
|
215
|
-
type: 'Throw';
|
|
216
|
-
expression: AstNode;
|
|
217
|
-
}
|
|
218
|
-
export interface ImportStmt extends AstNode {
|
|
219
|
-
type: 'Import';
|
|
220
|
-
module: string;
|
|
221
|
-
names: string[];
|
|
222
|
-
alias?: string;
|
|
223
|
-
}
|
|
224
|
-
export interface TestDeclaration extends AstNode {
|
|
225
|
-
type: 'TestDeclaration';
|
|
226
|
-
name: string;
|
|
227
|
-
body: BlockStmt;
|
|
228
|
-
tags: string[];
|
|
229
|
-
}
|
|
230
|
-
export interface AssertStmt extends AstNode {
|
|
231
|
-
type: 'Assert';
|
|
232
|
-
condition: AstNode;
|
|
233
|
-
message?: string;
|
|
234
|
-
}
|
|
235
|
-
export interface EditorCommand extends AstNode {
|
|
236
|
-
type: 'EditorCommand';
|
|
237
|
-
command: string;
|
|
238
|
-
arguments: AstNode[];
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Primitive types that can be stored in FCS variables
|
|
242
|
-
*/
|
|
243
|
-
export type FCSPrimitive = string | number | boolean | null | undefined;
|
|
244
|
-
/**
|
|
245
|
-
* Function type for the FCS runtime.
|
|
246
|
-
* Note: Uses flexible typing to support dynamic scripting scenarios.
|
|
247
|
-
* Implementations should validate arguments at runtime.
|
|
248
|
-
*/
|
|
249
|
-
export type FCSFunction = (...args: FCSValue[]) => FCSValue | Promise<FCSValue> | any;
|
|
250
|
-
/**
|
|
251
|
-
* Object type for FCS runtime values
|
|
252
|
-
*/
|
|
253
|
-
export type FCSObject = {
|
|
254
|
-
[key: string]: FCSValue;
|
|
255
|
-
};
|
|
256
|
-
/**
|
|
257
|
-
* Array type for FCS runtime values
|
|
258
|
-
*/
|
|
259
|
-
export type FCSArray = FCSValue[];
|
|
260
|
-
/**
|
|
261
|
-
* Dynamic value type for the FCS runtime.
|
|
262
|
-
* Uses a union of known types for better type safety.
|
|
263
|
-
*/
|
|
264
|
-
export type FCSValue = FCSPrimitive | FCSFunction | FCSObject | FCSArray | any;
|
|
265
|
-
export interface FCSContext {
|
|
266
|
-
variables: Map<string, FCSValue>;
|
|
267
|
-
functions: Map<string, FCSFunction>;
|
|
268
|
-
parent?: FCSContext;
|
|
269
|
-
}
|
|
270
|
-
export interface FCSResult {
|
|
271
|
-
success: boolean;
|
|
272
|
-
output: string[];
|
|
273
|
-
error?: string;
|
|
274
|
-
returnValue?: FCSValue;
|
|
275
|
-
duration: number;
|
|
276
|
-
}
|
|
277
|
-
export interface FCSConfig {
|
|
278
|
-
workdir: string;
|
|
279
|
-
timeout: number;
|
|
280
|
-
enableAI: boolean;
|
|
281
|
-
enableBash: boolean;
|
|
282
|
-
enableFileOps: boolean;
|
|
283
|
-
verbose: boolean;
|
|
284
|
-
dryRun: boolean;
|
|
285
|
-
variables?: Record<string, FCSValue>;
|
|
286
|
-
}
|
|
287
|
-
export declare const DEFAULT_FCS_CONFIG: FCSConfig;
|
|
4
|
+
export * from '../scripting/types.js';
|
package/dist/fcs/types.js
CHANGED
|
@@ -1,106 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* 100% compatible with FileCommander Enhanced Script language
|
|
2
|
+
* @deprecated Use src/scripting/types.ts instead. This file re-exports for backward compatibility.
|
|
5
3
|
*/
|
|
6
|
-
|
|
7
|
-
// Token Types (matching FCS exactly)
|
|
8
|
-
// ============================================
|
|
9
|
-
export var TokenType;
|
|
10
|
-
(function (TokenType) {
|
|
11
|
-
// Literals
|
|
12
|
-
TokenType["Number"] = "Number";
|
|
13
|
-
TokenType["String"] = "String";
|
|
14
|
-
TokenType["Boolean"] = "Boolean";
|
|
15
|
-
TokenType["Null"] = "Null";
|
|
16
|
-
TokenType["Regex"] = "Regex";
|
|
17
|
-
// Identifiers and Keywords
|
|
18
|
-
TokenType["Identifier"] = "Identifier";
|
|
19
|
-
TokenType["Keyword"] = "Keyword";
|
|
20
|
-
// Operators
|
|
21
|
-
TokenType["Plus"] = "Plus";
|
|
22
|
-
TokenType["Minus"] = "Minus";
|
|
23
|
-
TokenType["Multiply"] = "Multiply";
|
|
24
|
-
TokenType["Divide"] = "Divide";
|
|
25
|
-
TokenType["Modulo"] = "Modulo";
|
|
26
|
-
TokenType["Power"] = "Power";
|
|
27
|
-
// Comparison
|
|
28
|
-
TokenType["Equal"] = "Equal";
|
|
29
|
-
TokenType["NotEqual"] = "NotEqual";
|
|
30
|
-
TokenType["Less"] = "Less";
|
|
31
|
-
TokenType["Greater"] = "Greater";
|
|
32
|
-
TokenType["LessEqual"] = "LessEqual";
|
|
33
|
-
TokenType["GreaterEqual"] = "GreaterEqual";
|
|
34
|
-
// Logical
|
|
35
|
-
TokenType["And"] = "And";
|
|
36
|
-
TokenType["Or"] = "Or";
|
|
37
|
-
TokenType["Not"] = "Not";
|
|
38
|
-
// Assignment
|
|
39
|
-
TokenType["Assign"] = "Assign";
|
|
40
|
-
TokenType["PlusAssign"] = "PlusAssign";
|
|
41
|
-
TokenType["MinusAssign"] = "MinusAssign";
|
|
42
|
-
TokenType["MultiplyAssign"] = "MultiplyAssign";
|
|
43
|
-
TokenType["DivideAssign"] = "DivideAssign";
|
|
44
|
-
// Delimiters
|
|
45
|
-
TokenType["LeftParen"] = "LeftParen";
|
|
46
|
-
TokenType["RightParen"] = "RightParen";
|
|
47
|
-
TokenType["LeftBrace"] = "LeftBrace";
|
|
48
|
-
TokenType["RightBrace"] = "RightBrace";
|
|
49
|
-
TokenType["LeftBracket"] = "LeftBracket";
|
|
50
|
-
TokenType["RightBracket"] = "RightBracket";
|
|
51
|
-
// Punctuation
|
|
52
|
-
TokenType["Semicolon"] = "Semicolon";
|
|
53
|
-
TokenType["Comma"] = "Comma";
|
|
54
|
-
TokenType["Dot"] = "Dot";
|
|
55
|
-
TokenType["Colon"] = "Colon";
|
|
56
|
-
TokenType["Arrow"] = "Arrow";
|
|
57
|
-
TokenType["Pipeline"] = "Pipeline";
|
|
58
|
-
// Special
|
|
59
|
-
TokenType["Comment"] = "Comment";
|
|
60
|
-
TokenType["Newline"] = "Newline";
|
|
61
|
-
TokenType["Indent"] = "Indent";
|
|
62
|
-
TokenType["Dedent"] = "Dedent";
|
|
63
|
-
TokenType["EOF"] = "EOF";
|
|
64
|
-
// Decorators
|
|
65
|
-
TokenType["Decorator"] = "Decorator";
|
|
66
|
-
})(TokenType || (TokenType = {}));
|
|
67
|
-
// ============================================
|
|
68
|
-
// FCS Keywords (matching FileCommander exactly)
|
|
69
|
-
// ============================================
|
|
70
|
-
export const FCS_KEYWORDS = new Set([
|
|
71
|
-
// Control flow
|
|
72
|
-
'if', 'else', 'elif', 'while', 'for', 'break', 'continue', 'return',
|
|
73
|
-
'switch', 'case', 'default', 'do', 'until',
|
|
74
|
-
// Declarations
|
|
75
|
-
'let', 'const', 'var', 'func', 'function', 'class', 'struct', 'enum', 'namespace',
|
|
76
|
-
// Types
|
|
77
|
-
'int', 'float', 'string', 'bool', 'array', 'dict', 'set', 'any', 'void',
|
|
78
|
-
// Values
|
|
79
|
-
'true', 'false', 'null', 'undefined',
|
|
80
|
-
// Operators
|
|
81
|
-
'in', 'is', 'as', 'typeof', 'sizeof', 'new', 'delete',
|
|
82
|
-
// Exception handling
|
|
83
|
-
'try', 'catch', 'finally', 'throw',
|
|
84
|
-
// Async
|
|
85
|
-
'async', 'await', 'promise',
|
|
86
|
-
// Import/Export
|
|
87
|
-
'import', 'export', 'from',
|
|
88
|
-
// Special
|
|
89
|
-
'with', 'using', 'global', 'local', 'static', 'public', 'private', 'protected',
|
|
90
|
-
// FileCommander specific
|
|
91
|
-
'editor', 'file', 'panel', 'command', 'test', 'assert', 'expect',
|
|
92
|
-
'select', 'cursor', 'view', 'window', 'dialog',
|
|
93
|
-
// Note: 'codebuddy', 'ai', 'bash', 'shell', 'git', 'mcp', 'tool', 'context',
|
|
94
|
-
// 'agent', 'session' are NOT keywords - they are builtin namespace objects
|
|
95
|
-
// and should be tokenized as identifiers
|
|
96
|
-
]);
|
|
97
|
-
export const DEFAULT_FCS_CONFIG = {
|
|
98
|
-
workdir: process.cwd(),
|
|
99
|
-
timeout: 300000,
|
|
100
|
-
enableAI: true,
|
|
101
|
-
enableBash: true,
|
|
102
|
-
enableFileOps: true,
|
|
103
|
-
verbose: false,
|
|
104
|
-
dryRun: false,
|
|
105
|
-
};
|
|
4
|
+
export * from '../scripting/types.js';
|
|
106
5
|
//# sourceMappingURL=types.js.map
|
package/dist/fcs/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/fcs/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/fcs/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,uBAAuB,CAAC"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* - Moltbot hooks (intro, persistence, command logging)
|
|
8
8
|
* - React hooks for input handling
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export { HookManager, getHookManager, type HookEvent, type Hook, } from "./hook-manager.js";
|
|
11
11
|
export { HookSystem, getHookSystem, resetHookSystem, type HookType, } from "./hook-system.js";
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
12
|
+
export { useEnhancedInput, type Key, type EnhancedInputHook, } from "./use-enhanced-input.js";
|
|
13
|
+
export { useInputHandler } from "./use-input-handler.js";
|
|
14
|
+
export { useInputHistory, type InputHistoryHook, } from "./use-input-history.js";
|
|
15
15
|
export { HooksManager, getHooksManager, initializeHooks, BUILTIN_HOOKS, DEFAULT_HOOKS_CONFIG, type HookType as LifecycleHookType, type HookContext, type HookDefinition, type HookResult, type HooksConfig, } from "./lifecycle-hooks.js";
|
|
16
16
|
export { IntroHookManager, SessionPersistenceManager, CommandLogger, MoltbotHooksManager, getMoltbotHooksManager, resetMoltbotHooksManager, DEFAULT_MOLTBOT_CONFIG, DEFAULT_INTRO_HOOK_TEMPLATE, DEFAULT_GLOBAL_INTRO_TEMPLATE, checkMoltbotSetup, setupMoltbotHooks, enableMoltbotHooks, disableMoltbotHooks, getIntroHookContent, setIntroHookContent, formatSetupStatus, type IntroConfig, type IntroSource, type IntroResult, type SessionPersistenceConfig, type PersistedSession, type PersistedMessage, type PersistedToolCall, type CommandLogConfig, type CommandLogEntry, type MoltbotHooksConfig, type MoltbotSetupOptions, type MoltbotSetupResult, } from "./moltbot-hooks.js";
|
package/dist/hooks/index.js
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* - Moltbot hooks (intro, persistence, command logging)
|
|
8
8
|
* - React hooks for input handling
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export { HookManager, getHookManager, } from "./hook-manager.js";
|
|
11
11
|
export { HookSystem, getHookSystem, resetHookSystem, } from "./hook-system.js";
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
12
|
+
export { useEnhancedInput, } from "./use-enhanced-input.js";
|
|
13
|
+
export { useInputHandler } from "./use-input-handler.js";
|
|
14
|
+
export { useInputHistory, } from "./use-input-history.js";
|
|
15
15
|
// Lifecycle hooks (pre/post operation hooks)
|
|
16
16
|
export { HooksManager, getHooksManager, initializeHooks, BUILTIN_HOOKS, DEFAULT_HOOKS_CONFIG, } from "./lifecycle-hooks.js";
|
|
17
17
|
// Moltbot-inspired hooks (intro, persistence, command logging)
|
package/dist/hooks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,WAAW,EACX,cAAc,GAGf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,UAAU,EACV,aAAa,EACb,eAAe,GAEhB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,gBAAgB,GAGjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EACL,eAAe,GAEhB,MAAM,wBAAwB,CAAC;AAEhC,6CAA6C;AAC7C,OAAO,EACL,YAAY,EACZ,eAAe,EACf,eAAe,EACf,aAAa,EACb,oBAAoB,GAMrB,MAAM,sBAAsB,CAAC;AAE9B,+DAA+D;AAC/D,OAAO;AACL,WAAW;AACX,gBAAgB,EAChB,yBAAyB,EACzB,aAAa,EACb,mBAAmB;AACnB,sBAAsB;AACtB,sBAAsB,EACtB,wBAAwB;AACxB,gBAAgB;AAChB,sBAAsB;AACtB,kCAAkC;AAClC,2BAA2B,EAC3B,6BAA6B,EAC7B,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,GAkBlB,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CodeBuddyAgent, ChatEntry } from "../agent/codebuddy-agent.js";
|
|
1
|
+
import type { CodeBuddyAgent, ChatEntry } from "../agent/codebuddy-agent.js";
|
|
2
2
|
import { FileSuggestion } from "../ui/components/FileAutocomplete.js";
|
|
3
3
|
interface UseInputHandlerProps {
|
|
4
4
|
agent: CodeBuddyAgent;
|