@pebblehouse/odin-cli 0.2.0 → 0.2.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.
- package/dist/index.js +20 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -336,24 +336,28 @@ plansCmd.command("delete <slug> <id>").description("Delete a plan").action(async
|
|
|
336
336
|
process.stdout.write(JSON.stringify(res) + "\n");
|
|
337
337
|
if (res.error) process.exit(1);
|
|
338
338
|
});
|
|
339
|
-
plansCmd.command("add-phase <slug> <planId> <title>").description("Add a phase to a plan").requiredOption("--phase-number <number>", "Phase number", parseInt).option("--description <description>", "Phase description").action(async (slug, planId, title, opts) => {
|
|
339
|
+
plansCmd.command("add-phase <slug> <planId> <title>").description("Add a phase to a plan").requiredOption("--phase-number <number>", "Phase number", parseInt).option("--description <description>", "Phase description").option("--detail-type <type>", "Detail type (e.g. agent_spec, document)").option("--detail-id <id>", "Detail ID (UUID of linked entity)").action(async (slug, planId, title, opts) => {
|
|
340
340
|
const res = await apiRequest(`/pebbles/${slug}/plans/${planId}/phases`, {
|
|
341
341
|
method: "POST",
|
|
342
342
|
body: {
|
|
343
343
|
phase_number: opts.phaseNumber,
|
|
344
344
|
title,
|
|
345
|
-
description: opts.description ?? null
|
|
345
|
+
description: opts.description ?? null,
|
|
346
|
+
detail_type: opts.detailType ?? null,
|
|
347
|
+
detail_id: opts.detailId ?? null
|
|
346
348
|
}
|
|
347
349
|
});
|
|
348
350
|
process.stdout.write(JSON.stringify(res) + "\n");
|
|
349
351
|
if (res.error) process.exit(1);
|
|
350
352
|
});
|
|
351
|
-
plansCmd.command("update-phase <slug> <planId> <phaseId>").description("Update a phase").option("--title <title>", "Phase title").option("--status <status>", "Phase status (pending|in_progress|completed|skipped)").option("--notes <notes>", "Phase notes").option("--description <description>", "Phase description").action(async (slug, planId, phaseId, opts) => {
|
|
353
|
+
plansCmd.command("update-phase <slug> <planId> <phaseId>").description("Update a phase").option("--title <title>", "Phase title").option("--status <status>", "Phase status (pending|in_progress|completed|skipped)").option("--notes <notes>", "Phase notes").option("--description <description>", "Phase description").option("--detail-type <type>", "Detail type (e.g. agent_spec, document)").option("--detail-id <id>", "Detail ID (UUID of linked entity)").action(async (slug, planId, phaseId, opts) => {
|
|
352
354
|
const body = {};
|
|
353
355
|
if (opts.title) body.title = opts.title;
|
|
354
356
|
if (opts.status) body.status = opts.status;
|
|
355
357
|
if (opts.notes) body.notes = opts.notes;
|
|
356
358
|
if (opts.description) body.description = opts.description;
|
|
359
|
+
if (opts.detailType) body.detail_type = opts.detailType;
|
|
360
|
+
if (opts.detailId) body.detail_id = opts.detailId;
|
|
357
361
|
const res = await apiRequest(`/pebbles/${slug}/plans/${planId}/phases/${phaseId}`, {
|
|
358
362
|
method: "PUT",
|
|
359
363
|
body
|
|
@@ -418,24 +422,27 @@ conversationsCmd.command("delete <slug> <id>").description("Delete a conversatio
|
|
|
418
422
|
// src/commands/specs.ts
|
|
419
423
|
import { Command as Command9 } from "commander";
|
|
420
424
|
import { readFileSync as readFileSync4 } from "fs";
|
|
421
|
-
var specsCmd = new Command9("specs").description("Manage
|
|
422
|
-
specsCmd.command("list <slug>").description("List specs for a pebble").action(async (slug) => {
|
|
423
|
-
const
|
|
425
|
+
var specsCmd = new Command9("specs").description("Manage agent specs");
|
|
426
|
+
specsCmd.command("list <slug>").description("List specs for a pebble").option("--source <source>", "Filter by source (claude-code, superpowers, etc.)").action(async (slug, opts) => {
|
|
427
|
+
const params = {};
|
|
428
|
+
if (opts.source) params.source = opts.source;
|
|
429
|
+
const res = await apiRequest(`/pebbles/${slug}/agent-specs`, { params });
|
|
424
430
|
process.stdout.write(JSON.stringify(res) + "\n");
|
|
425
431
|
if (res.error) process.exit(1);
|
|
426
432
|
});
|
|
427
433
|
specsCmd.command("get <slug> <id>").description("Get a spec by ID").action(async (slug, id) => {
|
|
428
|
-
const res = await apiRequest(`/pebbles/${slug}/
|
|
434
|
+
const res = await apiRequest(`/pebbles/${slug}/agent-specs/${id}`);
|
|
429
435
|
process.stdout.write(JSON.stringify(res) + "\n");
|
|
430
436
|
if (res.error) process.exit(1);
|
|
431
437
|
});
|
|
432
|
-
specsCmd.command("create <slug> <title>").description("Create a spec").requiredOption("--spec-type <type>", "Spec type (e.g. brainstorm, plan, research)").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) => {
|
|
438
|
+
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) => {
|
|
433
439
|
const content = opts.file ? readFileSync4(opts.file, "utf-8") : opts.content ?? "";
|
|
434
|
-
const res = await apiRequest(`/pebbles/${slug}/
|
|
440
|
+
const res = await apiRequest(`/pebbles/${slug}/agent-specs`, {
|
|
435
441
|
method: "POST",
|
|
436
442
|
body: {
|
|
437
443
|
title,
|
|
438
444
|
spec_type: opts.specType,
|
|
445
|
+
source: opts.source,
|
|
439
446
|
content,
|
|
440
447
|
session_id: opts.sessionId ?? null
|
|
441
448
|
}
|
|
@@ -443,13 +450,14 @@ specsCmd.command("create <slug> <title>").description("Create a spec").requiredO
|
|
|
443
450
|
process.stdout.write(JSON.stringify(res) + "\n");
|
|
444
451
|
if (res.error) process.exit(1);
|
|
445
452
|
});
|
|
446
|
-
specsCmd.command("update <slug> <id>").description("Update a spec").option("--title <title>", "New title").option("--spec-type <type>", "New spec type").option("--content <content>", "New content").option("--file <path>", "Read content from file").action(async (slug, id, opts) => {
|
|
453
|
+
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) => {
|
|
447
454
|
const body = {};
|
|
448
455
|
if (opts.title) body.title = opts.title;
|
|
449
456
|
if (opts.specType) body.spec_type = opts.specType;
|
|
457
|
+
if (opts.source) body.source = opts.source;
|
|
450
458
|
if (opts.file) body.content = readFileSync4(opts.file, "utf-8");
|
|
451
459
|
else if (opts.content) body.content = opts.content;
|
|
452
|
-
const res = await apiRequest(`/pebbles/${slug}/
|
|
460
|
+
const res = await apiRequest(`/pebbles/${slug}/agent-specs/${id}`, {
|
|
453
461
|
method: "PUT",
|
|
454
462
|
body
|
|
455
463
|
});
|
|
@@ -457,7 +465,7 @@ specsCmd.command("update <slug> <id>").description("Update a spec").option("--ti
|
|
|
457
465
|
if (res.error) process.exit(1);
|
|
458
466
|
});
|
|
459
467
|
specsCmd.command("delete <slug> <id>").description("Delete a spec").action(async (slug, id) => {
|
|
460
|
-
const res = await apiRequest(`/pebbles/${slug}/
|
|
468
|
+
const res = await apiRequest(`/pebbles/${slug}/agent-specs/${id}`, {
|
|
461
469
|
method: "DELETE"
|
|
462
470
|
});
|
|
463
471
|
process.stdout.write(JSON.stringify(res) + "\n");
|