@aspectlylabs/mikka 0.0.255 → 0.0.257

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/cli.js CHANGED
@@ -4519,7 +4519,7 @@ import { join as join4 } from "node:path";
4519
4519
  // package.json
4520
4520
  var package_default = {
4521
4521
  name: "@mikka/daemon",
4522
- version: "0.0.255",
4522
+ version: "0.0.257",
4523
4523
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
4524
4524
  type: "module",
4525
4525
  private: true,
@@ -4578,7 +4578,7 @@ var package_default = {
4578
4578
  engines: {
4579
4579
  node: ">=24"
4580
4580
  },
4581
- gitHead: "e338c70f5a7bf148d9d04d1e8af00291ef8ae80f"
4581
+ gitHead: "816eb7fc61aa47fcb43d9448364870c0507c51e0"
4582
4582
  };
4583
4583
 
4584
4584
  // src/paths.ts
package/client.js CHANGED
@@ -3763,7 +3763,7 @@ import { join } from "node:path";
3763
3763
  // package.json
3764
3764
  var package_default = {
3765
3765
  name: "@mikka/daemon",
3766
- version: "0.0.255",
3766
+ version: "0.0.257",
3767
3767
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
3768
3768
  type: "module",
3769
3769
  private: true,
@@ -3822,7 +3822,7 @@ var package_default = {
3822
3822
  engines: {
3823
3823
  node: ">=24"
3824
3824
  },
3825
- gitHead: "e338c70f5a7bf148d9d04d1e8af00291ef8ae80f"
3825
+ gitHead: "816eb7fc61aa47fcb43d9448364870c0507c51e0"
3826
3826
  };
3827
3827
 
3828
3828
  // src/paths.ts
@@ -7,6 +7,46 @@ import { pathToFileURL } from 'node:url'
7
7
 
8
8
  const MAX_CACHE_AGE = 50 * 60_000
9
9
 
10
+ /**
11
+ * The server's reason a run's GitHub token was not issued, in words a person
12
+ * can act on, English then Chinese. Only these known codes are shown; any
13
+ * other response says GitHub credentials are unavailable.
14
+ */
15
+ export const RUN_GITHUB_ERROR_MESSAGES = {
16
+ githubAppNotConfigured: ['The Mikka GitHub App is not set up on this Mikka server.', '这台 Mikka 服务器还没有配置 Mikka GitHub App。'],
17
+ githubIdentityRequired: ['Connect a GitHub account in Mikka (Plugins › GitHub) to work on this repository.', '在 Mikka 的插件 › GitHub 里连接一个 GitHub 账号后,才能处理这个仓库。'],
18
+ githubAppNotInstalled: ['Install the Mikka GitHub App on this repository.', '这个仓库还没有安装 Mikka GitHub App。'],
19
+ githubAppSuspended: ['The Mikka GitHub App is suspended on this repository.', 'Mikka GitHub App 在这个仓库上已被暂停。'],
20
+ githubAppPermissionRequired: ['Give the Mikka GitHub App pull request write and contents read access on this repository.', 'Mikka GitHub App 在这个仓库上缺少 Pull request 写权限或 Contents 读权限。'],
21
+ githubAccountNoWriteAccess: ['Your connected GitHub account cannot write to this repository.', '你连接的 GitHub 账号没有这个仓库的写权限。'],
22
+ githubRepositoryNotSupported: ['Only github.com repositories are supported.', '目前只支持 github.com 上的仓库。'],
23
+ githubRateLimited: ['GitHub is rate limiting requests. Try again in a few minutes.', 'GitHub 暂时限流,几分钟后再试。'],
24
+ runGitHubUnavailable: ['GitHub is unavailable right now. Try again later.', 'GitHub 暂时不可用,稍后再试。'],
25
+ runGitHubAccessDenied: ['This run can no longer use GitHub: it ended or changed repository.', '这个线程已结束或换了仓库,不能再使用 GitHub。'],
26
+ }
27
+
28
+ /** A failed token exchange, carrying only the server's known error code. */
29
+ export class RunGitHubCredentialError extends Error {
30
+ constructor(code) {
31
+ super('Run GitHub credentials unavailable')
32
+ this.name = 'RunGitHubCredentialError'
33
+ this.code = Object.hasOwn(RUN_GITHUB_ERROR_MESSAGES, code) ? code : null
34
+ }
35
+ }
36
+
37
+ /** The lines a person sees on stderr for a failure; never a response body. */
38
+ export function credentialFailureMessage(error) {
39
+ const lines = error instanceof RunGitHubCredentialError && error.code ? RUN_GITHUB_ERROR_MESSAGES[error.code] : null
40
+ return lines ? `Mikka: ${lines[0]}\nMikka:${lines[1]}\n` : 'Mikka GitHub credentials or CI status unavailable.\n'
41
+ }
42
+
43
+ async function errorCode(response) {
44
+ try {
45
+ const body = await response.json()
46
+ return typeof body?.error === 'string' ? body.error : null
47
+ } catch { return null }
48
+ }
49
+
10
50
  export function matchesGitRepository(input, repository) {
11
51
  return input.protocol === 'https' && input.host === 'github.com' &&
12
52
  [repository, `${repository}.git`].some(path => input.path?.toLowerCase() === path.toLowerCase())
@@ -26,7 +66,7 @@ export async function getRunGitHubToken(config, { fetcher = fetch, now = Date.no
26
66
  method: 'POST', redirect: 'error', cache: 'no-store',
27
67
  headers: { authorization: `Bearer ${config.runToken}` }, signal: AbortSignal.timeout(15_000),
28
68
  })
29
- if (!response.ok) throw new Error('Run GitHub credentials unavailable')
69
+ if (!response.ok) throw new RunGitHubCredentialError(await errorCode(response))
30
70
  const result = await response.json()
31
71
  if (result.repository?.toLowerCase() !== config.repository.toLowerCase() || typeof result.token !== 'string' || !result.token ||
32
72
  !Number.isFinite(Date.parse(result.expiresAt)) || Date.parse(result.expiresAt) - now() <= minValidityMs) throw new Error('Invalid run GitHub credentials')
@@ -90,5 +130,5 @@ async function main() {
90
130
  }
91
131
 
92
132
  if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
93
- main().catch(() => { process.stderr.write('Mikka GitHub credentials or CI status unavailable.\n'); process.exitCode = 1 })
133
+ main().catch(error => { process.stderr.write(credentialFailureMessage(error)); process.exitCode = 1 })
94
134
  }
package/http-link.js CHANGED
@@ -4011,7 +4011,7 @@ var InvalidIdError = class extends DaemonError {
4011
4011
  // package.json
4012
4012
  var package_default = {
4013
4013
  name: "@mikka/daemon",
4014
- version: "0.0.255",
4014
+ version: "0.0.257",
4015
4015
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
4016
4016
  type: "module",
4017
4017
  private: true,
@@ -4070,7 +4070,7 @@ var package_default = {
4070
4070
  engines: {
4071
4071
  node: ">=24"
4072
4072
  },
4073
- gitHead: "e338c70f5a7bf148d9d04d1e8af00291ef8ae80f"
4073
+ gitHead: "816eb7fc61aa47fcb43d9448364870c0507c51e0"
4074
4074
  };
4075
4075
 
4076
4076
  // src/paths.ts
package/login.js CHANGED
@@ -3770,7 +3770,7 @@ var ServerUnreachableError = class extends DaemonError {
3770
3770
  // package.json
3771
3771
  var package_default = {
3772
3772
  name: "@mikka/daemon",
3773
- version: "0.0.255",
3773
+ version: "0.0.257",
3774
3774
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
3775
3775
  type: "module",
3776
3776
  private: true,
@@ -3829,7 +3829,7 @@ var package_default = {
3829
3829
  engines: {
3830
3830
  node: ">=24"
3831
3831
  },
3832
- gitHead: "e338c70f5a7bf148d9d04d1e8af00291ef8ae80f"
3832
+ gitHead: "816eb7fc61aa47fcb43d9448364870c0507c51e0"
3833
3833
  };
3834
3834
 
3835
3835
  // src/paths.ts
package/main.js CHANGED
@@ -3888,7 +3888,7 @@ import { join as join5 } from "node:path";
3888
3888
  // package.json
3889
3889
  var package_default = {
3890
3890
  name: "@mikka/daemon",
3891
- version: "0.0.255",
3891
+ version: "0.0.257",
3892
3892
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
3893
3893
  type: "module",
3894
3894
  private: true,
@@ -3947,7 +3947,7 @@ var package_default = {
3947
3947
  engines: {
3948
3948
  node: ">=24"
3949
3949
  },
3950
- gitHead: "e338c70f5a7bf148d9d04d1e8af00291ef8ae80f"
3950
+ gitHead: "816eb7fc61aa47fcb43d9448364870c0507c51e0"
3951
3951
  };
3952
3952
 
3953
3953
  // src/paths.ts
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "version": 1,
3
- "sourceSha": "e338c70f5a7bf148d9d04d1e8af00291ef8ae80f",
3
+ "sourceSha": "816eb7fc61aa47fcb43d9448364870c0507c51e0",
4
4
  "repository": "alexj11324/Mikka",
5
- "buildRunId": "41382617062",
5
+ "buildRunId": "41382982419",
6
6
  "buildKind": "github-actions-main",
7
7
  "sourceLockSha256": "d5866677d0c52d856be14efba47832070bc7f2fb92ef64b3bb253a4836587d30",
8
- "createdAt": "2026-11-02T03:50:54.622Z",
8
+ "createdAt": "2026-11-02T03:59:12.759Z",
9
9
  "sbom": "sbom.cdx.json",
10
10
  "files": [
11
11
  {
@@ -36,12 +36,12 @@
36
36
  {
37
37
  "path": "cli.js",
38
38
  "size": 589846,
39
- "sha256": "4df6f5b649f232f1617d3aa83f97d69d82f480e2bda9af25ec754277e70d1683"
39
+ "sha256": "7bfeed0e488d2de9d6057bbc845a7c69cf2a2ada436a3760bbf2a42e0d8e8cb6"
40
40
  },
41
41
  {
42
42
  "path": "client.js",
43
43
  "size": 142669,
44
- "sha256": "b0072b89d85cc4eb20744c10b3d8c41853a798f42157509d0cdf0e1358325ba6"
44
+ "sha256": "7e625a11583d88c7049a8499c8b830634a9a416a9eb47f2d53091808b2109bb7"
45
45
  },
46
46
  {
47
47
  "path": "computer/driver.mjs",
@@ -145,8 +145,8 @@
145
145
  },
146
146
  {
147
147
  "path": "github-credentials.mjs",
148
- "size": 4802,
149
- "sha256": "de57416ff8ce85d97b82b0c0fc17523bd2e787928d14a601dfd07e7caa1d9ce3"
148
+ "size": 7484,
149
+ "sha256": "21731ffcdd0b1cdf186da62f8f1f808fa0b47a791b09ffc30b9e45f9ad72118a"
150
150
  },
151
151
  {
152
152
  "path": "harness/cli.mjs",
@@ -166,7 +166,7 @@
166
166
  {
167
167
  "path": "http-link.js",
168
168
  "size": 175107,
169
- "sha256": "9a10bb7ca4bdef1445283790e0fe1f4154fd850baad78f815d544d5eba909b1d"
169
+ "sha256": "82d4d087c930ce04731afe0d36a47ca6b31f4872c0eea6680423610f461d5c7a"
170
170
  },
171
171
  {
172
172
  "path": "log.js",
@@ -176,12 +176,12 @@
176
176
  {
177
177
  "path": "login.js",
178
178
  "size": 147404,
179
- "sha256": "50bcf3999625b75651748b9212274b439a395f891f78efd2d757c29b79842567"
179
+ "sha256": "5c964730174dcfe0249eb1ad0f8fc4df06aa7f4def38fd23ebb2d4bca9e22ed3"
180
180
  },
181
181
  {
182
182
  "path": "main.js",
183
183
  "size": 542495,
184
- "sha256": "423489173c068fb585029117525b21a47cf7213e5cbc08611d4e51288af7f522"
184
+ "sha256": "3506685f5546bd5ab282e4c0b263bb756df8a90eb4d15bc757c225615b5716b1"
185
185
  },
186
186
  {
187
187
  "path": "mikka-mcp.mjs",
@@ -191,22 +191,22 @@
191
191
  {
192
192
  "path": "mikka.js",
193
193
  "size": 589862,
194
- "sha256": "1422eb74966785b0cca29dfc3f5edc8878e83e61d778bcc1dc471aa899a90caf"
194
+ "sha256": "d6bff3e6e9e4ce142895f80dc1bab9b563dbeaff96ec8bbcea62dc5f71ff541d"
195
195
  },
196
196
  {
197
197
  "path": "npm-shrinkwrap.json",
198
198
  "size": 76020,
199
- "sha256": "f126a129b6af89b702ce35dab2ea1d2beda0708a03b13a277ed2dfbfa5cca636"
199
+ "sha256": "fdf0d18d4a5b8c58074bfb8640d1c1e6eca8667c82ac23701d7d8cf446b31d21"
200
200
  },
201
201
  {
202
202
  "path": "package.json",
203
203
  "size": 1200,
204
- "sha256": "5190874f2f648fd1425a196447cadab31ea6a8ba402616f6a22df9225815afb6"
204
+ "sha256": "89e4d8bd0892d8402df2bcff11514cb67c6e4880d806e404cfc22a5f23cfcc9e"
205
205
  },
206
206
  {
207
207
  "path": "paths.js",
208
208
  "size": 4117,
209
- "sha256": "1c7f6372b13b35b912316cd3d6439ed5a5c076dcd6c632098dc5de84574ccf7a"
209
+ "sha256": "6e7893f4c9beff2e0c04fd6b7d8dd4603bc751d2aa12cc5ef84289ee9bf427ab"
210
210
  },
211
211
  {
212
212
  "path": "sandbox.js",
@@ -216,7 +216,7 @@
216
216
  {
217
217
  "path": "sbom.cdx.json",
218
218
  "size": 139999,
219
- "sha256": "58e5b74bbb0313ceb41cf3677fb7c2844677d4c1f5274a39cbdb5bf40ae231c1"
219
+ "sha256": "6bc15972f6e59138687cb280d5c81819747c9e66ad72013a843f2606e3ad1994"
220
220
  }
221
221
  ]
222
222
  }
package/mikka.js CHANGED
@@ -4520,7 +4520,7 @@ import { join as join4 } from "node:path";
4520
4520
  // package.json
4521
4521
  var package_default = {
4522
4522
  name: "@mikka/daemon",
4523
- version: "0.0.255",
4523
+ version: "0.0.257",
4524
4524
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
4525
4525
  type: "module",
4526
4526
  private: true,
@@ -4579,7 +4579,7 @@ var package_default = {
4579
4579
  engines: {
4580
4580
  node: ">=24"
4581
4581
  },
4582
- gitHead: "e338c70f5a7bf148d9d04d1e8af00291ef8ae80f"
4582
+ gitHead: "816eb7fc61aa47fcb43d9448364870c0507c51e0"
4583
4583
  };
4584
4584
 
4585
4585
  // src/paths.ts
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@aspectlylabs/mikka",
3
- "version": "0.0.255",
3
+ "version": "0.0.257",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@aspectlylabs/mikka",
9
- "version": "0.0.255",
9
+ "version": "0.0.257",
10
10
  "license": "AGPL-3.0-only",
11
11
  "dependencies": {
12
12
  "@agentclientprotocol/sdk": "1.9.0",
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@aspectlylabs/mikka",
3
- "version": "0.0.255",
3
+ "version": "0.0.257",
4
4
  "description": "Local Mikka daemon: runs agents through the user's own CLIs",
5
- "gitHead": "e338c70f5a7bf148d9d04d1e8af00291ef8ae80f",
5
+ "gitHead": "816eb7fc61aa47fcb43d9448364870c0507c51e0",
6
6
  "type": "module",
7
7
  "private": false,
8
8
  "license": "AGPL-3.0-only",
package/paths.js CHANGED
@@ -6,7 +6,7 @@ import { join } from "node:path";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@mikka/daemon",
9
- version: "0.0.255",
9
+ version: "0.0.257",
10
10
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
11
11
  type: "module",
12
12
  private: true,
@@ -65,7 +65,7 @@ var package_default = {
65
65
  engines: {
66
66
  node: ">=24"
67
67
  },
68
- gitHead: "e338c70f5a7bf148d9d04d1e8af00291ef8ae80f"
68
+ gitHead: "816eb7fc61aa47fcb43d9448364870c0507c51e0"
69
69
  };
70
70
 
71
71
  // src/paths.ts
package/sbom.cdx.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
3
3
  "bomFormat": "CycloneDX",
4
4
  "specVersion": "1.5",
5
- "serialNumber": "urn:uuid:91cca1a2-7f03-488d-a119-1d0268fdf318",
5
+ "serialNumber": "urn:uuid:e1229d78-3a9f-4a2c-b871-ab1d234461fa",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-11-02T03:50:53.789Z",
8
+ "timestamp": "2026-11-02T03:59:12.001Z",
9
9
  "lifecycles": [
10
10
  {
11
11
  "phase": "pre-build"
@@ -19,13 +19,13 @@
19
19
  }
20
20
  ],
21
21
  "component": {
22
- "bom-ref": "@aspectlylabs/mikka@0.0.255",
22
+ "bom-ref": "@aspectlylabs/mikka@0.0.257",
23
23
  "type": "library",
24
- "name": ".retained-build-AqsgHh",
25
- "version": "0.0.255",
24
+ "name": ".retained-build-x8XcN6",
25
+ "version": "0.0.257",
26
26
  "scope": "required",
27
27
  "description": "Local Mikka daemon: runs agents through the user's own CLIs",
28
- "purl": "pkg:npm/%40aspectlylabs/mikka@0.0.255",
28
+ "purl": "pkg:npm/%40aspectlylabs/mikka@0.0.257",
29
29
  "properties": [],
30
30
  "externalReferences": [
31
31
  {
@@ -4489,7 +4489,7 @@
4489
4489
  ],
4490
4490
  "dependencies": [
4491
4491
  {
4492
- "ref": "@aspectlylabs/mikka@0.0.255",
4492
+ "ref": "@aspectlylabs/mikka@0.0.257",
4493
4493
  "dependsOn": [
4494
4494
  "@agentclientprotocol/sdk@1.9.0",
4495
4495
  "@anthropic-ai/claude-agent-sdk@0.3.305",