@tangle-network/cli-agent-registry 0.0.0-stage → 0.15.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.
Files changed (37) hide show
  1. package/LICENSE +11 -0
  2. package/README.md +175 -2
  3. package/dist/backend-types-CNo_Zj_K.mjs +36 -0
  4. package/dist/backend-types-DRmLR1e0.d.mts +47 -0
  5. package/dist/backend-types.d.mts +2 -0
  6. package/dist/backend-types.mjs +2 -0
  7. package/dist/cli-auth-bundle-C6DtK7GX.mjs +95 -0
  8. package/dist/cli-auth-bundle-CwAaH0Ap.d.mts +51 -0
  9. package/dist/cli-auth-bundle.d.mts +2 -0
  10. package/dist/cli-auth-bundle.mjs +2 -0
  11. package/dist/cli-auth-placeholder.d.mts +54 -0
  12. package/dist/cli-auth-placeholder.mjs +200 -0
  13. package/dist/cli-backend-auth-env.d.mts +6 -0
  14. package/dist/cli-backend-auth-env.mjs +44 -0
  15. package/dist/default-backend.d.mts +24 -0
  16. package/dist/default-backend.mjs +31 -0
  17. package/dist/harness-D1fTxnDD.mjs +199 -0
  18. package/dist/harness-contracts-BZoECCMc.mjs +1076 -0
  19. package/dist/host-contracts.d.mts +30 -0
  20. package/dist/host-contracts.json +422 -0
  21. package/dist/host-contracts.mjs +63 -0
  22. package/dist/index.d.mts +1397 -0
  23. package/dist/index.mjs +151 -0
  24. package/dist/local-cli-auth.d.mts +14 -0
  25. package/dist/local-cli-auth.mjs +31 -0
  26. package/dist/native-session-contracts.d.mts +349 -0
  27. package/dist/native-session-contracts.mjs +40 -0
  28. package/dist/servable-models.d.mts +103 -0
  29. package/dist/servable-models.mjs +131 -0
  30. package/dist/session-contract-BhzcbPRW.d.mts +97 -0
  31. package/dist/session-contract.d.mts +2 -0
  32. package/dist/session-contract.mjs +142 -0
  33. package/dist/spec-CcvTM7-j.d.mts +346 -0
  34. package/dist/specs-BBF55TnM.mjs +735 -0
  35. package/dist/specs.d.mts +72 -0
  36. package/dist/specs.mjs +3 -0
  37. package/package.json +87 -3
@@ -0,0 +1,72 @@
1
+ import { a as isBackendType, i as backendTypeSchema, n as BACKEND_TYPE, o as parseBackendType, r as BackendType, t as ALL_BACKEND_TYPES } from "./backend-types-DRmLR1e0.mjs";
2
+ import { _ as harnessModelSupportFor, h as cliAgentClaimEnvVarNames, l as CliAgentSpec, m as canonicalModelSlug, s as CliAgentModelWire, v as harnessModelWire } from "./spec-CcvTM7-j.mjs";
3
+ import { agentProfileSchema } from "@tangle-network/agent-interface";
4
+
5
+ //#region src/specs.d.ts
6
+ /**
7
+ * Env var naming a sandbox's selected backend. Stamped into every create env
8
+ * by the orchestrator (`buildSidecarContainerConfig`); read by the sidecar's
9
+ * backend resolution (`resolveConfiguredBackend`) and by the host-agent's
10
+ * warm-claim env selection to pick which spec's env vars the rebind delivers.
11
+ */
12
+ declare const AGENT_BACKEND_ENV_VAR = "AGENT_BACKEND";
13
+ /** Salted proxy model key. The name OPENCODE_MODEL_API_KEY is load-bearing; do not rename it. */
14
+ declare const MANAGED_MODEL_KEY_ENV_VAR = "OPENCODE_MODEL_API_KEY";
15
+ /** Name of the box env var holding a caller-owned provider key. A name, never a secret. */
16
+ declare const MANAGED_MODEL_KEY_NAME_ENV_VAR = "OPENCODE_MODEL_API_KEY_ENV";
17
+ /**
18
+ * Env var names declared across ALL registered harness specs, grouped by
19
+ * their `CliAgentEnvVars` role. The ONE derivation every allowlist that must
20
+ * track "what env names can a backend legitimately use" builds from — the
21
+ * FC kernel-cmdline whitelist, the egress secret handling, the sidecar
22
+ * terminal scrub, the SSH env forward, and the rebind union below. Deriving
23
+ * from roles (not one flat set) lets each consumer apply its own security
24
+ * policy per role: apiKey and oauthToken names are secret channels.
25
+ * Native subscription tokens stay out of warm-claim delivery.
26
+ */
27
+ declare function cliAgentEnvVarNamesByRole(): {
28
+ apiKey: ReadonlySet<string>;
29
+ oauthToken: ReadonlySet<string>;
30
+ model: ReadonlySet<string>;
31
+ baseUrl: ReadonlySet<string>;
32
+ authMode: ReadonlySet<string>;
33
+ authFiles: ReadonlySet<string>;
34
+ extras: ReadonlySet<string>;
35
+ };
36
+ /**
37
+ * Union of every spec's `hostPassthroughEnvVars` — the operator tuning names
38
+ * a host process (orchestrator system env, host-agent process env) may
39
+ * forward into containers. Request/caller env always keeps precedence at the
40
+ * host-agent boundary; the orchestrator system-env channel stays
41
+ * operator-authoritative. Replaces the old `OPENCODE_*` prefix forward,
42
+ * which leaked ANY stray host var with that prefix (model tuple and key
43
+ * included) into every tenant.
44
+ */
45
+ declare function cliAgentHostPassthroughEnvVarNames(): ReadonlySet<string>;
46
+ /**
47
+ * Union of every env var name a warm-claim rebind may deliver, across all
48
+ * registered harnesses. The ONE source both sides of the rebind derive from:
49
+ * the host-agent selects its delivery from it and the sidecar rebind route
50
+ * carves it out of the loader-control rejection, so the two can never drift
51
+ * into "host delivers a name the sidecar 400s" — which silently cold-paths
52
+ * every warm claim of that backend. Includes each spec's apiKey name because
53
+ * acceptance is a superset of delivery: the HOST decides which key names are
54
+ * safe to send (egress proxy-swap-covered only), while the sidecar must not
55
+ * reject a name a valid host may deliver.
56
+ */
57
+ declare function claimDeliverableEnvVarNames(): ReadonlySet<string>;
58
+ /**
59
+ * claude-code is the only provider that demotes uid + forces HOME=/home/agent
60
+ * when the sidecar runs as root. All other CLIs inherit the sidecar HOME.
61
+ */
62
+ declare const CLI_AGENT_SPECS: readonly CliAgentSpec[];
63
+ declare function getSpec(name: string): CliAgentSpec | undefined;
64
+ /**
65
+ * The directory, relative to a session's storage path, where a backend's
66
+ * message log lives: the one value adapters, the sidecar and the parked
67
+ * export read. Throws for a backend whose spec names none.
68
+ */
69
+ declare function messageStorageDirOf(name: string): string;
70
+ //#endregion
71
+ export { AGENT_BACKEND_ENV_VAR, ALL_BACKEND_TYPES, BACKEND_TYPE, type BackendType, CLI_AGENT_SPECS, type CliAgentModelWire, type CliAgentSpec, MANAGED_MODEL_KEY_ENV_VAR, MANAGED_MODEL_KEY_NAME_ENV_VAR, agentProfileSchema, backendTypeSchema, canonicalModelSlug, claimDeliverableEnvVarNames, cliAgentClaimEnvVarNames, cliAgentEnvVarNamesByRole, cliAgentHostPassthroughEnvVarNames, getSpec, harnessModelSupportFor, harnessModelWire, isBackendType, messageStorageDirOf, parseBackendType };
72
+ //# sourceMappingURL=specs.d.mts.map
package/dist/specs.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import { a as parseBackendType, i as isBackendType, n as BACKEND_TYPE, r as backendTypeSchema, t as ALL_BACKEND_TYPES } from "./backend-types-CNo_Zj_K.mjs";
2
+ import { a as agentProfileSchema, c as cliAgentHostPassthroughEnvVarNames, d as canonicalModelSlug, f as cliAgentClaimEnvVarNames, h as harnessModelWire, i as MANAGED_MODEL_KEY_NAME_ENV_VAR, l as getSpec, m as harnessModelSupportFor, n as CLI_AGENT_SPECS, o as claimDeliverableEnvVarNames, r as MANAGED_MODEL_KEY_ENV_VAR, s as cliAgentEnvVarNamesByRole, t as AGENT_BACKEND_ENV_VAR, u as messageStorageDirOf } from "./specs-BBF55TnM.mjs";
3
+ export { AGENT_BACKEND_ENV_VAR, ALL_BACKEND_TYPES, BACKEND_TYPE, CLI_AGENT_SPECS, MANAGED_MODEL_KEY_ENV_VAR, MANAGED_MODEL_KEY_NAME_ENV_VAR, agentProfileSchema, backendTypeSchema, canonicalModelSlug, claimDeliverableEnvVarNames, cliAgentClaimEnvVarNames, cliAgentEnvVarNamesByRole, cliAgentHostPassthroughEnvVarNames, getSpec, harnessModelSupportFor, harnessModelWire, isBackendType, messageStorageDirOf, parseBackendType };
package/package.json CHANGED
@@ -1,6 +1,90 @@
1
1
  {
2
2
  "name": "@tangle-network/cli-agent-registry",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.15.0",
4
+ "type": "module",
5
+ "exports": {
6
+ "./cli-backend-auth-env": {
7
+ "types": "./dist/cli-backend-auth-env.d.mts",
8
+ "import": "./dist/cli-backend-auth-env.mjs"
9
+ },
10
+ "./cli-auth-bundle": {
11
+ "types": "./dist/cli-auth-bundle.d.mts",
12
+ "import": "./dist/cli-auth-bundle.mjs"
13
+ },
14
+ ".": {
15
+ "import": "./dist/index.mjs",
16
+ "types": "./dist/index.d.mts"
17
+ },
18
+ "./specs": {
19
+ "import": "./dist/specs.mjs",
20
+ "types": "./dist/specs.d.mts"
21
+ },
22
+ "./servable-models": {
23
+ "import": "./dist/servable-models.mjs",
24
+ "types": "./dist/servable-models.d.mts"
25
+ },
26
+ "./backend-types": {
27
+ "import": "./dist/backend-types.mjs",
28
+ "types": "./dist/backend-types.d.mts"
29
+ },
30
+ "./default-backend": {
31
+ "import": "./dist/default-backend.mjs",
32
+ "types": "./dist/default-backend.d.mts"
33
+ },
34
+ "./local-cli-auth": {
35
+ "import": "./dist/local-cli-auth.mjs",
36
+ "types": "./dist/local-cli-auth.d.mts"
37
+ },
38
+ "./session-contract": {
39
+ "import": "./dist/session-contract.mjs",
40
+ "types": "./dist/session-contract.d.mts"
41
+ },
42
+ "./native-session-contracts": {
43
+ "import": "./dist/native-session-contracts.mjs",
44
+ "types": "./dist/native-session-contracts.d.mts"
45
+ },
46
+ "./cli-auth-placeholder": {
47
+ "types": "./dist/cli-auth-placeholder.d.mts",
48
+ "import": "./dist/cli-auth-placeholder.mjs"
49
+ },
50
+ "./host-contracts": {
51
+ "types": "./dist/host-contracts.d.mts",
52
+ "import": "./dist/host-contracts.mjs"
53
+ },
54
+ "./host-contracts.json": "./dist/host-contracts.json"
55
+ },
56
+ "main": "./dist/index.mjs",
57
+ "types": "./dist/index.d.mts",
58
+ "files": [
59
+ "dist",
60
+ "!dist/**/*.map"
61
+ ],
62
+ "publishConfig": {
63
+ "access": "public",
64
+ "registry": "https://registry.npmjs.org"
65
+ },
66
+ "dependencies": {
67
+ "@tangle-network/agent-interface": "^5.10.13",
68
+ "zod": "4.6.6"
69
+ },
70
+ "devDependencies": {
71
+ "@types/node": "^25.9.9",
72
+ "tsdown": "^0.21.10",
73
+ "typescript": "^6.0.3",
74
+ "vitest": "^4.1.12",
75
+ "@tangle-network/runtime-contracts": "0.20.0",
76
+ "@repo/airgap-guard": "0.0.0"
77
+ },
78
+ "tangleRelease": {
79
+ "sourceSha": "4f0c9345ec23e3dd680cc869ca18da47afd0af48",
80
+ "mergedAt": "2026-11-02T07:39:16-08:00"
81
+ },
82
+ "scripts": {
83
+ "build": "tsdown && node scripts/export-host-contracts.mjs --write",
84
+ "dev": "tsdown --watch",
85
+ "check-types": "node ../../scripts/tsc-native.mjs --noEmit",
86
+ "test": "vitest run",
87
+ "test:watch": "vitest",
88
+ "export:host-contracts": "node scripts/export-host-contracts.mjs --write"
89
+ }
6
90
  }