glimmervoid 0.38.0 → 0.38.2
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/bin/glimmervoid.js +17 -15
- package/dist/chunks/{adapters-B-IkWl-r.js → adapters-CAHxZYT3.js} +4 -4
- package/dist/chunks/{adapters-Dt3vwxwY.js → adapters-DDjC7_vG.js} +1 -1
- package/dist/chunks/{agent-api-cli-BcZ9DLCF.js → agent-api-cli-B5Tm0wXO.js} +27 -8
- package/dist/chunks/{agent-api-cli-3hryuewm.js → agent-api-cli-BDu1CxZf.js} +1 -1
- package/dist/chunks/{agent-api-core--8WtU1xU.js → agent-api-core-B_mUSenR.js} +36 -4
- package/dist/chunks/{agent-setup-cli-BixDoCkF.js → agent-setup-cli-DmMfCw5O.js} +1 -1
- package/dist/chunks/{config-BHBZsCBc.js → browser-config-BrBT8269.js} +2 -217
- package/dist/chunks/config-CjawSOBk.js +219 -0
- package/dist/chunks/{config-store-DbfMbz4j.js → config-store-BUNZs4j7.js} +4 -3
- package/dist/chunks/config-store-MAVQhGMh.js +1 -0
- package/dist/chunks/{contracts-u40eJhaf.js → contracts-HVCEJfxs.js} +6 -239
- package/dist/chunks/factory-D7ryES9n.js +240 -0
- package/dist/chunks/{git-version-BpnTd8sU.js → git-version-rWZjF2Px.js} +1 -1
- package/dist/chunks/{grok-xFs6zIu4.js → grok-B6bsCgdd.js} +2 -2
- package/dist/chunks/{hook-tools-BkxllUHE.js → hook-tools-Dl7-r2Eb.js} +1 -1
- package/dist/chunks/{knowledge-graph-cli-DcspNqhz.js → knowledge-graph-cli-ByUJoKw_.js} +1 -1
- package/dist/chunks/{main-w01-P1oZ.js → main-BNSbP-Yk.js} +689 -523
- package/dist/chunks/{pair-cli-BdoyrDCr.js → pair-cli-DNp8i5L4.js} +2 -2
- package/dist/chunks/{remote-config-61zJ0hME.js → remote-config-C_s2pnLC.js} +1 -1
- package/dist/chunks/{rtk-hook-core-VrUafGAp.js → rtk-hook-core-B-MpzPin.js} +89 -83
- package/dist/chunks/rtk-resolver-BGE6Hd_L.js +1 -0
- package/dist/chunks/{rtk-resolver-C_micGrL.js → rtk-resolver-BgoPsEhT.js} +1 -1
- package/dist/chunks/{session-8Pv0y1vz.js → session-BlT68ppa.js} +5 -2
- package/dist/chunks/{session-routes-D-GZC-Sy.js → session-routes-CT1JrjoT.js} +1 -1
- package/dist/chunks/{settings-cli-DKJsm3AP.js → settings-cli-BbzxCyG5.js} +3 -3
- package/dist/chunks/{ssh-sign-cli-Dc2gOCwE.js → ssh-sign-cli-C74BGTQS.js} +2 -2
- package/dist/client/assets/index-B5uVtedd.css +1 -0
- package/dist/client/assets/index-b13-NGGS.js +275 -0
- package/dist/client/index.html +3 -2
- package/dist/server/index.js +1 -1
- package/dist/session/hook-tool-relay.js +1 -1
- package/package.json +3 -2
- package/dist/chunks/config-store-DYj3wYgw.js +0 -1
- package/dist/chunks/rtk-resolver-B8BPgN9L.js +0 -1
- package/dist/client/assets/index-BfqmOGgc.js +0 -275
- package/dist/client/assets/index-DxABp5yJ.css +0 -1
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { A as SessionState } from "./session-BlT68ppa.js";
|
|
2
|
+
import { Q as CoherenceRisk, X as CoherenceOrient, Z as CoherenceReadiness, nt as CoherenceWorkState, s as FactorySettings } from "./browser-config-BrBT8269.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region shared/contracts/factory.ts
|
|
5
|
+
var FactoryConsequences = z.looseObject({ records: z.array(z.looseObject({
|
|
6
|
+
from: z.object({
|
|
7
|
+
kind: z.string(),
|
|
8
|
+
id: z.string()
|
|
9
|
+
}),
|
|
10
|
+
relation: z.string(),
|
|
11
|
+
to: z.object({
|
|
12
|
+
kind: z.string(),
|
|
13
|
+
id: z.string()
|
|
14
|
+
}),
|
|
15
|
+
session: z.string().optional(),
|
|
16
|
+
evidence: z.string().optional()
|
|
17
|
+
})) });
|
|
18
|
+
var confirmedFlakes = z.array(z.string().min(1)).max(256);
|
|
19
|
+
var FactoryProjectState = z.object({
|
|
20
|
+
projectId: z.string(),
|
|
21
|
+
projectName: z.string(),
|
|
22
|
+
headSha: z.string().nullable(),
|
|
23
|
+
paused: z.boolean(),
|
|
24
|
+
orchestrator: z.object({
|
|
25
|
+
sessionId: z.string(),
|
|
26
|
+
intentId: z.string(),
|
|
27
|
+
state: SessionState
|
|
28
|
+
}).nullable(),
|
|
29
|
+
liveWorkers: z.array(z.object({
|
|
30
|
+
workId: z.string(),
|
|
31
|
+
sessionId: z.string()
|
|
32
|
+
})).optional(),
|
|
33
|
+
reviewing: z.array(z.string()).optional(),
|
|
34
|
+
note: z.string().nullable().optional(),
|
|
35
|
+
spentTodayUsd: z.number().finite().nonnegative().optional(),
|
|
36
|
+
dailyBudgetUsd: z.number().finite().nonnegative().nullable().optional(),
|
|
37
|
+
verifierIntentIds: z.array(z.string()).optional(),
|
|
38
|
+
confirmedFlakesByIntent: z.record(z.string().min(1), confirmedFlakes).optional(),
|
|
39
|
+
partialIntentIds: z.array(z.string()).optional(),
|
|
40
|
+
factoryProfile: FactorySettings.unwrap().unwrap().pick({ checks: true }).extend({
|
|
41
|
+
focusedTestCommand: z.string().trim().min(1).optional(),
|
|
42
|
+
widenableScopes: z.array(z.string().trim().min(1)).optional()
|
|
43
|
+
}).optional(),
|
|
44
|
+
error: z.string().nullable(),
|
|
45
|
+
heading: z.object({
|
|
46
|
+
action: CoherenceOrient.shape.action,
|
|
47
|
+
reasons: z.array(z.string())
|
|
48
|
+
}),
|
|
49
|
+
orders: z.array(z.object({
|
|
50
|
+
id: z.string(),
|
|
51
|
+
objective: z.string(),
|
|
52
|
+
openedAt: z.iso.datetime(),
|
|
53
|
+
criteria: z.array(z.string()),
|
|
54
|
+
boundary: z.string(),
|
|
55
|
+
risk: CoherenceRisk,
|
|
56
|
+
state: CoherenceWorkState,
|
|
57
|
+
readiness: CoherenceReadiness,
|
|
58
|
+
parent: z.string().nullable(),
|
|
59
|
+
dependsOn: z.array(z.string()),
|
|
60
|
+
writeScopes: z.array(z.string()),
|
|
61
|
+
owner: z.string().nullable(),
|
|
62
|
+
blockReason: z.string().nullable().optional(),
|
|
63
|
+
parked: z.boolean().optional(),
|
|
64
|
+
blockCount: z.number().int().nonnegative().optional(),
|
|
65
|
+
lastEvent: z.object({
|
|
66
|
+
event: z.string(),
|
|
67
|
+
at: z.string(),
|
|
68
|
+
session: z.string()
|
|
69
|
+
}).nullable()
|
|
70
|
+
})),
|
|
71
|
+
conflicts: z.array(z.object({
|
|
72
|
+
left: z.string(),
|
|
73
|
+
right: z.string(),
|
|
74
|
+
scope: z.string()
|
|
75
|
+
})),
|
|
76
|
+
unverifiedCompletedWork: z.array(z.string()),
|
|
77
|
+
observedRun: z.object({
|
|
78
|
+
recordDirectory: z.string(),
|
|
79
|
+
outcome: z.string().nullable()
|
|
80
|
+
}).optional()
|
|
81
|
+
});
|
|
82
|
+
var FactoryState = z.object({
|
|
83
|
+
type: z.literal("factory-state"),
|
|
84
|
+
ts: z.number().finite(),
|
|
85
|
+
projects: z.array(FactoryProjectState)
|
|
86
|
+
});
|
|
87
|
+
var FactoryHarnessStateLine = z.object({
|
|
88
|
+
arrivedAt: z.string(),
|
|
89
|
+
state: FactoryState
|
|
90
|
+
});
|
|
91
|
+
var FactoryHarnessVerdict = z.looseObject({
|
|
92
|
+
outcome: z.enum([
|
|
93
|
+
"pass",
|
|
94
|
+
"partial",
|
|
95
|
+
"fail"
|
|
96
|
+
]),
|
|
97
|
+
failureClass: z.string().nullable().optional()
|
|
98
|
+
});
|
|
99
|
+
var FACTORY_ERROR_MAX_CHARS = 16384;
|
|
100
|
+
function isSingleFactoryPathSegment(value) {
|
|
101
|
+
return value !== "." && value !== ".." && !/[/\\]/.test(value);
|
|
102
|
+
}
|
|
103
|
+
var projectId = z.string().trim().min(1).max(128).refine(isSingleFactoryPathSegment, "Invalid factory project id");
|
|
104
|
+
var intentText = z.string().trim().min(1).max(4096);
|
|
105
|
+
var scopeText = z.string().trim().min(1).max(1024);
|
|
106
|
+
var FACTORY_INTENT_TICKET_LIMIT = 32;
|
|
107
|
+
var ticketKey = z.string().trim().min(1).max(64);
|
|
108
|
+
var FACTORY_PROTECTED_PATH_FLOOR = [
|
|
109
|
+
"**/package.json",
|
|
110
|
+
"**/package-lock.json",
|
|
111
|
+
"**/npm-shrinkwrap.json",
|
|
112
|
+
"**/yarn.lock",
|
|
113
|
+
"**/pnpm-lock.yaml",
|
|
114
|
+
"**/bun.lock",
|
|
115
|
+
"**/bun.lockb",
|
|
116
|
+
"**/.npmrc",
|
|
117
|
+
"**/.yarnrc",
|
|
118
|
+
"**/.yarnrc.yml",
|
|
119
|
+
"**/pnpm-workspace.yaml",
|
|
120
|
+
"**/.pnpmfile.cjs",
|
|
121
|
+
"**/tsconfig*.json",
|
|
122
|
+
"**/biome.json",
|
|
123
|
+
"**/biome.jsonc",
|
|
124
|
+
"**/vite.config.*",
|
|
125
|
+
"**/vitest.config.*",
|
|
126
|
+
"**/vitest.workspace.*",
|
|
127
|
+
"**/jest.config.*",
|
|
128
|
+
"**/.mocharc*",
|
|
129
|
+
"**/playwright.config.*"
|
|
130
|
+
];
|
|
131
|
+
var FactoryFloorAllowance = z.enum(FACTORY_PROTECTED_PATH_FLOOR);
|
|
132
|
+
var floorAllowances = z.array(FactoryFloorAllowance).max(FACTORY_PROTECTED_PATH_FLOOR.length);
|
|
133
|
+
var FactoryIntentTicket = z.object({
|
|
134
|
+
id: ticketKey,
|
|
135
|
+
objective: intentText,
|
|
136
|
+
criteria: z.array(intentText).min(1).max(12),
|
|
137
|
+
dependsOn: z.array(ticketKey).max(FACTORY_INTENT_TICKET_LIMIT),
|
|
138
|
+
writeScopes: z.array(scopeText).min(1).max(32)
|
|
139
|
+
});
|
|
140
|
+
var FactoryQueueIntentRequest = z.object({
|
|
141
|
+
projectId,
|
|
142
|
+
objective: intentText,
|
|
143
|
+
criteria: z.array(intentText).min(1).max(12),
|
|
144
|
+
risk: CoherenceRisk,
|
|
145
|
+
boundary: intentText,
|
|
146
|
+
writeScopes: z.array(scopeText).max(32),
|
|
147
|
+
tickets: z.array(FactoryIntentTicket).min(1).max(FACTORY_INTENT_TICKET_LIMIT).optional(),
|
|
148
|
+
floorAllowances: floorAllowances.optional()
|
|
149
|
+
});
|
|
150
|
+
var AgentFactoryQueueRequest = FactoryQueueIntentRequest.omit({
|
|
151
|
+
projectId: true,
|
|
152
|
+
floorAllowances: true
|
|
153
|
+
}).strict();
|
|
154
|
+
var FactoryQueueIntentResult = z.object({
|
|
155
|
+
projectId: z.string().max(128),
|
|
156
|
+
ok: z.boolean(),
|
|
157
|
+
workId: z.string().min(1).max(128).optional(),
|
|
158
|
+
error: z.string().max(FACTORY_ERROR_MAX_CHARS).optional()
|
|
159
|
+
});
|
|
160
|
+
var FactoryControlRequest = z.object({
|
|
161
|
+
projectId,
|
|
162
|
+
action: z.enum([
|
|
163
|
+
"pause",
|
|
164
|
+
"resume",
|
|
165
|
+
"retry-parked",
|
|
166
|
+
"rerun-setup"
|
|
167
|
+
]),
|
|
168
|
+
intentId: z.string().trim().min(1).max(128).optional()
|
|
169
|
+
}).refine((request) => request.action !== "retry-parked" || request.intentId !== void 0, {
|
|
170
|
+
message: "Retry parked requires an intentId",
|
|
171
|
+
path: ["intentId"]
|
|
172
|
+
});
|
|
173
|
+
var FactoryControlResult = z.object({
|
|
174
|
+
projectId: z.string().max(128),
|
|
175
|
+
action: FactoryControlRequest.shape.action,
|
|
176
|
+
ok: z.boolean(),
|
|
177
|
+
reopenedWorkIds: z.array(z.string().min(1)).optional(),
|
|
178
|
+
error: z.string().max(FACTORY_ERROR_MAX_CHARS).optional()
|
|
179
|
+
});
|
|
180
|
+
var FactoryReviewVerdict = z.object({
|
|
181
|
+
pass: z.boolean(),
|
|
182
|
+
findings: z.array(z.string())
|
|
183
|
+
}).strict();
|
|
184
|
+
var FactoryReviewerOutput = z.object({
|
|
185
|
+
type: z.literal("result"),
|
|
186
|
+
subtype: z.literal("success"),
|
|
187
|
+
is_error: z.literal(false),
|
|
188
|
+
structured_output: FactoryReviewVerdict
|
|
189
|
+
});
|
|
190
|
+
var FactoryUnlandedRecord = z.object({
|
|
191
|
+
id: z.string().min(1).max(1024),
|
|
192
|
+
path: z.string().min(1).max(4096),
|
|
193
|
+
line: z.string().min(1).regex(/^[^\n]*$/)
|
|
194
|
+
});
|
|
195
|
+
var FactoryLaneState = z.object({
|
|
196
|
+
ledgerPath: z.string().min(1).max(4096).nullable(),
|
|
197
|
+
ledgerBranch: z.string().min(1).max(1024).nullable(),
|
|
198
|
+
paused: z.boolean(),
|
|
199
|
+
trustedVerifications: z.array(z.object({
|
|
200
|
+
id: z.string().min(1),
|
|
201
|
+
sha: z.string().regex(/^[a-f0-9]{40,64}$/)
|
|
202
|
+
})).optional(),
|
|
203
|
+
trustedIntentCloses: z.array(z.string().min(1)).optional(),
|
|
204
|
+
pendingVerifierTrusts: z.array(z.object({
|
|
205
|
+
intentId: z.string().min(1),
|
|
206
|
+
sha: z.string().regex(/^[a-f0-9]{40,64}$/),
|
|
207
|
+
records: z.array(FactoryUnlandedRecord).min(1)
|
|
208
|
+
})).optional(),
|
|
209
|
+
trustedIntentIds: z.array(z.string().min(1)).optional(),
|
|
210
|
+
intentWriteScopes: z.record(z.string().min(1), z.array(z.string().min(1))).optional(),
|
|
211
|
+
intentFloorAllowances: z.record(z.string().min(1), floorAllowances).optional(),
|
|
212
|
+
intentConfirmedFlakes: z.record(z.string().min(1), confirmedFlakes).optional(),
|
|
213
|
+
intentScopeNeeds: z.record(z.string().min(1), z.array(z.string().min(1)).max(256)).optional(),
|
|
214
|
+
ticketedIntentIds: z.array(z.string().min(1)).optional(),
|
|
215
|
+
pendingIntentTickets: z.record(z.string().min(1), z.object({
|
|
216
|
+
risk: CoherenceRisk,
|
|
217
|
+
boundary: intentText,
|
|
218
|
+
tickets: z.array(FactoryIntentTicket).min(1).max(FACTORY_INTENT_TICKET_LIMIT)
|
|
219
|
+
})).optional(),
|
|
220
|
+
intentBaseShas: z.record(z.string().min(1), z.string().regex(/^[a-f0-9]{40,64}$/)).optional(),
|
|
221
|
+
factoryLandedShas: z.array(z.string().regex(/^[a-f0-9]{40,64}$/)).optional(),
|
|
222
|
+
unlandedFactoryRecords: z.array(FactoryUnlandedRecord).optional(),
|
|
223
|
+
ticketBlockCounts: z.record(z.string().min(1), z.number().int().nonnegative()).optional(),
|
|
224
|
+
notifiedIntentOutcomes: z.array(z.string().min(1)).optional()
|
|
225
|
+
});
|
|
226
|
+
var FactoryWorkerEvent = z.object({
|
|
227
|
+
workId: z.string().min(1),
|
|
228
|
+
event: z.string().min(1),
|
|
229
|
+
sessionId: z.string().optional(),
|
|
230
|
+
detail: z.string().optional()
|
|
231
|
+
});
|
|
232
|
+
z.discriminatedUnion("ok", [z.object({
|
|
233
|
+
ok: z.literal(true),
|
|
234
|
+
sessionId: z.string()
|
|
235
|
+
}), z.object({
|
|
236
|
+
ok: z.literal(false),
|
|
237
|
+
reason: z.string()
|
|
238
|
+
})]);
|
|
239
|
+
//#endregion
|
|
240
|
+
export { isSingleFactoryPathSegment as _, FactoryControlRequest as a, FactoryHarnessVerdict as c, FactoryQueueIntentRequest as d, FactoryQueueIntentResult as f, FactoryWorkerEvent as g, FactoryState as h, FactoryConsequences as i, FactoryLaneState as l, FactoryReviewerOutput as m, FACTORY_ERROR_MAX_CHARS as n, FactoryControlResult as o, FactoryReviewVerdict as p, FACTORY_PROTECTED_PATH_FLOOR as r, FactoryHarnessStateLine as s, AgentFactoryQueueRequest as t, FactoryProjectState as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as AGENT_API_VERBS } from "./session-
|
|
1
|
+
import { t as AGENT_API_VERBS } from "./session-BlT68ppa.js";
|
|
2
2
|
import { r as execFileSync } from "./child-process-safe-CbQnyh7D.js";
|
|
3
3
|
//#region server/core/command-line-core.ts
|
|
4
4
|
var SUBCOMMANDS_HONORING_TRAILING_GLOBAL_OPTIONS = /* @__PURE__ */ new Set([
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as errorMessage } from "./text-DoirglWV.js";
|
|
2
2
|
import { o as relayPath } from "./runtime-paths-BkeftE60.js";
|
|
3
|
-
import {
|
|
3
|
+
import { E as SIGN_URL_ENV, n as AGENT_URL_ENV } from "./session-BlT68ppa.js";
|
|
4
4
|
import { t as HOOK_URL_ENV } from "./hook-relay-core-DA_bz2KA.js";
|
|
5
5
|
import { n as isRecord } from "./coerce-NSst8oRP.js";
|
|
6
|
-
import {
|
|
6
|
+
import { a as SANE_YOLO_PATH_ENV, o as saneYoloEnv, r as RTK_PATH_ENV } from "./rtk-hook-core-B-MpzPin.js";
|
|
7
7
|
import { t as buildHookCommand } from "./hook-command-core-qTNK-xMF.js";
|
|
8
8
|
import fs from "node:fs";
|
|
9
9
|
import path from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as resolvePathCommandMatches } from "./spawn-command-Cc40FiZI.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as SANE_YOLO_PATH_ENV, o as saneYoloEnv, r as RTK_PATH_ENV, t as CLAUDE_RELAY_FLAVOR } from "./rtk-hook-core-B-MpzPin.js";
|
|
3
3
|
import { n as shellQuote, t as buildHookCommand } from "./hook-command-core-qTNK-xMF.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
//#region session/core/hook-tools.ts
|
|
@@ -2,7 +2,7 @@ import { r as errorMessage } from "./text-DoirglWV.js";
|
|
|
2
2
|
import { s as resolvePackageBin } from "./runtime-paths-BkeftE60.js";
|
|
3
3
|
import { r as execFileSync } from "./child-process-safe-CbQnyh7D.js";
|
|
4
4
|
import { n as glimmervoidHomeDir, t as decideConfigPath } from "./config-path-core-DFt-TemS.js";
|
|
5
|
-
import { r as BrowserConfig } from "./config-
|
|
5
|
+
import { r as BrowserConfig } from "./config-CjawSOBk.js";
|
|
6
6
|
import fs, { closeSync, constants, existsSync, fstatSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync } from "node:fs";
|
|
7
7
|
import path, { dirname, join, posix, resolve, win32 } from "node:path";
|
|
8
8
|
import os from "node:os";
|