arcie 0.1.9 → 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.
@@ -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 }
@@ -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 {
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-N5R3TEEZ.js";
5
5
  import {
6
6
  loadAgent
7
- } from "./chunk-KVSX4MLK.js";
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-TWNCPXBU.js.map
82
+ //# sourceMappingURL=build-GKOF7N76.js.map
@@ -1,6 +1,7 @@
1
1
  import {
2
- loadAgent
3
- } from "./chunk-KVSX4MLK.js";
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-4WSILP75.js.map
1775
+ //# sourceMappingURL=chunk-3R65GQAE.js.map