@lapxo/head 0.1.7 → 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.
- package/README.md +39 -14
- package/TARGET.bound +237 -31
- package/dist/src/adopt/adopt.d.ts +2 -2
- package/dist/src/adopt/adopt.js +20 -6
- package/dist/src/ahead/read.d.ts +2 -2
- package/dist/src/ahead/read.js +2 -4
- package/dist/src/answers/answered.js +1 -1
- package/dist/src/compile/pin.d.ts +1 -1
- package/dist/src/compile/pin.js +5 -3
- package/dist/src/core/answer.d.ts +12 -0
- package/dist/src/core/answer.js +1 -1
- package/dist/src/core/association.d.ts +16 -0
- package/dist/src/core/association.js +34 -0
- package/dist/src/core/composition.d.ts +32 -0
- package/dist/src/core/composition.js +28 -0
- package/dist/src/core/package.d.ts +1 -0
- package/dist/src/core/package.js +17 -4
- package/dist/src/core/read.d.ts +2 -1
- package/dist/src/core/read.js +2 -1
- package/dist/src/core/receiver.d.ts +11 -0
- package/dist/src/core/receiver.js +122 -0
- package/dist/src/core/share-bundle.d.ts +9 -0
- package/dist/src/core/share-bundle.js +56 -0
- package/dist/src/doors/head.d.ts +1 -0
- package/dist/src/doors/head.js +11 -3
- package/dist/src/flows/answer.js +7 -3
- package/dist/src/flows/call.d.ts +1 -1
- package/dist/src/flows/call.js +28 -4
- package/dist/src/flows/device.d.ts +14 -5
- package/dist/src/flows/device.js +15 -7
- package/dist/src/flows/plan.d.ts +2 -0
- package/dist/src/flows/plan.js +16 -2
- package/dist/src/index.js +3 -31
- package/dist/src/links/birth.d.ts +6 -0
- package/dist/src/links/birth.js +48 -0
- package/dist/src/links/inspect.d.ts +1 -1
- package/dist/src/links/inspect.js +23 -12
- package/dist/src/links/link.d.ts +2 -2
- package/dist/src/links/link.js +7 -10
- package/dist/src/onboard/first.js +1 -1
- package/dist/src/onboard/owed.js +1 -1
- package/dist/src/places/admit.js +1 -1
- package/dist/src/places/found.js +3 -1
- package/dist/src/ports/adapters/bundle.d.ts +44 -0
- package/dist/src/ports/adapters/bundle.js +173 -0
- package/dist/src/ports/adapters/configured.d.ts +35 -0
- package/dist/src/ports/adapters/configured.js +67 -0
- package/dist/src/ports/adapters/mcp.d.ts +59 -0
- package/dist/src/ports/adapters/mcp.js +122 -0
- package/dist/src/ports/adapters/network.d.ts +12 -0
- package/dist/src/ports/adapters/network.js +67 -0
- package/dist/src/ports/adapters/protocol.d.ts +6 -0
- package/dist/src/ports/adapters/protocol.js +51 -0
- package/dist/src/ports/adapters/remote.d.ts +13 -0
- package/dist/src/ports/adapters/remote.js +33 -0
- package/dist/src/ports/bound.d.ts +0 -1
- package/dist/src/ports/bound.js +14 -15
- package/dist/src/ports/host.d.ts +18 -0
- package/dist/src/ports/host.js +58 -9
- package/dist/src/sources/connect.d.ts +1 -0
- package/dist/src/sources/connect.js +15 -11
- package/dist/src/tools/card.js +3 -2
- package/dist/src/use/named.js +3 -3
- package/dist/src/verbs/ask.js +7 -1
- package/dist/src/verbs/card.js +2 -2
- package/dist/src/verbs/do.js +2 -1
- package/package.json +6 -5
- package/runtime.bundle.json +24026 -0
- package/dist/src/ports/reading.d.ts +0 -8
- package/dist/src/ports/reading.js +0 -14
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Printed } from './process.ts';
|
|
2
|
-
/** Only the installed instrument names a view's identity and the result bound to it. */
|
|
3
|
-
export declare const readingOf: (printed: Printed | undefined, view: string, expected?: string) => {
|
|
4
|
-
readonly identity: string;
|
|
5
|
-
readonly text?: string;
|
|
6
|
-
} | {
|
|
7
|
-
readonly refused: string;
|
|
8
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/** Only the installed instrument names a view's identity and the result bound to it. */
|
|
2
|
-
export const readingOf = (printed, view, expected) => {
|
|
3
|
-
if (!printed || printed.code !== 0)
|
|
4
|
-
return { refused: printed?.refusal?.['code'] ?? 'reading-identity/unavailable' };
|
|
5
|
-
try {
|
|
6
|
-
const value = printed.out.length === 1 ? JSON.parse(printed.out[0]) : undefined;
|
|
7
|
-
if (value?.['kind'] !== 'fact' || value['view'] !== view || typeof value['identity'] !== 'string' || !/^sha256:[0-9a-f]{64}$/.test(value['identity']) || (expected !== undefined && (value['identity'] !== expected || typeof value['text'] !== 'string')))
|
|
8
|
-
return { refused: 'reading-identity/context' };
|
|
9
|
-
return { identity: value['identity'], ...(expected === undefined ? {} : { text: value['text'] }) };
|
|
10
|
-
}
|
|
11
|
-
catch {
|
|
12
|
-
return { refused: 'reading-identity/format' };
|
|
13
|
-
}
|
|
14
|
-
};
|