@lilbox/contracts 0.0.2 → 0.0.3
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/dist/account.d.ts +2 -2
- package/dist/account.js +5 -3
- package/dist/define.js +1 -2
- package/dist/mcp-tools.json +1 -1
- package/dist/openapi.d.ts +3 -3
- package/dist/openapi.js +8 -3
- package/dist/openapi.json +40 -40
- package/dist/registry.d.ts +1 -1
- package/package.json +1 -1
package/dist/account.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export declare const Whoami: z.ZodObject<{
|
|
|
31
31
|
}, z.core.$strip>;
|
|
32
32
|
credential: z.ZodObject<{
|
|
33
33
|
kind: z.ZodEnum<{
|
|
34
|
+
dashboard: "dashboard";
|
|
34
35
|
agent: "agent";
|
|
35
|
-
session: "session";
|
|
36
36
|
api_key: "api_key";
|
|
37
37
|
}>;
|
|
38
38
|
scopes: z.ZodArray<z.ZodEnum<{
|
|
@@ -85,8 +85,8 @@ export declare const whoami: import("./define.js").OperationDef<z.ZodObject<{},
|
|
|
85
85
|
}, z.core.$strip>;
|
|
86
86
|
credential: z.ZodObject<{
|
|
87
87
|
kind: z.ZodEnum<{
|
|
88
|
+
dashboard: "dashboard";
|
|
88
89
|
agent: "agent";
|
|
89
|
-
session: "session";
|
|
90
90
|
api_key: "api_key";
|
|
91
91
|
}>;
|
|
92
92
|
scopes: z.ZodArray<z.ZodEnum<{
|
package/dist/account.js
CHANGED
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
// org's ID).
|
|
6
6
|
//
|
|
7
7
|
// Credentials:
|
|
8
|
-
// session the dashboard's
|
|
8
|
+
// session a signed-in browser: the dashboard's 15-min JWT plus a rotating refresh token, both in
|
|
9
|
+
// localStorage (Passport; docs/architecture/08 §9). No cookies.
|
|
9
10
|
// connected agent an OAuth grant: an MCP client or the CLI, connected through browser consent; revocable
|
|
10
11
|
// API key lbx_…, for CI and scripts; created by a human in the dashboard
|
|
11
12
|
// The OAuth endpoints (authorize, token, device flow, client registration) are standard protocol, served by
|
|
12
|
-
// oidc-provider, and
|
|
13
|
+
// oidc-provider, and the dashboard's /auth/* endpoints (sign-in, refresh, sign-out) are plumbing: neither is part
|
|
14
|
+
// of these contracts.
|
|
13
15
|
//
|
|
14
16
|
// Credentials are managed only from the dashboard (audience: human): an agent can never create its own
|
|
15
17
|
// credentials or widen its own access.
|
|
@@ -39,7 +41,7 @@ export const Whoami = z
|
|
|
39
41
|
.object({
|
|
40
42
|
user: User,
|
|
41
43
|
credential: z.object({
|
|
42
|
-
kind: z.enum(["
|
|
44
|
+
kind: z.enum(["dashboard", "agent", "api_key"]),
|
|
43
45
|
scopes: z.array(Scope),
|
|
44
46
|
expires_at: Timestamp.nullable(),
|
|
45
47
|
}),
|
package/dist/define.js
CHANGED
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
// - `mutating` accepts Idempotency-Key and dry_run.
|
|
10
10
|
// - `phase` 1 = available at launch. Later operations are added, never changed.
|
|
11
11
|
// - `audience` agent = an MCP tool and a REST endpoint, callable with OAuth tokens and API keys.
|
|
12
|
-
// human = REST only, with the dashboard's
|
|
13
|
-
// actions). Never an MCP tool: an agent can't create its own credentials or widen its access.
|
|
12
|
+
// human = REST only, with the dashboard's JWT (and a recent sign-in for sensitive actions). Never an MCP tool: an agent can't create its own credentials or widen its access.
|
|
14
13
|
export const defineOperation = (def) => def;
|
|
15
14
|
/** Path parameter names in an operation's path, e.g. ["app_id"]. */
|
|
16
15
|
export const pathParams = (op) => [...op.http.path.matchAll(/\{([a-z_]+)\}/g)].map((m) => m[1]);
|
package/dist/mcp-tools.json
CHANGED
package/dist/openapi.d.ts
CHANGED
|
@@ -21,10 +21,10 @@ export declare function buildOpenApi(version: string): {
|
|
|
21
21
|
scheme: string;
|
|
22
22
|
description: string;
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
dashboard: {
|
|
25
25
|
type: string;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
scheme: string;
|
|
27
|
+
bearerFormat: string;
|
|
28
28
|
description: string;
|
|
29
29
|
};
|
|
30
30
|
};
|
package/dist/openapi.js
CHANGED
|
@@ -95,7 +95,7 @@ function operationObject(op, components) {
|
|
|
95
95
|
"x-lilbox-scopes": op.scopes,
|
|
96
96
|
"x-lilbox-phase": op.phase,
|
|
97
97
|
"x-lilbox-audience": op.audience,
|
|
98
|
-
security: op.audience === "human" ? [{
|
|
98
|
+
security: op.audience === "human" ? [{ dashboard: [] }] : [{ bearer: op.scopes }, { dashboard: [] }],
|
|
99
99
|
...(parameters.length ? { parameters } : {}),
|
|
100
100
|
...(requestBody ? { requestBody } : {}),
|
|
101
101
|
responses: {
|
|
@@ -123,8 +123,13 @@ export function buildOpenApi(version) {
|
|
|
123
123
|
paths,
|
|
124
124
|
components: {
|
|
125
125
|
securitySchemes: {
|
|
126
|
-
bearer: { type: "http", scheme: "bearer", description: "OAuth access token or an lbx_ API key." },
|
|
127
|
-
|
|
126
|
+
bearer: { type: "http", scheme: "bearer", description: "An OAuth access token (agents, the CLI) or an lbx_ API key." },
|
|
127
|
+
dashboard: {
|
|
128
|
+
type: "http",
|
|
129
|
+
scheme: "bearer",
|
|
130
|
+
bearerFormat: "JWT",
|
|
131
|
+
description: "The dashboard's access token: a 15-minute JWT from signing in at lilbox.ai. Accepted everywhere; dashboard-only operations accept nothing else.",
|
|
132
|
+
},
|
|
128
133
|
},
|
|
129
134
|
schemas,
|
|
130
135
|
responses: {
|
package/dist/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "lilbox API",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.3",
|
|
6
6
|
"description": "The lilbox REST API. Every operation is also an MCP tool with the same name at https://mcp.lilbox.ai."
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"bearer": []
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"
|
|
30
|
+
"dashboard": []
|
|
31
31
|
}
|
|
32
32
|
],
|
|
33
33
|
"responses": {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"x-lilbox-audience": "human",
|
|
82
82
|
"security": [
|
|
83
83
|
{
|
|
84
|
-
"
|
|
84
|
+
"dashboard": []
|
|
85
85
|
}
|
|
86
86
|
],
|
|
87
87
|
"parameters": [
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"x-lilbox-audience": "human",
|
|
176
176
|
"security": [
|
|
177
177
|
{
|
|
178
|
-
"
|
|
178
|
+
"dashboard": []
|
|
179
179
|
}
|
|
180
180
|
],
|
|
181
181
|
"parameters": [
|
|
@@ -261,7 +261,7 @@
|
|
|
261
261
|
"x-lilbox-audience": "human",
|
|
262
262
|
"security": [
|
|
263
263
|
{
|
|
264
|
-
"
|
|
264
|
+
"dashboard": []
|
|
265
265
|
}
|
|
266
266
|
],
|
|
267
267
|
"parameters": [
|
|
@@ -353,7 +353,7 @@
|
|
|
353
353
|
"x-lilbox-audience": "human",
|
|
354
354
|
"security": [
|
|
355
355
|
{
|
|
356
|
-
"
|
|
356
|
+
"dashboard": []
|
|
357
357
|
}
|
|
358
358
|
],
|
|
359
359
|
"parameters": [
|
|
@@ -474,7 +474,7 @@
|
|
|
474
474
|
"x-lilbox-audience": "human",
|
|
475
475
|
"security": [
|
|
476
476
|
{
|
|
477
|
-
"
|
|
477
|
+
"dashboard": []
|
|
478
478
|
}
|
|
479
479
|
],
|
|
480
480
|
"parameters": [
|
|
@@ -567,7 +567,7 @@
|
|
|
567
567
|
]
|
|
568
568
|
},
|
|
569
569
|
{
|
|
570
|
-
"
|
|
570
|
+
"dashboard": []
|
|
571
571
|
}
|
|
572
572
|
],
|
|
573
573
|
"parameters": [
|
|
@@ -666,7 +666,7 @@
|
|
|
666
666
|
]
|
|
667
667
|
},
|
|
668
668
|
{
|
|
669
|
-
"
|
|
669
|
+
"dashboard": []
|
|
670
670
|
}
|
|
671
671
|
],
|
|
672
672
|
"parameters": [
|
|
@@ -774,7 +774,7 @@
|
|
|
774
774
|
]
|
|
775
775
|
},
|
|
776
776
|
{
|
|
777
|
-
"
|
|
777
|
+
"dashboard": []
|
|
778
778
|
}
|
|
779
779
|
],
|
|
780
780
|
"parameters": [
|
|
@@ -854,7 +854,7 @@
|
|
|
854
854
|
]
|
|
855
855
|
},
|
|
856
856
|
{
|
|
857
|
-
"
|
|
857
|
+
"dashboard": []
|
|
858
858
|
}
|
|
859
859
|
],
|
|
860
860
|
"parameters": [
|
|
@@ -966,7 +966,7 @@
|
|
|
966
966
|
]
|
|
967
967
|
},
|
|
968
968
|
{
|
|
969
|
-
"
|
|
969
|
+
"dashboard": []
|
|
970
970
|
}
|
|
971
971
|
],
|
|
972
972
|
"parameters": [
|
|
@@ -1039,7 +1039,7 @@
|
|
|
1039
1039
|
]
|
|
1040
1040
|
},
|
|
1041
1041
|
{
|
|
1042
|
-
"
|
|
1042
|
+
"dashboard": []
|
|
1043
1043
|
}
|
|
1044
1044
|
],
|
|
1045
1045
|
"parameters": [
|
|
@@ -1171,7 +1171,7 @@
|
|
|
1171
1171
|
]
|
|
1172
1172
|
},
|
|
1173
1173
|
{
|
|
1174
|
-
"
|
|
1174
|
+
"dashboard": []
|
|
1175
1175
|
}
|
|
1176
1176
|
],
|
|
1177
1177
|
"parameters": [
|
|
@@ -1300,7 +1300,7 @@
|
|
|
1300
1300
|
]
|
|
1301
1301
|
},
|
|
1302
1302
|
{
|
|
1303
|
-
"
|
|
1303
|
+
"dashboard": []
|
|
1304
1304
|
}
|
|
1305
1305
|
],
|
|
1306
1306
|
"parameters": [
|
|
@@ -1435,7 +1435,7 @@
|
|
|
1435
1435
|
]
|
|
1436
1436
|
},
|
|
1437
1437
|
{
|
|
1438
|
-
"
|
|
1438
|
+
"dashboard": []
|
|
1439
1439
|
}
|
|
1440
1440
|
],
|
|
1441
1441
|
"parameters": [
|
|
@@ -1577,7 +1577,7 @@
|
|
|
1577
1577
|
]
|
|
1578
1578
|
},
|
|
1579
1579
|
{
|
|
1580
|
-
"
|
|
1580
|
+
"dashboard": []
|
|
1581
1581
|
}
|
|
1582
1582
|
],
|
|
1583
1583
|
"parameters": [
|
|
@@ -1766,7 +1766,7 @@
|
|
|
1766
1766
|
]
|
|
1767
1767
|
},
|
|
1768
1768
|
{
|
|
1769
|
-
"
|
|
1769
|
+
"dashboard": []
|
|
1770
1770
|
}
|
|
1771
1771
|
],
|
|
1772
1772
|
"parameters": [
|
|
@@ -1998,7 +1998,7 @@
|
|
|
1998
1998
|
]
|
|
1999
1999
|
},
|
|
2000
2000
|
{
|
|
2001
|
-
"
|
|
2001
|
+
"dashboard": []
|
|
2002
2002
|
}
|
|
2003
2003
|
],
|
|
2004
2004
|
"parameters": [
|
|
@@ -2126,7 +2126,7 @@
|
|
|
2126
2126
|
]
|
|
2127
2127
|
},
|
|
2128
2128
|
{
|
|
2129
|
-
"
|
|
2129
|
+
"dashboard": []
|
|
2130
2130
|
}
|
|
2131
2131
|
],
|
|
2132
2132
|
"parameters": [
|
|
@@ -2220,7 +2220,7 @@
|
|
|
2220
2220
|
]
|
|
2221
2221
|
},
|
|
2222
2222
|
{
|
|
2223
|
-
"
|
|
2223
|
+
"dashboard": []
|
|
2224
2224
|
}
|
|
2225
2225
|
],
|
|
2226
2226
|
"parameters": [
|
|
@@ -2312,7 +2312,7 @@
|
|
|
2312
2312
|
]
|
|
2313
2313
|
},
|
|
2314
2314
|
{
|
|
2315
|
-
"
|
|
2315
|
+
"dashboard": []
|
|
2316
2316
|
}
|
|
2317
2317
|
],
|
|
2318
2318
|
"parameters": [
|
|
@@ -2479,7 +2479,7 @@
|
|
|
2479
2479
|
]
|
|
2480
2480
|
},
|
|
2481
2481
|
{
|
|
2482
|
-
"
|
|
2482
|
+
"dashboard": []
|
|
2483
2483
|
}
|
|
2484
2484
|
],
|
|
2485
2485
|
"parameters": [
|
|
@@ -2592,7 +2592,7 @@
|
|
|
2592
2592
|
]
|
|
2593
2593
|
},
|
|
2594
2594
|
{
|
|
2595
|
-
"
|
|
2595
|
+
"dashboard": []
|
|
2596
2596
|
}
|
|
2597
2597
|
],
|
|
2598
2598
|
"parameters": [
|
|
@@ -2665,7 +2665,7 @@
|
|
|
2665
2665
|
]
|
|
2666
2666
|
},
|
|
2667
2667
|
{
|
|
2668
|
-
"
|
|
2668
|
+
"dashboard": []
|
|
2669
2669
|
}
|
|
2670
2670
|
],
|
|
2671
2671
|
"parameters": [
|
|
@@ -2838,7 +2838,7 @@
|
|
|
2838
2838
|
]
|
|
2839
2839
|
},
|
|
2840
2840
|
{
|
|
2841
|
-
"
|
|
2841
|
+
"dashboard": []
|
|
2842
2842
|
}
|
|
2843
2843
|
],
|
|
2844
2844
|
"parameters": [
|
|
@@ -2986,7 +2986,7 @@
|
|
|
2986
2986
|
"bearer": []
|
|
2987
2987
|
},
|
|
2988
2988
|
{
|
|
2989
|
-
"
|
|
2989
|
+
"dashboard": []
|
|
2990
2990
|
}
|
|
2991
2991
|
],
|
|
2992
2992
|
"responses": {
|
|
@@ -3059,7 +3059,7 @@
|
|
|
3059
3059
|
]
|
|
3060
3060
|
},
|
|
3061
3061
|
{
|
|
3062
|
-
"
|
|
3062
|
+
"dashboard": []
|
|
3063
3063
|
}
|
|
3064
3064
|
],
|
|
3065
3065
|
"responses": {
|
|
@@ -3165,7 +3165,7 @@
|
|
|
3165
3165
|
]
|
|
3166
3166
|
},
|
|
3167
3167
|
{
|
|
3168
|
-
"
|
|
3168
|
+
"dashboard": []
|
|
3169
3169
|
}
|
|
3170
3170
|
],
|
|
3171
3171
|
"parameters": [
|
|
@@ -3255,7 +3255,7 @@
|
|
|
3255
3255
|
]
|
|
3256
3256
|
},
|
|
3257
3257
|
{
|
|
3258
|
-
"
|
|
3258
|
+
"dashboard": []
|
|
3259
3259
|
}
|
|
3260
3260
|
],
|
|
3261
3261
|
"parameters": [
|
|
@@ -3365,7 +3365,7 @@
|
|
|
3365
3365
|
]
|
|
3366
3366
|
},
|
|
3367
3367
|
{
|
|
3368
|
-
"
|
|
3368
|
+
"dashboard": []
|
|
3369
3369
|
}
|
|
3370
3370
|
],
|
|
3371
3371
|
"parameters": [
|
|
@@ -3480,7 +3480,7 @@
|
|
|
3480
3480
|
]
|
|
3481
3481
|
},
|
|
3482
3482
|
{
|
|
3483
|
-
"
|
|
3483
|
+
"dashboard": []
|
|
3484
3484
|
}
|
|
3485
3485
|
],
|
|
3486
3486
|
"responses": {
|
|
@@ -3534,7 +3534,7 @@
|
|
|
3534
3534
|
"x-lilbox-audience": "human",
|
|
3535
3535
|
"security": [
|
|
3536
3536
|
{
|
|
3537
|
-
"
|
|
3537
|
+
"dashboard": []
|
|
3538
3538
|
}
|
|
3539
3539
|
],
|
|
3540
3540
|
"parameters": [
|
|
@@ -3620,13 +3620,13 @@
|
|
|
3620
3620
|
"bearer": {
|
|
3621
3621
|
"type": "http",
|
|
3622
3622
|
"scheme": "bearer",
|
|
3623
|
-
"description": "OAuth access token or an lbx_ API key."
|
|
3623
|
+
"description": "An OAuth access token (agents, the CLI) or an lbx_ API key."
|
|
3624
3624
|
},
|
|
3625
|
-
"
|
|
3626
|
-
"type": "
|
|
3627
|
-
"
|
|
3628
|
-
"
|
|
3629
|
-
"description": "The dashboard's
|
|
3625
|
+
"dashboard": {
|
|
3626
|
+
"type": "http",
|
|
3627
|
+
"scheme": "bearer",
|
|
3628
|
+
"bearerFormat": "JWT",
|
|
3629
|
+
"description": "The dashboard's access token: a 15-minute JWT from signing in at lilbox.ai. Accepted everywhere; dashboard-only operations accept nothing else."
|
|
3630
3630
|
}
|
|
3631
3631
|
},
|
|
3632
3632
|
"schemas": {
|
|
@@ -3642,7 +3642,7 @@
|
|
|
3642
3642
|
"kind": {
|
|
3643
3643
|
"type": "string",
|
|
3644
3644
|
"enum": [
|
|
3645
|
-
"
|
|
3645
|
+
"dashboard",
|
|
3646
3646
|
"agent",
|
|
3647
3647
|
"api_key"
|
|
3648
3648
|
]
|
package/dist/registry.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ export declare const operations: {
|
|
|
14
14
|
}, import("zod/v4/core").$strip>;
|
|
15
15
|
credential: import("zod").ZodObject<{
|
|
16
16
|
kind: import("zod").ZodEnum<{
|
|
17
|
+
dashboard: "dashboard";
|
|
17
18
|
agent: "agent";
|
|
18
|
-
session: "session";
|
|
19
19
|
api_key: "api_key";
|
|
20
20
|
}>;
|
|
21
21
|
scopes: import("zod").ZodArray<import("zod").ZodEnum<{
|
package/package.json
CHANGED