arcie 0.1.3 → 0.1.4

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.
Files changed (114) hide show
  1. package/README.md +34 -6
  2. package/dist/agent/index.d.ts +6 -3
  3. package/dist/agent/index.js +6 -6
  4. package/dist/agent/index.js.map +1 -1
  5. package/dist/auth/index.d.ts +6 -5
  6. package/dist/auth/index.js +8 -17
  7. package/dist/auth/index.js.map +1 -1
  8. package/dist/channels/index.d.ts +8 -5
  9. package/dist/channels/index.js +10 -12
  10. package/dist/channels/index.js.map +1 -1
  11. package/dist/chunk-2ZSKZYWK.js +1901 -0
  12. package/dist/chunk-2ZSKZYWK.js.map +1 -0
  13. package/dist/chunk-3CNQ6HQV.js +12 -0
  14. package/dist/chunk-3CNQ6HQV.js.map +1 -0
  15. package/dist/chunk-4L7WVCTU.js +12 -0
  16. package/dist/chunk-4L7WVCTU.js.map +1 -0
  17. package/dist/chunk-6XETPLIF.js +176 -0
  18. package/dist/chunk-6XETPLIF.js.map +1 -0
  19. package/dist/chunk-CKHBEZCT.js +24 -0
  20. package/dist/chunk-CKHBEZCT.js.map +1 -0
  21. package/dist/chunk-FQ7KDNV5.js +12 -0
  22. package/dist/chunk-FQ7KDNV5.js.map +1 -0
  23. package/dist/chunk-L3BTL5FM.js +39 -0
  24. package/dist/chunk-L3BTL5FM.js.map +1 -0
  25. package/dist/chunk-LQC65UHE.js +34 -0
  26. package/dist/chunk-LQC65UHE.js.map +1 -0
  27. package/dist/chunk-PHTJLJOV.js +25 -0
  28. package/dist/chunk-PHTJLJOV.js.map +1 -0
  29. package/dist/chunk-QE46QFID.js +92 -0
  30. package/dist/chunk-QE46QFID.js.map +1 -0
  31. package/dist/chunk-WAD7VLNI.js +51 -0
  32. package/dist/chunk-WAD7VLNI.js.map +1 -0
  33. package/dist/chunk-ZJNHQXMO.js +20 -0
  34. package/dist/chunk-ZJNHQXMO.js.map +1 -0
  35. package/dist/cli/index.d.ts +0 -2
  36. package/dist/cli/index.js +252 -36
  37. package/dist/cli/index.js.map +1 -1
  38. package/dist/context/index.d.ts +14 -11
  39. package/dist/context/index.js +22 -37
  40. package/dist/context/index.js.map +1 -1
  41. package/dist/discover/index.d.ts +17 -7
  42. package/dist/discover/index.js +6 -132
  43. package/dist/discover/index.js.map +1 -1
  44. package/dist/hooks/index.d.ts +6 -3
  45. package/dist/hooks/index.js +6 -6
  46. package/dist/hooks/index.js.map +1 -1
  47. package/dist/index-b4NcDl3m.d.ts +136 -0
  48. package/dist/index.d.ts +297 -18
  49. package/dist/index.js +158 -13
  50. package/dist/index.js.map +1 -1
  51. package/dist/instructions/index.d.ts +7 -4
  52. package/dist/instructions/index.js +8 -32
  53. package/dist/instructions/index.js.map +1 -1
  54. package/dist/protocol/events.d.ts +47 -39
  55. package/dist/protocol/events.js +46 -45
  56. package/dist/protocol/events.js.map +1 -1
  57. package/dist/runner/index.d.ts +4 -18
  58. package/dist/runner/index.js +10 -277
  59. package/dist/runner/index.js.map +1 -1
  60. package/dist/schedules/index.d.ts +6 -3
  61. package/dist/schedules/index.js +6 -6
  62. package/dist/schedules/index.js.map +1 -1
  63. package/dist/skills/index.d.ts +7 -4
  64. package/dist/skills/index.js +8 -27
  65. package/dist/skills/index.js.map +1 -1
  66. package/dist/tools/index.d.ts +13 -3
  67. package/dist/tools/index.js +8 -9
  68. package/dist/tools/index.js.map +1 -1
  69. package/dist/types-BxOQTzx1.d.ts +151 -0
  70. package/docs/getting-started.md +2 -2
  71. package/docs/index.md +3 -2
  72. package/docs/project-layout.md +2 -2
  73. package/docs/subagents.md +95 -0
  74. package/package.json +15 -10
  75. package/templates/default/agent/agent.ts +2 -2
  76. package/templates/default/package.json +3 -3
  77. package/dist/agent/index.d.ts.map +0 -1
  78. package/dist/auth/index.d.ts.map +0 -1
  79. package/dist/channels/index.d.ts.map +0 -1
  80. package/dist/cli/banner.d.ts +0 -2
  81. package/dist/cli/banner.d.ts.map +0 -1
  82. package/dist/cli/banner.js +0 -10
  83. package/dist/cli/banner.js.map +0 -1
  84. package/dist/cli/build.d.ts +0 -5
  85. package/dist/cli/build.d.ts.map +0 -1
  86. package/dist/cli/build.js +0 -54
  87. package/dist/cli/build.js.map +0 -1
  88. package/dist/cli/dev.d.ts +0 -5
  89. package/dist/cli/dev.d.ts.map +0 -1
  90. package/dist/cli/dev.js +0 -74
  91. package/dist/cli/dev.js.map +0 -1
  92. package/dist/cli/index.d.ts.map +0 -1
  93. package/dist/cli/init.d.ts +0 -4
  94. package/dist/cli/init.d.ts.map +0 -1
  95. package/dist/cli/init.js +0 -75
  96. package/dist/cli/init.js.map +0 -1
  97. package/dist/context/index.d.ts.map +0 -1
  98. package/dist/discover/index.d.ts.map +0 -1
  99. package/dist/hooks/index.d.ts.map +0 -1
  100. package/dist/index.d.ts.map +0 -1
  101. package/dist/instructions/index.d.ts.map +0 -1
  102. package/dist/loader.d.ts +0 -7
  103. package/dist/loader.d.ts.map +0 -1
  104. package/dist/loader.js +0 -102
  105. package/dist/loader.js.map +0 -1
  106. package/dist/protocol/events.d.ts.map +0 -1
  107. package/dist/runner/index.d.ts.map +0 -1
  108. package/dist/schedules/index.d.ts.map +0 -1
  109. package/dist/skills/index.d.ts.map +0 -1
  110. package/dist/tools/index.d.ts.map +0 -1
  111. package/dist/types.d.ts +0 -118
  112. package/dist/types.d.ts.map +0 -1
  113. package/dist/types.js +0 -2
  114. package/dist/types.js.map +0 -1
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # Eline
1
+ # Arcie
2
2
 
3
3
  The electronic line — build agents at the speed of light.
4
4
 
5
- > Site: [cencori.com/eline](https://cencori.com/eline) · Docs: [cencori.com/eline/docs](https://cencori.com/eline/docs)
5
+ > Site: [cencori.com/arcie](https://cencori.com/arcie) · Docs: [cencori.com/arcie/docs](https://cencori.com/arcie/docs)
6
6
 
7
7
  ```
8
- npx eline@latest init my-agent
8
+ npx arcie@latest init my-agent
9
9
  ```
10
10
 
11
11
  ```
@@ -27,7 +27,7 @@ my-agent/
27
27
  ## Quick Start
28
28
 
29
29
  ```bash
30
- npx eline@latest init my-agent
30
+ npx arcie@latest init my-agent
31
31
  cd my-agent
32
32
  npm run dev
33
33
  ```
@@ -36,7 +36,7 @@ npm run dev
36
36
 
37
37
  ```ts
38
38
  // agent/agent.ts
39
- import { defineAgent } from "eline";
39
+ import { defineAgent } from "arcie";
40
40
 
41
41
  export default defineAgent({
42
42
  model: "claude-sonnet-4-5",
@@ -49,7 +49,7 @@ export default defineAgent({
49
49
 
50
50
  ```ts
51
51
  // agent/tools/get_weather.ts
52
- import { defineTool } from "eline/tools";
52
+ import { defineTool } from "arcie/tools";
53
53
  import { z } from "zod";
54
54
 
55
55
  export default defineTool({
@@ -61,6 +61,34 @@ export default defineTool({
61
61
  });
62
62
  ```
63
63
 
64
+ ## Subagents
65
+
66
+ Drop a specialist under `agent/subagents/<id>/` and the orchestrator can delegate
67
+ a focused subtask to it. Each subagent is a full agent with its own instructions
68
+ and tools, and **must declare a `description`** so the model knows when to use it.
69
+
70
+ ```
71
+ agent/subagents/researcher/
72
+ ├── agent.ts # defineAgent({ model, description }) ← description required
73
+ ├── instructions.md # optional
74
+ └── tools/ # optional — the subagent's own tools
75
+ ```
76
+
77
+ ```ts
78
+ // agent/subagents/researcher/agent.ts
79
+ import { defineAgent } from "arcie";
80
+
81
+ export default defineAgent({
82
+ model: "claude-sonnet-4-5",
83
+ description: "Investigate ambiguous questions before the parent agent responds.",
84
+ });
85
+ ```
86
+
87
+ The orchestrator sees each subagent as a tool it can call with a `message` (plus an
88
+ optional `outputSchema` for structured results). Every call runs in a **fresh,
89
+ isolated session** — the subagent never inherits the parent's history, so the main
90
+ agent's context stays lean. See [docs/subagents.md](docs/subagents.md).
91
+
64
92
  ## License
65
93
 
66
94
  MIT
@@ -1,3 +1,6 @@
1
- import type { AgentConfig } from "../types.js";
2
- export declare function defineAgent(config: AgentConfig): AgentConfig;
3
- //# sourceMappingURL=index.d.ts.map
1
+ import { A as AgentConfig } from '../types-BxOQTzx1.js';
2
+ import 'zod';
3
+
4
+ declare function defineAgent(config: AgentConfig): AgentConfig;
5
+
6
+ export { defineAgent };
@@ -1,7 +1,7 @@
1
- export function defineAgent(config) {
2
- if (!config.model) {
3
- throw new Error("Agent must specify a model");
4
- }
5
- return config;
6
- }
1
+ import {
2
+ defineAgent
3
+ } from "../chunk-FQ7KDNV5.js";
4
+ export {
5
+ defineAgent
6
+ };
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,WAAW,CAAC,MAAmB;IAC7C,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,10 +1,11 @@
1
- export type TokenValue = string | (() => string | Promise<string>);
2
- export type OutboundAuthFn = () => Promise<{
1
+ type TokenValue = string | (() => string | Promise<string>);
2
+ type OutboundAuthFn = () => Promise<{
3
3
  readonly headers: Readonly<Record<string, string>>;
4
4
  }>;
5
- export declare function bearer(token: TokenValue): OutboundAuthFn;
6
- export declare function basic(input: {
5
+ declare function bearer(token: TokenValue): OutboundAuthFn;
6
+ declare function basic(input: {
7
7
  username: string;
8
8
  password: TokenValue;
9
9
  }): OutboundAuthFn;
10
- //# sourceMappingURL=index.d.ts.map
10
+
11
+ export { type OutboundAuthFn, type TokenValue, basic, bearer };
@@ -1,18 +1,9 @@
1
- export function bearer(token) {
2
- return async () => ({
3
- headers: {
4
- authorization: `Bearer ${await resolveToken(token)}`,
5
- },
6
- });
7
- }
8
- export function basic(input) {
9
- return async () => ({
10
- headers: {
11
- authorization: `Basic ${btoa(`${input.username}:${await resolveToken(input.password)}`)}`,
12
- },
13
- });
14
- }
15
- async function resolveToken(value) {
16
- return typeof value === "function" ? await value() : value;
17
- }
1
+ import {
2
+ basic,
3
+ bearer
4
+ } from "../chunk-CKHBEZCT.js";
5
+ export {
6
+ basic,
7
+ bearer
8
+ };
18
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,MAAM,CAAC,KAAiB;IACtC,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC;QAClB,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,MAAM,YAAY,CAAC,KAAK,CAAC,EAAE;SACrD;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,KAGrB;IACC,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC;QAClB,OAAO,EAAE;YACP,aAAa,EAAE,SAAS,IAAI,CAAC,GAAG,KAAK,CAAC,QAAQ,IAAI,MAAM,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE;SAC1F;KACF,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,YAAY,CAAC,KAAiB;IAC3C,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AAC7D,CAAC"}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,5 +1,8 @@
1
- import type { ChannelConfig } from "../types.js";
2
- export declare function defineChannel(config: ChannelConfig): ChannelConfig;
3
- export declare function POST(handler: ChannelConfig["handler"]): ChannelConfig["handler"];
4
- export declare function GET(handler: ChannelConfig["handler"]): ChannelConfig["handler"];
5
- //# sourceMappingURL=index.d.ts.map
1
+ import { C as ChannelConfig } from '../types-BxOQTzx1.js';
2
+ import 'zod';
3
+
4
+ declare function defineChannel(config: ChannelConfig): ChannelConfig;
5
+ declare function POST(handler: ChannelConfig["handler"]): ChannelConfig["handler"];
6
+ declare function GET(handler: ChannelConfig["handler"]): ChannelConfig["handler"];
7
+
8
+ export { GET, POST, defineChannel };
@@ -1,13 +1,11 @@
1
- export function defineChannel(config) {
2
- if (!config.name || !config.handler) {
3
- throw new Error("Channel must have name and handler");
4
- }
5
- return config;
6
- }
7
- export function POST(handler) {
8
- return handler;
9
- }
10
- export function GET(handler) {
11
- return handler;
12
- }
1
+ import {
2
+ GET,
3
+ POST,
4
+ defineChannel
5
+ } from "../chunk-ZJNHQXMO.js";
6
+ export {
7
+ GET,
8
+ POST,
9
+ defineChannel
10
+ };
13
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/channels/index.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,aAAa,CAAC,MAAqB;IACjD,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,OAAiC;IACpD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,OAAiC;IACnD,OAAO,OAAO,CAAC;AACjB,CAAC"}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}