@pebblehouse/odin-cli 0.5.0 → 0.6.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.
Files changed (2) hide show
  1. package/dist/index.js +19 -21
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -311,14 +311,13 @@ decisionsCmd.command("get <slug> <id>").description("Get a decision by ID").acti
311
311
  process.stdout.write(JSON.stringify(res) + "\n");
312
312
  if (res.error) process.exit(1);
313
313
  });
314
- decisionsCmd.command("log <slug> <title>").description("Log a decision").option("--rationale <rationale>", "Decision rationale").option("--alternatives <alternatives>", "Alternatives considered").option("--session-id <id>", "Link to active session").action(async (slug, title, opts) => {
314
+ decisionsCmd.command("log <slug> <title>").description("Log a decision").option("--rationale <rationale>", "Decision rationale").option("--alternatives <alternatives>", "Alternatives considered").action(async (slug, title, opts) => {
315
315
  const res = await apiRequest(`/pebbles/${slug}/decisions`, {
316
316
  method: "POST",
317
317
  body: {
318
318
  title,
319
319
  rationale: opts.rationale,
320
- alternatives_considered: opts.alternatives,
321
- session_id: opts.sessionId
320
+ alternatives_considered: opts.alternatives
322
321
  }
323
322
  });
324
323
  process.stdout.write(JSON.stringify(res) + "\n");
@@ -428,7 +427,7 @@ plansCmd.command("delete-phase <slug> <planId> <phaseId>").description("Delete a
428
427
  process.stdout.write(JSON.stringify(res) + "\n");
429
428
  if (res.error) process.exit(1);
430
429
  });
431
- plansCmd.command("add-phase-link <slug> <planId> <phaseId>").description("Add a link from a phase to a spec or document").requiredOption("--link-type <type>", "Link type (spec|plan_doc)").requiredOption("--target-type <type>", "Target type (agent_spec|document)").requiredOption("--target-id <id>", "Target entity UUID").action(async (slug, planId, phaseId, opts) => {
430
+ plansCmd.command("add-phase-link <slug> <planId> <phaseId>").description("Add a link from a phase to a spec or document").requiredOption("--link-type <type>", "Link type (spec|plan_doc)").requiredOption("--target-type <type>", "Target type (artifact|document)").requiredOption("--target-id <id>", "Target entity UUID").action(async (slug, planId, phaseId, opts) => {
432
431
  const res = await apiRequest(`/pebbles/${slug}/plans/${planId}/phases/${phaseId}/links`, {
433
432
  method: "POST",
434
433
  body: {
@@ -448,53 +447,52 @@ plansCmd.command("remove-phase-link <slug> <planId> <phaseId> <linkId>").descrip
448
447
  if (res.error) process.exit(1);
449
448
  });
450
449
 
451
- // src/commands/specs.ts
450
+ // src/commands/artifacts.ts
452
451
  import { Command as Command7 } from "commander";
453
452
  import { readFileSync as readFileSync5 } from "fs";
454
- var specsCmd = new Command7("specs").description("Manage agent specs");
455
- specsCmd.command("list <slug>").description("List specs for a pebble").option("--source <source>", "Filter by source (claude-code, superpowers, etc.)").action(async (slug, opts) => {
453
+ var artifactsCmd = new Command7("artifacts").description("Manage artifacts");
454
+ artifactsCmd.command("list <slug>").description("List artifacts for a pebble").option("--source <source>", "Filter by source (claude-code, superpowers, etc.)").action(async (slug, opts) => {
456
455
  const params = {};
457
456
  if (opts.source) params.source = opts.source;
458
- const res = await apiRequest(`/pebbles/${slug}/agent-specs`, { params });
457
+ const res = await apiRequest(`/pebbles/${slug}/artifacts`, { params });
459
458
  process.stdout.write(JSON.stringify(res) + "\n");
460
459
  if (res.error) process.exit(1);
461
460
  });
462
- specsCmd.command("get <slug> <id>").description("Get a spec by ID").action(async (slug, id) => {
463
- const res = await apiRequest(`/pebbles/${slug}/agent-specs/${id}`);
461
+ artifactsCmd.command("get <slug> <id>").description("Get an artifact by ID").action(async (slug, id) => {
462
+ const res = await apiRequest(`/pebbles/${slug}/artifacts/${id}`);
464
463
  process.stdout.write(JSON.stringify(res) + "\n");
465
464
  if (res.error) process.exit(1);
466
465
  });
467
- specsCmd.command("create <slug> <title>").description("Create a spec").requiredOption("--spec-type <type>", "Spec type (e.g. brainstorm, plan, research)").option("--source <source>", "Source agent", "claude-code").option("--content <content>", "Spec content").option("--file <path>", "Read content from file").option("--session-id <id>", "Link to active session").action(async (slug, title, opts) => {
466
+ artifactsCmd.command("create <slug> <title>").description("Create an artifact").requiredOption("--type <type>", "Artifact type (e.g. brainstorm, plan, research, spec)").option("--source <source>", "Source agent", "claude-code").option("--content <content>", "Artifact content").option("--file <path>", "Read content from file").action(async (slug, title, opts) => {
468
467
  const content = opts.file ? readFileSync5(opts.file, "utf-8") : opts.content ?? "";
469
- const res = await apiRequest(`/pebbles/${slug}/agent-specs`, {
468
+ const res = await apiRequest(`/pebbles/${slug}/artifacts`, {
470
469
  method: "POST",
471
470
  body: {
472
471
  title,
473
- spec_type: opts.specType,
472
+ type: opts.type,
474
473
  source: opts.source,
475
- content,
476
- session_id: opts.sessionId ?? null
474
+ content
477
475
  }
478
476
  });
479
477
  process.stdout.write(JSON.stringify(res) + "\n");
480
478
  if (res.error) process.exit(1);
481
479
  });
482
- specsCmd.command("update <slug> <id>").description("Update a spec").option("--title <title>", "New title").option("--spec-type <type>", "New spec type").option("--source <source>", "New source").option("--content <content>", "New content").option("--file <path>", "Read content from file").action(async (slug, id, opts) => {
480
+ artifactsCmd.command("update <slug> <id>").description("Update an artifact").option("--title <title>", "New title").option("--type <type>", "New type").option("--source <source>", "New source").option("--content <content>", "New content").option("--file <path>", "Read content from file").action(async (slug, id, opts) => {
483
481
  const body = {};
484
482
  if (opts.title) body.title = opts.title;
485
- if (opts.specType) body.spec_type = opts.specType;
483
+ if (opts.type) body.type = opts.type;
486
484
  if (opts.source) body.source = opts.source;
487
485
  if (opts.file) body.content = readFileSync5(opts.file, "utf-8");
488
486
  else if (opts.content) body.content = opts.content;
489
- const res = await apiRequest(`/pebbles/${slug}/agent-specs/${id}`, {
487
+ const res = await apiRequest(`/pebbles/${slug}/artifacts/${id}`, {
490
488
  method: "PUT",
491
489
  body
492
490
  });
493
491
  process.stdout.write(JSON.stringify(res) + "\n");
494
492
  if (res.error) process.exit(1);
495
493
  });
496
- specsCmd.command("delete <slug> <id>").description("Delete a spec").action(async (slug, id) => {
497
- const res = await apiRequest(`/pebbles/${slug}/agent-specs/${id}`, {
494
+ artifactsCmd.command("delete <slug> <id>").description("Delete an artifact").action(async (slug, id) => {
495
+ const res = await apiRequest(`/pebbles/${slug}/artifacts/${id}`, {
498
496
  method: "DELETE"
499
497
  });
500
498
  process.stdout.write(JSON.stringify(res) + "\n");
@@ -624,7 +622,7 @@ program.addCommand(decisionsCmd);
624
622
  program.addCommand(contextCmd);
625
623
  program.addCommand(searchCmd);
626
624
  program.addCommand(plansCmd);
627
- program.addCommand(specsCmd);
625
+ program.addCommand(artifactsCmd);
628
626
  program.addCommand(versionsCmd);
629
627
  program.addCommand(guidelinesCmd);
630
628
  process.on("exit", () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pebblehouse/odin-cli",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "description": "CLI for Odin — the knowledge backbone for Pebble House",
6
6
  "bin": {