@aspectlylabs/mikka 0.0.141 → 0.0.143
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/agents/native-container.mjs +4 -1
- package/cli.js +275 -99
- package/client.js +18 -3
- package/http-link.js +20 -3
- package/login.js +18 -3
- package/main.js +273 -99
- package/mikka-release-manifest.json +21 -21
- package/mikka.js +275 -99
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
- package/paths.js +2 -2
- package/sbom.cdx.json +7 -7
package/client.js
CHANGED
|
@@ -2941,6 +2941,15 @@ var setupRecipeSchema = z14.object({
|
|
|
2941
2941
|
/** Approved once per repo by the user; unapproved recipes never run. */
|
|
2942
2942
|
approved: z14.boolean()
|
|
2943
2943
|
});
|
|
2944
|
+
var credentialKey = z14.string().min(1).max(4096).refine((value) => !/[\r\n\0]/.test(value));
|
|
2945
|
+
var credentialBaseUrl = z14.url().max(500).refine((value) => {
|
|
2946
|
+
const url = new URL(value);
|
|
2947
|
+
return url.protocol === "https:" && !url.username && !url.password && !url.search && !url.hash;
|
|
2948
|
+
});
|
|
2949
|
+
var runModelCredentialSchema = z14.discriminatedUnion("kind", [
|
|
2950
|
+
z14.object({ kind: z14.literal("api_key"), key: credentialKey }).strict(),
|
|
2951
|
+
z14.object({ kind: z14.literal("provider"), protocol: z14.enum(["anthropic", "openai"]), baseUrl: credentialBaseUrl, key: credentialKey }).strict()
|
|
2952
|
+
]);
|
|
2944
2953
|
var deviceRepoSchema = z14.object({
|
|
2945
2954
|
repoId: id2,
|
|
2946
2955
|
name: z14.string().max(500),
|
|
@@ -2988,6 +2997,12 @@ var runAssignmentSchema = z14.object({
|
|
|
2988
2997
|
consumerId: z14.uuid(),
|
|
2989
2998
|
route: z14.enum(["codex_cli", "claude_code_cli"])
|
|
2990
2999
|
}).strict().optional(),
|
|
3000
|
+
/**
|
|
3001
|
+
* The run's own API key, opened for this claim only. Never with
|
|
3002
|
+
* `subscriptionBinding`. The daemon keeps it in memory and hands it only
|
|
3003
|
+
* to the run's Agent process or container; it is never journaled.
|
|
3004
|
+
*/
|
|
3005
|
+
modelCredential: runModelCredentialSchema.optional(),
|
|
2991
3006
|
/** Local host authority comes only from the server's owner-bound Bot run. */
|
|
2992
3007
|
localComputer: z14.object({
|
|
2993
3008
|
botId: z14.uuid(),
|
|
@@ -3105,7 +3120,7 @@ var runAssignmentSchema = z14.object({
|
|
|
3105
3120
|
skillReceipt: skillAssignmentReceiptSchema.optional(),
|
|
3106
3121
|
/** Frozen by the server benchmark ledger; never extracted from model output. */
|
|
3107
3122
|
benchmark: runBenchmarkContext.optional()
|
|
3108
|
-
});
|
|
3123
|
+
}).refine((value) => !(value.modelCredential && value.subscriptionBinding), { message: "A run has one model credential", path: ["modelCredential"] });
|
|
3109
3124
|
var runPatchSchema = z14.object({
|
|
3110
3125
|
state: z14.enum([
|
|
3111
3126
|
"queued",
|
|
@@ -3719,7 +3734,7 @@ import { join } from "node:path";
|
|
|
3719
3734
|
// package.json
|
|
3720
3735
|
var package_default = {
|
|
3721
3736
|
name: "@mikka/daemon",
|
|
3722
|
-
version: "0.0.
|
|
3737
|
+
version: "0.0.143",
|
|
3723
3738
|
description: "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
3724
3739
|
type: "module",
|
|
3725
3740
|
private: true,
|
|
@@ -3779,7 +3794,7 @@ var package_default = {
|
|
|
3779
3794
|
engines: {
|
|
3780
3795
|
node: ">=24"
|
|
3781
3796
|
},
|
|
3782
|
-
gitHead: "
|
|
3797
|
+
gitHead: "1a7ea7ffcdb44a8228f84d936a7a395f33f13355"
|
|
3783
3798
|
};
|
|
3784
3799
|
|
|
3785
3800
|
// src/paths.ts
|
package/http-link.js
CHANGED
|
@@ -3455,6 +3455,16 @@ var setupRecipeSchema = z18.object({
|
|
|
3455
3455
|
approved: z18.boolean()
|
|
3456
3456
|
});
|
|
3457
3457
|
var REPO_ORIGIN_HEADER = "x-mikka-repo-origin-check";
|
|
3458
|
+
var MODEL_CREDENTIAL_HEADER = "x-mikka-model-credential";
|
|
3459
|
+
var credentialKey = z18.string().min(1).max(4096).refine((value) => !/[\r\n\0]/.test(value));
|
|
3460
|
+
var credentialBaseUrl = z18.url().max(500).refine((value) => {
|
|
3461
|
+
const url = new URL(value);
|
|
3462
|
+
return url.protocol === "https:" && !url.username && !url.password && !url.search && !url.hash;
|
|
3463
|
+
});
|
|
3464
|
+
var runModelCredentialSchema = z18.discriminatedUnion("kind", [
|
|
3465
|
+
z18.object({ kind: z18.literal("api_key"), key: credentialKey }).strict(),
|
|
3466
|
+
z18.object({ kind: z18.literal("provider"), protocol: z18.enum(["anthropic", "openai"]), baseUrl: credentialBaseUrl, key: credentialKey }).strict()
|
|
3467
|
+
]);
|
|
3458
3468
|
var deviceRepoSchema = z18.object({
|
|
3459
3469
|
repoId: id3,
|
|
3460
3470
|
name: z18.string().max(500),
|
|
@@ -3502,6 +3512,12 @@ var runAssignmentSchema = z18.object({
|
|
|
3502
3512
|
consumerId: z18.uuid(),
|
|
3503
3513
|
route: z18.enum(["codex_cli", "claude_code_cli"])
|
|
3504
3514
|
}).strict().optional(),
|
|
3515
|
+
/**
|
|
3516
|
+
* The run's own API key, opened for this claim only. Never with
|
|
3517
|
+
* `subscriptionBinding`. The daemon keeps it in memory and hands it only
|
|
3518
|
+
* to the run's Agent process or container; it is never journaled.
|
|
3519
|
+
*/
|
|
3520
|
+
modelCredential: runModelCredentialSchema.optional(),
|
|
3505
3521
|
/** Local host authority comes only from the server's owner-bound Bot run. */
|
|
3506
3522
|
localComputer: z18.object({
|
|
3507
3523
|
botId: z18.uuid(),
|
|
@@ -3619,7 +3635,7 @@ var runAssignmentSchema = z18.object({
|
|
|
3619
3635
|
skillReceipt: skillAssignmentReceiptSchema.optional(),
|
|
3620
3636
|
/** Frozen by the server benchmark ledger; never extracted from model output. */
|
|
3621
3637
|
benchmark: runBenchmarkContext.optional()
|
|
3622
|
-
});
|
|
3638
|
+
}).refine((value) => !(value.modelCredential && value.subscriptionBinding), { message: "A run has one model credential", path: ["modelCredential"] });
|
|
3623
3639
|
var runPatchSchema = z18.object({
|
|
3624
3640
|
state: z18.enum([
|
|
3625
3641
|
"queued",
|
|
@@ -4121,7 +4137,7 @@ var InvalidIdError = class extends DaemonError {
|
|
|
4121
4137
|
// package.json
|
|
4122
4138
|
var package_default = {
|
|
4123
4139
|
name: "@mikka/daemon",
|
|
4124
|
-
version: "0.0.
|
|
4140
|
+
version: "0.0.143",
|
|
4125
4141
|
description: "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
4126
4142
|
type: "module",
|
|
4127
4143
|
private: true,
|
|
@@ -4181,7 +4197,7 @@ var package_default = {
|
|
|
4181
4197
|
engines: {
|
|
4182
4198
|
node: ">=24"
|
|
4183
4199
|
},
|
|
4184
|
-
gitHead: "
|
|
4200
|
+
gitHead: "1a7ea7ffcdb44a8228f84d936a7a395f33f13355"
|
|
4185
4201
|
};
|
|
4186
4202
|
|
|
4187
4203
|
// src/paths.ts
|
|
@@ -4539,6 +4555,7 @@ var HttpServerLink = class {
|
|
|
4539
4555
|
[TEAM_SKILL_HEADER]: "1",
|
|
4540
4556
|
[REPO_ORIGIN_HEADER]: "1",
|
|
4541
4557
|
[RECOVERY_WORKTREE_HEADER]: "1",
|
|
4558
|
+
[MODEL_CREDENTIAL_HEADER]: "1",
|
|
4542
4559
|
...token ? { authorization: `Bearer ${token}` } : {},
|
|
4543
4560
|
...this.protectionBypass ? { "x-vercel-protection-bypass": this.protectionBypass } : {}
|
|
4544
4561
|
},
|
package/login.js
CHANGED
|
@@ -2937,6 +2937,15 @@ var setupRecipeSchema = z14.object({
|
|
|
2937
2937
|
/** Approved once per repo by the user; unapproved recipes never run. */
|
|
2938
2938
|
approved: z14.boolean()
|
|
2939
2939
|
});
|
|
2940
|
+
var credentialKey = z14.string().min(1).max(4096).refine((value) => !/[\r\n\0]/.test(value));
|
|
2941
|
+
var credentialBaseUrl = z14.url().max(500).refine((value) => {
|
|
2942
|
+
const url = new URL(value);
|
|
2943
|
+
return url.protocol === "https:" && !url.username && !url.password && !url.search && !url.hash;
|
|
2944
|
+
});
|
|
2945
|
+
var runModelCredentialSchema = z14.discriminatedUnion("kind", [
|
|
2946
|
+
z14.object({ kind: z14.literal("api_key"), key: credentialKey }).strict(),
|
|
2947
|
+
z14.object({ kind: z14.literal("provider"), protocol: z14.enum(["anthropic", "openai"]), baseUrl: credentialBaseUrl, key: credentialKey }).strict()
|
|
2948
|
+
]);
|
|
2940
2949
|
var deviceRepoSchema = z14.object({
|
|
2941
2950
|
repoId: id2,
|
|
2942
2951
|
name: z14.string().max(500),
|
|
@@ -2984,6 +2993,12 @@ var runAssignmentSchema = z14.object({
|
|
|
2984
2993
|
consumerId: z14.uuid(),
|
|
2985
2994
|
route: z14.enum(["codex_cli", "claude_code_cli"])
|
|
2986
2995
|
}).strict().optional(),
|
|
2996
|
+
/**
|
|
2997
|
+
* The run's own API key, opened for this claim only. Never with
|
|
2998
|
+
* `subscriptionBinding`. The daemon keeps it in memory and hands it only
|
|
2999
|
+
* to the run's Agent process or container; it is never journaled.
|
|
3000
|
+
*/
|
|
3001
|
+
modelCredential: runModelCredentialSchema.optional(),
|
|
2987
3002
|
/** Local host authority comes only from the server's owner-bound Bot run. */
|
|
2988
3003
|
localComputer: z14.object({
|
|
2989
3004
|
botId: z14.uuid(),
|
|
@@ -3101,7 +3116,7 @@ var runAssignmentSchema = z14.object({
|
|
|
3101
3116
|
skillReceipt: skillAssignmentReceiptSchema.optional(),
|
|
3102
3117
|
/** Frozen by the server benchmark ledger; never extracted from model output. */
|
|
3103
3118
|
benchmark: runBenchmarkContext.optional()
|
|
3104
|
-
});
|
|
3119
|
+
}).refine((value) => !(value.modelCredential && value.subscriptionBinding), { message: "A run has one model credential", path: ["modelCredential"] });
|
|
3105
3120
|
var runPatchSchema = z14.object({
|
|
3106
3121
|
state: z14.enum([
|
|
3107
3122
|
"queued",
|
|
@@ -3726,7 +3741,7 @@ var ServerUnreachableError = class extends DaemonError {
|
|
|
3726
3741
|
// package.json
|
|
3727
3742
|
var package_default = {
|
|
3728
3743
|
name: "@mikka/daemon",
|
|
3729
|
-
version: "0.0.
|
|
3744
|
+
version: "0.0.143",
|
|
3730
3745
|
description: "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
3731
3746
|
type: "module",
|
|
3732
3747
|
private: true,
|
|
@@ -3786,7 +3801,7 @@ var package_default = {
|
|
|
3786
3801
|
engines: {
|
|
3787
3802
|
node: ">=24"
|
|
3788
3803
|
},
|
|
3789
|
-
gitHead: "
|
|
3804
|
+
gitHead: "1a7ea7ffcdb44a8228f84d936a7a395f33f13355"
|
|
3790
3805
|
};
|
|
3791
3806
|
|
|
3792
3807
|
// src/paths.ts
|