c8ctl-plugin-nano 1.26.3 → 1.27.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/agentic.mjs +106 -0
- package/package.json +14 -9
package/agentic.mjs
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// Single import surface for the Nano agentic-visibility plane (ADR 0056 —
|
|
2
|
+
// Magikcraft/nano-bpm#670) inside this plugin.
|
|
3
|
+
//
|
|
4
|
+
// This is slice C0 of the agent-visibility epic (jwulf/c8ctl-plugin-nano#38).
|
|
5
|
+
// The sibling slices — C2 presence (#41), C3 PTY relay (#42) and C4 buffer
|
|
6
|
+
// (#43) — MUST import the wire contract and the worker client through *this*
|
|
7
|
+
// module rather than reaching into `@nanobpm/agentic` subpaths or
|
|
8
|
+
// `@nanobpm/urban-agent-client` directly. One place to import, one place to
|
|
9
|
+
// swap when the upstream packaging changes.
|
|
10
|
+
//
|
|
11
|
+
// Nothing here is re-declared: every frame, lane, family, token, vocab and
|
|
12
|
+
// payload type is CONSUMED from the published `@nanobpm/agentic` package, and
|
|
13
|
+
// the worker-side channel client is CONSUMED from `@nanobpm/urban-agent-client`.
|
|
14
|
+
// The shared conformance corpus (`@nanobpm/agentic/protocol/conformance`) keeps
|
|
15
|
+
// this repo's consumption in lock-step with the hub — see
|
|
16
|
+
// `agentic-conformance.test.mjs`.
|
|
17
|
+
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
// Wire contract — @nanobpm/agentic/protocol (S0, the single source of truth).
|
|
20
|
+
// The codec, routing-token grammar, vocab schema and per-family payload
|
|
21
|
+
// validators. These resolve to the package's compiled `dist`, so they load
|
|
22
|
+
// under stock Node.
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
export {
|
|
25
|
+
// message families
|
|
26
|
+
MESSAGE_FAMILIES,
|
|
27
|
+
FAMILY_CODES,
|
|
28
|
+
familyForCode,
|
|
29
|
+
isMessageFamily,
|
|
30
|
+
// QoS lanes
|
|
31
|
+
QOS_LANES,
|
|
32
|
+
LANE_CODES,
|
|
33
|
+
laneForCode,
|
|
34
|
+
lanePriority,
|
|
35
|
+
isQosLane,
|
|
36
|
+
compareFrameOrder,
|
|
37
|
+
// frame codec
|
|
38
|
+
encodeFrame,
|
|
39
|
+
decodeFrame,
|
|
40
|
+
FrameDecodeError,
|
|
41
|
+
FrameEncodeError,
|
|
42
|
+
FRAME_MAGIC,
|
|
43
|
+
FRAME_VERSION,
|
|
44
|
+
FRAME_HEADER_BYTES,
|
|
45
|
+
MAX_SEQ,
|
|
46
|
+
// routing tokens
|
|
47
|
+
parseToken,
|
|
48
|
+
formatToken,
|
|
49
|
+
isValidToken,
|
|
50
|
+
isSegmentName,
|
|
51
|
+
isSeatLabel,
|
|
52
|
+
TokenParseError,
|
|
53
|
+
// vocab schema
|
|
54
|
+
validateVocabDocument,
|
|
55
|
+
// per-family payload contracts
|
|
56
|
+
validatePayload,
|
|
57
|
+
// language-neutral hex helpers (used to hold the codec to the corpus)
|
|
58
|
+
bytesToHex,
|
|
59
|
+
hexToBytes,
|
|
60
|
+
} from '@nanobpm/agentic/protocol';
|
|
61
|
+
|
|
62
|
+
// ---------------------------------------------------------------------------
|
|
63
|
+
// Visibility families. Each is re-exported wholesale so a consumer picks the
|
|
64
|
+
// namespace it needs (channel transport, presence, relay lane, transcript)
|
|
65
|
+
// without re-declaring any of it. Namespaced re-exports keep the surface tidy
|
|
66
|
+
// and avoid symbol collisions between the families.
|
|
67
|
+
// ---------------------------------------------------------------------------
|
|
68
|
+
export * as channel from '@nanobpm/agentic/channel';
|
|
69
|
+
export * as presence from '@nanobpm/agentic/presence';
|
|
70
|
+
export * as relay from '@nanobpm/agentic/relay';
|
|
71
|
+
export * as transcript from '@nanobpm/agentic/transcript';
|
|
72
|
+
|
|
73
|
+
// ---------------------------------------------------------------------------
|
|
74
|
+
// Worker-side channel client — @nanobpm/urban-agent-client.
|
|
75
|
+
//
|
|
76
|
+
// The client's published `dist/protocol.js` imports the contract from
|
|
77
|
+
// `@nanobpm/agentic/source/protocol` (raw TypeScript) on the assumption the
|
|
78
|
+
// consumer runs under a type-stripping loader. Stock Node — which this repo's
|
|
79
|
+
// `node --test` uses — refuses to strip types under `node_modules`
|
|
80
|
+
// (ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING), so a *static* re-export of the
|
|
81
|
+
// client would make this whole surface fail to load. To keep C0's surface
|
|
82
|
+
// loadable everywhere while still routing all client consumption through one
|
|
83
|
+
// swap point, the client is exposed behind a lazy async loader. The slice that
|
|
84
|
+
// actually opens the channel (C2, #41) awaits it from the code path that runs
|
|
85
|
+
// under the appropriate loader/build.
|
|
86
|
+
//
|
|
87
|
+
// @typedef {import('@nanobpm/urban-agent-client')} AgenticClientModule
|
|
88
|
+
/** @type {Promise<AgenticClientModule> | undefined} */
|
|
89
|
+
let clientModulePromise;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Load the published worker-side agentic channel client
|
|
93
|
+
* (`@nanobpm/urban-agent-client`). Memoised so repeated calls share one module
|
|
94
|
+
* instance. Import the client only through this accessor so there is a single
|
|
95
|
+
* place to consume it from across the plugin.
|
|
96
|
+
*
|
|
97
|
+
* @returns {Promise<AgenticClientModule>} the client module namespace, exposing
|
|
98
|
+
* `connectAgenticChannel`, `AgenticClient`, `OutboundRing`, the websocket
|
|
99
|
+
* transport and the re-exported protocol symbols.
|
|
100
|
+
*/
|
|
101
|
+
export function loadAgenticClient() {
|
|
102
|
+
if (clientModulePromise === undefined) {
|
|
103
|
+
clientModulePromise = import('@nanobpm/urban-agent-client');
|
|
104
|
+
}
|
|
105
|
+
return clientModulePromise;
|
|
106
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "c8ctl-plugin-nano",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "c8ctl plugin to start, inspect, and stop a local Nano BPM (nanobpmn) cluster",
|
|
6
6
|
"main": "c8ctl-plugin.js",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"files": [
|
|
23
23
|
"c8ctl-plugin.js",
|
|
24
24
|
"platforms.mjs",
|
|
25
|
+
"agentic.mjs",
|
|
25
26
|
"nanobpmn-binary.json",
|
|
26
27
|
"README.md"
|
|
27
28
|
],
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
},
|
|
32
33
|
"license": "MIT",
|
|
33
34
|
"engines": {
|
|
34
|
-
"node": ">=
|
|
35
|
+
"node": ">=22.6"
|
|
35
36
|
},
|
|
36
37
|
"c8ctl": {
|
|
37
38
|
"defaults": {
|
|
@@ -46,13 +47,17 @@
|
|
|
46
47
|
"@semantic-release/github": "^12.0.6",
|
|
47
48
|
"semantic-release": "^25.0.3"
|
|
48
49
|
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@nanobpm/agentic": "^0.1.0",
|
|
52
|
+
"@nanobpm/urban-agent-client": "^0.1.0"
|
|
53
|
+
},
|
|
49
54
|
"optionalDependencies": {
|
|
50
|
-
"@nanobpm/c8ctl-plugin-nano-darwin-arm64": "1.
|
|
51
|
-
"@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.
|
|
52
|
-
"@nanobpm/c8ctl-plugin-nano-linux-x64": "1.
|
|
53
|
-
"@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.
|
|
54
|
-
"@nanobpm/c8ctl-plugin-nano-linux-armv7": "1.
|
|
55
|
-
"@nanobpm/c8ctl-plugin-nano-linux-armv6": "1.
|
|
56
|
-
"@nanobpm/c8ctl-plugin-nano-win32-x64": "1.
|
|
55
|
+
"@nanobpm/c8ctl-plugin-nano-darwin-arm64": "1.27.0",
|
|
56
|
+
"@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.27.0",
|
|
57
|
+
"@nanobpm/c8ctl-plugin-nano-linux-x64": "1.27.0",
|
|
58
|
+
"@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.27.0",
|
|
59
|
+
"@nanobpm/c8ctl-plugin-nano-linux-armv7": "1.27.0",
|
|
60
|
+
"@nanobpm/c8ctl-plugin-nano-linux-armv6": "1.27.0",
|
|
61
|
+
"@nanobpm/c8ctl-plugin-nano-win32-x64": "1.27.0"
|
|
57
62
|
}
|
|
58
63
|
}
|