arcie 0.1.5 → 0.1.7
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/dist/_tsup-dts-rollup.d.ts +2243 -0
- package/dist/agent/index.d.ts +1 -6
- package/dist/auth/index.d.ts +4 -11
- package/dist/channels/index.d.ts +3 -8
- package/dist/cli/index.d.ts +1 -8
- package/dist/cli/index.js +14 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/context/index.d.ts +9 -14
- package/dist/{dev-ZZDVOWUZ.js → dev-A6KGOSNL.js} +86 -62
- package/dist/dev-A6KGOSNL.js.map +1 -0
- package/dist/discover/index.d.ts +6 -41
- package/dist/hooks/index.d.ts +1 -6
- package/dist/index.d.ts +113 -297
- package/dist/{init-5F7CIVLN.js → init-DNVKDUHX.js} +3 -3
- package/dist/instructions/index.d.ts +2 -7
- package/dist/protocol/events.d.ts +44 -200
- package/dist/runner/index.d.ts +4 -4
- package/dist/schedules/index.d.ts +1 -6
- package/dist/skills/index.d.ts +2 -7
- package/dist/tools/index.d.ts +3 -13
- package/package.json +2 -1
- package/templates/web-chat/app/globals.css +10 -0
- package/templates/web-chat/app/layout.tsx +1 -1
- package/templates/web-chat/app/page.tsx +1 -1
- package/templates/web-chat/components/chat.tsx +179 -156
- package/templates/web-chat/components/input-bar.tsx +146 -39
- package/templates/web-chat/components/message.tsx +90 -30
- package/templates/web-chat/components/tool-call.tsx +8 -8
- package/templates/web-chat/lib/types.ts +1 -0
- package/templates/web-chat/next.config.mjs +3 -1
- package/templates/web-chat/package.json +1 -0
- package/templates/web-chat/tailwind.config.ts +3 -1
- package/dist/dev-ZZDVOWUZ.js.map +0 -1
- package/dist/index-CElLRVTP.d.ts +0 -136
- package/dist/types-DwxwdSa2.d.ts +0 -151
- /package/dist/{init-5F7CIVLN.js.map → init-DNVKDUHX.js.map} +0 -0
package/dist/index-CElLRVTP.d.ts
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { n as TurnContext } from './types-DwxwdSa2.js';
|
|
2
|
-
import { StreamEvent } from './protocol/events.js';
|
|
3
|
-
|
|
4
|
-
interface MemoryEntry {
|
|
5
|
-
role: "user" | "assistant" | "tool" | "system";
|
|
6
|
-
content: string;
|
|
7
|
-
timestamp: number;
|
|
8
|
-
turnId?: string;
|
|
9
|
-
score?: number;
|
|
10
|
-
}
|
|
11
|
-
interface Thread {
|
|
12
|
-
id: string;
|
|
13
|
-
resourceId: string;
|
|
14
|
-
title?: string;
|
|
15
|
-
metadata?: Record<string, unknown>;
|
|
16
|
-
createdAt: number;
|
|
17
|
-
updatedAt: number;
|
|
18
|
-
}
|
|
19
|
-
interface DeleteMessagesOptions {
|
|
20
|
-
threadId: string;
|
|
21
|
-
resourceId: string;
|
|
22
|
-
messageIds?: string[];
|
|
23
|
-
beforeTimestamp?: number;
|
|
24
|
-
afterTimestamp?: number;
|
|
25
|
-
}
|
|
26
|
-
interface MemoryQuery {
|
|
27
|
-
resourceId: string;
|
|
28
|
-
threadId: string;
|
|
29
|
-
query?: string;
|
|
30
|
-
limit?: number;
|
|
31
|
-
}
|
|
32
|
-
interface RecallOptions {
|
|
33
|
-
threadId: string;
|
|
34
|
-
resourceId: string;
|
|
35
|
-
page?: number;
|
|
36
|
-
perPage?: number;
|
|
37
|
-
dateRange?: {
|
|
38
|
-
start?: Date;
|
|
39
|
-
end?: Date;
|
|
40
|
-
};
|
|
41
|
-
include?: Array<{
|
|
42
|
-
id: string;
|
|
43
|
-
withPreviousMessages?: number;
|
|
44
|
-
withNextMessages?: number;
|
|
45
|
-
}>;
|
|
46
|
-
vectorSearchString?: string;
|
|
47
|
-
}
|
|
48
|
-
interface RecallResult {
|
|
49
|
-
messages: MemoryEntry[];
|
|
50
|
-
total: number;
|
|
51
|
-
hasMore: boolean;
|
|
52
|
-
}
|
|
53
|
-
interface MemoryStore {
|
|
54
|
-
save(resourceId: string, threadId: string, entries: MemoryEntry[]): Promise<void>;
|
|
55
|
-
load(resourceId: string, threadId: string, limit?: number): Promise<MemoryEntry[]>;
|
|
56
|
-
clear(resourceId: string, threadId: string): Promise<void>;
|
|
57
|
-
search?(resourceId: string, threadId: string, query: string, limit?: number): Promise<MemoryEntry[]>;
|
|
58
|
-
close?(): Promise<void>;
|
|
59
|
-
createThread?(thread: Thread): Promise<void>;
|
|
60
|
-
getThread?(threadId: string, resourceId: string): Promise<Thread | null>;
|
|
61
|
-
listThreads?(resourceId: string): Promise<Thread[]>;
|
|
62
|
-
updateThread?(thread: Partial<Thread> & {
|
|
63
|
-
id: string;
|
|
64
|
-
resourceId: string;
|
|
65
|
-
}): Promise<void>;
|
|
66
|
-
deleteThread?(threadId: string, resourceId: string): Promise<void>;
|
|
67
|
-
deleteMessages?(opts: DeleteMessagesOptions): Promise<number>;
|
|
68
|
-
cloneThread?(source: {
|
|
69
|
-
threadId: string;
|
|
70
|
-
resourceId: string;
|
|
71
|
-
}, dest: {
|
|
72
|
-
threadId: string;
|
|
73
|
-
resourceId: string;
|
|
74
|
-
}): Promise<void>;
|
|
75
|
-
}
|
|
76
|
-
interface MemoryStrategy {
|
|
77
|
-
getInputContext(store: MemoryStore, resourceId: string, threadId: string): Promise<string>;
|
|
78
|
-
recordTurn(store: MemoryStore, resourceId: string, threadId: string, input: string, output: string, toolCalls?: {
|
|
79
|
-
tool: string;
|
|
80
|
-
input: unknown;
|
|
81
|
-
output: unknown;
|
|
82
|
-
}[]): Promise<void>;
|
|
83
|
-
}
|
|
84
|
-
interface InputProcessor {
|
|
85
|
-
name: string;
|
|
86
|
-
processInput(store: MemoryStore, resourceId: string, threadId: string): Promise<string>;
|
|
87
|
-
}
|
|
88
|
-
interface MemoryProcessor extends InputProcessor {
|
|
89
|
-
processOutput?(store: MemoryStore, resourceId: string, threadId: string, input: string, output: string, toolCalls?: {
|
|
90
|
-
tool: string;
|
|
91
|
-
input: unknown;
|
|
92
|
-
output: unknown;
|
|
93
|
-
}[]): Promise<void>;
|
|
94
|
-
}
|
|
95
|
-
interface Embedder {
|
|
96
|
-
embed(text: string): Promise<number[]>;
|
|
97
|
-
embedBatch(texts: string[]): Promise<number[][]>;
|
|
98
|
-
readonly dimensions: number;
|
|
99
|
-
}
|
|
100
|
-
interface VectorStore {
|
|
101
|
-
upsert(namespace: string, vectors: Array<{
|
|
102
|
-
id: string;
|
|
103
|
-
values: number[];
|
|
104
|
-
metadata?: Record<string, unknown>;
|
|
105
|
-
}>): Promise<void>;
|
|
106
|
-
query(namespace: string, vector: number[], options?: {
|
|
107
|
-
topK?: number;
|
|
108
|
-
filter?: Record<string, unknown>;
|
|
109
|
-
}): Promise<Array<{
|
|
110
|
-
id: string;
|
|
111
|
-
score: number;
|
|
112
|
-
metadata?: Record<string, unknown>;
|
|
113
|
-
}>>;
|
|
114
|
-
delete(namespace: string, ids: string[]): Promise<void>;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
interface RunOptions {
|
|
118
|
-
endpoint?: string;
|
|
119
|
-
apiKey?: string;
|
|
120
|
-
maxTurns?: number;
|
|
121
|
-
sessionId?: string;
|
|
122
|
-
resourceId?: string;
|
|
123
|
-
threadId?: string;
|
|
124
|
-
memoryStore?: MemoryStore;
|
|
125
|
-
onEvent?: (event: StreamEvent) => void;
|
|
126
|
-
}
|
|
127
|
-
interface RunResult {
|
|
128
|
-
output: string;
|
|
129
|
-
turns: TurnContext[];
|
|
130
|
-
events: StreamEvent[];
|
|
131
|
-
sessionId: string;
|
|
132
|
-
}
|
|
133
|
-
declare function runAgent(agentDir: string, input: string, options?: RunOptions): Promise<RunResult>;
|
|
134
|
-
declare function streamAgent(agentDir: string, input: string, options?: RunOptions): AsyncGenerator<StreamEvent, void, unknown>;
|
|
135
|
-
|
|
136
|
-
export { type DeleteMessagesOptions as D, type Embedder as E, type MemoryStore as M, type RecallOptions as R, type Thread as T, type VectorStore as V, type MemoryEntry as a, type MemoryStrategy as b, type MemoryProcessor as c, type RecallResult as d, type MemoryQuery as e, type RunOptions as f, type RunResult as g, runAgent as r, streamAgent as s };
|
package/dist/types-DwxwdSa2.d.ts
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
interface CencoriConfig {
|
|
4
|
-
project?: string;
|
|
5
|
-
apiKey?: string;
|
|
6
|
-
billing?: {
|
|
7
|
-
budget?: string;
|
|
8
|
-
endUserMarkup?: number;
|
|
9
|
-
};
|
|
10
|
-
security?: {
|
|
11
|
-
policy?: "strict" | "standard" | "permissive";
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
interface AgentConfig {
|
|
15
|
-
model: string;
|
|
16
|
-
name?: string;
|
|
17
|
-
description?: string;
|
|
18
|
-
cencori?: CencoriConfig;
|
|
19
|
-
}
|
|
20
|
-
type ApprovalStrategy = "always" | "never" | "once";
|
|
21
|
-
interface ToolConfig<TInput = unknown, TOutput = unknown> {
|
|
22
|
-
name?: string;
|
|
23
|
-
description: string;
|
|
24
|
-
inputSchema?: z.ZodType<TInput>;
|
|
25
|
-
outputSchema?: z.ZodType<TOutput>;
|
|
26
|
-
sandbox?: boolean;
|
|
27
|
-
needsApproval?: ApprovalStrategy;
|
|
28
|
-
execute: (input: TInput) => TOutput | Promise<TOutput>;
|
|
29
|
-
}
|
|
30
|
-
interface InstructionsConfig {
|
|
31
|
-
content: string;
|
|
32
|
-
filePath?: string;
|
|
33
|
-
}
|
|
34
|
-
interface SkillConfig {
|
|
35
|
-
name: string;
|
|
36
|
-
description: string;
|
|
37
|
-
content: string;
|
|
38
|
-
}
|
|
39
|
-
interface HookConfig {
|
|
40
|
-
name: string;
|
|
41
|
-
event: HookEvent;
|
|
42
|
-
handler: (payload: HookPayload) => void | Promise<void>;
|
|
43
|
-
}
|
|
44
|
-
type HookEvent = "beforeTurn" | "afterTurn" | "beforeToolCall" | "afterToolCall" | "onError" | "onStart" | "onEnd";
|
|
45
|
-
interface HookPayload {
|
|
46
|
-
turn?: TurnContext;
|
|
47
|
-
toolCall?: ToolCallContext;
|
|
48
|
-
error?: Error;
|
|
49
|
-
}
|
|
50
|
-
interface TurnContext {
|
|
51
|
-
id: string;
|
|
52
|
-
sessionId?: string;
|
|
53
|
-
input: string;
|
|
54
|
-
output?: string;
|
|
55
|
-
toolCalls?: ToolCallContext[];
|
|
56
|
-
}
|
|
57
|
-
interface ToolCallContext {
|
|
58
|
-
tool: string;
|
|
59
|
-
input: unknown;
|
|
60
|
-
output?: unknown;
|
|
61
|
-
durationMs?: number;
|
|
62
|
-
error?: Error;
|
|
63
|
-
}
|
|
64
|
-
interface ChannelConfig {
|
|
65
|
-
name: string;
|
|
66
|
-
type: "http" | "slack" | "discord" | "custom";
|
|
67
|
-
handler: (request: ChannelRequest) => ChannelResponse | Promise<ChannelResponse>;
|
|
68
|
-
}
|
|
69
|
-
interface ChannelRequest {
|
|
70
|
-
body: unknown;
|
|
71
|
-
headers: Record<string, string>;
|
|
72
|
-
method: string;
|
|
73
|
-
}
|
|
74
|
-
interface ChannelResponse {
|
|
75
|
-
status: number;
|
|
76
|
-
body: unknown;
|
|
77
|
-
}
|
|
78
|
-
interface ConnectionConfig {
|
|
79
|
-
name: string;
|
|
80
|
-
description: string;
|
|
81
|
-
auth: {
|
|
82
|
-
type: "oauth2" | "apiKey" | "basic";
|
|
83
|
-
authorizeUrl?: string;
|
|
84
|
-
tokenUrl?: string;
|
|
85
|
-
clientId?: string;
|
|
86
|
-
scopes?: string[];
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
interface ScheduleConfig {
|
|
90
|
-
name: string;
|
|
91
|
-
cron: string;
|
|
92
|
-
handler: () => void | Promise<void>;
|
|
93
|
-
timezone?: string;
|
|
94
|
-
}
|
|
95
|
-
interface SessionConfig {
|
|
96
|
-
maxTurns?: number;
|
|
97
|
-
idleTimeoutMs?: number;
|
|
98
|
-
requireApproval?: boolean;
|
|
99
|
-
memory?: {
|
|
100
|
-
strategy: "lastN" | "summary" | "keyFacts" | "semantic";
|
|
101
|
-
limit?: number;
|
|
102
|
-
workingMemory?: boolean;
|
|
103
|
-
workingMemoryTemplate?: string;
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
interface PolicyConfig {
|
|
107
|
-
inputGuards?: string[];
|
|
108
|
-
outputGuards?: string[];
|
|
109
|
-
allowedModels?: string[];
|
|
110
|
-
blockedTools?: string[];
|
|
111
|
-
budget?: {
|
|
112
|
-
maxSpendPerSession?: string;
|
|
113
|
-
maxSpendPerDay?: string;
|
|
114
|
-
maxSpendPerMonth?: string;
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* A subagent is a fully self-contained child agent the orchestrator can
|
|
119
|
-
* delegate a focused subtask to. It runs in its own fresh, isolated session —
|
|
120
|
-
* it never inherits the parent's conversation history; the parent passes all
|
|
121
|
-
* needed context in via the delegation `message`.
|
|
122
|
-
*/
|
|
123
|
-
interface SubagentManifest {
|
|
124
|
-
/** The child agent's config. `description` is required (validated at load). */
|
|
125
|
-
config: AgentConfig;
|
|
126
|
-
instructions: string;
|
|
127
|
-
tools: Record<string, ToolConfig>;
|
|
128
|
-
skills: Record<string, SkillConfig>;
|
|
129
|
-
}
|
|
130
|
-
interface AgentManifest {
|
|
131
|
-
config: AgentConfig;
|
|
132
|
-
instructions: string;
|
|
133
|
-
tools: Record<string, ToolConfig>;
|
|
134
|
-
skills: Record<string, SkillConfig>;
|
|
135
|
-
hooks: Record<string, HookConfig>;
|
|
136
|
-
channels: Record<string, ChannelConfig>;
|
|
137
|
-
schedules: Record<string, ScheduleConfig>;
|
|
138
|
-
connections: Record<string, ConnectionConfig>;
|
|
139
|
-
/** Declared specialists under `subagents/<id>/`, keyed by directory name. */
|
|
140
|
-
subagents: Record<string, SubagentManifest>;
|
|
141
|
-
session?: SessionConfig;
|
|
142
|
-
policy?: PolicyConfig;
|
|
143
|
-
}
|
|
144
|
-
interface Session {
|
|
145
|
-
id: string;
|
|
146
|
-
created: Date;
|
|
147
|
-
turns: TurnContext[];
|
|
148
|
-
metadata: Record<string, unknown>;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export type { AgentManifest as A, ConnectionConfig as C, HookConfig as H, InstructionsConfig as I, PolicyConfig as P, SessionConfig as S, ToolConfig as T, AgentConfig as a, ApprovalStrategy as b, CencoriConfig as c, ChannelConfig as d, ChannelRequest as e, ChannelResponse as f, HookEvent as g, HookPayload as h, ScheduleConfig as i, Session as j, SkillConfig as k, SubagentManifest as l, ToolCallContext as m, TurnContext as n };
|
|
File without changes
|