@mytegroupinc/myte-core 0.0.47 → 0.0.50
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 +110 -21
- package/cli.js +1883 -349
- package/lib/certification-manifest.js +178 -0
- package/package.json +8 -5
- package/scripts/feedback-certification-cleanup.js +53 -0
- package/scripts/feedback-live-full-harness.js +1355 -142
- package/scripts/project-assistant-read-certification.js +470 -0
package/README.md
CHANGED
|
@@ -9,25 +9,49 @@ Most users should install the public wrapper instead:
|
|
|
9
9
|
|
|
10
10
|
This package exists so the public wrapper can stay small and versioned cleanly. It is not the recommended public install target.
|
|
11
11
|
|
|
12
|
-
## Requirements
|
|
13
|
-
|
|
14
|
-
- Node `18+`
|
|
12
|
+
## Requirements
|
|
13
|
+
|
|
14
|
+
- Node `18.17+`
|
|
15
15
|
- `MYTE_API_KEY` for project-scoped commands
|
|
16
16
|
- `MYTEAI_API_KEY` for `myte ai`
|
|
17
17
|
- `MYTEAI_API_KEY` for `mytecody`
|
|
18
18
|
- `git` only when using `query --with-diff`
|
|
19
|
-
-
|
|
19
|
+
- The CLI uses Node built-ins for env loading, argument parsing, direct HTTP,
|
|
20
|
+
and local serialization. `undici` supplies portable
|
|
21
|
+
`HTTP_PROXY`/`HTTPS_PROXY`/`NO_PROXY` support across the supported Node
|
|
22
|
+
versions.
|
|
20
23
|
|
|
21
24
|
## Behavior Summary
|
|
22
25
|
|
|
26
|
+
- `myte doctor --json` performs read-only package, credential-presence, DNS,
|
|
27
|
+
TCP/TLS, authenticated config, proxy, and workspace checks without exposing
|
|
28
|
+
keys, proxy values, request bodies, or response bodies.
|
|
29
|
+
- `myte info` and `myte --version --verbose` show the wrapper/core topology,
|
|
30
|
+
runtime dependencies, expected npm graph size, and version compatibility.
|
|
31
|
+
- Network diagnostics preserve nested transport causes and distinguish DNS,
|
|
32
|
+
TCP, TLS/certificate, timeout, captive portal/non-JSON, authentication,
|
|
33
|
+
authorization, rate-limit, and server failures.
|
|
34
|
+
- Safe transient reads and query polling use bounded retries. Query creation
|
|
35
|
+
reuses one idempotency key across ambiguous retries.
|
|
23
36
|
- Snapshot-style commands such as `bootstrap`, `sync-qaqc`, `feedback-sync`, and `suggestions sync` write local `MyteCommandCenter` data.
|
|
37
|
+
- `feedback-sync` prefers stable ObjectId cursor pagination so concurrent
|
|
38
|
+
inserts cannot shift later pages. It remains compatible with older
|
|
39
|
+
offset-only API versions and rejects duplicate cross-page records instead of
|
|
40
|
+
committing an ambiguous local snapshot.
|
|
41
|
+
- `feedback-sync` keeps stable comment IDs and nests every comment attachment
|
|
42
|
+
under its originating comment. Readable text, Markdown, and DOCX attachment
|
|
43
|
+
context is materialized under
|
|
44
|
+
`MyteCommandCenter/feedback-sync/comment-attachments`; binary formats remain
|
|
45
|
+
visible as metadata-only context. Raw S3/object-storage URLs are not written
|
|
46
|
+
into local sync artifacts.
|
|
24
47
|
- `feedback status|edit|assign|archive|refine` writes reviewable local YAML artifacts.
|
|
25
48
|
- `feedback submit|revise|comment` are live writes that require `--confirm-write --approval-artifact <path>`.
|
|
26
49
|
- `feedback review|move|undo|apply` are governed writes with backend permission checks but no approval artifact flags.
|
|
27
50
|
- `feedback-sync|get|history|reviews|prd-versions|prd-diff|validate` are read/sync/validation commands with no approval artifact flags.
|
|
28
51
|
- `feedback move|comment|undo|prd-versions|prd-diff|history` calls the project-key Feedback API while leaving lifecycle rules and permissions server-side. `feedback move --feedback-ids` sends one batch move request.
|
|
29
52
|
- `feedback validate|apply` remains available for validation and owner-direct apply paths; live authorization, stale checks, and history stay server-side.
|
|
30
|
-
- `query --with-diff` requires project repos to be configured for diff collection and fails fast when no matching local project repo can be resolved.
|
|
53
|
+
- `query --with-diff` requires project repos to be configured for diff collection and fails fast when no matching local project repo can be resolved.
|
|
54
|
+
- `query --json` returns the stable request ID, query job ID, answer, context-block count payload, and telemetry without echoing the query text.
|
|
31
55
|
- Public package documentation is intentionally minimal. Internal rollout and design notes are not part of the npm package contract.
|
|
32
56
|
- `mytecody` is a model-agnostic MyteCody team launcher. It supports `doctor`,
|
|
33
57
|
`doctor --probe-gateway`, `update --dry-run`, and `update`. On first coding
|
|
@@ -60,7 +84,11 @@ Only selected project-key writes require a server-validated approval envelope. T
|
|
|
60
84
|
- In plain language, the artifact is the human-reviewed record of the exact write the agent is about to send. It is not a permission grant and it does not bypass project owner/delegate checks, idempotency, stale-state guards, validation, or audit.
|
|
61
85
|
- Minimum artifact contents are the exact command, every target id or PRD item, a complete proposed-change summary, a reason, and `batch_count` when one command sends multiple items.
|
|
62
86
|
- Mission edit/create batches use `suggestions create` or `suggestions revise`; list every item, including `change_type`, `mission_id` for updates, proposed title/description for creates, and `suggestion_id` plus expected revision for revisions.
|
|
63
|
-
-
|
|
87
|
+
- Without `--document-set`, `create-prd fileA.md fileB.md ...` creates
|
|
88
|
+
independent Feedback items as before. With `--document-set`, one to three
|
|
89
|
+
Markdown files of at most 250,000 characters each create one parent Feedback
|
|
90
|
+
with ordered PRD documents. List every file/title/client ref and the matching
|
|
91
|
+
count in the approval artifact.
|
|
64
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.
|
|
65
93
|
- 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.
|
|
66
94
|
- `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.
|
|
@@ -78,6 +106,9 @@ Coding agents should treat `MYTE_API_KEY` as a project-scoped Project Assistant
|
|
|
78
106
|
- Use `suggestions sync` only when you need to refresh mission review-thread state without refreshing the full board.
|
|
79
107
|
- Use `query --with-diff` for project-scoped code review, planning, and implementation questions.
|
|
80
108
|
- Use `create-prd` only with reviewed markdown files and `--confirm-write --approval-artifact <path>`. The markdown file body is the PRD document; `description` is only the short board/card summary.
|
|
109
|
+
- Use `create-prd --document-set` only when the explicit intent is one parent
|
|
110
|
+
Feedback with one to three ordered documents; omitting it preserves
|
|
111
|
+
independent multi-file creation.
|
|
81
112
|
- Use `feedback status|edit|assign|archive|refine` for reviewable local artifacts. `feedback submit` and `feedback revise` require an approval artifact; `feedback review` does not because the backend owner/delegate decision is the approval control.
|
|
82
113
|
- Use `feedback review --request-ids` for batch owner/delegate decisions; it sends one grouped backend batch, not one request per item.
|
|
83
114
|
- Use `suggestions create` for both existing-mission edits and new-mission proposals, with `--confirm-write --approval-artifact <path>`. The only valid `change_type` values are `update` and `create`.
|
|
@@ -102,14 +133,46 @@ PRD document contract:
|
|
|
102
133
|
- The UI renders the PRD from stored PRD text/document content, not from `description`.
|
|
103
134
|
- Renderer-friendly PRDs should use one `# Title`, `##` sections, concise paragraphs, bullets, GitHub tables/checklists where useful, and fenced code blocks only for real code/config.
|
|
104
135
|
- Do not wrap the whole PRD in a ` ```markdown ` fence. Do not use raw HTML, inline style blocks, or decorative banners.
|
|
105
|
-
- PRD identity is explicit: `myte create-prd` creates a PRD asset with PRD metadata. Generic uploaded `.md`, `.docx`, `.pdf`, and `.txt` files remain normal attachments unless explicitly created as PRDs.
|
|
106
|
-
|
|
107
|
-
|
|
136
|
+
- PRD identity is explicit: `myte create-prd` creates a PRD asset with PRD metadata. Generic uploaded `.md`, `.docx`, `.pdf`, and `.txt` files remain normal attachments unless explicitly created as PRDs.
|
|
137
|
+
- Document sets retain exact source Markdown plus canonical rendering
|
|
138
|
+
Markdown, stable document IDs, per-document hashes, and independent
|
|
139
|
+
download/read targets.
|
|
140
|
+
|
|
141
|
+
## Project Assistant Connectivity
|
|
142
|
+
|
|
143
|
+
`myte doctor --json` should be the first diagnostic when a command reports
|
|
144
|
+
`fetch failed`. A DNS or TCP result means the request did not reach HTTP. A
|
|
145
|
+
TLS reset means the secure connection was interrupted before Myte could
|
|
146
|
+
receive the API key. Authentication and authorization are reported only when
|
|
147
|
+
the API actually returns those responses.
|
|
148
|
+
|
|
149
|
+
The CLI honors `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`. It does not log
|
|
150
|
+
their values and does not disable TLS verification. Captive portals and
|
|
151
|
+
intercepting gateways are reported as non-JSON/HTML transport failures rather
|
|
152
|
+
than as malformed Myte API responses.
|
|
108
153
|
|
|
109
|
-
|
|
110
|
-
|
|
154
|
+
Feedback comment support:
|
|
155
|
+
|
|
156
|
+
- `feedback-sync` includes existing feedback comments with `comment_id`,
|
|
157
|
+
sender, content, timestamps, and attachments nested under the originating
|
|
158
|
+
comment.
|
|
159
|
+
- Readable text, Markdown, and DOCX comment attachments are extracted by the
|
|
160
|
+
backend under attachment safety limits and written to
|
|
161
|
+
`MyteCommandCenter/feedback-sync/comment-attachments/<feedback>/<comment>/`.
|
|
162
|
+
The local YAML points to the file. Unsupported binary formats remain listed
|
|
163
|
+
with `context_status: metadata_only`. Extraction is capped at 20 readable
|
|
164
|
+
comment attachments per API page by default; additional readable files stay
|
|
165
|
+
linked to their comments with `context_status: deferred`. Use
|
|
166
|
+
`--comment-attachment-limit <0-100>` to change that bounded limit.
|
|
167
|
+
- `--no-with-prd-text` disables readable PRD and comment-attachment extraction
|
|
168
|
+
while retaining comment and attachment metadata.
|
|
169
|
+
- Feedback-specific comment creation exists in the web backend at `/api/feedbacks/<feedback_id>/comments`, protected by JWT/project assignment.
|
|
111
170
|
- Project-key comment creation is available through `myte feedback comment --feedback-id <id> --body "..." --confirm-write --approval-artifact ./comment.md` or `--body-file ./comment.md --confirm-write --approval-artifact ./comment.md`.
|
|
112
|
-
- The project-key feedback comment endpoint is text-only in this slice and caps content at 500,000 characters. Use the web UI when comment attachments are required.
|
|
171
|
+
- The project-key feedback comment endpoint is text-only in this slice and caps content at 500,000 characters. Use the web UI when comment attachments are required.
|
|
172
|
+
- `feedback apply --force` is an owner/elevated emergency override for a stale
|
|
173
|
+
local artifact. It requires the artifact to contain a non-empty reason and
|
|
174
|
+
returns the persisted force/warning audit context; normal edits should use
|
|
175
|
+
submit followed by owner/elevated review.
|
|
113
176
|
|
|
114
177
|
## Mission Action Map
|
|
115
178
|
|
|
@@ -200,16 +263,42 @@ Agent rule: never guess `suggestion_id`. If `mission-ops.yml` is missing or stal
|
|
|
200
263
|
| `feedback history` | Lists audited feedback board/refinement events. | Read-only; backend checks project access. |
|
|
201
264
|
| `feedback validate` | Sends an artifact to backend validation without mutation. | Useful before submit or owner-direct apply. |
|
|
202
265
|
| `feedback apply` | Applies an artifact through the owner-direct/emergency path. | No approval artifact required; not the normal collaborator flow; normal flow is `submit` -> `review`. |
|
|
266
|
+
|
|
267
|
+
Canonical feedback lifecycle states are `frozen`, `todo`, `in_progress`, `in_review`, `completed`, `deployed`, `rejected`, and `archived`.
|
|
268
|
+
|
|
269
|
+
### Feedback Permission Matrix
|
|
270
|
+
|
|
271
|
+
| Project role | Feedback permissions |
|
|
272
|
+
| --- | --- |
|
|
273
|
+
| Project Owner | Full Feedback lifecycle: view/sync/comment, draft/validate/submit, direct apply, approve/request changes/reject/cancel reviews, assignment, governed board states, archive, version history, and diffs. |
|
|
274
|
+
| Elevated collaborator (`owner_delegate`) | Same operational Feedback authority as the Project Owner, including direct apply, approval, assignment, governed board states, and archive. Project-level privilege grant/revoke and unrelated destructive infrastructure operations remain real-owner controls. |
|
|
275
|
+
| Builder collaborator | View/sync/comment, create and validate local edits, submit/revise/cancel their review requests, self-assign, and move active work through `todo`, `in_progress`, `in_review`, and `completed`. Cannot approve, directly apply, unassign others, archive, reject, freeze, or deploy Feedback. |
|
|
276
|
+
| Client collaborator | View/sync and participate in Feedback discussion. Does not receive builder edit, submit, assignment, or board-operation capabilities. |
|
|
277
|
+
| Organisation owner not assigned to the project | View access only; no project Feedback mutation authority. |
|
|
278
|
+
|
|
279
|
+
Stale local artifacts fail validation/apply with `snapshot_mismatch`. Re-sync,
|
|
280
|
+
review the newer server state, and create a fresh artifact; `force` is not part
|
|
281
|
+
of the normal collaborator workflow.
|
|
203
282
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
283
|
+
Reusable live smoke harness after deploy:
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
node ./scripts/feedback-live-full-harness.js --confirm-live --base-url https://api.myte.dev/api
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
For strict owner/elevated/builder permission certification, set distinct
|
|
290
|
+
`MYTE_OWNER_API_KEY`, `MYTE_DELEGATE_API_KEY`, and
|
|
291
|
+
`MYTE_COLLABORATOR_API_KEY` values scoped to the same test project and add
|
|
292
|
+
`--require-role-matrix`. To certify a real web-created comment attachment,
|
|
293
|
+
provide an ephemeral `MYTE_WEB_ACCESS_TOKEN` for an assigned test user and add
|
|
294
|
+
`--require-comment-attachment-sync`.
|
|
295
|
+
|
|
296
|
+
The harness creates five disposable `TEST` feedback items plus one
|
|
297
|
+
three-document Feedback item. It verifies comment sync, optional comment
|
|
298
|
+
attachment materialization, stale-artifact rejection and fresh re-sync,
|
|
299
|
+
request-changes/revise, owner and elevated approvals, regular collaborator
|
|
300
|
+
denials, batch review and board movement, per-document refinement/version diff,
|
|
301
|
+
exact-ID archival, archived sync exclusion, and project-key unarchive denial.
|
|
213
302
|
|
|
214
303
|
## Direct Project API Surface
|
|
215
304
|
|