@chatlychat/cli 0.4.1 → 0.5.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/commands/auth.d.ts +1 -1
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +40 -3
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/deliveries.d.ts +18 -0
- package/dist/commands/deliveries.d.ts.map +1 -0
- package/dist/commands/deliveries.js +46 -0
- package/dist/commands/deliveries.js.map +1 -0
- package/dist/commands/init.d.ts +29 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +176 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/integrations.d.ts +27 -0
- package/dist/commands/integrations.d.ts.map +1 -1
- package/dist/commands/integrations.js +145 -4
- package/dist/commands/integrations.js.map +1 -1
- package/dist/commands/platform-as-code.d.ts +54 -0
- package/dist/commands/platform-as-code.d.ts.map +1 -0
- package/dist/commands/platform-as-code.js +185 -0
- package/dist/commands/platform-as-code.js.map +1 -0
- package/dist/commands/workspace-as-code.d.ts +52 -11
- package/dist/commands/workspace-as-code.d.ts.map +1 -1
- package/dist/commands/workspace-as-code.js +70 -189
- package/dist/commands/workspace-as-code.js.map +1 -1
- package/dist/help.d.ts +1 -1
- package/dist/help.d.ts.map +1 -1
- package/dist/help.js +36 -1
- package/dist/help.js.map +1 -1
- package/dist/init/shared.d.ts +61 -0
- package/dist/init/shared.d.ts.map +1 -0
- package/dist/init/shared.js +110 -0
- package/dist/init/shared.js.map +1 -0
- package/dist/init/templates.d.ts +29 -0
- package/dist/init/templates.d.ts.map +1 -0
- package/dist/init/templates.js +362 -0
- package/dist/init/templates.js.map +1 -0
- package/dist/pac/platform-document.d.ts +65 -0
- package/dist/pac/platform-document.d.ts.map +1 -0
- package/dist/pac/platform-document.js +149 -0
- package/dist/pac/platform-document.js.map +1 -0
- package/dist/pac/platform-live.d.ts +65 -0
- package/dist/pac/platform-live.d.ts.map +1 -0
- package/dist/pac/platform-live.js +263 -0
- package/dist/pac/platform-live.js.map +1 -0
- package/dist/pac/platform-resources.d.ts +141 -0
- package/dist/pac/platform-resources.d.ts.map +1 -0
- package/dist/pac/platform-resources.js +509 -0
- package/dist/pac/platform-resources.js.map +1 -0
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +26 -2
- package/dist/run.js.map +1 -1
- package/dist/wac/apply.d.ts.map +1 -1
- package/dist/wac/apply.js +56 -16
- package/dist/wac/apply.js.map +1 -1
- package/dist/wac/diff-warnings.d.ts +35 -0
- package/dist/wac/diff-warnings.d.ts.map +1 -0
- package/dist/wac/diff-warnings.js +88 -0
- package/dist/wac/diff-warnings.js.map +1 -0
- package/dist/wac/diff.d.ts +40 -70
- package/dist/wac/diff.d.ts.map +1 -1
- package/dist/wac/diff.js +114 -91
- package/dist/wac/diff.js.map +1 -1
- package/dist/wac/document-key.d.ts +30 -0
- package/dist/wac/document-key.d.ts.map +1 -0
- package/dist/wac/document-key.js +87 -0
- package/dist/wac/document-key.js.map +1 -0
- package/dist/wac/document.d.ts +75 -65
- package/dist/wac/document.d.ts.map +1 -1
- package/dist/wac/document.js +60 -46
- package/dist/wac/document.js.map +1 -1
- package/dist/wac/execute.d.ts +25 -0
- package/dist/wac/execute.d.ts.map +1 -0
- package/dist/wac/execute.js +126 -0
- package/dist/wac/execute.js.map +1 -0
- package/dist/wac/load.d.ts +17 -0
- package/dist/wac/load.d.ts.map +1 -0
- package/dist/wac/load.js +92 -0
- package/dist/wac/load.js.map +1 -0
- package/dist/wac/resource-def.d.ts +89 -1
- package/dist/wac/resource-def.d.ts.map +1 -1
- package/dist/wac/resource-def.js +4 -0
- package/dist/wac/resource-def.js.map +1 -1
- package/dist/wac/resources.d.ts +9 -11
- package/dist/wac/resources.d.ts.map +1 -1
- package/dist/wac/resources.js +93 -27
- package/dist/wac/resources.js.map +1 -1
- package/dist/wac/values.d.ts +20 -0
- package/dist/wac/values.d.ts.map +1 -1
- package/dist/wac/values.js +46 -0
- package/dist/wac/values.js.map +1 -1
- package/package.json +4 -3
|
@@ -29,27 +29,24 @@
|
|
|
29
29
|
*
|
|
30
30
|
* ═══ YAML ═════════════════════════════════════════════════════════════════
|
|
31
31
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* would not ship with the published package either way, and CLAUDE.md §2
|
|
35
|
-
* forbids adding a dependency without explicit approval. A hand-rolled YAML
|
|
36
|
-
* subset was considered and rejected: indentation, quoting, anchors and
|
|
37
|
-
* multi-line scalars are exactly the surface where a parser that is 95%
|
|
38
|
-
* right produces a document that means something other than it says, which
|
|
39
|
-
* is worse than one that will not load.
|
|
32
|
+
* The document may be YAML or JSON; `wac/load.ts` owns the choice and the
|
|
33
|
+
* strictness, and both commands share it.
|
|
40
34
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* is
|
|
35
|
+
* ═══ THE PLATFORM DOCUMENT ════════════════════════════════════════════════
|
|
36
|
+
*
|
|
37
|
+
* `chatly platform plan` / `apply` (CHT-F04) is the same engine over the
|
|
38
|
+
* `/v1/platform/*` surface and a `cp_` credential — `commands/platform-as-code.ts`
|
|
39
|
+
* and `pac/`. Everything in `wac/` is shared: this file is the workspace's
|
|
40
|
+
* reader and command wiring, and nothing more.
|
|
46
41
|
*/
|
|
47
|
-
import {
|
|
48
|
-
import { bool, str } from '../args.js';
|
|
42
|
+
import { bool } from '../args.js';
|
|
49
43
|
import { printJson } from '../output.js';
|
|
50
|
-
import {
|
|
44
|
+
import { unverified } from './platform-as-code.js';
|
|
45
|
+
import { renderOutcomes } from '../wac/apply.js';
|
|
51
46
|
import { buildPlan, tally } from '../wac/diff.js';
|
|
52
|
-
import {
|
|
47
|
+
import { WORKSPACE_SCHEMA } from '../wac/document.js';
|
|
48
|
+
import { execute } from '../wac/execute.js';
|
|
49
|
+
import { loadFrom } from '../wac/load.js';
|
|
53
50
|
import { planFooter, planForJson, renderPlan } from '../wac/render.js';
|
|
54
51
|
import { resourceDef } from '../wac/resources.js';
|
|
55
52
|
/** Looked for in order when `--file` is absent. */
|
|
@@ -66,61 +63,21 @@ const DEFAULT_FILES = ['chatly.json', 'chatly.yaml', 'chatly.yml'];
|
|
|
66
63
|
*/
|
|
67
64
|
const EXEMPT_LIST_CAP = 200;
|
|
68
65
|
/* ── Loading ──────────────────────────────────────────────────────────── */
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
function findDefault() {
|
|
79
|
-
for (const candidate of DEFAULT_FILES) {
|
|
80
|
-
try {
|
|
81
|
-
readFileSync(candidate, 'utf8');
|
|
82
|
-
return candidate;
|
|
83
|
-
}
|
|
84
|
-
catch {
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
throw new Error('No document found. Looked for chatly.json, chatly.yaml and chatly.yml in this ' +
|
|
89
|
-
'directory.\nPass one with --file, or --file - to read stdin.\n' +
|
|
90
|
-
'There is a worked example at https://chatlychat.com/docs/sdk-cli#workspace-as-code');
|
|
91
|
-
}
|
|
66
|
+
/**
|
|
67
|
+
* The document, read and validated. The loader itself is `wac/load.ts`.
|
|
68
|
+
*
|
|
69
|
+
* Re-exported from here because this is where it has always lived and
|
|
70
|
+
* `chatly platform plan` needs the same loader with a different default
|
|
71
|
+
* filename — see that file's header for why it is not imported across command
|
|
72
|
+
* modules.
|
|
73
|
+
*/
|
|
92
74
|
export function loadDocument(args, env = process.env) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
* The second half of that test catches a YAML document passed under a
|
|
100
|
-
* `.json` name or through stdin, which is the shape of the mistake
|
|
101
|
-
* somebody makes once. A YAML file handed to `JSON.parse` fails with
|
|
102
|
-
* "Unexpected token v", which sends the reader looking for a syntax error
|
|
103
|
-
* in their own file rather than at the one sentence they need.
|
|
104
|
-
*/
|
|
105
|
-
throw new Error(`${path} looks like YAML, and this CLI reads JSON.\n\n` +
|
|
106
|
-
'YAML needs a parser, and adding a dependency to a published CLI is a decision this\n' +
|
|
107
|
-
'repo does not make casually (CLAUDE.md §2) — `yaml` is in the monorepo lockfile only\n' +
|
|
108
|
-
'as a transitive devDependency of lint-staged, so it is not something we already ship.\n' +
|
|
109
|
-
'A 95%-right hand-rolled YAML subset is worse than no YAML: it loads a document that\n' +
|
|
110
|
-
'means something other than what it says.\n\n' +
|
|
111
|
-
'Convert it and pipe it:\n' +
|
|
112
|
-
` npx js-yaml ${path} | chatly plan --file -\n` +
|
|
113
|
-
' python3 -c "import sys,yaml,json;json.dump(yaml.safe_load(sys.stdin),sys.stdout)" \\\n' +
|
|
114
|
-
` < ${path} | chatly plan --file -`);
|
|
115
|
-
}
|
|
116
|
-
let parsed;
|
|
117
|
-
try {
|
|
118
|
-
parsed = JSON.parse(raw);
|
|
119
|
-
}
|
|
120
|
-
catch (err) {
|
|
121
|
-
throw new Error(`${path} is not valid JSON: ${err instanceof Error ? err.message : '?'}`);
|
|
122
|
-
}
|
|
123
|
-
return parseDocument(parsed, env);
|
|
75
|
+
return loadFrom(args, env, {
|
|
76
|
+
defaultFiles: DEFAULT_FILES,
|
|
77
|
+
schema: WORKSPACE_SCHEMA,
|
|
78
|
+
docsUrl: 'https://chatlychat.com/docs/sdk-cli#workspace-as-code',
|
|
79
|
+
command: 'plan',
|
|
80
|
+
});
|
|
124
81
|
}
|
|
125
82
|
/* ── Reading the live workspace ───────────────────────────────────────── */
|
|
126
83
|
/**
|
|
@@ -218,18 +175,30 @@ export async function plan(chatly, args) {
|
|
|
218
175
|
* `whoami` is a GET, so this does not spend the no-writes property.
|
|
219
176
|
*/
|
|
220
177
|
async function workspaceGuard(chatly, doc) {
|
|
221
|
-
if (doc.
|
|
178
|
+
if (doc.guard === undefined) {
|
|
222
179
|
return undefined;
|
|
223
180
|
}
|
|
224
181
|
const me = await chatly.whoami();
|
|
225
|
-
if (me.workspaceId === doc.
|
|
182
|
+
if (me.workspaceId === doc.guard) {
|
|
226
183
|
return undefined;
|
|
227
184
|
}
|
|
228
|
-
return (`Refusing to run: the document says \`"workspace": "${doc.
|
|
185
|
+
return (`Refusing to run: the document says \`"workspace": "${doc.guard}"\` and this key ` +
|
|
229
186
|
`belongs to ${me.workspaceId}.\n` +
|
|
230
187
|
'Either point --key / CHATLY_API_KEY at the right workspace, or remove the `workspace` ' +
|
|
231
188
|
'line if this document is meant to be portable.');
|
|
232
189
|
}
|
|
190
|
+
/** `publicId` is an OUTPUT: read back for each channel the document names, by its `key`. */
|
|
191
|
+
function channelPublicIds(doc, live) {
|
|
192
|
+
const wanted = new Set(doc.sections.filter((s) => s.def.type === 'channels').flatMap((s) => s.rows.map((r) => r.key)));
|
|
193
|
+
const out = {};
|
|
194
|
+
for (const row of live.get('channels')?.rows ?? []) {
|
|
195
|
+
const key = row['key'];
|
|
196
|
+
if (typeof key === 'string' && wanted.has(key) && typeof row['publicId'] === 'string') {
|
|
197
|
+
out[key] = row['publicId'];
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return out;
|
|
201
|
+
}
|
|
233
202
|
/* ── apply ────────────────────────────────────────────────────────────── */
|
|
234
203
|
export async function apply(chatly, args) {
|
|
235
204
|
const doc = loadDocument(args);
|
|
@@ -252,126 +221,38 @@ export async function apply(chatly, args) {
|
|
|
252
221
|
process.stdout.write(renderPlan(built, opts));
|
|
253
222
|
process.stdout.write('\nApplying…\n\n');
|
|
254
223
|
}
|
|
255
|
-
const outcomes = await execute(chatly, built, opts);
|
|
224
|
+
const outcomes = await execute(chatly, built, opts, resourceDef);
|
|
225
|
+
/*
|
|
226
|
+
* Read-back verification, as `chatly platform apply` does: re-read, re-plan
|
|
227
|
+
* and require every row to be a noop. Planned WITHOUT `--write-only`, which
|
|
228
|
+
* would report every opaque field as a change forever.
|
|
229
|
+
*/
|
|
230
|
+
const liveAfter = await readLive(chatly, doc);
|
|
231
|
+
const after = buildPlan(doc, liveAfter, { writeOnly: false });
|
|
232
|
+
const mismatches = unverified(after, opts.prune);
|
|
233
|
+
const publicIds = channelPublicIds(doc, liveAfter);
|
|
256
234
|
if (bool(args.flags, 'json')) {
|
|
257
|
-
printJson({
|
|
235
|
+
printJson({
|
|
236
|
+
outcomes,
|
|
237
|
+
warnings: built.warnings,
|
|
238
|
+
verified: mismatches.length === 0,
|
|
239
|
+
mismatches,
|
|
240
|
+
publicIds,
|
|
241
|
+
});
|
|
258
242
|
}
|
|
259
243
|
else {
|
|
260
244
|
process.stdout.write(renderOutcomes(outcomes));
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* Walk the plan and do it. Continue on failure; never cascade.
|
|
266
|
-
*
|
|
267
|
-
* Exported so `wac.spec.ts` can drive it with a scripted transport and assert
|
|
268
|
-
* on the requests that went over the wire — the shape CLAUDE.md insists on
|
|
269
|
-
* ("assert on the request, not the canned response"), since a fake transport
|
|
270
|
-
* that echoes whatever the caller sent agrees with the bug.
|
|
271
|
-
*/
|
|
272
|
-
export async function execute(chatly, built, opts) {
|
|
273
|
-
const outcomes = [];
|
|
274
|
-
/** `type/key` → the id a create in THIS run returned. */
|
|
275
|
-
const refIds = new Map();
|
|
276
|
-
/** `type/key` that failed, so its dependents are skipped not attempted. */
|
|
277
|
-
const failed = new Set();
|
|
278
|
-
for (const item of built.items) {
|
|
279
|
-
const def = resourceDef(item.type);
|
|
280
|
-
if (def === undefined) {
|
|
281
|
-
continue;
|
|
282
|
-
}
|
|
283
|
-
const address = `${item.type}/${item.key}`;
|
|
284
|
-
if (item.action === 'noop') {
|
|
285
|
-
continue;
|
|
286
|
-
}
|
|
287
|
-
if (item.action === 'blocked') {
|
|
288
|
-
outcomes.push({ ...base(item), state: 'skipped', detail: item.reason, secrets: [] });
|
|
289
|
-
continue;
|
|
290
|
-
}
|
|
291
|
-
const blocker = item.dependsOn.find((d) => failed.has(d));
|
|
292
|
-
if (blocker !== undefined) {
|
|
293
|
-
outcomes.push({
|
|
294
|
-
...base(item),
|
|
295
|
-
state: 'skipped',
|
|
296
|
-
detail: `${blocker} failed above, and this names it. Attempting it anyway would produce a ` +
|
|
297
|
-
'second error about a missing id that points at the wrong thing.',
|
|
298
|
-
secrets: [],
|
|
299
|
-
});
|
|
300
|
-
failed.add(address);
|
|
301
|
-
continue;
|
|
302
|
-
}
|
|
303
|
-
const ops = writesFor(def, item, refIds, opts);
|
|
304
|
-
if (ops.length === 0) {
|
|
305
|
-
outcomes.push({
|
|
306
|
-
...base(item),
|
|
307
|
-
state: 'kept',
|
|
308
|
-
detail: item.action === 'orphan'
|
|
309
|
-
? opts.prune
|
|
310
|
-
? def.remove === null
|
|
311
|
-
? (def.removeBlocked ?? 'no DELETE route.')
|
|
312
|
-
: 'this type cannot be pruned safely on this run (see the warnings)'
|
|
313
|
-
: '`--prune` would delete it'
|
|
314
|
-
: undefined,
|
|
315
|
-
secrets: [],
|
|
316
|
-
});
|
|
317
|
-
continue;
|
|
318
|
-
}
|
|
319
|
-
const secrets = [];
|
|
320
|
-
let ok = true;
|
|
321
|
-
for (const op of ops) {
|
|
322
|
-
try {
|
|
323
|
-
const response = await chatly.request(op.method, op.path, op.body === undefined ? {} : { body: op.body });
|
|
324
|
-
secrets.push(...harvestSecrets(def, item, response));
|
|
325
|
-
const id = idOf(response, def);
|
|
326
|
-
if (id !== undefined) {
|
|
327
|
-
refIds.set(address, id);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
catch (err) {
|
|
331
|
-
ok = false;
|
|
332
|
-
failed.add(address);
|
|
333
|
-
outcomes.push({
|
|
334
|
-
...base(item),
|
|
335
|
-
state: 'failed',
|
|
336
|
-
detail: `${op.method} ${op.path} — ${err instanceof Error ? err.message : String(err)}`,
|
|
337
|
-
secrets,
|
|
338
|
-
});
|
|
339
|
-
break;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
if (ok) {
|
|
343
|
-
outcomes.push({ ...base(item), state: 'applied', detail: undefined, secrets });
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
return outcomes;
|
|
347
|
-
}
|
|
348
|
-
function base(item) {
|
|
349
|
-
return { type: item.type, key: item.key, action: item.action };
|
|
350
|
-
}
|
|
351
|
-
/**
|
|
352
|
-
* The id out of a write response, for a reference a later section needs.
|
|
353
|
-
*
|
|
354
|
-
* Two levels, because `POST /v1/customer-cards` answers
|
|
355
|
-
* `{ card: { id }, secret }` rather than the card itself — the same envelope
|
|
356
|
-
* quirk that makes the secret sweep two levels deep.
|
|
357
|
-
*/
|
|
358
|
-
function idOf(response, def) {
|
|
359
|
-
if (typeof response !== 'object' || response === null) {
|
|
360
|
-
return undefined;
|
|
361
|
-
}
|
|
362
|
-
const top = response;
|
|
363
|
-
const direct = top[def.idField];
|
|
364
|
-
if (typeof direct === 'string' && direct.length > 0) {
|
|
365
|
-
return direct;
|
|
366
|
-
}
|
|
367
|
-
for (const value of Object.values(top)) {
|
|
368
|
-
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
|
|
369
|
-
const nested = value[def.idField];
|
|
370
|
-
if (typeof nested === 'string' && nested.length > 0) {
|
|
371
|
-
return nested;
|
|
372
|
-
}
|
|
245
|
+
for (const [key, publicId] of Object.entries(publicIds)) {
|
|
246
|
+
process.stdout.write(`channels/${key}: publicId ${publicId}\n`);
|
|
373
247
|
}
|
|
248
|
+
process.stdout.write(mismatches.length === 0
|
|
249
|
+
? '\nRead back: everything matches the document.\n'
|
|
250
|
+
: `\nRead back: ${String(mismatches.length)} item(s) still differ from the document:\n` +
|
|
251
|
+
mismatches.map((m) => ` ${m}\n`).join(''));
|
|
374
252
|
}
|
|
375
|
-
|
|
253
|
+
const failed = outcomes.some((o) => o.state === 'failed' || o.state === 'skipped');
|
|
254
|
+
return failed || mismatches.length > 0 ? 1 : 0;
|
|
376
255
|
}
|
|
256
|
+
/** Re-exported: it moved to `wac/execute.ts` so `chatly platform apply` shares it. */
|
|
257
|
+
export { execute } from '../wac/execute.js';
|
|
377
258
|
//# sourceMappingURL=workspace-as-code.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-as-code.js","sourceRoot":"","sources":["../../src/commands/workspace-as-code.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAmB,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EACL,cAAc,EACd,cAAc,EACd,SAAS,GAIV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,KAAK,EAA+B,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAoB,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAoB,MAAM,qBAAqB,CAAC;AAIpE,mDAAmD;AACnD,MAAM,aAAa,GAAG,CAAC,aAAa,EAAE,aAAa,EAAE,YAAY,CAAU,CAAC;AAE5E;;;;;;;;;GASG;AACH,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B,6EAA6E;AAE7E,SAAS,QAAQ,CAAC,IAAY;IAC5B,IAAI,CAAC;QACH,6DAA6D;QAC7D,OAAO,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC7E,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,eAAe,IAAI,KAAK,GAAG,YAAY,KAAK,CA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E,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CACjD,CAAC;IACJ,CAAC;IACD,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;IACnF,OAAO,MAAM,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC;AAED,sFAAsF;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/help.d.ts
CHANGED
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* The convention the spec relies on: a command line starts with exactly two
|
|
23
23
|
* spaces and its first word is the command group.
|
|
24
24
|
*/
|
|
25
|
-
export declare const HELP = "chatly \u2014 the Chatly command line\n\nUSAGE\n chatly <command> [subcommand] [flags]\n\nAUTH\n login Store an API key in ~/.config/chatly/config.json (0600)\n logout Remove the stored key\n whoami Which workspace this key belongs to, and its scopes\n\nCONVERSATIONS\n conversations list Open conversations, newest first\n conversations get <id> One conversation\n conversations messages <id> The thread\n conversations send <id> <body>\n Reply as the key's machine identity\n conversations unattended Open with no agent reply yet\n conversations mood <id> Sentiment over the thread\n conversations return-to-bot <id> <bot-id>\n Give an open thread back to an assistant\n\nCONTACTS\n contacts list People in this workspace\n contacts get <id>\n contacts upsert --email --name --external-id --phone\n contacts tag <id> <tag> Add a tag\n contacts journey <id> Timeline: conversations, events, tickets\n contacts cards <id> Customer-card data for this person\n\nTICKETS\n tickets list --status --queue\n tickets get <id>\n tickets comments <id>\n tickets queues\n tickets lineage <id> Merge and split history\n tickets time <id> Time logged\n tickets status-history <id>\n\nKNOWLEDGE + SEARCH\n search <query> Across contacts, conversations, messages, tickets, KB\n kb articles Help-centre articles\n kb article <slug>\n kb collections\n\nEVENTS\n events track <contact-id> <name>\n Fire a CDP event. --prop key=value, repeatable\n events list --contact-id\n\nBOTS + EXTERNAL AGENTS\n bots list | get <id>\n bots create --body. type:\"external\" answers with a secret, ONCE\n bots update <id> --body\n bots update-external <id> --body. webhookUrl, timeoutSeconds, fallbackMessage\n bots rotate-secret <id> New signing secret, shown once. Hard cut, or\n --activate-at <ISO instant> (\u2264168h) keeps the old\n one signing until then\n bots deliveries <id> The push ledger. --status pending|delivered|failed|dead\n bots delivery <id> <delivery-id>\n One delivery, with the exact signed payload\n bots redeliver <id> <delivery-id>\n Queue the recorded payload again, from attempt 0\n bots test-delivery <id> Sign and POST a rehearsal payload; prints the response\n\nROUTING + AUTOMATION\n bot-routes list | fields | create | update <id> | delete <id>\n bot-routes resolve Dry-run the table. --body with a hypothetical visitor\n triggers list | get <id> | upsert | delete <id>\n brands list | get <id> | create | update <id> | delete <id>\n macros list | get <id> | create | update <id> | delete <id>\n email-templates templates | get <kind> | set <kind> | reset <kind>\n knowledge-gaps list | triage <id>\n\nINTEGRATIONS\n webhooks deliveries --status\n webhooks delivery <id>\n webhooks redeliver <id>\n webhooks endpoints Subscriptions, not traffic\n webhooks events The subscribable event catalogue\n webhooks schema-versions\n webhooks create --url --event (repeatable). Answers with whsec_, once\n webhooks pin <id> <version>\n customer-cards list | create | update <id> | delete <id>\n customer-cards rotate-secret <id>\n Update your endpoint BEFORE calling this\n docs-sources list | providers | discover | create | update <id> | delete <id>\n docs-sources sync <id> --full re-reads every page\n docs-sources subscribe <id> A refusal is a success: read the response\n channels list | get <id> | adapters | create | update <id>\n channels rotate-secret <id>\n\nDEVELOPING AGAINST WEBHOOKS AND AGENTS\n listen Tail this workspace's webhook deliveries and POST\n each one to a local URL. Registers nothing\n --forward-to <url> where to POST (omit to print only)\n --secret <whsec_\u2026> sign the forwarded request\n --endpoint <id> one subscription's traffic only\n --event <name> repeatable; filters client-side\n --status <s> pending | delivered | failed | dead\n --replay <n> forward the n newest rows first\n --interval <seconds> poll interval, default 2\n listen --bot <id> Tail one external agent's push deliveries instead,\n the same ledger as 'bots deliveries'. Same flags, except:\n --secret <chsec_\u2026> the AGENT's secret, not whsec_\n --event <kind> message | transfer (agent.message too)\n Forwards the payload itself, with the five\n x-chatly-* headers a real delivery carries\n listen --relay Receive LIVE tool calls, card fetches and canvas steps\n on localhost and answer them. Takes PRODUCTION traffic\n for the ids named, so they are required:\n --tool <id> | --card <id> | --canvas <channelId>\n --forward-to <url> required; each call's path is appended\n --secret <s> or <id>=<s>, repeatable; re-signs\n Detaches after 10 minutes idle, or on Ctrl-C. The\n dashboard shows a banner for as long as it is attached\n\nWORKSPACE AS CODE\n plan Diff chatly.json against the live workspace. Reads only\n apply Make the plan's changes. Never deletes unless told\n --file <path> the document (- for stdin). Default: ./chatly.json\n --prune also delete what the document omits\n --write-only also send fields that cannot be read back\n --exit-code plan only: exit 2 when there is drift\n\nAI\n ai providers | quota\n ai add-provider BYOK. --body\n ai test-provider <key>\n ai tools | create-tool | update-tool <id> | delete-tool <id>\n ai tone | set-tone | generate-tone <sample>\n\nREPORTS\n reports overview --days\n reports agents Means, not percentiles\n reports conversations-by-day\n reports sources | response-times | voice\n reports attribution <dim> One of ten dimensions; an unknown one is refused\n reports cohorts --weeks, NOT --days\n reports themes --date. A daily snapshot; there is no regenerate\n reports theme-conversations <theme-id>\n reports teams | labels | sla\n --from --to --days --group-by\n\nBILLING\n billing summary | plans | invoices\n billing usage <event-type> One meter over a window. --from --to\n billing usage-daily <event-type>\n Dense: one row per UTC day, zeros included\n billing usage-monthly --month\n\nWORKSPACE\n workspace settings\n workspace labels | inboxes | skills\n workspace team-members <team-id>\n workspace key-scopes What a key may be granted\n\nRAW\n api <METHOD> <path> Any route, with auth, idempotency and retries\n chatly api GET /v1/feature-flags\n chatly api POST /v1/macros --body '{\"name\":\"Refund\"}'\n\nGLOBAL FLAGS\n --json Raw API response instead of a table\n --all Follow pagination to the end (list commands)\n --limit <n> Page size\n --cursor <c> Start from a cursor\n --key <ck_\u2026> Override the stored key for this call\n --api-url <url> Point at another Chatly environment\n --help, --version\n\nDocs: https://chatlychat.com/docs/sdk-cli\n";
|
|
25
|
+
export declare const HELP = "chatly \u2014 the Chatly command line\n\nUSAGE\n chatly <command> [subcommand] [flags]\n\nAUTH\n login Store an API key in ~/.config/chatly/config.json (0600)\n logout Remove the stored key\n whoami Which workspace this key belongs to, and its scopes\n (a cp_ credential: scopes, expiry and guardrails)\n\nCONVERSATIONS\n conversations list Open conversations, newest first\n conversations get <id> One conversation\n conversations messages <id> The thread\n conversations send <id> <body>\n Reply as the key's machine identity\n conversations unattended Open with no agent reply yet\n conversations mood <id> Sentiment over the thread\n conversations return-to-bot <id> <bot-id>\n Give an open thread back to an assistant\n\nCONTACTS\n contacts list People in this workspace\n contacts get <id>\n contacts upsert --email --name --external-id --phone\n contacts tag <id> <tag> Add a tag\n contacts journey <id> Timeline: conversations, events, tickets\n contacts cards <id> Customer-card data for this person\n\nTICKETS\n tickets list --status --queue\n tickets get <id>\n tickets comments <id>\n tickets queues\n tickets lineage <id> Merge and split history\n tickets time <id> Time logged\n tickets status-history <id>\n\nKNOWLEDGE + SEARCH\n search <query> Across contacts, conversations, messages, tickets, KB\n kb articles Help-centre articles\n kb article <slug>\n kb collections\n\nEVENTS\n events track <contact-id> <name>\n Fire a CDP event. --prop key=value, repeatable\n events list --contact-id\n\nBOTS + EXTERNAL AGENTS\n bots list | get <id>\n bots create --body. type:\"external\" answers with a secret, ONCE\n bots update <id> --body\n bots update-external <id> --body. webhookUrl, timeoutSeconds, fallbackMessage\n bots rotate-secret <id> New signing secret, shown once. Hard cut, or\n --activate-at <ISO instant> (\u2264168h) keeps the old\n one signing until then\n bots deliveries <id> The push ledger. --status pending|delivered|failed|dead\n bots delivery <id> <delivery-id>\n One delivery, with the exact signed payload\n bots redeliver <id> <delivery-id>\n Queue the recorded payload again, from attempt 0\n bots test-delivery <id> Sign and POST a rehearsal payload; prints the response\n deliveries list --bot <id> An agent's delivery log. --status, --all\n deliveries show <event-id> --bot <id>\n The body (kept 7 days) and what the agent replied\n deliveries replay <event-id> --bot <id>\n Re-send the ORIGINAL body with the original eventId\n\nROUTING + AUTOMATION\n bot-routes list | fields | create | update <id> | delete <id>\n bot-routes resolve Dry-run the table. --body with a hypothetical visitor\n triggers list | get <id> | upsert | delete <id>\n brands list | get <id> | create | update <id> | delete <id>\n macros list | get <id> | create | update <id> | delete <id>\n email-templates templates | get <kind> | set <kind> | reset <kind>\n knowledge-gaps list | triage <id>\n\nINTEGRATIONS\n webhooks deliveries --status --endpoint --trace <ulid> (X-Chatly-Trace)\n webhooks delivery <id>\n webhooks redeliver <id>\n webhooks endpoints Subscriptions, not traffic\n webhooks events The subscribable event catalogue\n webhooks schema-versions\n webhooks create --url --event (repeatable). Answers with whsec_, once\n webhooks pin <id> <version>\n customer-cards list | create | update <id> | delete <id>\n customer-cards rotate-secret <id>\n Update your endpoint BEFORE calling this\n docs-sources list | providers | discover | create | update <id> | delete <id>\n docs-sources sync <id> --full re-reads every page\n docs-sources subscribe <id> A refusal is a success: read the response\n channels list | get <id> | adapters | create | update <id>\n channels set-key <id> <key> Give an existing channel the key chatly.json matches it on\n channels rotate-secret <id>\n channels brand <id> --url <brand.json> | --file/--body to apply; neither reads back\n\nDATA RIGHTS\n privacy executor-key Mint the credential a privacy platform registers.\n Answers with the executor URL, the workspace id\n and the secret \u2014 shown ONCE. The key carries\n exactly privacy:execute and reaches nothing but\n /v1/privacy/*\n privacy lookup --body <json> resolve a person to a subjectId\n privacy request --body <json> file one; caseId is the replay key\n privacy status <id> Read a request back\n privacy cancel <id> Withdraw one that has not run\n\nDEVELOPING AGAINST WEBHOOKS AND AGENTS\n listen Tail this workspace's webhook deliveries and POST\n each one to a local URL. Registers nothing\n --forward-to <url> where to POST (omit to print only)\n --secret <whsec_\u2026> sign the forwarded request\n --endpoint <id> one subscription's traffic only\n --event <name> repeatable; filters client-side\n --status <s> pending | delivered | failed | dead\n --replay <n> forward the n newest rows first\n --interval <seconds> poll interval, default 2\n listen --bot <id> Tail one external agent's push deliveries instead,\n the same ledger as 'bots deliveries'. Same flags, except:\n --secret <chsec_\u2026> the AGENT's secret, not whsec_\n --event <kind> message | transfer (agent.message too)\n Forwards the payload itself, with the five\n x-chatly-* headers a real delivery carries\n listen --relay Receive LIVE tool calls, card fetches and canvas steps\n on localhost and answer them. Takes PRODUCTION traffic\n for the ids named, so they are required:\n --tool <id> | --card <id> | --canvas <channelId>\n --forward-to <url> required; each call's path is appended\n --secret <s> or <id>=<s>, repeatable; re-signs\n Detaches after 10 minutes idle, or on Ctrl-C. The\n dashboard shows a banner for as long as it is attached\n\nWORKSPACE AS CODE\n plan Diff chatly.json against the live workspace. Reads only\n apply Make the plan's changes. Never deletes unless told\n --file <path> the document (- for stdin). Default: ./chatly.json\n --prune also delete what the document omits\n --write-only also send fields that cannot be read back\n --exit-code plan only: exit 2 when there is drift\n platform plan The same over /v1/platform/* with a cp_ credential:\n platform apply workspaces, users, apiKeys, botCredentials,\n knowledgeSources and settings (business hours,\n routing, widget channel) across many tenants.\n Default file: ./chatly.platform.json. Same flags.\n apply re-reads afterwards and exits 1 unless\n everything matches the document\n\nINSTALL\n init next|remix|astro|express\n Scaffold the widget into this project for a web channel:\n identity route, launcher or snippet, CSP sources\n (chatly.csp.mjs) and a privacy table. Never overwrites\n --public-id <id> which web channel (needed if several)\n --identity hmac|atlas default hmac (atlas: next, remix)\n --dir <path> default . --dry-run --force\n\nAI\n ai providers | quota\n ai add-provider BYOK. --body\n ai test-provider <key>\n ai tools | create-tool | update-tool <id> | delete-tool <id>\n ai tone | set-tone | generate-tone <sample>\n\nREPORTS\n reports overview --days\n reports agents Means, not percentiles\n reports conversations-by-day\n reports sources | response-times | voice\n reports attribution <dim> One of ten dimensions; an unknown one is refused\n reports cohorts --weeks, NOT --days\n reports themes --date. A daily snapshot; there is no regenerate\n reports theme-conversations <theme-id>\n reports teams | labels | sla\n --from --to --days --group-by\n\nBILLING\n billing summary | plans | invoices\n billing usage <event-type> One meter over a window. --from --to\n billing usage-daily <event-type>\n Dense: one row per UTC day, zeros included\n billing usage-monthly --month\n\nWORKSPACE\n workspace settings\n workspace labels | inboxes | skills\n workspace team-members <team-id>\n workspace key-scopes What a key may be granted\n\nRAW\n api <METHOD> <path> Any route, with auth, idempotency and retries\n chatly api GET /v1/feature-flags\n chatly api POST /v1/macros --body '{\"name\":\"Refund\"}'\n\nGLOBAL FLAGS\n --json Raw API response instead of a table\n --all Follow pagination to the end (list commands)\n --limit <n> Page size\n --cursor <c> Start from a cursor\n --key <ck_\u2026> Override the stored key for this call\n --api-url <url> Point at another Chatly environment\n --help, --version\n\nDocs: https://chatlychat.com/docs/sdk-cli\n";
|
|
26
26
|
//# sourceMappingURL=help.d.ts.map
|
package/dist/help.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,IAAI,k8UA8MhB,CAAC"}
|
package/dist/help.js
CHANGED
|
@@ -31,6 +31,7 @@ AUTH
|
|
|
31
31
|
login Store an API key in ~/.config/chatly/config.json (0600)
|
|
32
32
|
logout Remove the stored key
|
|
33
33
|
whoami Which workspace this key belongs to, and its scopes
|
|
34
|
+
(a cp_ credential: scopes, expiry and guardrails)
|
|
34
35
|
|
|
35
36
|
CONVERSATIONS
|
|
36
37
|
conversations list Open conversations, newest first
|
|
@@ -85,6 +86,11 @@ BOTS + EXTERNAL AGENTS
|
|
|
85
86
|
bots redeliver <id> <delivery-id>
|
|
86
87
|
Queue the recorded payload again, from attempt 0
|
|
87
88
|
bots test-delivery <id> Sign and POST a rehearsal payload; prints the response
|
|
89
|
+
deliveries list --bot <id> An agent's delivery log. --status, --all
|
|
90
|
+
deliveries show <event-id> --bot <id>
|
|
91
|
+
The body (kept 7 days) and what the agent replied
|
|
92
|
+
deliveries replay <event-id> --bot <id>
|
|
93
|
+
Re-send the ORIGINAL body with the original eventId
|
|
88
94
|
|
|
89
95
|
ROUTING + AUTOMATION
|
|
90
96
|
bot-routes list | fields | create | update <id> | delete <id>
|
|
@@ -96,7 +102,7 @@ ROUTING + AUTOMATION
|
|
|
96
102
|
knowledge-gaps list | triage <id>
|
|
97
103
|
|
|
98
104
|
INTEGRATIONS
|
|
99
|
-
webhooks deliveries --status
|
|
105
|
+
webhooks deliveries --status --endpoint --trace <ulid> (X-Chatly-Trace)
|
|
100
106
|
webhooks delivery <id>
|
|
101
107
|
webhooks redeliver <id>
|
|
102
108
|
webhooks endpoints Subscriptions, not traffic
|
|
@@ -111,7 +117,20 @@ INTEGRATIONS
|
|
|
111
117
|
docs-sources sync <id> --full re-reads every page
|
|
112
118
|
docs-sources subscribe <id> A refusal is a success: read the response
|
|
113
119
|
channels list | get <id> | adapters | create | update <id>
|
|
120
|
+
channels set-key <id> <key> Give an existing channel the key chatly.json matches it on
|
|
114
121
|
channels rotate-secret <id>
|
|
122
|
+
channels brand <id> --url <brand.json> | --file/--body to apply; neither reads back
|
|
123
|
+
|
|
124
|
+
DATA RIGHTS
|
|
125
|
+
privacy executor-key Mint the credential a privacy platform registers.
|
|
126
|
+
Answers with the executor URL, the workspace id
|
|
127
|
+
and the secret — shown ONCE. The key carries
|
|
128
|
+
exactly privacy:execute and reaches nothing but
|
|
129
|
+
/v1/privacy/*
|
|
130
|
+
privacy lookup --body <json> resolve a person to a subjectId
|
|
131
|
+
privacy request --body <json> file one; caseId is the replay key
|
|
132
|
+
privacy status <id> Read a request back
|
|
133
|
+
privacy cancel <id> Withdraw one that has not run
|
|
115
134
|
|
|
116
135
|
DEVELOPING AGAINST WEBHOOKS AND AGENTS
|
|
117
136
|
listen Tail this workspace's webhook deliveries and POST
|
|
@@ -145,6 +164,22 @@ WORKSPACE AS CODE
|
|
|
145
164
|
--prune also delete what the document omits
|
|
146
165
|
--write-only also send fields that cannot be read back
|
|
147
166
|
--exit-code plan only: exit 2 when there is drift
|
|
167
|
+
platform plan The same over /v1/platform/* with a cp_ credential:
|
|
168
|
+
platform apply workspaces, users, apiKeys, botCredentials,
|
|
169
|
+
knowledgeSources and settings (business hours,
|
|
170
|
+
routing, widget channel) across many tenants.
|
|
171
|
+
Default file: ./chatly.platform.json. Same flags.
|
|
172
|
+
apply re-reads afterwards and exits 1 unless
|
|
173
|
+
everything matches the document
|
|
174
|
+
|
|
175
|
+
INSTALL
|
|
176
|
+
init next|remix|astro|express
|
|
177
|
+
Scaffold the widget into this project for a web channel:
|
|
178
|
+
identity route, launcher or snippet, CSP sources
|
|
179
|
+
(chatly.csp.mjs) and a privacy table. Never overwrites
|
|
180
|
+
--public-id <id> which web channel (needed if several)
|
|
181
|
+
--identity hmac|atlas default hmac (atlas: next, remix)
|
|
182
|
+
--dir <path> default . --dry-run --force
|
|
148
183
|
|
|
149
184
|
AI
|
|
150
185
|
ai providers | quota
|
package/dist/help.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8MnB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The parts of `chatly init` (CHT-F02) that do not depend on the framework:
|
|
3
|
+
* the CSP module and the privacy-policy table. Both are rendered from the
|
|
4
|
+
* channel's own `embed` block, read off `GET /v1/channels` with the caller's
|
|
5
|
+
* key — the same block the dashboard's install screen shows — so neither is a
|
|
6
|
+
* hand-kept copy of something the server already says.
|
|
7
|
+
*/
|
|
8
|
+
/** One generated file. `path` is relative to the target directory. */
|
|
9
|
+
export interface ScaffoldFile {
|
|
10
|
+
readonly path: string;
|
|
11
|
+
readonly contents: string;
|
|
12
|
+
}
|
|
13
|
+
/** The fields of `channel.embed` this wizard reads. Everything else is ignored. */
|
|
14
|
+
export interface EmbedBlock {
|
|
15
|
+
readonly snippet: string;
|
|
16
|
+
readonly contentSecurityPolicy: {
|
|
17
|
+
readonly scriptSrc: ReadonlyArray<string>;
|
|
18
|
+
readonly connectSrc: ReadonlyArray<string>;
|
|
19
|
+
readonly imgSrc: ReadonlyArray<string>;
|
|
20
|
+
readonly mediaSrc: ReadonlyArray<string>;
|
|
21
|
+
};
|
|
22
|
+
readonly storage: ReadonlyArray<StorageKey>;
|
|
23
|
+
}
|
|
24
|
+
/** One row of `embed.storage` — the public storage declaration. */
|
|
25
|
+
export interface StorageKey {
|
|
26
|
+
readonly key: string;
|
|
27
|
+
readonly store: string;
|
|
28
|
+
readonly purpose: string;
|
|
29
|
+
readonly lifetime: string;
|
|
30
|
+
readonly category: string;
|
|
31
|
+
readonly writtenWhen: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ScaffoldInput {
|
|
34
|
+
readonly publicId: string;
|
|
35
|
+
readonly embed: EmbedBlock;
|
|
36
|
+
/** `hmac` signs the user id on your server; `atlas` passes an Atlas token. */
|
|
37
|
+
readonly identity: 'hmac' | 'atlas';
|
|
38
|
+
/** ISO date, stamped into each header so a stale file can be recognised. */
|
|
39
|
+
readonly generatedOn: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The module every framework's CSP is merged from.
|
|
43
|
+
*
|
|
44
|
+
* `.mjs` and dependency-free on purpose: `next.config.{js,mjs,ts}` and an
|
|
45
|
+
* Express server can both import it, and a header built from it needs no
|
|
46
|
+
* library. It does NOT write a header itself — the host page already has a
|
|
47
|
+
* policy, and a second `Content-Security-Policy` header INTERSECTS with the
|
|
48
|
+
* first rather than extending it, which would block the host's own scripts.
|
|
49
|
+
* So it merges into the directives the integrator already has.
|
|
50
|
+
*/
|
|
51
|
+
export declare function cspModule(input: ScaffoldInput): ScaffoldFile;
|
|
52
|
+
/**
|
|
53
|
+
* The privacy-policy table (CHT-DOC12's content, rendered for this channel).
|
|
54
|
+
*
|
|
55
|
+
* Every key with the channel's `publicId` already substituted, which is the
|
|
56
|
+
* form a privacy policy or a consent tool's cookie scan needs. `cookies` is
|
|
57
|
+
* stated as none because the declaration says so — an omitted row reads as
|
|
58
|
+
* "not declared", not as "none".
|
|
59
|
+
*/
|
|
60
|
+
export declare function privacyTable(input: ScaffoldInput): ScaffoldFile;
|
|
61
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/init/shared.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,sEAAsE;AACtE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,mFAAmF;AACnF,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,qBAAqB,EAAE;QAC9B,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;QAC1C,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC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