@akanjs/cli 3.0.0-beta.20 → 3.0.0-beta.21
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/.build-stamp +1 -1
- package/{CodeAgent-awv258wb.js → CodeAgent-q2m47rqp.js} +2 -2
- package/{CodeTui-1nqh35ez.js → CodeTui-pdqhc3sn.js} +1 -1
- package/{agent.command-1s9ag7sb.js → agent.command-ttn09rx3.js} +5 -5
- package/akanCode.js +2 -2
- package/{application.command-49hwy6va.js → application.command-7gweenv7.js} +43 -41
- package/{applicationBuildRunner-ybyp97pv.js → applicationBuildRunner-38exmejd.js} +2 -2
- package/buildBatch.proc.js +10 -4
- package/{cloud.command-d7rqtzt9.js → cloud.command-bhztw7c2.js} +9 -8
- package/cloud.script-aabyhgba.js +20 -0
- package/{code.command-nn48xzej.js → code.command-6s8c0k91.js} +6 -6
- package/commandManifest.json +1 -1
- package/{context.command-s3mcmvpa.js → context.command-phmgywt2.js} +13 -13
- package/context.runner-yvyw5g2d.js +21 -0
- package/{guideline.command-sct4qnt5.js → guideline.command-7jk47fgq.js} +2 -2
- package/guidelines/agentRule/agentRule.instruction.md +3 -3
- package/guidelines/conventions/conventions.instruction.md +17 -5
- package/guidelines/runtimeRule/runtimeRule.instruction.md +3 -3
- package/incrementalBuilder.proc.js +1 -1
- package/{index-5pc1qrbv.js → index-1db2cw0y.js} +2 -2
- package/{index-ahemdr5n.js → index-4dn1p115.js} +3 -3
- package/{index-13ffe9wp.js → index-7cqjvraf.js} +4 -4
- package/{index-8sf7wmdr.js → index-8kb5p54p.js} +5 -5
- package/{index-ygn77a5w.js → index-9629w7ns.js} +5 -3
- package/{index-ddxvdd1p.js → index-aadpbnt2.js} +5 -5
- package/{index-ztp3e73t.js → index-d0arnrm8.js} +1 -1
- package/{index-nv5976x3.js → index-dg97qp24.js} +24 -13
- package/{index-9d9bgcx4.js → index-ga6hygxr.js} +514 -480
- package/index-hr5n7t4x.js +465 -0
- package/{index-xqpzbab5.js → index-m0ms3n1c.js} +7 -7
- package/{index-as7xmyz8.js → index-mgfx3mfs.js} +5 -4
- package/{index-3sq321ak.js → index-pp54p5zk.js} +2 -2
- package/{index-xqjwd384.js → index-q44jbw48.js} +1 -1
- package/{index-w2zdcw3k.js → index-rmcw8yc8.js} +1 -1
- package/{index-dzf3r49a.js → index-rnt66vym.js} +1 -1
- package/{index-8mna0947.js → index-tgjy8xf3.js} +4 -4
- package/{index-xsjh6nzh.js → index-v5eayqqw.js} +3 -3
- package/{index-przybvy5.js → index-wp43xrjv.js} +4 -4
- package/{index-31yr441d.js → index-ya5qbmyg.js} +3 -3
- package/{index-axzjaqve.js → index-yjkte9aj.js} +5 -4
- package/{index-myhc3c1j.js → index-yy4s1j72.js} +1 -1
- package/{index-ww4z397j.js → index-z50k041j.js} +82 -168
- package/index.js +21 -21
- package/{library.command-1gx04jgn.js → library.command-ccb1cp92.js} +3 -3
- package/{localRegistry.command-zndxj1q6.js → localRegistry.command-ajb9n87j.js} +8 -7
- package/{module.command-3waddk95.js → module.command-5k6h407d.js} +5 -5
- package/{package.command-zrc7br1y.js → package.command-e6ntvpez.js} +3 -3
- package/package.json +2 -3
- package/{page.command-vpjgardh.js → page.command-v4f90wb8.js} +3 -3
- package/{primitive.command-sz84tk4t.js → primitive.command-g6km57q5.js} +6 -6
- package/{quality.command-g869hafs.js → quality.command-de3p36pz.js} +5 -4
- package/{repair.command-chsnjvvv.js → repair.command-d3x1javq.js} +5 -5
- package/{scalar.command-2v21newx.js → scalar.command-7ezrac2b.js} +4 -4
- package/{subspace.command-ckcbwfp1.js → subspace.command-ps71ynp6.js} +4 -4
- package/templates/workspaceRoot/.gitignore.template +0 -1
- package/{tunnel.command-kd2yr4fx.js → tunnel.command-hsrv2mny.js} +2 -2
- package/{workflow.command-44252cqv.js → workflow.command-z2p32nmf.js} +10 -10
- package/{workspace.command-fqcztt5p.js → workspace.command-tmdqkrh0.js} +20 -20
- package/applicationReleasePackager-esnrphw8.js +0 -224
- package/capacitorApp-1synz4en.js +0 -11
- package/cloud.script-bkbpcr96.js +0 -19
- package/context.runner-k99nb5pk.js +0 -21
- package/index-5e0n4hqx.js +0 -75
- package/index-mxav6j3c.js +0 -1377
package/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
a76a878d714d11a7e39b4b55f9406589931081c9da279901808cfe0e6c1c624b
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Workspace,
|
|
4
4
|
command
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-rmcw8yc8.js";
|
|
6
6
|
import"./index-5b6tavv3.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-ga6hygxr.js";
|
|
8
8
|
import"./index-hj6w4ka1.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
import"./index-yy4s1j72.js";
|
|
10
|
+
import"./index-9629w7ns.js";
|
|
11
11
|
import"./index-0bq14vr1.js";
|
|
12
12
|
import {
|
|
13
13
|
AgentScript
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-4dn1p115.js";
|
|
15
15
|
|
|
16
16
|
// pkgs/@akanjs/cli/agent/agent.command.ts
|
|
17
17
|
class AgentCommand extends command("agent", [AgentScript], ({ public: target }) => ({
|
package/akanCode.js
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
CodeMailbox2,
|
|
29
29
|
CodeSessionFork2,
|
|
30
30
|
CodeAgent2
|
|
31
|
-
} from "./index-
|
|
31
|
+
} from "./index-v5eayqqw.js";
|
|
32
32
|
import {
|
|
33
33
|
akanCodeDefaultModel2,
|
|
34
34
|
akanCodeModel2,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
import {
|
|
40
40
|
SubagentPool2,
|
|
41
41
|
akanCodePaths2
|
|
42
|
-
} from "./index-
|
|
42
|
+
} from "./index-d0arnrm8.js";
|
|
43
43
|
import"./index-7md2g9vw.js";
|
|
44
44
|
import {
|
|
45
45
|
CodeAgentRpcHost2
|
|
@@ -6,19 +6,19 @@ import {
|
|
|
6
6
|
Exec,
|
|
7
7
|
Workspace,
|
|
8
8
|
command
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-rmcw8yc8.js";
|
|
10
10
|
import"./index-5b6tavv3.js";
|
|
11
|
-
import"./index-
|
|
11
|
+
import"./index-ga6hygxr.js";
|
|
12
|
+
import {
|
|
13
|
+
getMobileTargetChoices
|
|
14
|
+
} from "./index-hr5n7t4x.js";
|
|
12
15
|
import"./index-khpfpcsd.js";
|
|
13
|
-
import"./index-
|
|
16
|
+
import"./index-1db2cw0y.js";
|
|
14
17
|
import {
|
|
15
18
|
ApplicationScript
|
|
16
|
-
} from "./index-
|
|
19
|
+
} from "./index-z50k041j.js";
|
|
17
20
|
import"./index-7md2g9vw.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import {
|
|
20
|
-
getMobileTargetChoices
|
|
21
|
-
} from "./index-5e0n4hqx.js";
|
|
21
|
+
import"./index-q44jbw48.js";
|
|
22
22
|
|
|
23
23
|
// pkgs/@akanjs/cli/application/application.command.ts
|
|
24
24
|
var mobileTargetOption = {
|
|
@@ -26,6 +26,11 @@ var mobileTargetOption = {
|
|
|
26
26
|
ask: "Select mobile target",
|
|
27
27
|
enum: async ({ app }) => await getMobileTargetChoices(app)
|
|
28
28
|
};
|
|
29
|
+
var deviceOption = {
|
|
30
|
+
desc: "simulator, emulator or device to run on: its id or name (e.g. 'iPhone 17' or 'Pixel_10')",
|
|
31
|
+
default: ""
|
|
32
|
+
};
|
|
33
|
+
var teamOption = { flag: "T", desc: "Apple team id the signing is narrowed to", default: "" };
|
|
29
34
|
var devEnvs = ["local", "debug", "develop", "main"];
|
|
30
35
|
var buildEnvOption = { enum: devEnvs, desc: "backend environment", default: "debug" };
|
|
31
36
|
var startEnvOption = { enum: devEnvs, desc: "backend environment", default: "local" };
|
|
@@ -93,11 +98,11 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
|
|
|
93
98
|
test: target({ desc: "Prepare and test an app, library, or package" }).with(Exec).option("write", Boolean, { desc: "write code generation", default: true }).exec(async function(exec, write) {
|
|
94
99
|
await this.applicationScript.test(exec, { write });
|
|
95
100
|
}),
|
|
96
|
-
buildIos: target({ short: true, desc: "Build iOS app
|
|
97
|
-
await this.applicationScript.buildIos(app, { target, env,
|
|
101
|
+
buildIos: target({ short: true, desc: "Build the iOS app on the native runtime" }).with(App).option("target", String, mobileTargetOption).option("env", String, buildEnvOption).option("debug", Boolean, { desc: "debug build instead of release", default: false }).option("write", Boolean, { desc: "write code generation", default: true }).exec(async function(app, target, env, debug, write) {
|
|
102
|
+
await this.applicationScript.buildIos(app, { target, env, profile: debug ? "debug" : "release", write });
|
|
98
103
|
}),
|
|
99
|
-
buildAndroid: target({ short: true, desc: "Build Android app
|
|
100
|
-
await this.applicationScript.buildAndroid(app, { target, env,
|
|
104
|
+
buildAndroid: target({ short: true, desc: "Build the Android app (apk) on the native runtime" }).with(App).option("target", String, mobileTargetOption).option("env", String, buildEnvOption).option("debug", Boolean, { desc: "debug build instead of release", default: false }).option("write", Boolean, { desc: "write code generation", default: true }).exec(async function(app, target, env, debug, write) {
|
|
105
|
+
await this.applicationScript.buildAndroid(app, { target, env, profile: debug ? "debug" : "release", write });
|
|
101
106
|
}),
|
|
102
107
|
start: target({ short: true, desc: "Start development server(s) (frontend SSR + backend)" }).with(Apps).option("plain", Boolean, { desc: "print prefixed lines instead of the full-screen view", default: false }).option("kill", Boolean, { flag: "k", desc: "free the dev ports first, whoever is holding them", default: false }).option("concurrency", Number, {
|
|
103
108
|
desc: "apps to boot at a time (default: what this machine's memory and cores allow)",
|
|
@@ -105,51 +110,51 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
|
|
|
105
110
|
}).option("dbup", Boolean, { desc: "start the local database first", default: true }).option("open", Boolean, { desc: "open web browser?", default: false }).option("share", Boolean, { desc: "also share each app on a public URL through an akan tunnel", default: false }).option("write", Boolean, { desc: "write code generation", default: true }).exec(async function(apps, plain, kill, concurrency, dbup, open, share, write) {
|
|
106
111
|
await this.applicationScript.start(apps, { plain, kill, concurrency, dbup, open, share, write });
|
|
107
112
|
}),
|
|
108
|
-
startIos: target({ short: true, desc: "
|
|
109
|
-
desc: "let Xcode create or update provisioning profiles for a physical device",
|
|
110
|
-
default: true
|
|
111
|
-
}).option("device", String, {
|
|
112
|
-
desc: "run target to select non-interactively: udid, device name, or runtime (e.g. 'iPhone 16' or 'iOS 18')",
|
|
113
|
-
default: ""
|
|
114
|
-
}).exec(async function(app, target, env, open, release, write, regenerate, allowProvisioningUpdates, device) {
|
|
113
|
+
startIos: target({ short: true, desc: "Run the iOS app in a simulator or on an iPhone, following `akan start`" }).with(App).option("target", String, mobileTargetOption).option("env", String, startEnvOption).option("release", Boolean, { desc: "run a release build of its own bundle instead", default: false }).option("device", String, deviceOption).option("team", String, teamOption).option("write", Boolean, { desc: "write code generation", default: true }).exec(async function(app, target, env, release, device, team, write) {
|
|
115
114
|
await this.applicationScript.startIos(app, {
|
|
116
115
|
target,
|
|
117
116
|
env,
|
|
118
|
-
open,
|
|
119
117
|
operation: release ? "release" : "local",
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
device: device || undefined
|
|
118
|
+
device: device || undefined,
|
|
119
|
+
teamId: team || undefined,
|
|
120
|
+
write
|
|
124
121
|
});
|
|
125
122
|
}),
|
|
126
|
-
startAndroid: target({
|
|
123
|
+
startAndroid: target({
|
|
124
|
+
short: true,
|
|
125
|
+
desc: "Run the Android app in an emulator or on a device, following `akan start`"
|
|
126
|
+
}).with(App).option("target", String, mobileTargetOption).option("env", String, startEnvOption).option("release", Boolean, { desc: "run a release build of its own bundle instead", default: false }).option("device", String, deviceOption).option("write", Boolean, { desc: "write code generation", default: true }).exec(async function(app, target, env, release, device, write) {
|
|
127
127
|
await this.applicationScript.startAndroid(app, {
|
|
128
128
|
target,
|
|
129
129
|
env,
|
|
130
|
-
open,
|
|
131
130
|
operation: release ? "release" : "local",
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
device: device || undefined,
|
|
132
|
+
write
|
|
134
133
|
});
|
|
135
134
|
}),
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
startDesktop: target({
|
|
136
|
+
short: true,
|
|
137
|
+
desc: "Run the desktop app on this computer (macOS, Windows or Linux), following `akan start`"
|
|
138
|
+
}).with(App).option("target", String, mobileTargetOption).option("env", String, startEnvOption).option("release", Boolean, { desc: "run a release build of its own bundle instead", default: false }).option("write", Boolean, { desc: "write code generation", default: true }).exec(async function(app, target, env, release, write) {
|
|
139
|
+
await this.applicationScript.startDesktop(app, { target, env, operation: release ? "release" : "local", write });
|
|
138
140
|
}),
|
|
139
|
-
|
|
140
|
-
await this.applicationScript.
|
|
141
|
+
releaseIos: target({ desc: "Build and sign the iOS app for the App Store (.ipa)" }).with(App).option("target", String, mobileTargetOption).option("env", String, releaseEnvOption).option("team", String, teamOption).option("adHoc", Boolean, { desc: "sign with an ad-hoc profile instead of app-store", default: false }).option("write", Boolean, { desc: "write code generation", default: true }).option("allowLocalRelease", Boolean, { flag: "l", desc: "allow release with --env local", default: false }).exec(async function(app, target, env, team, adHoc, write, allowLocalRelease) {
|
|
142
|
+
await this.applicationScript.releaseIos(app, {
|
|
141
143
|
target,
|
|
142
144
|
env,
|
|
145
|
+
teamId: team || undefined,
|
|
146
|
+
adHoc,
|
|
143
147
|
write,
|
|
144
|
-
regenerate,
|
|
145
148
|
allowLocalRelease
|
|
146
149
|
});
|
|
147
150
|
}),
|
|
148
|
-
|
|
149
|
-
await this.applicationScript.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
releaseAndroid: target({ desc: "Build and sign the Android app for the Play Store (aab, or apk)" }).with(App).option("assembleType", String, { enum: ["aab", "apk"], default: "aab" }).option("target", String, mobileTargetOption).option("env", String, releaseEnvOption).option("write", Boolean, { desc: "write code generation", default: true }).option("allowLocalRelease", Boolean, { flag: "l", desc: "allow release with --env local", default: false }).exec(async function(app, assembleType, target, env, write, allowLocalRelease) {
|
|
152
|
+
await this.applicationScript.releaseAndroid(app, assembleType, {
|
|
153
|
+
target,
|
|
154
|
+
env,
|
|
155
|
+
write,
|
|
156
|
+
allowLocalRelease
|
|
157
|
+
});
|
|
153
158
|
}),
|
|
154
159
|
dbup: target({ desc: "Start local database services for a database mode" }).with(Workspace).option("mode", String, {
|
|
155
160
|
desc: "database mode; left out, every mode the workspace's apps declare",
|
|
@@ -166,9 +171,6 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
|
|
|
166
171
|
}),
|
|
167
172
|
dbdown: target({ desc: "Stop local database services" }).with(Workspace).exec(async function(workspace) {
|
|
168
173
|
await this.applicationScript.dbdown(workspace);
|
|
169
|
-
}),
|
|
170
|
-
configureApp: target({ desc: "Configure application settings interactively" }).with(App).exec(async function(app) {
|
|
171
|
-
await this.applicationScript.configureApp(app);
|
|
172
174
|
})
|
|
173
175
|
})) {
|
|
174
176
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
Spinner
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-ga6hygxr.js";
|
|
5
5
|
import {
|
|
6
6
|
AllRoutesBuilder,
|
|
7
7
|
CsrArtifactBuilder,
|
|
8
8
|
FontPruner,
|
|
9
9
|
precompressArtifacts,
|
|
10
10
|
SsrBaseArtifactBuilder
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-aadpbnt2.js";
|
|
12
12
|
import"./index-fgq75haa.js";
|
|
13
13
|
import"./index-5b6tavv3.js";
|
|
14
14
|
import"./index-n68jx79w.js";
|
package/buildBatch.proc.js
CHANGED
|
@@ -3,17 +3,20 @@ import {
|
|
|
3
3
|
ApplicationBuildReporter
|
|
4
4
|
} from "./index-khpfpcsd.js";
|
|
5
5
|
import {
|
|
6
|
+
resolveSsrPageEntriesForApp,
|
|
6
7
|
WorkspaceExecutor,
|
|
7
8
|
AppExecutor
|
|
8
|
-
} from "./index-
|
|
9
|
-
import"./index-5b6tavv3.js";
|
|
9
|
+
} from "./index-ga6hygxr.js";
|
|
10
10
|
import {
|
|
11
|
+
computeRouteSeedIndex,
|
|
12
|
+
saveRouteSeedIndex,
|
|
11
13
|
CssCompiler,
|
|
12
14
|
PagesBundleBuilder,
|
|
13
15
|
CsrArtifactBuilder,
|
|
14
16
|
FontOptimizer,
|
|
15
17
|
SsrBaseArtifactBuilder
|
|
16
|
-
} from "./index-
|
|
18
|
+
} from "./index-aadpbnt2.js";
|
|
19
|
+
import"./index-5b6tavv3.js";
|
|
17
20
|
import"./index-fgq75haa.js";
|
|
18
21
|
import"./index-n68jx79w.js";
|
|
19
22
|
|
|
@@ -88,7 +91,10 @@ class BuildBatch {
|
|
|
88
91
|
async#buildPages() {
|
|
89
92
|
const started = Date.now();
|
|
90
93
|
try {
|
|
91
|
-
const
|
|
94
|
+
const pageEntries = await resolveSsrPageEntriesForApp(this.#app, await this.#app.getPageKeys());
|
|
95
|
+
const seedIndex = computeRouteSeedIndex(pageEntries);
|
|
96
|
+
const next = await new PagesBundleBuilder(this.#app, "start", pageEntries).build();
|
|
97
|
+
await saveRouteSeedIndex(this.#request.artifactDir, seedIndex);
|
|
92
98
|
this.#emit({
|
|
93
99
|
type: "pages-updated",
|
|
94
100
|
data: {
|
|
@@ -6,21 +6,22 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
Workspace,
|
|
8
8
|
command
|
|
9
|
-
} from "./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
} from "./index-rmcw8yc8.js";
|
|
10
|
+
import"./index-ga6hygxr.js";
|
|
11
11
|
import {
|
|
12
12
|
PlatformTestRun
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-yjkte9aj.js";
|
|
14
14
|
import"./index-khpfpcsd.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
15
|
+
import"./index-1db2cw0y.js";
|
|
16
|
+
import"./index-z50k041j.js";
|
|
17
|
+
import"./index-hr5n7t4x.js";
|
|
17
18
|
import"./index-7md2g9vw.js";
|
|
18
19
|
import"./index-3t7g9e4r.js";
|
|
19
|
-
import"./index-
|
|
20
|
+
import"./index-mgfx3mfs.js";
|
|
20
21
|
import {
|
|
21
22
|
CloudScript2
|
|
22
|
-
} from "./index-
|
|
23
|
-
import"./index-
|
|
23
|
+
} from "./index-8kb5p54p.js";
|
|
24
|
+
import"./index-q44jbw48.js";
|
|
24
25
|
|
|
25
26
|
// pkgs/@akanjs/cli/cloud/cloud.command.ts
|
|
26
27
|
var localRegistryUrl = () => process.env.AKAN_NPM_REGISTRY ?? "http://127.0.0.1:4873";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
CloudScript2
|
|
4
|
+
} from "./index-8kb5p54p.js";
|
|
5
|
+
import"./index-yjkte9aj.js";
|
|
6
|
+
import"./index-mgfx3mfs.js";
|
|
7
|
+
import"./index-z50k041j.js";
|
|
8
|
+
import"./index-q44jbw48.js";
|
|
9
|
+
import"./index-1db2cw0y.js";
|
|
10
|
+
import"./index-hr5n7t4x.js";
|
|
11
|
+
import"./index-22d57v4c.js";
|
|
12
|
+
import"./index-rmcw8yc8.js";
|
|
13
|
+
import"./index-7md2g9vw.js";
|
|
14
|
+
import"./index-khpfpcsd.js";
|
|
15
|
+
import"./index-ga6hygxr.js";
|
|
16
|
+
import"./index-3t7g9e4r.js";
|
|
17
|
+
import"./index-5b6tavv3.js";
|
|
18
|
+
export {
|
|
19
|
+
CloudScript2 as CloudScript
|
|
20
|
+
};
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-rmcw8yc8.js";
|
|
8
8
|
import"./index-5b6tavv3.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-ga6hygxr.js";
|
|
10
10
|
import {
|
|
11
11
|
akanCodeDefaultModel2,
|
|
12
12
|
CodeAgentStreamPrinter2
|
|
@@ -19,7 +19,7 @@ class CodeRunner extends runner("code") {
|
|
|
19
19
|
async serve(options, listen) {
|
|
20
20
|
await import("./consoleToStderr-h5bryj94.js");
|
|
21
21
|
const [{ CodeAgent }, { CodeAgentRpcHost }, { CodeAgentRpcListener }] = await Promise.all([
|
|
22
|
-
import("./CodeAgent-
|
|
22
|
+
import("./CodeAgent-q2m47rqp.js"),
|
|
23
23
|
import("./CodeAgentRpcHost-p7h6n2hp.js"),
|
|
24
24
|
import("./CodeAgentRpcListener-7p7z5dd7.js")
|
|
25
25
|
]);
|
|
@@ -34,8 +34,8 @@ class CodeRunner extends runner("code") {
|
|
|
34
34
|
}
|
|
35
35
|
async tui(options, seed) {
|
|
36
36
|
const [{ CodeAgent }, { CodeTui }] = await Promise.all([
|
|
37
|
-
import("./CodeAgent-
|
|
38
|
-
import("./CodeTui-
|
|
37
|
+
import("./CodeAgent-q2m47rqp.js"),
|
|
38
|
+
import("./CodeTui-pdqhc3sn.js")
|
|
39
39
|
]);
|
|
40
40
|
const agentOptions = await CodeRunner.#agentOptions(options, false);
|
|
41
41
|
let resume = options.resume;
|
|
@@ -60,7 +60,7 @@ class CodeRunner extends runner("code") {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
async run(prompt, options) {
|
|
63
|
-
const { CodeAgent } = await import("./CodeAgent-
|
|
63
|
+
const { CodeAgent } = await import("./CodeAgent-q2m47rqp.js");
|
|
64
64
|
const agent = await CodeAgent.create(await CodeRunner.#agentOptions(options, false));
|
|
65
65
|
const printer = new CodeAgentStreamPrinter2({ json: options.json, thinking: options.thinking });
|
|
66
66
|
agent.on((event) => printer.print(event));
|
package/commandManifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"byCommand":{"create-workspace":"workspace","generate-agent-rules":"workspace","lint":"workspace","lint-all":"workspace","sync-all":"workspace","init":"workspace","agent":"agent","code":"code","create-application":"application","remove-application":"application","plan-slice":"application","sync":"application","script":"application","console":"application","logs":"application","build":"application","b":"application","typecheck":"application","t":"application","test":"application","build-ios":"application","bi":"application","build-android":"application","ba":"application","start":"application","s":"application","start-ios":"application","si":"application","start-android":"application","sa":"application","
|
|
1
|
+
{"byCommand":{"create-workspace":"workspace","generate-agent-rules":"workspace","lint":"workspace","lint-all":"workspace","sync-all":"workspace","init":"workspace","agent":"agent","code":"code","create-application":"application","remove-application":"application","plan-slice":"application","sync":"application","script":"application","console":"application","logs":"application","build":"application","b":"application","typecheck":"application","t":"application","test":"application","build-ios":"application","bi":"application","build-android":"application","ba":"application","start":"application","s":"application","start-ios":"application","si":"application","start-android":"application","sa":"application","start-desktop":"application","sd":"application","release-ios":"application","release-android":"application","dbup":"application","db-export":"application","db-import":"application","dbdown":"application","create-library":"library","remove-library":"library","sync-library":"library","library-status":"library","install-library":"library","start-registry":"localRegistry","reset-registry":"localRegistry","smoke-registry":"localRegistry","version":"package","create-package":"package","remove-package":"package","sync-package":"package","build-package":"package","verify-dist-package":"package","verify-akan-publish-packages":"package","create-module":"module","remove-module":"module","create-service":"module","create-view":"module","create-unit":"module","create-template":"module","create-crud-page":"page","context":"context","doctor":"context","mcp-install":"context","mcp":"context","mcp-call":"context","login":"cloud","logout":"cloud","deploy-akan":"cloud","test-platforms":"cloud","update":"cloud","download-env":"cloud","upload-env":"cloud","subspace":"subspace","guideline":"guideline","create-scalar":"scalar","remove-scalar":"scalar","create-ui":"primitive","add-field":"primitive","add-enum-field":"primitive","quality":"quality","repair":"repair","workflow":"workflow","tunnel":"tunnel"}}
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Workspace,
|
|
4
4
|
command
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-rmcw8yc8.js";
|
|
6
6
|
import"./index-5b6tavv3.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-ga6hygxr.js";
|
|
8
8
|
import"./index-hj6w4ka1.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
9
|
+
import"./index-yy4s1j72.js";
|
|
10
|
+
import"./index-9629w7ns.js";
|
|
11
|
+
import"./index-dg97qp24.js";
|
|
12
|
+
import"./index-hr5n7t4x.js";
|
|
13
13
|
import"./index-0bq14vr1.js";
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
14
|
+
import"./index-ya5qbmyg.js";
|
|
15
|
+
import"./index-rnt66vym.js";
|
|
16
|
+
import"./index-tgjy8xf3.js";
|
|
17
|
+
import"./index-wp43xrjv.js";
|
|
18
|
+
import"./index-pp54p5zk.js";
|
|
19
|
+
import"./index-m0ms3n1c.js";
|
|
20
20
|
import {
|
|
21
21
|
ContextScript
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-7cqjvraf.js";
|
|
23
23
|
|
|
24
24
|
// pkgs/@akanjs/cli/context/context.command.ts
|
|
25
25
|
class ContextCommand extends command("context", [ContextScript], ({ public: target }) => ({
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
ContextRunner2
|
|
4
|
+
} from "./index-dg97qp24.js";
|
|
5
|
+
import"./index-m0ms3n1c.js";
|
|
6
|
+
import"./index-pp54p5zk.js";
|
|
7
|
+
import"./index-wp43xrjv.js";
|
|
8
|
+
import"./index-ya5qbmyg.js";
|
|
9
|
+
import"./index-tgjy8xf3.js";
|
|
10
|
+
import"./index-rnt66vym.js";
|
|
11
|
+
import"./index-hr5n7t4x.js";
|
|
12
|
+
import"./index-9629w7ns.js";
|
|
13
|
+
import"./index-yy4s1j72.js";
|
|
14
|
+
import"./index-0bq14vr1.js";
|
|
15
|
+
import"./index-rmcw8yc8.js";
|
|
16
|
+
import"./index-ga6hygxr.js";
|
|
17
|
+
import"./index-hj6w4ka1.js";
|
|
18
|
+
import"./index-5b6tavv3.js";
|
|
19
|
+
export {
|
|
20
|
+
ContextRunner2 as ContextRunner
|
|
21
|
+
};
|
|
@@ -181,9 +181,9 @@ apps and libs never import it directly (`no-import-external-library`) — everyt
|
|
|
181
181
|
there: a voice user who is never told about the card is a conversation that simply ends.
|
|
182
182
|
The contract is a subscription rather than `listen(): Promise<string>` on purpose: a promise fits push-to-talk
|
|
183
183
|
and nothing else, so hands-free could then only arrive as a breaking change. `useSpeech` in a util lib's
|
|
184
|
-
`webkit/` is the engine — the browser's own recognition and synthesis
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
`webkit/` is the engine — the browser's own recognition and synthesis. An app's WebView **has neither on
|
|
185
|
+
Android or iOS** and `@akanjs/native` ships no speech plugin yet, so a `speech.plugin.ts` declares only the
|
|
186
|
+
permission and its usage texts. An engine answering `available()` false renders no microphone at all,
|
|
187
187
|
the same rule as publishing no tool for a control the screen does not draw.
|
|
188
188
|
- **Data the user points at rides the message too, as `references` — and its value is a snapshot.** A file is
|
|
189
189
|
something they handed over; a reference is something they pointed at while asking, so it belongs in the same
|
|
@@ -76,6 +76,18 @@ back.
|
|
|
76
76
|
`*.constant.ts`, `*.store.ts`, and the five module component suffixes (`no-bang-comment-in-client.grit`). Bun
|
|
77
77
|
classifies `//!` and `/*!` as legal comments and keeps them through minification, so the note ships to every
|
|
78
78
|
visitor. Use `// FIXME:` there; `//!` stays legal in server, `srvkit/`, and CLI files.
|
|
79
|
+
- **Never touch `document.cookie`, `localStorage` or `sessionStorage` in app or lib code** (`no-document-cookie.grit`,
|
|
80
|
+
`no-web-storage.grit`). A native shell serves the page from `app://localhost` on iOS, macOS and Linux, which keeps
|
|
81
|
+
no cookies: `document.cookie` reads `""` and a write is dropped, so the value exists in the browser and vanishes in
|
|
82
|
+
the app. Web Storage does work in the shells, but it bypasses the store akanjs picks per platform (the shell's
|
|
83
|
+
Preferences in an app) and throws during SSR. Use `getCookie` / `setCookie` / `removeCookie`, `storage`, and
|
|
84
|
+
`secretStorage` for tokens and credentials, all from `akanjs/client`.
|
|
85
|
+
- **Browser APIs an app WebView lacks live in `webkit/`** (`no-web-only-api-outside-webkit.grit`, a warning):
|
|
86
|
+
`navigator.share` / `canShare` (Android's WebView has none), `navigator.serviceWorker` and
|
|
87
|
+
`Notification.requestPermission` / `.permission` (no app page has them), `navigator.geolocation` (use
|
|
88
|
+
`useGeoLocation` from `akanjs/webkit`) and `navigator.vibrate` (iOS has none; use `haptics`). They are legal on the
|
|
89
|
+
web, so the rule does not ban them: it keeps them in a `webkit/` hook that branches on `isNativeApp()` from
|
|
90
|
+
`akanjs/client/native`, which is where the app side goes too.
|
|
79
91
|
- **Never return a value from a store action** (`no-return-in-store-action.grit`). Every method of a `store(...)`
|
|
80
92
|
class dispatches through `st.do.<action>()`, typed `void` / `Promise<void>`, so the value is unreachable — write
|
|
81
93
|
it into state with `this.set({ ... })`. A bare `return;` guard, a `return` inside a nested callback, a getter,
|
|
@@ -308,7 +320,7 @@ Full contract: `get_guideline` with `runtimeRule`, or `akan guideline show runti
|
|
|
308
320
|
rotating log file; nothing supervises it but the orchestrator's probes.
|
|
309
321
|
- **Route prefixes move together or not at all.** `new AkanApp({ prefix, websocketPrefix })` in `main.ts` moves
|
|
310
322
|
the server's routes, the gateway's websocket upgrade and — through the SSR bootstrap script — the
|
|
311
|
-
`fetchClient` in every tab the server renders. A prebuilt CSR shell or a
|
|
323
|
+
`fetchClient` in every tab the server renders. A prebuilt CSR shell or a native app bundle is never rendered by
|
|
312
324
|
a server, so `api: { prefix, websocketPrefix }` in `akan.config.ts` is what those follow; declare it there too
|
|
313
325
|
when the app ships either. Read the value with `getApiPrefix()` / `getWsPrefix()` from `akanjs/base` — never
|
|
314
326
|
write `/api` or `/ws` as a literal, and never try to hand it down as a React prop: `FetchClient` fixes its
|
|
@@ -902,10 +914,10 @@ export default page()
|
|
|
902
914
|
|
|
903
915
|
## Akan Sync Conventions (`apps/**`, `libs/**`)
|
|
904
916
|
|
|
905
|
-
- `apps/<appName>` root may only contain these files: `AGENTS.md`, `CLAUDE.md`, `akan.app.json`, `akan.config.ts`, `
|
|
906
|
-
- `apps/<appName>` root may only contain these folders: `.akan`, `
|
|
917
|
+
- `apps/<appName>` root may only contain these files: `AGENTS.md`, `CLAUDE.md`, `akan.app.json`, `akan.config.ts`, `client.ts`, `main.ts`, `package.json`, `server.ts`, `tsconfig.json`, `tsconfig.tsbuildinfo`.
|
|
918
|
+
- `apps/<appName>` root may only contain these folders: `.akan`, `common`, `env`, `lib`, `page`, `plugin`, `private`, `public`, `script`, `secrets`, `srvkit`, `ui`, `webkit`.
|
|
907
919
|
- `libs/<libName>` root may only contain these files: `AGENTS.md`, `CLAUDE.md`, `README.md`, `akan.config.ts`, `akan.lib.json`, `client.ts`, `index.ts`, `package.json`, `server.ts`, `tsconfig.json`, `tsconfig.spec.json`, `tsconfig.tsbuildinfo`.
|
|
908
|
-
- `libs/<libName>` root may only contain these folders: `common`, `env`, `lib`, `page`, `plugin`, `private`, `public`, `srvkit`, `ui`, `webkit`. A library is never booted or packaged as an app, so the run and mobile entries an app carries (`main.ts`,
|
|
920
|
+
- `libs/<libName>` root may only contain these folders: `common`, `env`, `lib`, `page`, `plugin`, `private`, `public`, `srvkit`, `ui`, `webkit`. A library is never booted or packaged as an app, so the run and mobile entries an app carries (`main.ts`, `.akan`, `script`, `secrets`) are rejected there. A Capacitor-era `ios` / `android` / `mobile` folder or `capacitor.config.*` is refused in an app root too, named as a leftover: the native runtime generates its projects under `.akan/mobile/<target>`.
|
|
909
921
|
- Both allowlists have one source — `pkgs/@akanjs/devkit/workspaceLayout.ts`. `akan sync` (error), `akan doctor`
|
|
910
922
|
(diagnostic), and `akan quality scan` (warning) all read it, so add a new root entry there and mirror it into this
|
|
911
923
|
list, never into one of the three call sites.
|
|
@@ -929,7 +941,7 @@ export default page()
|
|
|
929
941
|
| Folder | Admission test | Naming |
|
|
930
942
|
|---|---|---|
|
|
931
943
|
| `common/` | pure, isomorphic, zero-dependency; may import only sibling `common/*` and `akanjs/base`. Cannot import `Err`, so keep throwing code out of it. | camelCase file, filename equals the single export |
|
|
932
|
-
| `webkit/` | touches `window` / `navigator` /
|
|
944
|
+
| `webkit/` | touches `window` / `navigator` / the native bridge (`akanjs/client/native`), or is a React hook | `use<Thing>.tsx` — `.tsx` even with no JSX |
|
|
933
945
|
| `srvkit/` | touches `node:*`, `Bun`, `process.env`, a secret, or a server SDK | camelCase file, PascalCase class |
|
|
934
946
|
| `ui/` | renders JSX, or defines a look (a recipe in `Recipe/`, a lib's `tokens.css`), and is not bound to one model | PascalCase component, camelCase sidecar (`swipeCard.util.ts`), `Recipe/<name>.ts` |
|
|
935
947
|
| `plugin/` | build- or CLI-time `AkanPlugin` | `<name>.plugin.ts`, registered in `akan.config.ts` |
|
|
@@ -16,9 +16,9 @@ const config: AppConfig = { web: false }; // api only
|
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
- **`web: { csr: false }`** drops the CSR build phase and the `/__csr` + `?csr=true` routes. The CSR bundle is
|
|
19
|
-
what the
|
|
19
|
+
what the native mobile build ships, so a web-only deployment never needs it — and an app that declares a
|
|
20
20
|
`mobile` section is refused, because `akan build-ios` copies `dist/apps/<app>/csr/<target>.html` into the
|
|
21
|
-
|
|
21
|
+
target's web root, `.akan/mobile/<target>/web`.
|
|
22
22
|
- **`web: false`** is an API-only build: no base artifact, no pages or client bundles, no RSC worker
|
|
23
23
|
entrypoint, and no `public/` in the image (the web router's catch-all is its only reader). Nothing under
|
|
24
24
|
`page/` is served, including routes a lib contributed through `syncPageLibs`.
|
|
@@ -68,7 +68,7 @@ const config: AppConfig = { api: { prefix: "/backend", websocketPrefix: "/socket
|
|
|
68
68
|
origin when the module graph initializes, before any component renders, so a React prop — a `System.Provider`
|
|
69
69
|
value, anything out of `implicitRootLayout` — is always too late. The value rides the SSR classic bootstrap
|
|
70
70
|
script instead, the one thing guaranteed to run ahead of every module script, and is omitted when it matches
|
|
71
|
-
what the bundle already assumes. `akan.config.ts` is what a
|
|
71
|
+
what the bundle already assumes. `akan.config.ts` is what a native app bundle or a statically served CSR shell
|
|
72
72
|
follows, because neither is rendered by a server that could tell it otherwise.
|
|
73
73
|
- **A prefix is a path segment.** A blank value or a bare `/` is refused: `/` would be mounted ahead of the SSR
|
|
74
74
|
catch-all and swallow every page route. A prefix whose first segment is a declared basePath is refused at
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-rmcw8yc8.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_BLOCK_START,
|
|
8
8
|
AGENT_BLOCK_END,
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
CLAUDE_COMMENT_RULE,
|
|
14
14
|
AppExecutor,
|
|
15
15
|
LibExecutor
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-ga6hygxr.js";
|
|
17
17
|
import {
|
|
18
18
|
collectRecipeSources2,
|
|
19
19
|
scanRecipes2
|
|
20
20
|
} from "./index-hj6w4ka1.js";
|
|
21
21
|
import {
|
|
22
22
|
AkanContextAnalyzer
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-9629w7ns.js";
|
|
24
24
|
import {
|
|
25
25
|
Prompter2
|
|
26
26
|
} from "./index-0bq14vr1.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
jsonText
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-yy4s1j72.js";
|
|
5
5
|
import {
|
|
6
6
|
akanMcpInstallTargets
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-9629w7ns.js";
|
|
8
8
|
import {
|
|
9
9
|
script
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-rmcw8yc8.js";
|
|
11
11
|
import {
|
|
12
12
|
ContextRunner2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-dg97qp24.js";
|
|
14
14
|
|
|
15
15
|
// pkgs/@akanjs/cli/context/context.script.ts
|
|
16
16
|
import { Logger } from "akanjs/common";
|