@mytegroupinc/myte-core 0.0.53 → 0.0.54
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/README.md +5 -2
- package/cli.js +52 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ This package exists so the public wrapper can stay small and versioned cleanly.
|
|
|
44
44
|
`MyteCommandCenter/feedback-sync/comment-attachments`; binary formats remain
|
|
45
45
|
visible as metadata-only context. Raw S3/object-storage URLs are not written
|
|
46
46
|
into local sync artifacts.
|
|
47
|
-
- `feedback status|edit|assign|archive|refine` writes reviewable local YAML artifacts.
|
|
47
|
+
- `feedback status|edit|document-add|assign|archive|refine` writes reviewable local YAML artifacts.
|
|
48
48
|
- `feedback submit|revise|comment` are live writes that require `--confirm-write --approval-artifact <path>`.
|
|
49
49
|
- `feedback review|move|undo|apply` are governed writes with backend permission checks but no approval artifact flags.
|
|
50
50
|
- `feedback-sync|get|history|reviews|prd-versions|prd-diff|validate` are read/sync/validation commands with no approval artifact flags.
|
|
@@ -90,6 +90,8 @@ Only selected project-key writes require a server-validated approval envelope. T
|
|
|
90
90
|
with ordered PRD documents. List every file/title/client ref and the matching
|
|
91
91
|
count in the approval artifact.
|
|
92
92
|
- Feedback submit/revise/comment artifacts are usually the same YAML or markdown file being submitted. For inline text or stdin, use a separate approval memo with the feedback id or request id and exact content.
|
|
93
|
+
- `feedback document-add --feedback-id <id> --prd-file ./document.md` creates a governed proposal to append one linked PRD document to the existing Feedback context. The addition is not live until the normal `feedback submit` -> owner/delegate `feedback review` flow applies it.
|
|
94
|
+
- Governed document additions preserve existing document IDs, append a new stable document, create a new immutable PRD version, and emit `feedback_prd_document_added` so the Feedback context bubble/notification feed can link users back to the updated PRD context. Existing PRD sets may grow to twelve documents; new `create-prd --document-set` uploads remain capped at three.
|
|
93
95
|
- Team, owner, and client update artifacts should name the audience and include the exact message body or a complete summary. Client updates should include target contact ids when used.
|
|
94
96
|
- `feedback review --request-ids`, `feedback move --feedback-ids`, `mission status --mission-ids`, `mission archive --mission-ids`, and `run-qaqc --mission-ids` are batched governed writes, but they are marked `Not required` and should not receive approval artifact flags.
|
|
95
97
|
- The package does not bundle the large MyteCody engine binary or the async
|
|
@@ -249,7 +251,8 @@ Agent rule: never guess `suggestion_id`. If `mission-ops.yml` is missing or stal
|
|
|
249
251
|
| `feedback-sync` | Pulls non-archived feedback metadata, comments, and PRD context into `MyteCommandCenter`. | Read-only project-key API call; archived Feedback is intentionally excluded. |
|
|
250
252
|
| `feedback get` | Reads one feedback item's current server snapshot and `snapshot_hash`. | Read-only; backend checks project access. |
|
|
251
253
|
| `feedback status` | Creates a local YAML proposal to change canonical lifecycle state. | No live mutation until `submit` and owner/delegate review, except owner-direct `apply`. |
|
|
252
|
-
| `feedback edit` / `feedback refine` | Creates a local YAML proposal for title, description/body, priority, due date, tags, or notes. | Content changes go through owner-review membrane. |
|
|
254
|
+
| `feedback edit` / `feedback refine` | Creates a local YAML proposal for title, description/body, priority, due date, tags, or notes. | Content changes go through owner-review membrane. |
|
|
255
|
+
| `feedback document-add` | Creates a local YAML proposal to append one linked Markdown PRD document to an existing Feedback item. | Owner-only field; normal submit/review/apply flow, stale protection, idempotency, version history, and notification apply. |
|
|
253
256
|
| `feedback assign` | Creates a local YAML proposal to change assignee. | Goes through review unless applied through owner-direct path. |
|
|
254
257
|
| `feedback archive` | Creates a local YAML proposal to archive. | Archive is governed by backend owner/delegate capability. |
|
|
255
258
|
| `feedback submit` | Sends a local proposal artifact to the backend as a review request. | Requires `--confirm-write --approval-artifact <path>`; does not mutate live feedback before approval. |
|
package/cli.js
CHANGED
|
@@ -220,6 +220,7 @@ function printHelp() {
|
|
|
220
220
|
" myte feedback history --feedback-id <id> [--limit 50] [--json]",
|
|
221
221
|
" myte feedback status --feedback-id <id> --status frozen|todo|in_progress|in_review|completed|deployed|rejected|archived --reason \"...\"",
|
|
222
222
|
" myte feedback edit --feedback-id <id> [--title \"...\"] [--feedback-text \"...\"] [--prd-file ./document.md] [--document-id <id>] [--priority High] [--reason \"...\"]",
|
|
223
|
+
" myte feedback document-add --feedback-id <id> --prd-file ./document.md [--title \"...\"] [--filename name.md] [--client-ref ref] [--reason \"...\"]",
|
|
223
224
|
" myte feedback assign --feedback-id <id> --user-id <id> [--reason \"...\"]",
|
|
224
225
|
" myte feedback archive --feedback-id <id> --reason \"...\"",
|
|
225
226
|
" myte feedback submit --file ./MyteCommandCenter/reviews/feedback/<id>-edit.yml --confirm-write --approval-artifact <path> [--json]",
|
|
@@ -354,6 +355,7 @@ function printHelp() {
|
|
|
354
355
|
" - get/history read current feedback snapshots and audited event history through the project-key API",
|
|
355
356
|
" - prd-versions/prd-diff expose retained PRD versions and backend-generated per-document text diffs",
|
|
356
357
|
" - edit/refine with --prd-file updates a review artifact only; --document-id targets one document in a PRD document set",
|
|
358
|
+
" - document-add creates a governed review artifact that appends one linked PRD document; approval applies it through the same stale-safe PRD version flow",
|
|
357
359
|
" - validate/apply send artifacts to /api/project-assistant/feedback/<id>/refinement/* for validation or owner-direct apply",
|
|
358
360
|
" - The backend owns authorization, stale snapshot checks, allowed field/transition rules, and history",
|
|
359
361
|
" - apply is idempotent and does not rewrite local feedback.yml; run feedback-sync after apply to refresh local state",
|
|
@@ -379,7 +381,8 @@ function printHelp() {
|
|
|
379
381
|
" - reviews: list open/terminal/all requests or inspect one request",
|
|
380
382
|
" - review: approve, reject, request_changes, or cancel; backend restricts this to owner/delegate capability",
|
|
381
383
|
" - move: direct audited board movement for allowed states; governed transitions remain backend-authorized",
|
|
382
|
-
" -
|
|
384
|
+
" - document-add: create a governed proposal to append one linked PRD document to an existing Feedback item",
|
|
385
|
+
" - comment: create a text-only comment on one Feedback item",
|
|
383
386
|
" - undo: reverse an audited board event when conflict checks allow it",
|
|
384
387
|
" - prd-versions: list retained PRD baselines/revisions for a feedback item",
|
|
385
388
|
" - prd-diff: fetch backend-generated text diff between PRD versions",
|
|
@@ -474,6 +477,7 @@ function printHelp() {
|
|
|
474
477
|
" myte feedback review --request-id 507f1f77bcf86cd799439022 --action approve --reason \"Looks correct\" --json",
|
|
475
478
|
" myte feedback move --feedback-id 507f1f77bcf86cd799439011 --to-state in_progress --reason \"Started\" --json",
|
|
476
479
|
" myte feedback comment --feedback-id 507f1f77bcf86cd799439011 --body-file ./comments/implementation.md --confirm-write --approval-artifact ./comments/implementation.md --json",
|
|
480
|
+
" myte feedback document-add --feedback-id 507f1f77bcf86cd799439011 --prd-file ./drafts/sidebar-branding.md --title \"Individual Use Sidebar Branding\" --reason \"Link governed UX addendum to the Feedback context.\"",
|
|
477
481
|
" myte feedback validate --file ./MyteCommandCenter/reviews/feedback/507f1f77bcf86cd799439011-status.yml --json",
|
|
478
482
|
" myte feedback apply --file ./MyteCommandCenter/reviews/feedback/507f1f77bcf86cd799439011-status.yml --json",
|
|
479
483
|
" myte suggestions create --file ./suggestions/create.yml --confirm-write --approval-artifact ./suggestions/create.yml",
|
|
@@ -6653,7 +6657,50 @@ async function buildFeedbackDraftForCommand(args, subcommand) {
|
|
|
6653
6657
|
process.exit(1);
|
|
6654
6658
|
}
|
|
6655
6659
|
changes.assigned_user_id = feedbackChange(firstNonEmptyString(item.assigned_user_id), assignee);
|
|
6656
|
-
} else if (action === "
|
|
6660
|
+
} else if (action === "document-add") {
|
|
6661
|
+
const prdFile = firstNonEmptyString(
|
|
6662
|
+
args["prd-file"],
|
|
6663
|
+
args.prdFile,
|
|
6664
|
+
args.prd_file,
|
|
6665
|
+
args["document-file"],
|
|
6666
|
+
args.documentFile,
|
|
6667
|
+
args.document_file,
|
|
6668
|
+
args._?.[2],
|
|
6669
|
+
);
|
|
6670
|
+
if (!prdFile) {
|
|
6671
|
+
console.error("Missing --prd-file for feedback document-add.");
|
|
6672
|
+
process.exit(1);
|
|
6673
|
+
}
|
|
6674
|
+
const proposedPath = resolveInputFile(prdFile, "PRD document addition");
|
|
6675
|
+
const proposedMarkdown = fs.readFileSync(proposedPath, "utf8");
|
|
6676
|
+
if (!proposedMarkdown.trim()) {
|
|
6677
|
+
console.error("PRD document markdown cannot be empty.");
|
|
6678
|
+
process.exit(1);
|
|
6679
|
+
}
|
|
6680
|
+
if (proposedMarkdown.length > 250000) {
|
|
6681
|
+
console.error("PRD document markdown must be at most 250000 characters.");
|
|
6682
|
+
process.exit(1);
|
|
6683
|
+
}
|
|
6684
|
+
const filename = firstNonEmptyString(
|
|
6685
|
+
args.filename,
|
|
6686
|
+
args["file-name"],
|
|
6687
|
+
args.fileName,
|
|
6688
|
+
path.basename(proposedPath),
|
|
6689
|
+
);
|
|
6690
|
+
const derivedTitle = firstNonEmptyString(
|
|
6691
|
+
args.title,
|
|
6692
|
+
String(proposedMarkdown.match(/^#\s+(.+)$/m)?.[1] || "").trim(),
|
|
6693
|
+
path.basename(proposedPath, path.extname(proposedPath)),
|
|
6694
|
+
"Linked PRD document",
|
|
6695
|
+
);
|
|
6696
|
+
const clientRef = firstNonEmptyString(args["client-ref"], args.clientRef, args.client_ref, filename);
|
|
6697
|
+
changes.prd_document_addition = feedbackChange(null, {
|
|
6698
|
+
source_markdown: proposedMarkdown,
|
|
6699
|
+
title: derivedTitle,
|
|
6700
|
+
filename,
|
|
6701
|
+
client_ref: clientRef,
|
|
6702
|
+
});
|
|
6703
|
+
} else if (action === "edit" || action === "refine") {
|
|
6657
6704
|
const title = firstNonEmptyString(args.title);
|
|
6658
6705
|
if (title) changes.title = feedbackChange(firstNonEmptyString(item.title), title);
|
|
6659
6706
|
|
|
@@ -6730,7 +6777,7 @@ async function buildFeedbackDraftForCommand(args, subcommand) {
|
|
|
6730
6777
|
}
|
|
6731
6778
|
}
|
|
6732
6779
|
} else {
|
|
6733
|
-
console.error("Unknown feedback draft command. Use status, edit, assign, archive, or refine.");
|
|
6780
|
+
console.error("Unknown feedback draft command. Use status, edit, document-add, assign, archive, or refine.");
|
|
6734
6781
|
process.exit(1);
|
|
6735
6782
|
}
|
|
6736
6783
|
|
|
@@ -7640,7 +7687,7 @@ async function runFeedback(args) {
|
|
|
7640
7687
|
printHelp();
|
|
7641
7688
|
return;
|
|
7642
7689
|
}
|
|
7643
|
-
if (["status", "edit", "assign", "archive", "refine"].includes(subcommand)) {
|
|
7690
|
+
if (["status", "edit", "document-add", "assign", "archive", "refine"].includes(subcommand)) {
|
|
7644
7691
|
await buildFeedbackDraftForCommand(args, subcommand);
|
|
7645
7692
|
return;
|
|
7646
7693
|
}
|
|
@@ -7688,7 +7735,7 @@ async function runFeedback(args) {
|
|
|
7688
7735
|
await runFeedbackGetOrHistory(args, subcommand);
|
|
7689
7736
|
return;
|
|
7690
7737
|
}
|
|
7691
|
-
console.error("Unknown feedback command. Use status, edit, assign, archive, submit, revise, reviews, review, move, comment, undo, prd-versions, prd-diff, get, history, validate, or apply.");
|
|
7738
|
+
console.error("Unknown feedback command. Use status, edit, document-add, assign, archive, submit, revise, reviews, review, move, comment, undo, prd-versions, prd-diff, get, history, validate, or apply.");
|
|
7692
7739
|
process.exit(1);
|
|
7693
7740
|
}
|
|
7694
7741
|
|