@duct-sdk/sdk 0.4.5 → 0.5.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +36 -1
  3. package/TOKEN_SPEC.md +237 -0
  4. package/dist/adapters/react/page-context-guard.d.ts +7 -0
  5. package/dist/adapters/react/page-context-guard.js +26 -0
  6. package/dist/adapters/react/page-context-guard.test.d.ts +1 -0
  7. package/dist/adapters/react/page-context-guard.test.js +15 -0
  8. package/dist/adapters/react/shell.js +1 -23
  9. package/dist/adapters/react/use-page-context.d.ts +1 -1
  10. package/dist/adapters/react/use-page-context.js +6 -16
  11. package/dist/cli/agents/reviewer-agent.d.ts +3 -1
  12. package/dist/cli/agents/reviewer-agent.js +29 -21
  13. package/dist/cli/config-loader.d.ts +15 -0
  14. package/dist/cli/config-loader.js +187 -0
  15. package/dist/cli/config-loader.test.d.ts +1 -0
  16. package/dist/cli/config-loader.test.js +63 -0
  17. package/dist/cli/detectors/framework.d.ts +1 -1
  18. package/dist/cli/detectors/framework.js +40 -0
  19. package/dist/cli/generators/receiver.js +206 -76
  20. package/dist/cli/generators/shell.js +50 -4
  21. package/dist/cli/generators/shell.test.d.ts +1 -0
  22. package/dist/cli/generators/shell.test.js +73 -0
  23. package/dist/cli/generators/token-route.d.ts +1 -0
  24. package/dist/cli/generators/token-route.js +108 -5
  25. package/dist/cli/generators/wiring-snippets.js +59 -19
  26. package/dist/cli/generators/wiring-snippets.test.js +15 -1
  27. package/dist/cli/index.js +108 -151
  28. package/dist/cli/init.js +110 -17
  29. package/dist/cli/manifest-diff.d.ts +21 -0
  30. package/dist/cli/manifest-diff.js +158 -0
  31. package/dist/cli/manifest-diff.test.d.ts +1 -0
  32. package/dist/cli/manifest-diff.test.js +104 -0
  33. package/dist/cli/output-paths.d.ts +2 -0
  34. package/dist/cli/output-paths.js +22 -4
  35. package/dist/core/config-policy.test.d.ts +1 -0
  36. package/dist/core/config-policy.test.js +101 -0
  37. package/dist/core/config.d.ts +86 -1
  38. package/dist/core/config.js +120 -2
  39. package/dist/core/invariants.test.d.ts +1 -0
  40. package/dist/core/invariants.test.js +217 -0
  41. package/dist/core/jcs.d.ts +5 -0
  42. package/dist/core/jcs.js +21 -0
  43. package/dist/core/receipt.d.ts +70 -0
  44. package/dist/core/receipt.js +86 -0
  45. package/dist/core/receipt.test.d.ts +1 -0
  46. package/dist/core/receipt.test.js +75 -0
  47. package/dist/core/replay-store.d.ts +51 -0
  48. package/dist/core/replay-store.js +65 -0
  49. package/dist/core/token.d.ts +14 -0
  50. package/dist/core/token.js +50 -18
  51. package/dist/core/token.test.d.ts +1 -0
  52. package/dist/core/token.test.js +66 -0
  53. package/dist/core/types.d.ts +72 -0
  54. package/dist/index.d.ts +6 -4
  55. package/dist/index.js +4 -2
  56. package/dist/server.d.ts +6 -4
  57. package/dist/server.js +4 -2
  58. package/package.json +91 -90
package/package.json CHANGED
@@ -1,90 +1,91 @@
1
- {
2
- "name": "@duct-sdk/sdk",
3
- "version": "0.4.5",
4
- "type": "module",
5
- "description": "Duct SDK — A shell (like terminal) that knows when to talk, when to show, and when to hand off.",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "bin": {
9
- "duct": "dist/cli/index.js"
10
- },
11
- "exports": {
12
- ".": "./dist/index.js",
13
- "./server": "./dist/server.js",
14
- "./next": "./dist/adapters/next/index.js",
15
- "./remix": "./dist/adapters/remix/index.js",
16
- "./vite": "./dist/adapters/vite/index.js",
17
- "./sveltekit": "./dist/adapters/sveltekit/index.js",
18
- "./react": "./dist/adapters/react/index.js"
19
- },
20
- "scripts": {
21
- "build": "tsc",
22
- "dev": "tsc --watch",
23
- "test": "npm run build && node --test dist/cli/generators/config.test.js dist/cli/generators/token-route.test.js dist/cli/generators/wiring-snippets.test.js dist/cli/processors/curl-parser.test.js dist/cli/processors/integration-audit.test.js dist/cli/processors/verify-discovery.test.js",
24
- "verify:publish": "node scripts/verify-publish.mjs",
25
- "prepublishOnly": "npm run build && npm run verify:publish"
26
- },
27
- "dependencies": {
28
- "@anthropic-ai/sdk": "^0.24.0",
29
- "jose": "^5.0.0",
30
- "ignore": "^5.0.0",
31
- "commander": "^12.0.0",
32
- "chalk": "^5.0.0",
33
- "ora": "^8.0.0",
34
- "inquirer": "^9.0.0",
35
- "zod": "^3.0.0",
36
- "node-fetch": "^3.0.0",
37
- "glob": "^10.0.0",
38
- "yaml": "^2.0.0"
39
- },
40
- "devDependencies": {
41
- "typescript": "^5.0.0",
42
- "@types/node": "^20.0.0",
43
- "@types/inquirer": "^9.0.0",
44
- "@types/react": "^18.0.0",
45
- "next": "^14.0.0",
46
- "react": "^18.0.0",
47
- "react-dom": "^18.0.0"
48
- },
49
- "peerDependencies": {
50
- "react": "^18.0.0 || ^19.0.0",
51
- "react-dom": "^18.0.0 || ^19.0.0",
52
- "next": ">=14.0.0"
53
- },
54
- "peerDependenciesMeta": {
55
- "react": {
56
- "optional": true
57
- },
58
- "react-dom": {
59
- "optional": true
60
- },
61
- "next": {
62
- "optional": true
63
- }
64
- },
65
- "files": [
66
- "dist",
67
- "README.md",
68
- "CHANGELOG.md"
69
- ],
70
- "keywords": [
71
- "duct",
72
- "ai",
73
- "agent",
74
- "shell",
75
- "cli",
76
- "llm",
77
- "ai-agent",
78
- "deeplink",
79
- "next",
80
- "nextjs",
81
- "remix",
82
- "vite",
83
- "sveltekit",
84
- "sdk"
85
- ],
86
- "publishConfig": {
87
- "registry": "https://registry.npmjs.org",
88
- "access": "public"
89
- }
90
- }
1
+ {
2
+ "name": "@duct-sdk/sdk",
3
+ "version": "0.5.1",
4
+ "type": "module",
5
+ "description": "Duct SDK — A shell (like terminal) that knows when to talk, when to show, and when to hand off.",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "bin": {
9
+ "duct": "dist/cli/index.js"
10
+ },
11
+ "exports": {
12
+ ".": "./dist/index.js",
13
+ "./server": "./dist/server.js",
14
+ "./next": "./dist/adapters/next/index.js",
15
+ "./remix": "./dist/adapters/remix/index.js",
16
+ "./vite": "./dist/adapters/vite/index.js",
17
+ "./sveltekit": "./dist/adapters/sveltekit/index.js",
18
+ "./react": "./dist/adapters/react/index.js"
19
+ },
20
+ "scripts": {
21
+ "build": "tsc",
22
+ "dev": "tsc --watch",
23
+ "test": "npm run build && node --test dist/core/token.test.js dist/core/invariants.test.js dist/core/receipt.test.js dist/core/config-policy.test.js dist/adapters/react/page-context-guard.test.js dist/cli/config-loader.test.js dist/cli/manifest-diff.test.js dist/cli/generators/shell.test.js dist/cli/generators/config.test.js dist/cli/generators/token-route.test.js dist/cli/generators/wiring-snippets.test.js dist/cli/processors/curl-parser.test.js dist/cli/processors/integration-audit.test.js dist/cli/processors/verify-discovery.test.js",
24
+ "verify:publish": "node scripts/verify-publish.mjs",
25
+ "prepublishOnly": "npm run build && npm run verify:publish"
26
+ },
27
+ "dependencies": {
28
+ "@anthropic-ai/sdk": "^0.24.0",
29
+ "jose": "^5.0.0",
30
+ "ignore": "^5.0.0",
31
+ "commander": "^12.0.0",
32
+ "chalk": "^5.0.0",
33
+ "ora": "^8.0.0",
34
+ "inquirer": "^9.0.0",
35
+ "zod": "^3.0.0",
36
+ "node-fetch": "^3.0.0",
37
+ "glob": "^10.0.0",
38
+ "yaml": "^2.0.0"
39
+ },
40
+ "devDependencies": {
41
+ "typescript": "^5.0.0",
42
+ "@types/node": "^20.0.0",
43
+ "@types/inquirer": "^9.0.0",
44
+ "@types/react": "^18.0.0",
45
+ "next": "^14.0.0",
46
+ "react": "^18.0.0",
47
+ "react-dom": "^18.0.0"
48
+ },
49
+ "peerDependencies": {
50
+ "react": "^18.0.0 || ^19.0.0",
51
+ "react-dom": "^18.0.0 || ^19.0.0",
52
+ "next": ">=14.0.0"
53
+ },
54
+ "peerDependenciesMeta": {
55
+ "react": {
56
+ "optional": true
57
+ },
58
+ "react-dom": {
59
+ "optional": true
60
+ },
61
+ "next": {
62
+ "optional": true
63
+ }
64
+ },
65
+ "files": [
66
+ "dist",
67
+ "README.md",
68
+ "CHANGELOG.md",
69
+ "TOKEN_SPEC.md"
70
+ ],
71
+ "keywords": [
72
+ "duct",
73
+ "ai",
74
+ "agent",
75
+ "shell",
76
+ "cli",
77
+ "llm",
78
+ "ai-agent",
79
+ "deeplink",
80
+ "next",
81
+ "nextjs",
82
+ "remix",
83
+ "vite",
84
+ "sveltekit",
85
+ "sdk"
86
+ ],
87
+ "publishConfig": {
88
+ "registry": "https://registry.npmjs.org",
89
+ "access": "public"
90
+ }
91
+ }