greprag 5.60.4 → 5.60.6
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/codex-chip-hooks.d.ts +2 -7
- package/dist/codex-chip-hooks.js +29 -153
- package/dist/codex-chip-hooks.js.map +1 -1
- package/dist/codex-steering.d.ts +2 -1
- package/dist/codex-steering.js +8 -5
- package/dist/codex-steering.js.map +1 -1
- package/dist/commands/codex-chip/bootstrap.d.ts +12 -0
- package/dist/commands/codex-chip/bootstrap.js +114 -0
- package/dist/commands/codex-chip/bootstrap.js.map +1 -0
- package/dist/commands/codex-chip/breakthrough-command.js +0 -7
- package/dist/commands/codex-chip/breakthrough-command.js.map +1 -1
- package/dist/commands/codex-chip/cleanup-command.js +21 -11
- package/dist/commands/codex-chip/cleanup-command.js.map +1 -1
- package/dist/commands/codex-chip/command.js +27 -49
- package/dist/commands/codex-chip/command.js.map +1 -1
- package/dist/commands/codex-chip/git.d.ts +19 -4
- package/dist/commands/codex-chip/git.js +82 -14
- package/dist/commands/codex-chip/git.js.map +1 -1
- package/dist/commands/codex-chip/goals.d.ts +9 -9
- package/dist/commands/codex-chip/goals.js +33 -73
- package/dist/commands/codex-chip/goals.js.map +1 -1
- package/dist/commands/codex-chip/help.d.ts +1 -1
- package/dist/commands/codex-chip/help.js +14 -25
- package/dist/commands/codex-chip/help.js.map +1 -1
- package/dist/commands/codex-chip/lifecycle.d.ts +4 -1
- package/dist/commands/codex-chip/lifecycle.js +14 -3
- package/dist/commands/codex-chip/lifecycle.js.map +1 -1
- package/dist/commands/codex-chip/model.d.ts +5 -1
- package/dist/commands/codex-chip/model.js.map +1 -1
- package/dist/commands/codex-chip/naming.js +4 -10
- package/dist/commands/codex-chip/naming.js.map +1 -1
- package/dist/commands/codex-chip/native.js +11 -19
- package/dist/commands/codex-chip/native.js.map +1 -1
- package/dist/commands/codex-chip/prompt.d.ts +2 -1
- package/dist/commands/codex-chip/prompt.js +20 -57
- package/dist/commands/codex-chip/prompt.js.map +1 -1
- package/dist/commands/codex-chip/resume-command.js +1 -4
- package/dist/commands/codex-chip/resume-command.js.map +1 -1
- package/dist/commands/codex-chip/selection.js +14 -55
- package/dist/commands/codex-chip/selection.js.map +1 -1
- package/dist/commands/codex-chip/worker.js +114 -44
- package/dist/commands/codex-chip/worker.js.map +1 -1
- package/dist/commands/codex-delivery.d.ts +32 -7
- package/dist/commands/codex-delivery.js +76 -92
- package/dist/commands/codex-delivery.js.map +1 -1
- package/dist/commands/codex-startup.js +1 -1
- package/dist/commands/codex-startup.js.map +1 -1
- package/dist/commands/codex-watch-health.d.ts +11 -0
- package/dist/commands/codex-watch-health.js +54 -0
- package/dist/commands/codex-watch-health.js.map +1 -1
- package/dist/commands/codex.js +39 -33
- package/dist/commands/codex.js.map +1 -1
- package/dist/commands/friction-reminder.d.ts +9 -9
- package/dist/commands/friction-reminder.js +12 -17
- package/dist/commands/friction-reminder.js.map +1 -1
- package/dist/commands/inbox-primer-reminder.js +3 -3
- package/dist/commands/inbox-primer-reminder.js.map +1 -1
- package/dist/commands/init.js +7 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/load-primer-reminder.js +2 -2
- package/dist/commands/load-primer-reminder.js.map +1 -1
- package/dist/commands/load.js +28 -27
- package/dist/commands/load.js.map +1 -1
- package/dist/commands/mechanic-spawn.d.ts +10 -0
- package/dist/commands/mechanic-spawn.js +67 -0
- package/dist/commands/mechanic-spawn.js.map +1 -0
- package/dist/commands/mechanic.js +6 -0
- package/dist/commands/mechanic.js.map +1 -1
- package/dist/commands/opencode-chip-lifecycle.d.ts +2 -0
- package/dist/commands/opencode-chip-lifecycle.js +137 -0
- package/dist/commands/opencode-chip-lifecycle.js.map +1 -0
- package/dist/commands/opencode-chip-mission.js +19 -0
- package/dist/commands/opencode-chip-mission.js.map +1 -1
- package/dist/commands/opencode-chip-store.d.ts +19 -1
- package/dist/commands/opencode-chip-store.js.map +1 -1
- package/dist/commands/opencode-chip.js +30 -13
- package/dist/commands/opencode-chip.js.map +1 -1
- package/dist/commands/opencode-goals.d.ts +5 -0
- package/dist/commands/opencode-goals.js +83 -0
- package/dist/commands/opencode-goals.js.map +1 -0
- package/dist/hook.js +8 -3
- package/dist/hook.js.map +1 -1
- package/dist/index.js +5 -90
- package/dist/index.js.map +1 -1
- package/dist/opencode-plugin.bundle.js +9 -11
- package/package.json +1 -1
- package/skill/greprag/SKILL.md +2 -2
- package/skill/greprag/docs/codex-chip.md +20 -64
- package/skill/greprag/docs/setup.md +15 -21
- package/skill/mechanic/SKILL.md +24 -0
- package/skill/templates/chip-bootloader.md +15 -10
- package/skill/templates/chip-leader-opencode.md +64 -50
- package/skill/templates/chip-leader.md +81 -221
- package/skill/templates/codex-chip-spawn.md +150 -174
- package/skill/templates/codex-subagent-spawn.md +32 -0
- package/dist/commands/codex-native-delivery.d.ts +0 -70
- package/dist/commands/codex-native-delivery.js +0 -285
- package/dist/commands/codex-native-delivery.js.map +0 -1
- package/skill/templates/reflex-chip.md +0 -58
- package/skill/templates/workshop-chip.md +0 -46
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.deliveryNonce = deliveryNonce;
|
|
37
|
-
exports.deliveryAckMarker = deliveryAckMarker;
|
|
38
|
-
exports.readNativeEnvelope = readNativeEnvelope;
|
|
39
|
-
exports.queueNativeEnvelope = queueNativeEnvelope;
|
|
40
|
-
exports.markNativeDelivered = markNativeDelivered;
|
|
41
|
-
exports.acknowledgeNativeDelivery = acknowledgeNativeDelivery;
|
|
42
|
-
exports.markNativeActed = markNativeActed;
|
|
43
|
-
exports.markNativeDegraded = markNativeDegraded;
|
|
44
|
-
exports.loadNativeCodexSender = loadNativeCodexSender;
|
|
45
|
-
exports.nativeAdapterConfigured = nativeAdapterConfigured;
|
|
46
|
-
exports.deliverViaNativeCodex = deliverViaNativeCodex;
|
|
47
|
-
const crypto = __importStar(require("crypto"));
|
|
48
|
-
const fs = __importStar(require("fs"));
|
|
49
|
-
const os = __importStar(require("os"));
|
|
50
|
-
const path = __importStar(require("path"));
|
|
51
|
-
const proc_1 = require("../proc");
|
|
52
|
-
function home() { return process.env.HOME || process.env.USERPROFILE || os.homedir(); }
|
|
53
|
-
function stateDir() { return path.join(home(), '.greprag', 'codex', 'breakthroughs'); }
|
|
54
|
-
function statePath(messageId) {
|
|
55
|
-
const key = crypto.createHash('sha256').update(messageId).digest('hex');
|
|
56
|
-
return path.join(stateDir(), `${key}.json`);
|
|
57
|
-
}
|
|
58
|
-
function writeEnvelope(envelope) {
|
|
59
|
-
const dir = stateDir();
|
|
60
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
61
|
-
const destination = statePath(envelope.messageId);
|
|
62
|
-
const temporary = `${destination}.${process.pid}.tmp`;
|
|
63
|
-
fs.writeFileSync(temporary, JSON.stringify(envelope, null, 2));
|
|
64
|
-
fs.renameSync(temporary, destination);
|
|
65
|
-
return envelope;
|
|
66
|
-
}
|
|
67
|
-
function deliveryNonce(messageId) {
|
|
68
|
-
return crypto.createHash('sha256').update(`greprag-breakthrough:${messageId}`).digest('hex').slice(0, 32);
|
|
69
|
-
}
|
|
70
|
-
function deliveryAckMarker(messageId) {
|
|
71
|
-
return `BREAKTHROUGH_ACK:${deliveryNonce(messageId)}`;
|
|
72
|
-
}
|
|
73
|
-
function readNativeEnvelope(messageId) {
|
|
74
|
-
try {
|
|
75
|
-
return JSON.parse(fs.readFileSync(statePath(messageId), 'utf8'));
|
|
76
|
-
}
|
|
77
|
-
catch {
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
function queueNativeEnvelope(messageId, targetSession, summary, nonce) {
|
|
82
|
-
const existing = readNativeEnvelope(messageId);
|
|
83
|
-
if (existing) {
|
|
84
|
-
if (existing.targetSession !== targetSession) {
|
|
85
|
-
throw new Error('Native breakthrough message cannot change target session on retry.');
|
|
86
|
-
}
|
|
87
|
-
if (nonce && existing.nonce !== nonce) {
|
|
88
|
-
throw new Error('Native breakthrough retry supplied a different nonce.');
|
|
89
|
-
}
|
|
90
|
-
return existing;
|
|
91
|
-
}
|
|
92
|
-
return writeEnvelope({
|
|
93
|
-
version: 1, messageId, nonce: nonce || deliveryNonce(messageId), targetSession,
|
|
94
|
-
summary: summary.trim(), state: 'queued', attempts: 0, requestedAt: new Date().toISOString(),
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
function updateNativeEnvelope(messageId, mutate) {
|
|
98
|
-
const current = readNativeEnvelope(messageId);
|
|
99
|
-
if (!current)
|
|
100
|
-
throw new Error(`Unknown native breakthrough message ${messageId}.`);
|
|
101
|
-
return writeEnvelope(mutate(current));
|
|
102
|
-
}
|
|
103
|
-
function markNativeDelivered(messageId) {
|
|
104
|
-
return updateNativeEnvelope(messageId, current => {
|
|
105
|
-
if (current.state === 'native-delivered' || current.state === 'acknowledged' || current.state === 'acted')
|
|
106
|
-
return current;
|
|
107
|
-
return {
|
|
108
|
-
...current, state: 'native-delivered', attempts: current.attempts + 1,
|
|
109
|
-
nativeDeliveredAt: current.nativeDeliveredAt || new Date().toISOString(), lastError: undefined,
|
|
110
|
-
};
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
/** ACK mutates the original nonce only. It never sends a reply message. */
|
|
114
|
-
function acknowledgeNativeDelivery(messageId, nonce, action) {
|
|
115
|
-
return updateNativeEnvelope(messageId, current => {
|
|
116
|
-
if (current.nonce !== nonce)
|
|
117
|
-
throw new Error('Native breakthrough ACK nonce does not match the original envelope.');
|
|
118
|
-
if (current.state === 'acted')
|
|
119
|
-
return current;
|
|
120
|
-
return {
|
|
121
|
-
...current, state: current.state === 'acknowledged' ? current.state : 'acknowledged',
|
|
122
|
-
acknowledgedAt: current.acknowledgedAt || new Date().toISOString(),
|
|
123
|
-
action: action.trim(), lastError: undefined,
|
|
124
|
-
};
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
function markNativeActed(messageId, nonce, action) {
|
|
128
|
-
const acknowledged = acknowledgeNativeDelivery(messageId, nonce, action);
|
|
129
|
-
if (acknowledged.state === 'acted')
|
|
130
|
-
return acknowledged;
|
|
131
|
-
return updateNativeEnvelope(messageId, current => ({
|
|
132
|
-
...current, state: 'acted', actedAt: current.actedAt || new Date().toISOString(),
|
|
133
|
-
}));
|
|
134
|
-
}
|
|
135
|
-
function markNativeDegraded(messageId, error) {
|
|
136
|
-
return updateNativeEnvelope(messageId, current => ({
|
|
137
|
-
...current,
|
|
138
|
-
state: current.state === 'native-delivered' || current.state === 'acknowledged' || current.state === 'acted'
|
|
139
|
-
? current.state : 'degraded',
|
|
140
|
-
attempts: current.state === 'native-delivered' || current.state === 'acknowledged' || current.state === 'acted'
|
|
141
|
-
? current.attempts : current.attempts + 1,
|
|
142
|
-
lastError: current.state === 'native-delivered' || current.state === 'acknowledged' || current.state === 'acted'
|
|
143
|
-
? current.lastError : error,
|
|
144
|
-
}));
|
|
145
|
-
}
|
|
146
|
-
function adapterFunction(value) {
|
|
147
|
-
if (typeof value === 'function')
|
|
148
|
-
return async (request) => value(request);
|
|
149
|
-
return null;
|
|
150
|
-
}
|
|
151
|
-
/** Codex Desktop may expose its existing app-native method through a trusted
|
|
152
|
-
* host command. The command receives the exact native method envelope on
|
|
153
|
-
* stdin and must return a nonce-bound visible ACK/action receipt. This is an
|
|
154
|
-
* adapter for `send_message_to_thread`, never an app-server or inbox
|
|
155
|
-
* substitute. */
|
|
156
|
-
function commandAdapter(command) {
|
|
157
|
-
return {
|
|
158
|
-
send_message_to_thread: request => new Promise((resolve, reject) => {
|
|
159
|
-
const child = (0, proc_1.safeSpawn)(command, [], {
|
|
160
|
-
shell: true,
|
|
161
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
162
|
-
});
|
|
163
|
-
let stdout = '';
|
|
164
|
-
let stderr = '';
|
|
165
|
-
child.stdout?.on('data', chunk => { stdout += chunk.toString(); });
|
|
166
|
-
child.stderr?.on('data', chunk => { stderr += chunk.toString(); });
|
|
167
|
-
child.on('error', err => reject(new Error(`Codex native adapter failed to start: ${err.message}`)));
|
|
168
|
-
child.on('close', code => {
|
|
169
|
-
if (code !== 0) {
|
|
170
|
-
reject(new Error(`Codex native adapter exited ${code ?? 'unknown'}: ${stderr.trim() || 'no detail'}`));
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
try {
|
|
174
|
-
const lines = stdout.trim().split(/\r?\n/).filter(Boolean);
|
|
175
|
-
resolve(JSON.parse(lines[lines.length - 1] || '{}'));
|
|
176
|
-
}
|
|
177
|
-
catch (err) {
|
|
178
|
-
reject(new Error(`Codex native adapter returned invalid JSON: ${err.message}`));
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
child.stdin?.end(JSON.stringify({
|
|
182
|
-
method: 'send_message_to_thread',
|
|
183
|
-
threadId: request.threadId,
|
|
184
|
-
prompt: request.prompt,
|
|
185
|
-
messageId: request.messageId,
|
|
186
|
-
nonce: request.nonce,
|
|
187
|
-
ackMarker: request.ackMarker,
|
|
188
|
-
}) + '\n');
|
|
189
|
-
}),
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Load the host bridge supplied by Codex Desktop. A plain CLI process cannot
|
|
194
|
-
* call an MCP/app tool by pretending that app-server is native, so the bridge
|
|
195
|
-
* is explicit and fail-closed. The module must export the exact primitive name
|
|
196
|
-
* `send_message_to_thread`; its result must contain bound visible ACK/action
|
|
197
|
-
* proof before GrepRAG reports success.
|
|
198
|
-
*/
|
|
199
|
-
function loadNativeCodexSender(env = process.env) {
|
|
200
|
-
const embedded = adapterFunction(globalThis.send_message_to_thread);
|
|
201
|
-
if (embedded)
|
|
202
|
-
return { send_message_to_thread: embedded };
|
|
203
|
-
const command = env.GREPRAG_CODEX_NATIVE_SEND_COMMAND?.trim();
|
|
204
|
-
if (command)
|
|
205
|
-
return commandAdapter(command);
|
|
206
|
-
const modulePath = env.GREPRAG_CODEX_NATIVE_ADAPTER;
|
|
207
|
-
if (!modulePath)
|
|
208
|
-
return null;
|
|
209
|
-
try {
|
|
210
|
-
const loaded = require(path.resolve(modulePath));
|
|
211
|
-
const sender = adapterFunction(loaded.send_message_to_thread) || adapterFunction(loaded.default);
|
|
212
|
-
return sender ? { send_message_to_thread: sender } : null;
|
|
213
|
-
}
|
|
214
|
-
catch {
|
|
215
|
-
return null;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
function nativeAdapterConfigured(env = process.env) {
|
|
219
|
-
return Boolean(loadNativeCodexSender(env));
|
|
220
|
-
}
|
|
221
|
-
function nativeProof(value, nonce, threadId, ackMarker) {
|
|
222
|
-
if (!value || typeof value !== 'object')
|
|
223
|
-
return { visible: false, acknowledged: false, acted: false, action: '' };
|
|
224
|
-
const row = value;
|
|
225
|
-
const bound = row.nonce === nonce && row.threadId === threadId && row.ackMarker === ackMarker;
|
|
226
|
-
const action = typeof row.action === 'string' ? row.action.trim() : '';
|
|
227
|
-
return {
|
|
228
|
-
visible: bound && row.visible === true,
|
|
229
|
-
acknowledged: bound && row.visible === true && row.acknowledged === true,
|
|
230
|
-
acted: bound && row.visible === true && row.acknowledged === true && row.acted === true && Boolean(action),
|
|
231
|
-
action,
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
async function deliverViaNativeCodex(opts) {
|
|
235
|
-
const envelope = queueNativeEnvelope(opts.messageId, opts.targetSession, opts.prompt, opts.nonce);
|
|
236
|
-
const ackMarker = deliveryAckMarker(opts.messageId);
|
|
237
|
-
const base = { threadId: opts.targetSession, ackMarker };
|
|
238
|
-
if (envelope.state === 'acted') {
|
|
239
|
-
return {
|
|
240
|
-
ok: true, method: 'send_message_to_thread', lifecycle: 'acted', nonce: envelope.nonce,
|
|
241
|
-
...base, visible: true, acknowledged: true, acted: true, action: envelope.action,
|
|
242
|
-
attempts: [{ method: 'send_message_to_thread', ok: true, detail: 'durable-acted' }],
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
const attempts = [];
|
|
246
|
-
const sender = opts.nativeSender || loadNativeCodexSender();
|
|
247
|
-
if (!sender) {
|
|
248
|
-
const reason = 'native-adapter-unavailable';
|
|
249
|
-
markNativeDegraded(opts.messageId, reason);
|
|
250
|
-
attempts.push({ method: 'send_message_to_thread', ok: false, detail: reason });
|
|
251
|
-
return { ok: false, method: 'send_message_to_thread', reason, lifecycle: 'degraded', nonce: envelope.nonce, ...base, visible: false, acknowledged: false, acted: false, attempts };
|
|
252
|
-
}
|
|
253
|
-
if (!opts.prompt.trim()) {
|
|
254
|
-
const reason = 'empty-native-prompt';
|
|
255
|
-
markNativeDegraded(opts.messageId, reason);
|
|
256
|
-
attempts.push({ method: 'send_message_to_thread', ok: false, detail: reason });
|
|
257
|
-
return { ok: false, method: 'send_message_to_thread', reason, lifecycle: 'degraded', nonce: envelope.nonce, ...base, visible: false, acknowledged: false, acted: false, attempts };
|
|
258
|
-
}
|
|
259
|
-
const request = {
|
|
260
|
-
threadId: opts.targetSession, prompt: `${opts.prompt}\n\nAct on this message and visibly include ${ackMarker} with the concrete action taken.`,
|
|
261
|
-
messageId: opts.messageId, nonce: envelope.nonce, ackMarker,
|
|
262
|
-
};
|
|
263
|
-
try {
|
|
264
|
-
const receipt = await sender.send_message_to_thread(request);
|
|
265
|
-
markNativeDelivered(opts.messageId);
|
|
266
|
-
attempts.push({ method: 'send_message_to_thread', ok: true, detail: envelope.nonce });
|
|
267
|
-
const proof = nativeProof(receipt, envelope.nonce, opts.targetSession, ackMarker);
|
|
268
|
-
if (!proof.acknowledged || !proof.acted) {
|
|
269
|
-
const reason = 'native-visible-ack-action-pending';
|
|
270
|
-
markNativeDegraded(opts.messageId, reason);
|
|
271
|
-
attempts.push({ method: 'native-visible-ack-action', ok: false, detail: reason });
|
|
272
|
-
return { ok: false, method: 'send_message_to_thread', reason, lifecycle: 'native-delivered', nonce: envelope.nonce, ...base, visible: proof.visible, acknowledged: proof.acknowledged, acted: proof.acted, action: proof.action, attempts };
|
|
273
|
-
}
|
|
274
|
-
markNativeActed(opts.messageId, envelope.nonce, proof.action);
|
|
275
|
-
attempts.push({ method: 'native-visible-ack-action', ok: true, detail: proof.action });
|
|
276
|
-
return { ok: true, method: 'send_message_to_thread', lifecycle: 'acted', nonce: envelope.nonce, ...base, visible: true, acknowledged: true, acted: true, action: proof.action, attempts };
|
|
277
|
-
}
|
|
278
|
-
catch (err) {
|
|
279
|
-
const reason = err instanceof Error ? err.message : String(err);
|
|
280
|
-
markNativeDegraded(opts.messageId, reason);
|
|
281
|
-
attempts.push({ method: 'send_message_to_thread', ok: false, detail: reason });
|
|
282
|
-
return { ok: false, method: 'send_message_to_thread', reason, lifecycle: 'degraded', nonce: envelope.nonce, ...base, visible: false, acknowledged: false, acted: false, attempts };
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
//# sourceMappingURL=codex-native-delivery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codex-native-delivery.js","sourceRoot":"","sources":["../../src/commands/codex-native-delivery.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEA,sCAEC;AAED,8CAEC;AAED,gDAGC;AAED,kDAiBC;AAUD,kDAQC;AAGD,8DAYC;AAED,0CAMC;AAED,gDAUC;AAuDD,sDAcC;AAED,0DAEC;AAiBD,sDAwDC;AA7SD,+CAAiC;AACjC,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAC7B,kCAAoC;AAiDpC,SAAS,IAAI,KAAa,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AAE/F,SAAS,QAAQ,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;AAE/F,SAAS,SAAS,CAAC,SAAiB;IAClC,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACxE,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,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AAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAC3C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,wBAAwB,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAC/E,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,wBAAwB,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IACrL,CAAC;AACH,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# Reflex Chip — the Mechanic's fire-and-forget executor
|
|
2
|
-
|
|
3
|
-
The reflex chip is the **active Mechanic** (`docs/reminder-interrupt.md`; `docs/mechanic-repairs.md`
|
|
4
|
-
D4 / Part 7). The live session spawns it the moment it hits friction (prompted by the N-turn
|
|
5
|
-
reminder); it fixes the friction **in the moment** and does **not** report back — its output is
|
|
6
|
-
born-shadow + monitored, so there is no gate to wait at. Fire-and-forget.
|
|
7
|
-
|
|
8
|
-
Spawn: standard chip-spawn **Block 1** (incl. the `IN-FLIGHT` ping) + the preload + mission below.
|
|
9
|
-
**No Block 2** — it lands its own Tier-0 repair and ends. Title: `Chip: Reflex — <friction one-liner>`.
|
|
10
|
-
|
|
11
|
-
## Capability ceiling (HARD — this is what makes fire-and-forget safe)
|
|
12
|
-
|
|
13
|
-
Capped at **Tier-0**. It may, autonomously:
|
|
14
|
-
- author a **born-shadow** schema (`greprag mechanic install …` — born shadow; injects nothing until armed)
|
|
15
|
-
- **record** a durable gotcha / close a fix (`greprag fix repair …`)
|
|
16
|
-
- **prune** a stale fix
|
|
17
|
-
- edit a **doc/skill it owns** (commit on a branch)
|
|
18
|
-
|
|
19
|
-
It may **NEVER**: land code, arm/graduate a schema (`mechanic enable`), merge, push, deploy, or touch a
|
|
20
|
-
sensitive surface. If the root-cause repair needs ANY of those, it does **not** do it — it spawns a
|
|
21
|
-
**workshop chip** (`packages/cli/skill/templates/workshop-chip.md`; reports + parks at the merge gate)
|
|
22
|
-
and ends. Born-shadow + the Part 8 monitor are the safety net: nothing it lands goes live un-armed, and
|
|
23
|
-
anything that turns harmful auto-reverts to shadow.
|
|
24
|
-
|
|
25
|
-
## Preload block (paste verbatim after Block 1; fill the project + fix id)
|
|
26
|
-
|
|
27
|
-
````
|
|
28
|
-
**Orient FIRST — you carry the doctrine so you can pick the rung yourself:**
|
|
29
|
-
1. `docs/mechanic-repairs.md` — repair verbs R1–R20, the ladder, D9 inject-only, D10 blast-radius
|
|
30
|
-
2. `docs/reminder-interrupt.md` — why you exist (the active Mechanic)
|
|
31
|
-
3. `docs/harness-control-points.md` — where a repair plugs in
|
|
32
|
-
4. The LIVE matchset (what's already installed, so you don't duplicate): `greprag mechanic status --project <project>`
|
|
33
|
-
5. The friction under repair: `greprag fix list --project <project> --format json` → <nodeId>
|
|
34
|
-
|
|
35
|
-
You are a REFLEX CHIP: fire-and-forget, Tier-0 capped. You LAND the repair; you do not report.
|
|
36
|
-
````
|
|
37
|
-
|
|
38
|
-
## Mission (keep the spine)
|
|
39
|
-
|
|
40
|
-
1. **Investigate.** Confirm the friction is real (reproduce / read the code/hooks). Untangle — one
|
|
41
|
-
friction often conflates several.
|
|
42
|
-
2. **Root-cause, then pick the rung.** Repair the PATTERN that makes this friction class possible,
|
|
43
|
-
never a guard on today's trigger (route through `/root-cause`). Pick the lowest rung that holds.
|
|
44
|
-
3. **Tier-0 → LAND IT.** born-shadow schema (`mechanic install` with a real `--condition`
|
|
45
|
-
regex/path_under/`--condition-json`), record (`fix repair`), prune, or owned doc/skill edit. Born
|
|
46
|
-
shadow — never `--status active`.
|
|
47
|
-
4. **Above Tier-0 → ESCALATE, don't do it.** Code / gate / transform / anything needing a merge or an
|
|
48
|
-
arm → spawn a workshop chip with the brief, then end. Do not implement it yourself.
|
|
49
|
-
5. **End.** No report-back. Your trace is the born-shadow schema in the matchset (the monitor watches
|
|
50
|
-
it) + the closed fix. The operator monitors the `verdict` column, not you.
|
|
51
|
-
|
|
52
|
-
## Hard rules
|
|
53
|
-
|
|
54
|
-
- **The Tier-0 ceiling is absolute.** Code / arm / graduate / merge / push / deploy → escalate to a
|
|
55
|
-
workshop chip, never do it yourself.
|
|
56
|
-
- **Born-shadow only** — never `mechanic enable`.
|
|
57
|
-
- Standard chip cleanup discipline (no `git clean` / `reset --hard` / `worktree remove` /
|
|
58
|
-
`checkout <other>` / `rm -rf` outside tracked files).
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Workshop Chip — the Mechanic's repair executor
|
|
2
|
-
|
|
3
|
-
The workshop is a chip (`docs/mechanic-repairs.md` D4). Spawn one when **mechanism-tier** friction
|
|
4
|
-
(hook / gate / trigger / code — anything that isn't words-in-a-file-you-own) needs investigation +
|
|
5
|
-
repair. Doctrine-preloaded, drafts everything, installs nothing — the operator gates by **merge**
|
|
6
|
-
(branch) and **graduate** (rows).
|
|
7
|
-
|
|
8
|
-
Compose: standard chip-spawn **Block 1** (incl. the `IN-FLIGHT` ping) + the preload + mission below
|
|
9
|
-
+ standard **Block 2**. Title: `Chip: Workshop — <friction one-liner>`.
|
|
10
|
-
|
|
11
|
-
## Preload block (paste verbatim after Block 1, fill the fix ids)
|
|
12
|
-
|
|
13
|
-
````
|
|
14
|
-
**Doctrine — read FIRST, in order:**
|
|
15
|
-
|
|
16
|
-
1. `docs/mechanic-repairs.md` — repair verbs R1–R20, decision log D1–D8, the ladder
|
|
17
|
-
2. `docs/harness-control-points.md` — the control-point map (where a repair can plug in)
|
|
18
|
-
3. The fix(es) under digestion: `greprag fix list --project <project> --format json` → look up: <nodeId, …>
|
|
19
|
-
|
|
20
|
-
You are a WORKSHOP CHIP. You pick the rung yourself — that is why you carry the doctrine.
|
|
21
|
-
````
|
|
22
|
-
|
|
23
|
-
## Mission shape (adapt the specifics, keep the spine)
|
|
24
|
-
|
|
25
|
-
1. **Investigate.** Reproduce or read the code/hooks to confirm the friction is real. Untangle —
|
|
26
|
-
one fix often conflates several mechanisms.
|
|
27
|
-
2. **Root-cause the friction (NON-NEGOTIABLE), then pick the rung.** Repair the PATTERN that makes
|
|
28
|
-
this class of friction possible — never a guard on today's trigger. A workaround / `if-bad-state-return` /
|
|
29
|
-
defensive check is debt signed, not a problem solved (route through `/root-cause`). THEN pick the lowest
|
|
30
|
-
rung that holds the *root-cause* repair: file edit (R15) → CLI self-intercept (C1) → hook/row tier
|
|
31
|
-
(R2–R8) → code tier. Name the verb you chose and why the cheaper rungs don't hold.
|
|
32
|
-
3. **Implement on YOUR surfaces only.** Code + file edits commit on your chip branch. Row-tier
|
|
33
|
-
repairs (no engine yet): write the proposed D3 `repair` object into your report instead of
|
|
34
|
-
installing anything.
|
|
35
|
-
4. **Verify.** Build/tests green for code; for any repair, state how the friction fingerprint
|
|
36
|
-
re-fire would prove it failed (the efficacy loop is the success metric).
|
|
37
|
-
5. **Report back** (Block 2): rung + verb + why, commit hash, proposed repair rows if any,
|
|
38
|
-
fixes to retire on merge.
|
|
39
|
-
|
|
40
|
-
## Hard rules
|
|
41
|
-
|
|
42
|
-
- **Never merge, push, deploy, or graduate.** The parent owns every gate.
|
|
43
|
-
- Never edit outside your worktree except paths the brief explicitly assigns.
|
|
44
|
-
- A fix is retired only by the PARENT after the repair lands — never delete queue entries yourself.
|
|
45
|
-
- Standard chip cleanup discipline applies (no `git clean` / `reset --hard` / `worktree remove` /
|
|
46
|
-
`checkout <other>` / `rm -rf` outside tracked files).
|