@rubytech/create-sitedesk-code 0.1.491 → 0.1.493
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/package.json +1 -1
- package/payload/platform/lib/storage-broker/dist/__tests__/cf-exec.test.js +46 -0
- package/payload/platform/lib/storage-broker/dist/__tests__/cf-exec.test.js.map +1 -1
- package/payload/platform/lib/storage-broker/dist/__tests__/pages-output-dir.test.d.ts +2 -0
- package/payload/platform/lib/storage-broker/dist/__tests__/pages-output-dir.test.d.ts.map +1 -0
- package/payload/platform/lib/storage-broker/dist/__tests__/pages-output-dir.test.js +135 -0
- package/payload/platform/lib/storage-broker/dist/__tests__/pages-output-dir.test.js.map +1 -0
- package/payload/platform/lib/storage-broker/dist/cf-exec.d.ts +7 -1
- package/payload/platform/lib/storage-broker/dist/cf-exec.d.ts.map +1 -1
- package/payload/platform/lib/storage-broker/dist/cf-exec.js +26 -14
- package/payload/platform/lib/storage-broker/dist/cf-exec.js.map +1 -1
- package/payload/platform/lib/storage-broker/dist/pages-output-dir.d.ts +19 -0
- package/payload/platform/lib/storage-broker/dist/pages-output-dir.d.ts.map +1 -0
- package/payload/platform/lib/storage-broker/dist/pages-output-dir.js +185 -0
- package/payload/platform/lib/storage-broker/dist/pages-output-dir.js.map +1 -0
- package/payload/platform/lib/storage-broker/src/__tests__/cf-exec.test.ts +65 -0
- package/payload/platform/lib/storage-broker/src/__tests__/pages-output-dir.test.ts +167 -0
- package/payload/platform/lib/storage-broker/src/cf-exec.ts +40 -16
- package/payload/platform/lib/storage-broker/src/pages-output-dir.ts +194 -0
- package/payload/platform/plugins/admin/PLUGIN.md +1 -0
- package/payload/platform/plugins/admin/hooks/__tests__/quote-render-pdf-conformance.test.sh +99 -0
- package/payload/platform/plugins/admin/hooks/quote-render-pdf-conformance.sh +108 -0
- package/payload/platform/plugins/admin/skills/agent-builder/references/agent-pattern.md +18 -6
- package/payload/platform/plugins/business-assistant/skills/e-sign/SKILL.md +13 -1
- package/payload/platform/plugins/cloudflare/bin/__tests__/portal-brand-css.test.sh +1 -1
- package/payload/platform/plugins/cloudflare/bin/portal-index-push.mjs +22 -0
- package/payload/platform/plugins/cloudflare/mcp/__tests__/portal-index-push.test.ts +111 -3
- package/payload/platform/plugins/cloudflare/mcp/__tests__/portal-indexed-download.test.ts +13 -0
- package/payload/platform/plugins/cloudflare/mcp/__tests__/template-config.test.ts +8 -4
- package/payload/platform/plugins/cloudflare/references/hosting-sites.md +1 -1
- package/payload/platform/plugins/cloudflare/skills/data-portal/SKILL.md +4 -4
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/download.ts +12 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/portal.js +8 -0
- package/payload/platform/scripts/lib/provision-account-dir.sh +6 -0
- package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.js +35 -6
- package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/index.js +62 -1
- package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +7 -0
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +9 -0
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/skill-staleness-audit.d.ts +80 -0
- package/payload/platform/services/claude-session-manager/dist/skill-staleness-audit.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/skill-staleness-audit.js +216 -0
- package/payload/platform/services/claude-session-manager/dist/skill-staleness-audit.js.map +1 -0
- package/payload/platform/templates/agents/admin/IDENTITY.md +5 -1
- package/payload/platform/templates/agents/passive/IDENTITY.md +2 -0
- package/payload/platform/templates/agents/public/IDENTITY.md +2 -0
- package/payload/platform/templates/specialists/agents/citation-auditor.md +1 -0
- package/payload/platform/templates/specialists/agents/coding-assistant.md +1 -0
- package/payload/platform/templates/specialists/agents/compiled-truth-rewriter.md +3 -0
- package/payload/platform/templates/specialists/agents/content-producer.md +1 -0
- package/payload/platform/templates/specialists/agents/data-manager.md +1 -0
- package/payload/platform/templates/specialists/agents/database-operator.md +1 -0
- package/payload/platform/templates/specialists/agents/librarian.md +1 -0
- package/payload/platform/templates/specialists/agents/personal-assistant.md +1 -0
- package/payload/platform/templates/specialists/agents/project-manager.md +1 -0
- package/payload/platform/templates/specialists/agents/public-session-reviewer.md +1 -0
- package/payload/platform/templates/specialists/agents/research-assistant.md +3 -0
- package/payload/platform/templates/specialists/agents/typed-edge-classifier.md +1 -0
- package/payload/premium-plugins/sitedesk/agents/sitedesk--media-producer.md +1 -0
- package/payload/premium-plugins/sitedesk/agents/sitedesk--payroll-clerk.md +1 -0
- package/payload/premium-plugins/sitedesk/agents/sitedesk--quoter.md +1 -0
- package/payload/premium-plugins/sitedesk/agents/sitedesk--valuer.md +1 -0
- package/payload/premium-plugins/sitedesk/agents/worker-checkin/IDENTITY.md +2 -0
- package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/PLUGIN.md +1 -1
- package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/gates.d.ts +39 -0
- package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/gates.d.ts.map +1 -1
- package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/gates.js +86 -2
- package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/gates.js.map +1 -1
- package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/render-run.d.ts +1 -1
- package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/render-run.d.ts.map +1 -1
- package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/render-run.js +27 -4
- package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/render-run.js.map +1 -1
- package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/src/lib/__tests__/gates.test.ts +81 -1
- package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/src/lib/__tests__/render-run.test.ts +98 -0
- package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/src/lib/gates.ts +86 -2
- package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/src/lib/render-run.ts +36 -5
- package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/skills/quotation/references/quote-generation.md +41 -12
- package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/skills/quotation/references/verification.md +51 -0
- package/payload/server/{chunk-KZFE3MOY.js → chunk-RPUTKSAJ.js} +134 -16
- package/payload/server/public/assets/{chat-DWvYv9jq.js → chat-1SSmFsjd.js} +1 -1
- package/payload/server/public/assets/{operator-CldXXilj.js → operator-Cxq9TxaH.js} +1 -1
- package/payload/server/public/assets/{page-BIwdWXnv.js → page-DBHzC59_.js} +1 -1
- package/payload/server/public/assets/{public-BKQEQGPE.js → public-jIzvdjt_.js} +1 -1
- package/payload/server/public/chat.html +2 -2
- package/payload/server/public/operator.html +2 -2
- package/payload/server/public/public.html +2 -2
- package/payload/server/server.js +40 -31
- package/payload/server/{src-UYDFMWF4.js → src-JN6PIAJN.js} +1 -1
|
@@ -92,19 +92,19 @@ function readHouseCredential(platformRoot) {
|
|
|
92
92
|
import { execFile as execFile2 } from "child_process";
|
|
93
93
|
import { cp, mkdtemp, rm } from "fs/promises";
|
|
94
94
|
import { tmpdir } from "os";
|
|
95
|
-
import { join as
|
|
95
|
+
import { join as join3, relative as relative2 } from "path";
|
|
96
96
|
|
|
97
97
|
// ../lib/storage-broker/src/house-scoped-token.ts
|
|
98
98
|
import { readFileSync as readFileSync2 } from "fs";
|
|
99
99
|
import { execFile } from "child_process";
|
|
100
|
-
var defaultRun = (cmd, args, env) => new Promise((
|
|
100
|
+
var defaultRun = (cmd, args, env) => new Promise((resolve2, reject) => {
|
|
101
101
|
execFile(cmd, args, { env }, (err, stdout, stderr) => {
|
|
102
102
|
if (err) {
|
|
103
103
|
reject(new Error(`${cmd} ${args.join(" ")} failed: ${err.message}
|
|
104
104
|
${stderr}`));
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
resolve2({ stdout: stdout.toString() });
|
|
108
108
|
});
|
|
109
109
|
});
|
|
110
110
|
function readKey(path, key) {
|
|
@@ -145,8 +145,123 @@ function keyForScope(scope) {
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
// ../lib/storage-broker/src/pages-output-dir.ts
|
|
149
|
+
import { lstat, readFile, realpath } from "fs/promises";
|
|
150
|
+
import { isAbsolute, join as join2, relative, resolve } from "path";
|
|
151
|
+
var WRANGLER_CONFIG_NAMES = [
|
|
152
|
+
"wrangler.json",
|
|
153
|
+
"wrangler.jsonc",
|
|
154
|
+
"wrangler.toml"
|
|
155
|
+
];
|
|
156
|
+
var KEY = "pages_build_output_dir";
|
|
157
|
+
function stripJsonComments(text) {
|
|
158
|
+
let out = "";
|
|
159
|
+
let inString = false;
|
|
160
|
+
let escaped = false;
|
|
161
|
+
for (let i = 0; i < text.length; i++) {
|
|
162
|
+
const c = text[i];
|
|
163
|
+
if (inString) {
|
|
164
|
+
out += c;
|
|
165
|
+
if (escaped) escaped = false;
|
|
166
|
+
else if (c === "\\") escaped = true;
|
|
167
|
+
else if (c === '"') inString = false;
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
if (c === '"') {
|
|
171
|
+
inString = true;
|
|
172
|
+
out += c;
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
if (c === "/" && text[i + 1] === "/") {
|
|
176
|
+
while (i < text.length && text[i] !== "\n") i++;
|
|
177
|
+
out += "\n";
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
if (c === "/" && text[i + 1] === "*") {
|
|
181
|
+
i += 2;
|
|
182
|
+
while (i < text.length && !(text[i] === "*" && text[i + 1] === "/")) i++;
|
|
183
|
+
i++;
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
out += c;
|
|
187
|
+
}
|
|
188
|
+
return out;
|
|
189
|
+
}
|
|
190
|
+
function readTomlKey(text) {
|
|
191
|
+
for (const raw of text.split("\n")) {
|
|
192
|
+
const line = raw.trim();
|
|
193
|
+
if (line === "" || line.startsWith("#")) continue;
|
|
194
|
+
if (line.startsWith("[")) return void 0;
|
|
195
|
+
const m = /^pages_build_output_dir\s*=\s*(?:"([^"]*)"|'([^']*)')\s*(?:#.*)?$/.exec(line);
|
|
196
|
+
if (m) return m[1] ?? m[2];
|
|
197
|
+
}
|
|
198
|
+
return void 0;
|
|
199
|
+
}
|
|
200
|
+
function readJsonKey(text, name, jsonc) {
|
|
201
|
+
let parsed;
|
|
202
|
+
try {
|
|
203
|
+
parsed = JSON.parse(jsonc ? stripJsonComments(text) : text);
|
|
204
|
+
} catch (err) {
|
|
205
|
+
throw new Error(`storage-broker: ${name} could not be parsed: ${String(err)}`);
|
|
206
|
+
}
|
|
207
|
+
if (typeof parsed !== "object" || parsed === null) {
|
|
208
|
+
throw new Error(`storage-broker: ${name} is not an object`);
|
|
209
|
+
}
|
|
210
|
+
const value = parsed[KEY];
|
|
211
|
+
if (value === void 0) return void 0;
|
|
212
|
+
if (typeof value !== "string") {
|
|
213
|
+
throw new Error(`storage-broker: ${name} declares a non-string ${KEY}`);
|
|
214
|
+
}
|
|
215
|
+
return value;
|
|
216
|
+
}
|
|
217
|
+
function escapes(root, child) {
|
|
218
|
+
const rel = relative(root, child);
|
|
219
|
+
return rel.startsWith("..") || isAbsolute(rel);
|
|
220
|
+
}
|
|
221
|
+
function outsideError(name, declared, resolved, root) {
|
|
222
|
+
return new Error(
|
|
223
|
+
`storage-broker: ${name} declares ${KEY}="${declared}", which resolves to ${resolved}, outside the site root ${root}`
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
async function resolveUploadDir(dir) {
|
|
227
|
+
for (const name of WRANGLER_CONFIG_NAMES) {
|
|
228
|
+
let text;
|
|
229
|
+
try {
|
|
230
|
+
text = await readFile(join2(dir, name), "utf8");
|
|
231
|
+
} catch {
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
const declared = name === "wrangler.toml" ? readTomlKey(text) : readJsonKey(text, name, name === "wrangler.jsonc");
|
|
235
|
+
if (declared === void 0) return { uploadDir: dir, source: "site-root" };
|
|
236
|
+
const uploadDir = resolve(dir, declared);
|
|
237
|
+
if (escapes(dir, uploadDir)) throw outsideError(name, declared, uploadDir, dir);
|
|
238
|
+
let info;
|
|
239
|
+
try {
|
|
240
|
+
info = await lstat(uploadDir);
|
|
241
|
+
} catch {
|
|
242
|
+
throw new Error(
|
|
243
|
+
`storage-broker: ${name} declares ${KEY}="${declared}" but ${uploadDir} does not exist`
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
if (info.isSymbolicLink()) {
|
|
247
|
+
throw new Error(
|
|
248
|
+
`storage-broker: ${name} declares ${KEY}="${declared}" but ${uploadDir} is a symbolic link; the published root must be a real directory`
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
if (!info.isDirectory()) {
|
|
252
|
+
throw new Error(
|
|
253
|
+
`storage-broker: ${name} declares ${KEY}="${declared}" but ${uploadDir} is not a directory`
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
const realDir = await realpath(dir);
|
|
257
|
+
const realUpload = await realpath(uploadDir);
|
|
258
|
+
if (escapes(realDir, realUpload)) throw outsideError(name, declared, realUpload, realDir);
|
|
259
|
+
return { uploadDir, source: name, declared };
|
|
260
|
+
}
|
|
261
|
+
return { uploadDir: dir, source: "site-root" };
|
|
262
|
+
}
|
|
263
|
+
|
|
148
264
|
// ../lib/storage-broker/src/cf-exec.ts
|
|
149
|
-
var WRANGLER_CONFIG_NAMES = ["wrangler.json", "wrangler.jsonc", "wrangler.toml"];
|
|
150
265
|
function encodeObjectKey(key) {
|
|
151
266
|
return key.split("/").map(encodeURIComponent).join("/");
|
|
152
267
|
}
|
|
@@ -154,14 +269,14 @@ function objectUrl(accountId, bucket, key) {
|
|
|
154
269
|
return `https://api.cloudflare.com/client/v4/accounts/${accountId}/r2/buckets/${encodeURIComponent(bucket)}/objects/${encodeObjectKey(key)}`;
|
|
155
270
|
}
|
|
156
271
|
var defaultFetch = (url, init) => fetch(url, init);
|
|
157
|
-
var defaultRun2 = (cmd, args, env, opts) => new Promise((
|
|
272
|
+
var defaultRun2 = (cmd, args, env, opts) => new Promise((resolve2, reject) => {
|
|
158
273
|
execFile2(cmd, args, { env, cwd: opts?.cwd }, (err, stdout, stderr) => {
|
|
159
274
|
if (err) {
|
|
160
275
|
reject(new Error(`${cmd} ${args.join(" ")} failed: ${err.message}
|
|
161
276
|
${stderr}`));
|
|
162
277
|
return;
|
|
163
278
|
}
|
|
164
|
-
|
|
279
|
+
resolve2({ stdout: stdout.toString() });
|
|
165
280
|
});
|
|
166
281
|
});
|
|
167
282
|
function parseJson(raw, context) {
|
|
@@ -373,15 +488,18 @@ function makeCfExec(cred, run = defaultRun2, fetchFn = defaultFetch) {
|
|
|
373
488
|
}
|
|
374
489
|
},
|
|
375
490
|
async pagesDeploy(dir, project, branch) {
|
|
376
|
-
const
|
|
491
|
+
const { uploadDir, source: uploadDirSource } = await resolveUploadDir(dir);
|
|
492
|
+
const staged = await mkdtemp(join3(tmpdir(), "maxy-pages-upload-"));
|
|
377
493
|
const excluded = [];
|
|
378
494
|
try {
|
|
379
|
-
await cp(
|
|
495
|
+
await cp(uploadDir, staged, {
|
|
380
496
|
recursive: true,
|
|
381
|
-
// Only a config at the root of
|
|
382
|
-
//
|
|
497
|
+
// Only a config at the root of what is uploaded is dropped. That root
|
|
498
|
+
// is the served root, which is the surface Task 1782 protects. A file
|
|
499
|
+
// of the same name anywhere below it is site content and stays
|
|
500
|
+
// published.
|
|
383
501
|
filter: (src) => {
|
|
384
|
-
const rel =
|
|
502
|
+
const rel = relative2(uploadDir, src);
|
|
385
503
|
if (!WRANGLER_CONFIG_NAMES.includes(rel)) return true;
|
|
386
504
|
excluded.push(rel);
|
|
387
505
|
return false;
|
|
@@ -396,7 +514,7 @@ function makeCfExec(cred, run = defaultRun2, fetchFn = defaultFetch) {
|
|
|
396
514
|
if (!url) {
|
|
397
515
|
throw new Error(`storage-broker: pages deploy returned no deployment url: ${stdout}`);
|
|
398
516
|
}
|
|
399
|
-
return { url, excluded: excluded.sort() };
|
|
517
|
+
return { url, excluded: excluded.sort(), uploadDir, uploadDirSource };
|
|
400
518
|
} finally {
|
|
401
519
|
await rm(staged, { recursive: true, force: true });
|
|
402
520
|
}
|
|
@@ -477,15 +595,15 @@ ${await res.text()}`
|
|
|
477
595
|
}
|
|
478
596
|
async function makeHouseCfExec(platformRoot, run = defaultRun2, fetchFn = defaultFetch) {
|
|
479
597
|
const cred = readHouseCredential(platformRoot);
|
|
480
|
-
const houseEnvPath =
|
|
481
|
-
const cfTokenSh =
|
|
598
|
+
const houseEnvPath = join3(platformRoot, "config", "cloudflare-house.env");
|
|
599
|
+
const cfTokenSh = join3(platformRoot, "plugins/cloudflare/bin/cf-token.sh");
|
|
482
600
|
const scoped = await resolveHouseScopedToken("storage", houseEnvPath, cfTokenSh, run);
|
|
483
601
|
return makeCfExec({ apiToken: scoped, accountId: cred.accountId }, run, fetchFn);
|
|
484
602
|
}
|
|
485
603
|
async function makeHousePagesExec(platformRoot, run = defaultRun2, fetchFn = defaultFetch) {
|
|
486
604
|
const cred = readHouseCredential(platformRoot);
|
|
487
|
-
const houseEnvPath =
|
|
488
|
-
const cfTokenSh =
|
|
605
|
+
const houseEnvPath = join3(platformRoot, "config", "cloudflare-house.env");
|
|
606
|
+
const cfTokenSh = join3(platformRoot, "plugins/cloudflare/bin/cf-token.sh");
|
|
489
607
|
const scoped = await resolveHouseScopedToken("pages", houseEnvPath, cfTokenSh, run);
|
|
490
608
|
return makeCfExec({ apiToken: scoped, accountId: cred.accountId }, run, fetchFn);
|
|
491
609
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as e,V as t}from"./useSubAccountSwitcher-Q941cZYV.js";import"./useVoiceRecorder-ZFwt5i6d.js";import"./AdminShell-BwNqwb4k.js";import{n}from"./page-
|
|
1
|
+
import{R as e,V as t}from"./useSubAccountSwitcher-Q941cZYV.js";import"./useVoiceRecorder-ZFwt5i6d.js";import"./AdminShell-BwNqwb4k.js";import{n}from"./page-DBHzC59_.js";import"./useCopyFeedback-os7N0yCx.js";var r=t(),i=e();(0,r.createRoot)(document.getElementById(`root`)).render((0,i.jsx)(n,{}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-TPjIAO9U.js";import{R as t,U as n,V as r}from"./useSubAccountSwitcher-Q941cZYV.js";import{n as i,t as a}from"./AdminLoginScreens-DgVFsHtd.js";import"./useVoiceRecorder-ZFwt5i6d.js";import"./AdminShell-BwNqwb4k.js";import{t as o}from"./page-
|
|
1
|
+
import{o as e}from"./chunk-TPjIAO9U.js";import{R as t,U as n,V as r}from"./useSubAccountSwitcher-Q941cZYV.js";import{n as i,t as a}from"./AdminLoginScreens-DgVFsHtd.js";import"./useVoiceRecorder-ZFwt5i6d.js";import"./AdminShell-BwNqwb4k.js";import{t as o}from"./page-DBHzC59_.js";import"./useCopyFeedback-os7N0yCx.js";var s=r(),c=e(n(),1),l=t();function u(){let e=i(`operator`),t=(0,c.useRef)(null);return(0,c.useEffect)(()=>{e.appState!==`chat`&&t.current!==e.appState&&(t.current=e.appState,console.info(`[operator-ui] op=auth-gate state=${e.appState}`))},[e.appState]),e.appState===`chat`?(0,l.jsx)(o,{variant:`operator`,forceCanonicalSession:window.location.pathname!==`/chat`}):(0,l.jsx)(a,{auth:e})}(0,s.createRoot)(document.getElementById(`root`)).render((0,l.jsx)(u,{}));
|