@asecret/sdk 0.0.0-stage → 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 aSecret, part of aGroup
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,29 @@
1
- # Temporary Holding Version
1
+ # @asecret/sdk
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Agents use your secrets without seeing them. This is aSecret's SDK for Node.js 24 or later, with TypeScript declarations. It asks a person for a detail they keep, and they decide in their browser; the agent learns only the outcome, never the detail. It also has the crypto that seals an agent's own secrets on its machine.
4
+
5
+ ```sh
6
+ npm install @asecret/sdk
7
+ ```
8
+
9
+ ```js
10
+ import { connectServer, discover, privateSaveLink } from '@asecret/sdk';
11
+ import { registerAgentClient, beginAgentConnection } from '@asecret/sdk/authorization';
12
+ import { newKey, sealItem } from '@asecret/sdk/crypto';
13
+ ```
14
+
15
+ An agent linked to its person on asecret.sh (`asecret link`) asks through api.asecret.sh with its own token:
16
+
17
+ ```js
18
+ const server = await connectServer('https://api.asecret.sh', { accessToken: process.env.ASECRET_TOKEN });
19
+ const ask = await server.requestSave({ detailType: 'postal_address' });
20
+ console.log(ask.review_url); // show this to the person, then read server.status(ask.request_id)
21
+ ```
22
+
23
+ api.asecret.sh takes `requestSave` and `requestSetup`, with `status` and `cancel`. `@asecret/sdk/crypto` works with its [agent secrets API](https://github.com/asecret-org/protocol/blob/main/spec/0.2/agent-secrets.md), or use the [aSecret CLI](https://github.com/asecret-org/cli) (`@asecret/cli`) for that.
24
+
25
+ The rest needs a person's own aSecret server, one they run themselves: pairing from `@asecret/sdk/authorization`, private save and form links, the public directory, deliveries to merchants, order status and payment methods.
26
+
27
+ Run the tests with `npm install && npm test`. The sources are kept in step with aSecret's own server, so send changes as issues. [Changelog](https://github.com/asecret-org/clients/blob/main/CHANGELOG.md) · [Protocol](https://github.com/asecret-org/protocol)
28
+
29
+ MIT License. Part of [aGroup](https://agroup.sh), with [aMessage](https://amessage.sh), [aBeacon](https://abeacon.sh), [aFile](https://afile.sh) and [aSecret](https://asecret.sh).
package/package.json CHANGED
@@ -1,6 +1,24 @@
1
1
  {
2
2
  "name": "@asecret/sdk",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Agents use your secrets without seeing them: asks to a person for a detail they keep, and the crypto for an agent's own secrets. The aSecret SDK for JavaScript and TypeScript.",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": { "types": "./src/agent.d.ts", "default": "./src/agent.js" },
8
+ "./authorization": { "types": "./src/authorization.d.ts", "default": "./src/authorization.js" },
9
+ "./crypto": { "types": "./src/agent-crypto.d.ts", "default": "./src/agent-crypto.js" }
10
+ },
11
+ "files": ["src", "spec", "README.md", "LICENSE"],
12
+ "scripts": {
13
+ "test": "node --test test/*.test.js"
14
+ },
15
+ "engines": { "node": ">=24" },
16
+ "dependencies": { "ajv": "^8.17.1", "ajv-formats": "^3.0.1" },
17
+ "keywords": ["agents", "ai-agents", "encryption", "secrets", "api-keys", "private-details", "asecret"],
18
+ "homepage": "https://asecret.sh",
19
+ "repository": { "type": "git", "url": "git+https://github.com/asecret-org/clients.git", "directory": "js" },
20
+ "bugs": { "url": "https://github.com/asecret-org/clients/issues" },
21
+ "author": "aSecret, part of aGroup <contact@asecret.sh>",
22
+ "license": "MIT",
23
+ "publishConfig": { "access": "public" }
24
+ }