@akanjs/cli 3.2.0-rc.1 → 3.2.0-rc.10

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 (98) hide show
  1. package/.build-stamp +2 -1
  2. package/{CodeAgent-vmd9k4ak.js → CodeAgent-fk66n37w.js} +3 -3
  3. package/{CodeTui-zka44v52.js → CodeTui-4rf1mqmv.js} +1 -1
  4. package/README.ko.md +26 -1
  5. package/README.md +26 -1
  6. package/TunnelShare-44er4e29.js +15 -0
  7. package/{agent.command-2f657613.js → agent.command-7g9czkkd.js} +20 -19
  8. package/akanCode.js +3 -3
  9. package/{application.command-q6skd3am.js → application.command-00spg55s.js} +31 -24
  10. package/{applicationBuildRunner-sctcmkyx.js → applicationBuildRunner-f4yf0qyc.js} +9 -7
  11. package/buildBatch.proc.js +7 -6
  12. package/{cloud.command-7642pks6.js → cloud.command-ab704p0g.js} +24 -25
  13. package/cloud.script-4p4y0s7e.js +31 -0
  14. package/{code.command-7s4ndq2k.js → code.command-m6c9xk56.js} +7 -6
  15. package/{context.command-569z0rqf.js → context.command-hgcgxtdk.js} +20 -19
  16. package/context.runner-w071gmc3.js +30 -0
  17. package/{devTui-w38ch13a.js → devTui-h77zrjv5.js} +1 -1
  18. package/{guideline.command-gnv3e8p8.js → guideline.command-6yz6d4hf.js} +3 -2
  19. package/guidelines/agentRule/agentRule.instruction.md +4 -3
  20. package/guidelines/conventions/core.md +1 -1
  21. package/guidelines/conventions/rules/app.md +3 -0
  22. package/guidelines/conventions/rules/page.md +5 -0
  23. package/guidelines/errorCodes/errorCodes.instruction.md +140 -0
  24. package/guidelines/fieldRule/fieldRule.instruction.md +2 -1
  25. package/guidelines/mcpRule/mcpRule.instruction.md +28 -0
  26. package/guidelines/pageRule/pageRule.instruction.md +5 -0
  27. package/guidelines/runtimeRule/runtimeRule.instruction.md +5 -1
  28. package/guidelines/transportRule/transportRule.instruction.md +5 -0
  29. package/incrementalBuilder.proc.js +8 -7
  30. package/{index-vkzfk7qt.js → index-097bjwvm.js} +40 -30
  31. package/{index-93ewzmp6.js → index-23d8gw08.js} +165 -102
  32. package/{index-p6hjwt2d.js → index-41mfhgq0.js} +72 -26
  33. package/{index-ktb3wcqz.js → index-4k9nv4m3.js} +71 -81
  34. package/{index-vr68mxj5.js → index-5jwx4bf2.js} +69 -33
  35. package/{index-5w9my9qe.js → index-6eptmk8z.js} +30 -20
  36. package/{index-d4n1wmrz.js → index-6fnrhpn1.js} +8 -4
  37. package/{index-kpdv34rq.js → index-6qtxs86x.js} +10 -7
  38. package/{index-ed6ea0qp.js → index-6z57w95f.js} +1 -1
  39. package/{index-drz9e84d.js → index-7ky4brfy.js} +2 -2
  40. package/{index-8g7tdsk4.js → index-849qvd7t.js} +58 -29
  41. package/{index-1q1cjn8s.js → index-9xh4zvw3.js} +94 -53
  42. package/{index-48d5qsj3.js → index-adj7qmz9.js} +23 -15
  43. package/{index-fjr4d6yd.js → index-apcr1qgk.js} +458 -304
  44. package/{index-8ts9774g.js → index-aybfcx58.js} +9 -4
  45. package/{index-8kczhnmv.js → index-b3pr4ee6.js} +1 -1
  46. package/{index-23860fej.js → index-b4qq3rq0.js} +23 -8
  47. package/{index-thckcabc.js → index-bper31wr.js} +24 -6
  48. package/{index-a8a9ede9.js → index-bxkx0x03.js} +14 -7
  49. package/{index-0fb3cpbt.js → index-c3r23w24.js} +9 -7
  50. package/{index-8pb9yvp8.js → index-dfsa009c.js} +148 -31
  51. package/{index-zpv14wpy.js → index-dsg50er9.js} +3 -3
  52. package/{index-hqrkqxx2.js → index-e5f6czck.js} +46 -7
  53. package/{index-sy481q2x.js → index-frvjq1rd.js} +1 -1
  54. package/{index-abgh0jve.js → index-grt0e6kk.js} +1 -1
  55. package/{index-e3vmjtph.js → index-hf9nvwam.js} +7 -2
  56. package/{index-v4p1zye8.js → index-hhagjhkh.js} +7 -7
  57. package/index-j4yvgfhr.js +70 -0
  58. package/{index-s2grpzef.js → index-k2r3hmbz.js} +6 -4
  59. package/{index-7y5yghjg.js → index-nd39rssn.js} +1162 -435
  60. package/{index-6wpaq392.js → index-p4htjyvk.js} +44 -5
  61. package/{index-aj3ehkcx.js → index-p54s83sz.js} +1 -1
  62. package/{index-7xdpww43.js → index-rdx8cyv2.js} +342 -134
  63. package/{index-sr5da35e.js → index-sq9d0jhj.js} +21 -18
  64. package/{index-eajbmk10.js → index-t4d0ckde.js} +2 -2
  65. package/{index-mqntfzv5.js → index-t8h09yjs.js} +7 -2
  66. package/index-va90m8nd.js +25 -0
  67. package/{index-rc5fvqj2.js → index-xfv2p7b5.js} +95 -58
  68. package/{index-w639tvkd.js → index-xgqz3kak.js} +29 -8
  69. package/{index-9tbgb4d8.js → index-xy70tcv4.js} +1 -1
  70. package/{index-mmym5xmb.js → index-z43wddce.js} +5 -3
  71. package/index.js +24 -23
  72. package/{library.command-1gp5qe3r.js → library.command-kc1zahcg.js} +5 -4
  73. package/{localRegistry.command-x7jptkd3.js → localRegistry.command-bz2df40m.js} +19 -18
  74. package/{module.command-4xz9he6h.js → module.command-cchwzz9r.js} +12 -7
  75. package/{package.command-s7qpnn1g.js → package.command-qcjajpv8.js} +8 -7
  76. package/package.json +2 -2
  77. package/{page.command-fan34c49.js → page.command-1t86dx8a.js} +4 -3
  78. package/{pipeline.command-ph4fnn9w.js → pipeline.command-2xx9z3d0.js} +3 -2
  79. package/{primitive.command-3fqh8emf.js → primitive.command-mc0x8txr.js} +8 -7
  80. package/{projectTypecheck-vkb40hjc.js → projectTypecheck-tz497yx7.js} +2 -1
  81. package/{quality.command-ecj6exsh.js → quality.command-11rayf5c.js} +7 -6
  82. package/{repair.command-fe9jw719.js → repair.command-8w41vy78.js} +7 -6
  83. package/{scalar.command-cnvfhk0n.js → scalar.command-rvwh98ny.js} +7 -6
  84. package/skills/akan-debug/SKILL.md +7 -3
  85. package/skills/akan-err/SKILL.md +7 -0
  86. package/skills/akan-mcp/SKILL.md +7 -1
  87. package/skills/akan-scaffold/SKILL.md +3 -2
  88. package/skills/akan-transport/SKILL.md +2 -0
  89. package/skills/akan-validate/SKILL.md +1 -0
  90. package/{subspace.command-qw5ddd6y.js → subspace.command-0970n7kd.js} +9 -8
  91. package/{tunnel.command-ggj38mqf.js → tunnel.command-bcy0rtmh.js} +8 -7
  92. package/typecheck.proc.js +5 -2
  93. package/{verify.command-w9ttxkdz.js → verify.command-ynaztxr2.js} +18 -16
  94. package/{workflow.command-ss8devj0.js → workflow.command-yp9ajthb.js} +45 -16
  95. package/{workspace.command-6z2rh8ze.js → workspace.command-e4wfxm86.js} +39 -34
  96. package/TunnelShare-k3ja4w9x.js +0 -14
  97. package/cloud.script-1sfseznn.js +0 -30
  98. package/context.runner-ms8v1rxy.js +0 -29
package/.build-stamp CHANGED
@@ -1 +1,2 @@
1
- 2e3d9766afc7b4160ebe82587951b7c38efbcce8f2b21fec2ea67c3e0c042a96
1
+ ed1a6034368b9b93d8a0752b2a6e180f3b595501bede5d0f3a9c914c47ced5b4
2
+ 5eed55b1-b5b5-4198-84af-6e928a89dc1a
@@ -1,9 +1,9 @@
1
1
  // @bun
2
2
  import {
3
3
  CodeAgent2
4
- } from "./index-a8a9ede9.js";
5
- import"./index-8kczhnmv.js";
6
- import"./index-23860fej.js";
4
+ } from "./index-bxkx0x03.js";
5
+ import"./index-b3pr4ee6.js";
6
+ import"./index-b4qq3rq0.js";
7
7
  import"./index-35j83zkd.js";
8
8
  import"./index-bns3wcpc.js";
9
9
  export {
@@ -4,7 +4,7 @@ import {
4
4
  McpTokenStore,
5
5
  McpSignIn,
6
6
  AkanCodeCompaction2
7
- } from "./index-8kczhnmv.js";
7
+ } from "./index-b3pr4ee6.js";
8
8
  import"./index-bns3wcpc.js";
9
9
  import"./index-35j83zkd.js";
10
10
  import {
package/README.ko.md CHANGED
@@ -82,6 +82,29 @@ akan repair generated
82
82
  실행합니다. 에이전트는 워크플로를 거쳐 코드를 고치므로 워크스페이스 규칙을 우회하지 않고 따릅니다. `akan code`는
83
83
  같은 규칙, 워크플로, 스킬 위에서 일하는 터미널 에이전트입니다.
84
84
 
85
+ ## 종료 코드
86
+
87
+ | 종료 코드 | `code` | 뜻 |
88
+ | --- | --- | --- |
89
+ | 0 | | 끝남 |
90
+ | 1 | `failed`, 또는 에러 자체의 코드 | 명령이 실패함 |
91
+ | 2 | `usage`, `unknownTarget` | 명령줄이나 그것이 가리키는 대상을 고쳐야 함: 모르는 플래그나 명령, 선택지 밖의 값, 물어볼 터미널이 없는 인자, 워크스페이스에 없는 앱·라이브러리·패키지·모듈 |
92
+ | 2 | `refused` | 거절됨: 새 스토어 빌드가 필요한 팩(`akan pack-update --against`, `akan push-update`, `akan register-binary`), Akan Cloud 프로젝트가 거절한 릴리스 |
93
+ | 3 | `checkFailed` | 검사가 돌았고 문제를 찾음: `akan verify`, `akan typecheck`와 `akan build`의 타입 검사, `akan preview`, `akan agent install --check` |
94
+ | 130 | `interrupted` | 중단됨, Ctrl+C로 닫은 프롬프트 포함 |
95
+
96
+ 일부 명령은 한 계열의 코드를 고정합니다. `akan pack-update`, `akan push-update`, `akan register-binary`는 usage나
97
+ unknown-target 실패에 1로 끝나므로, 이 명령의 2는 늘 스토어 빌드나 거절만 뜻합니다. `akan agent`도 같은 실패에
98
+ 1로 끝납니다. Claude Code가 훅의 종료 코드 2를 차단으로 읽기 때문에, `akan agent hook`은 2로 끝나지 않습니다.
99
+ `akan doctor --strict`, `akan workflow`, `akan subspace`는 보고서가 실패나 거절을 말할 때 1로 끝납니다.
100
+
101
+ `--json`이나 `--format json`을 주면 stdout에는 JSON만 나옵니다. 실패하면 마지막 줄이
102
+ `{"ok":false,"error":"<메시지>","code":"<코드>"}`이고, 메시지는 stderr로 갑니다. NDJSON 스트림(`akan code --json`,
103
+ `akan logs --json`)도 그 줄로 끝납니다. `akan verify`처럼 자체 JSON 보고서가 실패를 말하는 명령은 이 줄을
104
+ 덧붙이지 않습니다. 고유 코드를 쓰는 명령이 둘 있습니다. `akan pipeline`은 오류가 있는 계획이면 1, 계획을 세우지
105
+ 못하면 2로 끝나고, `akan migrate`는 자체 JSON 줄로 답하며 `usage`, `invalidParam`, `notFound` 코드면 2,
106
+ `verifyFailed`면 3으로 끝납니다.
107
+
85
108
  ## Akan Cloud
86
109
 
87
110
  ```bash
@@ -110,7 +133,9 @@ Akan 프레임워크 패키지는 `dist/pkgs/*`에서만 배포합니다. `verif
110
133
 
111
134
  릴리스 후보(rc)는 CI가 배포합니다. `rc` 브랜치에 push될 때마다 CI 전체를 돌린 뒤, 대기 중인 changeset이
112
135
  릴리스할 버전의 다음 `<version>-rc.N`을 npm provenance와 함께 배포하고 그 커밋에 `v<version>-rc.N` 태그를 붙입니다.
113
- 정식 릴리스는 지금처럼 수동입니다: `bun run changeset:version` 후 `akan deploy-akan --registry npm`.
136
+ 정식 릴리스는 지금처럼 수동입니다: `bun run changeset:version`, 커밋해서 `main`에 push, 그다음
137
+ `akan deploy-akan --registry npm`. npm 배포가 끝나면 `deploy-akan`이 그 커밋으로 에디터 확장 릴리스를 CI에
138
+ 요청합니다. 커밋이 아직 `main`에 없으면 push한 뒤 돌릴 `gh workflow run` 명령을 알려 줍니다.
114
139
  `npm-publish` environment는 `rc`만 허용하므로 `rc`에 push할 수 있는 사람은 rc를 배포할 수 있습니다. 저장소 규칙에서
115
140
  `rc` push 권한을 제한하세요.
116
141
 
package/README.md CHANGED
@@ -81,6 +81,29 @@ plans workflows in `plan` mode, and in `apply` mode — the mode `mcp-install` r
81
81
  validation and the repair tools. An agent changes code through the workflows, so it follows the workspace's rules
82
82
  instead of routing around them. `akan code` is a terminal agent built on the same rules, workflows and skills.
83
83
 
84
+ ## Exit Codes
85
+
86
+ | Exit | `code` | Meaning |
87
+ | --- | --- | --- |
88
+ | 0 | | done |
89
+ | 1 | `failed`, or the error's own code | the command broke |
90
+ | 2 | `usage`, `unknownTarget` | fix the command line or what it names: an unknown flag or command, a value outside the choices, an argument with no terminal to ask it on, an app, lib, package or module the workspace does not have |
91
+ | 2 | `refused` | the answer is no: a pack that needs a new store build (`akan pack-update --against`, `akan push-update`, `akan register-binary`), a release the Akan Cloud project rejected |
92
+ | 3 | `checkFailed` | a check ran and found problems: `akan verify`, `akan typecheck` and the typecheck of `akan build`, `akan preview`, `akan agent install --check` |
93
+ | 130 | `interrupted` | interrupted, a prompt closed with Ctrl+C included |
94
+
95
+ Some commands pin a family. `akan pack-update`, `akan push-update` and `akan register-binary` exit 1 for a usage
96
+ or unknown-target failure, so their 2 only ever means a store build or a refusal. `akan agent` exits 1 for one
97
+ too, since Claude Code reads a hook's exit 2 as a block, and `akan agent hook` never exits 2. `akan doctor
98
+ --strict`, `akan workflow` and `akan subspace` exit 1 when their report says it failed or was refused.
99
+
100
+ With `--json` or `--format json`, stdout holds only JSON: a failure ends it with one line,
101
+ `{"ok":false,"error":"<message>","code":"<code>"}`, and the message goes to stderr. An NDJSON stream
102
+ (`akan code --json`, `akan logs --json`) ends with that line too. A command whose own JSON report says it failed,
103
+ as `akan verify`'s does, adds no line. Two commands keep codes of their own: `akan pipeline` exits 1 for a plan
104
+ with errors and 2 when it could not plan, and `akan migrate` answers its own JSON line, exiting 2 for a `usage`,
105
+ `invalidParam` or `notFound` code and 3 for `verifyFailed`.
106
+
84
107
  ## Akan Cloud
85
108
 
86
109
  ```bash
@@ -109,7 +132,9 @@ artifact is built last and is not overwritten by the root `akan` bootstrap scrip
109
132
 
110
133
  Release candidates publish from CI: each push to the `rc` branch runs the CI suite, then publishes the next
111
134
  `<version>-rc.N` of the version the pending changesets will release, with npm provenance, and tags that commit
112
- `v<version>-rc.N`. Stable releases stay manual: `bun run changeset:version`, then `akan deploy-akan --registry npm`.
135
+ `v<version>-rc.N`. Stable releases stay manual: `bun run changeset:version`, commit and push it to `main`, then
136
+ `akan deploy-akan --registry npm`. Once npm has the packages, `deploy-akan` asks CI to release the editor extension
137
+ from that commit; if the commit is not on `main` yet, it prints the `gh workflow run` command to run after pushing.
113
138
  The `npm-publish` environment admits only `rc`, so whoever can push to `rc` can publish an rc: restrict pushes to
114
139
  `rc` in the repository's rules.
115
140
 
@@ -0,0 +1,15 @@
1
+ // @bun
2
+ import {
3
+ TunnelShare2
4
+ } from "./index-xy70tcv4.js";
5
+ import"./index-7ky4brfy.js";
6
+ import"./index-dsg50er9.js";
7
+ import"./index-m9jj544v.js";
8
+ import"./index-z43wddce.js";
9
+ import"./index-9xh4zvw3.js";
10
+ import"./index-sq9d0jhj.js";
11
+ import"./index-j4yvgfhr.js";
12
+ import"./index-bns3wcpc.js";
13
+ export {
14
+ TunnelShare2 as TunnelShare
15
+ };
@@ -2,44 +2,45 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-93ewzmp6.js";
5
+ } from "./index-23d8gw08.js";
6
+ import"./index-j4yvgfhr.js";
6
7
  import"./index-bns3wcpc.js";
7
- import"./index-sr5da35e.js";
8
+ import"./index-sq9d0jhj.js";
8
9
  import"./index-35j83zkd.js";
9
10
  import"./index-j6eeh5d7.js";
11
+ import"./index-bper31wr.js";
10
12
  import"./index-hj6w4ka1.js";
11
- import"./index-8pb9yvp8.js";
12
- import"./index-7y5yghjg.js";
13
- import"./index-thckcabc.js";
14
- import"./index-ktb3wcqz.js";
15
- import"./index-p6hjwt2d.js";
16
- import"./index-zpv14wpy.js";
17
- import"./index-ed6ea0qp.js";
13
+ import"./index-dfsa009c.js";
14
+ import"./index-nd39rssn.js";
15
+ import"./index-4k9nv4m3.js";
16
+ import"./index-41mfhgq0.js";
17
+ import"./index-dsg50er9.js";
18
+ import"./index-6z57w95f.js";
18
19
  import"./index-m9jj544v.js";
19
- import"./index-1q1cjn8s.js";
20
- import"./index-mmym5xmb.js";
21
- import"./index-fjr4d6yd.js";
22
- import"./index-hqrkqxx2.js";
20
+ import"./index-9xh4zvw3.js";
21
+ import"./index-z43wddce.js";
22
+ import"./index-apcr1qgk.js";
23
+ import"./index-e5f6czck.js";
23
24
  import"./index-62md4dwy.js";
24
25
  import"./index-ygdbn9jn.js";
25
26
  import"./index-ny2k80mv.js";
26
- import"./index-eajbmk10.js";
27
- import"./index-s2grpzef.js";
27
+ import"./index-t4d0ckde.js";
28
+ import"./index-k2r3hmbz.js";
28
29
  import {
29
30
  AgentScript
30
- } from "./index-5w9my9qe.js";
31
- import"./index-sy481q2x.js";
31
+ } from "./index-6eptmk8z.js";
32
+ import"./index-frvjq1rd.js";
32
33
 
33
34
  // pkgs/@akanjs/cli/agent/agent.command.ts
34
35
  class AgentCommand extends command("agent", [AgentScript], ({ public: target }) => ({
35
- agent: target({ desc: "Install Akan agent rules for editors and coding agents", stdio: true }).arg("action", String, { desc: "install, or hook (run by Claude Code hooks)" }).arg("target", String, {
36
+ agent: target({ desc: "Install Akan agent rules for editors and coding agents", stdio: true, usageExitCode: 1 }).arg("action", String, { desc: "install, or hook (run by Claude Code hooks)" }).arg("target", String, {
36
37
  desc: "install: cursor, agents-md, claude, rules, skills, hooks, or all; hook: pre-edit, post-edit, stop",
37
38
  nullable: true
38
39
  }).option("force", Boolean, {
39
40
  desc: "overwrite existing pointer files and generated files you took over",
40
41
  default: false
41
42
  }).option("check", Boolean, {
42
- desc: "write nothing; exit 1 when install would create, change or remove a file",
43
+ desc: "write nothing; exit 3 when install would create, change or remove a file",
43
44
  default: false
44
45
  }).with(Workspace).exec(async function(action, targetName, force, check, workspace) {
45
46
  await this.agentScript.agent(workspace, action, targetName, { force, check });
package/akanCode.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  PreviewChrome2,
4
4
  PreviewView2
5
- } from "./index-23860fej.js";
5
+ } from "./index-b4qq3rq0.js";
6
6
  import"./index-bns3wcpc.js";
7
7
  import {
8
8
  akanCodePaths2
@@ -34,7 +34,7 @@ import {
34
34
  CodeMailbox2,
35
35
  CodeSessionFork2,
36
36
  CodeAgent2
37
- } from "./index-a8a9ede9.js";
37
+ } from "./index-bxkx0x03.js";
38
38
  import {
39
39
  akanCodeDefaultModel2,
40
40
  akanCodeModel2,
@@ -45,7 +45,7 @@ import {
45
45
  import {
46
46
  SubagentPool2,
47
47
  AkanCodeCompaction2
48
- } from "./index-8kczhnmv.js";
48
+ } from "./index-b3pr4ee6.js";
49
49
  import {
50
50
  CodeAgentRpcHost2
51
51
  } from "./index-s4nvxpzm.js";
@@ -7,21 +7,26 @@ import {
7
7
  Exec,
8
8
  Workspace,
9
9
  command
10
- } from "./index-93ewzmp6.js";
10
+ } from "./index-23d8gw08.js";
11
+ import {
12
+ CliError
13
+ } from "./index-j4yvgfhr.js";
11
14
  import"./index-bns3wcpc.js";
12
- import"./index-sr5da35e.js";
13
- import"./index-p6hjwt2d.js";
14
- import"./index-zpv14wpy.js";
15
- import"./index-ed6ea0qp.js";
15
+ import"./index-sq9d0jhj.js";
16
+ import {
17
+ RouteJsBudget
18
+ } from "./index-41mfhgq0.js";
19
+ import"./index-dsg50er9.js";
20
+ import"./index-6z57w95f.js";
16
21
  import"./index-m9jj544v.js";
17
- import"./index-1q1cjn8s.js";
18
- import"./index-mmym5xmb.js";
19
- import"./index-mqntfzv5.js";
20
- import"./index-ktb3wcqz.js";
21
- import"./index-23860fej.js";
22
+ import"./index-9xh4zvw3.js";
23
+ import"./index-z43wddce.js";
24
+ import"./index-t8h09yjs.js";
25
+ import"./index-4k9nv4m3.js";
26
+ import"./index-b4qq3rq0.js";
22
27
  import {
23
28
  ApplicationScript
24
- } from "./index-vr68mxj5.js";
29
+ } from "./index-5jwx4bf2.js";
25
30
  import {
26
31
  writeOption,
27
32
  nativeTargetOption,
@@ -29,12 +34,19 @@ import {
29
34
  allowLocalOption,
30
35
  publicEnvOption
31
36
  } from "./index-mdjc93e1.js";
32
- import"./index-sy481q2x.js";
37
+ import"./index-frvjq1rd.js";
33
38
  import"./index-9bv479q5.js";
34
39
 
35
40
  // pkgs/@akanjs/cli/application/application.command.ts
36
41
  import { MigrationCommand } from "akanjs/server/migration/migrationCommand";
37
42
  import { MigrationError } from "akanjs/server/migration/migrationError";
43
+ var packUpdateDesc = "Pack an unsigned over-the-air update of the mobile web bundle for a signer; records it in <out>/pack.json. Exits 2 when --against needs a new store build, 1 on any other failure";
44
+ var migrationFailureOf = (error, usage) => {
45
+ const message = MigrationError.messageOf(error);
46
+ if (usage || CliError.is(error, "usage"))
47
+ return new MigrationError("usage", message);
48
+ return CliError.is(error, "unknownTarget") ? new MigrationError("notFound", message) : error;
49
+ };
38
50
  var deviceOption = {
39
51
  desc: "simulator, emulator or device to run on: its id or name (e.g. 'iPhone 17' or 'Pixel_10')",
40
52
  default: ""
@@ -42,6 +54,7 @@ var deviceOption = {
42
54
  var teamOption = { flag: "T", desc: "Apple team id the signing is narrowed to", default: "" };
43
55
  var signDesc = "sign with the identity AKAN_NATIVE_MACOS_* / AKAN_NATIVE_WINDOWS_* names (without it the env signs nothing)";
44
56
  var notarizeDesc = "macOS: upload the signed app to Apple's notary service (takes --sign)";
57
+ var checkBudgetDesc = "fail on a route over its akan.budget.json entry or with none, or a missing or unreadable file";
45
58
  var devEnvs = ["local", "debug", "develop", "main"];
46
59
  var buildEnvOption = { enum: devEnvs, desc: "backend environment", default: "debug" };
47
60
  var startEnvOption = {
@@ -55,7 +68,7 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
55
68
  createApplication: target({ desc: "Create a new application in the workspace" }).arg("appName", String, { desc: "name of application" }).option("start", Boolean, { desc: "start application", default: false }).with(Workspace).exec(async function(appName, start, workspace) {
56
69
  await this.applicationScript.createApplication(appName.toLowerCase().replace(/ /g, "-"), workspace, { start });
57
70
  }),
58
- removeApplication: target({ desc: "Remove an application from the workspace" }).with(App).exec(async function(app) {
71
+ removeApplication: target({ desc: "Remove an application from the workspace", destructive: true }).with(App).exec(async function(app) {
59
72
  await this.applicationScript.removeApplication(app);
60
73
  }),
61
74
  planSlice: target({ desc: "List the exact files an app needs to live in a workspace of its own" }).with(App).option("format", String, { desc: "output format", default: "text", enum: ["text", "json"] }).exec(async function(app, format) {
@@ -74,8 +87,7 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
74
87
  onFailure: async (error, { usage, given }) => {
75
88
  if (given.json !== true)
76
89
  return;
77
- const failure = usage ? new MigrationError("usage", MigrationError.messageOf(error)) : error;
78
- await MigrationCommand.print(MigrationCommand.failure(null, failure), true);
90
+ await MigrationCommand.print(MigrationCommand.failure(null, migrationFailureOf(error, usage)), true);
79
91
  }
80
92
  }).with(App).arg("action", String, { desc: "list, plan, apply, verify or rollback", default: "list" }).arg("target", String, { desc: "migration id; for rollback, an apply's run id too", nullable: true }).option("param", String, { desc: "a param the migration declares, as name=value", multiple: true }).option("expect", String, { desc: "the plan hash an apply must still match", nullable: true }).option("items", Number, { desc: "how many planned decisions to print", nullable: true }).option("actor", String, { desc: "who runs it, as the ledger records", nullable: true }).option("json", Boolean, { desc: "print the result as one JSON line", default: false }).exec(async function(app, action, target, param, expect, items, actor, json) {
81
93
  await this.applicationScript.migrate(app, [
@@ -95,7 +107,7 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
95
107
  desc: "Open pages of the app's dev server in a headless browser and print what broke, starting a server if none runs",
96
108
  stdio: true
97
109
  }).with(App).arg("paths", String, {
98
- desc: "page paths, comma-separated; the default locale is added when missing, but not to /_akan routes such as Studio or to files (default: /)",
110
+ desc: "page paths, comma-separated; the default locale is added when missing, except to a path the server answers outside a locale (/_akan, the API prefix, /__csr, /__rsc, /.well-known, /openapi.json, the default /mcp, the server's own files, public/ files) or a full URL, which opens as written (default: /)",
99
111
  example: "/board,/board/new",
100
112
  nullable: true
101
113
  }).option("changed", Boolean, {
@@ -186,17 +198,14 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
186
198
  enum: devEnvs,
187
199
  desc: "environment the server runs in (default: AKAN_PUBLIC_ENV of the shell, else of the workspace .env)",
188
200
  nullable: true
189
- }).option("updateBudget", Boolean, {
190
- desc: "write akan.budget.json: add each new route's JS and lower an entry a route now fits under, never raise one",
191
- default: false
192
- }).exec(async function(app, write, fast, quiet, profile, env, updateBudget) {
201
+ }).option("checkBudget", Boolean, { desc: checkBudgetDesc, default: false }).option("updateBudget", Boolean, { desc: "write akan.budget.json, never raising an entry", default: false }).option("raiseBudget", Boolean, { desc: "rewrite akan.budget.json at each route's measured JS", default: false }).exec(async function(app, write, fast, quiet, profile, env, checkBudget, updateBudget, raiseBudget) {
193
202
  await this.applicationScript.build(app, {
194
203
  write,
195
204
  fast,
196
205
  quiet,
197
206
  profile: profile ?? undefined,
198
207
  env: env ?? undefined,
199
- updateBudget
208
+ budget: RouteJsBudget.modeOf({ checkBudget, updateBudget, raiseBudget })
200
209
  });
201
210
  }),
202
211
  typecheck: target({ short: true, desc: "Typecheck an app or a library, its tests and specs included" }).with(SysOrOnlyApp).option("write", Boolean, writeOption).option("clean", Boolean, { desc: "clear typecheck cache before running", default: false }).option("incremental", Boolean, { desc: "reuse TypeScript incremental cache", default: true }).option("tests", Boolean, { desc: "check its *.test.ts / *.spec.ts too, which nothing imports", default: true }).exec(async function(sys, write, clean, incremental, tests) {
@@ -293,9 +302,7 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
293
302
  publicEnv: publicEnv ?? undefined
294
303
  });
295
304
  }),
296
- packUpdate: target({
297
- desc: "Pack an unsigned over-the-air update of the mobile web bundle for a signer; records it in <out>/pack.json. Exits 2 when --against needs a new store build, 1 on any other failure"
298
- }).with(App).option("platform", String, { enum: ["ios", "android"], desc: "the app it updates" }).option("target", String, nativeTargetOption).option("env", String, releaseEnvOption).option("out", String, {
305
+ packUpdate: target({ desc: packUpdateDesc, usageExitCode: 1 }).with(App).option("platform", String, { enum: ["ios", "android"], desc: "the app it updates" }).option("target", String, nativeTargetOption).option("env", String, releaseEnvOption).option("out", String, {
299
306
  desc: "output folder (default: dist/native/<app>/<target>/updates/<platform>)",
300
307
  nullable: true
301
308
  }).option("against", String, {
@@ -5,25 +5,26 @@ import {
5
5
  ProjectTypecheck2,
6
6
  parseEnvFile,
7
7
  WorkspaceExecutor
8
- } from "./index-sr5da35e.js";
8
+ } from "./index-sq9d0jhj.js";
9
9
  import"./index-bns3wcpc.js";
10
+ import"./index-j4yvgfhr.js";
10
11
  import {
11
12
  NARROWABLE_VENDOR_SPECIFIERS
12
- } from "./index-7xdpww43.js";
13
+ } from "./index-rdx8cyv2.js";
13
14
  import {
14
15
  FontPruner,
15
16
  RouteJsBudget
16
- } from "./index-p6hjwt2d.js";
17
- import"./index-1q1cjn8s.js";
17
+ } from "./index-41mfhgq0.js";
18
+ import"./index-9xh4zvw3.js";
18
19
  import {
19
20
  AllRoutesBuilder,
20
21
  precompressArtifacts,
21
22
  SsrBaseArtifactBuilder,
22
23
  VendorImportScanner
23
- } from "./index-8g7tdsk4.js";
24
+ } from "./index-849qvd7t.js";
24
25
  import {
25
26
  CsrArtifactBuilder
26
- } from "./index-mmym5xmb.js";
27
+ } from "./index-z43wddce.js";
27
28
  import"./index-62md4dwy.js";
28
29
 
29
30
  // pkgs/@akanjs/devkit/applicationBuildRunner.ts
@@ -393,7 +394,7 @@ void run().catch((error) => {
393
394
  const { baseDevEnv, branches } = await this.#app.getConfig();
394
395
  const routes = new AllRoutesBuilder(this.#app, "build");
395
396
  const allRoutes = await routes.build();
396
- const vendorExports = await VendorImportScanner.exportsUsedIn(path3.join(this.#app.dist.cwdPath, ".akan/artifact/client"), NARROWABLE_VENDOR_SPECIFIERS);
397
+ const vendorExports = await VendorImportScanner.exportsUsedIn(path3.join(this.#app.dist.cwdPath, ".akan/artifact/client"), NARROWABLE_VENDOR_SPECIFIERS, Object.values(allRoutes.manifest.clientManifest).map(({ id }) => id));
397
398
  const base = await new SsrBaseArtifactBuilder(this.#app, "build", {
398
399
  serverEnv: this.#serverEnvPlugin(baseDevEnv.env, branches),
399
400
  vendorExports
@@ -408,6 +409,7 @@ void run().catch((error) => {
408
409
  const budgetPath = path3.join(this.#app.cwdPath, RouteJsBudget.fileName);
409
410
  const { summary: status, warnings } = await RouteJsBudget.check(sizes, {
410
411
  mode: this.#budget,
412
+ app: this.#app.name,
411
413
  budgetPath,
412
414
  source: path3.relative(this.#app.workspace.workspaceRoot, budgetPath),
413
415
  environment
@@ -2,30 +2,31 @@
2
2
  import {
3
3
  FontOptimizer,
4
4
  ApplicationBuildReporter
5
- } from "./index-p6hjwt2d.js";
5
+ } from "./index-41mfhgq0.js";
6
6
  import {
7
7
  resolveSsrPageEntriesForApp,
8
8
  WorkspaceExecutor,
9
9
  AppExecutor
10
- } from "./index-sr5da35e.js";
10
+ } from "./index-sq9d0jhj.js";
11
11
  import {
12
12
  computeRouteSeedIndex,
13
13
  saveRouteSeedIndex,
14
14
  CsrDevBundler,
15
15
  SsrDevBundler
16
- } from "./index-7xdpww43.js";
16
+ } from "./index-rdx8cyv2.js";
17
17
  import"./index-bns3wcpc.js";
18
+ import"./index-j4yvgfhr.js";
18
19
  import {
19
20
  ServerGraphFile,
20
21
  PagesBundleBuilder
21
- } from "./index-1q1cjn8s.js";
22
+ } from "./index-9xh4zvw3.js";
22
23
  import {
23
24
  CssCompiler,
24
25
  SsrBaseArtifactBuilder
25
- } from "./index-8g7tdsk4.js";
26
+ } from "./index-849qvd7t.js";
26
27
  import {
27
28
  CsrArtifactBuilder
28
- } from "./index-mmym5xmb.js";
29
+ } from "./index-z43wddce.js";
29
30
  import"./index-62md4dwy.js";
30
31
 
31
32
  // pkgs/@akanjs/devkit/incrementalBuilder/buildBatch.proc.ts
@@ -3,35 +3,36 @@ import {
3
3
  App,
4
4
  Workspace,
5
5
  command
6
- } from "./index-93ewzmp6.js";
6
+ } from "./index-23d8gw08.js";
7
+ import"./index-j4yvgfhr.js";
7
8
  import"./index-bns3wcpc.js";
8
- import"./index-sr5da35e.js";
9
- import"./index-drz9e84d.js";
9
+ import"./index-sq9d0jhj.js";
10
+ import"./index-7ky4brfy.js";
10
11
  import {
11
12
  PlatformTestRun
12
- } from "./index-6wpaq392.js";
13
- import"./index-zpv14wpy.js";
14
- import"./index-ed6ea0qp.js";
13
+ } from "./index-p4htjyvk.js";
14
+ import"./index-dsg50er9.js";
15
+ import"./index-6z57w95f.js";
15
16
  import"./index-m9jj544v.js";
16
- import"./index-1q1cjn8s.js";
17
- import"./index-mmym5xmb.js";
17
+ import"./index-9xh4zvw3.js";
18
+ import"./index-z43wddce.js";
18
19
  import {
19
20
  npmRegistryFromEnv,
20
21
  warnIgnoredNpmRegistry
21
22
  } from "./index-ny2k80mv.js";
22
- import"./index-p6hjwt2d.js";
23
- import"./index-mqntfzv5.js";
24
- import"./index-ktb3wcqz.js";
25
- import"./index-23860fej.js";
26
- import"./index-vr68mxj5.js";
23
+ import"./index-41mfhgq0.js";
24
+ import"./index-t8h09yjs.js";
25
+ import"./index-4k9nv4m3.js";
26
+ import"./index-b4qq3rq0.js";
27
+ import"./index-5jwx4bf2.js";
27
28
  import"./index-qd7xn2bk.js";
28
- import"./index-7y5yghjg.js";
29
- import"./index-abgh0jve.js";
30
- import"./index-hqrkqxx2.js";
31
- import"./index-d4n1wmrz.js";
29
+ import"./index-nd39rssn.js";
30
+ import"./index-grt0e6kk.js";
31
+ import"./index-e5f6czck.js";
32
+ import"./index-6fnrhpn1.js";
32
33
  import {
33
34
  CloudScript2
34
- } from "./index-v4p1zye8.js";
35
+ } from "./index-hhagjhkh.js";
35
36
  import {
36
37
  writeOption,
37
38
  oneNativeTargetOption,
@@ -42,7 +43,7 @@ import {
42
43
  hostOption,
43
44
  subspaceOption
44
45
  } from "./index-mdjc93e1.js";
45
- import"./index-sy481q2x.js";
46
+ import"./index-frvjq1rd.js";
46
47
  import"./index-9bv479q5.js";
47
48
 
48
49
  // pkgs/@akanjs/cli/cloud/cloud.command.ts
@@ -51,6 +52,8 @@ var resolveRegistryUrl = (registry) => {
51
52
  warnIgnoredNpmRegistry();
52
53
  return registry === "local" ? localRegistryUrl() : undefined;
53
54
  };
55
+ var pushUpdateDesc = "Pack an over-the-air update of a phone's web bundle, or take the folder `akan pack-update` wrote, and upload it to the Akan Cloud project, which signs and publishes it; or upload the desktop release `akan publish-update` signed, as it is. Exits 2 when the pack needs a new store build or the project rejects it, 1 on any other failure";
56
+ var registerBinaryDesc = "Register the store build of a phone app with the Akan Cloud project, with a pack of the same commit as its embedded bundle. Exits 2 when the store build differs natively from this commit's pack, 1 on any other failure";
54
57
 
55
58
  class CloudCommand extends command("cloud", [CloudScript2], ({ public: target }) => ({
56
59
  login: target({ desc: "Login to Akan Cloud services" }).option("host", String, hostOption).with(Workspace).exec(async function(host, workspace) {
@@ -121,9 +124,7 @@ class CloudCommand extends command("cloud", [CloudScript2], ({ public: target })
121
124
  }).exec(async function(workspace, tag, registry) {
122
125
  await this.cloudScript.update(workspace, tag, { registryUrl: resolveRegistryUrl(registry) });
123
126
  }),
124
- pushUpdate: target({
125
- desc: "Pack an over-the-air update of a phone's web bundle, or take the folder `akan pack-update` wrote, and upload it to the Akan Cloud project, which signs and publishes it; or upload the desktop release `akan publish-update` signed, as it is. Exits 2 when the pack needs a new store build or the project rejects it, 1 on any other failure"
126
- }).with(App).option("platform", String, {
127
+ pushUpdate: target({ desc: pushUpdateDesc, usageExitCode: 1 }).with(App).option("platform", String, {
127
128
  enum: ["ios", "android", "desktop", "macos", "windows", "linux"],
128
129
  desc: "the app it updates; desktop is this computer's OS (with --pack, default: the pack's)",
129
130
  nullable: true
@@ -162,9 +163,7 @@ class CloudCommand extends command("cloud", [CloudScript2], ({ public: target })
162
163
  publicEnv
163
164
  });
164
165
  }),
165
- registerBinary: target({
166
- desc: "Register the store build of a phone app with the Akan Cloud project, with a pack of the same commit as its embedded bundle. Exits 2 when the store build differs natively from this commit's pack, 1 on any other failure"
167
- }).with(App).option("platform", String, { enum: ["ios", "android"], desc: "the store build to register" }).option("distribution", String, {
166
+ registerBinary: target({ desc: registerBinaryDesc, usageExitCode: 1 }).with(App).option("platform", String, { enum: ["ios", "android"], desc: "the store build to register" }).option("distribution", String, {
168
167
  enum: ["appStore", "testFlight", "playStore", "playTesting", "direct"],
169
168
  desc: "where the binary ships"
170
169
  }).option("target", String, oneNativeTargetOption).option("env", String, releaseEnvOption).option("subspace", String, subspaceOption("gets it")).option("host", String, hostOption).option("write", Boolean, writeOption).option("allowLocalRelease", Boolean, allowLocalOption("packing")).option("publicEnv", String, publicEnvOption("the pack (default: what the store build recorded)")).with(Workspace).exec(async function(app, platform, distribution, target, env, subspace, host, write, allowLocalRelease, publicEnv, workspace) {
@@ -0,0 +1,31 @@
1
+ // @bun
2
+ import {
3
+ CloudScript2
4
+ } from "./index-hhagjhkh.js";
5
+ import"./index-p4htjyvk.js";
6
+ import"./index-5jwx4bf2.js";
7
+ import"./index-t8h09yjs.js";
8
+ import"./index-6fnrhpn1.js";
9
+ import"./index-7ky4brfy.js";
10
+ import"./index-ny2k80mv.js";
11
+ import"./index-4k9nv4m3.js";
12
+ import"./index-frvjq1rd.js";
13
+ import"./index-e5f6czck.js";
14
+ import"./index-6z57w95f.js";
15
+ import"./index-dsg50er9.js";
16
+ import"./index-m9jj544v.js";
17
+ import"./index-23d8gw08.js";
18
+ import"./index-9bv479q5.js";
19
+ import"./index-b4qq3rq0.js";
20
+ import"./index-grt0e6kk.js";
21
+ import"./index-nd39rssn.js";
22
+ import"./index-z43wddce.js";
23
+ import"./index-41mfhgq0.js";
24
+ import"./index-9xh4zvw3.js";
25
+ import"./index-sq9d0jhj.js";
26
+ import"./index-j4yvgfhr.js";
27
+ import"./index-qd7xn2bk.js";
28
+ import"./index-bns3wcpc.js";
29
+ export {
30
+ CloudScript2 as CloudScript
31
+ };
@@ -4,9 +4,10 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-93ewzmp6.js";
7
+ } from "./index-23d8gw08.js";
8
+ import"./index-j4yvgfhr.js";
8
9
  import"./index-bns3wcpc.js";
9
- import"./index-sr5da35e.js";
10
+ import"./index-sq9d0jhj.js";
10
11
  import {
11
12
  AkanCodeEnv,
12
13
  akanCodePaths2
@@ -77,7 +78,7 @@ class CodeRunner extends runner("code") {
77
78
  async serve(options, listen) {
78
79
  await import("./consoleToStderr-h5bryj94.js");
79
80
  const [{ CodeAgent }, { CodeAgentRpcHost }, { CodeAgentRpcListener }] = await Promise.all([
80
- import("./CodeAgent-vmd9k4ak.js"),
81
+ import("./CodeAgent-fk66n37w.js"),
81
82
  import("./CodeAgentRpcHost-6dzfkvsc.js"),
82
83
  import("./CodeAgentRpcListener-tcwrdvst.js")
83
84
  ]);
@@ -111,8 +112,8 @@ class CodeRunner extends runner("code") {
111
112
  }
112
113
  async tui(options, seed) {
113
114
  const [{ CodeAgent }, { CodeTui }] = await Promise.all([
114
- import("./CodeAgent-vmd9k4ak.js"),
115
- import("./CodeTui-zka44v52.js")
115
+ import("./CodeAgent-fk66n37w.js"),
116
+ import("./CodeTui-4rf1mqmv.js")
116
117
  ]);
117
118
  const start = await CodeRunner.#start(options, { hostAttached: false, interactive: true, ask: true });
118
119
  const agentOptions = start.agent;
@@ -148,7 +149,7 @@ class CodeRunner extends runner("code") {
148
149
  }
149
150
  }
150
151
  async run(prompt, options) {
151
- const { CodeAgent } = await import("./CodeAgent-vmd9k4ak.js");
152
+ const { CodeAgent } = await import("./CodeAgent-fk66n37w.js");
152
153
  const ask = !!process.stdin.isTTY && !!process.stderr.isTTY;
153
154
  const start = await CodeRunner.#start(options, { hostAttached: false, interactive: false, ask });
154
155
  for (const warning of start.warnings)