@gitroll/tacitt-cli 0.2.0 → 0.3.0

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.
Files changed (42) hide show
  1. package/dist/{agent-setup-B8DAiQ6Z.mjs → agent-setup-CLXdKr2I.mjs} +1 -1
  2. package/dist/agent-setup-worker.mjs +4 -4
  3. package/dist/cli.mjs +65 -8
  4. package/dist/codex-title-worker.mjs +1 -1
  5. package/dist/configured-preview-worker.mjs +4 -4
  6. package/dist/configured-session-worker.mjs +25 -4
  7. package/dist/{heap-BHcvxWCw.mjs → heap-eO_uWpD1.mjs} +45 -3
  8. package/dist/inspection-worker.mjs +3 -3
  9. package/dist/job-rK-Ho9OD.mjs +613 -0
  10. package/dist/{model-BJdTLNjT.mjs → model-BBAnsFAx.mjs} +1 -1
  11. package/dist/operation-executor.mjs +2 -2
  12. package/dist/preview-worker.mjs +1 -1
  13. package/dist/{query-BA0XCwnR.mjs → query-DN99jiRc.mjs} +273 -551
  14. package/dist/{run-BeLHsZWb.mjs → run-4G_CvdDj.mjs} +2 -2
  15. package/dist/session-process.mjs +6 -1
  16. package/dist/{src-CC95LYYp.mjs → src-B4R5XMEP.mjs} +370 -176
  17. package/dist/{src-k0Ya1Bri.mjs → src-CPbdnGrk.mjs} +118 -47
  18. package/dist/{src-B5SArpVY.mjs → src-qoLRvX-A.mjs} +17 -5
  19. package/dist/store-database-worker.mjs +1 -1
  20. package/dist/web/assets/index-BkuUI3Eu.js +67 -0
  21. package/dist/web/assets/index-Clg6Pfv_.css +1 -0
  22. package/dist/web/index.html +2 -2
  23. package/package.json +1 -1
  24. package/skills/tacitt/SKILL.md +8 -6
  25. package/skills/tacitt/references/commands.md +14 -9
  26. package/skills/tacitt/references/journey.md +10 -6
  27. package/skills/tacitt/references/send.md +1 -1
  28. package/skills/tacitt/scripts/INDEX.md +6 -2
  29. package/skills/tacitt/scripts/journey-card-consolidation.mjs +90 -4
  30. package/skills/tacitt/scripts/journey-card-values.d.mts +17 -0
  31. package/skills/tacitt/scripts/journey-card-values.mjs +116 -0
  32. package/skills/tacitt/scripts/journey-classification.mjs +6 -2
  33. package/skills/tacitt/scripts/journey-panel-host.d.mts +9 -0
  34. package/skills/tacitt/scripts/journey-panel-host.mjs +56 -0
  35. package/skills/tacitt/scripts/journey-state.mjs +10 -4
  36. package/skills/tacitt/scripts/journey-tasks.mjs +1 -1
  37. package/skills/tacitt/scripts/journey.d.mts +2 -0
  38. package/skills/tacitt/scripts/journey.mjs +120 -53
  39. package/skills/tacitt/scripts/review-stream-client.mjs +1 -1
  40. package/dist/job-J3NFw3MH.mjs +0 -194
  41. package/dist/web/assets/index-Bjos73wK.js +0 -67
  42. package/dist/web/assets/index-Bl4C2b2_.css +0 -1
@@ -1,194 +0,0 @@
1
- import { B as writeLogicalJourneyOutput, C as readConfiguredSearchFields, R as gitSeedsProvider, U as readConfiguredOutputInfo, d as verifyOutputShard, f as writeOutputShard } from "./src-k0Ya1Bri.mjs";
2
- import { An as hideKeyId, En as renderedHideValue, Mn as packHideIndex, kn as addHideIndexTokens } from "./src-CC95LYYp.mjs";
3
- //#region apps/cli/src/journey/hide-index.ts
4
- /**
5
- * Word pieces of render input, gathered as it is read so its texts are not held to the end.
6
- * `from` continues a collection begun in another thread (ADR 0181).
7
- */
8
- function createHideIndexTokens(from) {
9
- const tokens = new Set(from?.tokens);
10
- let complete = from?.complete ?? true;
11
- return {
12
- tokens,
13
- add: (text) => {
14
- if (complete) complete = addHideIndexTokens(text, (token) => tokens.add(token));
15
- if (tokens.size > 2e6) complete = false;
16
- },
17
- complete: () => complete
18
- };
19
- }
20
- /**
21
- * The pieces of a Work collected in shards (ADR 0199): the same set and completeness as one
22
- * collection, since pieces only accumulate and the bound applies to their union.
23
- */
24
- function mergeHideIndexTokens(parts) {
25
- const tokens = /* @__PURE__ */ new Set();
26
- let complete = true;
27
- for (const part of parts) {
28
- complete &&= part.complete;
29
- for (const token of part.tokens) {
30
- if (!complete) break;
31
- tokens.add(token);
32
- if (tokens.size > 2e6) complete = false;
33
- }
34
- }
35
- return createHideIndexTokens({
36
- tokens: complete ? tokens : [],
37
- complete
38
- });
39
- }
40
- /** The Work's own texts a render can mask, read before its base archive. */
41
- function hideIndexTexts(work) {
42
- const suggestion = work.suggestion;
43
- return [
44
- work.title,
45
- work.description,
46
- work.reason,
47
- ...suggestion ? [
48
- suggestion.title,
49
- suggestion.description,
50
- suggestion.reason
51
- ] : []
52
- ];
53
- }
54
- /**
55
- * The CPU-bound part of a hide index: word pieces of the texts and every base field, or of one
56
- * shard's base fields (ADR 0199).
57
- */
58
- async function collectHideIndexTokens(texts, primary, processing, { add, complete }, signal, shard) {
59
- for (const text of texts) add(text);
60
- for await (const field of readConfiguredSearchFields(primary, processing, signal, true, void 0, shard)) {
61
- if (!complete()) break;
62
- add(field.text);
63
- }
64
- }
65
- /** Keyed digests of collected word pieces and of the confirmed Hide values. */
66
- async function packRenderHideIndex(input) {
67
- const { work } = input;
68
- const { tokens, complete } = input.tokens;
69
- const key = await input.storage.hideIndexKey(input.journeyId);
70
- return {
71
- kind: "hide-index",
72
- journeyId: input.journeyId,
73
- workId: work.id,
74
- revision: work.revision,
75
- confirmedHideRevision: input.confirmedHideRevision,
76
- keyId: hideKeyId(key),
77
- digests: complete() ? packHideIndex(key, tokens) : null,
78
- values: packHideIndex(key, [...input.confirmed].map(([term, { kind }]) => renderedHideValue(kind, term)))
79
- };
80
- }
81
- //#endregion
82
- //#region apps/cli/src/journey/render/job.ts
83
- /**
84
- * The same steps on the owning thread; also the fallback when workers cannot run. The written
85
- * primary is read back as the publisher reads an existing output.
86
- */
87
- async function writeJourneyOutput(work, signal, onPath) {
88
- const output = await writeLogicalJourneyOutput(work.request, signal, onPath);
89
- await readConfiguredOutputInfo(output.primary, signal);
90
- await collectHideIndexTokens(work.texts, work.request.primary, work.request.processing, work.tokens, signal);
91
- return {
92
- output,
93
- tokens: work.tokens
94
- };
95
- }
96
- function journeyOutputJob(work) {
97
- const { processing, ...request } = work.request;
98
- return {
99
- request,
100
- processing: {
101
- environment: processing.environment,
102
- ...processing.limits === void 0 ? {} : { limits: processing.limits },
103
- ...processing.replacementKey === void 0 ? {} : { replacementKey: processing.replacementKey },
104
- ...processing.staticExceptions === void 0 ? {} : { staticExceptions: processing.staticExceptions }
105
- },
106
- texts: work.texts,
107
- tokens: [...work.tokens.tokens],
108
- tokensComplete: work.tokens.complete()
109
- };
110
- }
111
- function workerProcessing(job, live) {
112
- return {
113
- ...live,
114
- ...job.processing,
115
- gitNames: gitSeedsProvider([])
116
- };
117
- }
118
- /**
119
- * Worker side of one shard: its entries rewritten into private archives and the hide-index word
120
- * pieces of its base entries. The first shard also takes the Work's texts, title pieces and the
121
- * base manifest's fields, so the shards' pieces together are those of one job.
122
- */
123
- async function runJourneyOutputShardJob(job, live, signal, onPath) {
124
- const processing = workerProcessing(job, live);
125
- const { maskEvidence, ...request } = job.request;
126
- if (!maskEvidence) throw new Error("ARTIFACT_INVALID_APPROVAL");
127
- const pieces = await writeOutputShard({
128
- ...request,
129
- processing,
130
- maskEvidence,
131
- shard: job.shard
132
- }, signal, onPath);
133
- const first = job.shard.index === 0;
134
- const tokens = createHideIndexTokens(first ? {
135
- tokens: job.tokens,
136
- complete: job.tokensComplete
137
- } : void 0);
138
- await collectHideIndexTokens(first ? job.texts : [], job.request.primary, processing, tokens, signal, job.shard);
139
- return {
140
- kind: "journey-output-shard",
141
- pieces,
142
- tokens: [...tokens.tokens],
143
- tokensComplete: tokens.complete()
144
- };
145
- }
146
- /** Worker side of one shard of a merged output's readback. */
147
- async function runJourneyOutputVerifyJob(job, signal) {
148
- const ledger = job.output.finalMaskLedger;
149
- if (!ledger) throw new Error("ARTIFACT_INVALID_APPROVAL");
150
- await verifyOutputShard({
151
- ...job.output,
152
- finalMaskLedger: ledger
153
- }, job.shard, signal);
154
- return { kind: "journey-output-verify" };
155
- }
156
- /**
157
- * Worker side: `live` holds the worker's own adapters and static processor. A job with
158
- * `request.shards` merges them; its caller then reads the output back in shards (ADR 0199).
159
- */
160
- async function runJourneyOutputJob(job, live, signal, onPath) {
161
- const processing = workerProcessing(job, live);
162
- if (job.request.shards) {
163
- const output = await writeLogicalJourneyOutput({
164
- ...job.request,
165
- processing
166
- }, signal, onPath);
167
- await readConfiguredOutputInfo(output.primary, signal);
168
- return {
169
- kind: "journey-output",
170
- output,
171
- tokens: [],
172
- tokensComplete: true
173
- };
174
- }
175
- const written = await writeJourneyOutput({
176
- request: {
177
- ...job.request,
178
- processing
179
- },
180
- texts: job.texts,
181
- tokens: createHideIndexTokens({
182
- tokens: job.tokens,
183
- complete: job.tokensComplete
184
- })
185
- }, signal, onPath);
186
- return {
187
- kind: "journey-output",
188
- output: written.output,
189
- tokens: [...written.tokens.tokens],
190
- tokensComplete: written.tokens.complete()
191
- };
192
- }
193
- //#endregion
194
- export { writeJourneyOutput as a, mergeHideIndexTokens as c, runJourneyOutputVerifyJob as i, packRenderHideIndex as l, runJourneyOutputJob as n, createHideIndexTokens as o, runJourneyOutputShardJob as r, hideIndexTexts as s, journeyOutputJob as t };