@sentropic/h2a-cli 0.1.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 ADDED
@@ -0,0 +1,11 @@
1
+ # @sentropic/h2a-cli
2
+
3
+ Unified CLI surface for `h2a` host adapters and MCP-oriented coordination flows.
4
+
5
+ Current bootstrap commands:
6
+
7
+ - `h2a --help`
8
+ - `h2a hosts`
9
+ - `h2a mcp-tools`
10
+
11
+ Repository: <https://github.com/rhanka/h2a>
package/dist/bin.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
package/dist/bin.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { runCli } from "./cli.js";
3
+ process.exitCode = runCli();
4
+ //# sourceMappingURL=bin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,CAAC,QAAQ,GAAG,MAAM,EAAE,CAAC"}
package/dist/cli.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export interface H2ACliStreams {
2
+ stderr: Pick<typeof process.stderr, "write">;
3
+ stdout: Pick<typeof process.stdout, "write">;
4
+ }
5
+ export declare function renderCliHelp(): string;
6
+ export declare function runCli(argv?: readonly string[], streams?: H2ACliStreams): number;
7
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,IAAI,CAAC,OAAO,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C,MAAM,EAAE,IAAI,CAAC,OAAO,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9C;AAQD,wBAAgB,aAAa,IAAI,MAAM,CActC;AAED,wBAAgB,MAAM,CACpB,IAAI,GAAE,SAAS,MAAM,EAA0B,EAC/C,OAAO,GAAE,aAGR,GACA,MAAM,CAqBR"}
package/dist/cli.js ADDED
@@ -0,0 +1,46 @@
1
+ import { H2A_CLAUDE_HOST } from "./hosts/claude.js";
2
+ import { H2A_CODEX_HOST } from "./hosts/codex.js";
3
+ import { H2A_GEMINI_HOST } from "./hosts/gemini.js";
4
+ import { H2A_CLI_MCP_TOOL_NAMES } from "./mcp.js";
5
+ const CLI_HOSTS = [
6
+ H2A_CODEX_HOST,
7
+ H2A_CLAUDE_HOST,
8
+ H2A_GEMINI_HOST
9
+ ];
10
+ export function renderCliHelp() {
11
+ return [
12
+ "h2a",
13
+ "",
14
+ "Human-to-agent coordination CLI bootstrap.",
15
+ "",
16
+ "Usage:",
17
+ " h2a --help",
18
+ " h2a hosts",
19
+ " h2a mcp-tools",
20
+ "",
21
+ `Hosts: ${CLI_HOSTS.map((host) => host.host).join(", ")}`,
22
+ `MCP tools: ${H2A_CLI_MCP_TOOL_NAMES.join(", ")}`
23
+ ].join("\n");
24
+ }
25
+ export function runCli(argv = process.argv.slice(2), streams = {
26
+ stdout: process.stdout,
27
+ stderr: process.stderr
28
+ }) {
29
+ const [command] = argv;
30
+ if (!command || command === "--help" || command === "-h" || command === "help") {
31
+ streams.stdout.write(`${renderCliHelp()}\n`);
32
+ return 0;
33
+ }
34
+ if (command === "hosts") {
35
+ streams.stdout.write(`${JSON.stringify(CLI_HOSTS, null, 2)}\n`);
36
+ return 0;
37
+ }
38
+ if (command === "mcp-tools") {
39
+ streams.stdout.write(`${JSON.stringify(H2A_CLI_MCP_TOOL_NAMES, null, 2)}\n`);
40
+ return 0;
41
+ }
42
+ streams.stderr.write(`Unknown command: ${command}\n`);
43
+ streams.stderr.write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;IACX,CAAC;IAED,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;QACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QAChE,OAAO,CAAC,CAAC;IACX,CAAC;IAED,IAAI,OAAO,KAAK,WAAW,EAAE,CAAC;QAC5B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,sBAAsB,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QAC7E,OAAO,CAAC,CAAC;IACX,CAAC;IAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,OAAO,IAAI,CAAC,CAAC;IACtD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC5C,OAAO,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const H2A_CLAUDE_HOST: {
2
+ readonly packageName: "@sentropic/h2a-cli";
3
+ readonly corePackageName: "@sentropic/h2a";
4
+ readonly host: "claude";
5
+ readonly protocol: "sentropic.h2a";
6
+ };
7
+ //# sourceMappingURL=claude.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/hosts/claude.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;CAKlB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export const H2A_CLAUDE_HOST = {
2
+ packageName: "@sentropic/h2a-cli",
3
+ corePackageName: "@sentropic/h2a",
4
+ host: "claude",
5
+ protocol: "sentropic.h2a"
6
+ };
7
+ //# sourceMappingURL=claude.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.js","sourceRoot":"","sources":["../../src/hosts/claude.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,WAAW,EAAE,oBAAoB;IACjC,eAAe,EAAE,gBAAgB;IACjC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,eAAe;CACjB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const H2A_CODEX_HOST: {
2
+ readonly packageName: "@sentropic/h2a-cli";
3
+ readonly corePackageName: "@sentropic/h2a";
4
+ readonly host: "codex";
5
+ readonly protocol: "sentropic.h2a";
6
+ };
7
+ //# sourceMappingURL=codex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/hosts/codex.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export const H2A_CODEX_HOST = {
2
+ packageName: "@sentropic/h2a-cli",
3
+ corePackageName: "@sentropic/h2a",
4
+ host: "codex",
5
+ protocol: "sentropic.h2a"
6
+ };
7
+ //# sourceMappingURL=codex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex.js","sourceRoot":"","sources":["../../src/hosts/codex.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,WAAW,EAAE,oBAAoB;IACjC,eAAe,EAAE,gBAAgB;IACjC,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,eAAe;CACjB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const H2A_GEMINI_HOST: {
2
+ readonly packageName: "@sentropic/h2a-cli";
3
+ readonly corePackageName: "@sentropic/h2a";
4
+ readonly host: "gemini";
5
+ readonly protocol: "sentropic.h2a";
6
+ };
7
+ //# sourceMappingURL=gemini.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini.d.ts","sourceRoot":"","sources":["../../src/hosts/gemini.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;CAKlB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export const H2A_GEMINI_HOST = {
2
+ packageName: "@sentropic/h2a-cli",
3
+ corePackageName: "@sentropic/h2a",
4
+ host: "gemini",
5
+ protocol: "sentropic.h2a"
6
+ };
7
+ //# sourceMappingURL=gemini.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini.js","sourceRoot":"","sources":["../../src/hosts/gemini.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,WAAW,EAAE,oBAAoB;IACjC,eAAe,EAAE,gBAAgB;IACjC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,eAAe;CACjB,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { H2A_CLAUDE_HOST } from "./hosts/claude.js";
2
+ import { renderCliHelp, runCli } from "./cli.js";
3
+ import { H2A_CODEX_HOST } from "./hosts/codex.js";
4
+ import { H2A_GEMINI_HOST } from "./hosts/gemini.js";
5
+ import { H2A_CLI_MCP_TOOL_NAMES } from "./mcp.js";
6
+ export { H2A_CLAUDE_HOST, H2A_CODEX_HOST, H2A_GEMINI_HOST, H2A_CLI_MCP_TOOL_NAMES, renderCliHelp, runCli };
7
+ export declare const H2A_CLI_HOSTS: readonly [{
8
+ readonly packageName: "@sentropic/h2a-cli";
9
+ readonly corePackageName: "@sentropic/h2a";
10
+ readonly host: "codex";
11
+ readonly protocol: "sentropic.h2a";
12
+ }, {
13
+ readonly packageName: "@sentropic/h2a-cli";
14
+ readonly corePackageName: "@sentropic/h2a";
15
+ readonly host: "claude";
16
+ readonly protocol: "sentropic.h2a";
17
+ }, {
18
+ readonly packageName: "@sentropic/h2a-cli";
19
+ readonly corePackageName: "@sentropic/h2a";
20
+ readonly host: "gemini";
21
+ readonly protocol: "sentropic.h2a";
22
+ }];
23
+ export declare const H2A_CLI_ADAPTER: {
24
+ readonly packageName: "@sentropic/h2a-cli";
25
+ readonly corePackageName: "@sentropic/h2a";
26
+ readonly protocol: "sentropic.h2a";
27
+ readonly hosts: readonly [{
28
+ readonly packageName: "@sentropic/h2a-cli";
29
+ readonly corePackageName: "@sentropic/h2a";
30
+ readonly host: "codex";
31
+ readonly protocol: "sentropic.h2a";
32
+ }, {
33
+ readonly packageName: "@sentropic/h2a-cli";
34
+ readonly corePackageName: "@sentropic/h2a";
35
+ readonly host: "claude";
36
+ readonly protocol: "sentropic.h2a";
37
+ }, {
38
+ readonly packageName: "@sentropic/h2a-cli";
39
+ readonly corePackageName: "@sentropic/h2a";
40
+ readonly host: "gemini";
41
+ readonly protocol: "sentropic.h2a";
42
+ }];
43
+ readonly mcpToolNames: readonly ["h2a_register_instance", "h2a_discover_instances", "h2a_open_negotiation", "h2a_offer", "h2a_counteroffer", "h2a_sign", "h2a_stabilize", "h2a_inbox", "h2a_append_journal", "h2a_escalate"];
44
+ };
45
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,EACL,eAAe,EACf,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,aAAa,EACb,MAAM,EACP,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;EAIhB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;CAMlB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ import { H2A_CLAUDE_HOST } from "./hosts/claude.js";
2
+ import { renderCliHelp, runCli } from "./cli.js";
3
+ import { H2A_CODEX_HOST } from "./hosts/codex.js";
4
+ import { H2A_GEMINI_HOST } from "./hosts/gemini.js";
5
+ import { H2A_CLI_MCP_TOOL_NAMES } from "./mcp.js";
6
+ export { H2A_CLAUDE_HOST, H2A_CODEX_HOST, H2A_GEMINI_HOST, H2A_CLI_MCP_TOOL_NAMES, renderCliHelp, runCli };
7
+ export const H2A_CLI_HOSTS = [
8
+ H2A_CODEX_HOST,
9
+ H2A_CLAUDE_HOST,
10
+ H2A_GEMINI_HOST
11
+ ];
12
+ export const H2A_CLI_ADAPTER = {
13
+ packageName: "@sentropic/h2a-cli",
14
+ corePackageName: "@sentropic/h2a",
15
+ protocol: "sentropic.h2a",
16
+ hosts: H2A_CLI_HOSTS,
17
+ mcpToolNames: H2A_CLI_MCP_TOOL_NAMES
18
+ };
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,EACL,eAAe,EACf,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,aAAa,EACb,MAAM,EACP,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,cAAc;IACd,eAAe;IACf,eAAe;CACP,CAAC;AAEX,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,WAAW,EAAE,oBAAoB;IACjC,eAAe,EAAE,gBAAgB;IACjC,QAAQ,EAAE,eAAe;IACzB,KAAK,EAAE,aAAa;IACpB,YAAY,EAAE,sBAAsB;CAC5B,CAAC"}
package/dist/mcp.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare const H2A_CLI_MCP_TOOL_NAMES: readonly ["h2a_register_instance", "h2a_discover_instances", "h2a_open_negotiation", "h2a_offer", "h2a_counteroffer", "h2a_sign", "h2a_stabilize", "h2a_inbox", "h2a_append_journal", "h2a_escalate"];
2
+ //# sourceMappingURL=mcp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,uMAWzB,CAAC"}
package/dist/mcp.js ADDED
@@ -0,0 +1,13 @@
1
+ export const H2A_CLI_MCP_TOOL_NAMES = [
2
+ "h2a_register_instance",
3
+ "h2a_discover_instances",
4
+ "h2a_open_negotiation",
5
+ "h2a_offer",
6
+ "h2a_counteroffer",
7
+ "h2a_sign",
8
+ "h2a_stabilize",
9
+ "h2a_inbox",
10
+ "h2a_append_journal",
11
+ "h2a_escalate"
12
+ ];
13
+ //# sourceMappingURL=mcp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.js","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,uBAAuB;IACvB,wBAAwB;IACxB,sBAAsB;IACtB,WAAW;IACX,kBAAkB;IAClB,UAAU;IACV,eAAe;IACf,WAAW;IACX,oBAAoB;IACpB,cAAc;CACN,CAAC"}
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@sentropic/h2a-cli",
3
+ "version": "0.1.0",
4
+ "description": "Unified CLI surface for h2a hosts and MCP-oriented coordination flows.",
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "bin": {
10
+ "h2a": "./dist/bin.js"
11
+ },
12
+ "keywords": [
13
+ "h2a",
14
+ "cli",
15
+ "mcp",
16
+ "codex",
17
+ "claude",
18
+ "gemini"
19
+ ],
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/rhanka/h2a.git",
23
+ "directory": "packages/h2a-cli"
24
+ },
25
+ "homepage": "https://github.com/rhanka/h2a#readme",
26
+ "bugs": {
27
+ "url": "https://github.com/rhanka/h2a/issues"
28
+ },
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "import": "./dist/index.js"
33
+ }
34
+ },
35
+ "files": [
36
+ "dist"
37
+ ],
38
+ "dependencies": {
39
+ "@sentropic/h2a": "^0.1.0"
40
+ },
41
+ "publishConfig": {
42
+ "access": "public"
43
+ }
44
+ }