@bradygaster/squad-sdk 0.8.19 → 0.8.21
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/README.md +296 -296
- package/dist/adapter/client.js +1 -1
- package/dist/adapter/client.js.map +1 -1
- package/dist/agents/charter-compiler.d.ts +4 -0
- package/dist/agents/charter-compiler.d.ts.map +1 -1
- package/dist/agents/charter-compiler.js +8 -0
- package/dist/agents/charter-compiler.js.map +1 -1
- package/dist/agents/history-shadow.js +30 -30
- package/dist/agents/index.js +1 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/lifecycle.js +1 -1
- package/dist/agents/lifecycle.js.map +1 -1
- package/dist/build/github-dist.js +42 -42
- package/dist/builders/index.d.ts +156 -0
- package/dist/builders/index.d.ts.map +1 -0
- package/dist/builders/index.js +404 -0
- package/dist/builders/index.js.map +1 -0
- package/dist/builders/types.d.ts +187 -0
- package/dist/builders/types.d.ts.map +1 -0
- package/dist/builders/types.js +12 -0
- package/dist/builders/types.js.map +1 -0
- package/dist/config/init.d.ts +6 -22
- package/dist/config/init.d.ts.map +1 -1
- package/dist/config/init.js +273 -185
- package/dist/config/init.js.map +1 -1
- package/dist/coordinator/coordinator.js +1 -1
- package/dist/coordinator/coordinator.js.map +1 -1
- package/dist/coordinator/index.js +1 -1
- package/dist/coordinator/index.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/runtime/otel-api.d.ts +38 -0
- package/dist/runtime/otel-api.d.ts.map +1 -0
- package/dist/runtime/otel-api.js +94 -0
- package/dist/runtime/otel-api.js.map +1 -0
- package/dist/runtime/otel-bridge.js +1 -1
- package/dist/runtime/otel-bridge.js.map +1 -1
- package/dist/runtime/otel.d.ts +1 -1
- package/dist/runtime/otel.d.ts.map +1 -1
- package/dist/runtime/otel.js +28 -12
- package/dist/runtime/otel.js.map +1 -1
- package/dist/runtime/squad-observer.js +1 -1
- package/dist/runtime/squad-observer.js.map +1 -1
- package/dist/sharing/consult.js +78 -78
- package/dist/streams/filter.d.ts +33 -0
- package/dist/streams/filter.d.ts.map +1 -0
- package/dist/streams/filter.js +29 -0
- package/dist/streams/filter.js.map +1 -0
- package/dist/streams/index.d.ts +9 -0
- package/dist/streams/index.d.ts.map +1 -0
- package/dist/streams/index.js +9 -0
- package/dist/streams/index.js.map +1 -0
- package/dist/streams/resolver.d.ts +40 -0
- package/dist/streams/resolver.d.ts.map +1 -0
- package/dist/streams/resolver.js +162 -0
- package/dist/streams/resolver.js.map +1 -0
- package/dist/streams/types.d.ts +44 -0
- package/dist/streams/types.d.ts.map +1 -0
- package/dist/streams/types.js +10 -0
- package/dist/streams/types.js.map +1 -0
- package/dist/tools/index.js +1 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/types.d.ts +20 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +208 -207
- package/templates/casting-history.json +4 -4
- package/templates/casting-policy.json +35 -35
- package/templates/casting-registry.json +3 -3
- package/templates/ceremonies.md +41 -41
- package/templates/charter.md +53 -53
- package/templates/constraint-tracking.md +38 -38
- package/templates/copilot-instructions.md +46 -46
- package/templates/history.md +10 -10
- package/templates/identity/now.md +9 -9
- package/templates/identity/wisdom.md +15 -15
- package/templates/mcp-config.md +98 -98
- package/templates/multi-agent-format.md +28 -28
- package/templates/orchestration-log.md +27 -27
- package/templates/plugin-marketplace.md +49 -49
- package/templates/raw-agent-output.md +37 -37
- package/templates/roster.md +60 -60
- package/templates/routing.md +54 -54
- package/templates/run-output.md +50 -50
- package/templates/scribe-charter.md +119 -119
- package/templates/skill.md +24 -24
- package/templates/skills/project-conventions/SKILL.md +56 -56
- package/templates/squad.agent.md +1146 -1146
- package/templates/workflows/squad-ci.yml +24 -24
- package/templates/workflows/squad-docs.yml +50 -50
- package/templates/workflows/squad-heartbeat.yml +316 -316
- package/templates/workflows/squad-insider-release.yml +61 -61
- package/templates/workflows/squad-issue-assign.yml +161 -161
- package/templates/workflows/squad-label-enforce.yml +181 -181
- package/templates/workflows/squad-preview.yml +55 -55
- package/templates/workflows/squad-promote.yml +120 -121
- package/templates/workflows/squad-release.yml +77 -77
- package/templates/workflows/squad-triage.yml +260 -260
- package/templates/workflows/sync-squad-labels.yml +169 -169
- package/dist/runtime/event-bus-otel-bridge.d.ts +0 -19
- package/dist/runtime/event-bus-otel-bridge.d.ts.map +0 -1
- package/dist/runtime/event-bus-otel-bridge.js +0 -61
- package/dist/runtime/event-bus-otel-bridge.js.map +0 -1
- package/templates/workflows/squad-main-guard.yml +0 -129
|
@@ -1,181 +1,181 @@
|
|
|
1
|
-
name: Squad Label Enforce
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
issues:
|
|
5
|
-
types: [labeled]
|
|
6
|
-
|
|
7
|
-
permissions:
|
|
8
|
-
issues: write
|
|
9
|
-
contents: read
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
enforce:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v4
|
|
16
|
-
|
|
17
|
-
- name: Enforce mutual exclusivity
|
|
18
|
-
uses: actions/github-script@v7
|
|
19
|
-
with:
|
|
20
|
-
script: |
|
|
21
|
-
const issue = context.payload.issue;
|
|
22
|
-
const appliedLabel = context.payload.label.name;
|
|
23
|
-
|
|
24
|
-
// Namespaces with mutual exclusivity rules
|
|
25
|
-
const EXCLUSIVE_PREFIXES = ['go:', 'release:', 'type:', 'priority:'];
|
|
26
|
-
|
|
27
|
-
// Skip if not a managed namespace label
|
|
28
|
-
if (!EXCLUSIVE_PREFIXES.some(p => appliedLabel.startsWith(p))) {
|
|
29
|
-
core.info(`Label ${appliedLabel} is not in a managed namespace — skipping`);
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const allLabels = issue.labels.map(l => l.name);
|
|
34
|
-
|
|
35
|
-
// Handle go: namespace (mutual exclusivity)
|
|
36
|
-
if (appliedLabel.startsWith('go:')) {
|
|
37
|
-
const otherGoLabels = allLabels.filter(l =>
|
|
38
|
-
l.startsWith('go:') && l !== appliedLabel
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
if (otherGoLabels.length > 0) {
|
|
42
|
-
// Remove conflicting go: labels
|
|
43
|
-
for (const label of otherGoLabels) {
|
|
44
|
-
await github.rest.issues.removeLabel({
|
|
45
|
-
owner: context.repo.owner,
|
|
46
|
-
repo: context.repo.repo,
|
|
47
|
-
issue_number: issue.number,
|
|
48
|
-
name: label
|
|
49
|
-
});
|
|
50
|
-
core.info(`Removed conflicting label: ${label}`);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Post update comment
|
|
54
|
-
await github.rest.issues.createComment({
|
|
55
|
-
owner: context.repo.owner,
|
|
56
|
-
repo: context.repo.repo,
|
|
57
|
-
issue_number: issue.number,
|
|
58
|
-
body: `🏷️ Triage verdict updated → \`${appliedLabel}\``
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// Auto-apply release:backlog if go:yes and no release target
|
|
63
|
-
if (appliedLabel === 'go:yes') {
|
|
64
|
-
const hasReleaseLabel = allLabels.some(l => l.startsWith('release:'));
|
|
65
|
-
if (!hasReleaseLabel) {
|
|
66
|
-
await github.rest.issues.addLabels({
|
|
67
|
-
owner: context.repo.owner,
|
|
68
|
-
repo: context.repo.repo,
|
|
69
|
-
issue_number: issue.number,
|
|
70
|
-
labels: ['release:backlog']
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
await github.rest.issues.createComment({
|
|
74
|
-
owner: context.repo.owner,
|
|
75
|
-
repo: context.repo.repo,
|
|
76
|
-
issue_number: issue.number,
|
|
77
|
-
body: `📋 Marked as \`release:backlog\` — assign a release target when ready.`
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
core.info('Applied release:backlog for go:yes issue');
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// Remove release: labels if go:no
|
|
85
|
-
if (appliedLabel === 'go:no') {
|
|
86
|
-
const releaseLabels = allLabels.filter(l => l.startsWith('release:'));
|
|
87
|
-
if (releaseLabels.length > 0) {
|
|
88
|
-
for (const label of releaseLabels) {
|
|
89
|
-
await github.rest.issues.removeLabel({
|
|
90
|
-
owner: context.repo.owner,
|
|
91
|
-
repo: context.repo.repo,
|
|
92
|
-
issue_number: issue.number,
|
|
93
|
-
name: label
|
|
94
|
-
});
|
|
95
|
-
core.info(`Removed release label from go:no issue: ${label}`);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// Handle release: namespace (mutual exclusivity)
|
|
102
|
-
if (appliedLabel.startsWith('release:')) {
|
|
103
|
-
const otherReleaseLabels = allLabels.filter(l =>
|
|
104
|
-
l.startsWith('release:') && l !== appliedLabel
|
|
105
|
-
);
|
|
106
|
-
|
|
107
|
-
if (otherReleaseLabels.length > 0) {
|
|
108
|
-
// Remove conflicting release: labels
|
|
109
|
-
for (const label of otherReleaseLabels) {
|
|
110
|
-
await github.rest.issues.removeLabel({
|
|
111
|
-
owner: context.repo.owner,
|
|
112
|
-
repo: context.repo.repo,
|
|
113
|
-
issue_number: issue.number,
|
|
114
|
-
name: label
|
|
115
|
-
});
|
|
116
|
-
core.info(`Removed conflicting label: ${label}`);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// Post update comment
|
|
120
|
-
await github.rest.issues.createComment({
|
|
121
|
-
owner: context.repo.owner,
|
|
122
|
-
repo: context.repo.repo,
|
|
123
|
-
issue_number: issue.number,
|
|
124
|
-
body: `🏷️ Release target updated → \`${appliedLabel}\``
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// Handle type: namespace (mutual exclusivity)
|
|
130
|
-
if (appliedLabel.startsWith('type:')) {
|
|
131
|
-
const otherTypeLabels = allLabels.filter(l =>
|
|
132
|
-
l.startsWith('type:') && l !== appliedLabel
|
|
133
|
-
);
|
|
134
|
-
|
|
135
|
-
if (otherTypeLabels.length > 0) {
|
|
136
|
-
for (const label of otherTypeLabels) {
|
|
137
|
-
await github.rest.issues.removeLabel({
|
|
138
|
-
owner: context.repo.owner,
|
|
139
|
-
repo: context.repo.repo,
|
|
140
|
-
issue_number: issue.number,
|
|
141
|
-
name: label
|
|
142
|
-
});
|
|
143
|
-
core.info(`Removed conflicting label: ${label}`);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
await github.rest.issues.createComment({
|
|
147
|
-
owner: context.repo.owner,
|
|
148
|
-
repo: context.repo.repo,
|
|
149
|
-
issue_number: issue.number,
|
|
150
|
-
body: `🏷️ Issue type updated → \`${appliedLabel}\``
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// Handle priority: namespace (mutual exclusivity)
|
|
156
|
-
if (appliedLabel.startsWith('priority:')) {
|
|
157
|
-
const otherPriorityLabels = allLabels.filter(l =>
|
|
158
|
-
l.startsWith('priority:') && l !== appliedLabel
|
|
159
|
-
);
|
|
160
|
-
|
|
161
|
-
if (otherPriorityLabels.length > 0) {
|
|
162
|
-
for (const label of otherPriorityLabels) {
|
|
163
|
-
await github.rest.issues.removeLabel({
|
|
164
|
-
owner: context.repo.owner,
|
|
165
|
-
repo: context.repo.repo,
|
|
166
|
-
issue_number: issue.number,
|
|
167
|
-
name: label
|
|
168
|
-
});
|
|
169
|
-
core.info(`Removed conflicting label: ${label}`);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
await github.rest.issues.createComment({
|
|
173
|
-
owner: context.repo.owner,
|
|
174
|
-
repo: context.repo.repo,
|
|
175
|
-
issue_number: issue.number,
|
|
176
|
-
body: `🏷️ Priority updated → \`${appliedLabel}\``
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
core.info(`Label enforcement complete for ${appliedLabel}`);
|
|
1
|
+
name: Squad Label Enforce
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issues:
|
|
5
|
+
types: [labeled]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
issues: write
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
enforce:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Enforce mutual exclusivity
|
|
18
|
+
uses: actions/github-script@v7
|
|
19
|
+
with:
|
|
20
|
+
script: |
|
|
21
|
+
const issue = context.payload.issue;
|
|
22
|
+
const appliedLabel = context.payload.label.name;
|
|
23
|
+
|
|
24
|
+
// Namespaces with mutual exclusivity rules
|
|
25
|
+
const EXCLUSIVE_PREFIXES = ['go:', 'release:', 'type:', 'priority:'];
|
|
26
|
+
|
|
27
|
+
// Skip if not a managed namespace label
|
|
28
|
+
if (!EXCLUSIVE_PREFIXES.some(p => appliedLabel.startsWith(p))) {
|
|
29
|
+
core.info(`Label ${appliedLabel} is not in a managed namespace — skipping`);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const allLabels = issue.labels.map(l => l.name);
|
|
34
|
+
|
|
35
|
+
// Handle go: namespace (mutual exclusivity)
|
|
36
|
+
if (appliedLabel.startsWith('go:')) {
|
|
37
|
+
const otherGoLabels = allLabels.filter(l =>
|
|
38
|
+
l.startsWith('go:') && l !== appliedLabel
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
if (otherGoLabels.length > 0) {
|
|
42
|
+
// Remove conflicting go: labels
|
|
43
|
+
for (const label of otherGoLabels) {
|
|
44
|
+
await github.rest.issues.removeLabel({
|
|
45
|
+
owner: context.repo.owner,
|
|
46
|
+
repo: context.repo.repo,
|
|
47
|
+
issue_number: issue.number,
|
|
48
|
+
name: label
|
|
49
|
+
});
|
|
50
|
+
core.info(`Removed conflicting label: ${label}`);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Post update comment
|
|
54
|
+
await github.rest.issues.createComment({
|
|
55
|
+
owner: context.repo.owner,
|
|
56
|
+
repo: context.repo.repo,
|
|
57
|
+
issue_number: issue.number,
|
|
58
|
+
body: `🏷️ Triage verdict updated → \`${appliedLabel}\``
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Auto-apply release:backlog if go:yes and no release target
|
|
63
|
+
if (appliedLabel === 'go:yes') {
|
|
64
|
+
const hasReleaseLabel = allLabels.some(l => l.startsWith('release:'));
|
|
65
|
+
if (!hasReleaseLabel) {
|
|
66
|
+
await github.rest.issues.addLabels({
|
|
67
|
+
owner: context.repo.owner,
|
|
68
|
+
repo: context.repo.repo,
|
|
69
|
+
issue_number: issue.number,
|
|
70
|
+
labels: ['release:backlog']
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
await github.rest.issues.createComment({
|
|
74
|
+
owner: context.repo.owner,
|
|
75
|
+
repo: context.repo.repo,
|
|
76
|
+
issue_number: issue.number,
|
|
77
|
+
body: `📋 Marked as \`release:backlog\` — assign a release target when ready.`
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
core.info('Applied release:backlog for go:yes issue');
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Remove release: labels if go:no
|
|
85
|
+
if (appliedLabel === 'go:no') {
|
|
86
|
+
const releaseLabels = allLabels.filter(l => l.startsWith('release:'));
|
|
87
|
+
if (releaseLabels.length > 0) {
|
|
88
|
+
for (const label of releaseLabels) {
|
|
89
|
+
await github.rest.issues.removeLabel({
|
|
90
|
+
owner: context.repo.owner,
|
|
91
|
+
repo: context.repo.repo,
|
|
92
|
+
issue_number: issue.number,
|
|
93
|
+
name: label
|
|
94
|
+
});
|
|
95
|
+
core.info(`Removed release label from go:no issue: ${label}`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Handle release: namespace (mutual exclusivity)
|
|
102
|
+
if (appliedLabel.startsWith('release:')) {
|
|
103
|
+
const otherReleaseLabels = allLabels.filter(l =>
|
|
104
|
+
l.startsWith('release:') && l !== appliedLabel
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
if (otherReleaseLabels.length > 0) {
|
|
108
|
+
// Remove conflicting release: labels
|
|
109
|
+
for (const label of otherReleaseLabels) {
|
|
110
|
+
await github.rest.issues.removeLabel({
|
|
111
|
+
owner: context.repo.owner,
|
|
112
|
+
repo: context.repo.repo,
|
|
113
|
+
issue_number: issue.number,
|
|
114
|
+
name: label
|
|
115
|
+
});
|
|
116
|
+
core.info(`Removed conflicting label: ${label}`);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Post update comment
|
|
120
|
+
await github.rest.issues.createComment({
|
|
121
|
+
owner: context.repo.owner,
|
|
122
|
+
repo: context.repo.repo,
|
|
123
|
+
issue_number: issue.number,
|
|
124
|
+
body: `🏷️ Release target updated → \`${appliedLabel}\``
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Handle type: namespace (mutual exclusivity)
|
|
130
|
+
if (appliedLabel.startsWith('type:')) {
|
|
131
|
+
const otherTypeLabels = allLabels.filter(l =>
|
|
132
|
+
l.startsWith('type:') && l !== appliedLabel
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
if (otherTypeLabels.length > 0) {
|
|
136
|
+
for (const label of otherTypeLabels) {
|
|
137
|
+
await github.rest.issues.removeLabel({
|
|
138
|
+
owner: context.repo.owner,
|
|
139
|
+
repo: context.repo.repo,
|
|
140
|
+
issue_number: issue.number,
|
|
141
|
+
name: label
|
|
142
|
+
});
|
|
143
|
+
core.info(`Removed conflicting label: ${label}`);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
await github.rest.issues.createComment({
|
|
147
|
+
owner: context.repo.owner,
|
|
148
|
+
repo: context.repo.repo,
|
|
149
|
+
issue_number: issue.number,
|
|
150
|
+
body: `🏷️ Issue type updated → \`${appliedLabel}\``
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Handle priority: namespace (mutual exclusivity)
|
|
156
|
+
if (appliedLabel.startsWith('priority:')) {
|
|
157
|
+
const otherPriorityLabels = allLabels.filter(l =>
|
|
158
|
+
l.startsWith('priority:') && l !== appliedLabel
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
if (otherPriorityLabels.length > 0) {
|
|
162
|
+
for (const label of otherPriorityLabels) {
|
|
163
|
+
await github.rest.issues.removeLabel({
|
|
164
|
+
owner: context.repo.owner,
|
|
165
|
+
repo: context.repo.repo,
|
|
166
|
+
issue_number: issue.number,
|
|
167
|
+
name: label
|
|
168
|
+
});
|
|
169
|
+
core.info(`Removed conflicting label: ${label}`);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
await github.rest.issues.createComment({
|
|
173
|
+
owner: context.repo.owner,
|
|
174
|
+
repo: context.repo.repo,
|
|
175
|
+
issue_number: issue.number,
|
|
176
|
+
body: `🏷️ Priority updated → \`${appliedLabel}\``
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
core.info(`Label enforcement complete for ${appliedLabel}`);
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
name: Squad Preview Validation
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [preview]
|
|
6
|
-
|
|
7
|
-
permissions:
|
|
8
|
-
contents: read
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
validate:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
|
|
16
|
-
- uses: actions/setup-node@v4
|
|
17
|
-
with:
|
|
18
|
-
node-version: 22
|
|
19
|
-
|
|
20
|
-
- name: Validate version consistency
|
|
21
|
-
run: |
|
|
22
|
-
VERSION=$(node -e "console.log(require('./package.json').version)")
|
|
23
|
-
if ! grep -q "## \[$VERSION\]" CHANGELOG.md 2>/dev/null; then
|
|
24
|
-
echo "::error::Version $VERSION not found in CHANGELOG.md — update CHANGELOG.md before release"
|
|
25
|
-
exit 1
|
|
26
|
-
fi
|
|
27
|
-
echo "✅ Version $VERSION validated in CHANGELOG.md"
|
|
28
|
-
|
|
29
|
-
- name: Run tests
|
|
30
|
-
run: node --test test/*.test.js
|
|
31
|
-
|
|
32
|
-
- name: Check no .ai-team/ or .squad/ files are tracked
|
|
33
|
-
run: |
|
|
34
|
-
FOUND_FORBIDDEN=0
|
|
35
|
-
if git ls-files --error-unmatch .ai-team/ 2>/dev/null; then
|
|
36
|
-
echo "::error::❌ .ai-team/ files are tracked on preview — this must not ship."
|
|
37
|
-
FOUND_FORBIDDEN=1
|
|
38
|
-
fi
|
|
39
|
-
if git ls-files --error-unmatch .squad/ 2>/dev/null; then
|
|
40
|
-
echo "::error::❌ .squad/ files are tracked on preview — this must not ship."
|
|
41
|
-
FOUND_FORBIDDEN=1
|
|
42
|
-
fi
|
|
43
|
-
if [ $FOUND_FORBIDDEN -eq 1 ]; then
|
|
44
|
-
exit 1
|
|
45
|
-
fi
|
|
46
|
-
echo "✅ No .ai-team/ or .squad/ files tracked — clean for release."
|
|
47
|
-
|
|
48
|
-
- name: Validate package.json version
|
|
49
|
-
run: |
|
|
50
|
-
VERSION=$(node -e "console.log(require('./package.json').version)")
|
|
51
|
-
if [ -z "$VERSION" ]; then
|
|
52
|
-
echo "::error::❌ No version field found in package.json."
|
|
53
|
-
exit 1
|
|
54
|
-
fi
|
|
55
|
-
echo "✅ package.json version: $VERSION"
|
|
1
|
+
name: Squad Preview Validation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [preview]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
validate:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- uses: actions/setup-node@v4
|
|
17
|
+
with:
|
|
18
|
+
node-version: 22
|
|
19
|
+
|
|
20
|
+
- name: Validate version consistency
|
|
21
|
+
run: |
|
|
22
|
+
VERSION=$(node -e "console.log(require('./package.json').version)")
|
|
23
|
+
if ! grep -q "## \[$VERSION\]" CHANGELOG.md 2>/dev/null; then
|
|
24
|
+
echo "::error::Version $VERSION not found in CHANGELOG.md — update CHANGELOG.md before release"
|
|
25
|
+
exit 1
|
|
26
|
+
fi
|
|
27
|
+
echo "✅ Version $VERSION validated in CHANGELOG.md"
|
|
28
|
+
|
|
29
|
+
- name: Run tests
|
|
30
|
+
run: node --test test/*.test.js
|
|
31
|
+
|
|
32
|
+
- name: Check no .ai-team/ or .squad/ files are tracked
|
|
33
|
+
run: |
|
|
34
|
+
FOUND_FORBIDDEN=0
|
|
35
|
+
if git ls-files --error-unmatch .ai-team/ 2>/dev/null; then
|
|
36
|
+
echo "::error::❌ .ai-team/ files are tracked on preview — this must not ship."
|
|
37
|
+
FOUND_FORBIDDEN=1
|
|
38
|
+
fi
|
|
39
|
+
if git ls-files --error-unmatch .squad/ 2>/dev/null; then
|
|
40
|
+
echo "::error::❌ .squad/ files are tracked on preview — this must not ship."
|
|
41
|
+
FOUND_FORBIDDEN=1
|
|
42
|
+
fi
|
|
43
|
+
if [ $FOUND_FORBIDDEN -eq 1 ]; then
|
|
44
|
+
exit 1
|
|
45
|
+
fi
|
|
46
|
+
echo "✅ No .ai-team/ or .squad/ files tracked — clean for release."
|
|
47
|
+
|
|
48
|
+
- name: Validate package.json version
|
|
49
|
+
run: |
|
|
50
|
+
VERSION=$(node -e "console.log(require('./package.json').version)")
|
|
51
|
+
if [ -z "$VERSION" ]; then
|
|
52
|
+
echo "::error::❌ No version field found in package.json."
|
|
53
|
+
exit 1
|
|
54
|
+
fi
|
|
55
|
+
echo "✅ package.json version: $VERSION"
|