@mediamonks/canopy-cli 0.7.38 → 0.7.40

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 (49) hide show
  1. package/README.md +5 -2
  2. package/dist/{ai-CjvrcBIz.mjs → ai-EyrXJC5z.mjs} +2 -2
  3. package/dist/{api-BPEYm9ts.mjs → api-ArfD6-t5.mjs} +40 -5
  4. package/dist/{browse-CBelCgnW.mjs → browse-DEhnJAPT.mjs} +1 -1
  5. package/dist/{db-CbqgjfYz.mjs → db-DGrCgj-R.mjs} +3 -3
  6. package/dist/{deploy-CqCyry4o.mjs → deploy-B7KItUnh.mjs} +3 -3
  7. package/dist/{dev-BtnEuAnS.mjs → dev-03LA_Etx.mjs} +7 -7
  8. package/dist/dev-dJ88L73Y.mjs +2 -0
  9. package/dist/{dev-worker-CpSB_Okh.mjs → dev-worker-D78leKBJ.mjs} +30 -2
  10. package/dist/docs/cli-dev.md +1 -1
  11. package/dist/docs/cli-feedback.md +32 -4
  12. package/dist/docs/developers-architecture.md +17 -5
  13. package/dist/docs/platform-client-access.md +8 -0
  14. package/dist/docs/platform-schedules.md +21 -0
  15. package/dist/docs/porting-nextjs.md +13 -8
  16. package/dist/docs/sdk-auth.md +32 -0
  17. package/dist/docs/sdk-mcp.md +5 -4
  18. package/dist/{docs-T1nuu00A.mjs → docs-B0-IEPjd.mjs} +7 -3
  19. package/dist/{egress-ButFsQ2N.mjs → egress-CzxRD6Tp.mjs} +2 -2
  20. package/dist/{feedback-C5NKCOXQ.mjs → feedback-BsJ_6ke2.mjs} +361 -17
  21. package/dist/index.mjs +31 -31
  22. package/dist/{local-BfqTheMP.mjs → local-CkS1XhRu.mjs} +3 -3
  23. package/dist/{login-CtDWXICZ.mjs → login-B2FJGIrD.mjs} +24 -7
  24. package/dist/{logs-BltUi4Gp.mjs → logs-wSKh_FmL.mjs} +3 -3
  25. package/dist/{mcp-BwLRcfqz.mjs → mcp-DtRIDtaL.mjs} +2 -2
  26. package/dist/{migrations-CF1iNZ7F.mjs → migrations-CG_O5Ghw.mjs} +1 -1
  27. package/dist/{open-DXo60Ikf.mjs → open-COFMburt.mjs} +1 -1
  28. package/dist/{package-CdDH35SE.mjs → package-C1xCnyOB.mjs} +1 -1
  29. package/dist/project-template-DlzMx8Oj.mjs +2 -0
  30. package/dist/{project-template-BEr_tgIY.mjs → project-template-DtTfXyLI.mjs} +2 -2
  31. package/dist/{projects-Bm4oTodB.mjs → projects-B3Wi01lw.mjs} +4 -4
  32. package/dist/{repo-CE22HpqZ.mjs → repo-4x-CJwCp.mjs} +6 -3
  33. package/dist/repo-CmbakFVi.mjs +2 -0
  34. package/dist/{schedule-DdMq5eXC.mjs → schedule-CbaDIJXr.mjs} +2 -2
  35. package/dist/{secrets-BOKuWBYV.mjs → secrets-CmY4dUHz.mjs} +2 -2
  36. package/dist/skill/canopy/SKILL.md +7 -4
  37. package/dist/{skill-3wOwhzDx.mjs → skill-AqZYYsE6.mjs} +2 -2
  38. package/dist/{src-CxzGOEhP.mjs → src-RUf3Gfuh.mjs} +6 -2
  39. package/dist/{staging-CU4QrzFX.mjs → staging-ypR79MlD.mjs} +2 -2
  40. package/dist/templates/spa/package.json +1 -1
  41. package/dist/templates/worker/package.json +1 -1
  42. package/dist/{token-BWnLsWLg.mjs → token-CDrHQ5Xb.mjs} +2 -2
  43. package/dist/{ui-CHfKV6lG.mjs → ui-CaHgvvkJ.mjs} +1 -1
  44. package/dist/{upgrade-BJ2dWjCG.mjs → upgrade-DSjmifH_.mjs} +2 -2
  45. package/dist/{usage-Cqqvnzrf.mjs → usage-CP8rBVZi.mjs} +2 -2
  46. package/package.json +2 -2
  47. package/dist/dev-D_qzeLng.mjs +0 -2
  48. package/dist/project-template-DdT0dqpn.mjs +0 -2
  49. package/dist/repo-DlYX_1tN.mjs +0 -2
@@ -1,8 +1,8 @@
1
1
  import { n as siteConfig, s as projectUrl, u as tryReadCanopyJson } from "./site-DM2J10CB.mjs";
2
- import { i as apiRequest, o as withContext } from "./api-BPEYm9ts.mjs";
3
- import { a as unwrap, i as requireTty, r as reportErrors } from "./ui-CHfKV6lG.mjs";
4
- import { i as nextSteps, n as describeCopy, r as fetchTemplate, t as TEMPLATE_FIXES } from "./project-template-BEr_tgIY.mjs";
5
- import { i as offerRepoOnCreate, n as cloneProjectRepo } from "./repo-CE22HpqZ.mjs";
2
+ import { a as apiRequest, l as withContext } from "./api-ArfD6-t5.mjs";
3
+ import { a as unwrap, i as requireTty, r as reportErrors } from "./ui-CaHgvvkJ.mjs";
4
+ import { i as nextSteps, n as describeCopy, r as fetchTemplate, t as TEMPLATE_FIXES } from "./project-template-DtTfXyLI.mjs";
5
+ import { i as offerRepoOnCreate, n as cloneProjectRepo } from "./repo-4x-CJwCp.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
8
8
  import { join, relative, resolve, sep } from "node:path";
@@ -1,6 +1,6 @@
1
1
  import { a as projectDirArgs, c as resolveProject, n as siteConfig, u as tryReadCanopyJson } from "./site-DM2J10CB.mjs";
2
- import { i as apiRequest, o as withContext } from "./api-BPEYm9ts.mjs";
3
- import { a as unwrap, i as requireTty, r as reportErrors, t as formatDateTime } from "./ui-CHfKV6lG.mjs";
2
+ import { a as apiRequest, l as withContext, n as agentHeaders } from "./api-ArfD6-t5.mjs";
3
+ import { a as unwrap, i as requireTty, r as reportErrors, t as formatDateTime } from "./ui-CaHgvvkJ.mjs";
4
4
  import { a as parseCredentialInput, i as helperCommand, o as runCredentialHelper, r as fileTokenCache, t as RepoCredentialError } from "./repo-credential-CNDRM-tG.mjs";
5
5
  import { defineCommand } from "citty";
6
6
  import { existsSync, realpathSync } from "node:fs";
@@ -322,7 +322,10 @@ async function mintRepoToken(profile, slug) {
322
322
  const path = `/projects/${encodeURIComponent(slug)}/repo/token`;
323
323
  const res = await fetch(`${config.apiUrl}/control/v1${path}`, {
324
324
  method: "POST",
325
- headers: { authorization: `Bearer ${config.token}` }
325
+ headers: {
326
+ authorization: `Bearer ${config.token}`,
327
+ ...agentHeaders()
328
+ }
326
329
  }).catch(() => null);
327
330
  if (!res) throw new RepoCredentialError(`could not reach Canopy (${config.apiUrl}).`);
328
331
  if (res.status === 201) return await res.json();
@@ -0,0 +1,2 @@
1
+ import { a as repoCommand } from "./repo-4x-CJwCp.mjs";
2
+ export { repoCommand };
@@ -1,6 +1,6 @@
1
1
  import { c as resolveProject, o as projectFlagArgs } from "./site-DM2J10CB.mjs";
2
- import { i as apiRequest, o as withContext } from "./api-BPEYm9ts.mjs";
3
- import { r as reportErrors, t as formatDateTime } from "./ui-CHfKV6lG.mjs";
2
+ import { a as apiRequest, l as withContext } from "./api-ArfD6-t5.mjs";
3
+ import { r as reportErrors, t as formatDateTime } from "./ui-CaHgvvkJ.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  //#region src/schedule.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import { a as projectDirArgs, c as resolveProject } from "./site-DM2J10CB.mjs";
2
- import { i as apiRequest, o as withContext } from "./api-BPEYm9ts.mjs";
3
- import { a as unwrap, r as reportErrors, t as formatDateTime } from "./ui-CHfKV6lG.mjs";
2
+ import { a as apiRequest, l as withContext } from "./api-ArfD6-t5.mjs";
3
+ import { a as unwrap, r as reportErrors, t as formatDateTime } from "./ui-CaHgvvkJ.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  import * as p from "@clack/prompts";
6
6
  //#region src/secrets.ts
@@ -107,7 +107,7 @@ and never go stale.
107
107
  - Use AI (`canopy.ai`): run `canopy ai models` before naming a model in code.
108
108
  Prefer the aliases `auto/low` (default) / `auto/mid` / `auto/high` over
109
109
  hard-coded ids — model ids outside that list are refused.
110
- - Work bug reports & feedback: `canopy feedback list | show | comment | status | report`
110
+ - Work bug reports & feedback: `canopy feedback list | show | comment | note | status | report | watch`
111
111
  — see [Working feedback reports](#working-feedback-reports-issues) below
112
112
  - CI credentials: `canopy token create | list | revoke`
113
113
  - Git: `canopy repo show --json` (is there a repository, and its remote) ·
@@ -127,15 +127,18 @@ short version:
127
127
  `canopy feedback show <id>` has the body, captured context, and comment
128
128
  trail. The context includes the deploy version that served the bug —
129
129
  reproduce against that, not whatever is live now. The id is enough on its
130
- own — `show`, `comment`, `status`, and `attach` work from any directory,
130
+ own — `show`, `comment`, `note`, `status`, and `attach` work from any directory,
131
131
  no `--project` needed.
132
132
  - Investigated ≠ fixed: write findings with
133
133
  `canopy feedback status <id> investigated --comment "<root cause>"`.
134
134
  - **`accepted` means a person said "build this."** Never set it on your own —
135
135
  only when the user you're working with says to build the thing.
136
136
  - Put tech-heavy notes (stack traces, table names, root-cause detail) in an
137
- internal comment (`canopy feedback comment <id> "…" --internal`) so they
138
- never reach the reporter.
137
+ internal note (`canopy feedback note <id> "…"`, same as `comment --internal`)
138
+ so they never reach the reporter.
139
+ - `canopy feedback watch [--project <slug>]… [--json]` follows new reports,
140
+ comments and status changes live; it reconnects by itself. With `--json`
141
+ each line carries an `id` cursor — restart with `--after <id>` to resume.
139
142
  - Resolve only once the fix is actually live, and name the version:
140
143
  `canopy feedback status <id> resolved --comment "fixed in v42"`. Attach
141
144
  proof when it's visual: `canopy feedback attach <id> ./after-fix.png`.
@@ -1,5 +1,5 @@
1
- import { t as version } from "./package-CdDH35SE.mjs";
2
- import { r as reportErrors } from "./ui-CHfKV6lG.mjs";
1
+ import { t as version } from "./package-C1xCnyOB.mjs";
2
+ import { r as reportErrors } from "./ui-CaHgvvkJ.mjs";
3
3
  import { defineCommand } from "citty";
4
4
  import { cpSync, existsSync, mkdirSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
5
5
  import { homedir } from "node:os";
@@ -852,11 +852,15 @@ function realtimeRouter(config) {
852
852
  * `worker-request.cases.ts` alongside this implementation, so the two cannot
853
853
  * drift silently.
854
854
  */
855
- /** Gateway-stamped identity, for the worker's own `env.USER` — never relayed. */
855
+ /** Gateway-stamped identity, for the worker's own `env.USER` / `env.CALLER` — never relayed. */
856
856
  const IDENTITY_STAMP_HEADERS = [
857
857
  "x-canopy-user-sub",
858
858
  "x-canopy-user-email",
859
- "x-canopy-user-name"
859
+ "x-canopy-user-name",
860
+ "x-canopy-identity-kind",
861
+ "x-canopy-identity-id",
862
+ "x-canopy-identity-email",
863
+ "x-canopy-identity-name"
860
864
  ];
861
865
  /**
862
866
  * Header carrying the project's worker token as runtime-origin proof (docs/35).
@@ -1,6 +1,6 @@
1
1
  import { c as resolveProject, l as stagingUrl, o as projectFlagArgs, s as projectUrl } from "./site-DM2J10CB.mjs";
2
- import { i as apiRequest, o as withContext } from "./api-BPEYm9ts.mjs";
3
- import { a as unwrap, i as requireTty, r as reportErrors, t as formatDateTime } from "./ui-CHfKV6lG.mjs";
2
+ import { a as apiRequest, l as withContext } from "./api-ArfD6-t5.mjs";
3
+ import { a as unwrap, i as requireTty, r as reportErrors, t as formatDateTime } from "./ui-CaHgvvkJ.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  import * as p from "@clack/prompts";
6
6
  //#region src/staging.ts
@@ -7,7 +7,7 @@
7
7
  "build": "tsc && vite build"
8
8
  },
9
9
  "dependencies": {
10
- "@mediamonks/canopy": "^0.0.11",
10
+ "@mediamonks/canopy": "^0.0.12",
11
11
  "react": "^19.1.0",
12
12
  "react-dom": "^19.1.0"
13
13
  },
@@ -7,7 +7,7 @@
7
7
  "build": "tsc && vite build"
8
8
  },
9
9
  "dependencies": {
10
- "@mediamonks/canopy": "^0.0.11",
10
+ "@mediamonks/canopy": "^0.0.12",
11
11
  "hono": "^4.8.0",
12
12
  "react": "^19.1.0",
13
13
  "react-dom": "^19.1.0"
@@ -1,6 +1,6 @@
1
1
  import { a as projectDirArgs, c as resolveProject, o as projectFlagArgs } from "./site-DM2J10CB.mjs";
2
- import { i as apiRequest } from "./api-BPEYm9ts.mjs";
3
- import { r as reportErrors, t as formatDateTime } from "./ui-CHfKV6lG.mjs";
2
+ import { a as apiRequest } from "./api-ArfD6-t5.mjs";
3
+ import { r as reportErrors, t as formatDateTime } from "./ui-CaHgvvkJ.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  const tokenCommand = defineCommand({
6
6
  meta: {
@@ -1,4 +1,4 @@
1
- import { t as ApiError } from "./api-BPEYm9ts.mjs";
1
+ import { t as ApiError } from "./api-ArfD6-t5.mjs";
2
2
  import { spawn } from "node:child_process";
3
3
  import { cancel, isCancel } from "@clack/prompts";
4
4
  //#region src/ui.ts
@@ -1,5 +1,5 @@
1
1
  import { t as PACKAGE_NAME } from "./version-check-CcsA1QjI.mjs";
2
- import { r as reportErrors } from "./ui-CHfKV6lG.mjs";
2
+ import { r as reportErrors } from "./ui-CaHgvvkJ.mjs";
3
3
  import { defineCommand } from "citty";
4
4
  import { spawn } from "node:child_process";
5
5
  import { fileURLToPath } from "node:url";
@@ -112,7 +112,7 @@ const upgradeCommand = defineCommand({
112
112
  const spec = `${PACKAGE_NAME}@${args.version ?? "latest"}`;
113
113
  const command = pmCommand(pm);
114
114
  const cmd = installArgs(pm, spec);
115
- const { skillInstalled } = await import("./skill-3wOwhzDx.mjs");
115
+ const { skillInstalled } = await import("./skill-AqZYYsE6.mjs");
116
116
  const { homedir } = await import("node:os");
117
117
  const refreshGlobal = skillInstalled(homedir());
118
118
  const refreshRepo = process.cwd() !== homedir() && skillInstalled(process.cwd());
@@ -1,6 +1,6 @@
1
1
  import { c as resolveProject, o as projectFlagArgs } from "./site-DM2J10CB.mjs";
2
- import { i as apiRequest, o as withContext } from "./api-BPEYm9ts.mjs";
3
- import { r as reportErrors } from "./ui-CHfKV6lG.mjs";
2
+ import { a as apiRequest, l as withContext } from "./api-ArfD6-t5.mjs";
3
+ import { r as reportErrors } from "./ui-CaHgvvkJ.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  //#region src/usage.ts
6
6
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediamonks/canopy-cli",
3
- "version": "0.7.38",
3
+ "version": "0.7.40",
4
4
  "description": "Canopy CLI — create, develop and deploy Canopy projects.",
5
5
  "bin": {
6
6
  "canopy": "./dist/index.mjs"
@@ -22,7 +22,7 @@
22
22
  "esbuild": "^0.28.1",
23
23
  "hono": "^4.8.0",
24
24
  "vite-server": "npm:vite@^7",
25
- "@mediamonks/canopy": "0.0.11",
25
+ "@mediamonks/canopy": "0.0.12",
26
26
  "@mediamonks/canopy-data-plane": "0.0.4"
27
27
  },
28
28
  "devDependencies": {
@@ -1,2 +0,0 @@
1
- import { n as devCommand } from "./dev-BtnEuAnS.mjs";
2
- export { devCommand };
@@ -1,2 +0,0 @@
1
- import { a as templateCommand } from "./project-template-BEr_tgIY.mjs";
2
- export { templateCommand };
@@ -1,2 +0,0 @@
1
- import { a as repoCommand } from "./repo-CE22HpqZ.mjs";
2
- export { repoCommand };