arcie 0.1.8 → 0.2.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/dist/_tsup-dts-rollup.d.ts +62 -1
- package/dist/{build-TWNCPXBU.js → build-GKOF7N76.js} +2 -2
- package/dist/{chunk-4WSILP75.js → chunk-3R65GQAE.js} +5 -4
- package/dist/{chunk-4WSILP75.js.map → chunk-3R65GQAE.js.map} +1 -1
- package/dist/{chunk-KVSX4MLK.js → chunk-XZPC3JSU.js} +59 -2
- package/dist/chunk-XZPC3JSU.js.map +1 -0
- package/dist/cli/index.js +7 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/{dev-DCPOO54H.js → dev-XBXOVOVE.js} +299 -113
- package/dist/dev-XBXOVOVE.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/{init-Q2GCMBCJ.js → init-BQK2LLTM.js} +11 -24
- package/dist/init-BQK2LLTM.js.map +1 -0
- package/dist/runner/index.js +2 -2
- package/package.json +1 -1
- package/templates/web-chat/app/api/agents/route.ts +37 -0
- package/templates/web-chat/app/api/chat/route.ts +10 -2
- package/templates/web-chat/components/agent-picker.tsx +102 -0
- package/templates/web-chat/components/chat.tsx +42 -2
- package/templates/web-chat/components/input-bar.tsx +4 -0
- package/dist/chunk-KVSX4MLK.js.map +0 -1
- package/dist/dev-DCPOO54H.js.map +0 -1
- package/dist/init-Q2GCMBCJ.js.map +0 -1
- /package/dist/{build-TWNCPXBU.js.map → build-GKOF7N76.js.map} +0 -0
|
@@ -23,6 +23,13 @@ declare interface AgentConfig {
|
|
|
23
23
|
name?: string;
|
|
24
24
|
description?: string;
|
|
25
25
|
cencori?: CencoriConfig;
|
|
26
|
+
/**
|
|
27
|
+
* Inline instructions. Optional; primary agents fall back to
|
|
28
|
+
* `instructions.md`, inline top-level agents fall back to a default.
|
|
29
|
+
*/
|
|
30
|
+
instructions?: string;
|
|
31
|
+
/** Inline tool map. Primary agents also merge from the sibling `tools/` directory. */
|
|
32
|
+
tools?: Record<string, ToolConfig>;
|
|
26
33
|
}
|
|
27
34
|
export { AgentConfig }
|
|
28
35
|
export { AgentConfig as AgentConfig_alias_1 }
|
|
@@ -130,7 +137,7 @@ declare interface BlockCursorInput {
|
|
|
130
137
|
readonly render?: (text: string) => string;
|
|
131
138
|
}
|
|
132
139
|
|
|
133
|
-
export declare type BlockKind = "user" | "assistant" | "reasoning" | "tool" | "error" | "notice" | "warning" | "result" | "subagent" | "subagent-step" | "subagent-tool" | "agent-header";
|
|
140
|
+
export declare type BlockKind = "user" | "assistant" | "reasoning" | "tool" | "error" | "notice" | "warning" | "result" | "command" | "subagent" | "subagent-step" | "subagent-tool" | "agent-header";
|
|
134
141
|
|
|
135
142
|
export declare type BlockOp = {
|
|
136
143
|
type: "commit";
|
|
@@ -510,6 +517,10 @@ export declare interface DevOptions {
|
|
|
510
517
|
port: string;
|
|
511
518
|
agentDir: string;
|
|
512
519
|
input?: boolean;
|
|
520
|
+
/** Skip auto-starting the channels/web/ dev server even when it exists. */
|
|
521
|
+
noWeb?: boolean;
|
|
522
|
+
/** Skip auto-opening the browser at the web channel URL. */
|
|
523
|
+
noOpen?: boolean;
|
|
513
524
|
}
|
|
514
525
|
|
|
515
526
|
export declare interface Diagnostic {
|
|
@@ -526,6 +537,17 @@ declare function discoverAgent(agentDir: string): DiscoverResult;
|
|
|
526
537
|
export { discoverAgent }
|
|
527
538
|
export { discoverAgent as discoverAgent_alias_1 }
|
|
528
539
|
|
|
540
|
+
/**
|
|
541
|
+
* Discovers every top-level agent under `agentDir`: the primary (`agent.ts`)
|
|
542
|
+
* plus any sibling `.ts` file at the same depth. Directory-based subagents
|
|
543
|
+
* (under `subagents/`) are not included here — those belong to the agent
|
|
544
|
+
* that owns them.
|
|
545
|
+
*/
|
|
546
|
+
export declare function discoverAgents(agentDir: string): Array<{
|
|
547
|
+
id: string;
|
|
548
|
+
filePath: string;
|
|
549
|
+
}>;
|
|
550
|
+
|
|
529
551
|
export declare interface DiscoverDiagnostic {
|
|
530
552
|
code: string;
|
|
531
553
|
message: string;
|
|
@@ -936,11 +958,30 @@ declare function loadAgent(agentDir: string): Promise<LoadedAgent>;
|
|
|
936
958
|
export { loadAgent }
|
|
937
959
|
export { loadAgent as loadAgent_alias_1 }
|
|
938
960
|
|
|
961
|
+
/**
|
|
962
|
+
* Dispatches to `loadAgent` for the primary (`agent`) or `loadInlineAgent`
|
|
963
|
+
* for any additional top-level `.ts` file. Runners and the HTTP server use
|
|
964
|
+
* this so callers don't need to know the discovery mechanics.
|
|
965
|
+
*/
|
|
966
|
+
export declare function loadAgentById(agentDir: string, id: string): Promise<LoadedAgent>;
|
|
967
|
+
|
|
939
968
|
export declare interface LoadedAgent {
|
|
940
969
|
manifest: AgentManifest;
|
|
941
970
|
agentDir: string;
|
|
971
|
+
/** Stable identifier for this agent within the project. `"agent"` for the primary. */
|
|
972
|
+
id: string;
|
|
942
973
|
}
|
|
943
974
|
|
|
975
|
+
/**
|
|
976
|
+
* Loads an inline top-level agent — a single `.ts` file at the root of the
|
|
977
|
+
* agent directory (e.g. `agent/researcher.ts`). Inline agents own their
|
|
978
|
+
* tools + instructions inside the file's `defineAgent({...})` call; sibling
|
|
979
|
+
* `tools/`, `subagents/`, `instructions.md` are not traversed. This is the
|
|
980
|
+
* self-contained path for adding multiple top-level agents without carving
|
|
981
|
+
* out a directory per one.
|
|
982
|
+
*/
|
|
983
|
+
export declare function loadInlineAgent(agentDir: string, id: string): Promise<LoadedAgent>;
|
|
984
|
+
|
|
944
985
|
declare function loadInstructions(agentDir: string): InstructionsConfig | null;
|
|
945
986
|
export { loadInstructions }
|
|
946
987
|
export { loadInstructions as loadInstructions_alias_1 }
|
|
@@ -1211,6 +1252,8 @@ export { POST as POST_alias_1 }
|
|
|
1211
1252
|
|
|
1212
1253
|
export declare function previousGraphemeBoundary(text: string, offset: number): number;
|
|
1213
1254
|
|
|
1255
|
+
export declare const PRIMARY_AGENT_ID = "agent";
|
|
1256
|
+
|
|
1214
1257
|
export declare function printDiagnostics(diagnostics: Diagnostic[]): void;
|
|
1215
1258
|
|
|
1216
1259
|
export declare const PROGRESS_PULSE_ASCII_GLYPH = "*";
|
|
@@ -1430,6 +1473,12 @@ export declare interface RunOptions {
|
|
|
1430
1473
|
threadId?: string;
|
|
1431
1474
|
memoryStore?: MemoryStore;
|
|
1432
1475
|
onEvent?: (event: StreamEvent) => void;
|
|
1476
|
+
/**
|
|
1477
|
+
* Which top-level agent to run. Defaults to `"agent"` (the primary
|
|
1478
|
+
* loaded from `<agentDir>/agent.ts` + siblings). Any other id loads
|
|
1479
|
+
* `<agentDir>/<agentId>.ts` as a self-contained inline agent.
|
|
1480
|
+
*/
|
|
1481
|
+
agentId?: string;
|
|
1433
1482
|
}
|
|
1434
1483
|
|
|
1435
1484
|
export declare interface RunResult {
|
|
@@ -1936,6 +1985,18 @@ export declare class TerminalRenderer {
|
|
|
1936
1985
|
writeNotice(text: string): void;
|
|
1937
1986
|
writeError(title: string, message: string): void;
|
|
1938
1987
|
writeAgentHeader(body: string): void;
|
|
1988
|
+
/**
|
|
1989
|
+
* Echoes a slash-command invocation to scrollback so it chains with the
|
|
1990
|
+
* transcript above (blue `▌ /model`) and the {@link writeCommandResult}
|
|
1991
|
+
* that hangs beneath it can share visual context.
|
|
1992
|
+
*/
|
|
1993
|
+
writeCommandInvocation(text: string, status?: "error"): void;
|
|
1994
|
+
/**
|
|
1995
|
+
* Writes a command outcome hung under the previous invocation with the
|
|
1996
|
+
* elbow connector (`⎿ message`). Multi-line messages soft-wrap under the
|
|
1997
|
+
* elbow.
|
|
1998
|
+
*/
|
|
1999
|
+
writeCommandResult(text: string): void;
|
|
1939
2000
|
readPrompt(): Promise<string | undefined>;
|
|
1940
2001
|
handleKey(key: TerminalKey): void;
|
|
1941
2002
|
stop(): void;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-N5R3TEEZ.js";
|
|
5
5
|
import {
|
|
6
6
|
loadAgent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XZPC3JSU.js";
|
|
8
8
|
import {
|
|
9
9
|
discoverAgent
|
|
10
10
|
} from "./chunk-6XETPLIF.js";
|
|
@@ -79,4 +79,4 @@ async function buildCommand(options) {
|
|
|
79
79
|
export {
|
|
80
80
|
buildCommand
|
|
81
81
|
};
|
|
82
|
-
//# sourceMappingURL=build-
|
|
82
|
+
//# sourceMappingURL=build-GKOF7N76.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
loadAgent
|
|
3
|
-
|
|
2
|
+
loadAgent,
|
|
3
|
+
loadAgentById
|
|
4
|
+
} from "./chunk-XZPC3JSU.js";
|
|
4
5
|
import {
|
|
5
6
|
createMessageAppended,
|
|
6
7
|
createMessageCompleted,
|
|
@@ -1601,7 +1602,7 @@ async function* readTurnSSE(response, turnId) {
|
|
|
1601
1602
|
return { status: "completed", text: textSoFar };
|
|
1602
1603
|
}
|
|
1603
1604
|
async function* streamAgent(agentDir, input, options = {}) {
|
|
1604
|
-
const agent = await loadAgent(agentDir);
|
|
1605
|
+
const agent = options.agentId !== void 0 && options.agentId !== "agent" ? await loadAgentById(agentDir, options.agentId) : await loadAgent(agentDir);
|
|
1605
1606
|
const endpoint = options.endpoint || process.env.CENCORI_API_URL || DEFAULT_ENDPOINT;
|
|
1606
1607
|
const apiKey = options.apiKey || process.env.CENCORI_API_KEY || "";
|
|
1607
1608
|
if (!apiKey) {
|
|
@@ -1771,4 +1772,4 @@ export {
|
|
|
1771
1772
|
runAgent,
|
|
1772
1773
|
streamAgent
|
|
1773
1774
|
};
|
|
1774
|
-
//# sourceMappingURL=chunk-
|
|
1775
|
+
//# sourceMappingURL=chunk-3R65GQAE.js.map
|