@openape/apes 0.5.4 → 0.6.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/dist/{chunk-AGHP6MNV.js → chunk-ZSJU7IXE.js} +19 -1
- package/dist/chunk-ZSJU7IXE.js.map +1 -0
- package/dist/cli.js +301 -179
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/{server-5ZRR26S4.js → server-IYR5LM63.js} +2 -2
- package/package.json +10 -6
- package/dist/chunk-AGHP6MNV.js.map +0 -1
- /package/dist/{server-5ZRR26S4.js.map → server-IYR5LM63.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -45,4 +45,13 @@ declare function apiFetch<T = unknown>(path: string, options?: {
|
|
|
45
45
|
*/
|
|
46
46
|
declare function parseDuration(value: string): number;
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
declare class CliError extends Error {
|
|
49
|
+
exitCode: number;
|
|
50
|
+
constructor(message: string, exitCode?: number);
|
|
51
|
+
}
|
|
52
|
+
declare class CliExit extends Error {
|
|
53
|
+
exitCode: number;
|
|
54
|
+
constructor(exitCode?: number);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { type ApesConfig, ApiError, type AuthData, CliError, CliExit, apiFetch, clearAuth, discoverEndpoints, getAuthToken, getIdpUrl, getRequesterIdentity, loadAuth, loadConfig, parseDuration, saveAuth, saveConfig };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
CliError,
|
|
4
|
+
CliExit,
|
|
3
5
|
parseDuration
|
|
4
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZSJU7IXE.js";
|
|
5
7
|
import {
|
|
6
8
|
ApiError,
|
|
7
9
|
apiFetch,
|
|
@@ -42,6 +44,8 @@ import {
|
|
|
42
44
|
} from "@openape/shapes";
|
|
43
45
|
export {
|
|
44
46
|
ApiError,
|
|
47
|
+
CliError,
|
|
48
|
+
CliExit,
|
|
45
49
|
apiFetch,
|
|
46
50
|
buildExactCommandGrantRequest,
|
|
47
51
|
buildStructuredCliGrantRequest,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Re-export all shapes library functions\nexport {\n loadAdapter,\n resolveAdapterPath,\n resolveCapabilityRequest,\n resolveCommand,\n buildExactCommandGrantRequest,\n buildStructuredCliGrantRequest,\n fetchRegistry,\n findAdapter,\n searchAdapters,\n findConflictingAdapters,\n getInstalledDigest,\n installAdapter,\n isInstalled,\n removeAdapter,\n extractWrappedCommand,\n extractOption,\n createShapesGrant,\n fetchGrantToken,\n findExistingGrant,\n verifyAndExecute,\n waitForGrantStatus,\n} from '@openape/shapes'\n\nexport type {\n AdapterMeta,\n BuiltGrantRequest,\n GrantRequestOptions,\n LoadedAdapter,\n RegistryEntry,\n RegistryIndex,\n ResolvedCapability,\n ResolvedCommand,\n ShapesAdapter,\n ShapesOperation,\n} from '@openape/shapes'\n\n// Apes-specific exports\nexport { loadAuth, saveAuth, clearAuth, loadConfig, saveConfig, getIdpUrl, getAuthToken, getRequesterIdentity } from './config'\nexport type { AuthData, ApesConfig } from './config'\nexport { apiFetch, discoverEndpoints, ApiError } from './http'\nexport { parseDuration } from './duration'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Re-export all shapes library functions\nexport {\n loadAdapter,\n resolveAdapterPath,\n resolveCapabilityRequest,\n resolveCommand,\n buildExactCommandGrantRequest,\n buildStructuredCliGrantRequest,\n fetchRegistry,\n findAdapter,\n searchAdapters,\n findConflictingAdapters,\n getInstalledDigest,\n installAdapter,\n isInstalled,\n removeAdapter,\n extractWrappedCommand,\n extractOption,\n createShapesGrant,\n fetchGrantToken,\n findExistingGrant,\n verifyAndExecute,\n waitForGrantStatus,\n} from '@openape/shapes'\n\nexport type {\n AdapterMeta,\n BuiltGrantRequest,\n GrantRequestOptions,\n LoadedAdapter,\n RegistryEntry,\n RegistryIndex,\n ResolvedCapability,\n ResolvedCommand,\n ShapesAdapter,\n ShapesOperation,\n} from '@openape/shapes'\n\n// Apes-specific exports\nexport { loadAuth, saveAuth, clearAuth, loadConfig, saveConfig, getIdpUrl, getAuthToken, getRequesterIdentity } from './config'\nexport type { AuthData, ApesConfig } from './config'\nexport { apiFetch, discoverEndpoints, ApiError } from './http'\nexport { parseDuration } from './duration'\nexport { CliError, CliExit } from './errors'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
|
|
@@ -302,7 +302,7 @@ function registerAdapterTools(server) {
|
|
|
302
302
|
async function startMcpServer(transport, port) {
|
|
303
303
|
const server = new McpServer({
|
|
304
304
|
name: "apes",
|
|
305
|
-
version: true ? "0.
|
|
305
|
+
version: true ? "0.6.0" : "0.1.0"
|
|
306
306
|
});
|
|
307
307
|
registerStaticTools(server);
|
|
308
308
|
registerAdapterTools(server);
|
|
@@ -330,4 +330,4 @@ async function startMcpServer(transport, port) {
|
|
|
330
330
|
export {
|
|
331
331
|
startMcpServer
|
|
332
332
|
};
|
|
333
|
-
//# sourceMappingURL=server-
|
|
333
|
+
//# sourceMappingURL=server-IYR5LM63.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openape/apes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"turbo": {
|
|
5
5
|
"tags": [
|
|
6
6
|
"publishable"
|
|
@@ -26,15 +26,18 @@
|
|
|
26
26
|
"consola": "^3.4.2",
|
|
27
27
|
"giget": "^2.0.0",
|
|
28
28
|
"zod": "^4.3.6",
|
|
29
|
-
"@openape/
|
|
30
|
-
"@openape/shapes": "0.6.
|
|
31
|
-
"@openape/
|
|
29
|
+
"@openape/grants": "0.7.0",
|
|
30
|
+
"@openape/shapes": "0.6.1",
|
|
31
|
+
"@openape/core": "0.12.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^25.3.5",
|
|
35
|
+
"h3": "^1.15.0",
|
|
36
|
+
"jose": "^5.9.0",
|
|
35
37
|
"tsup": "^8.5.1",
|
|
36
38
|
"typescript": "^5.8.2",
|
|
37
|
-
"vitest": "^3.2.4"
|
|
39
|
+
"vitest": "^3.2.4",
|
|
40
|
+
"@openape/server": "0.2.0"
|
|
38
41
|
},
|
|
39
42
|
"license": "MIT",
|
|
40
43
|
"author": "Patrick Hofmann <phofmann@delta-mind.at>",
|
|
@@ -50,6 +53,7 @@
|
|
|
50
53
|
"build": "tsup",
|
|
51
54
|
"lint": "eslint .",
|
|
52
55
|
"typecheck": "tsc --noEmit",
|
|
53
|
-
"test": "vitest run"
|
|
56
|
+
"test": "vitest run",
|
|
57
|
+
"test:coverage": "vitest run --coverage"
|
|
54
58
|
}
|
|
55
59
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/duration.ts"],"sourcesContent":["/**\n * Parse a human-readable duration string into seconds.\n * Supported formats: 30s, 5m, 1h, 7d\n */\nexport function parseDuration(value: string): number {\n const match = value.match(/^(\\d+)\\s*([smhd])$/)\n if (!match) {\n throw new Error(`Invalid duration format: \"${value}\". Use e.g. 30m, 1h, 7d`)\n }\n const amount = Number.parseInt(match[1]!, 10)\n switch (match[2]) {\n case 's': return amount\n case 'm': return amount * 60\n case 'h': return amount * 3600\n case 'd': return amount * 86400\n default: throw new Error(`Unknown duration unit: ${match[2]}`)\n }\n}\n"],"mappings":";;;AAIO,SAAS,cAAc,OAAuB;AACnD,QAAM,QAAQ,MAAM,MAAM,oBAAoB;AAC9C,MAAI,CAAC,OAAO;AACV,UAAM,IAAI,MAAM,6BAA6B,KAAK,yBAAyB;AAAA,EAC7E;AACA,QAAM,SAAS,OAAO,SAAS,MAAM,CAAC,GAAI,EAAE;AAC5C,UAAQ,MAAM,CAAC,GAAG;AAAA,IAChB,KAAK;AAAK,aAAO;AAAA,IACjB,KAAK;AAAK,aAAO,SAAS;AAAA,IAC1B,KAAK;AAAK,aAAO,SAAS;AAAA,IAC1B,KAAK;AAAK,aAAO,SAAS;AAAA,IAC1B;AAAS,YAAM,IAAI,MAAM,0BAA0B,MAAM,CAAC,CAAC,EAAE;AAAA,EAC/D;AACF;","names":[]}
|
|
File without changes
|