experimental-ash 0.24.2 → 0.25.1

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 (258) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/docs/public/typescript-api.md +0 -12
  3. package/dist/src/channel/adapter.d.ts +5 -18
  4. package/dist/src/channel/adapter.js +2 -8
  5. package/dist/src/channel/cross-channel-receive.d.ts +10 -1
  6. package/dist/src/channel/cross-channel-receive.js +21 -3
  7. package/dist/src/channel/routes.d.ts +2 -1
  8. package/dist/src/channel/routes.js +6 -3
  9. package/dist/src/channel/schedule.js +2 -2
  10. package/dist/src/channel/types.d.ts +1 -1
  11. package/dist/src/chunks/{client-DLHAGI2g.js → client-BShLWzR6.js} +3 -3
  12. package/dist/src/chunks/compile-agent-CyP6FrL8.js +5 -0
  13. package/dist/src/chunks/dev-authored-source-watcher-DIWfVUsu.js +1 -0
  14. package/dist/src/chunks/host-BxT35q6K.js +70 -0
  15. package/dist/src/chunks/paths-B2hLA0Fn.js +85 -0
  16. package/dist/src/chunks/{token-D98SQdvs.js → token-BOkIxJeV.js} +1 -1
  17. package/dist/src/chunks/types-CjIyrcYo.js +1 -0
  18. package/dist/src/cli/commands/info.js +1 -1
  19. package/dist/src/cli/dev/environment.d.ts +0 -5
  20. package/dist/src/cli/dev/environment.js +1 -1
  21. package/dist/src/cli/dev/repl.d.ts +1 -1
  22. package/dist/src/cli/dev/repl.js +3 -3
  23. package/dist/src/cli/run.d.ts +0 -1
  24. package/dist/src/cli/run.js +2 -2
  25. package/dist/src/client/index.d.ts +1 -1
  26. package/dist/src/client/message-reducer.js +13 -25
  27. package/dist/src/client/message-response.d.ts +2 -1
  28. package/dist/src/client/open-stream.d.ts +3 -3
  29. package/dist/src/client/open-stream.js +1 -2
  30. package/dist/src/client/session.d.ts +2 -1
  31. package/dist/src/client/session.js +0 -3
  32. package/dist/src/client/types.d.ts +3 -2
  33. package/dist/src/compiler/artifacts.d.ts +7 -10
  34. package/dist/src/compiler/artifacts.js +3 -3
  35. package/dist/src/compiler/manifest.d.ts +6 -15
  36. package/dist/src/compiler/manifest.js +3 -3
  37. package/dist/src/compiler/normalize-agent-config.js +12 -10
  38. package/dist/src/compiler/normalize-manifest.js +3 -2
  39. package/dist/src/context/container.d.ts +1 -16
  40. package/dist/src/context/container.js +1 -24
  41. package/dist/src/context/hook-lifecycle.d.ts +2 -7
  42. package/dist/src/context/hook-lifecycle.js +0 -6
  43. package/dist/src/context/provider.d.ts +1 -11
  44. package/dist/src/context/providers/sandbox.js +4 -1
  45. package/dist/src/context/run-step.d.ts +2 -4
  46. package/dist/src/context/run-step.js +4 -17
  47. package/dist/src/context/seed-keys.d.ts +1 -1
  48. package/dist/src/discover/connections.d.ts +2 -1
  49. package/dist/src/discover/diagnostics.d.ts +0 -8
  50. package/dist/src/discover/diagnostics.js +4 -16
  51. package/dist/src/discover/discover-agent.d.ts +3 -13
  52. package/dist/src/discover/discover-agent.js +1 -11
  53. package/dist/src/discover/discover-subagent.d.ts +3 -2
  54. package/dist/src/discover/discover-subagent.js +1 -1
  55. package/dist/src/discover/filesystem.d.ts +0 -37
  56. package/dist/src/discover/filesystem.js +0 -115
  57. package/dist/src/discover/grammar.d.ts +10 -20
  58. package/dist/src/discover/grammar.js +11 -33
  59. package/dist/src/discover/lib.d.ts +3 -2
  60. package/dist/src/discover/manifest.d.ts +3 -3
  61. package/dist/src/discover/markdown.d.ts +2 -1
  62. package/dist/src/discover/sandbox.d.ts +2 -1
  63. package/dist/src/discover/schedules.d.ts +3 -2
  64. package/dist/src/discover/schedules.js +1 -1
  65. package/dist/src/discover/skills.d.ts +3 -2
  66. package/dist/src/discover/skills.js +1 -1
  67. package/dist/src/discover/slots.d.ts +3 -2
  68. package/dist/src/evals/cli/eval.d.ts +0 -6
  69. package/dist/src/evals/cli/eval.js +1 -1
  70. package/dist/src/evals/loaders/index.d.ts +2 -22
  71. package/dist/src/evals/loaders/index.js +1 -1
  72. package/dist/src/evals/reporters/index.d.ts +2 -14
  73. package/dist/src/evals/reporters/index.js +1 -1
  74. package/dist/src/evals/runner/discover.d.ts +0 -6
  75. package/dist/src/evals/runner/discover.js +1 -1
  76. package/dist/src/evals/runner/execute-case.d.ts +2 -1
  77. package/dist/src/evals/runner/execute-suite.d.ts +2 -1
  78. package/dist/src/evals/runner/reporters/braintrust.js +1 -1
  79. package/dist/src/evals/runner/resolve-git-metadata.d.ts +3 -3
  80. package/dist/src/evals/scorers/autoevals-client.d.ts +2 -2
  81. package/dist/src/execution/await-authorization-orchestrator.d.ts +0 -2
  82. package/dist/src/execution/await-authorization-orchestrator.js +11 -19
  83. package/dist/src/execution/connection-auth-steps.d.ts +1 -5
  84. package/dist/src/execution/connection-auth-steps.js +5 -9
  85. package/dist/src/execution/node-step.d.ts +1 -1
  86. package/dist/src/execution/skills/instructions.d.ts +2 -1
  87. package/dist/src/execution/subagent-hitl-proxy.d.ts +1 -1
  88. package/dist/src/execution/subagent-tool.d.ts +0 -8
  89. package/dist/src/execution/subagent-tool.js +9 -16
  90. package/dist/src/execution/tool-compaction.js +0 -2
  91. package/dist/src/execution/turn-workflow.d.ts +1 -1
  92. package/dist/src/execution/turn-workflow.js +2 -3
  93. package/dist/src/execution/web-fetch/tool.js +1 -1
  94. package/dist/src/execution/workflow-steps.d.ts +15 -1
  95. package/dist/src/execution/workflow-steps.js +8 -18
  96. package/dist/src/harness/action-result-helpers.d.ts +0 -12
  97. package/dist/src/harness/action-result-helpers.js +1 -1
  98. package/dist/src/harness/emission.d.ts +2 -2
  99. package/dist/src/harness/execute-tool.d.ts +2 -1
  100. package/dist/src/harness/input-requests.d.ts +2 -1
  101. package/dist/src/harness/prompt-cache.d.ts +1 -9
  102. package/dist/src/harness/prompt-cache.js +0 -12
  103. package/dist/src/harness/runtime-actions.d.ts +2 -11
  104. package/dist/src/harness/runtime-actions.js +1 -1
  105. package/dist/src/harness/step-hooks.d.ts +3 -2
  106. package/dist/src/harness/step-hooks.js +3 -7
  107. package/dist/src/harness/tool-loop.js +0 -2
  108. package/dist/src/harness/types.d.ts +1 -1
  109. package/dist/src/internal/application/package.js +2 -2
  110. package/dist/src/internal/application/runtime-compiled-artifacts-source.js +0 -1
  111. package/dist/src/internal/attachments/errors.d.ts +8 -2
  112. package/dist/src/internal/attachments/url-refs.d.ts +0 -1
  113. package/dist/src/internal/attachments/url-refs.js +1 -1
  114. package/dist/src/internal/authored-definition/channel.d.ts +0 -5
  115. package/dist/src/internal/authored-definition/channel.js +1 -10
  116. package/dist/src/internal/authored-definition/sandbox.d.ts +2 -1
  117. package/dist/src/internal/authored-definition/schema-backed.d.ts +3 -2
  118. package/dist/src/internal/authored-module-loader.d.ts +0 -6
  119. package/dist/src/internal/authored-module-loader.js +0 -9
  120. package/dist/src/internal/authored-module.d.ts +0 -4
  121. package/dist/src/internal/authored-module.js +0 -10
  122. package/dist/src/internal/bundler/nitro-rolldown.d.ts +2 -10
  123. package/dist/src/internal/bundler/nitro-rolldown.js +1 -1
  124. package/dist/src/{public → internal}/helpers/markdown.d.ts +2 -23
  125. package/dist/src/{public → internal}/helpers/markdown.js +1 -1
  126. package/dist/src/internal/logging.d.ts +2 -8
  127. package/dist/src/internal/nitro/host/build-vercel-agent-summary.d.ts +1 -1
  128. package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
  129. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  130. package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +2 -2
  131. package/dist/src/internal/nitro/routes/channel-dispatch.js +2 -2
  132. package/dist/src/internal/nitro/routes/runtime-artifacts.js +0 -1
  133. package/dist/src/internal/node-esm-compat-banner.d.ts +1 -1
  134. package/dist/src/internal/runtime-registry.d.ts +2 -1
  135. package/dist/src/{protocol → internal}/vercel-agent-summary.d.ts +1 -1
  136. package/dist/src/protocol/message.d.ts +0 -34
  137. package/dist/src/protocol/message.js +0 -30
  138. package/dist/src/public/channels/index.d.ts +1 -1
  139. package/dist/src/public/channels/index.js +1 -1
  140. package/dist/src/public/channels/slack/api.d.ts +1 -7
  141. package/dist/src/public/channels/slack/api.js +1 -1
  142. package/dist/src/public/channels/slack/connections.d.ts +2 -6
  143. package/dist/src/public/channels/slack/hitl.d.ts +3 -2
  144. package/dist/src/public/channels/slack/inbound.d.ts +0 -35
  145. package/dist/src/public/definitions/channel.d.ts +2 -2
  146. package/dist/src/public/definitions/channel.js +1 -1
  147. package/dist/src/public/definitions/defineChannel.d.ts +1 -1
  148. package/dist/src/public/definitions/defineChannel.js +1 -1
  149. package/dist/src/public/definitions/instructions.d.ts +0 -11
  150. package/dist/src/public/definitions/instructions.js +0 -5
  151. package/dist/src/public/definitions/tool.d.ts +3 -7
  152. package/dist/src/public/definitions/tool.js +1 -1
  153. package/dist/src/public/instructions/index.d.ts +1 -5
  154. package/dist/src/public/instructions/index.js +1 -3
  155. package/dist/src/public/tool-result-narrowing.d.ts +2 -1
  156. package/dist/src/react/use-ash-agent.d.ts +2 -1
  157. package/dist/src/react/use-ash-agent.js +1 -5
  158. package/dist/src/runtime/actions/types.d.ts +8 -50
  159. package/dist/src/runtime/actions/types.js +5 -21
  160. package/dist/src/runtime/agent/bootstrap-model-utils.d.ts +2 -1
  161. package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
  162. package/dist/src/runtime/channels/registry.js +3 -8
  163. package/dist/src/runtime/compiled-artifacts-source.d.ts +4 -11
  164. package/dist/src/runtime/compiled-artifacts-source.js +3 -7
  165. package/dist/src/runtime/connections/authorization-tokens.d.ts +1 -14
  166. package/dist/src/runtime/connections/authorization-tokens.js +2 -28
  167. package/dist/src/runtime/connections/principal-context.d.ts +3 -2
  168. package/dist/src/runtime/connections/validate-authorization.d.ts +0 -11
  169. package/dist/src/runtime/connections/validate-authorization.js +0 -16
  170. package/dist/src/runtime/framework-channels/index.d.ts +0 -1
  171. package/dist/src/runtime/framework-channels/index.js +1 -1
  172. package/dist/src/runtime/framework-tools/connection-search.d.ts +0 -46
  173. package/dist/src/runtime/framework-tools/connection-search.js +3 -78
  174. package/dist/src/runtime/framework-tools/connection-tools.d.ts +3 -6
  175. package/dist/src/runtime/framework-tools/connection-tools.js +6 -13
  176. package/dist/src/runtime/framework-tools/index.d.ts +2 -1
  177. package/dist/src/runtime/framework-tools/index.js +2 -1
  178. package/dist/src/runtime/framework-tools/skill.d.ts +0 -13
  179. package/dist/src/runtime/framework-tools/skill.js +1 -1
  180. package/dist/src/runtime/governance/auth/token-claims.d.ts +1 -16
  181. package/dist/src/runtime/governance/auth/token-claims.js +3 -3
  182. package/dist/src/runtime/governance/auth/types.d.ts +0 -4
  183. package/dist/src/runtime/governance/network/ip-allow-list.d.ts +0 -17
  184. package/dist/src/runtime/governance/network/ip-allow-list.js +0 -39
  185. package/dist/src/runtime/hooks/registry.d.ts +7 -4
  186. package/dist/src/runtime/hooks/registry.js +4 -2
  187. package/dist/src/runtime/loaders/bundled-artifacts.d.ts +0 -5
  188. package/dist/src/runtime/loaders/bundled-artifacts.js +0 -7
  189. package/dist/src/runtime/loaders/compile-metadata.d.ts +3 -10
  190. package/dist/src/runtime/loaders/compile-metadata.js +6 -8
  191. package/dist/src/runtime/loaders/manifest.d.ts +2 -2
  192. package/dist/src/runtime/loaders/manifest.js +4 -5
  193. package/dist/src/runtime/loaders/module-map.d.ts +2 -2
  194. package/dist/src/runtime/loaders/module-map.js +3 -4
  195. package/dist/src/runtime/prompt/compose.d.ts +2 -1
  196. package/dist/src/runtime/resolve-agent-graph.d.ts +2 -15
  197. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  198. package/dist/src/runtime/sandbox/keys.d.ts +2 -1
  199. package/dist/src/runtime/sandbox/registry.d.ts +3 -3
  200. package/dist/src/runtime/schedules/resolve-schedule.d.ts +3 -12
  201. package/dist/src/runtime/schedules/resolve-schedule.js +1 -1
  202. package/dist/src/runtime/sessions/auth.d.ts +2 -13
  203. package/dist/src/runtime/sessions/auth.js +1 -11
  204. package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
  205. package/dist/src/runtime/sessions/runtime-session.d.ts +0 -6
  206. package/dist/src/runtime/sessions/runtime-session.js +0 -13
  207. package/dist/src/runtime/sessions/turn.d.ts +2 -2
  208. package/dist/src/runtime/subagents/registry.d.ts +2 -5
  209. package/dist/src/runtime/subagents/registry.js +0 -6
  210. package/dist/src/runtime/tools/registry.d.ts +2 -1
  211. package/dist/src/runtime/tools/registry.js +1 -4
  212. package/dist/src/runtime/types.d.ts +4 -3
  213. package/dist/src/runtime/workspace/seed-files.d.ts +2 -1
  214. package/dist/src/services/dev-client/request-headers.d.ts +37 -8
  215. package/dist/src/services/dev-client/request-headers.js +71 -46
  216. package/dist/src/services/dev-client/stream.d.ts +0 -19
  217. package/dist/src/services/dev-client/stream.js +0 -37
  218. package/dist/src/services/dev-client/url.d.ts +3 -7
  219. package/dist/src/services/dev-client/url.js +4 -10
  220. package/dist/src/services/dev-client.d.ts +0 -12
  221. package/dist/src/services/dev-client.js +6 -92
  222. package/dist/src/shared/agent-definition.d.ts +1 -1
  223. package/dist/src/shared/json.d.ts +0 -4
  224. package/dist/src/shared/json.js +0 -38
  225. package/dist/src/shared/skill-definition.d.ts +0 -2
  226. package/package.json +1 -6
  227. package/dist/src/chunks/dev-authored-source-watcher-CBID_Dwh.js +0 -1
  228. package/dist/src/chunks/host-zBy9FyyX.js +0 -70
  229. package/dist/src/chunks/package-HUaeub_D.js +0 -1
  230. package/dist/src/chunks/paths-CebY5GCi.js +0 -89
  231. package/dist/src/chunks/types-DDA2QUED.js +0 -1
  232. package/dist/src/compiler/resource-files.d.ts +0 -19
  233. package/dist/src/compiler/resource-files.js +0 -28
  234. package/dist/src/execution/subagent-invocation.d.ts +0 -19
  235. package/dist/src/execution/subagent-invocation.js +0 -17
  236. package/dist/src/execution/task-mode.d.ts +0 -9
  237. package/dist/src/execution/task-mode.js +0 -12
  238. package/dist/src/execution/types.d.ts +0 -20
  239. package/dist/src/execution/types.js +0 -1
  240. package/dist/src/internal/logical-paths.d.ts +0 -13
  241. package/dist/src/internal/logical-paths.js +0 -25
  242. package/dist/src/runtime/sessions/messages.d.ts +0 -140
  243. package/dist/src/runtime/sessions/messages.js +0 -170
  244. package/dist/src/runtime/standard-schema.d.ts +0 -27
  245. package/dist/src/runtime/standard-schema.js +0 -64
  246. package/dist/src/services/dev-client/live-stream.d.ts +0 -35
  247. package/dist/src/services/dev-client/live-stream.js +0 -157
  248. package/dist/src/services/dev-client/send-message.d.ts +0 -24
  249. package/dist/src/services/dev-client/send-message.js +0 -185
  250. package/dist/src/services/dev-client/session.d.ts +0 -54
  251. package/dist/src/services/dev-client/session.js +0 -52
  252. package/dist/src/services/host.d.ts +0 -14
  253. package/dist/src/services/host.js +0 -13
  254. /package/dist/src/{package-name.d.ts → internal/package-name.d.ts} +0 -0
  255. /package/dist/src/{package-name.js → internal/package-name.js} +0 -0
  256. /package/dist/src/{protocol → internal}/vercel-agent-summary.js +0 -0
  257. /package/dist/src/{run-mode.d.ts → shared/run-mode.d.ts} +0 -0
  258. /package/dist/src/{run-mode.js → shared/run-mode.js} +0 -0
@@ -19,7 +19,7 @@ export declare const DISCOVER_CONNECTION_FOLDER_EMPTY = "discover/connection-fol
19
19
  /**
20
20
  * Result of discovering authored connection sources from a single agent root.
21
21
  */
22
- export interface DiscoverConnectionSourcesResult {
22
+ interface DiscoverConnectionSourcesResult {
23
23
  connections: ConnectionSourceRef[];
24
24
  diagnostics: DiscoverDiagnostic[];
25
25
  }
@@ -31,3 +31,4 @@ export declare function discoverConnectionSources(input: {
31
31
  rootPath: string;
32
32
  source: ProjectSource;
33
33
  }): Promise<DiscoverConnectionSourcesResult>;
34
+ export {};
@@ -35,10 +35,6 @@ export declare const discoverDiagnosticsSummarySchema: z.ZodObject<{
35
35
  * Root-resolution error code emitted when discovery cannot locate an Ash agent.
36
36
  */
37
37
  export declare const DISCOVER_PROJECT_NOT_FOUND = "discover/project-not-found";
38
- /**
39
- * Creates a structured discovery diagnostic.
40
- */
41
- export declare function createDiscoverDiagnostic(input: DiscoverDiagnostic): DiscoverDiagnostic;
42
38
  /**
43
39
  * Creates an error-level discovery diagnostic.
44
40
  */
@@ -47,10 +43,6 @@ export declare function createDiscoverErrorDiagnostic(input: Omit<DiscoverDiagno
47
43
  * Creates a warning-level discovery diagnostic.
48
44
  */
49
45
  export declare function createDiscoverWarningDiagnostic(input: Omit<DiscoverDiagnostic, "severity">): DiscoverDiagnostic;
50
- /**
51
- * Returns whether an unknown value satisfies the discovery diagnostic shape.
52
- */
53
- export declare function isDiscoverDiagnostic(value: unknown): value is DiscoverDiagnostic;
54
46
  /**
55
47
  * Summarizes discovery diagnostics into error and warning counts.
56
48
  */
@@ -39,35 +39,23 @@ export const discoverDiagnosticsSummarySchema = z
39
39
  * Root-resolution error code emitted when discovery cannot locate an Ash agent.
40
40
  */
41
41
  export const DISCOVER_PROJECT_NOT_FOUND = "discover/project-not-found";
42
- /**
43
- * Creates a structured discovery diagnostic.
44
- */
45
- export function createDiscoverDiagnostic(input) {
46
- return input;
47
- }
48
42
  /**
49
43
  * Creates an error-level discovery diagnostic.
50
44
  */
51
45
  export function createDiscoverErrorDiagnostic(input) {
52
- return createDiscoverDiagnostic({
46
+ return {
53
47
  ...input,
54
48
  severity: "error",
55
- });
49
+ };
56
50
  }
57
51
  /**
58
52
  * Creates a warning-level discovery diagnostic.
59
53
  */
60
54
  export function createDiscoverWarningDiagnostic(input) {
61
- return createDiscoverDiagnostic({
55
+ return {
62
56
  ...input,
63
57
  severity: "warning",
64
- });
65
- }
66
- /**
67
- * Returns whether an unknown value satisfies the discovery diagnostic shape.
68
- */
69
- export function isDiscoverDiagnostic(value) {
70
- return discoverDiagnosticSchema.safeParse(value).success;
58
+ };
71
59
  }
72
60
  /**
73
61
  * Summarizes discovery diagnostics into error and warning counts.
@@ -1,21 +1,10 @@
1
1
  import type { DiscoverDiagnostic } from "#discover/diagnostics.js";
2
- import { DISCOVER_CHANNEL_NAME_INVALID, DISCOVER_HOOK_NAME_INVALID, DISCOVER_DEPRECATED_SYSTEM_SLOT, DISCOVER_MODULE_SLOT_COLLISION, DISCOVER_REQUIRED_INSTRUCTIONS_MISSING, DISCOVER_SANDBOX_NAME_INVALID, DISCOVER_SANDBOX_DIRECTORY_INVALID, DISCOVER_SLOT_COLLISION, DISCOVER_TOOL_NAME_INVALID, DISCOVER_TOOLS_DIRECTORY_INVALID, DISCOVER_UNSUPPORTED_DIRECTORY } from "#discover/grammar.js";
3
2
  import { type AgentSourceManifest } from "#discover/manifest.js";
4
3
  import { type ProjectSource } from "#discover/project-source.js";
5
- export { DISCOVER_CONNECTION_FILE_FOLDER_COLLISION, DISCOVER_CONNECTION_FOLDER_EMPTY, DISCOVER_CONNECTIONS_DIRECTORY_INVALID, } from "#discover/connections.js";
6
- export { DISCOVER_SANDBOX_FOLDER_EMPTY, DISCOVER_SANDBOX_WORKSPACE_SKILLS_RESERVED, } from "#discover/sandbox.js";
7
- /**
8
- * Diagnostics emitted while discovering the non-skill core authored agent
9
- * grammar.
10
- */
11
- export { DISCOVER_CHANNEL_NAME_INVALID, DISCOVER_DEPRECATED_SYSTEM_SLOT, DISCOVER_HOOK_NAME_INVALID, DISCOVER_MODULE_SLOT_COLLISION, DISCOVER_REQUIRED_INSTRUCTIONS_MISSING, DISCOVER_SANDBOX_NAME_INVALID, DISCOVER_SANDBOX_DIRECTORY_INVALID, DISCOVER_SLOT_COLLISION, DISCOVER_TOOL_NAME_INVALID, DISCOVER_TOOLS_DIRECTORY_INVALID, DISCOVER_UNSUPPORTED_DIRECTORY, };
12
- export declare const DISCOVER_CHANNELS_DIRECTORY_INVALID = "discover/channels-directory-invalid";
13
- export declare const DISCOVER_HOOKS_DIRECTORY_INVALID = "discover/hooks-directory-invalid";
14
- export { DISCOVER_SCHEDULE_FILE_UNSUPPORTED, DISCOVER_SCHEDULES_DIRECTORY_INVALID, } from "#discover/schedules.js";
15
4
  /**
16
5
  * Input for discovering the authored agent source graph from resolved roots.
17
6
  */
18
- export interface DiscoverAgentInput {
7
+ interface DiscoverAgentInput {
19
8
  agentRoot: string;
20
9
  appRoot: string;
21
10
  /**
@@ -29,7 +18,7 @@ export interface DiscoverAgentInput {
29
18
  /**
30
19
  * Result of discovering one authored agent source graph.
31
20
  */
32
- export interface DiscoverAgentResult {
21
+ interface DiscoverAgentResult {
33
22
  diagnostics: DiscoverDiagnostic[];
34
23
  manifest: AgentSourceManifest;
35
24
  }
@@ -38,3 +27,4 @@ export interface DiscoverAgentResult {
38
27
  * modules.
39
28
  */
40
29
  export declare function discoverAgent(input: DiscoverAgentInput): Promise<DiscoverAgentResult>;
30
+ export {};
@@ -2,23 +2,13 @@ import { join, resolve } from "node:path";
2
2
  import { discoverConnectionSources } from "#discover/connections.js";
3
3
  import { discoverSubagents } from "#discover/discover-subagent.js";
4
4
  import { classifyAgentRootEntry } from "#discover/filesystem.js";
5
- import { createChannelNameDiagnostic, createHookNameDiagnostic, createToolNameDiagnostic, createUnsupportedRootDirectoryDiagnostics, DISCOVER_CHANNEL_NAME_INVALID, DISCOVER_HOOK_NAME_INVALID, DISCOVER_DEPRECATED_SYSTEM_SLOT, DISCOVER_MODULE_SLOT_COLLISION, DISCOVER_REQUIRED_INSTRUCTIONS_MISSING, DISCOVER_SANDBOX_NAME_INVALID, DISCOVER_SANDBOX_DIRECTORY_INVALID, DISCOVER_SLOT_COLLISION, DISCOVER_TOOL_NAME_INVALID, DISCOVER_TOOLS_DIRECTORY_INVALID, DISCOVER_UNSUPPORTED_DIRECTORY, discoverFlatModuleSource, discoverInstructionsSource, discoverNamedSourceDirectory, readSortedDirectoryEntries, } from "#discover/grammar.js";
5
+ import { createChannelNameDiagnostic, createHookNameDiagnostic, createToolNameDiagnostic, createUnsupportedRootDirectoryDiagnostics, DISCOVER_CHANNELS_DIRECTORY_INVALID, DISCOVER_HOOKS_DIRECTORY_INVALID, DISCOVER_TOOLS_DIRECTORY_INVALID, discoverFlatModuleSource, discoverInstructionsSource, discoverNamedSourceDirectory, readSortedDirectoryEntries, } from "#discover/grammar.js";
6
6
  import { discoverLibSources } from "#discover/lib.js";
7
7
  import { createAgentSourceManifest, } from "#discover/manifest.js";
8
8
  import { createDiskProjectSource } from "#discover/project-source.js";
9
9
  import { discoverSandboxSource } from "#discover/sandbox.js";
10
10
  import { discoverScheduleSources } from "#discover/schedules.js";
11
11
  import { discoverSkills } from "#discover/skills.js";
12
- export { DISCOVER_CONNECTION_FILE_FOLDER_COLLISION, DISCOVER_CONNECTION_FOLDER_EMPTY, DISCOVER_CONNECTIONS_DIRECTORY_INVALID, } from "#discover/connections.js";
13
- export { DISCOVER_SANDBOX_FOLDER_EMPTY, DISCOVER_SANDBOX_WORKSPACE_SKILLS_RESERVED, } from "#discover/sandbox.js";
14
- /**
15
- * Diagnostics emitted while discovering the non-skill core authored agent
16
- * grammar.
17
- */
18
- export { DISCOVER_CHANNEL_NAME_INVALID, DISCOVER_DEPRECATED_SYSTEM_SLOT, DISCOVER_HOOK_NAME_INVALID, DISCOVER_MODULE_SLOT_COLLISION, DISCOVER_REQUIRED_INSTRUCTIONS_MISSING, DISCOVER_SANDBOX_NAME_INVALID, DISCOVER_SANDBOX_DIRECTORY_INVALID, DISCOVER_SLOT_COLLISION, DISCOVER_TOOL_NAME_INVALID, DISCOVER_TOOLS_DIRECTORY_INVALID, DISCOVER_UNSUPPORTED_DIRECTORY, };
19
- export const DISCOVER_CHANNELS_DIRECTORY_INVALID = "discover/channels-directory-invalid";
20
- export const DISCOVER_HOOKS_DIRECTORY_INVALID = "discover/hooks-directory-invalid";
21
- export { DISCOVER_SCHEDULE_FILE_UNSUPPORTED, DISCOVER_SCHEDULES_DIRECTORY_INVALID, } from "#discover/schedules.js";
22
12
  /**
23
13
  * Discovers the current agent's authored source graph without importing authored
24
14
  * modules.
@@ -10,7 +10,7 @@ export declare const DISCOVER_SUBAGENTS_DIRECTORY_INVALID = "discover/subagents-
10
10
  /**
11
11
  * Input for discovering subagent entries beneath one authored source root.
12
12
  */
13
- export interface DiscoverSubagentsInput {
13
+ interface DiscoverSubagentsInput {
14
14
  agentRoot: string;
15
15
  appRoot: string;
16
16
  /**
@@ -24,7 +24,7 @@ export interface DiscoverSubagentsInput {
24
24
  /**
25
25
  * Result of discovering local subagent packages.
26
26
  */
27
- export interface DiscoverSubagentsResult {
27
+ interface DiscoverSubagentsResult {
28
28
  diagnostics: DiscoverDiagnostic[];
29
29
  subagents: SubagentSourceRef[];
30
30
  }
@@ -33,3 +33,4 @@ export interface DiscoverSubagentsResult {
33
33
  * modules.
34
34
  */
35
35
  export declare function discoverSubagents(input: DiscoverSubagentsInput): Promise<DiscoverSubagentsResult>;
36
+ export {};
@@ -3,7 +3,7 @@ import { discoverConnectionSources } from "#discover/connections.js";
3
3
  import { createDiscoverErrorDiagnostic } from "#discover/diagnostics.js";
4
4
  import { classifyLocalSubagentEntry, getDirectoryEntryType, getSupportedModuleBaseName, normalizeLogicalPath, } from "#discover/filesystem.js";
5
5
  import { createHookNameDiagnostic, createToolNameDiagnostic, createUnsupportedRootDirectoryDiagnostics, DISCOVER_TOOLS_DIRECTORY_INVALID, discoverFlatModuleSource, discoverInstructionsSource, discoverNamedSourceDirectory, readSortedDirectoryEntries, } from "#discover/grammar.js";
6
- import { DISCOVER_HOOKS_DIRECTORY_INVALID } from "#discover/discover-agent.js";
6
+ import { DISCOVER_HOOKS_DIRECTORY_INVALID } from "#discover/grammar.js";
7
7
  import { discoverLibSources } from "#discover/lib.js";
8
8
  import { createAgentSourceManifest, createLocalSubagentSourceRef, createModuleSourceRef, } from "#discover/manifest.js";
9
9
  import { createDiskProjectSource, } from "#discover/project-source.js";
@@ -8,31 +8,6 @@ export declare const SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS: readonly [".cts"
8
8
  * with a top-level `agent/` directory.
9
9
  */
10
10
  export declare const PROJECT_MARKER_FILE_NAMES: readonly ["package.json", "vercel.json"];
11
- /**
12
- * Supported root-level files inside an agent package.
13
- */
14
- export declare const AGENT_ROOT_FILE_NAMES: readonly ["agent.ts", "agent.cts", "agent.mts", "agent.js", "agent.cjs", "agent.mjs", "instructions.md", "instructions.ts", "instructions.cts", "instructions.mts", "instructions.js", "instructions.cjs", "instructions.mjs", "system.md", "system.ts", "system.cts", "system.mts", "system.js", "system.cjs", "system.mjs"];
15
- /**
16
- * Supported root-level directories inside an agent package.
17
- */
18
- export declare const AGENT_ROOT_DIRECTORY_NAMES: readonly ["channels", "connections", "hooks", "lib", "sandbox", "skills", "tools", "schedules", "subagents"];
19
- /**
20
- * Supported local-subagent entry file names. Subagents reuse the root
21
- * agent's `agent.{ts,...}` config slot.
22
- */
23
- export declare const LOCAL_SUBAGENT_FILE_NAMES: readonly ["agent.ts", "agent.cts", "agent.mts", "agent.js", "agent.cjs", "agent.mjs", "instructions.md", "instructions.ts", "instructions.cts", "instructions.mts", "instructions.js", "instructions.cjs", "instructions.mjs", "system.md", "system.ts", "system.cts", "system.mts", "system.js", "system.cjs", "system.mjs"];
24
- /**
25
- * Supported local-subagent subdirectories.
26
- */
27
- export declare const LOCAL_SUBAGENT_DIRECTORY_NAMES: readonly ["hooks", "lib", "sandbox", "skills", "tools", "subagents"];
28
- /**
29
- * Supported Agent Skills package entries.
30
- */
31
- export declare const SKILL_PACKAGE_FILE_NAMES: readonly ["SKILL.md"];
32
- /**
33
- * Optional Agent Skills package subdirectories.
34
- */
35
- export declare const SKILL_PACKAGE_DIRECTORY_NAMES: readonly ["scripts", "references", "assets"];
36
11
  /**
37
12
  * Filesystem entry type used by discovery classifiers.
38
13
  */
@@ -77,18 +52,6 @@ export declare function classifySkillPackageEntry(name: string, entryType: Direc
77
52
  * Classifies one top-level entry inside the authored `skills/` directory.
78
53
  */
79
54
  export declare function classifySkillsDirectoryEntry(name: string, entryType: DirectoryEntryType): SkillsDirectoryEntryKind;
80
- /**
81
- * Returns whether a directory entry is a supported root-level agent entry.
82
- */
83
- export declare function isAgentRootEntry(name: string, entryType: DirectoryEntryType): boolean;
84
- /**
85
- * Returns whether a directory entry is a supported local-subagent root entry.
86
- */
87
- export declare function isLocalSubagentEntry(name: string, entryType: DirectoryEntryType): boolean;
88
- /**
89
- * Returns whether a directory entry is a recognized Agent Skills package entry.
90
- */
91
- export declare function isSkillPackageEntry(name: string, entryType: DirectoryEntryType): boolean;
92
55
  /**
93
56
  * Normalizes an agent-root-relative logical path to forward slashes.
94
57
  */
@@ -15,101 +15,7 @@ export const SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS = [
15
15
  * with a top-level `agent/` directory.
16
16
  */
17
17
  export const PROJECT_MARKER_FILE_NAMES = ["package.json", "vercel.json"];
18
- /**
19
- * Supported root-level files inside an agent package.
20
- */
21
- export const AGENT_ROOT_FILE_NAMES = [
22
- "agent.ts",
23
- "agent.cts",
24
- "agent.mts",
25
- "agent.js",
26
- "agent.cjs",
27
- "agent.mjs",
28
- "instructions.md",
29
- "instructions.ts",
30
- "instructions.cts",
31
- "instructions.mts",
32
- "instructions.js",
33
- "instructions.cjs",
34
- "instructions.mjs",
35
- // The `system` files are deprecated and will be removed soon.
36
- // TODO: Clean up in the near future.
37
- "system.md",
38
- "system.ts",
39
- "system.cts",
40
- "system.mts",
41
- "system.js",
42
- "system.cjs",
43
- "system.mjs",
44
- ];
45
- /**
46
- * Supported root-level directories inside an agent package.
47
- */
48
- export const AGENT_ROOT_DIRECTORY_NAMES = [
49
- "channels",
50
- "connections",
51
- "hooks",
52
- "lib",
53
- "sandbox",
54
- "skills",
55
- "tools",
56
- "schedules",
57
- "subagents",
58
- ];
59
- /**
60
- * Supported local-subagent entry file names. Subagents reuse the root
61
- * agent's `agent.{ts,...}` config slot.
62
- */
63
- export const LOCAL_SUBAGENT_FILE_NAMES = [
64
- "agent.ts",
65
- "agent.cts",
66
- "agent.mts",
67
- "agent.js",
68
- "agent.cjs",
69
- "agent.mjs",
70
- "instructions.md",
71
- "instructions.ts",
72
- "instructions.cts",
73
- "instructions.mts",
74
- "instructions.js",
75
- "instructions.cjs",
76
- "instructions.mjs",
77
- // The `system` files are deprecated and will be removed soon.
78
- // TODO: Clean up in the near future.
79
- "system.md",
80
- "system.ts",
81
- "system.cts",
82
- "system.mts",
83
- "system.js",
84
- "system.cjs",
85
- "system.mjs",
86
- ];
87
- /**
88
- * Supported local-subagent subdirectories.
89
- */
90
- export const LOCAL_SUBAGENT_DIRECTORY_NAMES = [
91
- "hooks",
92
- "lib",
93
- "sandbox",
94
- "skills",
95
- "tools",
96
- "subagents",
97
- ];
98
- /**
99
- * Supported Agent Skills package entries.
100
- */
101
- export const SKILL_PACKAGE_FILE_NAMES = ["SKILL.md"];
102
- /**
103
- * Optional Agent Skills package subdirectories.
104
- */
105
- export const SKILL_PACKAGE_DIRECTORY_NAMES = ["scripts", "references", "assets"];
106
18
  const PROJECT_MARKER_FILE_NAME_SET = new Set(PROJECT_MARKER_FILE_NAMES);
107
- const AGENT_ROOT_FILE_NAME_SET = new Set(AGENT_ROOT_FILE_NAMES);
108
- const AGENT_ROOT_DIRECTORY_NAME_SET = new Set(AGENT_ROOT_DIRECTORY_NAMES);
109
- const LOCAL_SUBAGENT_FILE_NAME_SET = new Set(LOCAL_SUBAGENT_FILE_NAMES);
110
- const LOCAL_SUBAGENT_DIRECTORY_NAME_SET = new Set(LOCAL_SUBAGENT_DIRECTORY_NAMES);
111
- const SKILL_PACKAGE_FILE_NAME_SET = new Set(SKILL_PACKAGE_FILE_NAMES);
112
- const SKILL_PACKAGE_DIRECTORY_NAME_SET = new Set(SKILL_PACKAGE_DIRECTORY_NAMES);
113
19
  /**
114
20
  * Returns the normalized entry type for a Node filesystem dirent.
115
21
  */
@@ -271,27 +177,6 @@ export function classifySkillsDirectoryEntry(name, entryType) {
271
177
  }
272
178
  return "unknown";
273
179
  }
274
- /**
275
- * Returns whether a directory entry is a supported root-level agent entry.
276
- */
277
- export function isAgentRootEntry(name, entryType) {
278
- return ((entryType === "file" && AGENT_ROOT_FILE_NAME_SET.has(name)) ||
279
- (entryType === "directory" && AGENT_ROOT_DIRECTORY_NAME_SET.has(name)));
280
- }
281
- /**
282
- * Returns whether a directory entry is a supported local-subagent root entry.
283
- */
284
- export function isLocalSubagentEntry(name, entryType) {
285
- return ((entryType === "file" && LOCAL_SUBAGENT_FILE_NAME_SET.has(name)) ||
286
- (entryType === "directory" && LOCAL_SUBAGENT_DIRECTORY_NAME_SET.has(name)));
287
- }
288
- /**
289
- * Returns whether a directory entry is a recognized Agent Skills package entry.
290
- */
291
- export function isSkillPackageEntry(name, entryType) {
292
- return ((entryType === "file" && SKILL_PACKAGE_FILE_NAME_SET.has(name)) ||
293
- (entryType === "directory" && SKILL_PACKAGE_DIRECTORY_NAME_SET.has(name)));
294
- }
295
180
  /**
296
181
  * Normalizes an agent-root-relative logical path to forward slashes.
297
182
  */
@@ -29,6 +29,16 @@ export declare const DISCOVER_SLOT_COLLISION = "discover/slot-collision";
29
29
  * directory.
30
30
  */
31
31
  export declare const DISCOVER_TOOLS_DIRECTORY_INVALID = "discover/tools-directory-invalid";
32
+ /**
33
+ * Shared diagnostic emitted when the authored `hooks/` root is not a
34
+ * directory.
35
+ */
36
+ export declare const DISCOVER_HOOKS_DIRECTORY_INVALID = "discover/hooks-directory-invalid";
37
+ /**
38
+ * Shared diagnostic emitted when the authored `channels/` root is not a
39
+ * directory.
40
+ */
41
+ export declare const DISCOVER_CHANNELS_DIRECTORY_INVALID = "discover/channels-directory-invalid";
32
42
  /**
33
43
  * Shared diagnostic emitted when an authored `tools/*.{ts,…}` filename does
34
44
  * not satisfy the model tool-name charset rule.
@@ -45,11 +55,6 @@ export declare const DISCOVER_CONNECTION_NAME_INVALID = "discover/connection-nam
45
55
  * stability across manifest versions.
46
56
  */
47
57
  export declare const DISCOVER_SANDBOX_DIRECTORY_INVALID = "discover/sandbox-directory-invalid";
48
- /**
49
- * Shared diagnostic emitted when an authored sandbox module filename does
50
- * not satisfy the sandbox slug charset rule.
51
- */
52
- export declare const DISCOVER_SANDBOX_NAME_INVALID = "discover/sandbox-name-invalid";
53
58
  /**
54
59
  * Shared diagnostic emitted when an authored `channels/**` filename or
55
60
  * directory segment does not satisfy the channel slug charset rule.
@@ -70,12 +75,6 @@ export declare const DISCOVER_HOOK_NAME_INVALID = "discover/hook-name-invalid";
70
75
  * want a snake_case identifier should name the file in snake_case.
71
76
  */
72
77
  export declare const TOOL_SLUG_PATTERN: RegExp;
73
- /**
74
- * Sandbox filename charset. Sandboxes are not exposed to model APIs as
75
- * identifiers, so they may use kebab-case slugs. The leading-letter and
76
- * length rules mirror the tool slug rule for consistency.
77
- */
78
- export declare const SANDBOX_SLUG_PATTERN: RegExp;
79
78
  /**
80
79
  * Connection filename charset. Connections use the same lowercase
81
80
  * kebab-case rule as sandbox since they are not directly exposed to
@@ -113,10 +112,6 @@ type InstructionsSourceRef = MarkdownSourceRef<InstructionsDefinition> | ModuleS
113
112
  * Reads one directory through `source` and returns its entries sorted by name.
114
113
  */
115
114
  export declare function readSortedDirectoryEntries(source: ProjectSource, directoryPath: string): Promise<ProjectSourceEntry[]>;
116
- /**
117
- * Returns the current filesystem type for one path, including missing paths.
118
- */
119
- export declare function getPathType(source: ProjectSource, targetPath: string): Promise<"directory" | "file" | "missing" | "other">;
120
115
  /**
121
116
  * Discovers one required `instructions.md|ts|cts|mts|js|cjs|mjs` source
122
117
  * from a root directory.
@@ -159,11 +154,6 @@ export declare function discoverFlatModuleSource(input: {
159
154
  * the compiler ever loads the module.
160
155
  */
161
156
  export declare function createToolNameDiagnostic(slotName: string, sourcePath: string): DiscoverDiagnostic | null;
162
- /**
163
- * Returns a discovery diagnostic when a sandbox slot name violates
164
- * {@link SANDBOX_SLUG_PATTERN}, or `null` when it satisfies the rule.
165
- */
166
- export declare function createSandboxNameDiagnostic(slotName: string, sourcePath: string): DiscoverDiagnostic | null;
167
157
  /**
168
158
  * Returns a discovery diagnostic when a connection slot name violates
169
159
  * {@link CONNECTION_SLUG_PATTERN}, or `null` when it satisfies the rule.
@@ -1,5 +1,5 @@
1
1
  import { join } from "node:path";
2
- import { lowerInstructionsMarkdown } from "#public/helpers/markdown.js";
2
+ import { lowerInstructionsMarkdown } from "#internal/helpers/markdown.js";
3
3
  import { createDiscoverErrorDiagnostic, createDiscoverWarningDiagnostic, } from "#discover/diagnostics.js";
4
4
  import { getDirectoryEntryType } from "#discover/filesystem.js";
5
5
  import { createModuleSourceRef } from "#discover/manifest.js";
@@ -30,6 +30,16 @@ export const DISCOVER_SLOT_COLLISION = "discover/slot-collision";
30
30
  * directory.
31
31
  */
32
32
  export const DISCOVER_TOOLS_DIRECTORY_INVALID = "discover/tools-directory-invalid";
33
+ /**
34
+ * Shared diagnostic emitted when the authored `hooks/` root is not a
35
+ * directory.
36
+ */
37
+ export const DISCOVER_HOOKS_DIRECTORY_INVALID = "discover/hooks-directory-invalid";
38
+ /**
39
+ * Shared diagnostic emitted when the authored `channels/` root is not a
40
+ * directory.
41
+ */
42
+ export const DISCOVER_CHANNELS_DIRECTORY_INVALID = "discover/channels-directory-invalid";
33
43
  /**
34
44
  * Shared diagnostic emitted when an authored `tools/*.{ts,…}` filename does
35
45
  * not satisfy the model tool-name charset rule.
@@ -46,11 +56,6 @@ export const DISCOVER_CONNECTION_NAME_INVALID = "discover/connection-name-invali
46
56
  * stability across manifest versions.
47
57
  */
48
58
  export const DISCOVER_SANDBOX_DIRECTORY_INVALID = "discover/sandbox-directory-invalid";
49
- /**
50
- * Shared diagnostic emitted when an authored sandbox module filename does
51
- * not satisfy the sandbox slug charset rule.
52
- */
53
- export const DISCOVER_SANDBOX_NAME_INVALID = "discover/sandbox-name-invalid";
54
59
  /**
55
60
  * Shared diagnostic emitted when an authored `channels/**` filename or
56
61
  * directory segment does not satisfy the channel slug charset rule.
@@ -71,12 +76,6 @@ export const DISCOVER_HOOK_NAME_INVALID = "discover/hook-name-invalid";
71
76
  * want a snake_case identifier should name the file in snake_case.
72
77
  */
73
78
  export const TOOL_SLUG_PATTERN = /^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/;
74
- /**
75
- * Sandbox filename charset. Sandboxes are not exposed to model APIs as
76
- * identifiers, so they may use kebab-case slugs. The leading-letter and
77
- * length rules mirror the tool slug rule for consistency.
78
- */
79
- export const SANDBOX_SLUG_PATTERN = /^[a-z][a-z0-9-]{0,63}$/;
80
79
  /**
81
80
  * Connection filename charset. Connections use the same lowercase
82
81
  * kebab-case rule as sandbox since they are not directly exposed to
@@ -107,12 +106,6 @@ export async function readSortedDirectoryEntries(source, directoryPath) {
107
106
  entries.sort((left, right) => left.name.localeCompare(right.name));
108
107
  return entries;
109
108
  }
110
- /**
111
- * Returns the current filesystem type for one path, including missing paths.
112
- */
113
- export async function getPathType(source, targetPath) {
114
- return await source.stat(targetPath);
115
- }
116
109
  /**
117
110
  * Discovers one required `instructions.md|ts|cts|mts|js|cjs|mjs` source
118
111
  * from a root directory.
@@ -280,21 +273,6 @@ export function createToolNameDiagnostic(slotName, sourcePath) {
280
273
  sourcePath,
281
274
  });
282
275
  }
283
- /**
284
- * Returns a discovery diagnostic when a sandbox slot name violates
285
- * {@link SANDBOX_SLUG_PATTERN}, or `null` when it satisfies the rule.
286
- */
287
- export function createSandboxNameDiagnostic(slotName, sourcePath) {
288
- if (SANDBOX_SLUG_PATTERN.test(slotName)) {
289
- return null;
290
- }
291
- return createDiscoverErrorDiagnostic({
292
- code: DISCOVER_SANDBOX_NAME_INVALID,
293
- message: `Sandbox filename "${slotName}" is not a legal sandbox name. ` +
294
- `Expected lowercase ASCII letters, digits, and dashes only, starting with a letter, up to 64 characters.`,
295
- sourcePath,
296
- });
297
- }
298
276
  /**
299
277
  * Returns a discovery diagnostic when a connection slot name violates
300
278
  * {@link CONNECTION_SLUG_PATTERN}, or `null` when it satisfies the rule.
@@ -14,7 +14,7 @@ export declare const DISCOVER_LIB_ENTRY_UNSUPPORTED = "discover/lib-entry-unsupp
14
14
  /**
15
15
  * Input for discovering authored helper modules under `lib/`.
16
16
  */
17
- export interface DiscoverLibSourcesInput {
17
+ interface DiscoverLibSourcesInput {
18
18
  agentRoot: string;
19
19
  rootEntries: readonly ProjectSourceEntry[];
20
20
  source: ProjectSource;
@@ -22,7 +22,7 @@ export interface DiscoverLibSourcesInput {
22
22
  /**
23
23
  * Result of recursively discovering authored helper modules under `lib/`.
24
24
  */
25
- export interface DiscoverLibSourcesResult {
25
+ interface DiscoverLibSourcesResult {
26
26
  diagnostics: DiscoverDiagnostic[];
27
27
  lib: ModuleSourceRef[];
28
28
  }
@@ -31,3 +31,4 @@ export interface DiscoverLibSourcesResult {
31
31
  * authored modules.
32
32
  */
33
33
  export declare function discoverLibSources(input: DiscoverLibSourcesInput): Promise<DiscoverLibSourcesResult>;
34
+ export {};
@@ -1,5 +1,5 @@
1
1
  import type { MarkdownSourceRef, ModuleSourceRef, SkillPackageSourceRef } from "#shared/source-ref.js";
2
- import type { InternalSkillDefinition } from "#shared/skill-definition.js";
2
+ import type { NamedSkillDefinition } from "#shared/skill-definition.js";
3
3
  import type { ScheduleDefinition } from "#public/definitions/schedule.js";
4
4
  import type { SkillDefinition } from "#public/definitions/skill.js";
5
5
  import type { InstructionsDefinition } from "#public/definitions/instructions.js";
@@ -38,7 +38,7 @@ export type InstructionsSourceRef = MarkdownSourceRef<InstructionsDefinition> |
38
38
  /**
39
39
  * Skill source reference preserved by the discovery manifest.
40
40
  */
41
- export type SkillSourceRef = MarkdownSourceRef<SkillDefinition> | ModuleSourceRef | (InternalSkillDefinition & SkillPackageSourceRef);
41
+ export type SkillSourceRef = MarkdownSourceRef<SkillDefinition> | ModuleSourceRef | (NamedSkillDefinition & SkillPackageSourceRef);
42
42
  /**
43
43
  * Recursive manifest entry for a local subagent package.
44
44
  */
@@ -244,4 +244,4 @@ export declare function createLocalSubagentSourceRef(input: CreateLocalSubagentS
244
244
  /**
245
245
  * Creates a skill package source ref while omitting optional undefined fields.
246
246
  */
247
- export declare function createSkillPackageSourceRef(input: CreateSkillPackageSourceRefInput): InternalSkillDefinition & SkillPackageSourceRef;
247
+ export declare function createSkillPackageSourceRef(input: CreateSkillPackageSourceRefInput): NamedSkillDefinition & SkillPackageSourceRef;
@@ -3,7 +3,7 @@ import type { ProjectSource } from "#discover/project-source.js";
3
3
  /**
4
4
  * Input for lowering one discovered markdown file into a typed source ref.
5
5
  */
6
- export interface DiscoverMarkdownSourceInput<TDefinition> {
6
+ interface DiscoverMarkdownSourceInput<TDefinition> {
7
7
  logicalPath: string;
8
8
  lower: (source: string, input: {
9
9
  name: string;
@@ -16,3 +16,4 @@ export interface DiscoverMarkdownSourceInput<TDefinition> {
16
16
  * it into the shared manifest shape.
17
17
  */
18
18
  export declare function discoverMarkdownSource<TDefinition>(input: DiscoverMarkdownSourceInput<TDefinition>): Promise<MarkdownSourceRef<TDefinition>>;
19
+ export {};
@@ -16,7 +16,7 @@ export declare const DISCOVER_SANDBOX_FOLDER_EMPTY = "discover/sandbox-folder-em
16
16
  /**
17
17
  * Result of discovering the authored sandbox from a single agent root.
18
18
  */
19
- export interface DiscoverSandboxSourceResult {
19
+ interface DiscoverSandboxSourceResult {
20
20
  diagnostics: DiscoverDiagnostic[];
21
21
  sandbox: SandboxSourceRef | null;
22
22
  sandboxWorkspace: SandboxWorkspaceFolderSourceRef | null;
@@ -34,3 +34,4 @@ export declare function discoverSandboxSource(input: {
34
34
  rootPath: string;
35
35
  source: ProjectSource;
36
36
  }): Promise<DiscoverSandboxSourceResult>;
37
+ export {};
@@ -14,7 +14,7 @@ export declare const DISCOVER_SCHEDULE_FILE_UNSUPPORTED = "discover/schedule-fil
14
14
  /**
15
15
  * Input for discovering authored schedules under `schedules/`.
16
16
  */
17
- export interface DiscoverScheduleSourcesInput {
17
+ interface DiscoverScheduleSourcesInput {
18
18
  agentRoot: string;
19
19
  rootEntries: readonly ProjectSourceEntry[];
20
20
  source: ProjectSource;
@@ -22,7 +22,7 @@ export interface DiscoverScheduleSourcesInput {
22
22
  /**
23
23
  * Result of discovering authored schedules under `schedules/`.
24
24
  */
25
- export interface DiscoverScheduleSourcesResult {
25
+ interface DiscoverScheduleSourcesResult {
26
26
  diagnostics: DiscoverDiagnostic[];
27
27
  schedules: ScheduleSourceRef[];
28
28
  }
@@ -35,3 +35,4 @@ export interface DiscoverScheduleSourcesResult {
35
35
  * (`schedules/billing/invoice-sweep.ts` → `billing/invoice-sweep`).
36
36
  */
37
37
  export declare function discoverScheduleSources(input: DiscoverScheduleSourcesInput): Promise<DiscoverScheduleSourcesResult>;
38
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { join } from "node:path";
2
- import { lowerScheduleMarkdown } from "#public/helpers/markdown.js";
2
+ import { lowerScheduleMarkdown } from "#internal/helpers/markdown.js";
3
3
  import { discoverNamedSourceDirectory } from "#discover/grammar.js";
4
4
  /**
5
5
  * Diagnostic emitted when the authored `schedules/` root exists but is not
@@ -12,7 +12,7 @@ export declare const DISCOVER_SKILL_MARKDOWN_MISSING = "discover/skill-markdown-
12
12
  /**
13
13
  * Input for discovering authored skills.
14
14
  */
15
- export interface DiscoverSkillsInput {
15
+ interface DiscoverSkillsInput {
16
16
  agentRoot: string;
17
17
  /**
18
18
  * Optional {@link ProjectSource} used for all filesystem reads. Defaults to
@@ -25,7 +25,7 @@ export interface DiscoverSkillsInput {
25
25
  /**
26
26
  * Result of discovering authored skills.
27
27
  */
28
- export interface DiscoverSkillsResult {
28
+ interface DiscoverSkillsResult {
29
29
  diagnostics: DiscoverDiagnostic[];
30
30
  skills: SkillSourceRef[];
31
31
  }
@@ -35,3 +35,4 @@ export interface DiscoverSkillsResult {
35
35
  * entries or Agent Skills packages rooted at `skills/<name>/SKILL.md`.
36
36
  */
37
37
  export declare function discoverSkills(input: DiscoverSkillsInput): Promise<DiscoverSkillsResult>;
38
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { join, relative, resolve } from "node:path";
2
- import { lowerSkillMarkdown } from "#public/helpers/markdown.js";
2
+ import { lowerSkillMarkdown } from "#internal/helpers/markdown.js";
3
3
  import { toErrorMessage } from "#shared/errors.js";
4
4
  import { createDiscoverErrorDiagnostic } from "#discover/diagnostics.js";
5
5
  import { classifySkillPackageEntry, classifySkillsDirectoryEntry, getDirectoryEntryType, getSupportedModuleBaseName, normalizeLogicalPath, } from "#discover/filesystem.js";