@agentproto/secrets 0.1.0-alpha.0 → 0.2.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/LICENSE +202 -21
- package/README.md +52 -0
- package/bin/agentproto-secrets.mjs +16 -3
- package/dist/chunk-2DL6W33G.mjs +126 -0
- package/dist/chunk-2DL6W33G.mjs.map +1 -0
- package/dist/cli.d.ts +47 -1
- package/dist/cli.mjs +27 -16
- package/dist/cli.mjs.map +1 -1
- package/dist/exposure/index.d.ts +35 -2
- package/dist/exposure/index.mjs +14 -1
- package/dist/exposure/index.mjs.map +1 -1
- package/dist/identity/index.d.ts +89 -0
- package/dist/identity/index.mjs +3 -0
- package/dist/identity/index.mjs.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/manifest/index.d.ts +2 -2
- package/dist/pairing/index.d.ts +455 -0
- package/dist/pairing/index.mjs +486 -0
- package/dist/pairing/index.mjs.map +1 -0
- package/dist/{types-Clav8IDA.d.ts → types-CHQpxFPe.d.ts} +1 -1
- package/dist/{types-C2dZDHn7.d.ts → types-DS9Qe9Cv.d.ts} +18 -6
- package/package.json +14 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SecretExposure — describes HOW a secret value reaches the runtime
|
|
3
|
-
* that needs it (env var, config file, egress placeholder,
|
|
4
|
-
*
|
|
3
|
+
* that needs it (env var, config file, egress placeholder, MCP-header
|
|
4
|
+
* injection, future HTTP-bearer routing, …).
|
|
5
5
|
*
|
|
6
6
|
* Distinct from `SecretEntry` (AIP-19), which describes the secret's
|
|
7
7
|
* *declaration* (slug, kind, access policy). Exposure is a *runtime*
|
|
@@ -83,15 +83,27 @@ interface EgressSubstituteExposure {
|
|
|
83
83
|
* "this secret is for OpenAI" without parsing the slug. */
|
|
84
84
|
intendedProviders?: string[];
|
|
85
85
|
}
|
|
86
|
+
/** Inject the secret as an HTTP header on an MCP server's transport,
|
|
87
|
+
* resolved fresh at connect-time via a credential broker. The broker
|
|
88
|
+
* (not this exposure) owns refresh/rotation — this variant just names
|
|
89
|
+
* WHICH credential and, optionally, the upstream server. */
|
|
90
|
+
interface McpHeaderExposure {
|
|
91
|
+
kind: "mcp-header";
|
|
92
|
+
/** Broker path: "<providerId>" or "<providerId>/<account>". */
|
|
93
|
+
credentialPath: string;
|
|
94
|
+
/** Optional upstream server / apiBase override forwarded to the
|
|
95
|
+
* broker. Omit to let the broker use the provider's default. */
|
|
96
|
+
server?: string;
|
|
97
|
+
}
|
|
86
98
|
/**
|
|
87
99
|
* Discriminated union of all exposure mechanisms. Add new variants here
|
|
88
|
-
* as new exposure surfaces are added (
|
|
89
|
-
*
|
|
100
|
+
* as new exposure surfaces are added (HTTP-bearer, etc.) — each adds one
|
|
101
|
+
* variant, one switch case in consumers.
|
|
90
102
|
*/
|
|
91
|
-
type SecretExposure = EnvExposure | FileExposure | EgressSubstituteExposure;
|
|
103
|
+
type SecretExposure = EnvExposure | FileExposure | EgressSubstituteExposure | McpHeaderExposure;
|
|
92
104
|
/** Type guard — convenient for filtering an exposures array by kind. */
|
|
93
105
|
declare function isExposureKind<K extends SecretExposure["kind"]>(exposure: SecretExposure, kind: K): exposure is Extract<SecretExposure, {
|
|
94
106
|
kind: K;
|
|
95
107
|
}>;
|
|
96
108
|
|
|
97
|
-
export { type EgressSubstituteExposure as E, type FileExposure as F, type SecretExposure as S, type EnvExposure as a, type SecretExposureWrap as b, type SecretExposureWrapContext as c, isExposureKind as i };
|
|
109
|
+
export { type EgressSubstituteExposure as E, type FileExposure as F, type McpHeaderExposure as M, type SecretExposure as S, type EnvExposure as a, type SecretExposureWrap as b, type SecretExposureWrapContext as c, isExposureKind as i };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentproto/secrets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "@agentproto/secrets — AIP-19 SECRETS.md reference implementation. A workspace-level manifest format for declaring secret slugs, their purpose, access grants, and audit metadata — without ever storing the values themselves. Hosts resolve slugs against a real vault at reveal time.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentproto",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/agentproto/ts/issues"
|
|
21
21
|
},
|
|
22
|
-
"license": "
|
|
22
|
+
"license": "Apache-2.0",
|
|
23
23
|
"type": "module",
|
|
24
24
|
"main": "dist/index.mjs",
|
|
25
25
|
"module": "dist/index.mjs",
|
|
@@ -45,6 +45,16 @@
|
|
|
45
45
|
"import": "./dist/seal/index.mjs",
|
|
46
46
|
"default": "./dist/seal/index.mjs"
|
|
47
47
|
},
|
|
48
|
+
"./identity": {
|
|
49
|
+
"types": "./dist/identity/index.d.ts",
|
|
50
|
+
"import": "./dist/identity/index.mjs",
|
|
51
|
+
"default": "./dist/identity/index.mjs"
|
|
52
|
+
},
|
|
53
|
+
"./pairing": {
|
|
54
|
+
"types": "./dist/pairing/index.d.ts",
|
|
55
|
+
"import": "./dist/pairing/index.mjs",
|
|
56
|
+
"default": "./dist/pairing/index.mjs"
|
|
57
|
+
},
|
|
48
58
|
"./provision": {
|
|
49
59
|
"types": "./dist/provision/index.d.ts",
|
|
50
60
|
"import": "./dist/provision/index.mjs",
|
|
@@ -72,7 +82,8 @@
|
|
|
72
82
|
"dependencies": {
|
|
73
83
|
"gray-matter": "^4.0.3",
|
|
74
84
|
"zod": "^4.4.3",
|
|
75
|
-
"@agentproto/
|
|
85
|
+
"@agentproto/auth": "0.1.1",
|
|
86
|
+
"@agentproto/define-doctype": "0.1.1"
|
|
76
87
|
},
|
|
77
88
|
"devDependencies": {
|
|
78
89
|
"@types/node": "^25.6.2",
|