@bradygaster/squad-sdk 0.8.0 → 0.8.3

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 (112) hide show
  1. package/dist/adapter/client.d.ts +24 -4
  2. package/dist/adapter/client.d.ts.map +1 -1
  3. package/dist/adapter/client.js +368 -78
  4. package/dist/adapter/client.js.map +1 -1
  5. package/dist/adapter/types.d.ts +38 -0
  6. package/dist/adapter/types.d.ts.map +1 -1
  7. package/dist/agents/index.d.ts +6 -3
  8. package/dist/agents/index.d.ts.map +1 -1
  9. package/dist/agents/index.js +132 -23
  10. package/dist/agents/index.js.map +1 -1
  11. package/dist/agents/lifecycle.d.ts.map +1 -1
  12. package/dist/agents/lifecycle.js +28 -2
  13. package/dist/agents/lifecycle.js.map +1 -1
  14. package/dist/agents/model-selector.d.ts.map +1 -1
  15. package/dist/agents/model-selector.js +10 -37
  16. package/dist/agents/model-selector.js.map +1 -1
  17. package/dist/casting/index.d.ts.map +1 -1
  18. package/dist/casting/index.js +10 -2
  19. package/dist/casting/index.js.map +1 -1
  20. package/dist/client/event-bus.d.ts.map +1 -1
  21. package/dist/client/event-bus.js +0 -1
  22. package/dist/client/event-bus.js.map +1 -1
  23. package/dist/client/index.d.ts +7 -4
  24. package/dist/client/index.d.ts.map +1 -1
  25. package/dist/client/index.js +22 -10
  26. package/dist/client/index.js.map +1 -1
  27. package/dist/config/init.d.ts.map +1 -1
  28. package/dist/config/init.js +19 -12
  29. package/dist/config/init.js.map +1 -1
  30. package/dist/coordinator/coordinator.d.ts.map +1 -1
  31. package/dist/coordinator/coordinator.js +73 -55
  32. package/dist/coordinator/coordinator.js.map +1 -1
  33. package/dist/coordinator/index.d.ts +19 -4
  34. package/dist/coordinator/index.d.ts.map +1 -1
  35. package/dist/coordinator/index.js +138 -21
  36. package/dist/coordinator/index.js.map +1 -1
  37. package/dist/index.d.ts +12 -2
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +12 -2
  40. package/dist/index.js.map +1 -1
  41. package/dist/ralph/index.d.ts +3 -1
  42. package/dist/ralph/index.d.ts.map +1 -1
  43. package/dist/ralph/index.js +83 -16
  44. package/dist/ralph/index.js.map +1 -1
  45. package/dist/resolution.d.ts +59 -0
  46. package/dist/resolution.d.ts.map +1 -1
  47. package/dist/resolution.js +145 -0
  48. package/dist/resolution.js.map +1 -1
  49. package/dist/runtime/config.d.ts +3 -2
  50. package/dist/runtime/config.d.ts.map +1 -1
  51. package/dist/runtime/config.js +7 -6
  52. package/dist/runtime/config.js.map +1 -1
  53. package/dist/runtime/constants.d.ts +35 -0
  54. package/dist/runtime/constants.d.ts.map +1 -0
  55. package/dist/runtime/constants.js +58 -0
  56. package/dist/runtime/constants.js.map +1 -0
  57. package/dist/runtime/event-bus-otel-bridge.d.ts +19 -0
  58. package/dist/runtime/event-bus-otel-bridge.d.ts.map +1 -0
  59. package/dist/runtime/event-bus-otel-bridge.js +61 -0
  60. package/dist/runtime/event-bus-otel-bridge.js.map +1 -0
  61. package/dist/runtime/event-bus-ws-bridge.d.ts +35 -0
  62. package/dist/runtime/event-bus-ws-bridge.d.ts.map +1 -0
  63. package/dist/runtime/event-bus-ws-bridge.js +55 -0
  64. package/dist/runtime/event-bus-ws-bridge.js.map +1 -0
  65. package/dist/runtime/event-payloads.d.ts +108 -0
  66. package/dist/runtime/event-payloads.d.ts.map +1 -0
  67. package/dist/runtime/event-payloads.js +28 -0
  68. package/dist/runtime/event-payloads.js.map +1 -0
  69. package/dist/runtime/health.d.ts.map +1 -1
  70. package/dist/runtime/health.js +2 -1
  71. package/dist/runtime/health.js.map +1 -1
  72. package/dist/runtime/otel-bridge.d.ts +52 -0
  73. package/dist/runtime/otel-bridge.d.ts.map +1 -0
  74. package/dist/runtime/otel-bridge.js +132 -0
  75. package/dist/runtime/otel-bridge.js.map +1 -0
  76. package/dist/runtime/otel-init.d.ts +72 -0
  77. package/dist/runtime/otel-init.d.ts.map +1 -0
  78. package/dist/runtime/otel-init.js +68 -0
  79. package/dist/runtime/otel-init.js.map +1 -0
  80. package/dist/runtime/otel-metrics.d.ts +42 -0
  81. package/dist/runtime/otel-metrics.d.ts.map +1 -0
  82. package/dist/runtime/otel-metrics.js +196 -0
  83. package/dist/runtime/otel-metrics.js.map +1 -0
  84. package/dist/runtime/otel.d.ts +53 -0
  85. package/dist/runtime/otel.d.ts.map +1 -0
  86. package/dist/runtime/otel.js +127 -0
  87. package/dist/runtime/otel.js.map +1 -0
  88. package/dist/runtime/squad-observer.d.ts +75 -0
  89. package/dist/runtime/squad-observer.d.ts.map +1 -0
  90. package/dist/runtime/squad-observer.js +190 -0
  91. package/dist/runtime/squad-observer.js.map +1 -0
  92. package/dist/runtime/streaming.d.ts +9 -0
  93. package/dist/runtime/streaming.d.ts.map +1 -1
  94. package/dist/runtime/streaming.js +37 -1
  95. package/dist/runtime/streaming.js.map +1 -1
  96. package/dist/tools/index.d.ts +8 -0
  97. package/dist/tools/index.d.ts.map +1 -1
  98. package/dist/tools/index.js +57 -1
  99. package/dist/tools/index.js.map +1 -1
  100. package/dist/upstream/index.d.ts +8 -0
  101. package/dist/upstream/index.d.ts.map +1 -0
  102. package/dist/upstream/index.js +7 -0
  103. package/dist/upstream/index.js.map +1 -0
  104. package/dist/upstream/resolver.d.ts +37 -0
  105. package/dist/upstream/resolver.d.ts.map +1 -0
  106. package/dist/upstream/resolver.js +234 -0
  107. package/dist/upstream/resolver.js.map +1 -0
  108. package/dist/upstream/types.d.ts +55 -0
  109. package/dist/upstream/types.d.ts.map +1 -0
  110. package/dist/upstream/types.js +11 -0
  111. package/dist/upstream/types.js.map +1 -0
  112. package/package.json +84 -2
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Upstream types — configuration and resolved state for upstream Squad sources.
3
+ *
4
+ * An upstream is another Squad repo (org-level, team-level, or any repo with .squad/)
5
+ * whose context (skills, decisions, wisdom, casting policy, routing) is read live
6
+ * by the coordinator at session start.
7
+ *
8
+ * @module upstream/types
9
+ */
10
+ /** Source type for an upstream Squad repo. */
11
+ export type UpstreamType = 'local' | 'git' | 'export';
12
+ /** A declared upstream source from upstream.json. */
13
+ export interface UpstreamSource {
14
+ /** Display name for this upstream (e.g., "org", "team-platform"). */
15
+ name: string;
16
+ /** How to access this upstream. */
17
+ type: UpstreamType;
18
+ /** Path, URL, or export file location. */
19
+ source: string;
20
+ /** Git ref to use (only for type: "git"). */
21
+ ref?: string;
22
+ /** ISO timestamp of when this upstream was added. */
23
+ added_at: string;
24
+ /** ISO timestamp of last successful sync/validation. */
25
+ last_synced: string | null;
26
+ }
27
+ /** The upstream.json config file format. */
28
+ export interface UpstreamConfig {
29
+ upstreams: UpstreamSource[];
30
+ }
31
+ /** Resolved content from a single upstream source. */
32
+ export interface ResolvedUpstream {
33
+ /** Name from the config. */
34
+ name: string;
35
+ /** Source type. */
36
+ type: UpstreamType;
37
+ /** Skills found in this upstream. */
38
+ skills: Array<{
39
+ name: string;
40
+ content: string;
41
+ }>;
42
+ /** Decisions markdown content, or null if not found. */
43
+ decisions: string | null;
44
+ /** Wisdom markdown content, or null if not found. */
45
+ wisdom: string | null;
46
+ /** Casting policy object, or null if not found. */
47
+ castingPolicy: Record<string, unknown> | null;
48
+ /** Routing markdown content, or null if not found. */
49
+ routing: string | null;
50
+ }
51
+ /** Result of resolving all upstreams for a squad directory. */
52
+ export interface UpstreamResolution {
53
+ upstreams: ResolvedUpstream[];
54
+ }
55
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/upstream/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,8CAA8C;AAC9C,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEtD,qDAAqD;AACrD,MAAM,WAAW,cAAc;IAC7B,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,IAAI,EAAE,YAAY,CAAC;IACnB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,4CAA4C;AAC5C,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,cAAc,EAAE,CAAC;CAC7B;AAED,sDAAsD;AACtD,MAAM,WAAW,gBAAgB;IAC/B,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,qCAAqC;IACrC,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,wDAAwD;IACxD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,qDAAqD;IACrD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,mDAAmD;IACnD,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC9C,sDAAsD;IACtD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,+DAA+D;AAC/D,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,gBAAgB,EAAE,CAAC;CAC/B"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Upstream types — configuration and resolved state for upstream Squad sources.
3
+ *
4
+ * An upstream is another Squad repo (org-level, team-level, or any repo with .squad/)
5
+ * whose context (skills, decisions, wisdom, casting policy, routing) is read live
6
+ * by the coordinator at session start.
7
+ *
8
+ * @module upstream/types
9
+ */
10
+ export {};
11
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/upstream/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bradygaster/squad-sdk",
3
- "version": "0.8.0",
3
+ "version": "0.8.3",
4
4
  "description": "Squad SDK — Programmable multi-agent runtime for GitHub Copilot",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -81,6 +81,66 @@
81
81
  "./resolution": {
82
82
  "types": "./dist/resolution.d.ts",
83
83
  "import": "./dist/resolution.js"
84
+ },
85
+ "./adapter/errors": {
86
+ "types": "./dist/adapter/errors.d.ts",
87
+ "import": "./dist/adapter/errors.js"
88
+ },
89
+ "./config/migrations": {
90
+ "types": "./dist/config/migrations/index.d.ts",
91
+ "import": "./dist/config/migrations/index.js"
92
+ },
93
+ "./runtime/event-bus": {
94
+ "types": "./dist/runtime/event-bus.d.ts",
95
+ "import": "./dist/runtime/event-bus.js"
96
+ },
97
+ "./runtime/benchmarks": {
98
+ "types": "./dist/runtime/benchmarks.d.ts",
99
+ "import": "./dist/runtime/benchmarks.js"
100
+ },
101
+ "./runtime/i18n": {
102
+ "types": "./dist/runtime/i18n.d.ts",
103
+ "import": "./dist/runtime/i18n.js"
104
+ },
105
+ "./runtime/telemetry": {
106
+ "types": "./dist/runtime/telemetry.d.ts",
107
+ "import": "./dist/runtime/telemetry.js"
108
+ },
109
+ "./runtime/offline": {
110
+ "types": "./dist/runtime/offline.d.ts",
111
+ "import": "./dist/runtime/offline.js"
112
+ },
113
+ "./runtime/cost-tracker": {
114
+ "types": "./dist/runtime/cost-tracker.d.ts",
115
+ "import": "./dist/runtime/cost-tracker.js"
116
+ },
117
+ "./runtime/otel": {
118
+ "types": "./dist/runtime/otel.d.ts",
119
+ "import": "./dist/runtime/otel.js"
120
+ },
121
+ "./runtime/otel-bridge": {
122
+ "types": "./dist/runtime/otel-bridge.d.ts",
123
+ "import": "./dist/runtime/otel-bridge.js"
124
+ },
125
+ "./runtime/otel-metrics": {
126
+ "types": "./dist/runtime/otel-metrics.d.ts",
127
+ "import": "./dist/runtime/otel-metrics.js"
128
+ },
129
+ "./runtime/squad-observer": {
130
+ "types": "./dist/runtime/squad-observer.d.ts",
131
+ "import": "./dist/runtime/squad-observer.js"
132
+ },
133
+ "./runtime/event-payloads": {
134
+ "types": "./dist/runtime/event-payloads.d.ts",
135
+ "import": "./dist/runtime/event-payloads.js"
136
+ },
137
+ "./runtime/event-bus-ws-bridge": {
138
+ "types": "./dist/runtime/event-bus-ws-bridge.d.ts",
139
+ "import": "./dist/runtime/event-bus-ws-bridge.js"
140
+ },
141
+ "./runtime/constants": {
142
+ "types": "./dist/runtime/constants.d.ts",
143
+ "import": "./dist/runtime/constants.js"
84
144
  }
85
145
  },
86
146
  "files": [
@@ -88,6 +148,7 @@
88
148
  "README.md"
89
149
  ],
90
150
  "scripts": {
151
+ "prepublishOnly": "npm run build",
91
152
  "build": "tsc -p tsconfig.json"
92
153
  },
93
154
  "engines": {
@@ -96,11 +157,32 @@
96
157
  "dependencies": {
97
158
  "@github/copilot-sdk": "^0.1.25"
98
159
  },
160
+ "peerDependencies": {
161
+ "@opentelemetry/api": "^1.9.0"
162
+ },
163
+ "peerDependenciesMeta": {
164
+ "@opentelemetry/api": {
165
+ "optional": true
166
+ }
167
+ },
168
+ "optionalDependencies": {
169
+ "@opentelemetry/exporter-metrics-otlp-http": "^0.57.2",
170
+ "@opentelemetry/exporter-trace-otlp-http": "^0.57.2",
171
+ "@opentelemetry/resources": "^1.30.0",
172
+ "@opentelemetry/sdk-metrics": "^1.30.0",
173
+ "@opentelemetry/sdk-node": "^0.57.2",
174
+ "@opentelemetry/sdk-trace-base": "^1.30.0",
175
+ "@opentelemetry/sdk-trace-node": "^1.30.0",
176
+ "@opentelemetry/semantic-conventions": "^1.28.0",
177
+ "ws": "^8.18.0"
178
+ },
99
179
  "devDependencies": {
180
+ "@opentelemetry/api": "^1.9.0",
100
181
  "@types/node": "^22.0.0",
182
+ "@types/ws": "^8.5.13",
101
183
  "typescript": "^5.7.0"
102
184
  },
103
- "keywords":[
185
+ "keywords": [
104
186
  "copilot",
105
187
  "multi-agent",
106
188
  "squad",