@agent-facets/adapter-claude-code 0.0.1 → 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.
@@ -0,0 +1,10 @@
1
+ import * as _$_agent_facets_adapter0 from "@agent-facets/adapter";
2
+
3
+ //#region src/index.d.ts
4
+ /**
5
+ * Claude Code adapter — defines the conventions for Claude Code,
6
+ * Anthropic's AI coding tool.
7
+ */
8
+ declare const _default: _$_agent_facets_adapter0.Adapter;
9
+ //#endregion
10
+ export { _default as default };
package/dist/index.mjs ADDED
@@ -0,0 +1,38 @@
1
+ import { defineAdapter } from "@agent-facets/adapter";
2
+ import { type } from "arktype";
3
+ //#region src/index.ts
4
+ /** Claude Code per-asset metadata schema */
5
+ const ClaudeCodeMetadataSchema = type({
6
+ "tools?": type.Record("string", "boolean"),
7
+ "permissions?": type.Record("string", "boolean")
8
+ });
9
+ /**
10
+ * Claude Code adapter — defines the conventions for Claude Code,
11
+ * Anthropic's AI coding tool.
12
+ */
13
+ var src_default = defineAdapter({
14
+ name: "claude-code",
15
+ buildAssetMetadata(data) {
16
+ const result = ClaudeCodeMetadataSchema(data);
17
+ if (result instanceof type.errors) return {
18
+ ok: false,
19
+ errors: result.map((err) => ({
20
+ path: err.path.join("."),
21
+ message: err.message,
22
+ expected: err.expected ?? "unknown",
23
+ actual: String(err.actual ?? "unknown")
24
+ }))
25
+ };
26
+ return {
27
+ ok: true,
28
+ data: result
29
+ };
30
+ },
31
+ async installAsset() {},
32
+ async readAsset() {
33
+ return { content: "Your asset sir..." };
34
+ },
35
+ async deleteAsset() {}
36
+ });
37
+ //#endregion
38
+ export { src_default as default };
package/package.json CHANGED
@@ -1,5 +1,42 @@
1
1
  {
2
2
  "name": "@agent-facets/adapter-claude-code",
3
- "version": "0.0.1",
4
- "description": "Placeholder for OIDC trusted publishing bootstrap"
5
- }
3
+ "repository": {
4
+ "type": "git",
5
+ "url": "https://github.com/agent-facets/facets",
6
+ "directory": "packages/adapters/claude-code"
7
+ },
8
+ "version": "0.2.0",
9
+ "type": "module",
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "exports": {
14
+ ".": "./src/index.ts"
15
+ },
16
+ "scripts": {
17
+ "build": "tsdown",
18
+ "prepack": "bun ../../../scripts/prepack.ts",
19
+ "postpack": "bun ../../../scripts/postpack.ts",
20
+ "types": "tsc --noEmit",
21
+ "test": "bun test"
22
+ },
23
+ "dependencies": {
24
+ "@agent-facets/adapter": "0.2.0",
25
+ "arktype": "2.2.0"
26
+ },
27
+ "devDependencies": {
28
+ "@types/bun": "1.3.11",
29
+ "tsdown": "^0.21.8",
30
+ "typescript": "^6.0.3"
31
+ },
32
+ "publishConfig": {
33
+ "access": "public",
34
+ "provenance": false,
35
+ "exports": {
36
+ ".": {
37
+ "import": "./dist/index.mjs",
38
+ "types": "./dist/index.d.mts"
39
+ }
40
+ }
41
+ }
42
+ }