@hypen-space/gloop-effect 0.1.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/README.md +422 -0
- package/dist/AIProvider.d.ts +43 -0
- package/dist/AIProvider.d.ts.map +1 -0
- package/dist/AIProvider.js +27 -0
- package/dist/AIProvider.js.map +1 -0
- package/dist/Agent.d.ts +91 -0
- package/dist/Agent.d.ts.map +1 -0
- package/dist/Agent.js +378 -0
- package/dist/Agent.js.map +1 -0
- package/dist/Conversation.d.ts +44 -0
- package/dist/Conversation.d.ts.map +1 -0
- package/dist/Conversation.js +124 -0
- package/dist/Conversation.js.map +1 -0
- package/dist/Errors.d.ts +102 -0
- package/dist/Errors.d.ts.map +1 -0
- package/dist/Errors.js +80 -0
- package/dist/Errors.js.map +1 -0
- package/dist/Interpreter.d.ts +62 -0
- package/dist/Interpreter.d.ts.map +1 -0
- package/dist/Interpreter.js +217 -0
- package/dist/Interpreter.js.map +1 -0
- package/dist/Schema.d.ts +188 -0
- package/dist/Schema.d.ts.map +1 -0
- package/dist/Schema.js +135 -0
- package/dist/Schema.js.map +1 -0
- package/dist/Tool.d.ts +70 -0
- package/dist/Tool.d.ts.map +1 -0
- package/dist/Tool.js +138 -0
- package/dist/Tool.js.map +1 -0
- package/dist/defaults/Builtins.d.ts +23 -0
- package/dist/defaults/Builtins.d.ts.map +1 -0
- package/dist/defaults/Builtins.js +38 -0
- package/dist/defaults/Builtins.js.map +1 -0
- package/dist/defaults/FileMemory.d.ts +16 -0
- package/dist/defaults/FileMemory.d.ts.map +1 -0
- package/dist/defaults/FileMemory.js +32 -0
- package/dist/defaults/FileMemory.js.map +1 -0
- package/dist/defaults/OpenRouter.d.ts +20 -0
- package/dist/defaults/OpenRouter.d.ts.map +1 -0
- package/dist/defaults/OpenRouter.js +68 -0
- package/dist/defaults/OpenRouter.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +42 -0
- package/dist/index.js.map +1 -0
- package/package.json +33 -0
package/dist/Errors.d.ts
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gloop-effect/Errors — Tagged errors for the agent runtime.
|
|
3
|
+
*
|
|
4
|
+
* Every failure reason gets its own tag so downstream handlers can branch
|
|
5
|
+
* on `_tag` without parsing messages. HTTP annotations are omitted because
|
|
6
|
+
* this package is transport-agnostic — add them at the RPC layer.
|
|
7
|
+
*/
|
|
8
|
+
import { Schema } from "effect";
|
|
9
|
+
declare const AIProviderError_base: Schema.TaggedErrorClass<AIProviderError, "AIProviderError", {
|
|
10
|
+
readonly _tag: Schema.tag<"AIProviderError">;
|
|
11
|
+
} & {
|
|
12
|
+
message: typeof Schema.String;
|
|
13
|
+
/** Which provider surface failed: "complete" or "stream". */
|
|
14
|
+
op: Schema.optional<Schema.Literal<["complete", "stream"]>>;
|
|
15
|
+
/** Model id at the time of failure, when available. */
|
|
16
|
+
model: Schema.optional<typeof Schema.String>;
|
|
17
|
+
/** Provider name (e.g. "openrouter"). */
|
|
18
|
+
provider: Schema.optional<typeof Schema.String>;
|
|
19
|
+
cause: Schema.optional<typeof Schema.Unknown>;
|
|
20
|
+
}>;
|
|
21
|
+
export declare class AIProviderError extends AIProviderError_base {
|
|
22
|
+
}
|
|
23
|
+
declare const ToolNotFoundError_base: Schema.TaggedErrorClass<ToolNotFoundError, "ToolNotFoundError", {
|
|
24
|
+
readonly _tag: Schema.tag<"ToolNotFoundError">;
|
|
25
|
+
} & {
|
|
26
|
+
name: typeof Schema.String;
|
|
27
|
+
message: typeof Schema.String;
|
|
28
|
+
}>;
|
|
29
|
+
export declare class ToolNotFoundError extends ToolNotFoundError_base {
|
|
30
|
+
}
|
|
31
|
+
declare const ToolExecutionError_base: Schema.TaggedErrorClass<ToolExecutionError, "ToolExecutionError", {
|
|
32
|
+
readonly _tag: Schema.tag<"ToolExecutionError">;
|
|
33
|
+
} & {
|
|
34
|
+
name: typeof Schema.String;
|
|
35
|
+
message: typeof Schema.String;
|
|
36
|
+
cause: Schema.optional<typeof Schema.Unknown>;
|
|
37
|
+
}>;
|
|
38
|
+
export declare class ToolExecutionError extends ToolExecutionError_base {
|
|
39
|
+
}
|
|
40
|
+
declare const ToolPermissionDeniedError_base: Schema.TaggedErrorClass<ToolPermissionDeniedError, "ToolPermissionDeniedError", {
|
|
41
|
+
readonly _tag: Schema.tag<"ToolPermissionDeniedError">;
|
|
42
|
+
} & {
|
|
43
|
+
name: typeof Schema.String;
|
|
44
|
+
reason: typeof Schema.String;
|
|
45
|
+
message: typeof Schema.String;
|
|
46
|
+
}>;
|
|
47
|
+
export declare class ToolPermissionDeniedError extends ToolPermissionDeniedError_base {
|
|
48
|
+
}
|
|
49
|
+
declare const AgentInterruptedError_base: Schema.TaggedErrorClass<AgentInterruptedError, "AgentInterruptedError", {
|
|
50
|
+
readonly _tag: Schema.tag<"AgentInterruptedError">;
|
|
51
|
+
} & {
|
|
52
|
+
message: typeof Schema.String;
|
|
53
|
+
}>;
|
|
54
|
+
export declare class AgentInterruptedError extends AgentInterruptedError_base {
|
|
55
|
+
}
|
|
56
|
+
declare const FatalAgentError_base: Schema.TaggedErrorClass<FatalAgentError, "FatalAgentError", {
|
|
57
|
+
readonly _tag: Schema.tag<"FatalAgentError">;
|
|
58
|
+
} & {
|
|
59
|
+
message: typeof Schema.String;
|
|
60
|
+
/** Where the fatal error originated — informs the host's recovery path. */
|
|
61
|
+
phase: Schema.optional<Schema.Literal<["turn", "tool", "provider", "interpreter", "unknown"]>>;
|
|
62
|
+
cause: Schema.optional<typeof Schema.Unknown>;
|
|
63
|
+
}>;
|
|
64
|
+
export declare class FatalAgentError extends FatalAgentError_base {
|
|
65
|
+
}
|
|
66
|
+
declare const FileIOError_base: Schema.TaggedErrorClass<FileIOError, "FileIOError", {
|
|
67
|
+
readonly _tag: Schema.tag<"FileIOError">;
|
|
68
|
+
} & {
|
|
69
|
+
path: typeof Schema.String;
|
|
70
|
+
op: Schema.Literal<["read", "write", "exists", "delete"]>;
|
|
71
|
+
message: typeof Schema.String;
|
|
72
|
+
cause: Schema.optional<typeof Schema.Unknown>;
|
|
73
|
+
}>;
|
|
74
|
+
export declare class FileIOError extends FileIOError_base {
|
|
75
|
+
}
|
|
76
|
+
declare const ShellExecError_base: Schema.TaggedErrorClass<ShellExecError, "ShellExecError", {
|
|
77
|
+
readonly _tag: Schema.tag<"ShellExecError">;
|
|
78
|
+
} & {
|
|
79
|
+
command: typeof Schema.String;
|
|
80
|
+
exitCode: typeof Schema.Number;
|
|
81
|
+
message: typeof Schema.String;
|
|
82
|
+
stderr: Schema.optional<typeof Schema.String>;
|
|
83
|
+
}>;
|
|
84
|
+
export declare class ShellExecError extends ShellExecError_base {
|
|
85
|
+
}
|
|
86
|
+
declare const MemoryError_base: Schema.TaggedErrorClass<MemoryError, "MemoryError", {
|
|
87
|
+
readonly _tag: Schema.tag<"MemoryError">;
|
|
88
|
+
} & {
|
|
89
|
+
op: Schema.Literal<["remember", "forget", "read"]>;
|
|
90
|
+
message: typeof Schema.String;
|
|
91
|
+
cause: Schema.optional<typeof Schema.Unknown>;
|
|
92
|
+
}>;
|
|
93
|
+
export declare class MemoryError extends MemoryError_base {
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Union of every error the agent can raise. Useful as the error channel
|
|
97
|
+
* bound for `Agent.sendSync` and downstream consumers that want a single
|
|
98
|
+
* `catchTags` branch over all failure modes.
|
|
99
|
+
*/
|
|
100
|
+
export type AgentError = AIProviderError | ToolNotFoundError | ToolExecutionError | ToolPermissionDeniedError | AgentInterruptedError | FatalAgentError | FileIOError | ShellExecError | MemoryError;
|
|
101
|
+
export {};
|
|
102
|
+
//# sourceMappingURL=Errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../src/Errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;;;;;IAU3B,6DAA6D;;IAE7D,uDAAuD;;IAEvD,yCAAyC;;;;AAR7C,qBAAa,eAAgB,SAAQ,oBAYpC;CAAG;;;;;;;AAMJ,qBAAa,iBAAkB,SAAQ,sBAMtC;CAAG;;;;;;;;AAEJ,qBAAa,kBAAmB,SAAQ,uBAOvC;CAAG;;;;;;;;AAEJ,qBAAa,yBAA0B,SAAQ,8BAO9C;CAAG;;;;;;AAMJ,qBAAa,qBAAsB,SAAQ,0BAK1C;CAAG;;;;;IAMA,2EAA2E;;;;AAJ/E,qBAAa,eAAgB,SAAQ,oBAUpC;CAAG;;;;;;;;;AAMJ,qBAAa,WAAY,SAAQ,gBAQhC;CAAG;;;;;;;;;AAEJ,qBAAa,cAAe,SAAQ,mBAQnC;CAAG;;;;;;;;AAEJ,qBAAa,WAAY,SAAQ,gBAOhC;CAAG;AAMJ;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAClB,eAAe,GACf,iBAAiB,GACjB,kBAAkB,GAClB,yBAAyB,GACzB,qBAAqB,GACrB,eAAe,GACf,WAAW,GACX,cAAc,GACd,WAAW,CAAA"}
|
package/dist/Errors.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gloop-effect/Errors — Tagged errors for the agent runtime.
|
|
3
|
+
*
|
|
4
|
+
* Every failure reason gets its own tag so downstream handlers can branch
|
|
5
|
+
* on `_tag` without parsing messages. HTTP annotations are omitted because
|
|
6
|
+
* this package is transport-agnostic — add them at the RPC layer.
|
|
7
|
+
*/
|
|
8
|
+
import { Schema } from "effect";
|
|
9
|
+
// ============================================================================
|
|
10
|
+
// Provider
|
|
11
|
+
// ============================================================================
|
|
12
|
+
export class AIProviderError extends Schema.TaggedError()("AIProviderError", {
|
|
13
|
+
message: Schema.String,
|
|
14
|
+
/** Which provider surface failed: "complete" or "stream". */
|
|
15
|
+
op: Schema.optional(Schema.Literal("complete", "stream")),
|
|
16
|
+
/** Model id at the time of failure, when available. */
|
|
17
|
+
model: Schema.optional(Schema.String),
|
|
18
|
+
/** Provider name (e.g. "openrouter"). */
|
|
19
|
+
provider: Schema.optional(Schema.String),
|
|
20
|
+
cause: Schema.optional(Schema.Unknown),
|
|
21
|
+
}) {
|
|
22
|
+
}
|
|
23
|
+
// ============================================================================
|
|
24
|
+
// Tools
|
|
25
|
+
// ============================================================================
|
|
26
|
+
export class ToolNotFoundError extends Schema.TaggedError()("ToolNotFoundError", {
|
|
27
|
+
name: Schema.String,
|
|
28
|
+
message: Schema.String,
|
|
29
|
+
}) {
|
|
30
|
+
}
|
|
31
|
+
export class ToolExecutionError extends Schema.TaggedError()("ToolExecutionError", {
|
|
32
|
+
name: Schema.String,
|
|
33
|
+
message: Schema.String,
|
|
34
|
+
cause: Schema.optional(Schema.Unknown),
|
|
35
|
+
}) {
|
|
36
|
+
}
|
|
37
|
+
export class ToolPermissionDeniedError extends Schema.TaggedError()("ToolPermissionDeniedError", {
|
|
38
|
+
name: Schema.String,
|
|
39
|
+
reason: Schema.String,
|
|
40
|
+
message: Schema.String,
|
|
41
|
+
}) {
|
|
42
|
+
}
|
|
43
|
+
// ============================================================================
|
|
44
|
+
// Agent lifecycle
|
|
45
|
+
// ============================================================================
|
|
46
|
+
export class AgentInterruptedError extends Schema.TaggedError()("AgentInterruptedError", {
|
|
47
|
+
message: Schema.String,
|
|
48
|
+
}) {
|
|
49
|
+
}
|
|
50
|
+
export class FatalAgentError extends Schema.TaggedError()("FatalAgentError", {
|
|
51
|
+
message: Schema.String,
|
|
52
|
+
/** Where the fatal error originated — informs the host's recovery path. */
|
|
53
|
+
phase: Schema.optional(Schema.Literal("turn", "tool", "provider", "interpreter", "unknown")),
|
|
54
|
+
cause: Schema.optional(Schema.Unknown),
|
|
55
|
+
}) {
|
|
56
|
+
}
|
|
57
|
+
// ============================================================================
|
|
58
|
+
// IO / Memory
|
|
59
|
+
// ============================================================================
|
|
60
|
+
export class FileIOError extends Schema.TaggedError()("FileIOError", {
|
|
61
|
+
path: Schema.String,
|
|
62
|
+
op: Schema.Literal("read", "write", "exists", "delete"),
|
|
63
|
+
message: Schema.String,
|
|
64
|
+
cause: Schema.optional(Schema.Unknown),
|
|
65
|
+
}) {
|
|
66
|
+
}
|
|
67
|
+
export class ShellExecError extends Schema.TaggedError()("ShellExecError", {
|
|
68
|
+
command: Schema.String,
|
|
69
|
+
exitCode: Schema.Number,
|
|
70
|
+
message: Schema.String,
|
|
71
|
+
stderr: Schema.optional(Schema.String),
|
|
72
|
+
}) {
|
|
73
|
+
}
|
|
74
|
+
export class MemoryError extends Schema.TaggedError()("MemoryError", {
|
|
75
|
+
op: Schema.Literal("remember", "forget", "read"),
|
|
76
|
+
message: Schema.String,
|
|
77
|
+
cause: Schema.optional(Schema.Unknown),
|
|
78
|
+
}) {
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=Errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../src/Errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,+EAA+E;AAC/E,WAAW;AACX,+EAA+E;AAE/E,MAAM,OAAO,eAAgB,SAAQ,MAAM,CAAC,WAAW,EAAmB,CACxE,iBAAiB,EACjB;IACE,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,6DAA6D;IAC7D,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IACzD,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACrC,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;CACv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A+E;AAE/E,MAAM,OAAO,WAAY,SAAQ,MAAM,CAAC,WAAW,EAAe,CAChE,aAAa,EACb;IACE,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC;IACvD,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;CACvC,CACF;CAAG;AAEJ,MAAM,OAAO,cAAe,SAAQ,MAAM,CAAC,WAAW,EAAkB,CACtE,gBAAgB,EAChB;IACE,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,QAAQ,EAAE,MAAM,CAAC,MAAM;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;CACvC,CACF;CAAG;AAEJ,MAAM,OAAO,WAAY,SAAQ,MAAM,CAAC,WAAW,EAAe,CAChE,aAAa,EACb;IACE,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC;IAChD,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;CACvC,CACF;CAAG"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gloop-effect/Interpreter — Effect-native Form evaluator.
|
|
3
|
+
*
|
|
4
|
+
* Reuses the pure `Form` ADT from `@hypen-space/gloop-loop` (Think, Invoke,
|
|
5
|
+
* Confirm, Ask, Remember, Forget, Emit, Refresh, Done, Seq, Nil, Install,
|
|
6
|
+
* ListTools, Spawn) and walks it recursively in an `Effect.gen` block.
|
|
7
|
+
*
|
|
8
|
+
* Differences from gloop-loop's async interpreter:
|
|
9
|
+
* - Control-flow aborts use fiber interruption, not a thrown AbortError.
|
|
10
|
+
* - Side-effects are routed through an `AgentHooks` service instead of a
|
|
11
|
+
* plain options bag.
|
|
12
|
+
* - Tool execution honors the Effect error channel, so tool errors can
|
|
13
|
+
* propagate as `ToolExecutionError` when the host wants — or be caught
|
|
14
|
+
* and folded into `ToolResult { success: false }` to continue the turn.
|
|
15
|
+
*/
|
|
16
|
+
import { Context, Effect } from "effect";
|
|
17
|
+
import type { Form, SpawnResult } from "@hypen-space/gloop-loop";
|
|
18
|
+
import { toolCallsToForm, formatResults } from "@hypen-space/gloop-loop";
|
|
19
|
+
import type { LoopConfig as LoopConfigInternal } from "@hypen-space/gloop-loop";
|
|
20
|
+
import type { ConversationHandle } from "./Conversation.js";
|
|
21
|
+
import { AIProvider } from "./AIProvider.js";
|
|
22
|
+
import type { ToolRegistry } from "./Tool.js";
|
|
23
|
+
import type { AgentError } from "./Errors.js";
|
|
24
|
+
export interface AgentHooks {
|
|
25
|
+
readonly streamChunk: (text: string) => Effect.Effect<void>;
|
|
26
|
+
readonly streamDone: Effect.Effect<void>;
|
|
27
|
+
readonly toolStart: (name: string, preview: string) => Effect.Effect<void>;
|
|
28
|
+
readonly toolDone: (name: string, ok: boolean, output: string) => Effect.Effect<void>;
|
|
29
|
+
readonly confirm: (command: string) => Effect.Effect<boolean>;
|
|
30
|
+
readonly ask: (question: string) => Effect.Effect<string>;
|
|
31
|
+
readonly remember: (content: string) => Effect.Effect<void>;
|
|
32
|
+
readonly forget: (content: string) => Effect.Effect<void>;
|
|
33
|
+
readonly refreshSystem: Effect.Effect<void>;
|
|
34
|
+
readonly manageContext: (instructions: string) => Effect.Effect<string>;
|
|
35
|
+
readonly complete: (summary: string) => Effect.Effect<void>;
|
|
36
|
+
readonly installTool: (source: string) => Effect.Effect<string>;
|
|
37
|
+
readonly listTools: Effect.Effect<string>;
|
|
38
|
+
readonly spawn: (task: string) => Effect.Effect<SpawnResult>;
|
|
39
|
+
readonly log: (label: string, content: string) => Effect.Effect<void>;
|
|
40
|
+
}
|
|
41
|
+
declare const AgentHooksTag_base: Context.TagClass<AgentHooksTag, "gloop/AgentHooks", AgentHooks>;
|
|
42
|
+
export declare class AgentHooksTag extends AgentHooksTag_base {
|
|
43
|
+
}
|
|
44
|
+
export interface World {
|
|
45
|
+
readonly convo: ConversationHandle;
|
|
46
|
+
readonly registry: ToolRegistry;
|
|
47
|
+
/** Running count of tool calls this turn — used for auto-prune cadence. */
|
|
48
|
+
toolCalls: number;
|
|
49
|
+
}
|
|
50
|
+
export declare const mkWorld: (convo: ConversationHandle, registry: ToolRegistry) => World;
|
|
51
|
+
export interface LoopConfig {
|
|
52
|
+
readonly classifySpawn?: LoopConfigInternal["classifySpawn"];
|
|
53
|
+
readonly contextPruneInterval?: number;
|
|
54
|
+
readonly skills?: LoopConfigInternal["skills"];
|
|
55
|
+
}
|
|
56
|
+
/** Parse raw user input into a Form (delegates to gloop-loop's pure parser). */
|
|
57
|
+
export declare const parseInput: (input: string, config?: LoopConfig) => Form;
|
|
58
|
+
/** Run raw user input through parseInput + evalForm. */
|
|
59
|
+
export declare const run: (input: string, world: World, config?: LoopConfig) => Effect.Effect<void, AgentError, AgentHooksTag | AIProvider>;
|
|
60
|
+
export declare const evalForm: (form: Form, world: World, config?: LoopConfig) => Effect.Effect<void, AgentError, AgentHooksTag | AIProvider>;
|
|
61
|
+
export { formatResults, toolCallsToForm };
|
|
62
|
+
//# sourceMappingURL=Interpreter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Interpreter.d.ts","sourceRoot":"","sources":["../src/Interpreter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAyB,MAAM,QAAQ,CAAA;AAC/D,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,EAEL,eAAe,EACf,aAAa,EACd,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAA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UAAU,KAAG,IACjC,CAAA;AAE/B,wDAAwD;AACxD,eAAO,MAAM,GAAG,GACd,OAAO,MAAM,EACb,OAAO,KAAK,EACZ,SAAS,UAAU,KAClB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,GAAG,UAAU,CACT,CAAA;AAMpD,eAAO,MAAM,QAAQ,EAAE,CACrB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,MAAM,CAAC,EAAE,UAAU,KAChB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,GAAG,UAAU,CAyD7D,CAAA;AA0RF,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gloop-effect/Interpreter — Effect-native Form evaluator.
|
|
3
|
+
*
|
|
4
|
+
* Reuses the pure `Form` ADT from `@hypen-space/gloop-loop` (Think, Invoke,
|
|
5
|
+
* Confirm, Ask, Remember, Forget, Emit, Refresh, Done, Seq, Nil, Install,
|
|
6
|
+
* ListTools, Spawn) and walks it recursively in an `Effect.gen` block.
|
|
7
|
+
*
|
|
8
|
+
* Differences from gloop-loop's async interpreter:
|
|
9
|
+
* - Control-flow aborts use fiber interruption, not a thrown AbortError.
|
|
10
|
+
* - Side-effects are routed through an `AgentHooks` service instead of a
|
|
11
|
+
* plain options bag.
|
|
12
|
+
* - Tool execution honors the Effect error channel, so tool errors can
|
|
13
|
+
* propagate as `ToolExecutionError` when the host wants — or be caught
|
|
14
|
+
* and folded into `ToolResult { success: false }` to continue the turn.
|
|
15
|
+
*/
|
|
16
|
+
import { Context, Effect, Either, Match, Option } from "effect";
|
|
17
|
+
import { parseInput as loopParseInput, toolCallsToForm, formatResults, } from "@hypen-space/gloop-loop";
|
|
18
|
+
import { AIProvider, consumeStream } from "./AIProvider.js";
|
|
19
|
+
import { jsonToolCallsToToolCalls, legacyBashConfirm } from "./Tool.js";
|
|
20
|
+
export class AgentHooksTag extends Context.Tag("gloop/AgentHooks")() {
|
|
21
|
+
}
|
|
22
|
+
export const mkWorld = (convo, registry) => ({ convo, registry, toolCalls: 0 });
|
|
23
|
+
// ============================================================================
|
|
24
|
+
// Entry points
|
|
25
|
+
// ============================================================================
|
|
26
|
+
/** Parse raw user input into a Form (delegates to gloop-loop's pure parser). */
|
|
27
|
+
export const parseInput = (input, config) => loopParseInput(input, config);
|
|
28
|
+
/** Run raw user input through parseInput + evalForm. */
|
|
29
|
+
export const run = (input, world, config) => evalForm(parseInput(input, config), world, config);
|
|
30
|
+
// ============================================================================
|
|
31
|
+
// Interpreter
|
|
32
|
+
// ============================================================================
|
|
33
|
+
export const evalForm = Effect.fn("Interpreter.evalForm")(function* (form, world, config) {
|
|
34
|
+
yield* Effect.annotateCurrentSpan("form", form.tag);
|
|
35
|
+
const hooks = yield* AgentHooksTag;
|
|
36
|
+
const step = Match.type().pipe(Match.discriminators("tag")({
|
|
37
|
+
nil: () => Effect.void,
|
|
38
|
+
done: (f) => hooks.complete(f.summary),
|
|
39
|
+
emit: (f) => hooks
|
|
40
|
+
.streamChunk(f.text)
|
|
41
|
+
.pipe(Effect.zipRight(hooks.streamDone), Effect.zipRight(evalForm(f.then, world, config))),
|
|
42
|
+
remember: (f) => hooks.remember(f.content).pipe(Effect.zipRight(evalForm(f.then, world, config))),
|
|
43
|
+
forget: (f) => hooks.forget(f.content).pipe(Effect.zipRight(evalForm(f.then, world, config))),
|
|
44
|
+
confirm: (f) => Effect.flatMap(hooks.confirm(f.command), (ok) => evalForm(f.then(ok), world, config)),
|
|
45
|
+
ask: (f) => Effect.flatMap(hooks.ask(f.question), (answer) => evalForm(f.then(answer), world, config)),
|
|
46
|
+
refresh: () => hooks.refreshSystem,
|
|
47
|
+
seq: (f) => Effect.forEach(f.forms, (child) => evalForm(child, world, config), {
|
|
48
|
+
discard: true,
|
|
49
|
+
}),
|
|
50
|
+
think: (f) => evalThink(f.input, world, config),
|
|
51
|
+
invoke: (f) => evalInvoke(f.calls, f.then, world, config),
|
|
52
|
+
install: (f) => Effect.flatMap(hooks.installTool(f.source), (result) => hooks.streamChunk(result).pipe(Effect.zipRight(hooks.streamDone))),
|
|
53
|
+
"list-tools": () => Effect.flatMap(hooks.listTools, (text) => hooks.streamChunk(text).pipe(Effect.zipRight(hooks.streamDone))),
|
|
54
|
+
spawn: (f) => Effect.flatMap(hooks.spawn(f.task), (result) => evalForm(f.then(result), world, config)),
|
|
55
|
+
}), Match.exhaustive);
|
|
56
|
+
yield* step(form);
|
|
57
|
+
});
|
|
58
|
+
// ============================================================================
|
|
59
|
+
// Think — stream LLM response, follow up with any tool calls
|
|
60
|
+
// ============================================================================
|
|
61
|
+
const evalThink = Effect.fn("Interpreter.evalThink")(function* (input, world, config) {
|
|
62
|
+
const hooks = yield* AgentHooksTag;
|
|
63
|
+
yield* hooks.log("LLM_INPUT", input);
|
|
64
|
+
// Refresh tools on the conversation right before the request.
|
|
65
|
+
const jsonTools = yield* world.registry.toJsonTools;
|
|
66
|
+
yield* world.convo.setJsonTools(jsonTools);
|
|
67
|
+
const stream = yield* world.convo.stream(input);
|
|
68
|
+
let fullText = "";
|
|
69
|
+
const response = yield* consumeStream(stream, (chunk) => Effect.sync(() => {
|
|
70
|
+
fullText += chunk;
|
|
71
|
+
}).pipe(Effect.zipRight(hooks.streamChunk(chunk))));
|
|
72
|
+
yield* hooks.streamDone;
|
|
73
|
+
yield* hooks.log("LLM_OUTPUT", fullText);
|
|
74
|
+
const jsonCalls = response.toolCalls ?? [];
|
|
75
|
+
if (jsonCalls.length === 0)
|
|
76
|
+
return;
|
|
77
|
+
const lookup = yield* world.registry.snapshotLookup;
|
|
78
|
+
const toolCalls = jsonToolCallsToToolCalls(jsonCalls, lookup);
|
|
79
|
+
yield* hooks.log("TOOL_CALLS", JSON.stringify(toolCalls));
|
|
80
|
+
const nextForm = toolCallsToForm([...toolCalls], config?.classifySpawn);
|
|
81
|
+
yield* evalForm(nextForm, world, config);
|
|
82
|
+
});
|
|
83
|
+
// ============================================================================
|
|
84
|
+
// Invoke — execute tools (with confirmation), then continue via continuation
|
|
85
|
+
// ============================================================================
|
|
86
|
+
const evalInvoke = Effect.fn("Interpreter.evalInvoke")(function* (calls, then, world, config) {
|
|
87
|
+
yield* Effect.annotateCurrentSpan("toolCount", calls.length);
|
|
88
|
+
const hooks = yield* AgentHooksTag;
|
|
89
|
+
const hasReload = calls.some((c) => c.name === "Reload");
|
|
90
|
+
const results = yield* Effect.forEach(calls, (call) => dispatchCall(call, world, hooks));
|
|
91
|
+
if (hasReload)
|
|
92
|
+
yield* hooks.refreshSystem;
|
|
93
|
+
// Auto-prune cadence — mirrors gloop-loop's behavior.
|
|
94
|
+
const interval = config?.contextPruneInterval ?? 0;
|
|
95
|
+
world.toolCalls += calls.length;
|
|
96
|
+
if (interval > 0 && world.toolCalls >= interval) {
|
|
97
|
+
world.toolCalls = 0;
|
|
98
|
+
yield* hooks.toolStart("ManageContext", `auto-pruning after ${interval} tool calls`);
|
|
99
|
+
const pruneResult = yield* hooks.manageContext("Prune old tool results and intermediate outputs. Keep the current task goal, recent results, and any information the agent is actively using.");
|
|
100
|
+
yield* hooks.toolDone("ManageContext", true, pruneResult);
|
|
101
|
+
}
|
|
102
|
+
yield* evalForm(then(results), world, config);
|
|
103
|
+
});
|
|
104
|
+
// ============================================================================
|
|
105
|
+
// Dispatch a single tool call → ToolResult (never fails the surrounding turn)
|
|
106
|
+
// ============================================================================
|
|
107
|
+
const BUILTIN_TOOLS = new Set(["AskUser", "ManageContext", "Remember", "Forget"]);
|
|
108
|
+
const dispatchCall = Effect.fn("Interpreter.dispatchCall")(function* (call, world, hooks) {
|
|
109
|
+
yield* Effect.annotateCurrentSpan("tool", call.name);
|
|
110
|
+
yield* Effect.annotateCurrentSpan("kind", BUILTIN_TOOLS.has(call.name) ? "builtin" : "registry");
|
|
111
|
+
// Special forms handled inline — they don't live in the registry.
|
|
112
|
+
const builtin = Match.value(call.name).pipe(Match.when("AskUser", () => dispatchBuiltin(call, hooks, {
|
|
113
|
+
previewFrom: (c) => c.args.question ?? "What would you like to do?",
|
|
114
|
+
run: (c) => hooks.ask(c.args.question ?? "What would you like to do?").pipe(Effect.map((answer) => ({
|
|
115
|
+
name: "AskUser",
|
|
116
|
+
output: `User answered: ${answer}`,
|
|
117
|
+
success: true,
|
|
118
|
+
}))),
|
|
119
|
+
doneOutput: "answered",
|
|
120
|
+
})), Match.when("ManageContext", () => dispatchBuiltin(call, hooks, {
|
|
121
|
+
previewFrom: (c) => c.args.instructions ?? "Prune stale messages",
|
|
122
|
+
run: (c) => hooks
|
|
123
|
+
.manageContext(c.args.instructions ?? "Prune stale messages")
|
|
124
|
+
.pipe(Effect.map((out) => ({
|
|
125
|
+
name: "ManageContext",
|
|
126
|
+
output: out,
|
|
127
|
+
success: true,
|
|
128
|
+
}))),
|
|
129
|
+
doneOutputFrom: (r) => r.output,
|
|
130
|
+
})), Match.when("Remember", () => dispatchBuiltin(call, hooks, {
|
|
131
|
+
previewFrom: (c) => c.args.content ?? "",
|
|
132
|
+
run: (c) => {
|
|
133
|
+
const content = c.args.content ?? "";
|
|
134
|
+
return hooks.remember(content).pipe(Effect.as({
|
|
135
|
+
name: "Remember",
|
|
136
|
+
output: `Remembered: ${content}`,
|
|
137
|
+
success: true,
|
|
138
|
+
}));
|
|
139
|
+
},
|
|
140
|
+
doneOutput: "remembered",
|
|
141
|
+
})), Match.when("Forget", () => dispatchBuiltin(call, hooks, {
|
|
142
|
+
previewFrom: (c) => c.args.content ?? "",
|
|
143
|
+
run: (c) => {
|
|
144
|
+
const content = c.args.content ?? "";
|
|
145
|
+
return hooks.forget(content).pipe(Effect.as({
|
|
146
|
+
name: "Forget",
|
|
147
|
+
output: `Forgot: ${content}`,
|
|
148
|
+
success: true,
|
|
149
|
+
}));
|
|
150
|
+
},
|
|
151
|
+
doneOutput: "forgotten",
|
|
152
|
+
})), Match.option);
|
|
153
|
+
if (Option.isSome(builtin)) {
|
|
154
|
+
const result = yield* builtin.value;
|
|
155
|
+
yield* Effect.annotateCurrentSpan("success", result.success);
|
|
156
|
+
return result;
|
|
157
|
+
}
|
|
158
|
+
// Registry lookup
|
|
159
|
+
const maybeTool = yield* world.registry.get(call.name);
|
|
160
|
+
if (Option.isNone(maybeTool)) {
|
|
161
|
+
yield* hooks.toolDone(call.name, false, `Unknown tool: ${call.name}`);
|
|
162
|
+
yield* Effect.annotateCurrentSpan("success", false);
|
|
163
|
+
return {
|
|
164
|
+
name: call.name,
|
|
165
|
+
output: `Unknown tool: ${call.name}`,
|
|
166
|
+
success: false,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
const tool = maybeTool.value;
|
|
170
|
+
// Permission gating — heuristic first, then tool's own askPermission.
|
|
171
|
+
const reason = Option.orElse(legacyBashConfirm(call), () => tool.askPermission ? tool.askPermission(call.args) : Option.none());
|
|
172
|
+
if (Option.isSome(reason)) {
|
|
173
|
+
const ok = yield* hooks.confirm(reason.value);
|
|
174
|
+
if (!ok) {
|
|
175
|
+
yield* hooks.toolDone(call.name, false, "denied by user");
|
|
176
|
+
yield* Effect.annotateCurrentSpan("success", false);
|
|
177
|
+
yield* Effect.annotateCurrentSpan("denied", true);
|
|
178
|
+
return {
|
|
179
|
+
name: call.name,
|
|
180
|
+
output: "User denied execution",
|
|
181
|
+
success: false,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
// Preview = ordered arg values, truncated.
|
|
186
|
+
const preview = Object.values(call.args)
|
|
187
|
+
.map((v) => `"${v.substring(0, 40)}${v.length > 40 ? "..." : ""}"`)
|
|
188
|
+
.join(", ");
|
|
189
|
+
yield* hooks.toolStart(call.name, preview);
|
|
190
|
+
// Convert any tool error into a ToolResult(success: false). Tool errors
|
|
191
|
+
// are *not* turn-fatal — the model can recover.
|
|
192
|
+
const outcome = yield* Effect.either(tool.execute(call.args));
|
|
193
|
+
if (Either.isRight(outcome)) {
|
|
194
|
+
yield* hooks.toolDone(call.name, true, "ok");
|
|
195
|
+
yield* Effect.annotateCurrentSpan("success", true);
|
|
196
|
+
return { name: call.name, output: outcome.right, success: true };
|
|
197
|
+
}
|
|
198
|
+
const msg = renderToolError(outcome.left);
|
|
199
|
+
yield* hooks.toolDone(call.name, false, msg);
|
|
200
|
+
yield* Effect.annotateCurrentSpan("success", false);
|
|
201
|
+
return { name: call.name, output: msg, success: false };
|
|
202
|
+
});
|
|
203
|
+
const dispatchBuiltin = (call, hooks, dispatch) => Effect.gen(function* () {
|
|
204
|
+
const preview = dispatch.previewFrom(call).substring(0, 60);
|
|
205
|
+
yield* hooks.toolStart(call.name, preview);
|
|
206
|
+
const result = yield* dispatch.run(call);
|
|
207
|
+
const doneText = dispatch.doneOutputFrom?.(result) ?? dispatch.doneOutput ?? "ok";
|
|
208
|
+
yield* hooks.toolDone(call.name, result.success, doneText);
|
|
209
|
+
return result;
|
|
210
|
+
});
|
|
211
|
+
// ----------------------------------------------------------------------------
|
|
212
|
+
// Render an AgentError into a string for the model.
|
|
213
|
+
// ----------------------------------------------------------------------------
|
|
214
|
+
const renderToolError = (err) => Match.value(err).pipe(Match.tag("ToolExecutionError", (e) => e.message), Match.tag("ToolNotFoundError", "ToolPermissionDeniedError", "AIProviderError", "AgentInterruptedError", "FatalAgentError", "FileIOError", "ShellExecError", "MemoryError", (e) => e.message), Match.exhaustive);
|
|
215
|
+
// Re-export for consumers composing Forms.
|
|
216
|
+
export { formatResults, toolCallsToForm };
|
|
217
|
+
//# sourceMappingURL=Interpreter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Interpreter.js","sourceRoot":"","sources":["../src/Interpreter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/D,OAAO,EACL,UAAU,IAAI,cAAc,EAC5B,eAA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