@sellable/mcp 0.1.549 → 0.1.551
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/agents/registry.json +2 -2
- package/dist/api.js +6 -3
- package/dist/auth.d.ts +6 -0
- package/dist/auth.js +44 -2
- package/dist/index-dev.js +0 -0
- package/dist/index.js +0 -0
- package/dist/refill-date-window.d.ts +34 -0
- package/dist/refill-date-window.js +210 -0
- package/dist/tools/auth.d.ts +5 -0
- package/dist/tools/auth.js +49 -12
- package/dist/tools/campaigns.js +2 -2
- package/dist/tools/csv-dnc.js +2 -2
- package/dist/tools/model-quality.js +6 -4
- package/dist/tools/prompts.js +6 -6
- package/dist/tools/refill-sends-evergreen.d.ts +28 -0
- package/dist/tools/refill-sends-evergreen.js +47 -0
- package/dist/tools/setup-evergreen-campaigns.js +1 -1
- package/dist/tools/workspace-context.d.ts +1 -1
- package/dist/tools/workspace-context.js +8 -3
- package/dist/tools/workspace-export.js +2 -2
- package/dist/tools/workspaces.d.ts +48 -2
- package/dist/tools/workspaces.js +48 -5
- package/package.json +1 -1
- package/skills/create-campaign/SKILL.md +3 -3
- package/skills/create-campaign-v2/SKILL.md +1 -1
- package/skills/create-evergreen-campaigns/SKILL.md +16 -16
package/agents/registry.json
CHANGED
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"ownership": "message strategy, proof inventory, token rules, skeptical-prospect review, and selected winner only",
|
|
27
27
|
"codex": {
|
|
28
28
|
"description": "Message Drafting worker for campaign-backed template proposals after confirm_lead_list imports a non-empty bounded review batch.",
|
|
29
|
-
"model": "gpt-5.
|
|
30
|
-
"modelReasoningEffort": "
|
|
29
|
+
"model": "gpt-5.6-sol",
|
|
30
|
+
"modelReasoningEffort": "high",
|
|
31
31
|
"sandboxMode": "read-only",
|
|
32
32
|
"nicknameCandidates": [
|
|
33
33
|
"Message Drafting",
|
package/dist/api.js
CHANGED
|
@@ -3,7 +3,7 @@ import { mkdir, rename, rm, stat } from "node:fs/promises";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { Readable } from "node:stream";
|
|
5
5
|
import { pipeline } from "node:stream/promises";
|
|
6
|
-
import { getConfig, getConfigPath } from "./auth.js";
|
|
6
|
+
import { getConfig, getConfigPath, getEffectiveConfiguredWorkspaceId, resolveWorkspaceIdForRequest, } from "./auth.js";
|
|
7
7
|
export class SellableApiError extends Error {
|
|
8
8
|
status;
|
|
9
9
|
body;
|
|
@@ -42,9 +42,12 @@ export class SellableApi {
|
|
|
42
42
|
// Re-read config on every request so workspace switches take effect immediately
|
|
43
43
|
const config = getConfig();
|
|
44
44
|
const url = `${config.apiUrl}${path}`;
|
|
45
|
-
const
|
|
45
|
+
const requestedWorkspaceId = options && Object.prototype.hasOwnProperty.call(options, "workspaceId")
|
|
46
46
|
? options.workspaceId
|
|
47
|
-
: config
|
|
47
|
+
: getEffectiveConfiguredWorkspaceId(config);
|
|
48
|
+
const workspaceId = options && Object.prototype.hasOwnProperty.call(options, "workspaceId")
|
|
49
|
+
? resolveWorkspaceIdForRequest(requestedWorkspaceId, `${method} ${path}`)
|
|
50
|
+
: requestedWorkspaceId;
|
|
48
51
|
const response = await fetch(url, {
|
|
49
52
|
method,
|
|
50
53
|
headers: {
|
package/dist/auth.d.ts
CHANGED
|
@@ -40,6 +40,12 @@ export type SkillState = {
|
|
|
40
40
|
export declare function setConfigFile(fileName: string): void;
|
|
41
41
|
export declare function getResolvedConfigsDir(): string | null;
|
|
42
42
|
export declare function getConfigPath(): string;
|
|
43
|
+
export declare function getLockedWorkspaceId(): string | null;
|
|
44
|
+
export declare function isWorkspaceLockRequired(): boolean;
|
|
45
|
+
export declare function workspaceLockRequiredMessage(action?: string): string;
|
|
46
|
+
export declare function assertWorkspaceLockSatisfied(action?: string): void;
|
|
47
|
+
export declare function getEffectiveConfiguredWorkspaceId(config: Pick<SellableConfig, "activeWorkspaceId" | "workspaceId">): string | null;
|
|
48
|
+
export declare function resolveWorkspaceIdForRequest(requestedWorkspaceId: string | null | undefined, action?: string): string | null;
|
|
43
49
|
export declare function getConfig(): SellableConfig;
|
|
44
50
|
export declare function updateActiveWorkspace(params: {
|
|
45
51
|
workspaceId: string;
|
package/dist/auth.js
CHANGED
|
@@ -2,6 +2,8 @@ import * as fs from "fs";
|
|
|
2
2
|
import * as os from "os";
|
|
3
3
|
import * as path from "path";
|
|
4
4
|
const DEFAULT_API_URL = "https://app.sellable.dev";
|
|
5
|
+
const WORKSPACE_LOCK_ENV = "SELLABLE_LOCK_WORKSPACE_ID";
|
|
6
|
+
const REQUIRE_WORKSPACE_LOCK_ENV = "SELLABLE_REQUIRE_WORKSPACE_LOCK";
|
|
5
7
|
// No caching — re-read config on every call so token/workspace changes
|
|
6
8
|
// made by the LLM (editing sellable.json) take effect immediately
|
|
7
9
|
// without requiring an MCP server restart.
|
|
@@ -85,6 +87,44 @@ function normalizeConfig(raw) {
|
|
|
85
87
|
apiUrl: raw.apiUrl || DEFAULT_API_URL,
|
|
86
88
|
};
|
|
87
89
|
}
|
|
90
|
+
export function getLockedWorkspaceId() {
|
|
91
|
+
const value = process.env[WORKSPACE_LOCK_ENV]?.trim();
|
|
92
|
+
return value || null;
|
|
93
|
+
}
|
|
94
|
+
export function isWorkspaceLockRequired() {
|
|
95
|
+
const value = process.env[REQUIRE_WORKSPACE_LOCK_ENV]?.trim().toLowerCase();
|
|
96
|
+
return value === "1" || value === "true" || value === "yes";
|
|
97
|
+
}
|
|
98
|
+
export function workspaceLockRequiredMessage(action = "Sellable request") {
|
|
99
|
+
return (`Workspace lock required: ${action} cannot run because ` +
|
|
100
|
+
`${REQUIRE_WORKSPACE_LOCK_ENV}=1 but ${WORKSPACE_LOCK_ENV} is missing. ` +
|
|
101
|
+
"Ask the sellable-admin profile to provision this customer profile with an approved customer workspace.");
|
|
102
|
+
}
|
|
103
|
+
export function assertWorkspaceLockSatisfied(action = "Sellable request") {
|
|
104
|
+
if (isWorkspaceLockRequired() && !getLockedWorkspaceId()) {
|
|
105
|
+
throw new Error(workspaceLockRequiredMessage(action));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function normalizeWorkspaceId(value) {
|
|
109
|
+
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
110
|
+
}
|
|
111
|
+
export function getEffectiveConfiguredWorkspaceId(config) {
|
|
112
|
+
assertWorkspaceLockSatisfied("workspace resolution");
|
|
113
|
+
return (getLockedWorkspaceId() ||
|
|
114
|
+
normalizeWorkspaceId(config.activeWorkspaceId) ||
|
|
115
|
+
normalizeWorkspaceId(config.workspaceId));
|
|
116
|
+
}
|
|
117
|
+
export function resolveWorkspaceIdForRequest(requestedWorkspaceId, action = "Sellable request") {
|
|
118
|
+
assertWorkspaceLockSatisfied(action);
|
|
119
|
+
const lockedWorkspaceId = getLockedWorkspaceId();
|
|
120
|
+
const requested = normalizeWorkspaceId(requestedWorkspaceId);
|
|
121
|
+
if (!lockedWorkspaceId)
|
|
122
|
+
return requested;
|
|
123
|
+
if (requested && requested !== lockedWorkspaceId) {
|
|
124
|
+
throw new Error(`Workspace lock violation: ${action} requested workspace ${requested}, but this profile is locked to ${lockedWorkspaceId}.`);
|
|
125
|
+
}
|
|
126
|
+
return lockedWorkspaceId;
|
|
127
|
+
}
|
|
88
128
|
export function getConfig() {
|
|
89
129
|
// Config cache removed 2026-05-04: we always re-read from disk so
|
|
90
130
|
// workspace switches (set_active_workspace) take effect immediately
|
|
@@ -139,6 +179,7 @@ export function getConfig() {
|
|
|
139
179
|
}
|
|
140
180
|
}
|
|
141
181
|
export function updateActiveWorkspace(params) {
|
|
182
|
+
resolveWorkspaceIdForRequest(params.workspaceId, "set_active_workspace");
|
|
142
183
|
const configPath = getConfigPath();
|
|
143
184
|
const configDir = path.dirname(configPath);
|
|
144
185
|
if (!fs.existsSync(configDir)) {
|
|
@@ -226,6 +267,7 @@ function writeRawConfigFile(configPath, raw) {
|
|
|
226
267
|
* new config without an MCP server restart.
|
|
227
268
|
*/
|
|
228
269
|
export function writeNewConfig(opts) {
|
|
270
|
+
resolveWorkspaceIdForRequest(opts.activeWorkspaceId, "write Sellable auth config");
|
|
229
271
|
const configPath = getConfigWritePath();
|
|
230
272
|
let raw = {};
|
|
231
273
|
if (fs.existsSync(configPath)) {
|
|
@@ -283,7 +325,7 @@ function getActiveEnvConfigRef(raw) {
|
|
|
283
325
|
}
|
|
284
326
|
export function getEngageState() {
|
|
285
327
|
const config = getConfig();
|
|
286
|
-
const workspaceId = config
|
|
328
|
+
const workspaceId = getEffectiveConfiguredWorkspaceId(config);
|
|
287
329
|
if (!workspaceId) {
|
|
288
330
|
return { activeWorkspaceId: null, state: null };
|
|
289
331
|
}
|
|
@@ -294,7 +336,7 @@ export function updateEngageState(patch) {
|
|
|
294
336
|
const { configPath, raw } = readRawConfigFile();
|
|
295
337
|
const { envConfig, set } = getActiveEnvConfigRef(raw);
|
|
296
338
|
const normalized = normalizeConfig(envConfig);
|
|
297
|
-
const workspaceId = normalized
|
|
339
|
+
const workspaceId = getEffectiveConfiguredWorkspaceId(normalized);
|
|
298
340
|
if (!workspaceId) {
|
|
299
341
|
throw new Error("No active workspace selected. Run list_workspaces then set_active_workspace.");
|
|
300
342
|
}
|
package/dist/index-dev.js
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type RefillDateWindowSource = "default_scheduler_forward" | "horizon_send_days" | "until_date" | "target_date";
|
|
2
|
+
export type NormalizedRefillDateSelector = {
|
|
3
|
+
source: RefillDateWindowSource;
|
|
4
|
+
targetDate: string | null;
|
|
5
|
+
untilDate: string | null;
|
|
6
|
+
horizonSendDays: number | null;
|
|
7
|
+
};
|
|
8
|
+
export type RefillRunDateWindow = NormalizedRefillDateSelector & {
|
|
9
|
+
version: 1;
|
|
10
|
+
selectedDates: string[];
|
|
11
|
+
senderWindows?: Array<{
|
|
12
|
+
senderId: string | null;
|
|
13
|
+
timeZone: string | null;
|
|
14
|
+
selectedDates: string[];
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
type DateSelectorInput = {
|
|
18
|
+
targetDate?: unknown;
|
|
19
|
+
untilDate?: unknown;
|
|
20
|
+
horizonSendDays?: unknown;
|
|
21
|
+
};
|
|
22
|
+
export declare function normalizeRefillDateSelector(input: DateSelectorInput): NormalizedRefillDateSelector;
|
|
23
|
+
export declare function refillDateSelectorBody(selector: NormalizedRefillDateSelector): {
|
|
24
|
+
targetDate?: string;
|
|
25
|
+
untilDate?: string;
|
|
26
|
+
horizonSendDays?: number;
|
|
27
|
+
};
|
|
28
|
+
export declare function dateWindowFromSelector(selector: NormalizedRefillDateSelector): RefillRunDateWindow;
|
|
29
|
+
export declare function dateWindowFromPlan(plan: Record<string, unknown>, selector: NormalizedRefillDateSelector): RefillRunDateWindow;
|
|
30
|
+
export declare function dateWindowFromRunState(runState: unknown): RefillRunDateWindow | null;
|
|
31
|
+
export declare function selectorFromDateWindow(window: RefillRunDateWindow): NormalizedRefillDateSelector;
|
|
32
|
+
export declare function dateSelectorMatchesWindow(selector: NormalizedRefillDateSelector, window: RefillRunDateWindow): boolean;
|
|
33
|
+
export declare function schedulerSweepTargetDates(window: RefillRunDateWindow): string[];
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
function isRecord(value) {
|
|
2
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
3
|
+
}
|
|
4
|
+
function stringValue(value) {
|
|
5
|
+
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
6
|
+
}
|
|
7
|
+
function numberValue(value) {
|
|
8
|
+
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
9
|
+
}
|
|
10
|
+
function arrayValue(value) {
|
|
11
|
+
return Array.isArray(value) ? value : [];
|
|
12
|
+
}
|
|
13
|
+
function isValidDateKey(value) {
|
|
14
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(value))
|
|
15
|
+
return false;
|
|
16
|
+
const [year, month, day] = value.split("-").map(Number);
|
|
17
|
+
const date = new Date(Date.UTC(year, month - 1, day));
|
|
18
|
+
return (date.getUTCFullYear() === year &&
|
|
19
|
+
date.getUTCMonth() === month - 1 &&
|
|
20
|
+
date.getUTCDate() === day);
|
|
21
|
+
}
|
|
22
|
+
function normalizeDateKey(value, field) {
|
|
23
|
+
if (value === undefined || value === null || value === "")
|
|
24
|
+
return null;
|
|
25
|
+
if (typeof value !== "string") {
|
|
26
|
+
throw new Error(`${field} must be a string in YYYY-MM-DD format.`);
|
|
27
|
+
}
|
|
28
|
+
const trimmed = value.trim();
|
|
29
|
+
if (!isValidDateKey(trimmed)) {
|
|
30
|
+
throw new Error(`${field} must be a valid YYYY-MM-DD calendar date.`);
|
|
31
|
+
}
|
|
32
|
+
return trimmed;
|
|
33
|
+
}
|
|
34
|
+
function normalizeHorizonSendDays(value) {
|
|
35
|
+
if (value === undefined)
|
|
36
|
+
return null;
|
|
37
|
+
if (typeof value !== "number" ||
|
|
38
|
+
!Number.isInteger(value) ||
|
|
39
|
+
value < 1 ||
|
|
40
|
+
value > 7) {
|
|
41
|
+
throw new Error("horizonSendDays must be an integer between 1 and 7.");
|
|
42
|
+
}
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
export function normalizeRefillDateSelector(input) {
|
|
46
|
+
const targetDate = normalizeDateKey(input.targetDate, "targetDate");
|
|
47
|
+
const untilDate = normalizeDateKey(input.untilDate, "untilDate");
|
|
48
|
+
const horizonSendDays = normalizeHorizonSendDays(input.horizonSendDays);
|
|
49
|
+
if (targetDate) {
|
|
50
|
+
return {
|
|
51
|
+
source: "target_date",
|
|
52
|
+
targetDate,
|
|
53
|
+
untilDate: null,
|
|
54
|
+
horizonSendDays: null,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
if (untilDate) {
|
|
58
|
+
return {
|
|
59
|
+
source: "until_date",
|
|
60
|
+
targetDate: null,
|
|
61
|
+
untilDate,
|
|
62
|
+
horizonSendDays: null,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
if (horizonSendDays !== null) {
|
|
66
|
+
return {
|
|
67
|
+
source: "horizon_send_days",
|
|
68
|
+
targetDate: null,
|
|
69
|
+
untilDate: null,
|
|
70
|
+
horizonSendDays,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
source: "default_scheduler_forward",
|
|
75
|
+
targetDate: null,
|
|
76
|
+
untilDate: null,
|
|
77
|
+
horizonSendDays: null,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export function refillDateSelectorBody(selector) {
|
|
81
|
+
if (selector.source === "target_date" && selector.targetDate) {
|
|
82
|
+
return { targetDate: selector.targetDate };
|
|
83
|
+
}
|
|
84
|
+
if (selector.source === "until_date" && selector.untilDate) {
|
|
85
|
+
return { untilDate: selector.untilDate };
|
|
86
|
+
}
|
|
87
|
+
if (selector.source === "horizon_send_days" &&
|
|
88
|
+
selector.horizonSendDays !== null) {
|
|
89
|
+
return { horizonSendDays: selector.horizonSendDays };
|
|
90
|
+
}
|
|
91
|
+
return {};
|
|
92
|
+
}
|
|
93
|
+
export function dateWindowFromSelector(selector) {
|
|
94
|
+
return {
|
|
95
|
+
version: 1,
|
|
96
|
+
...selector,
|
|
97
|
+
selectedDates: selector.targetDate ? [selector.targetDate] : [],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function selectedDatesFromPlan(plan) {
|
|
101
|
+
const packet = isRecord(plan.packet) ? plan.packet : {};
|
|
102
|
+
const target = isRecord(packet.target) ? packet.target : {};
|
|
103
|
+
const window = isRecord(target.window) ? target.window : {};
|
|
104
|
+
const senderWindows = arrayValue(window.senderWindows).filter(isRecord);
|
|
105
|
+
const fromWindows = senderWindows.flatMap((senderWindow) => arrayValue(senderWindow.selectedDates)
|
|
106
|
+
.map((entry) => stringValue(entry))
|
|
107
|
+
.filter((entry) => Boolean(entry)));
|
|
108
|
+
if (fromWindows.length > 0)
|
|
109
|
+
return Array.from(new Set(fromWindows)).sort();
|
|
110
|
+
const senderRefillPlans = arrayValue(target.senderRefillPlans).filter(isRecord);
|
|
111
|
+
return Array.from(new Set(senderRefillPlans.flatMap((senderPlan) => {
|
|
112
|
+
const horizon = isRecord(senderPlan.horizon) ? senderPlan.horizon : {};
|
|
113
|
+
return arrayValue(horizon.selectedDays)
|
|
114
|
+
.filter(isRecord)
|
|
115
|
+
.map((day) => stringValue(day.date))
|
|
116
|
+
.filter((entry) => Boolean(entry));
|
|
117
|
+
}))).sort();
|
|
118
|
+
}
|
|
119
|
+
function senderWindowsFromPlan(plan) {
|
|
120
|
+
const packet = isRecord(plan.packet) ? plan.packet : {};
|
|
121
|
+
const target = isRecord(packet.target) ? packet.target : {};
|
|
122
|
+
const window = isRecord(target.window) ? target.window : {};
|
|
123
|
+
return arrayValue(window.senderWindows)
|
|
124
|
+
.filter(isRecord)
|
|
125
|
+
.map((senderWindow) => ({
|
|
126
|
+
senderId: stringValue(senderWindow.senderId),
|
|
127
|
+
timeZone: stringValue(senderWindow.timeZone),
|
|
128
|
+
selectedDates: arrayValue(senderWindow.selectedDates)
|
|
129
|
+
.map((entry) => stringValue(entry))
|
|
130
|
+
.filter((entry) => Boolean(entry)),
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
export function dateWindowFromPlan(plan, selector) {
|
|
134
|
+
const packet = isRecord(plan.packet) ? plan.packet : {};
|
|
135
|
+
const request = isRecord(packet.request) ? packet.request : {};
|
|
136
|
+
const targetDate = stringValue(request.targetDate) ?? selector.targetDate ?? null;
|
|
137
|
+
const untilDate = stringValue(request.untilDate) ?? selector.untilDate ?? null;
|
|
138
|
+
const horizonSendDays = numberValue(request.horizonSendDays) ?? selector.horizonSendDays ?? null;
|
|
139
|
+
const source = targetDate
|
|
140
|
+
? "target_date"
|
|
141
|
+
: untilDate
|
|
142
|
+
? "until_date"
|
|
143
|
+
: horizonSendDays !== null
|
|
144
|
+
? "horizon_send_days"
|
|
145
|
+
: selector.source;
|
|
146
|
+
const selectedDates = selectedDatesFromPlan(plan);
|
|
147
|
+
return {
|
|
148
|
+
version: 1,
|
|
149
|
+
source,
|
|
150
|
+
targetDate: source === "target_date" ? targetDate : null,
|
|
151
|
+
untilDate: source === "until_date" ? untilDate : null,
|
|
152
|
+
horizonSendDays: source === "horizon_send_days" ? horizonSendDays : null,
|
|
153
|
+
selectedDates: selectedDates.length > 0
|
|
154
|
+
? selectedDates
|
|
155
|
+
: targetDate
|
|
156
|
+
? [targetDate]
|
|
157
|
+
: [],
|
|
158
|
+
senderWindows: senderWindowsFromPlan(plan),
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
export function dateWindowFromRunState(runState) {
|
|
162
|
+
const state = isRecord(runState) ? runState : {};
|
|
163
|
+
const raw = isRecord(state.dateWindow) ? state.dateWindow : null;
|
|
164
|
+
if (!raw || raw.version !== 1)
|
|
165
|
+
return null;
|
|
166
|
+
const source = raw.source === "target_date" ||
|
|
167
|
+
raw.source === "until_date" ||
|
|
168
|
+
raw.source === "horizon_send_days" ||
|
|
169
|
+
raw.source === "default_scheduler_forward"
|
|
170
|
+
? raw.source
|
|
171
|
+
: null;
|
|
172
|
+
if (!source)
|
|
173
|
+
return null;
|
|
174
|
+
return {
|
|
175
|
+
version: 1,
|
|
176
|
+
source,
|
|
177
|
+
targetDate: source === "target_date" ? stringValue(raw.targetDate) : null,
|
|
178
|
+
untilDate: source === "until_date" ? stringValue(raw.untilDate) : null,
|
|
179
|
+
horizonSendDays: source === "horizon_send_days"
|
|
180
|
+
? numberValue(raw.horizonSendDays)
|
|
181
|
+
: null,
|
|
182
|
+
selectedDates: arrayValue(raw.selectedDates)
|
|
183
|
+
.map((entry) => stringValue(entry))
|
|
184
|
+
.filter((entry) => Boolean(entry)),
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
export function selectorFromDateWindow(window) {
|
|
188
|
+
return {
|
|
189
|
+
source: window.source,
|
|
190
|
+
targetDate: window.targetDate,
|
|
191
|
+
untilDate: window.untilDate,
|
|
192
|
+
horizonSendDays: window.horizonSendDays,
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
export function dateSelectorMatchesWindow(selector, window) {
|
|
196
|
+
return (selector.source === window.source &&
|
|
197
|
+
selector.targetDate === window.targetDate &&
|
|
198
|
+
selector.untilDate === window.untilDate &&
|
|
199
|
+
selector.horizonSendDays === window.horizonSendDays);
|
|
200
|
+
}
|
|
201
|
+
export function schedulerSweepTargetDates(window) {
|
|
202
|
+
if (window.source === "target_date" && window.targetDate) {
|
|
203
|
+
return [window.targetDate];
|
|
204
|
+
}
|
|
205
|
+
if (window.source === "until_date" ||
|
|
206
|
+
window.source === "horizon_send_days") {
|
|
207
|
+
return window.selectedDates;
|
|
208
|
+
}
|
|
209
|
+
return [];
|
|
210
|
+
}
|
package/dist/tools/auth.d.ts
CHANGED
|
@@ -11,6 +11,11 @@ export type AuthStatus = {
|
|
|
11
11
|
tokenPresent: boolean;
|
|
12
12
|
tokenPrefix: string | null;
|
|
13
13
|
workspacesCount: number | null;
|
|
14
|
+
workspaceLock: {
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
workspaceId: string | null;
|
|
17
|
+
required: boolean;
|
|
18
|
+
};
|
|
14
19
|
checkedAt: string;
|
|
15
20
|
/** Short message the LLM MUST show the user after auth succeeds. */
|
|
16
21
|
_userNotice: string | null;
|
package/dist/tools/auth.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as fs from "fs";
|
|
2
2
|
import { getApi, SellableApiError } from "../api.js";
|
|
3
|
-
import { getConfig, getConfigPath, getResolvedConfigsDir } from "../auth.js";
|
|
3
|
+
import { getConfig, getConfigPath, getEffectiveConfiguredWorkspaceId, getLockedWorkspaceId, getResolvedConfigsDir, isWorkspaceLockRequired, workspaceLockRequiredMessage, } from "../auth.js";
|
|
4
4
|
import { checkForUpdates } from "../update-check.js";
|
|
5
5
|
function maskToken(token) {
|
|
6
6
|
if (token.length <= 10)
|
|
@@ -38,6 +38,8 @@ export async function getAuthStatus() {
|
|
|
38
38
|
const checkedAt = new Date().toISOString();
|
|
39
39
|
const update = await getUpdateStatus();
|
|
40
40
|
let tokenPresent = false;
|
|
41
|
+
const workspaceLockRequired = isWorkspaceLockRequired();
|
|
42
|
+
const lockedWorkspaceId = getLockedWorkspaceId();
|
|
41
43
|
const base = {
|
|
42
44
|
ok: false,
|
|
43
45
|
configPath,
|
|
@@ -50,27 +52,47 @@ export async function getAuthStatus() {
|
|
|
50
52
|
tokenPresent: false,
|
|
51
53
|
tokenPrefix: null,
|
|
52
54
|
workspacesCount: null,
|
|
55
|
+
workspaceLock: {
|
|
56
|
+
enabled: Boolean(lockedWorkspaceId),
|
|
57
|
+
workspaceId: lockedWorkspaceId,
|
|
58
|
+
required: workspaceLockRequired,
|
|
59
|
+
},
|
|
53
60
|
_userNotice: appendUpdateNotice(null, update),
|
|
54
61
|
update,
|
|
55
62
|
checkedAt,
|
|
56
63
|
};
|
|
64
|
+
if (workspaceLockRequired && !lockedWorkspaceId) {
|
|
65
|
+
return {
|
|
66
|
+
...base,
|
|
67
|
+
error: {
|
|
68
|
+
type: "workspace",
|
|
69
|
+
message: "Customer profile workspace lock is missing.",
|
|
70
|
+
guidance: workspaceLockRequiredMessage("get_auth_status"),
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
}
|
|
57
74
|
try {
|
|
58
75
|
const config = getConfig();
|
|
59
76
|
tokenPresent = Boolean(config.token);
|
|
60
77
|
base.activeEnvName = config.activeEnvName || null;
|
|
61
78
|
const api = getApi();
|
|
62
79
|
const { workspaces } = await api.get("/api/v3/workspaces");
|
|
63
|
-
const activeWorkspaceId = config
|
|
80
|
+
const activeWorkspaceId = getEffectiveConfiguredWorkspaceId(config);
|
|
64
81
|
const activeWorkspace = activeWorkspaceId
|
|
65
82
|
? workspaces.find((ws) => ws.id === activeWorkspaceId)
|
|
66
83
|
: null;
|
|
84
|
+
const visibleWorkspacesCount = lockedWorkspaceId
|
|
85
|
+
? activeWorkspace
|
|
86
|
+
? 1
|
|
87
|
+
: 0
|
|
88
|
+
: workspaces.length;
|
|
67
89
|
if (!activeWorkspaceId) {
|
|
68
90
|
return {
|
|
69
91
|
...base,
|
|
70
92
|
apiUrl: config.apiUrl || null,
|
|
71
93
|
tokenPresent,
|
|
72
94
|
tokenPrefix: maskToken(config.token),
|
|
73
|
-
workspacesCount:
|
|
95
|
+
workspacesCount: visibleWorkspacesCount,
|
|
74
96
|
error: {
|
|
75
97
|
type: "workspace",
|
|
76
98
|
message: "No active workspace selected.",
|
|
@@ -87,22 +109,26 @@ export async function getAuthStatus() {
|
|
|
87
109
|
apiUrl: config.apiUrl || null,
|
|
88
110
|
tokenPresent,
|
|
89
111
|
tokenPrefix: maskToken(config.token),
|
|
90
|
-
workspacesCount:
|
|
112
|
+
workspacesCount: visibleWorkspacesCount,
|
|
91
113
|
error: {
|
|
92
114
|
type: "workspace",
|
|
93
115
|
message: `Active workspace ${activeWorkspaceId} not found in access list.`,
|
|
94
|
-
guidance:
|
|
95
|
-
?
|
|
96
|
-
:
|
|
116
|
+
guidance: lockedWorkspaceId
|
|
117
|
+
? "This profile is locked to a workspace that the configured Sellable token cannot access. Re-provision the customer profile from sellable-admin with the correct workspace token."
|
|
118
|
+
: available
|
|
119
|
+
? `Available: ${available}. Run set_active_workspace with a valid ID.`
|
|
120
|
+
: "Run list_workspaces to view available workspaces, then set_active_workspace.",
|
|
97
121
|
},
|
|
98
122
|
};
|
|
99
123
|
}
|
|
100
124
|
const workspaceName = activeWorkspace.name || config.activeWorkspaceName || null;
|
|
101
125
|
const envLabel = config.activeEnvName || null;
|
|
102
126
|
const wsLabel = workspaceName || activeWorkspaceId;
|
|
103
|
-
const
|
|
104
|
-
? `You're
|
|
105
|
-
:
|
|
127
|
+
const noticePrefix = lockedWorkspaceId
|
|
128
|
+
? `You're locked to ${wsLabel}.`
|
|
129
|
+
: envLabel
|
|
130
|
+
? `You're in ${wsLabel} (${envLabel}).`
|
|
131
|
+
: `You're in ${wsLabel}.`;
|
|
106
132
|
return {
|
|
107
133
|
ok: true,
|
|
108
134
|
configPath,
|
|
@@ -114,8 +140,19 @@ export async function getAuthStatus() {
|
|
|
114
140
|
activeWorkspaceName: workspaceName,
|
|
115
141
|
tokenPresent,
|
|
116
142
|
tokenPrefix: maskToken(config.token),
|
|
117
|
-
workspacesCount:
|
|
118
|
-
|
|
143
|
+
workspacesCount: visibleWorkspacesCount,
|
|
144
|
+
workspaceLock: lockedWorkspaceId
|
|
145
|
+
? {
|
|
146
|
+
enabled: true,
|
|
147
|
+
workspaceId: lockedWorkspaceId,
|
|
148
|
+
required: workspaceLockRequired,
|
|
149
|
+
}
|
|
150
|
+
: {
|
|
151
|
+
enabled: false,
|
|
152
|
+
workspaceId: null,
|
|
153
|
+
required: workspaceLockRequired,
|
|
154
|
+
},
|
|
155
|
+
_userNotice: appendUpdateNotice(noticePrefix, update),
|
|
119
156
|
update,
|
|
120
157
|
checkedAt,
|
|
121
158
|
error: null,
|
package/dist/tools/campaigns.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getApi } from "../api.js";
|
|
2
|
-
import { getConfig } from "../auth.js";
|
|
2
|
+
import { getConfig, getEffectiveConfiguredWorkspaceId } from "../auth.js";
|
|
3
3
|
import { assertCreateCampaignPromptLoaded, assertNetNewCreateCampaignResearchReady, } from "./flow-preflight.js";
|
|
4
4
|
import { setCampaignInteractionMode, } from "./interaction-mode.js";
|
|
5
5
|
import { isLinkedInProfileInput, normalizeLinkedInProfileInput, } from "./linkedin-url.js";
|
|
@@ -114,7 +114,7 @@ function normalizeLeadSourceProvider(input) {
|
|
|
114
114
|
: null;
|
|
115
115
|
}
|
|
116
116
|
export function buildWatchUrl(config, path) {
|
|
117
|
-
const workspaceId = config
|
|
117
|
+
const workspaceId = getEffectiveConfiguredWorkspaceId(config);
|
|
118
118
|
const url = new URL(path, config.apiUrl);
|
|
119
119
|
if (workspaceId && !url.searchParams.has("workspaceId")) {
|
|
120
120
|
url.searchParams.set("workspaceId", workspaceId);
|
package/dist/tools/csv-dnc.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createHash, createHmac, randomBytes } from "node:crypto";
|
|
|
3
3
|
import { readFileSync, statSync } from "node:fs";
|
|
4
4
|
import { dirname, isAbsolute, resolve } from "node:path";
|
|
5
5
|
import { getApi } from "../api.js";
|
|
6
|
-
import { getConfig } from "../auth.js";
|
|
6
|
+
import { getConfig, getEffectiveConfiguredWorkspaceId } from "../auth.js";
|
|
7
7
|
import { resolveWorkspaceRoot } from "../utils/workspace-root.js";
|
|
8
8
|
import { sanitizeCsvDomainCandidate } from "./csv-domains.js";
|
|
9
9
|
import { validateAndNormalizeLinkedInUrl } from "./csv-linkedin.js";
|
|
@@ -324,7 +324,7 @@ function dedupeCandidates(candidates) {
|
|
|
324
324
|
}
|
|
325
325
|
async function getVerifiedActiveWorkspace() {
|
|
326
326
|
const config = getConfig();
|
|
327
|
-
const activeWorkspaceId = config
|
|
327
|
+
const activeWorkspaceId = getEffectiveConfiguredWorkspaceId(config);
|
|
328
328
|
if (!activeWorkspaceId) {
|
|
329
329
|
throw new Error("No active workspace selected. Run list_workspaces then set_active_workspace for the exact workspace whose Sellable DNC list should be read or updated.");
|
|
330
330
|
}
|
|
@@ -21,28 +21,30 @@ const DEFAULT_MODEL_QUALITY_CONFIG = {
|
|
|
21
21
|
minimumModel: "GPT 5.5",
|
|
22
22
|
familyKeywords: ["gpt"],
|
|
23
23
|
minimumVersion: "5.5",
|
|
24
|
-
minimumReasoningEffort: "
|
|
24
|
+
minimumReasoningEffort: "high",
|
|
25
25
|
acceptedReasoningEfforts: [
|
|
26
|
+
"high",
|
|
26
27
|
"extra high",
|
|
27
28
|
"extra-high",
|
|
28
29
|
"xhigh",
|
|
29
30
|
"extra_high",
|
|
30
31
|
],
|
|
31
|
-
recommendedReasoningEffort: "
|
|
32
|
+
recommendedReasoningEffort: "high or better",
|
|
32
33
|
},
|
|
33
34
|
hermes: {
|
|
34
35
|
label: "Hermes",
|
|
35
36
|
minimumModel: "GPT 5.5",
|
|
36
37
|
familyKeywords: ["gpt"],
|
|
37
38
|
minimumVersion: "5.5",
|
|
38
|
-
minimumReasoningEffort: "
|
|
39
|
+
minimumReasoningEffort: "high",
|
|
39
40
|
acceptedReasoningEfforts: [
|
|
41
|
+
"high",
|
|
40
42
|
"extra high",
|
|
41
43
|
"extra-high",
|
|
42
44
|
"xhigh",
|
|
43
45
|
"extra_high",
|
|
44
46
|
],
|
|
45
|
-
recommendedReasoningEffort: "
|
|
47
|
+
recommendedReasoningEffort: "high or better",
|
|
46
48
|
},
|
|
47
49
|
},
|
|
48
50
|
warningCopy: {
|
package/dist/tools/prompts.js
CHANGED
|
@@ -261,8 +261,8 @@ export function getSourceScoutRegistry() {
|
|
|
261
261
|
codex: {
|
|
262
262
|
filename: String(agent.codex?.filename || `${agent.name}.toml`),
|
|
263
263
|
description: String(agent.codex?.description || ""),
|
|
264
|
-
model: String(agent.codex?.model || "gpt-5.
|
|
265
|
-
modelReasoningEffort: String(agent.codex?.modelReasoningEffort || "
|
|
264
|
+
model: String(agent.codex?.model || "gpt-5.6-sol"),
|
|
265
|
+
modelReasoningEffort: String(agent.codex?.modelReasoningEffort || "high"),
|
|
266
266
|
},
|
|
267
267
|
claude: {
|
|
268
268
|
filename: String(agent.claude?.filename || `${agent.name}.md`),
|
|
@@ -308,8 +308,8 @@ export function getPostFindLeadsScoutRegistry() {
|
|
|
308
308
|
codex: {
|
|
309
309
|
filename: String(agent.codex?.filename || `${agent.name}.toml`),
|
|
310
310
|
description: String(agent.codex?.description || ""),
|
|
311
|
-
model: String(agent.codex?.model || "gpt-5.
|
|
312
|
-
modelReasoningEffort: String(agent.codex?.modelReasoningEffort || "
|
|
311
|
+
model: String(agent.codex?.model || "gpt-5.6-sol"),
|
|
312
|
+
modelReasoningEffort: String(agent.codex?.modelReasoningEffort || "high"),
|
|
313
313
|
},
|
|
314
314
|
claude: {
|
|
315
315
|
filename: String(agent.claude?.filename || `${agent.name}.md`),
|
|
@@ -376,9 +376,9 @@ export function getPostFindLeadsScoutRegistry() {
|
|
|
376
376
|
reusePolicy: "The first completed Message Drafting recommendation remains the default review candidate. Later Lead Fit Builder, Filter Leads, enrichment, or rubric completion may make an enriched rewrite available, but does not automatically retry or replace the initial draft unless campaign/brief/source/list/table/execution-slice identity mismatches or the initial output failed. If filters were chosen but leadScoringRubrics are not yet visible when the branch reads campaign state, Message Drafting must not wait, retry, or return blocked; missing saved rubrics are parent-owned filter setup, and the branch should return status ready with basisStatus usable_initial when campaign/list/table identity and the non-empty execution slice match. User copy feedback before approve-message is an explicit Message Drafting revision and must be routed back through the message branch with the current recommendation and basis.",
|
|
377
377
|
},
|
|
378
378
|
usage: {
|
|
379
|
-
codex: 'After confirm_lead_list copies source rows and the initial campaign-table execution slice exists, ask the filter-choice question immediately. Do not spawn anything before that question. After the answer, launch only Message Drafting. The filter-choice answer is the post-import user gate for this single worker; do not ask another question about starting it in step-wise or YOLO mode. The registry lookup is not a launch: after get_post_find_leads_scout_registry, immediately invoke Task/spawn_agent or the host background-agent mechanism before loading filter-leads.md, before saving rubrics, and before treating skip-filters as ready for message review. Both choices route through this kickoff; do not let filters_skipped jump straight from filter-choice to message-generation. If filters are chosen, the parent stays on Filter Rules and drafts/saves rubrics with MCP tools while Message Drafting runs in the background. If filters are skipped, move to Messages/message review only after Message Drafting has started or is ready; update_campaign(currentStep=messages) is not proof of launch. If the named Message Drafting custom agent is unavailable, spawn a generic gpt-5.
|
|
379
|
+
codex: 'After confirm_lead_list copies source rows and the initial campaign-table execution slice exists, ask the filter-choice question immediately. Do not spawn anything before that question. After the answer, launch only Message Drafting. The filter-choice answer is the post-import user gate for this single worker; do not ask another question about starting it in step-wise or YOLO mode. The registry lookup is not a launch: after get_post_find_leads_scout_registry, immediately invoke Task/spawn_agent or the host background-agent mechanism before loading filter-leads.md, before saving rubrics, and before treating skip-filters as ready for message review. Both choices route through this kickoff; do not let filters_skipped jump straight from filter-choice to message-generation. If filters are chosen, the parent stays on Filter Rules and drafts/saves rubrics with MCP tools while Message Drafting runs in the background. If filters are skipped, move to Messages/message review only after Message Drafting has started or is ready; update_campaign(currentStep=messages) is not proof of launch. If the named Message Drafting custom agent is unavailable, spawn a generic gpt-5.6-sol high Message Drafting background agent with the same lean campaign/table basis. When the background worker starts, persist workerDetails.messageDraftBuilder with statusSource "branch", status "branch-running", runId, startedAt, updatedAt, basisToken when known, and basis containing campaignId, selectedLeadListId, workflowTableId, filterChoice, and reviewBatchRowHash or reviewBatchRowIds; workerStatuses.messageDraftBuilder may be "running" as a simple badge only. Never put rich proof under workerStatuses and never use workerStatuses.messageDrafting. If no background-agent tool is callable, start the same full message branch inline before filter drafting or before skip-filter message review, record workerDetails.messageDraftBuilder with statusSource "parent-thread-fallback" and status "fallback-active", and require the same live context, prompt, assets, and validation gate before message review; do not wait until filters are saved and then call the registry.',
|
|
380
380
|
claude: "After confirm_lead_list copies source rows and the initial campaign-table execution slice exists, ask the filter-choice question immediately. Do not invoke any Task/Agent before that question. After the answer, invoke only Message Drafting. If filters are chosen, parent drafts/saves rubrics with MCP tools while Message Drafting runs, asks filter approval, then joins Message Drafting. If filters are skipped, invoke only Message Drafting and move to Messages/message review.",
|
|
381
|
-
parentThreadRule: 'Named agents are optional acceleration, but message drafting is not optional. The only normal background worker is Message Drafting. The filter-choice answer is the campaign-scoped go-ahead for this single post-import worker; do not ask another question to start it in step-wise or YOLO mode. If a named agent is unavailable, use a generic gpt-5.
|
|
381
|
+
parentThreadRule: 'Named agents are optional acceleration, but message drafting is not optional. The only normal background worker is Message Drafting. The filter-choice answer is the campaign-scoped go-ahead for this single post-import worker; do not ask another question to start it in step-wise or YOLO mode. If a named agent is unavailable, use a generic gpt-5.6-sol high Message Drafting background agent. source work and filter work stay in the parent thread with MCP tools. If post-find-leads-message-scout is available, run it as the background Message Draft Builder after the filter-choice answer. The registry lookup is not a launch: get_post_find_leads_scout_registry only identifies the worker, and Message Drafting counts as started only after Task/spawn_agent or the host background-agent tool is invoked, or after the parent begins the same full message branch inline because no background-agent tool is callable. This launch must happen before loading filter-leads.md, save_rubrics, filter approval, or skip-filter message review; currentStep=messages is not proof of launch. If post-find-leads-message-scout is absent, do not customer-surface install status. Do not silently treat message drafting as started; the main thread must either launch the background worker or execute the same message branch from CampaignOffer state, selected source state, workflowTableId, and initial campaign-table execution slice rows. For a spawned worker, record workerDetails.messageDraftBuilder with statusSource branch / status branch-running, runId, startedAt, updatedAt, and basis containing campaignId, selectedLeadListId, workflowTableId, filterChoice, and reviewBatchRowHash or reviewBatchRowIds. workerStatuses.messageDraftBuilder is optional simple badge text only ("running", "ready", "blocked", "idle"); never put runId/statusSource/basis under workerStatuses and never use workerStatuses.messageDrafting. If no background-agent tool is callable, start that same full message branch inline before filter drafting or before skip-filter message review, record workerDetails.messageDraftBuilder with statusSource parent-thread-fallback / status fallback-active then ready, and require the same live context, prompt, assets, and validation gate before message review; do not report that as a background worker failure. If neither branch nor inline fallback can run, return blocked/retry-needed; do not wait until filters are saved and then call the registry. The Message Drafting handoff must be lean. Do not paste copied row counts, brief hashes, review-batch hashes, full reviewBatchRowIds, broad row data, or local debug artifacts into the spawn prompt. Local markdown/json files are not normal-path inputs. The filter-choice question is the first post-import user gate; do not load post-lead registries or filter references before it. Message drafting starts after the filter-choice answer, must load get_subskill_prompt({ subskillName: "generate-messages" }), and must load every required message asset named by generate-messages Mode 0 through get_subskill_asset before drafting. Reference Asset Loading means loading the required pre-draft reference pack before drafting; return blocked/retry-needed if required assets cannot be loaded; load ai-tells.md because it is never optional. The branch or parent-thread fallback loads the full generate-messages prompt and every referenced asset through get_subskill_asset. After generating/revising the candidate and before returning ready, must load get_subskill_prompt({ subskillName: "create-campaign-v2-validation" }) as the final internal validation gate, must read live campaign table state through scoped MCP/product tools, and must reject mismatched selectedLeadListId/workflowTableId/campaign/workspace input. Do not block when filters were chosen but leadScoringRubrics are not yet visible in the branch read; the parent owns save_rubrics and filter approval in parallel, so Message Drafting should return status ready with basisStatus usable_initial when campaign/list/table identity and the non-empty execution slice match. Do not use any alternate, local-artifact, or examples-only message prompt. User copy feedback, message QA, or rewrite requests before approve-message must be routed back to Message Drafting with the current recommendation, lean campaign/table basis, and latest user text; the parent must not rewrite or QA the template from memory and must not call update_campaign_brief before approve-message. The worker validates internally and returns only templateRecommendation, tokenFillRules, renderedGoodSample, status, approveOrReviseRecommendation, validationStatus, outputAt, outputHash, and blocked/retry detail. Do not render renderedFallbackSample, risk notes, or a qaReceipt on the normal happy path. On the filter path, save_rubrics keeps the browser on Filter Rules after save_rubrics so the user can approve the saved criteria; after saved-filter approval, move to Filter Leads with currentStep=apply-icp-rubric whether Message Drafting is ready or still running. Wait there for message approval. Enrichment, filtering, Generate Message cells, sender setup, sequence attach, and launch wait for template approval on the Use Template path. On the skip path, move to Messages/message review after Message Drafting has started or is ready and wait for message approval before enrichment or Settings. Do not render message review from checklist or shortcut instructions; message review requires a messageDraftRecommendation whose basis proves the generate-messages prompt, required message assets, and validation gate ran for the current campaign/table execution slice. Do not automatically rerun Message Drafting after filters/enrichment finish; show the initial draft by default and offer an enriched rewrite only with explicit user opt-in. Handoff and recommendation output are Markdown with labeled fields, not raw JSON.',
|
|
382
382
|
schedulerRunReceiptRule: "For refill prompt handoffs, scheduler-run receipt interpretation is mandatory: cellsConsidered is allocation-attempt count, not total ready supply, while readyCellsFound is ready inventory found before prefilters. Inspect campaignScopeSummary before assuming the selected refill campaign/table was included. Interpret prefiltered, skipped, and deferred separately. For ready closed-InMail cells with stale paid-credit prefilter/defer reasons, route to refresh_paid_inmail_credits_then_rerun once, then rerun/status. wait_for_capacity_or_window means report loaded/capped/waiting and do not source or prep more rows. no_ready_cells_continue_refill_prep means return to the refill/prep ladder. Do not treat cellsScheduled:0 alone as failure.",
|
|
383
383
|
prepareMessagesRule: `Default create-campaign stays on the existing reviewBatchLimit:15 first campaign-table execution slice. For plain post-mint fill/load/refill requests, load get_subskill_prompt({ subskillName: "refill-sends-workflow" }) and get_subskill_asset({ subskillName: "refill-sends-workflow", assetPath: "core/flow.v1.json" }) to hasMore:false before operational steps, then call resolve_campaign_fill_route({ intent:"plain" }), list_senders, and get_campaign_refill_state for enough candidate campaigns to identify the campaign that most recently had scheduler-owned sends for the relevant sender set before any mutation. Route outcomes are route:"evergreen_horizon", route:"active_campaigns", and route:"ask_create"; if a plain managed-waterfall route has archived/completed skipped slots or does not cover the named sender set, immediately refetch with resolve_campaign_fill_route({ intent:"active" }) and inspect current dashboard-active ACTIVE/PAUSED campaign-backed sequence campaigns before declaring a sender blocked; stay in the same campaignOfferId/campaignId context after minting. Plain fill is not an alias for fill_campaign_horizon or campaign creation. fill_campaign_horizon is evergreen-only and is not the generic regular-campaign fill path. Campaign creation is allowed only after route:"ask_create" and explicit user selection; it is never the default response to plain fill. Treat "fill up/load sends" as capacity-fill preparation, and treat "refill senders", "fill senders", "max out senders", and "load everyone up" as sender-scoped capacity-fill preparation. For sender-scoped requests with no named senders, --yolo means all eligible healthy senders enrolled in active campaign-backed sequence campaigns in the active workspace; without --yolo, ask which eligible enrolled senders to refill before choosing campaigns or mutating. In non-yolo interactive Codex or Claude Code sessions, post the full sender/campaign/action approval packet in normal chat as Markdown first, then ask request_user_input/AskUserQuestion with exactly Accept and Decline and a compact body that refers back to the posted packet; do not duplicate the campaign table or full operator packet inside the structured question. The chat packet must show workspace, sender scope, a campaign-by-campaign table, exact ids/caps/dates, side effects, forbidden actions, and stop condition before mutation. Default --yolo target is the scheduler-forward 48-hour target window: sender-local send days whose configured sending windows overlap the rolling target window, skipping no-send-hour days. For campaign-scoped fill/refill, select the best recent-send campaign and calculate the bounded gap from healthy sender daily capacity minus projected coverage (actual sent plus future scheduler-owned scheduled sends) and ready-to-schedule rows, then prepare only that gap. For sender-scoped fill/refill, calculate the bounded gap per eligible sender across active enrolled campaigns, counting actual sent coverage, future scheduled rows, and ready-to-schedule rows across those campaigns, then choose the best same-sender campaign to fill each sender gap: prefer recent/future scheduler-owned sends for that sender, then strongest recent result evidence, then source health. Maintain a target-window saturation ledger per selected sender with selected send days, gross capacity, actual sent counts, future scheduler-owned scheduled counts, projected coverage, ready-to-schedule buffer, remaining projected gap, paid-InMail threshold feasibility, and the next MCP primitive. The structured packet lives in target.senderRefillPlans[] with target.eligibleSenderLedger, campaignRanking.options, sourcePlan, nextActions, manualAlternates, and target.globalActionQueue; preserve Need to prepare, Goal, Already sent, Scheduled, Ready and waiting to be scheduled, and Still need labels. In --yolo, execute exactly one globally ranked primitive from the post-refresh target.globalActionQueue[0], then rerun get_refill_target_plan before choosing another action. Refill action ladder: approve generated rows only when an explicit bounded approval gate exists, process all existing same-campaign unenriched/unprepared rows in bounded batches before any source work, then copy bounded net-new rows from the selected source (selectedLeadListId, provider, and source fingerprint preserved), then use provider-aligned source-more. A new source or provider switch changes the reply-rate baseline and is a manual alternate, not a --yolo side effect. The refill_sends MCP command maintains a run-local refreshedPaidInmailSenderIds set: if the first target plan contains refresh_paid_inmail_credits for stale/missing paid-InMail facts, refill_sends refreshes each selected paid-InMail sender at most once, reruns get_refill_target_plan, and returns autoPaidInmailRefresh plus the post-refresh targetPlan before the operator chooses prep/source-copy/bounded-approval/read-only wait. Freshness gate precedes scheduler wait: if any selected target.senderRefillPlans[].paidInmail.status is missing_credit_facts or stale_credit_facts, or the target plan contains refresh_paid_inmail_credits, do not enter wait_for_scheduler even when remainingReadyOrProjectedGap is 0; refresh exact sender credit facts once, reread get_refill_target_plan, then choose scheduler wait only if freshness is clean. Do not present paid-credit refresh as the next operator action after refill_sends has returned a post-refresh targetPlan. Do not stop after filling only one sender when the request was sender-scoped. In --yolo, continue through every safe selected sender/campaign action covered by the rendered packet, reread after each terminal apply/prep/source-copy/bounded-approval/read-only wait result, recompute the target-window saturation ledger, and keep going until projected coverage (sent + scheduled) fills the scheduler-forward target window or a concrete non-scheduler blocker is proven. Ready-to-schedule rows are buffer, not completion; if ready covers the projected gap but scheduled cells do not, report loaded, awaiting scheduler and run a persistent read-only scheduler wait/reread loop and keep the run open while awaiting_scheduler_after_ready_buffer is the only remaining state. Paid-InMail threshold changes and connection-campaign creation are explicit continuation options, never --yolo side effects. When no safe in-packet action remains return concrete continuation options with campaign names, exact ids, and which options require a new approval packet; do not return final completion for scheduler wait unless Christian explicitly asks for status or stops the run. Use the refill workflow to decide whether to enrich/prep more rows in that same recent-send/best-result campaign, add/import more rows to that same campaign/source path, use a different existing campaign only when the selected same-sender lane is blocked/exhausted/already loaded while the sender still has a gap, or ask what to create. Do not create warm-post-engager side campaigns. Surface sender-health blockers and paid-InMail threshold blockers separately from prepared/approved/scheduled counts. User-facing refill decisions must be campaign-name-first and sender-name-first, with ids as proof/execution targets only. Trust schedulerGate.sendable and scheduler blockers over raw unipileAccountStatus labels alone. For long-running prep use compact prep status checks, reread target plans after prep or cancel, avoid huge parallel target-plan reads when output is large, and if prepared/ready rows grow but sender-level projected coverage does not move after one bounded settle loop, pivot to compact prep status or a scheduler-proven lane instead of waiting on campaign-level ready counts. For already-running regular campaigns that need Signal Discovery source replenishment, use the guarded currentStep clear with clearCurrentStepIfMatches:"running", campaign-scoped provider prompt/search/select, and import_leads with the existing sourceLeadListId when a newly approved selected-post scrape would otherwise return reusedExistingSourceList. Before prep, inspect get_campaign_refill_state.preparationFrontier. If hasLaterPreparedIsland:true or earliestUnpreparedRow exists before later successful enrichment, use rowSelector:{type:"needsEnrichment"} with columnRole:"enrich" in table-position order or start_campaign_message_preparation adaptive defaults; do not use the UI Jump anchor or needsGeneratedMessage as the refill cursor. After confirm_lead_list copies rows into an existing table, avoid fixed maxRowsToCheck:100; if confirm_lead_list returns USER_ADDED_ROWS_LIMIT_EXCEEDED, create a bounded same-source split from selectedLeadListId with get_rows_minimal/load_csv_linkedin_leads, confirm that smaller source list into the same campaign, and inspect reviewBatch only as diagnostics unless the approved packet explicitly prioritizes the just-copied split and earlier needsEnrichment rows are exhausted, dependency-blocked, or excluded. For approval diagnostics use rowSelector:{type:"needsApproval"} after current generated messages exist; mutating Approved cells still requires approvalMode:approve and exact bounded approval. Do not interpret checkedRows as enriched rows; it is only the table cursor. Prepared, approved, and ready_to_schedule rows are intermediate states; never call them scheduled unless a re-read proves scheduler-owned scheduled cells with non-null scheduledFor contribute to projected coverage, and never call them complete unless a final re-read proves projected coverage fills the scheduler-forward target window. Before source import, prep, approval, or selected paused campaign start, require exact visible approval or --yolo packet auto-accept and a fresh get_campaign_refill_state reread; stop if freshness.stateHash or exact ids changed. For "approve X messages", use approvalMode:approve only when explicitly requested. For "schedule X sends" or "fill sender sends", approve only when explicitly requested, then re-read campaign/table scheduled counts; if projected coverage does not fill the horizon, keep polling when ready buffer covers the gap and report only interim prepared/approved/ready - awaiting scheduler status if Christian asks. Do not call start_campaign as part of fill/schedule horizon. start_campaign is allowed in refill only for exact selected PAUSED, dashboard-active, campaign-backed sequence targets named in the bounded packet, and the packet must state that starting can let the product scheduler schedule/send approved eligible sequence actions. Never start unrelated, archived, completed, draft, direct, or non-selected campaigns, never broad approve-all, and never use direct scheduler writes. campaignId is CampaignOffer.id. If the user asks to stop preparation, the target is wrong, or status shows the wrong campaign/table, use cancel_campaign_message_preparation only for the exact active job. Low-level selectors are diagnostics and recovery only for this lane.`,
|
|
384
384
|
},
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type RefillSendsEvergreenInput = {
|
|
2
|
+
workspaceId?: string;
|
|
3
|
+
};
|
|
4
|
+
export declare const refillSendsEvergreenToolDefinitions: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: string;
|
|
9
|
+
properties: {
|
|
10
|
+
workspaceId: {
|
|
11
|
+
type: string;
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
required: string[];
|
|
16
|
+
additionalProperties: boolean;
|
|
17
|
+
};
|
|
18
|
+
}[];
|
|
19
|
+
export declare function refillSendsEvergreenCommand(input: RefillSendsEvergreenInput): {
|
|
20
|
+
readOnly: boolean;
|
|
21
|
+
workspaceId: string | null;
|
|
22
|
+
firstOperationalSteps: string[];
|
|
23
|
+
approvalContract: string;
|
|
24
|
+
forbiddenActions: string[];
|
|
25
|
+
fillWindow: string;
|
|
26
|
+
hostExamples: string[];
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export const refillSendsEvergreenToolDefinitions = [
|
|
2
|
+
{
|
|
3
|
+
name: "refill_sends_evergreen",
|
|
4
|
+
description: "Read-only Phase 85 evergreen refill command contract. It performs no mutations and only tells the operator to call get_evergreen_refill_plan for a dry-run packet and journal.",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object",
|
|
7
|
+
properties: {
|
|
8
|
+
workspaceId: {
|
|
9
|
+
type: "string",
|
|
10
|
+
description: "Explicit request-scoped workspace id.",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
required: ["workspaceId"],
|
|
14
|
+
additionalProperties: false,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
];
|
|
18
|
+
export function refillSendsEvergreenCommand(input) {
|
|
19
|
+
return {
|
|
20
|
+
readOnly: true,
|
|
21
|
+
workspaceId: input.workspaceId ?? null,
|
|
22
|
+
firstOperationalSteps: [
|
|
23
|
+
"Call get_evergreen_refill_plan with the explicit workspaceId.",
|
|
24
|
+
"Read the returned packet, globalActionQueue, per-sender plans, and itinerary before taking any action.",
|
|
25
|
+
"Review the dry-run journal file path returned by get_evergreen_refill_plan.",
|
|
26
|
+
"Phase 85 is PLAN-ONLY; execution arrives in Phase 86.",
|
|
27
|
+
],
|
|
28
|
+
approvalContract: "Nothing is approved or executable in Phase 85. The evergreen command is read-only; Phase 86 introduces execution approval.",
|
|
29
|
+
forbiddenActions: [
|
|
30
|
+
"Do not schedule sends.",
|
|
31
|
+
"Do not send messages.",
|
|
32
|
+
"Do not approve messages.",
|
|
33
|
+
"Do not prepare messages.",
|
|
34
|
+
"Do not start or launch campaigns.",
|
|
35
|
+
"Do not create campaigns.",
|
|
36
|
+
"Do not switch providers or source families.",
|
|
37
|
+
"Do not lower paid InMail thresholds.",
|
|
38
|
+
"Do not refresh paid InMail credits.",
|
|
39
|
+
"Do not write scheduler fields.",
|
|
40
|
+
],
|
|
41
|
+
fillWindow: "Use only the target window and caps returned by get_evergreen_refill_plan.",
|
|
42
|
+
hostExamples: [
|
|
43
|
+
"refill_sends_evergreen({ workspaceId })",
|
|
44
|
+
"get_evergreen_refill_plan({ workspaceId })",
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -6,7 +6,7 @@ async function postSetupEvergreenCampaigns(body, workspaceId) {
|
|
|
6
6
|
export const setupEvergreenCampaignsToolDefinitions = [
|
|
7
7
|
{
|
|
8
8
|
name: "setup_evergreen_campaigns",
|
|
9
|
-
description: "Evergreen campaign setup plan/verify command. Use plan mode first to inspect exact workspace/sender/campaign/table/source state and receive immutable lane packets. `selectedSenderIds` is a legacy shorthand for both scopes; prefer `postEngagerSenderIds` for the Post Engagers sender scope and `sharedSenderIds` for the shared lane sender scope when they differ. `sharedSenderIds` must include every intended shared-lane sender, not only the named Post Engagers sender; when adding other senders to existing shared evergreen campaigns, resolve those sender ids with list_senders and pass the full shared set. If a protected existing Post Engagers campaign must stay unchanged and the operator requested only shared lane execution, pass postEngagerSenderIds:[] and sharedSenderIds; do not include the protected active Post Engagers lane as a reuse packet because it can make the yolo plan non-autoExecutable. The command plans one Post Engagers lane per post-engager sender plus shared Signal Discovery and Shared Cold Fallback lanes for the shared sender set. Non-archived PAUSED/ACTIVE/DRAFT shared campaigns/tables are the reusable targets; archived campaigns, archived tables, and archived waterfall bindings are stale inventory and must not be counted as valid evergreen slots. If an existing non-archived shared campaign is already attached to additional senders, plan reporting should count those attached senders as existing shared-lane membership rather than treating them as missing or duplicate slots. yolo is only a parent-skill auto-execution hint for safe lane packets; pass yolo only in plan mode and never include yolo on mode:\"verify\" calls. This backend command remains read-only in plan mode and verifies receipts in verify mode. Package-backed prompt authority: the installed public wrapper can be the local Codex skill entrypoint, but lane workers must use get_subskill_prompt and get_subskill_asset for nested `$sellable:create-campaign`, create-campaign-v2, generate-messages, validation, and assets; nested filesystem prompt fallback is a failed UAT. Use mcp__sellable only for workspace selection and product mutations/readbacks. Do not use mcp__sellable_admin, direct DB, Prisma, SQL, built-in web search, browser search, web.run, or any external browsing/search tool as execution or research proof; if Sellable MCP research tools are insufficient, write a blocked receipt instead of browsing externally. Worker-local replans are read-only drift checks and must preserve the exact parent sender scopes, including postEngagerSenderIds:[] when intentionally empty and the exact sharedSenderIds array; if scope, planRevision, actionId, or laneKey drifts, stop with blocked:worker_plan_scope_drift before mutation. Each lane packet includes workerDispatch with preferredRuntime, runtimeFallbackOrder, acceptedRuntimes, rejectedRuntimes, requiresVisibleThreadOrDurableReceipt, receiptArtifactHint, receiptRunId, and receiptMustBeWrittenAfter; pre-existing receipts at old deterministic paths are stale and must not be used, so stop with blocked:stale_receipt_artifact if the receipt was not freshly written for the current receiptRunId. `multi_agent_v1.spawn_agent`/opaque spawn_agent is not accepted for mutating command proof unless the parent has visible thread or durable receipt proof. In local Codex, default to `workerDispatch.preferredRuntime` (`visible-codex-app-thread`): discover Codex app thread tools if needed, then call `codex_app.list_projects` and `codex_app.create_thread` with a local project target; do not create a worktree for lane execution. If Codex app thread tools are unavailable but local Codex CLI is available, use durable streaming workers with `codex -a never -s danger-full-access -c model_reasoning_effort=
|
|
9
|
+
description: "Evergreen campaign setup plan/verify command. Use plan mode first to inspect exact workspace/sender/campaign/table/source state and receive immutable lane packets. `selectedSenderIds` is a legacy shorthand for both scopes; prefer `postEngagerSenderIds` for the Post Engagers sender scope and `sharedSenderIds` for the shared lane sender scope when they differ. `sharedSenderIds` must include every intended shared-lane sender, not only the named Post Engagers sender; when adding other senders to existing shared evergreen campaigns, resolve those sender ids with list_senders and pass the full shared set. If a protected existing Post Engagers campaign must stay unchanged and the operator requested only shared lane execution, pass postEngagerSenderIds:[] and sharedSenderIds; do not include the protected active Post Engagers lane as a reuse packet because it can make the yolo plan non-autoExecutable. The command plans one Post Engagers lane per post-engager sender plus shared Signal Discovery and Shared Cold Fallback lanes for the shared sender set. Non-archived PAUSED/ACTIVE/DRAFT shared campaigns/tables are the reusable targets; archived campaigns, archived tables, and archived waterfall bindings are stale inventory and must not be counted as valid evergreen slots. If an existing non-archived shared campaign is already attached to additional senders, plan reporting should count those attached senders as existing shared-lane membership rather than treating them as missing or duplicate slots. yolo is only a parent-skill auto-execution hint for safe lane packets; pass yolo only in plan mode and never include yolo on mode:\"verify\" calls. This backend command remains read-only in plan mode and verifies receipts in verify mode. Package-backed prompt authority: the installed public wrapper can be the local Codex skill entrypoint, but lane workers must use get_subskill_prompt and get_subskill_asset for nested `$sellable:create-campaign`, create-campaign-v2, generate-messages, validation, and assets; nested filesystem prompt fallback is a failed UAT. Use mcp__sellable only for workspace selection and product mutations/readbacks. Do not use mcp__sellable_admin, direct DB, Prisma, SQL, built-in web search, browser search, web.run, or any external browsing/search tool as execution or research proof; if Sellable MCP research tools are insufficient, write a blocked receipt instead of browsing externally. Worker-local replans are read-only drift checks and must preserve the exact parent sender scopes, including postEngagerSenderIds:[] when intentionally empty and the exact sharedSenderIds array; if scope, planRevision, actionId, or laneKey drifts, stop with blocked:worker_plan_scope_drift before mutation. Each lane packet includes workerDispatch with preferredRuntime, runtimeFallbackOrder, acceptedRuntimes, rejectedRuntimes, requiresVisibleThreadOrDurableReceipt, receiptArtifactHint, receiptRunId, and receiptMustBeWrittenAfter; pre-existing receipts at old deterministic paths are stale and must not be used, so stop with blocked:stale_receipt_artifact if the receipt was not freshly written for the current receiptRunId. `multi_agent_v1.spawn_agent`/opaque spawn_agent is not accepted for mutating command proof unless the parent has visible thread or durable receipt proof. In local Codex, default to `workerDispatch.preferredRuntime` (`visible-codex-app-thread`): discover Codex app thread tools if needed, then call `codex_app.list_projects` and `codex_app.create_thread` with a local project target; do not create a worktree for lane execution. If Codex app thread tools are unavailable but local Codex CLI is available, use durable streaming workers with `codex -a never -s danger-full-access -c model_reasoning_effort=high exec --skip-git-repo-check -m <worker-model> -C <repo> -o <worker-final-file> -` and include preferredRuntimeAttempt plus fallbackReason in createCampaignWorkflowReceipt; approval, sandbox, and reasoning-effort config flags must appear before `exec`, and current customer CLI installs reject `codex exec --ask-for-approval never` and `codex exec -a never`. Do not rely on default model or default reasoning effort: copy the parent model such as `gpt-5.6-sol` into `-m` and always pass `-c model_reasoning_effort=high`; a child worker that reports GPT 5.6-Sol with reasoning below high is a launcher bug to relaunch before mutation, not a user-continue path. Plan responses include approvalSummary; render approvalSummary when asking for bounded delegated approval because it explicitly lists campaignsToCreate, campaignsToUpdate, campaignsToVerifyOnly, campaignsLeftUntouched, attachedSenders, selectedActionIds, allowedSideEffects, forbiddenSideEffects, blockers, and approvalQuestion. When safe-yolo needs normal setup work, the parent skill may ask for bounded delegated approval: one approval over the current planRevision, selected action ids, caps, allowed side-effect classes, and stop conditions lets lane workers execute without per-substep approval while staying inside that packet. In exec/automation mode, do not call request_user_input; if yolo plan autoExecutable:false and no interactive approval can be received, stop with blocked:bounded_approval_unavailable_in_exec_mode before any mutation. Lane workers must explicitly load and use the installed `$sellable:create-campaign` wrapper as the nested workflow entrypoint, then load `create-campaign-v2` and `create-campaign-v2/core/flow.v2.json`; they must execute creation, source import, create-campaign workflow steps, generate-messages, sequence attachment, pause_campaign review-state transition when the current table is still DRAFT, and review readiness through that existing create-campaign workflow/subskills, then return receipts here for verification. Customer-visible verify receipts must set status:'succeeded' or status:'completed'; status:'passed', status:'pass', and status:'passed_with_warnings' are rejected as primary success statuses. Exception: a Post Engagers lane may write status:'blocked' with blocker:'post_engagers_no_sender_posts', 'post_engagers_no_recent_sender_posts', 'post_engagers_no_sender_owned_posts', or 'post_engagers_source_author_mismatch' when Sellable MCP readback proves no usable sender-authored posts/source exists; verify returns these as acceptedLaneBlockers so the parent can report the no-op instead of retrying invalid source repair. Any other blocked receipt, including model-quality/preflight or worker model availability blockers, is not a goal-complete success condition and must not let the parent report evergreen completion. Receipts must include createCampaignStepReceipt with setupPlanCall, createCampaignWorkflowReceipt, campaignBriefReceipt, sourceDecisionReceipt, filterDecisionReceipt, messageDraftingReceipt, reviewBatchReceipt, sequenceReceipt, and verifyCall nested inside createCampaignStepReceipt; top-level-only copies of those objects are not enough and are not promoted by verify. setupPlanCall must use canonical keys: planRevision, actionId, laneKey, workspaceId, senderIds, campaignId, tableId, createIntent. Do not use laneActionId, lanePacketActionId, delegatedPlanRevision, delegatedActionId, or requestedCall text as a substitute for those canonical fields. createCampaignWorkflowReceipt must include skillCommand:'$sellable:create-campaign', skillName:'create-campaign', wrapperSkillLoaded:true, workflowPromptName:'create-campaign-v2', workflowPromptLoadedToHasMoreFalse:true, workflowAssetPath:'create-campaign-v2/core/flow.v2.json', workflowAssetLoaded:true, workerRuntime, workerThreadId or receiptArtifactPath, durableReceiptWritten when using a receipt file, and notAdHoc:true; CLI durable fallback runtimes must also include preferredRuntimeAttempt for visible-codex-app-thread and fallbackReason. messageDraftingReceipt must use exactly statusSource:'branch' or statusSource:'packaged-generate-messages-worker'; descriptive aliases such as statusSource:'package-readback-local-thread' are rejected. It must include proof that generate-messages was loaded, start_campaign_message_preparation/get_campaign_message_preparation_status ran when the packaged worker path is used, validationResult:'passed', a passed qualityReview, and at least 3 concrete sampleMessages with rowId, generatedMessageText, verdict, and issues; Do not substitute `message` for `generatedMessageText`; Do not substitute `passVerdict` for `verdict`. Before writing durable receipts, run a receipt self-check: top-level `planRevision`, `actionId`, `laneKey`, `laneType`, `workspaceId`, and `senderIds` must exist; if the self-check fails, fix the receipt before ending. Use start_campaign_message_preparation with approvalMode:\"mark_ready\" only for evergreen setup. Never call `start_campaign_message_preparation` with `approvalMode:\"approve\"`; approve exactly one semantic Approved cell through select_campaign_cells/update_cell and final proof must show approvedGeneratedMessageCount exactly 1. Shared Cold Fallback samples with a standalone name followed by 'Hey there' are rejected. This command does not launch campaigns, does not schedule sends, does not assign scheduler-owned send fields, does not raw-write campaign status, does not archive/delete cleanup targets, and does not spend paid credits.",
|
|
10
10
|
inputSchema: {
|
|
11
11
|
type: "object",
|
|
12
12
|
properties: {
|
|
@@ -12,7 +12,7 @@ export interface WorkspaceContext {
|
|
|
12
12
|
executionMode: WorkspaceExecutionMode;
|
|
13
13
|
toolName?: string;
|
|
14
14
|
runId: string;
|
|
15
|
-
workspaceResolution: "explicit";
|
|
15
|
+
workspaceResolution: "explicit" | "locked_profile";
|
|
16
16
|
}
|
|
17
17
|
export interface WorkspaceRequiredResult {
|
|
18
18
|
ok: false;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { getLockedWorkspaceId, resolveWorkspaceIdForRequest, } from "../auth.js";
|
|
2
3
|
export function workspaceRequired(params) {
|
|
3
4
|
const toolLabel = params.toolName ? ` for ${params.toolName}` : "";
|
|
4
5
|
return {
|
|
@@ -15,11 +16,13 @@ export function normalizeExplicitWorkspaceId(value) {
|
|
|
15
16
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
16
17
|
}
|
|
17
18
|
export function workspaceRequestOptions(workspaceId) {
|
|
18
|
-
const normalized = normalizeExplicitWorkspaceId(workspaceId);
|
|
19
|
+
const normalized = resolveWorkspaceIdForRequest(normalizeExplicitWorkspaceId(workspaceId), "workspace request options");
|
|
19
20
|
return normalized ? Object.freeze({ workspaceId: normalized }) : undefined;
|
|
20
21
|
}
|
|
21
22
|
export function createWorkspaceContext(input) {
|
|
22
|
-
const
|
|
23
|
+
const explicitWorkspaceId = normalizeExplicitWorkspaceId(input.workspaceId);
|
|
24
|
+
const lockedWorkspaceId = getLockedWorkspaceId();
|
|
25
|
+
const workspaceId = resolveWorkspaceIdForRequest(explicitWorkspaceId, input.toolName || "workspace context");
|
|
23
26
|
if (!workspaceId) {
|
|
24
27
|
return workspaceRequired({
|
|
25
28
|
executionMode: input.executionMode,
|
|
@@ -33,7 +36,9 @@ export function createWorkspaceContext(input) {
|
|
|
33
36
|
executionMode: input.executionMode,
|
|
34
37
|
toolName: input.toolName,
|
|
35
38
|
runId: input.runId?.trim() || randomUUID(),
|
|
36
|
-
workspaceResolution:
|
|
39
|
+
workspaceResolution: lockedWorkspaceId && !explicitWorkspaceId
|
|
40
|
+
? "locked_profile"
|
|
41
|
+
: "explicit",
|
|
37
42
|
});
|
|
38
43
|
return { ok: true, context };
|
|
39
44
|
}
|
|
@@ -4,7 +4,7 @@ import { lstat, mkdir, readFile, rename, rm, writeFile, } from "node:fs/promises
|
|
|
4
4
|
import { tmpdir } from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { getApi } from "../api.js";
|
|
7
|
-
import { getConfig } from "../auth.js";
|
|
7
|
+
import { getConfig, getEffectiveConfiguredWorkspaceId } from "../auth.js";
|
|
8
8
|
const MAX_FILTER_IDS = 100;
|
|
9
9
|
const MAX_QUERY_LENGTH = 8000;
|
|
10
10
|
export const workspaceExportToolDefinitions = [
|
|
@@ -340,7 +340,7 @@ async function writeJsonAtomic(filePath, value) {
|
|
|
340
340
|
}
|
|
341
341
|
export async function exportWorkspaceCsv(input = {}) {
|
|
342
342
|
const config = getConfig();
|
|
343
|
-
const workspaceId = config
|
|
343
|
+
const workspaceId = getEffectiveConfiguredWorkspaceId(config);
|
|
344
344
|
if (!workspaceId) {
|
|
345
345
|
throw new Error("No active workspace selected. Run list_workspaces then set_active_workspace before export_workspace_csv.");
|
|
346
346
|
}
|
|
@@ -140,21 +140,56 @@ export declare const workspaceToolDefinitions: ({
|
|
|
140
140
|
})[];
|
|
141
141
|
export declare function listWorkspaces(): Promise<{
|
|
142
142
|
workspaces: WorkspaceSummary[];
|
|
143
|
+
workspaceLock: {
|
|
144
|
+
enabled: boolean;
|
|
145
|
+
workspaceId?: undefined;
|
|
146
|
+
hiddenWorkspaceCount?: undefined;
|
|
147
|
+
};
|
|
148
|
+
} | {
|
|
149
|
+
workspaces: WorkspaceSummary[];
|
|
150
|
+
workspaceLock: {
|
|
151
|
+
enabled: boolean;
|
|
152
|
+
workspaceId: string;
|
|
153
|
+
hiddenWorkspaceCount: number;
|
|
154
|
+
};
|
|
143
155
|
}>;
|
|
144
156
|
export declare function getActiveWorkspace(): {
|
|
145
157
|
activeWorkspaceId: string | null;
|
|
146
158
|
activeWorkspaceName: string | null;
|
|
159
|
+
workspaceLock: {
|
|
160
|
+
enabled: boolean;
|
|
161
|
+
workspaceId: string;
|
|
162
|
+
} | {
|
|
163
|
+
enabled: boolean;
|
|
164
|
+
workspaceId?: undefined;
|
|
165
|
+
};
|
|
147
166
|
};
|
|
148
167
|
export declare function getWorkspace(workspaceId: string): Promise<{
|
|
168
|
+
ok: boolean;
|
|
169
|
+
error: string;
|
|
170
|
+
workspace?: undefined;
|
|
171
|
+
} | {
|
|
149
172
|
workspace: WorkspaceDetails;
|
|
173
|
+
ok?: undefined;
|
|
174
|
+
error?: undefined;
|
|
150
175
|
}>;
|
|
151
176
|
export declare function setActiveWorkspace(workspaceId: string, userConfirmed?: boolean): Promise<{
|
|
152
177
|
ok: boolean;
|
|
178
|
+
code: string;
|
|
179
|
+
activeWorkspaceId: string;
|
|
180
|
+
requestedWorkspaceId: string;
|
|
153
181
|
error: string;
|
|
154
182
|
requiresConfirmation?: undefined;
|
|
155
|
-
activeWorkspaceId?: undefined;
|
|
156
183
|
activeWorkspaceName?: undefined;
|
|
184
|
+
requestedWorkspaceName?: undefined;
|
|
185
|
+
} | {
|
|
186
|
+
ok: boolean;
|
|
187
|
+
error: string;
|
|
188
|
+
code?: undefined;
|
|
189
|
+
activeWorkspaceId?: undefined;
|
|
157
190
|
requestedWorkspaceId?: undefined;
|
|
191
|
+
requiresConfirmation?: undefined;
|
|
192
|
+
activeWorkspaceName?: undefined;
|
|
158
193
|
requestedWorkspaceName?: undefined;
|
|
159
194
|
} | {
|
|
160
195
|
ok: boolean;
|
|
@@ -164,22 +199,33 @@ export declare function setActiveWorkspace(workspaceId: string, userConfirmed?:
|
|
|
164
199
|
requestedWorkspaceId: string;
|
|
165
200
|
requestedWorkspaceName: string;
|
|
166
201
|
error: string;
|
|
202
|
+
code?: undefined;
|
|
167
203
|
} | {
|
|
168
204
|
ok: boolean;
|
|
169
205
|
activeWorkspaceId: string;
|
|
170
206
|
activeWorkspaceName: string;
|
|
207
|
+
code?: undefined;
|
|
208
|
+
requestedWorkspaceId?: undefined;
|
|
171
209
|
error?: undefined;
|
|
172
210
|
requiresConfirmation?: undefined;
|
|
173
|
-
requestedWorkspaceId?: undefined;
|
|
174
211
|
requestedWorkspaceName?: undefined;
|
|
175
212
|
}>;
|
|
176
213
|
export declare function createWorkspace(name: string): Promise<{
|
|
214
|
+
ok: boolean;
|
|
215
|
+
code: string;
|
|
216
|
+
activeWorkspaceId: string;
|
|
217
|
+
error: string;
|
|
218
|
+
workspace?: undefined;
|
|
219
|
+
} | {
|
|
177
220
|
workspace: {
|
|
178
221
|
id: string;
|
|
179
222
|
name: string;
|
|
180
223
|
slug: string;
|
|
181
224
|
};
|
|
182
225
|
activeWorkspaceId: string;
|
|
226
|
+
ok?: undefined;
|
|
227
|
+
code?: undefined;
|
|
228
|
+
error?: undefined;
|
|
183
229
|
}>;
|
|
184
230
|
export declare function addTeammate(input: {
|
|
185
231
|
workspaceId?: string;
|
package/dist/tools/workspaces.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getApi, resetApi } from "../api.js";
|
|
2
|
-
import { getConfig, updateActiveWorkspace } from "../auth.js";
|
|
2
|
+
import { getConfig, getEffectiveConfiguredWorkspaceId, getLockedWorkspaceId, resolveWorkspaceIdForRequest, updateActiveWorkspace, } from "../auth.js";
|
|
3
3
|
export const workspaceToolDefinitions = [
|
|
4
4
|
{
|
|
5
5
|
name: "list_workspaces",
|
|
@@ -81,21 +81,53 @@ export const workspaceToolDefinitions = [
|
|
|
81
81
|
export async function listWorkspaces() {
|
|
82
82
|
const api = getApi();
|
|
83
83
|
const { workspaces } = await api.get("/api/v3/workspaces");
|
|
84
|
-
|
|
84
|
+
const lockedWorkspaceId = getLockedWorkspaceId();
|
|
85
|
+
if (!lockedWorkspaceId) {
|
|
86
|
+
return { workspaces, workspaceLock: { enabled: false } };
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
workspaces: workspaces.filter((ws) => ws.id === lockedWorkspaceId),
|
|
90
|
+
workspaceLock: {
|
|
91
|
+
enabled: true,
|
|
92
|
+
workspaceId: lockedWorkspaceId,
|
|
93
|
+
hiddenWorkspaceCount: workspaces.filter((ws) => ws.id !== lockedWorkspaceId).length,
|
|
94
|
+
},
|
|
95
|
+
};
|
|
85
96
|
}
|
|
86
97
|
export function getActiveWorkspace() {
|
|
87
98
|
const config = getConfig();
|
|
99
|
+
const lockedWorkspaceId = getLockedWorkspaceId();
|
|
88
100
|
return {
|
|
89
|
-
activeWorkspaceId: config
|
|
101
|
+
activeWorkspaceId: getEffectiveConfiguredWorkspaceId(config),
|
|
90
102
|
activeWorkspaceName: config.activeWorkspaceName || null,
|
|
103
|
+
workspaceLock: lockedWorkspaceId
|
|
104
|
+
? { enabled: true, workspaceId: lockedWorkspaceId }
|
|
105
|
+
: { enabled: false },
|
|
91
106
|
};
|
|
92
107
|
}
|
|
93
108
|
export async function getWorkspace(workspaceId) {
|
|
109
|
+
const allowedWorkspaceId = resolveWorkspaceIdForRequest(workspaceId, "get_workspace");
|
|
110
|
+
if (!allowedWorkspaceId) {
|
|
111
|
+
return {
|
|
112
|
+
ok: false,
|
|
113
|
+
error: "No active workspace selected.",
|
|
114
|
+
};
|
|
115
|
+
}
|
|
94
116
|
const api = getApi();
|
|
95
|
-
const { workspace } = await api.get(`/api/v3/workspaces/${encodeURIComponent(
|
|
117
|
+
const { workspace } = await api.get(`/api/v3/workspaces/${encodeURIComponent(allowedWorkspaceId)}`);
|
|
96
118
|
return { workspace };
|
|
97
119
|
}
|
|
98
120
|
export async function setActiveWorkspace(workspaceId, userConfirmed) {
|
|
121
|
+
const lockedWorkspaceId = getLockedWorkspaceId();
|
|
122
|
+
if (lockedWorkspaceId && workspaceId !== lockedWorkspaceId) {
|
|
123
|
+
return {
|
|
124
|
+
ok: false,
|
|
125
|
+
code: "WORKSPACE_LOCKED",
|
|
126
|
+
activeWorkspaceId: lockedWorkspaceId,
|
|
127
|
+
requestedWorkspaceId: workspaceId,
|
|
128
|
+
error: "This Hermes profile is locked to its customer workspace and cannot switch workspaces.",
|
|
129
|
+
};
|
|
130
|
+
}
|
|
99
131
|
const api = getApi();
|
|
100
132
|
const { workspaces } = await api.get("/api/v3/workspaces");
|
|
101
133
|
const match = workspaces.find((ws) => ws.id === workspaceId);
|
|
@@ -131,6 +163,15 @@ export async function setActiveWorkspace(workspaceId, userConfirmed) {
|
|
|
131
163
|
};
|
|
132
164
|
}
|
|
133
165
|
export async function createWorkspace(name) {
|
|
166
|
+
const lockedWorkspaceId = getLockedWorkspaceId();
|
|
167
|
+
if (lockedWorkspaceId) {
|
|
168
|
+
return {
|
|
169
|
+
ok: false,
|
|
170
|
+
code: "WORKSPACE_LOCKED",
|
|
171
|
+
activeWorkspaceId: lockedWorkspaceId,
|
|
172
|
+
error: "This Hermes profile is locked to its customer workspace and cannot create or switch workspaces. Use the sellable-admin profile for provisioning.",
|
|
173
|
+
};
|
|
174
|
+
}
|
|
134
175
|
const api = getApi();
|
|
135
176
|
const { workspace } = await api.post("/api/v3/workspaces", { name });
|
|
136
177
|
updateActiveWorkspace({
|
|
@@ -146,7 +187,9 @@ export async function createWorkspace(name) {
|
|
|
146
187
|
export async function addTeammate(input) {
|
|
147
188
|
const args = input || {};
|
|
148
189
|
const config = getConfig();
|
|
149
|
-
const workspaceId = args.workspaceId ||
|
|
190
|
+
const workspaceId = resolveWorkspaceIdForRequest(args.workspaceId ||
|
|
191
|
+
getEffectiveConfiguredWorkspaceId(config) ||
|
|
192
|
+
undefined, "add_teammate");
|
|
150
193
|
if (!workspaceId) {
|
|
151
194
|
return {
|
|
152
195
|
ok: false,
|
package/package.json
CHANGED
|
@@ -721,7 +721,7 @@ Treat host capabilities as concrete functions, not prose conventions:
|
|
|
721
721
|
import and before dispatching Message Drafting only.
|
|
722
722
|
- `launch_message_drafting`: Claude Code uses `Task` with `subagent_type`
|
|
723
723
|
`post-find-leads-message-scout` when listed; Codex uses the returned
|
|
724
|
-
compatibility agent or a generic `gpt-5.
|
|
724
|
+
compatibility agent or a generic `gpt-5.6-sol` / `high` Message Drafting agent.
|
|
725
725
|
|
|
726
726
|
If a required interactive question function or MCP loader is missing, stop and
|
|
727
727
|
explain the Sellable install/reload problem. Source work uses product-native MCP
|
|
@@ -1082,8 +1082,8 @@ updates.
|
|
|
1082
1082
|
In Codex, the filter-choice answer is the campaign-scoped go-ahead to use
|
|
1083
1083
|
this single Message Drafting background agent in step-wise and YOLO modes.
|
|
1084
1084
|
Do not ask a separate question to start it. If the named custom agent is not
|
|
1085
|
-
available, spawn a generic background agent with `model: "gpt-5.
|
|
1086
|
-
`reasoning_effort: "
|
|
1085
|
+
available, spawn a generic background agent with `model: "gpt-5.6-sol"` and
|
|
1086
|
+
`reasoning_effort: "high"` using the same lean campaign/table basis. If no
|
|
1087
1087
|
background-agent tool is callable, start the same full message branch inline
|
|
1088
1088
|
before filter drafting or skip-filter message review and record it as
|
|
1089
1089
|
`statusSource: "parent-thread-fallback"`.
|
|
@@ -291,7 +291,7 @@ in the branch read means "filters still owned by parent," not `blocked`.
|
|
|
291
291
|
|
|
292
292
|
Keep the handoff lean: `campaignId`, `workflowTableId`, concise brief/source summary, source-use rule, and 3-5 sample rows (`rowId`, name, title, company, signal). Do not paste copied row counts, hashes, full row IDs, broad row data, or local debug artifacts.
|
|
293
293
|
|
|
294
|
-
Route user copy feedback before `approve-message` back to Message Drafting; parent does not rewrite. The branch loads the full `generate-messages` prompt, every required asset, then `get_subskill_prompt({ subskillName: "create-campaign-v2-validation" })`; do not render `renderedFallbackSample`, concerns, or `qaReceipt` in the happy path. Generic fallback is `gpt-5.
|
|
294
|
+
Route user copy feedback before `approve-message` back to Message Drafting; parent does not rewrite. The branch loads the full `generate-messages` prompt, every required asset, then `get_subskill_prompt({ subskillName: "create-campaign-v2-validation" })`; do not render `renderedFallbackSample`, concerns, or `qaReceipt` in the happy path. Generic fallback is `gpt-5.6-sol` / `high` Message Drafting. Handoff is labeled Markdown, not raw JSON.
|
|
295
295
|
|
|
296
296
|
## Hard Gates
|
|
297
297
|
|
|
@@ -437,7 +437,7 @@ fallback only when app thread tools are unavailable; the receipt must include
|
|
|
437
437
|
`fallbackReason`, or backend verify rejects it.
|
|
438
438
|
When visible Codex app thread tools are unavailable but local Codex CLI is
|
|
439
439
|
available, the accepted durable streaming-worker command shape is:
|
|
440
|
-
`codex -a never -s danger-full-access -c model_reasoning_effort=
|
|
440
|
+
`codex -a never -s danger-full-access -c model_reasoning_effort=high exec --skip-git-repo-check -m <worker-model> -C <repo> -o <worker-final-file> -`.
|
|
441
441
|
The approval, sandbox, and reasoning-effort config flags must come before the
|
|
442
442
|
`exec` subcommand for Codex CLI builds that expose `-a`/`-s`/`-c` only at top
|
|
443
443
|
level. `--skip-git-repo-check` belongs after `exec` because current customer and VPS Codex CLI builds expose it
|
|
@@ -447,26 +447,26 @@ forms fail on current customer CLI installs. Pipe the lane packet prompt on
|
|
|
447
447
|
stdin, require the worker to write `workerDispatch.receiptArtifactHint`, and
|
|
448
448
|
pass exactly one lane packet per worker.
|
|
449
449
|
When launching durable Codex CLI workers from an automation parent, pass an
|
|
450
|
-
explicit supported worker model and explicit `
|
|
450
|
+
explicit supported worker model and explicit `high` reasoning effort instead
|
|
451
451
|
of relying on the Codex CLI defaults. Use the parent runtime model when known,
|
|
452
452
|
for example:
|
|
453
|
-
`codex -a never -s danger-full-access -c model_reasoning_effort=
|
|
453
|
+
`codex -a never -s danger-full-access -c model_reasoning_effort=high exec --skip-git-repo-check -m <worker-model> -C <repo> -o <worker-final-file> -`.
|
|
454
454
|
In Codex CLI, the parent runtime model is visible in the run header as
|
|
455
455
|
`model: <model-name>`. Copy that exact model string into child worker launches
|
|
456
|
-
first. If the parent header says `model: gpt-5.
|
|
457
|
-
`-m gpt-5.
|
|
456
|
+
first. If the parent header says `model: gpt-5.6-sol`, launch workers with
|
|
457
|
+
`-m gpt-5.6-sol` plus `-c model_reasoning_effort=high`; do not invent or probe
|
|
458
458
|
nearby aliases such as `gpt-5.3-codex`, `gpt-5.2`, `gpt-5-codex`,
|
|
459
459
|
`codex-latest`, or `codex-mini-latest` before trying the exact parent model. A
|
|
460
|
-
one-line probe must include the same `-c model_reasoning_effort=
|
|
460
|
+
one-line probe must include the same `-c model_reasoning_effort=high` override
|
|
461
461
|
and count as supported only when it exits 0 and returns the requested output; a
|
|
462
462
|
session header followed by a `not supported` error is rejected, not accepted.
|
|
463
463
|
Do not rely on the Codex CLI default model or default reasoning effort; some
|
|
464
|
-
customer and VPS installs default to unavailable model aliases or to
|
|
465
|
-
|
|
466
|
-
with `high
|
|
467
|
-
`
|
|
464
|
+
customer and VPS installs default to unavailable model aliases or to reasoning
|
|
465
|
+
below `high`. `-m gpt-5.6-sol` alone is not enough. If a child worker reports GPT 5.6-Sol
|
|
466
|
+
with reasoning below `high`, treat that as a launcher bug, relaunch with the explicit
|
|
467
|
+
`high` config before mutation, and do not ask the user to continue through the
|
|
468
468
|
model-quality warning. If the parent cannot identify a supported worker model
|
|
469
|
-
and launch it with `
|
|
469
|
+
and launch it with `high` reasoning, stop with
|
|
470
470
|
`blocked: worker_model_unavailable` before mutation.
|
|
471
471
|
When wrapping multiple local Codex CLI workers in a shell launcher, run the
|
|
472
472
|
wrapper with `/bin/bash -lc` or another explicitly chosen portable shell. Do not
|
|
@@ -479,7 +479,7 @@ Do not embed `<<'WORKER_PROMPT'` heredocs inside a single quoted or double
|
|
|
479
479
|
quoted `/bin/bash -lc '...'` command string; nested quoting is brittle and can
|
|
480
480
|
truncate the first worker before mutation. For multi-worker launchers, write one
|
|
481
481
|
plain prompt file per lane under the current run directory, then start each
|
|
482
|
-
worker with `codex -a never -s danger-full-access -c model_reasoning_effort=
|
|
482
|
+
worker with `codex -a never -s danger-full-access -c model_reasoning_effort=high exec --skip-git-repo-check -m "$WORKER_MODEL" -C "$REPO" -o
|
|
483
483
|
"$worker_final_file" - < "$worker_prompt_file"`. Keep launcher shell variables
|
|
484
484
|
double-quoted and keep the prompt heredoc only in a standalone script/prompt-file
|
|
485
485
|
write step, not inside an already quoted shell argument. If the first launcher
|
|
@@ -585,7 +585,7 @@ launchers, write the same prompt body to `<worker-prompt-file>` and launch the
|
|
|
585
585
|
worker with stdin redirected from that file:
|
|
586
586
|
|
|
587
587
|
```
|
|
588
|
-
codex -a never -s danger-full-access -c model_reasoning_effort=
|
|
588
|
+
codex -a never -s danger-full-access -c model_reasoning_effort=high exec --skip-git-repo-check -m <worker-model> -C <repo> -o <worker-final-file> - <<'WORKER_PROMPT'
|
|
589
589
|
Use $sellable:create-campaign as the governing campaign workflow for this one lane worker.
|
|
590
590
|
Use the evergreen plan/packet below only for lane scope, source metadata,
|
|
591
591
|
postconditions, side-effect caps, and durable receipt proof.
|
|
@@ -632,10 +632,10 @@ Do not launch, start, schedule, send, or use paid InMail.
|
|
|
632
632
|
For filter proof, durable receipt status must be `filterDecisionReceipt.status:"applied"` only; never `completed`, `confirmed`, `done`, or aliases.
|
|
633
633
|
For generated messages, `update_cell` is allowed only for the semantic Approved checkbox. Never use `update_cell` for generated message text/body/sample copy. Bad copy requires `revise_message_template_and_rerun` or brief/template revision plus Generate Message rerun. Any generated-message cell override is `blocked: generated_message_cell_override`.
|
|
634
634
|
If `bootstrap_create_campaign.modelQuality.status === "warn"` because the child
|
|
635
|
-
worker reports GPT 5.
|
|
635
|
+
worker reports GPT 5.6-Sol with reasoning below `high`, that is a parent launcher
|
|
636
636
|
configuration bug, not an operator approval path inside the worker. Stop before
|
|
637
637
|
mutation, tell the parent to relaunch this lane with
|
|
638
|
-
`-c model_reasoning_effort=
|
|
638
|
+
`-c model_reasoning_effort=high`, and do not mark the worker goal complete.
|
|
639
639
|
Complete only this lane. Do not end with narration only. Before your final
|
|
640
640
|
response, run a local file-existence and JSON self-check for
|
|
641
641
|
<receiptArtifactPath>. If the lane succeeded, write the canonical success
|
|
@@ -656,7 +656,7 @@ receipt, or an accepted Post Engagers no-source blocked/no-op receipt.
|
|
|
656
656
|
WORKER_PROMPT
|
|
657
657
|
|
|
658
658
|
# Multi-worker launcher equivalent:
|
|
659
|
-
codex -a never -s danger-full-access -c model_reasoning_effort=
|
|
659
|
+
codex -a never -s danger-full-access -c model_reasoning_effort=high exec --skip-git-repo-check -m <worker-model> -C <repo> -o <worker-final-file> - < <worker-prompt-file>
|
|
660
660
|
```
|
|
661
661
|
|
|
662
662
|
If any placeholder cannot be filled from the current plan, matching
|