@atcx/contract 7.12.0 → 7.13.0
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/README.md +5 -5
- package/dist/daemon-contract.d.ts +55 -0
- package/dist/daemon-event.d.ts +20 -0
- package/dist/daemon-features.d.ts +1 -1
- package/dist/index.js +10 -3
- package/dist/session-descriptor.d.ts +5 -0
- package/dist/spawn-answer.d.ts +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
<p>
|
|
5
5
|
<a href="https://www.npmjs.com/package/@atcx/contract"><img src="https://img.shields.io/npm/v/@atcx/contract" alt="npm version"></a>
|
|
6
|
-
<a href="https://github.com/zgeoff/atc/blob/%40zgeoff%2Fatc%407.
|
|
6
|
+
<a href="https://github.com/zgeoff/atc/blob/%40zgeoff%2Fatc%407.13.0/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license"></a>
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<p>
|
|
10
|
-
<a href="https://github.com/zgeoff/atc/blob/%40zgeoff%2Fatc%407.
|
|
11
|
-
<a href="https://github.com/zgeoff/atc/blob/%40zgeoff%2Fatc%407.
|
|
10
|
+
<a href="https://github.com/zgeoff/atc/blob/%40zgeoff%2Fatc%407.13.0/docs/architecture/protocol/contract.md">The published contract</a> •
|
|
11
|
+
<a href="https://github.com/zgeoff/atc/blob/%40zgeoff%2Fatc%407.13.0/docs/architecture/protocol/protocol.md">The client protocol</a>
|
|
12
12
|
</p>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
@@ -54,9 +54,9 @@ bun add -d @opentelemetry/api
|
|
|
54
54
|
## Configuration
|
|
55
55
|
|
|
56
56
|
`CONFIG_FILE_SCHEMA` parses the top-level keys of atc's `config.json`, and the
|
|
57
|
-
[configuration guide](https://github.com/zgeoff/atc/blob/%40zgeoff%2Fatc%407.
|
|
57
|
+
[configuration guide](https://github.com/zgeoff/atc/blob/%40zgeoff%2Fatc%407.13.0/docs/guides/configuration.md) describes each key.
|
|
58
58
|
|
|
59
59
|
## Documentation
|
|
60
60
|
|
|
61
|
-
[The published contract](https://github.com/zgeoff/atc/blob/%40zgeoff%2Fatc%407.
|
|
61
|
+
[The published contract](https://github.com/zgeoff/atc/blob/%40zgeoff%2Fatc%407.13.0/docs/architecture/protocol/contract.md) covers what the package holds
|
|
62
62
|
and how its version moves with atc's.
|
|
@@ -464,6 +464,11 @@ export declare const DAEMON_CONTRACT: {
|
|
|
464
464
|
}, z.core.$strip>;
|
|
465
465
|
model: z.ZodOptional<z.ZodString>;
|
|
466
466
|
pluginDirs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
467
|
+
host: z.ZodOptional<z.ZodObject<{
|
|
468
|
+
name: z.ZodString;
|
|
469
|
+
id: z.ZodOptional<z.ZodString>;
|
|
470
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
471
|
+
}, z.core.$strip>>;
|
|
467
472
|
}, z.core.$strip>>>;
|
|
468
473
|
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
|
|
469
474
|
access: "owner" | "principal";
|
|
@@ -579,6 +584,11 @@ export declare const DAEMON_CONTRACT: {
|
|
|
579
584
|
}, z.core.$strip>;
|
|
580
585
|
model: z.ZodOptional<z.ZodString>;
|
|
581
586
|
pluginDirs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
587
|
+
host: z.ZodOptional<z.ZodObject<{
|
|
588
|
+
name: z.ZodString;
|
|
589
|
+
id: z.ZodOptional<z.ZodString>;
|
|
590
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
591
|
+
}, z.core.$strip>>;
|
|
582
592
|
}, z.core.$strip>;
|
|
583
593
|
warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
584
594
|
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
|
|
@@ -881,6 +891,11 @@ export declare const DAEMON_CONTRACT: {
|
|
|
881
891
|
}, z.core.$strip>;
|
|
882
892
|
model: z.ZodOptional<z.ZodString>;
|
|
883
893
|
pluginDirs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
894
|
+
host: z.ZodOptional<z.ZodObject<{
|
|
895
|
+
name: z.ZodString;
|
|
896
|
+
id: z.ZodOptional<z.ZodString>;
|
|
897
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
898
|
+
}, z.core.$strip>>;
|
|
884
899
|
}, z.core.$strip>;
|
|
885
900
|
prompt: z.ZodNullable<z.ZodString>;
|
|
886
901
|
lastActivityAt: z.ZodNumber;
|
|
@@ -1167,6 +1182,11 @@ export declare const DAEMON_CONTRACT: {
|
|
|
1167
1182
|
};
|
|
1168
1183
|
model?: string | undefined;
|
|
1169
1184
|
pluginDirs?: readonly string[] | undefined;
|
|
1185
|
+
host?: {
|
|
1186
|
+
name: string;
|
|
1187
|
+
id?: string | undefined;
|
|
1188
|
+
issuer?: string | undefined;
|
|
1189
|
+
} | undefined;
|
|
1170
1190
|
};
|
|
1171
1191
|
ev: "SessionAdded";
|
|
1172
1192
|
} | {
|
|
@@ -1208,6 +1228,11 @@ export declare const DAEMON_CONTRACT: {
|
|
|
1208
1228
|
};
|
|
1209
1229
|
model?: string | undefined;
|
|
1210
1230
|
pluginDirs?: readonly string[] | undefined;
|
|
1231
|
+
host?: {
|
|
1232
|
+
name: string;
|
|
1233
|
+
id?: string | undefined;
|
|
1234
|
+
issuer?: string | undefined;
|
|
1235
|
+
} | undefined;
|
|
1211
1236
|
};
|
|
1212
1237
|
ev: "SessionState";
|
|
1213
1238
|
} | {
|
|
@@ -1249,6 +1274,11 @@ export declare const DAEMON_CONTRACT: {
|
|
|
1249
1274
|
};
|
|
1250
1275
|
model?: string | undefined;
|
|
1251
1276
|
pluginDirs?: readonly string[] | undefined;
|
|
1277
|
+
host?: {
|
|
1278
|
+
name: string;
|
|
1279
|
+
id?: string | undefined;
|
|
1280
|
+
issuer?: string | undefined;
|
|
1281
|
+
} | undefined;
|
|
1252
1282
|
};
|
|
1253
1283
|
ev: "SessionAttached";
|
|
1254
1284
|
} | {
|
|
@@ -1290,6 +1320,11 @@ export declare const DAEMON_CONTRACT: {
|
|
|
1290
1320
|
};
|
|
1291
1321
|
model?: string | undefined;
|
|
1292
1322
|
pluginDirs?: readonly string[] | undefined;
|
|
1323
|
+
host?: {
|
|
1324
|
+
name: string;
|
|
1325
|
+
id?: string | undefined;
|
|
1326
|
+
issuer?: string | undefined;
|
|
1327
|
+
} | undefined;
|
|
1293
1328
|
};
|
|
1294
1329
|
ev: "SessionDetached";
|
|
1295
1330
|
}, unknown, void>, import("@orpc/contract").AsyncIteratorClass<{
|
|
@@ -1453,6 +1488,11 @@ export declare const DAEMON_CONTRACT: {
|
|
|
1453
1488
|
};
|
|
1454
1489
|
model?: string | undefined;
|
|
1455
1490
|
pluginDirs?: readonly string[] | undefined;
|
|
1491
|
+
host?: {
|
|
1492
|
+
name: string;
|
|
1493
|
+
id?: string | undefined;
|
|
1494
|
+
issuer?: string | undefined;
|
|
1495
|
+
} | undefined;
|
|
1456
1496
|
};
|
|
1457
1497
|
ev: "SessionAdded";
|
|
1458
1498
|
} | {
|
|
@@ -1494,6 +1534,11 @@ export declare const DAEMON_CONTRACT: {
|
|
|
1494
1534
|
};
|
|
1495
1535
|
model?: string | undefined;
|
|
1496
1536
|
pluginDirs?: readonly string[] | undefined;
|
|
1537
|
+
host?: {
|
|
1538
|
+
name: string;
|
|
1539
|
+
id?: string | undefined;
|
|
1540
|
+
issuer?: string | undefined;
|
|
1541
|
+
} | undefined;
|
|
1497
1542
|
};
|
|
1498
1543
|
ev: "SessionState";
|
|
1499
1544
|
} | {
|
|
@@ -1535,6 +1580,11 @@ export declare const DAEMON_CONTRACT: {
|
|
|
1535
1580
|
};
|
|
1536
1581
|
model?: string | undefined;
|
|
1537
1582
|
pluginDirs?: readonly string[] | undefined;
|
|
1583
|
+
host?: {
|
|
1584
|
+
name: string;
|
|
1585
|
+
id?: string | undefined;
|
|
1586
|
+
issuer?: string | undefined;
|
|
1587
|
+
} | undefined;
|
|
1538
1588
|
};
|
|
1539
1589
|
ev: "SessionAttached";
|
|
1540
1590
|
} | {
|
|
@@ -1576,6 +1626,11 @@ export declare const DAEMON_CONTRACT: {
|
|
|
1576
1626
|
};
|
|
1577
1627
|
model?: string | undefined;
|
|
1578
1628
|
pluginDirs?: readonly string[] | undefined;
|
|
1629
|
+
host?: {
|
|
1630
|
+
name: string;
|
|
1631
|
+
id?: string | undefined;
|
|
1632
|
+
issuer?: string | undefined;
|
|
1633
|
+
} | undefined;
|
|
1579
1634
|
};
|
|
1580
1635
|
ev: "SessionDetached";
|
|
1581
1636
|
}, unknown, void>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
|
package/dist/daemon-event.d.ts
CHANGED
|
@@ -68,6 +68,11 @@ export declare const DAEMON_EVENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
68
68
|
}, z.core.$strip>;
|
|
69
69
|
model: z.ZodOptional<z.ZodString>;
|
|
70
70
|
pluginDirs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
71
|
+
host: z.ZodOptional<z.ZodObject<{
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
id: z.ZodOptional<z.ZodString>;
|
|
74
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
71
76
|
}, z.core.$strip>;
|
|
72
77
|
ev: z.ZodLiteral<"SessionAdded">;
|
|
73
78
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -139,6 +144,11 @@ export declare const DAEMON_EVENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
139
144
|
}, z.core.$strip>;
|
|
140
145
|
model: z.ZodOptional<z.ZodString>;
|
|
141
146
|
pluginDirs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
147
|
+
host: z.ZodOptional<z.ZodObject<{
|
|
148
|
+
name: z.ZodString;
|
|
149
|
+
id: z.ZodOptional<z.ZodString>;
|
|
150
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
151
|
+
}, z.core.$strip>>;
|
|
142
152
|
}, z.core.$strip>;
|
|
143
153
|
ev: z.ZodLiteral<"SessionState">;
|
|
144
154
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -210,6 +220,11 @@ export declare const DAEMON_EVENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
210
220
|
}, z.core.$strip>;
|
|
211
221
|
model: z.ZodOptional<z.ZodString>;
|
|
212
222
|
pluginDirs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
223
|
+
host: z.ZodOptional<z.ZodObject<{
|
|
224
|
+
name: z.ZodString;
|
|
225
|
+
id: z.ZodOptional<z.ZodString>;
|
|
226
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
227
|
+
}, z.core.$strip>>;
|
|
213
228
|
}, z.core.$strip>;
|
|
214
229
|
ev: z.ZodLiteral<"SessionAttached">;
|
|
215
230
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -281,6 +296,11 @@ export declare const DAEMON_EVENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
281
296
|
}, z.core.$strip>;
|
|
282
297
|
model: z.ZodOptional<z.ZodString>;
|
|
283
298
|
pluginDirs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
299
|
+
host: z.ZodOptional<z.ZodObject<{
|
|
300
|
+
name: z.ZodString;
|
|
301
|
+
id: z.ZodOptional<z.ZodString>;
|
|
302
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
303
|
+
}, z.core.$strip>>;
|
|
284
304
|
}, z.core.$strip>;
|
|
285
305
|
ev: z.ZodLiteral<"SessionDetached">;
|
|
286
306
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const DAEMON_FEATURES: readonly ['events.read.from-start', 'daemon.hello.viewer', 'session.forget.workspace'];
|
|
1
|
+
export declare const DAEMON_FEATURES: readonly ['events.read.from-start', 'daemon.hello.viewer', 'session.forget.workspace', 'session.host'];
|
|
2
2
|
export type DaemonFeature = (typeof DAEMON_FEATURES)[number];
|
package/dist/index.js
CHANGED
|
@@ -110,13 +110,14 @@ var ANSWER_VIEW_SCHEMA = z4.object({
|
|
|
110
110
|
complete: z4.boolean()
|
|
111
111
|
});
|
|
112
112
|
// packages/contract/src/contract-version.ts
|
|
113
|
-
var CONTRACT_VERSION = "7.
|
|
113
|
+
var CONTRACT_VERSION = "7.13.0";
|
|
114
114
|
|
|
115
115
|
// packages/contract/src/daemon-features.ts
|
|
116
116
|
var DAEMON_FEATURES = [
|
|
117
117
|
"events.read.from-start",
|
|
118
118
|
"daemon.hello.viewer",
|
|
119
|
-
"session.forget.workspace"
|
|
119
|
+
"session.forget.workspace",
|
|
120
|
+
"session.host"
|
|
120
121
|
];
|
|
121
122
|
|
|
122
123
|
// packages/contract/src/check-daemon.ts
|
|
@@ -359,6 +360,11 @@ function toSessionID(id) {
|
|
|
359
360
|
}
|
|
360
361
|
|
|
361
362
|
// packages/contract/src/session-descriptor.ts
|
|
363
|
+
var SESSION_HOST_SCHEMA = z17.object({
|
|
364
|
+
name: z17.string(),
|
|
365
|
+
id: z17.string().optional(),
|
|
366
|
+
issuer: z17.string().optional()
|
|
367
|
+
});
|
|
362
368
|
var SESSION_DESCRIPTOR_SCHEMA = z17.object({
|
|
363
369
|
id: z17.string().transform((id) => toSessionID(id)),
|
|
364
370
|
name: z17.string(),
|
|
@@ -386,7 +392,8 @@ var SESSION_DESCRIPTOR_SCHEMA = z17.object({
|
|
|
386
392
|
workspace: SESSION_WORKSPACE_SCHEMA.optional(),
|
|
387
393
|
lifecycle: SESSION_LIFECYCLE_SCHEMA,
|
|
388
394
|
model: z17.string().optional(),
|
|
389
|
-
pluginDirs: z17.array(z17.string()).readonly().optional()
|
|
395
|
+
pluginDirs: z17.array(z17.string()).readonly().optional(),
|
|
396
|
+
host: SESSION_HOST_SCHEMA.optional()
|
|
390
397
|
});
|
|
391
398
|
|
|
392
399
|
// packages/contract/src/daemon-event.ts
|
|
@@ -67,5 +67,10 @@ export declare const SESSION_DESCRIPTOR_SCHEMA: z.ZodObject<{
|
|
|
67
67
|
}, z.core.$strip>;
|
|
68
68
|
model: z.ZodOptional<z.ZodString>;
|
|
69
69
|
pluginDirs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
70
|
+
host: z.ZodOptional<z.ZodObject<{
|
|
71
|
+
name: z.ZodString;
|
|
72
|
+
id: z.ZodOptional<z.ZodString>;
|
|
73
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$strip>>;
|
|
70
75
|
}, z.core.$strip>;
|
|
71
76
|
export type SessionDescriptor = Readonly<z.output<typeof SESSION_DESCRIPTOR_SCHEMA>>;
|
package/dist/spawn-answer.d.ts
CHANGED
|
@@ -68,6 +68,11 @@ export declare const SPAWN_ANSWER_SCHEMA: z.ZodObject<{
|
|
|
68
68
|
}, z.core.$strip>;
|
|
69
69
|
model: z.ZodOptional<z.ZodString>;
|
|
70
70
|
pluginDirs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
71
|
+
host: z.ZodOptional<z.ZodObject<{
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
id: z.ZodOptional<z.ZodString>;
|
|
74
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
71
76
|
}, z.core.$strip>;
|
|
72
77
|
warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
73
78
|
}, z.core.$strip>;
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"zod": "4.6.7"
|
|
19
19
|
},
|
|
20
20
|
"name": "@atcx/contract",
|
|
21
|
-
"version": "7.
|
|
21
|
+
"version": "7.13.0",
|
|
22
22
|
"description": "atc's public contract: the daemon's request contract, the event, session record, hello and config schemas, the error codes, the session env names, the state paths, and the gateway's routes and registry schema",
|
|
23
23
|
"homepage": "https://github.com/zgeoff/atc/tree/main/packages/contract#readme",
|
|
24
24
|
"bugs": "https://github.com/zgeoff/atc/issues",
|