@fungi.computer/seam 0.1.0 → 0.2.1
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.
|
@@ -2,6 +2,8 @@ import * as Schema from "effect/Schema";
|
|
|
2
2
|
export { createMachineLinkPostChannel, MachineLinkPostUnavailable, } from "./machine-link-post.js";
|
|
3
3
|
/** Shared signature audience; neither names nor private Local selectors enter it. */
|
|
4
4
|
export declare function machineLinkAudience(teamId: string, deviceId: string): string;
|
|
5
|
+
/** One wire contract for the signed machine dial; no older-version fallback. */
|
|
6
|
+
export declare const machineLinkProtocolVersion = "1";
|
|
5
7
|
/** The exact GET path signed by Local and verified by its receiving link. */
|
|
6
8
|
export declare function machineLinkDialUrl(issuer: string, teamId: string, deviceId: string): URL;
|
|
7
9
|
/** Post destination only; delegation keys and admission belong to their engine. */
|
|
@@ -4,9 +4,13 @@ export { createMachineLinkPostChannel, MachineLinkPostUnavailable, } from "./mac
|
|
|
4
4
|
export function machineLinkAudience(teamId, deviceId) {
|
|
5
5
|
return `fungi-machine-link:${teamId}:${deviceId}`;
|
|
6
6
|
}
|
|
7
|
+
/** One wire contract for the signed machine dial; no older-version fallback. */
|
|
8
|
+
export const machineLinkProtocolVersion = "1";
|
|
7
9
|
/** The exact GET path signed by Local and verified by its receiving link. */
|
|
8
10
|
export function machineLinkDialUrl(issuer, teamId, deviceId) {
|
|
9
|
-
|
|
11
|
+
const url = new URL(`/api/teams/${encodeURIComponent(teamId)}/local/mesh/${encodeURIComponent(deviceId)}/connect`, issuer);
|
|
12
|
+
url.searchParams.set("version", machineLinkProtocolVersion);
|
|
13
|
+
return url;
|
|
10
14
|
}
|
|
11
15
|
const identitySchema = Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength(256));
|
|
12
16
|
/** Maintained decoder for the shared Post address, not delegation authority. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/seam",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"author": "Levi <levi@technomancy.dev>",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Ed25519 authentication between Fungi Hub and on-box hosts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@fungi.computer/carrier": "0.1
|
|
19
|
+
"@fungi.computer/carrier": "0.2.1",
|
|
20
20
|
"effect": "4.0.2"
|
|
21
21
|
},
|
|
22
22
|
"license": "MIT",
|