@dejima/sdk 0.8.27 → 0.8.29
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/dist/client.d.ts +15 -0
- package/dist/client.js +31 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -114,6 +114,21 @@ export declare class Client {
|
|
|
114
114
|
island?: string;
|
|
115
115
|
args?: Record<string, string>;
|
|
116
116
|
}): Promise<any>;
|
|
117
|
+
/** List an island's secrets — names, timestamps and fingerprints only. */
|
|
118
|
+
listSecrets(name: string): Promise<any>;
|
|
119
|
+
/**
|
|
120
|
+
* Set or rotate a secret. Returns metadata, never the value.
|
|
121
|
+
*
|
|
122
|
+
* Rotating keeps the original creation date. Reserved names are rejected
|
|
123
|
+
* (400): several environment variables are interpreted by the loader, the
|
|
124
|
+
* shell, or a language runtime before any program logic runs, and
|
|
125
|
+
* HTTP(S)_PROXY would disable the island's egress gate.
|
|
126
|
+
*
|
|
127
|
+
* A change reaches NEW shells immediately; a process already running keeps
|
|
128
|
+
* the environment it started with, so restart the agent to apply it.
|
|
129
|
+
*/
|
|
130
|
+
putSecret(name: string, key: string, value: string): Promise<any>;
|
|
131
|
+
deleteSecret(name: string, key: string): Promise<void>;
|
|
117
132
|
listMcpGrants(name: string): Promise<any>;
|
|
118
133
|
grantMcp(name: string, server: string): Promise<any>;
|
|
119
134
|
revokeMcp(name: string, server: string): Promise<void>;
|
package/dist/client.js
CHANGED
|
@@ -235,6 +235,37 @@ export class Client {
|
|
|
235
235
|
executeCapability(target, opts = {}) {
|
|
236
236
|
return this.json("POST", "/v1/capabilities/execute", { json: clean({ target, island: opts.island, args: opts.args }) });
|
|
237
237
|
}
|
|
238
|
+
// ===== Secrets --------------------------------------------------------
|
|
239
|
+
//
|
|
240
|
+
// Per-island storage for the tokens an agent's tools read from the
|
|
241
|
+
// environment. Values go in and are NEVER returned — no method here can
|
|
242
|
+
// retrieve one, because no endpoint serves one.
|
|
243
|
+
//
|
|
244
|
+
// Not a boundary against agents: everything in an island runs as one user, so
|
|
245
|
+
// any agent there can read these from its own environment. What it buys is
|
|
246
|
+
// that they're out of the repo, centrally rotatable, island-scoped, and
|
|
247
|
+
// deleted with the island. See docs/secrets-manager-spec.md.
|
|
248
|
+
/** List an island's secrets — names, timestamps and fingerprints only. */
|
|
249
|
+
listSecrets(name) {
|
|
250
|
+
return this.json("GET", `${this.island(name)}/secrets`);
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Set or rotate a secret. Returns metadata, never the value.
|
|
254
|
+
*
|
|
255
|
+
* Rotating keeps the original creation date. Reserved names are rejected
|
|
256
|
+
* (400): several environment variables are interpreted by the loader, the
|
|
257
|
+
* shell, or a language runtime before any program logic runs, and
|
|
258
|
+
* HTTP(S)_PROXY would disable the island's egress gate.
|
|
259
|
+
*
|
|
260
|
+
* A change reaches NEW shells immediately; a process already running keeps
|
|
261
|
+
* the environment it started with, so restart the agent to apply it.
|
|
262
|
+
*/
|
|
263
|
+
putSecret(name, key, value) {
|
|
264
|
+
return this.json("PUT", `${this.island(name)}/secrets/${this.seg(key)}`, { json: { value } });
|
|
265
|
+
}
|
|
266
|
+
async deleteSecret(name, key) {
|
|
267
|
+
await this.request("DELETE", `${this.island(name)}/secrets/${this.seg(key)}`);
|
|
268
|
+
}
|
|
238
269
|
// ===== MCP broker -----------------------------------------------------
|
|
239
270
|
listMcpGrants(name) {
|
|
240
271
|
return this.json("GET", `${this.island(name)}/mcp/grants`);
|
package/dist/index.d.ts
CHANGED
|
@@ -16,4 +16,4 @@ export type { ClientOptions } from "./client.js";
|
|
|
16
16
|
export { Session } from "./session.js";
|
|
17
17
|
export type { SessionEnvelope, WebSocketLike } from "./session.js";
|
|
18
18
|
export { DejimaError } from "./errors.js";
|
|
19
|
-
export declare const VERSION = "0.8.
|
|
19
|
+
export declare const VERSION = "0.8.29";
|
package/dist/index.js
CHANGED
package/package.json
CHANGED