@aarmos/adapter-common 0.1.0 → 0.1.1

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/package.json CHANGED
@@ -1,18 +1,31 @@
1
1
  {
2
2
  "name": "@aarmos/adapter-common",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Shared types for Aarmos protocol adapters (MCP, OpenAPI, deep-link).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
- "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" } },
9
- "files": ["dist", "README.md"],
10
- "scripts": { "build": "tsup src/index.ts --format esm --dts --clean" },
11
- "publishConfig": { "access": "public" },
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "README.md"
17
+ ],
18
+ "scripts": {
19
+ "build": "tsup src/index.ts --format esm --dts --clean"
20
+ },
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
12
24
  "license": "Apache-2.0",
13
25
  "author": "Aarmatix LLC",
14
26
  "homepage": "https://www.aarmos.io",
15
- "repository": { "type": "git", "url": "git+https://github.com/aarmatix/aarmos.git", "directory": "packages/adapter-common" },
16
- "bugs": { "url": "https://github.com/aarmatix/aarmos/issues" },
17
- "devDependencies": { "tsup": "^8.3.0", "typescript": "^5.6.2" }
27
+ "devDependencies": {
28
+ "tsup": "^8.3.0",
29
+ "typescript": "^5.6.2"
30
+ }
18
31
  }
package/dist/index.d.ts DELETED
@@ -1,18 +0,0 @@
1
- interface AdapterCallInput {
2
- op: string;
3
- args: unknown;
4
- scopes: string[];
5
- }
6
- interface AdapterCallResult {
7
- status: "ok" | "refused" | "error";
8
- reason?: string;
9
- data?: unknown;
10
- }
11
- interface Adapter {
12
- readonly kind: "mcp" | "openapi" | "deeplink";
13
- readonly scheme: string;
14
- call(input: AdapterCallInput): Promise<AdapterCallResult>;
15
- }
16
- declare function scopeMatches(required: string, granted: readonly string[]): boolean;
17
-
18
- export { type Adapter, type AdapterCallInput, type AdapterCallResult, scopeMatches };
package/dist/index.js DELETED
@@ -1,7 +0,0 @@
1
- // src/index.ts
2
- function scopeMatches(required, granted) {
3
- return granted.some((s) => s === required || s === "*");
4
- }
5
- export {
6
- scopeMatches
7
- };