@agentshouse/kit 0.1.0-alpha.4 → 0.1.0-alpha.6
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 +1 -1
- package/package.json +1 -1
- package/src/house.js +6 -1
- package/src/mount.js +3 -4
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ On Linux `amd64` or `arm64` with a working Docker Engine, run the published,
|
|
|
10
10
|
versioned bootstrap once:
|
|
11
11
|
|
|
12
12
|
```sh
|
|
13
|
-
bash <(curl -fsSL https://github.com/agentshouse/kit/releases/download/v0.1.0-alpha.
|
|
13
|
+
bash <(curl -fsSL https://github.com/agentshouse/kit/releases/download/v0.1.0-alpha.6/connect-linux.sh)
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
The release asset pins one immutable multi-architecture image digest. It creates
|
package/package.json
CHANGED
package/src/house.js
CHANGED
|
@@ -480,6 +480,11 @@ export async function reportLogin(session, login, outcome, signal = session.sign
|
|
|
480
480
|
|
|
481
481
|
const envelope = declarationReader("kit_acquire_rejected");
|
|
482
482
|
|
|
483
|
+
function routineInput(value, declaration) {
|
|
484
|
+
if (typeof value !== "string" || Array.from(value).length > 20_000) envelope.refuse(declaration);
|
|
485
|
+
return value;
|
|
486
|
+
}
|
|
487
|
+
|
|
483
488
|
function acquiredRoute(value, declaration) {
|
|
484
489
|
const route = envelope.plain(value, declaration);
|
|
485
490
|
if (!Array.isArray(route.arguments)) envelope.refuse(`${declaration}.arguments`);
|
|
@@ -551,7 +556,7 @@ function acquiredRequest(acquired, declaration) {
|
|
|
551
556
|
name: envelope.text(routine.name, `${declaration}.routine.name`, 256),
|
|
552
557
|
version: envelope.positiveCount(routine.version, `${declaration}.routine.version`),
|
|
553
558
|
},
|
|
554
|
-
payload:
|
|
559
|
+
payload: routineInput(request.payload, `${declaration}.request.payload`),
|
|
555
560
|
requested_by: envelope.text(
|
|
556
561
|
request.requested_by,
|
|
557
562
|
`${declaration}.request.requested_by`,
|
package/src/mount.js
CHANGED
|
@@ -84,7 +84,6 @@ export function mountTarget(subtree) {
|
|
|
84
84
|
refuse("kit_mount_subtree_invalid", subtree);
|
|
85
85
|
}
|
|
86
86
|
return {
|
|
87
|
-
kind: own ? "private" : "room",
|
|
88
87
|
handle: own ? null : segments[1],
|
|
89
88
|
root: own ? "/private" : `/rooms/${segments[1]}`,
|
|
90
89
|
subtree,
|
|
@@ -327,7 +326,7 @@ function pendingTransfer(held, save) {
|
|
|
327
326
|
};
|
|
328
327
|
}
|
|
329
328
|
|
|
330
|
-
async function submitAttachments(session, held,
|
|
329
|
+
async function submitAttachments(session, held, authority, plan, signal) {
|
|
331
330
|
const transfers = [];
|
|
332
331
|
for (const save of plan.saves) {
|
|
333
332
|
const local = held.attachments.get(save.path);
|
|
@@ -342,7 +341,7 @@ async function submitAttachments(session, held, target, authority, plan, signal)
|
|
|
342
341
|
version: save.version,
|
|
343
342
|
name: declared.name,
|
|
344
343
|
mediaType: declared.mediaType ?? undefined,
|
|
345
|
-
room:
|
|
344
|
+
room: authority.authority,
|
|
346
345
|
body,
|
|
347
346
|
signal,
|
|
348
347
|
});
|
|
@@ -472,7 +471,7 @@ export async function mountPackage(held, options, dependencies = {}) {
|
|
|
472
471
|
};
|
|
473
472
|
const localReport = join(held.root, "MIGRATION.json");
|
|
474
473
|
await writeFile(localReport, `${JSON.stringify(result, null, 2)}\n`);
|
|
475
|
-
result.transfers = await submitAttachments(session, held,
|
|
474
|
+
result.transfers = await submitAttachments(session, held, authority, plan, signal);
|
|
476
475
|
|
|
477
476
|
const report = `${target.subtree}/${MOUNT_REPORT_NAME}`;
|
|
478
477
|
await writeFile(localReport, `${JSON.stringify(result, null, 2)}\n`);
|