@a5c-ai/babysitter-sdk 0.0.183 → 0.0.184-staging.04cc300a

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 (224) hide show
  1. package/dist/anycli/cache.d.ts +45 -0
  2. package/dist/anycli/cache.d.ts.map +1 -0
  3. package/dist/anycli/cache.js +118 -0
  4. package/dist/anycli/index.d.ts +10 -0
  5. package/dist/anycli/index.d.ts.map +1 -0
  6. package/dist/anycli/index.js +25 -0
  7. package/dist/anycli/types.d.ts +32 -0
  8. package/dist/anycli/types.d.ts.map +1 -0
  9. package/dist/anycli/types.js +9 -0
  10. package/dist/cli/commands/harnessCreateRun.d.ts.map +1 -1
  11. package/dist/cli/commands/harnessCreateRun.js +2 -4
  12. package/dist/cli/commands/harnessPhase1.d.ts +4 -2
  13. package/dist/cli/commands/harnessPhase1.d.ts.map +1 -1
  14. package/dist/cli/commands/harnessPhase1.js +119 -59
  15. package/dist/cli/commands/harnessPhase2.d.ts +6 -0
  16. package/dist/cli/commands/harnessPhase2.d.ts.map +1 -1
  17. package/dist/cli/commands/harnessPhase2.js +992 -859
  18. package/dist/cli/commands/harnessPrompts.d.ts +3 -3
  19. package/dist/cli/commands/harnessPrompts.d.ts.map +1 -1
  20. package/dist/cli/commands/harnessPrompts.js +48 -42
  21. package/dist/cli/commands/harnessResumeRun.js +1 -1
  22. package/dist/cli/commands/harnessUtils.d.ts +12 -1
  23. package/dist/cli/commands/harnessUtils.d.ts.map +1 -1
  24. package/dist/cli/commands/harnessUtils.js +51 -17
  25. package/dist/cli/commands/hookRun.d.ts.map +1 -1
  26. package/dist/cli/commands/hookRun.js +32 -4
  27. package/dist/cli/commands/instructions.d.ts +19 -0
  28. package/dist/cli/commands/instructions.d.ts.map +1 -0
  29. package/dist/cli/commands/instructions.js +158 -0
  30. package/dist/cli/commands/log.d.ts +22 -0
  31. package/dist/cli/commands/log.d.ts.map +1 -0
  32. package/dist/cli/commands/log.js +99 -0
  33. package/dist/cli/commands/session.d.ts +1 -0
  34. package/dist/cli/commands/session.d.ts.map +1 -1
  35. package/dist/cli/commands/session.js +50 -10
  36. package/dist/cli/commands/templates/process-generation-prompt.md +80 -3
  37. package/dist/cli/main.d.ts.map +1 -1
  38. package/dist/cli/main.js +248 -156
  39. package/dist/harness/claudeCode.d.ts.map +1 -1
  40. package/dist/harness/claudeCode.js +33 -7
  41. package/dist/harness/codex.d.ts.map +1 -1
  42. package/dist/harness/codex.js +4 -0
  43. package/dist/harness/cursor.d.ts +35 -0
  44. package/dist/harness/cursor.d.ts.map +1 -0
  45. package/dist/harness/cursor.js +799 -0
  46. package/dist/harness/discovery.d.ts.map +1 -1
  47. package/dist/harness/discovery.js +26 -3
  48. package/dist/harness/githubCopilot.d.ts +35 -0
  49. package/dist/harness/githubCopilot.d.ts.map +1 -0
  50. package/dist/harness/githubCopilot.js +629 -0
  51. package/dist/harness/index.d.ts +3 -0
  52. package/dist/harness/index.d.ts.map +1 -1
  53. package/dist/harness/index.js +7 -1
  54. package/dist/harness/internal.d.ts +13 -0
  55. package/dist/harness/internal.d.ts.map +1 -0
  56. package/dist/harness/internal.js +151 -0
  57. package/dist/harness/invoker.d.ts.map +1 -1
  58. package/dist/harness/invoker.js +30 -5
  59. package/dist/harness/pi.d.ts.map +1 -1
  60. package/dist/harness/pi.js +12 -2
  61. package/dist/harness/piWrapper.d.ts +1 -0
  62. package/dist/harness/piWrapper.d.ts.map +1 -1
  63. package/dist/harness/piWrapper.js +69 -2
  64. package/dist/harness/registry.d.ts.map +1 -1
  65. package/dist/harness/registry.js +6 -0
  66. package/dist/harness/types.d.ts +8 -0
  67. package/dist/harness/types.d.ts.map +1 -1
  68. package/dist/index.d.ts +3 -0
  69. package/dist/index.d.ts.map +1 -1
  70. package/dist/index.js +26 -0
  71. package/dist/interaction/askUserQuestion.d.ts +1 -0
  72. package/dist/interaction/askUserQuestion.d.ts.map +1 -1
  73. package/dist/interaction/askUserQuestion.js +103 -93
  74. package/dist/logging/index.d.ts +3 -0
  75. package/dist/logging/index.d.ts.map +1 -0
  76. package/dist/logging/index.js +11 -0
  77. package/dist/logging/runLogger.d.ts +85 -0
  78. package/dist/logging/runLogger.d.ts.map +1 -0
  79. package/dist/logging/runLogger.js +180 -0
  80. package/dist/mcp/tools/runs.d.ts.map +1 -1
  81. package/dist/mcp/tools/runs.js +2 -0
  82. package/dist/prompts/commandTemplates.d.ts +4 -0
  83. package/dist/prompts/commandTemplates.d.ts.map +1 -0
  84. package/dist/prompts/commandTemplates.js +32 -0
  85. package/dist/prompts/compose.d.ts +28 -0
  86. package/dist/prompts/compose.d.ts.map +1 -0
  87. package/dist/prompts/compose.js +165 -0
  88. package/dist/prompts/context.d.ts +27 -0
  89. package/dist/prompts/context.d.ts.map +1 -0
  90. package/dist/prompts/context.js +198 -0
  91. package/dist/prompts/index.d.ts +12 -0
  92. package/dist/prompts/index.d.ts.map +1 -0
  93. package/dist/prompts/index.js +50 -0
  94. package/dist/prompts/parts/breakpointHandling.d.ts +8 -0
  95. package/dist/prompts/parts/breakpointHandling.d.ts.map +1 -0
  96. package/dist/prompts/parts/breakpointHandling.js +12 -0
  97. package/dist/prompts/parts/completionProof.d.ts +6 -0
  98. package/dist/prompts/parts/completionProof.d.ts.map +1 -0
  99. package/dist/prompts/parts/completionProof.js +10 -0
  100. package/dist/prompts/parts/criticalRules.d.ts +7 -0
  101. package/dist/prompts/parts/criticalRules.d.ts.map +1 -0
  102. package/dist/prompts/parts/criticalRules.js +16 -0
  103. package/dist/prompts/parts/dependencies.d.ts +6 -0
  104. package/dist/prompts/parts/dependencies.d.ts.map +1 -0
  105. package/dist/prompts/parts/dependencies.js +10 -0
  106. package/dist/prompts/parts/effects.d.ts +6 -0
  107. package/dist/prompts/parts/effects.d.ts.map +1 -0
  108. package/dist/prompts/parts/effects.js +10 -0
  109. package/dist/prompts/parts/index.d.ts +26 -0
  110. package/dist/prompts/parts/index.d.ts.map +1 -0
  111. package/dist/prompts/parts/index.js +48 -0
  112. package/dist/prompts/parts/intentFidelityChecks.d.ts +7 -0
  113. package/dist/prompts/parts/intentFidelityChecks.d.ts.map +1 -0
  114. package/dist/prompts/parts/intentFidelityChecks.js +14 -0
  115. package/dist/prompts/parts/interview.d.ts +6 -0
  116. package/dist/prompts/parts/interview.d.ts.map +1 -0
  117. package/dist/prompts/parts/interview.js +18 -0
  118. package/dist/prompts/parts/iteration.d.ts +6 -0
  119. package/dist/prompts/parts/iteration.d.ts.map +1 -0
  120. package/dist/prompts/parts/iteration.js +15 -0
  121. package/dist/prompts/parts/loopControl.d.ts +11 -0
  122. package/dist/prompts/parts/loopControl.d.ts.map +1 -0
  123. package/dist/prompts/parts/loopControl.js +22 -0
  124. package/dist/prompts/parts/nonNegotiables.d.ts +7 -0
  125. package/dist/prompts/parts/nonNegotiables.d.ts.map +1 -0
  126. package/dist/prompts/parts/nonNegotiables.js +14 -0
  127. package/dist/prompts/parts/processCreation.d.ts +6 -0
  128. package/dist/prompts/parts/processCreation.d.ts.map +1 -0
  129. package/dist/prompts/parts/processCreation.js +24 -0
  130. package/dist/prompts/parts/processGuidelines.d.ts +7 -0
  131. package/dist/prompts/parts/processGuidelines.d.ts.map +1 -0
  132. package/dist/prompts/parts/processGuidelines.js +11 -0
  133. package/dist/prompts/parts/quickReference.d.ts +6 -0
  134. package/dist/prompts/parts/quickReference.d.ts.map +1 -0
  135. package/dist/prompts/parts/quickReference.js +17 -0
  136. package/dist/prompts/parts/recovery.d.ts +7 -0
  137. package/dist/prompts/parts/recovery.d.ts.map +1 -0
  138. package/dist/prompts/parts/recovery.js +11 -0
  139. package/dist/prompts/parts/resultsPosting.d.ts +7 -0
  140. package/dist/prompts/parts/resultsPosting.d.ts.map +1 -0
  141. package/dist/prompts/parts/resultsPosting.js +11 -0
  142. package/dist/prompts/parts/runCreation.d.ts +7 -0
  143. package/dist/prompts/parts/runCreation.d.ts.map +1 -0
  144. package/dist/prompts/parts/runCreation.js +53 -0
  145. package/dist/prompts/parts/seeAlso.d.ts +7 -0
  146. package/dist/prompts/parts/seeAlso.d.ts.map +1 -0
  147. package/dist/prompts/parts/seeAlso.js +11 -0
  148. package/dist/prompts/parts/taskExamples.d.ts +7 -0
  149. package/dist/prompts/parts/taskExamples.d.ts.map +1 -0
  150. package/dist/prompts/parts/taskExamples.js +11 -0
  151. package/dist/prompts/parts/taskKinds.d.ts +6 -0
  152. package/dist/prompts/parts/taskKinds.d.ts.map +1 -0
  153. package/dist/prompts/parts/taskKinds.js +17 -0
  154. package/dist/prompts/parts/userProfile.d.ts +7 -0
  155. package/dist/prompts/parts/userProfile.d.ts.map +1 -0
  156. package/dist/prompts/parts/userProfile.js +11 -0
  157. package/dist/prompts/templateRenderer.d.ts +18 -0
  158. package/dist/prompts/templateRenderer.d.ts.map +1 -0
  159. package/dist/prompts/templateRenderer.js +131 -0
  160. package/dist/prompts/templates/breakpoint-handling.md +101 -0
  161. package/dist/prompts/templates/commands/anycli.md +205 -0
  162. package/dist/prompts/templates/commands/assimilate.md +47 -0
  163. package/dist/prompts/templates/commands/cleanup.md +32 -0
  164. package/dist/prompts/templates/commands/contrib.md +40 -0
  165. package/dist/prompts/templates/commands/doctor.md +426 -0
  166. package/dist/prompts/templates/commands/forever.md +11 -0
  167. package/dist/prompts/templates/commands/project-install.md +25 -0
  168. package/dist/prompts/templates/commands/retrospect.md +68 -0
  169. package/dist/prompts/templates/commands/user-install.md +24 -0
  170. package/dist/prompts/templates/completion-proof.md +13 -0
  171. package/dist/prompts/templates/critical-rules.md +57 -0
  172. package/dist/prompts/templates/dependencies.md +9 -0
  173. package/dist/prompts/templates/effects.md +42 -0
  174. package/dist/prompts/templates/intent-fidelity-checks.md +14 -0
  175. package/dist/prompts/templates/interview.md +65 -0
  176. package/dist/prompts/templates/iteration.md +41 -0
  177. package/dist/prompts/templates/loop-control.md +54 -0
  178. package/dist/prompts/templates/non-negotiables.md +11 -0
  179. package/dist/prompts/templates/process-creation.md +61 -0
  180. package/dist/prompts/templates/process-guidelines.md +88 -0
  181. package/dist/prompts/templates/quick-reference.md +35 -0
  182. package/dist/prompts/templates/recovery.md +20 -0
  183. package/dist/prompts/templates/results-posting.md +69 -0
  184. package/dist/prompts/templates/run-creation.md +36 -0
  185. package/dist/prompts/templates/see-also.md +4 -0
  186. package/dist/prompts/templates/task-examples.md +76 -0
  187. package/dist/prompts/templates/task-kinds.md +60 -0
  188. package/dist/prompts/templates/user-profile.md +48 -0
  189. package/dist/prompts/types.d.ts +105 -0
  190. package/dist/prompts/types.d.ts.map +1 -0
  191. package/dist/prompts/types.js +7 -0
  192. package/dist/runtime/commitEffectResult.js +3 -0
  193. package/dist/runtime/createRun.d.ts.map +1 -1
  194. package/dist/runtime/createRun.js +4 -0
  195. package/dist/runtime/intrinsics/breakpoint.d.ts +2 -2
  196. package/dist/runtime/intrinsics/breakpoint.d.ts.map +1 -1
  197. package/dist/runtime/intrinsics/breakpoint.js +25 -1
  198. package/dist/runtime/intrinsics/parallel.d.ts.map +1 -1
  199. package/dist/runtime/intrinsics/parallel.js +9 -0
  200. package/dist/runtime/intrinsics/task.js +1 -1
  201. package/dist/runtime/processContext.d.ts +14 -0
  202. package/dist/runtime/processContext.d.ts.map +1 -1
  203. package/dist/runtime/processContext.js +91 -5
  204. package/dist/runtime/replay/createReplayEngine.d.ts.map +1 -1
  205. package/dist/runtime/replay/createReplayEngine.js +82 -1
  206. package/dist/runtime/replay/effectIndex.d.ts +3 -1
  207. package/dist/runtime/replay/effectIndex.d.ts.map +1 -1
  208. package/dist/runtime/replay/effectIndex.js +9 -2
  209. package/dist/runtime/types.d.ts +21 -1
  210. package/dist/runtime/types.d.ts.map +1 -1
  211. package/dist/storage/createRunDir.d.ts.map +1 -1
  212. package/dist/storage/createRunDir.js +1 -0
  213. package/dist/storage/journal.d.ts.map +1 -1
  214. package/dist/storage/journal.js +21 -1
  215. package/dist/storage/lock.d.ts.map +1 -1
  216. package/dist/storage/lock.js +11 -0
  217. package/dist/storage/types.d.ts +2 -0
  218. package/dist/storage/types.d.ts.map +1 -1
  219. package/dist/tasks/types.d.ts +9 -0
  220. package/dist/tasks/types.d.ts.map +1 -1
  221. package/package.json +4 -2
  222. package/dist/cli/commands/runExecuteTasks.d.ts +0 -42
  223. package/dist/cli/commands/runExecuteTasks.d.ts.map +0 -1
  224. package/dist/cli/commands/runExecuteTasks.js +0 -377
@@ -0,0 +1,45 @@
1
+ /**
2
+ * AnyCLI Cache Management
3
+ *
4
+ * Simple filesystem-based cache for agent-generated service artifacts.
5
+ * One cache.json per service under ~/.a5c/anycli/cache/<service>/.
6
+ * The agent decides freshness, structure, and invalidation -- this module
7
+ * is just convenience I/O.
8
+ */
9
+ import type { AnycliServiceCache } from "./types";
10
+ /**
11
+ * Returns the global cache directory for a service.
12
+ *
13
+ * @param service - Service identifier
14
+ * @returns Absolute path to `~/.a5c/anycli/cache/<service>/`
15
+ */
16
+ export declare function getAnycliCacheDir(service: string): string;
17
+ /**
18
+ * Reads a cached service entry if one exists.
19
+ *
20
+ * Returns `null` if no cache entry exists or the entry is corrupt.
21
+ *
22
+ * @param service - Service identifier
23
+ * @returns The cached service entry, or null
24
+ */
25
+ export declare function readServiceCache(service: string): Promise<AnycliServiceCache | null>;
26
+ /**
27
+ * Writes a service cache entry atomically.
28
+ *
29
+ * @param service - Service identifier
30
+ * @param cache - The cache entry to write
31
+ */
32
+ export declare function writeServiceCache(service: string, cache: AnycliServiceCache): Promise<void>;
33
+ /**
34
+ * Invalidates the cache for a service by removing its cache directory.
35
+ *
36
+ * @param service - Service identifier
37
+ */
38
+ export declare function invalidateServiceCache(service: string): Promise<void>;
39
+ /**
40
+ * Lists all cached service names.
41
+ *
42
+ * @returns Array of service identifier strings
43
+ */
44
+ export declare function listCachedServices(): Promise<string[]>;
45
+ //# sourceMappingURL=cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/anycli/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAkBlD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAgB1F;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,kBAAkB,GACxB,OAAO,CAAC,IAAI,CAAC,CAMf;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAU3E;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAc5D"}
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ /**
3
+ * AnyCLI Cache Management
4
+ *
5
+ * Simple filesystem-based cache for agent-generated service artifacts.
6
+ * One cache.json per service under ~/.a5c/anycli/cache/<service>/.
7
+ * The agent decides freshness, structure, and invalidation -- this module
8
+ * is just convenience I/O.
9
+ */
10
+ var __importDefault = (this && this.__importDefault) || function (mod) {
11
+ return (mod && mod.__esModule) ? mod : { "default": mod };
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.getAnycliCacheDir = getAnycliCacheDir;
15
+ exports.readServiceCache = readServiceCache;
16
+ exports.writeServiceCache = writeServiceCache;
17
+ exports.invalidateServiceCache = invalidateServiceCache;
18
+ exports.listCachedServices = listCachedServices;
19
+ const fs_1 = require("fs");
20
+ const path_1 = __importDefault(require("path"));
21
+ const os_1 = require("os");
22
+ const atomic_js_1 = require("../storage/atomic.js");
23
+ /**
24
+ * Base directory name for babysitter state.
25
+ */
26
+ const A5C_DIR = ".a5c";
27
+ /**
28
+ * Subdirectory for anycli cache within the global state dir.
29
+ */
30
+ const ANYCLI_CACHE_SUBDIR = path_1.default.join("anycli", "cache");
31
+ /**
32
+ * Cache filename.
33
+ */
34
+ const CACHE_FILE = "cache.json";
35
+ /**
36
+ * Returns the global cache directory for a service.
37
+ *
38
+ * @param service - Service identifier
39
+ * @returns Absolute path to `~/.a5c/anycli/cache/<service>/`
40
+ */
41
+ function getAnycliCacheDir(service) {
42
+ return path_1.default.join((0, os_1.homedir)(), A5C_DIR, ANYCLI_CACHE_SUBDIR, service);
43
+ }
44
+ /**
45
+ * Reads a cached service entry if one exists.
46
+ *
47
+ * Returns `null` if no cache entry exists or the entry is corrupt.
48
+ *
49
+ * @param service - Service identifier
50
+ * @returns The cached service entry, or null
51
+ */
52
+ async function readServiceCache(service) {
53
+ const cacheDir = getAnycliCacheDir(service);
54
+ const cachePath = path_1.default.join(cacheDir, CACHE_FILE);
55
+ try {
56
+ const raw = await fs_1.promises.readFile(cachePath, "utf8");
57
+ const entry = JSON.parse(raw);
58
+ return entry;
59
+ }
60
+ catch (error) {
61
+ const err = error;
62
+ if (err.code === "ENOENT") {
63
+ return null;
64
+ }
65
+ // Corrupt cache -- treat as miss
66
+ return null;
67
+ }
68
+ }
69
+ /**
70
+ * Writes a service cache entry atomically.
71
+ *
72
+ * @param service - Service identifier
73
+ * @param cache - The cache entry to write
74
+ */
75
+ async function writeServiceCache(service, cache) {
76
+ const cacheDir = getAnycliCacheDir(service);
77
+ await fs_1.promises.mkdir(cacheDir, { recursive: true });
78
+ const cachePath = path_1.default.join(cacheDir, CACHE_FILE);
79
+ await (0, atomic_js_1.writeFileAtomic)(cachePath, JSON.stringify(cache, null, 2) + "\n");
80
+ }
81
+ /**
82
+ * Invalidates the cache for a service by removing its cache directory.
83
+ *
84
+ * @param service - Service identifier
85
+ */
86
+ async function invalidateServiceCache(service) {
87
+ const cacheDir = getAnycliCacheDir(service);
88
+ try {
89
+ await fs_1.promises.rm(cacheDir, { recursive: true, force: true });
90
+ }
91
+ catch (error) {
92
+ const err = error;
93
+ if (err.code !== "ENOENT") {
94
+ throw error;
95
+ }
96
+ }
97
+ }
98
+ /**
99
+ * Lists all cached service names.
100
+ *
101
+ * @returns Array of service identifier strings
102
+ */
103
+ async function listCachedServices() {
104
+ const baseDir = path_1.default.join((0, os_1.homedir)(), A5C_DIR, ANYCLI_CACHE_SUBDIR);
105
+ try {
106
+ const entries = await fs_1.promises.readdir(baseDir, { withFileTypes: true });
107
+ return entries
108
+ .filter((e) => e.isDirectory())
109
+ .map((e) => e.name);
110
+ }
111
+ catch (error) {
112
+ const err = error;
113
+ if (err.code === "ENOENT") {
114
+ return [];
115
+ }
116
+ throw error;
117
+ }
118
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * AnyCLI Module
3
+ *
4
+ * Provides minimal cache infrastructure for agent-driven service integration.
5
+ * The agent handles all service discovery, auth resolution, and code generation
6
+ * at runtime -- these exports are just persistence utilities.
7
+ */
8
+ export * from "./types";
9
+ export * from "./cache";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/anycli/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * AnyCLI Module
4
+ *
5
+ * Provides minimal cache infrastructure for agent-driven service integration.
6
+ * The agent handles all service discovery, auth resolution, and code generation
7
+ * at runtime -- these exports are just persistence utilities.
8
+ */
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
21
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ __exportStar(require("./types"), exports);
25
+ __exportStar(require("./cache"), exports);
@@ -0,0 +1,32 @@
1
+ /**
2
+ * AnyCLI Types
3
+ *
4
+ * Minimal type definitions for the AnyCLI service cache.
5
+ * The agent handles all service discovery, auth resolution, and code
6
+ * generation at runtime -- these types are just persistence infrastructure.
7
+ */
8
+ /**
9
+ * Transport type for MCP server communication.
10
+ */
11
+ export type AnycliTransport = "stdio" | "http-sse";
12
+ /**
13
+ * Cache entry for a service's agent-generated artifacts.
14
+ */
15
+ export interface AnycliServiceCache {
16
+ /** Service identifier (e.g. "github", "stripe") */
17
+ service: string;
18
+ /** Agent-defined service definition -- no rigid schema */
19
+ definition: Record<string, unknown>;
20
+ /** Generated module files: filename -> content */
21
+ modules: Record<string, string>;
22
+ /** Cache metadata */
23
+ metadata: {
24
+ /** ISO timestamp when the cache entry was created */
25
+ createdAt: string;
26
+ /** SDK version that generated this cache entry */
27
+ sdkVersion: string;
28
+ /** Hash of the definition for change detection */
29
+ definitionHash: string;
30
+ };
31
+ }
32
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/anycli/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,UAAU,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,qBAAqB;IACrB,QAAQ,EAAE;QACR,qDAAqD;QACrD,SAAS,EAAE,MAAM,CAAC;QAClB,kDAAkD;QAClD,UAAU,EAAE,MAAM,CAAC;QACnB,kDAAkD;QAClD,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CACH"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /**
3
+ * AnyCLI Types
4
+ *
5
+ * Minimal type definitions for the AnyCLI service cache.
6
+ * The agent handles all service discovery, auth resolution, and code
7
+ * generation at runtime -- these types are just persistence infrastructure.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1 @@
1
- {"version":3,"file":"harnessCreateRun.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/harnessCreateRun.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,KAAK,oBAAoB,EAY1B,MAAM,gBAAgB,CAAC;AAMxB,YAAY,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,mDAAmD;AACnD,YAAY,EAAE,oBAAoB,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAIxD,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAsGjB;AAED,qDAAqD;AACrD,eAAO,MAAM,mBAAmB,+BAAyB,CAAC"}
1
+ {"version":3,"file":"harnessCreateRun.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/harnessCreateRun.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,KAAK,oBAAoB,EAY1B,MAAM,gBAAgB,CAAC;AAMxB,YAAY,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,mDAAmD;AACnD,YAAY,EAAE,oBAAoB,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAIxD,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAoGjB;AAED,qDAAqD;AACrD,eAAO,MAAM,mBAAmB,+BAAyB,CAAC"}
@@ -50,9 +50,7 @@ async function handleHarnessCreateRun(parsed) {
50
50
  }
51
51
  }
52
52
  const discovered = await (0, harnessUtils_1.discoverHarnesses)();
53
- const selectedHarnessName = preferredHarness === "oh-my-pi"
54
- ? "oh-my-pi"
55
- : "pi";
53
+ const selectedHarnessName = preferredHarness ?? "internal";
56
54
  const compressionConfig = (0, harnessUtils_1.loadSessionCompressionConfig)(workspace);
57
55
  const promptContext = (0, harnessUtils_1.buildPromptContext)({
58
56
  workspace,
@@ -68,7 +66,7 @@ async function handleHarnessCreateRun(parsed) {
68
66
  const workDir = workspace ?? process.cwd();
69
67
  processPath = await (0, harnessPhase1_1.runProcessDefinitionPhase)({
70
68
  prompt: prompt,
71
- outputPath: (0, harnessPhase1_1.getGeneratedProcessPath)(workDir),
69
+ outputDir: (0, harnessPhase1_1.getProcessOutputDir)(workDir),
72
70
  workspace: workDir,
73
71
  model,
74
72
  interactive,
@@ -6,6 +6,8 @@
6
6
  */
7
7
  import * as readline from "node:readline";
8
8
  import { type ExternalWorkspaceAssessment, type CompressionConfig, type HarnessPromptContext as SessionCreatePromptContext } from "./harnessUtils";
9
+ export declare function getProcessOutputDir(workDir: string): string;
10
+ /** @deprecated Use getProcessOutputDir instead */
9
11
  export declare function getGeneratedProcessPath(workDir: string): string;
10
12
  export declare function execShellEffect(command: string, args: string[], cwd?: string): Promise<{
11
13
  stdout: string;
@@ -18,7 +20,7 @@ export declare function extractJsonObjectFromText(text: string): string | null;
18
20
  export declare function coerceAgentResultValue(taskDef: Record<string, unknown>, output: string): unknown;
19
21
  export declare function buildExternalProcessDefinitionPrompt(args: {
20
22
  prompt: string;
21
- outputPath: string;
23
+ outputDir: string;
22
24
  workspace?: string;
23
25
  promptContext: SessionCreatePromptContext;
24
26
  workspaceAssessment: ExternalWorkspaceAssessment;
@@ -29,7 +31,7 @@ export declare function buildExternalProcessConformancePrompt(args: {
29
31
  }): string;
30
32
  export declare function runProcessDefinitionPhase(args: {
31
33
  prompt: string;
32
- outputPath: string;
34
+ outputDir: string;
33
35
  workspace?: string;
34
36
  model?: string;
35
37
  interactive: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"harnessPhase1.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/harnessPhase1.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAa1C,OAAO,EAIL,KAAK,2BAA2B,EAEhC,KAAK,iBAAiB,EAGtB,KAAK,oBAAoB,IAAI,0BAA0B,EAwBxD,MAAM,gBAAgB,CAAC;AAkBxB,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE/D;AAyHD,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAyB/D;AAg5BD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAmDzE;AAED,wBAAgB,sCAAsC,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,CAU/F;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgB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