@poncho-ai/cli 0.6.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +5 -5
- package/dist/chunk-JIRFQFIX.js +5463 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/run-interactive-ink-JGN4BBJB.js +494 -0
- package/package.json +4 -4
- package/src/index.ts +22 -3
- package/src/init-feature-context.ts +12 -34
- package/test/cli.test.ts +13 -0
package/test/cli.test.ts
CHANGED
|
@@ -144,6 +144,13 @@ vi.mock("@poncho-ai/harness", () => ({
|
|
|
144
144
|
};
|
|
145
145
|
},
|
|
146
146
|
InMemoryStateStore: class {},
|
|
147
|
+
generateAgentId: () => "agent_testid1234567890abcdef12345678",
|
|
148
|
+
ensureAgentIdentity: async (workingDir: string) => ({
|
|
149
|
+
name: workingDir.split("/").pop() || "agent",
|
|
150
|
+
id: "agent_testid1234567890abcdef12345678",
|
|
151
|
+
}),
|
|
152
|
+
getAgentStoreDirectory: (identity: { name: string; id: string }) =>
|
|
153
|
+
join("/tmp/.poncho/store", `${identity.name}--${identity.id}`),
|
|
147
154
|
TelemetryEmitter: class {
|
|
148
155
|
async emit(): Promise<void> {}
|
|
149
156
|
},
|
|
@@ -163,6 +170,7 @@ import {
|
|
|
163
170
|
startDevServer,
|
|
164
171
|
updateAgentGuidance,
|
|
165
172
|
} from "../src/index.js";
|
|
173
|
+
import { ensureAgentIdentity, getAgentStoreDirectory } from "@poncho-ai/harness";
|
|
166
174
|
|
|
167
175
|
describe("cli", () => {
|
|
168
176
|
let tempDir = "";
|
|
@@ -186,6 +194,7 @@ describe("cli", () => {
|
|
|
186
194
|
const basicTest = await readFile(join(tempDir, "my-agent", "tests", "basic.yaml"), "utf8");
|
|
187
195
|
|
|
188
196
|
expect(agentMarkdown).toContain("name: my-agent");
|
|
197
|
+
expect(agentMarkdown).toContain("id: agent_");
|
|
189
198
|
expect(pkgJson).toContain('"name": "my-agent"');
|
|
190
199
|
expect(skillManifest).toContain("name: starter-skill");
|
|
191
200
|
expect(skillTool).toContain("export default async function run(input)");
|
|
@@ -240,6 +249,10 @@ describe("cli", () => {
|
|
|
240
249
|
});
|
|
241
250
|
expect(firstIntro).toContain("I can configure myself directly by chat");
|
|
242
251
|
expect(secondIntro).toBeUndefined();
|
|
252
|
+
const identity = await ensureAgentIdentity(projectDir);
|
|
253
|
+
const markerPath = join(getAgentStoreDirectory(identity), "onboarding-state.json");
|
|
254
|
+
const markerRaw = await readFile(markerPath, "utf8");
|
|
255
|
+
expect(markerRaw).toContain('"onboardingVersion": 1');
|
|
243
256
|
});
|
|
244
257
|
|
|
245
258
|
it("emits intro for interactive init even when config differs from defaults", async () => {
|