@capyclaw/suite-kit 0.0.0-stage → 0.2.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 (50) hide show
  1. package/README.md +289 -3
  2. package/bin/dsh-domain.mjs +98 -0
  3. package/bin/dsh-suite.mjs +174 -0
  4. package/client/embed.js +35 -0
  5. package/domain.schema.json +129 -0
  6. package/node_modules/@capyclaw/plugin-kit/INTEGRATION.md +100 -0
  7. package/node_modules/@capyclaw/plugin-kit/README.md +70 -0
  8. package/node_modules/@capyclaw/plugin-kit/bin/sync.mjs +103 -0
  9. package/node_modules/@capyclaw/plugin-kit/package.json +71 -0
  10. package/node_modules/@capyclaw/plugin-kit/src/cli.mjs +56 -0
  11. package/node_modules/@capyclaw/plugin-kit/src/config.mjs +142 -0
  12. package/node_modules/@capyclaw/plugin-kit/src/editor/heartbeat-worker.js +132 -0
  13. package/node_modules/@capyclaw/plugin-kit/src/editor/heartbeat.mjs +26 -0
  14. package/node_modules/@capyclaw/plugin-kit/src/editor/lease.mjs +60 -0
  15. package/node_modules/@capyclaw/plugin-kit/src/editor/shadow.mjs +219 -0
  16. package/node_modules/@capyclaw/plugin-kit/src/editor/transport.js +13 -0
  17. package/node_modules/@capyclaw/plugin-kit/src/index.mjs +13 -0
  18. package/node_modules/@capyclaw/plugin-kit/src/pack.mjs +230 -0
  19. package/node_modules/@capyclaw/plugin-kit/src/runtime/context.mjs +128 -0
  20. package/node_modules/@capyclaw/plugin-kit/src/self-contained.mjs +307 -0
  21. package/node_modules/@capyclaw/plugin-kit/src/service/api.mjs +45 -0
  22. package/node_modules/@capyclaw/plugin-kit/src/service/http.mjs +113 -0
  23. package/node_modules/@capyclaw/plugin-kit/src/service/mcp-http.mjs +150 -0
  24. package/node_modules/@capyclaw/plugin-kit/src/service/server.mjs +131 -0
  25. package/node_modules/@capyclaw/plugin-kit/src/service/static.mjs +79 -0
  26. package/node_modules/@capyclaw/plugin-kit/src/skills/provider.mjs +82 -0
  27. package/node_modules/@capyclaw/plugin-kit/src/store/blob-store.mjs +109 -0
  28. package/node_modules/@capyclaw/plugin-kit/src/store/content-store.mjs +17 -0
  29. package/node_modules/@capyclaw/plugin-kit/src/store/journal-store.mjs +89 -0
  30. package/node_modules/@capyclaw/plugin-kit/src/tools/result.mjs +57 -0
  31. package/node_modules/@capyclaw/plugin-kit/src/tools/validate.mjs +150 -0
  32. package/node_modules/@capyclaw/plugin-kit/src/tuning.mjs +82 -0
  33. package/node_modules/@capyclaw/plugin-kit/src/util/fs-lock.mjs +132 -0
  34. package/node_modules/@capyclaw/plugin-kit/src/util/http.mjs +130 -0
  35. package/node_modules/@capyclaw/plugin-kit/src/workspace/manager.mjs +664 -0
  36. package/node_modules/@capyclaw/plugin-kit/src/zip.mjs +181 -0
  37. package/package.json +59 -4
  38. package/src/activation-registry.mjs +184 -0
  39. package/src/artifacts.mjs +131 -0
  40. package/src/capability.mjs +181 -0
  41. package/src/compose.mjs +201 -0
  42. package/src/domain.mjs +138 -0
  43. package/src/embed.mjs +81 -0
  44. package/src/host.mjs +230 -0
  45. package/src/index.mjs +24 -0
  46. package/src/manifest.mjs +263 -0
  47. package/src/orchestration.mjs +100 -0
  48. package/src/profile.mjs +584 -0
  49. package/src/surface.mjs +28 -0
  50. package/suite.schema.json +128 -0
@@ -0,0 +1,128 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dsh.local/schemas/suite.schema.json",
4
+ "title": "DSH Suite Manifest",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["name", "version", "packages", "rows"],
8
+ "properties": {
9
+ "$schema": { "type": "string" },
10
+ "name": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
11
+ "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$" },
12
+ "title": { "type": "string" },
13
+ "description": { "type": "string" },
14
+ "components": {
15
+ "type": "array",
16
+ "items": { "type": "string", "minLength": 1 },
17
+ "description": "引用其他 suite 目录(相对本 suite 目录);加载时展开其 packages/rows/checks。"
18
+ },
19
+ "packages": {
20
+ "type": "object",
21
+ "minProperties": 1,
22
+ "additionalProperties": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["role", "version"],
26
+ "properties": {
27
+ "role": {
28
+ "type": "string",
29
+ "enum": ["runtime", "skills", "provider", "ui", "bridge", "support"]
30
+ },
31
+ "version": { "type": "string", "minLength": 1 },
32
+ "path": { "type": "string", "minLength": 1 },
33
+ "required": { "type": "boolean" },
34
+ "requires": {
35
+ "type": "object",
36
+ "properties": {
37
+ "capabilities": {
38
+ "type": "object",
39
+ "additionalProperties": { "type": "string", "minLength": 1 }
40
+ }
41
+ },
42
+ "additionalProperties": { "type": "string", "minLength": 1 }
43
+ },
44
+ "provides": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "properties": {
48
+ "tools": { "type": "array", "items": { "type": "string" } },
49
+ "skills": { "type": "array", "items": { "type": "string" } },
50
+ "services": { "type": "array", "items": { "type": "string" } },
51
+ "ports": { "type": "array", "items": { "type": "integer", "minimum": 1, "maximum": 65535 } },
52
+ "capabilities": {
53
+ "type": "object",
54
+ "additionalProperties": { "type": "string", "minLength": 1 }
55
+ }
56
+ }
57
+ },
58
+ "surfaceLifecycle": {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "required": ["hooks", "headlessObservation"],
62
+ "description": "表面可见性生命周期标准声明(docs/SURFACE-LIFECYCLE-STANDARD.md §6):四个渲染面钩子齐全 + 无头观察兜底。协议真源 C/packages/capyclaw-foundation/abi/visibility.mjs。",
63
+ "properties": {
64
+ "hooks": {
65
+ "type": "array",
66
+ "items": { "enum": ["onVisibility", "suspendRender", "resumeRender", "rehydrate"] },
67
+ "minItems": 4,
68
+ "maxItems": 4,
69
+ "uniqueItems": true
70
+ },
71
+ "headlessObservation": { "const": true }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ },
77
+ "rows": {
78
+ "type": "array",
79
+ "minItems": 1,
80
+ "items": {
81
+ "type": "object",
82
+ "additionalProperties": false,
83
+ "required": ["id", "name"],
84
+ "properties": {
85
+ "id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
86
+ "name": { "type": "string", "minLength": 1 },
87
+ "disabled": { "type": "boolean" },
88
+ "config": { "type": "object" }
89
+ }
90
+ }
91
+ },
92
+ "checks": {
93
+ "type": "array",
94
+ "items": {
95
+ "oneOf": [
96
+ {
97
+ "type": "object",
98
+ "additionalProperties": false,
99
+ "required": ["id", "type", "url"],
100
+ "properties": {
101
+ "id": { "type": "string" },
102
+ "type": { "const": "http" },
103
+ "url": { "type": "string", "format": "uri" },
104
+ "method": { "type": "string" },
105
+ "expectStatus": { "type": "integer" },
106
+ "expectBody": { "type": "object" },
107
+ "timeoutMs": { "type": "integer", "minimum": 100 }
108
+ }
109
+ },
110
+ {
111
+ "type": "object",
112
+ "additionalProperties": false,
113
+ "required": ["id", "type", "url", "tool", "major"],
114
+ "properties": {
115
+ "id": { "type": "string" },
116
+ "type": { "const": "contract" },
117
+ "url": { "type": "string", "format": "uri" },
118
+ "tool": { "type": "string" },
119
+ "major": { "type": "integer", "minimum": 0 },
120
+ "timeoutMs": { "type": "integer", "minimum": 100 }
121
+ }
122
+ }
123
+ ]
124
+ }
125
+ },
126
+ "tags": { "type": "array", "items": { "type": "string" } }
127
+ }
128
+ }