@formigio/fazemos-cli 0.10.17 → 0.10.20
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/dist/dispatch.d.ts +108 -6
- package/dist/dispatch.js +135 -8
- package/dist/dispatch.js.map +1 -1
- package/dist/index.js +296 -35
- package/dist/index.js.map +1 -1
- package/dist/wait-for-pipeline.d.ts +120 -0
- package/dist/wait-for-pipeline.js +337 -0
- package/dist/wait-for-pipeline.js.map +1 -0
- package/package.json +1 -1
package/dist/dispatch.d.ts
CHANGED
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
* `fazemos dispatch` — write an inbox file for a role and notify any
|
|
3
3
|
* configured human-filled recipient via the API.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* F26 data flow (API write-through, Dex S-B):
|
|
6
6
|
*
|
|
7
7
|
* CLI invocation
|
|
8
8
|
* ↓ resolve recipient via .fazemos/roles.json
|
|
9
|
-
* ↓
|
|
10
|
-
* ↓
|
|
11
|
-
* ↓
|
|
12
|
-
*
|
|
13
|
-
*
|
|
9
|
+
* ↓ POST /api/dispatches (API writes DB row + fires fan-out + returns file_path)
|
|
10
|
+
* ↓ CLI writes inbox file at the returned file_path
|
|
11
|
+
* ↓ --commit git-adds the file (same as before)
|
|
12
|
+
*
|
|
13
|
+
* Legacy / degraded mode (--file-only):
|
|
14
|
+
* Skips the API call and writes only the local file (original behavior).
|
|
15
|
+
* Used by not-yet-migrated playbooks and offline work.
|
|
14
16
|
*
|
|
15
17
|
* Workspaces have `.fazemos/roles.json` registries. The CLI walks up from
|
|
16
18
|
* cwd to find the local registry, then can hop to other workspaces via
|
|
@@ -24,6 +26,11 @@ export interface RoleEntry {
|
|
|
24
26
|
filler: {
|
|
25
27
|
type: 'human' | 'agent';
|
|
26
28
|
identity: string;
|
|
29
|
+
/** F26 (Dex M2): REQUIRED for human fillers; the Cognito sub that maps
|
|
30
|
+
* to the user's inbox. Used by `fazemos roles sync` to seed
|
|
31
|
+
* role_registrations.user_id. */
|
|
32
|
+
cognito_sub?: string;
|
|
33
|
+
email?: string;
|
|
27
34
|
};
|
|
28
35
|
subagent: string | null;
|
|
29
36
|
inbox: string;
|
|
@@ -81,6 +88,17 @@ export declare function buildInboxFile(input: DispatchInput): {
|
|
|
81
88
|
summary: string;
|
|
82
89
|
};
|
|
83
90
|
export declare function writeInboxFile(workspaceRoot: string, role: RoleEntry, fileName: string, content: string): string;
|
|
91
|
+
/**
|
|
92
|
+
* Write an inbox file at an explicit path returned by the API (Dex S-B).
|
|
93
|
+
* The API computes file_path; the CLI writes the actual file at that path.
|
|
94
|
+
* Creates parent directories as needed.
|
|
95
|
+
*
|
|
96
|
+
* Security: the API-returned `file_path` is untrusted input. We resolve it
|
|
97
|
+
* against the workspace root and reject any path that escapes the workspace
|
|
98
|
+
* (via `../` traversal or an absolute path such as `/etc/cron.d/payload`)
|
|
99
|
+
* before writing. Ported from the F26 CLI-step fix (0628d39).
|
|
100
|
+
*/
|
|
101
|
+
export declare function writeInboxFileAtPath(workspaceRoot: string, relativePath: string, content: string): string;
|
|
84
102
|
export interface NotificationPayload {
|
|
85
103
|
to_role: string;
|
|
86
104
|
to_filler_type: 'human' | 'agent';
|
|
@@ -93,4 +111,88 @@ export interface NotificationPayload {
|
|
|
93
111
|
source: 'cli';
|
|
94
112
|
}
|
|
95
113
|
export declare function buildNotificationPayload(input: DispatchInput, role: RoleEntry, fileRef: string, summary: string): NotificationPayload;
|
|
114
|
+
export interface CreateDispatchRequest {
|
|
115
|
+
to: string;
|
|
116
|
+
from: string;
|
|
117
|
+
type: string;
|
|
118
|
+
priority?: string;
|
|
119
|
+
body: string;
|
|
120
|
+
thread_id?: string | null;
|
|
121
|
+
re?: string[] | null;
|
|
122
|
+
expires_at?: string | null;
|
|
123
|
+
no_notify?: boolean;
|
|
124
|
+
source: 'cli' | 'agent' | 'api' | 'migration';
|
|
125
|
+
}
|
|
126
|
+
export interface CreateDispatchResponse {
|
|
127
|
+
id: string;
|
|
128
|
+
thread_id: string;
|
|
129
|
+
org_id: string;
|
|
130
|
+
project_id: string | null;
|
|
131
|
+
from_role: string;
|
|
132
|
+
to_role: string;
|
|
133
|
+
type: string;
|
|
134
|
+
priority: string;
|
|
135
|
+
status: string;
|
|
136
|
+
body: string;
|
|
137
|
+
summary: string;
|
|
138
|
+
refs: Array<{
|
|
139
|
+
token: string;
|
|
140
|
+
kind: string;
|
|
141
|
+
url: string | null;
|
|
142
|
+
resolved: boolean;
|
|
143
|
+
unverified?: boolean;
|
|
144
|
+
}>;
|
|
145
|
+
escalated_from: string | null;
|
|
146
|
+
source: string;
|
|
147
|
+
file_path: string | null;
|
|
148
|
+
created_at: string;
|
|
149
|
+
updated_at: string;
|
|
150
|
+
read_at: string | null;
|
|
151
|
+
actioned_at: string | null;
|
|
152
|
+
deferred_until: string | null;
|
|
153
|
+
expires_at: string | null;
|
|
154
|
+
}
|
|
155
|
+
export interface RoleSyncEntry {
|
|
156
|
+
role_slug: string;
|
|
157
|
+
filler_type: 'human' | 'agent';
|
|
158
|
+
filler_identity: string;
|
|
159
|
+
cognito_sub?: string | null;
|
|
160
|
+
scope: 'org' | 'project';
|
|
161
|
+
org_id?: string | null;
|
|
162
|
+
project_id?: string | null;
|
|
163
|
+
notification?: RoleNotification | null;
|
|
164
|
+
}
|
|
165
|
+
export interface RoleSyncPayload {
|
|
166
|
+
workspace: string;
|
|
167
|
+
roles: RoleSyncEntry[];
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Build the roles sync payload from a registry (and optionally from cross-
|
|
171
|
+
* workspace refs for human roles like founder).
|
|
172
|
+
*
|
|
173
|
+
* Validates that human fillers have cognito_sub set (Dex M2 — fail loud).
|
|
174
|
+
* Throws with a clear message if any human filler is missing it.
|
|
175
|
+
*/
|
|
176
|
+
export declare function buildRolesSyncPayload(registry: RolesRegistry, orgId: string | null, projectId?: string | null): RoleSyncPayload;
|
|
177
|
+
export interface BackfillResult {
|
|
178
|
+
imported: number;
|
|
179
|
+
skipped_already_imported: number;
|
|
180
|
+
skipped_processed: number;
|
|
181
|
+
errors: string[];
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Compute a stable content hash for a dispatch file (for idempotency).
|
|
185
|
+
*/
|
|
186
|
+
export declare function computeFileHash(content: string): string;
|
|
187
|
+
/**
|
|
188
|
+
* Find all unprocessed inbox files in a role's inbox directory.
|
|
189
|
+
* Returns files in roles/{role}/inbox/ that are NOT in roles/{role}/processed/.
|
|
190
|
+
* Skips subdirectories named 'processed'.
|
|
191
|
+
*/
|
|
192
|
+
export declare function findUnprocessedInboxFiles(workspaceRoot: string, rolesDir?: string): Array<{
|
|
193
|
+
rolePath: string;
|
|
194
|
+
filePath: string;
|
|
195
|
+
relativePath: string;
|
|
196
|
+
content: string;
|
|
197
|
+
}>;
|
|
96
198
|
export declare function gitCommitInboxFile(workspaceRoot: string, relativePath: string, message: string): void;
|
package/dist/dispatch.js
CHANGED
|
@@ -2,24 +2,27 @@
|
|
|
2
2
|
* `fazemos dispatch` — write an inbox file for a role and notify any
|
|
3
3
|
* configured human-filled recipient via the API.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* F26 data flow (API write-through, Dex S-B):
|
|
6
6
|
*
|
|
7
7
|
* CLI invocation
|
|
8
8
|
* ↓ resolve recipient via .fazemos/roles.json
|
|
9
|
-
* ↓
|
|
10
|
-
* ↓
|
|
11
|
-
* ↓
|
|
12
|
-
*
|
|
13
|
-
*
|
|
9
|
+
* ↓ POST /api/dispatches (API writes DB row + fires fan-out + returns file_path)
|
|
10
|
+
* ↓ CLI writes inbox file at the returned file_path
|
|
11
|
+
* ↓ --commit git-adds the file (same as before)
|
|
12
|
+
*
|
|
13
|
+
* Legacy / degraded mode (--file-only):
|
|
14
|
+
* Skips the API call and writes only the local file (original behavior).
|
|
15
|
+
* Used by not-yet-migrated playbooks and offline work.
|
|
14
16
|
*
|
|
15
17
|
* Workspaces have `.fazemos/roles.json` registries. The CLI walks up from
|
|
16
18
|
* cwd to find the local registry, then can hop to other workspaces via
|
|
17
19
|
* the `cross_workspace_roles` block.
|
|
18
20
|
*/
|
|
19
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
|
|
20
|
-
import { dirname, join, resolve as resolvePath } from 'path';
|
|
21
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync, readdirSync, statSync } from 'fs';
|
|
22
|
+
import { dirname, join, resolve as resolvePath, relative } from 'path';
|
|
21
23
|
import { homedir } from 'os';
|
|
22
24
|
import { execSync } from 'child_process';
|
|
25
|
+
import crypto from 'crypto';
|
|
23
26
|
// ── Registry loading ────────────────────────────────────────────
|
|
24
27
|
/**
|
|
25
28
|
* Walk up from `startDir` looking for a `.fazemos/roles.json`. Returns the
|
|
@@ -142,6 +145,30 @@ export function writeInboxFile(workspaceRoot, role, fileName, content) {
|
|
|
142
145
|
writeFileSync(fullPath, content, 'utf-8');
|
|
143
146
|
return fullPath;
|
|
144
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* Write an inbox file at an explicit path returned by the API (Dex S-B).
|
|
150
|
+
* The API computes file_path; the CLI writes the actual file at that path.
|
|
151
|
+
* Creates parent directories as needed.
|
|
152
|
+
*
|
|
153
|
+
* Security: the API-returned `file_path` is untrusted input. We resolve it
|
|
154
|
+
* against the workspace root and reject any path that escapes the workspace
|
|
155
|
+
* (via `../` traversal or an absolute path such as `/etc/cron.d/payload`)
|
|
156
|
+
* before writing. Ported from the F26 CLI-step fix (0628d39).
|
|
157
|
+
*/
|
|
158
|
+
export function writeInboxFileAtPath(workspaceRoot, relativePath, content) {
|
|
159
|
+
const resolvedRoot = resolvePath(workspaceRoot);
|
|
160
|
+
const fullPath = resolvePath(relativePath.startsWith('/') ? relativePath : join(resolvedRoot, relativePath));
|
|
161
|
+
// Guard against path traversal: the final path must be inside workspaceRoot.
|
|
162
|
+
if (!fullPath.startsWith(resolvedRoot + '/') && fullPath !== resolvedRoot) {
|
|
163
|
+
throw new Error(`Security: resolved path "${fullPath}" is outside workspace root "${resolvedRoot}"`);
|
|
164
|
+
}
|
|
165
|
+
const dir = dirname(fullPath);
|
|
166
|
+
if (!existsSync(dir)) {
|
|
167
|
+
mkdirSync(dir, { recursive: true });
|
|
168
|
+
}
|
|
169
|
+
writeFileSync(fullPath, content, 'utf-8');
|
|
170
|
+
return fullPath;
|
|
171
|
+
}
|
|
145
172
|
export function buildNotificationPayload(input, role, fileRef, summary) {
|
|
146
173
|
return {
|
|
147
174
|
to_role: input.to,
|
|
@@ -155,6 +182,106 @@ export function buildNotificationPayload(input, role, fileRef, summary) {
|
|
|
155
182
|
source: 'cli',
|
|
156
183
|
};
|
|
157
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* Build the roles sync payload from a registry (and optionally from cross-
|
|
187
|
+
* workspace refs for human roles like founder).
|
|
188
|
+
*
|
|
189
|
+
* Validates that human fillers have cognito_sub set (Dex M2 — fail loud).
|
|
190
|
+
* Throws with a clear message if any human filler is missing it.
|
|
191
|
+
*/
|
|
192
|
+
export function buildRolesSyncPayload(registry, orgId, projectId) {
|
|
193
|
+
const roles = [];
|
|
194
|
+
const missingSubErrors = [];
|
|
195
|
+
for (const [slug, role] of Object.entries(registry.roles)) {
|
|
196
|
+
if (role.filler.type === 'human' && !role.filler.cognito_sub) {
|
|
197
|
+
missingSubErrors.push(slug);
|
|
198
|
+
}
|
|
199
|
+
roles.push({
|
|
200
|
+
role_slug: slug,
|
|
201
|
+
filler_type: role.filler.type,
|
|
202
|
+
filler_identity: role.filler.identity,
|
|
203
|
+
cognito_sub: role.filler.type === 'human' ? (role.filler.cognito_sub ?? null) : null,
|
|
204
|
+
scope: role.scope,
|
|
205
|
+
org_id: orgId,
|
|
206
|
+
project_id: projectId ?? null,
|
|
207
|
+
notification: role.notification ?? null,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
// Also handle cross-workspace roles (e.g., founder in JJ workspace)
|
|
211
|
+
if (registry.cross_workspace_roles) {
|
|
212
|
+
for (const [slug, xref] of Object.entries(registry.cross_workspace_roles)) {
|
|
213
|
+
const remote = loadRegistryAt(xref.workspace_path);
|
|
214
|
+
if (remote && remote.roles[slug]) {
|
|
215
|
+
const role = remote.roles[slug];
|
|
216
|
+
if (role.filler.type === 'human' && !role.filler.cognito_sub) {
|
|
217
|
+
missingSubErrors.push(`${slug} (from ${xref.workspace_path})`);
|
|
218
|
+
}
|
|
219
|
+
roles.push({
|
|
220
|
+
role_slug: slug,
|
|
221
|
+
filler_type: role.filler.type,
|
|
222
|
+
filler_identity: role.filler.identity,
|
|
223
|
+
cognito_sub: role.filler.type === 'human' ? (role.filler.cognito_sub ?? null) : null,
|
|
224
|
+
scope: role.scope,
|
|
225
|
+
org_id: orgId,
|
|
226
|
+
project_id: projectId ?? null,
|
|
227
|
+
notification: role.notification ?? null,
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (missingSubErrors.length > 0) {
|
|
233
|
+
throw new Error(`Human filler(s) missing cognito_sub in roles.json — cannot sync inbox mapping:\n` +
|
|
234
|
+
missingSubErrors.map(s => ` - ${s}`).join('\n') + '\n' +
|
|
235
|
+
`Add cognito_sub to each human filler block in roles.json and re-run fazemos roles sync.\n` +
|
|
236
|
+
`(Tip: find your Cognito sub at /auth/me → user.id)`);
|
|
237
|
+
}
|
|
238
|
+
return { workspace: registry.workspace, roles };
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Compute a stable content hash for a dispatch file (for idempotency).
|
|
242
|
+
*/
|
|
243
|
+
export function computeFileHash(content) {
|
|
244
|
+
return crypto.createHash('sha256').update(content, 'utf-8').digest('hex').slice(0, 16);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Find all unprocessed inbox files in a role's inbox directory.
|
|
248
|
+
* Returns files in roles/{role}/inbox/ that are NOT in roles/{role}/processed/.
|
|
249
|
+
* Skips subdirectories named 'processed'.
|
|
250
|
+
*/
|
|
251
|
+
export function findUnprocessedInboxFiles(workspaceRoot, rolesDir = 'roles') {
|
|
252
|
+
const results = [];
|
|
253
|
+
const rolesAbsDir = join(workspaceRoot, rolesDir);
|
|
254
|
+
if (!existsSync(rolesAbsDir))
|
|
255
|
+
return results;
|
|
256
|
+
for (const roleName of readdirSync(rolesAbsDir)) {
|
|
257
|
+
const roleDir = join(rolesAbsDir, roleName);
|
|
258
|
+
if (!statSync(roleDir).isDirectory())
|
|
259
|
+
continue;
|
|
260
|
+
const inboxDir = join(roleDir, 'inbox');
|
|
261
|
+
if (!existsSync(inboxDir))
|
|
262
|
+
continue;
|
|
263
|
+
for (const fileName of readdirSync(inboxDir)) {
|
|
264
|
+
if (!fileName.endsWith('.md'))
|
|
265
|
+
continue;
|
|
266
|
+
const filePath = join(inboxDir, fileName);
|
|
267
|
+
if (!statSync(filePath).isFile())
|
|
268
|
+
continue;
|
|
269
|
+
// Skip if in processed/ subdirectory (already actioned)
|
|
270
|
+
const processedDir = join(roleDir, 'processed');
|
|
271
|
+
const processedPath = join(processedDir, fileName);
|
|
272
|
+
if (existsSync(processedPath))
|
|
273
|
+
continue;
|
|
274
|
+
const content = readFileSync(filePath, 'utf-8');
|
|
275
|
+
results.push({
|
|
276
|
+
rolePath: roleName,
|
|
277
|
+
filePath,
|
|
278
|
+
relativePath: relative(workspaceRoot, filePath),
|
|
279
|
+
content,
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return results;
|
|
284
|
+
}
|
|
158
285
|
// ── Optional git add + commit ───────────────────────────────────
|
|
159
286
|
export function gitCommitInboxFile(workspaceRoot, relativePath, message) {
|
|
160
287
|
try {
|
package/dist/dispatch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.js","sourceRoot":"","sources":["../src/dispatch.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"dispatch.js","sourceRoot":"","sources":["../src/dispatch.ts"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