@wayai/cli 0.3.346 → 0.3.348

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/index.js CHANGED
@@ -16496,10 +16496,10 @@ var init_chunk_2YVCHUBL = __esm({
16496
16496
  }
16497
16497
  });
16498
16498
 
16499
- // ../../packages/core/dist/chunk-BT77VXJU.js
16499
+ // ../../packages/core/dist/chunk-RRU36I2I.js
16500
16500
  var casePhaseParam;
16501
- var init_chunk_BT77VXJU = __esm({
16502
- "../../packages/core/dist/chunk-BT77VXJU.js"() {
16501
+ var init_chunk_RRU36I2I = __esm({
16502
+ "../../packages/core/dist/chunk-RRU36I2I.js"() {
16503
16503
  "use strict";
16504
16504
  init_chunk_733K4J4G();
16505
16505
  init_chunk_HZ6CADSY();
@@ -16524,13 +16524,13 @@ var init_chunk_RHXF6X2Y = __esm({
16524
16524
  }
16525
16525
  });
16526
16526
 
16527
- // ../../packages/core/dist/chunk-Q7NWJA2G.js
16527
+ // ../../packages/core/dist/chunk-XUPUXNGM.js
16528
16528
  var CASE_REVIEW_DECISIONS, CASE_ISSUED_FORMATS, CASE_REVIEW_COMMENT_MAX_LENGTH, CASE_REVIEW_JUSTIFICATION_MAX_LENGTH, text2, caseSubmissionParam, decideCaseSubmissionBody, caseIssuedQuery, CASE_APPROVALS_STATES, caseApprovalsQuery, caseCompareDefaultQuery, caseApprovalsAgendaQuery;
16529
- var init_chunk_Q7NWJA2G = __esm({
16530
- "../../packages/core/dist/chunk-Q7NWJA2G.js"() {
16529
+ var init_chunk_XUPUXNGM = __esm({
16530
+ "../../packages/core/dist/chunk-XUPUXNGM.js"() {
16531
16531
  "use strict";
16532
16532
  init_chunk_2YVCHUBL();
16533
- init_chunk_BT77VXJU();
16533
+ init_chunk_RRU36I2I();
16534
16534
  init_chunk_RHXF6X2Y();
16535
16535
  init_chunk_5Y2NNQHX();
16536
16536
  init_chunk_VROZDNLV();
@@ -18481,13 +18481,13 @@ var init_contracts = __esm({
18481
18481
  init_chunk_AHISKXHA();
18482
18482
  init_chunk_2YEGUQR7();
18483
18483
  init_chunk_JDJ4EUOL();
18484
- init_chunk_Q7NWJA2G();
18484
+ init_chunk_XUPUXNGM();
18485
18485
  init_chunk_K3PD6AOF();
18486
18486
  init_chunk_KVMROYDC();
18487
18487
  init_chunk_M2IF4G6X();
18488
18488
  init_chunk_7CZSLDOE();
18489
18489
  init_chunk_2YVCHUBL();
18490
- init_chunk_BT77VXJU();
18490
+ init_chunk_RRU36I2I();
18491
18491
  init_chunk_WYCUCSD5();
18492
18492
  init_chunk_H6V7NEWR();
18493
18493
  init_chunk_ZVIMTUGZ();
@@ -43067,6 +43067,10 @@ async function caseReceivedAdd(session, file, opts) {
43067
43067
  console.log(`${one2(received.title)} registered in ${phase.folder}/received/ of ${session.connection.code}: ${received.received_id}`);
43068
43068
  if (received.text_origin === "agent") console.log("Its text is marked as converted by an agent, for whoever reviews it.");
43069
43069
  }
43070
+ function markedThroughout(work) {
43071
+ const rows = [...work.inputs, ...work.items, ...work.items.flatMap((i) => i.item_links.depends_on)];
43072
+ return rows.every((row) => typeof row.confidential === "boolean");
43073
+ }
43070
43074
  function documentHere(root, record, bound) {
43071
43075
  const folder = bound.endsWith("/");
43072
43076
  try {
@@ -43086,13 +43090,14 @@ async function caseSkeleton(session, clone, opts) {
43086
43090
  if (opts.confidential && !holdsRight) {
43087
43091
  throw expected(`This machine's authorization on case ${detail.code} does not hold the Confidential right, so --confidential reads nothing more. Run it without --confidential.`);
43088
43092
  }
43089
- if (!opts.confidential && holdsRight) throw expected(SKELETON_CONFIDENTIAL_REQUIRED);
43090
43093
  const mirror = mirrorFolder(clone.root);
43091
43094
  if (!mirror) throw undelivered();
43092
43095
  const phaseFolders = detail.phases.map((p) => p.folder);
43093
43096
  assertClonePaths(clone.root, clone.record, phaseFolders);
43094
43097
  const phase = findPhase(detail, opts.phase);
43095
43098
  const work = (await call2(session, () => session.api.getCasePhaseWork(session.connection, phase.phase_id))).data;
43099
+ if (!opts.confidential && holdsRight && !markedThroughout(work)) throw expected(SKELETON_CONFIDENTIAL_REQUIRED);
43100
+ const workItems = opts.confidential ? work.items : work.items.filter((i) => i.confidential !== true);
43096
43101
  const outputs = opts.output === void 0 ? work.outputs : work.outputs.filter((o) => o.code === opts.output);
43097
43102
  if (opts.output !== void 0 && outputs.length === 0) {
43098
43103
  throw expected(`Phase ${phase.folder} has no output ${JSON.stringify(sanitizeTerminalText(opts.output))}. Its outputs: ${work.outputs.map((o) => one2(o.code)).join(", ") || "none"}.`);
@@ -43116,7 +43121,7 @@ async function caseSkeleton(session, clone, opts) {
43116
43121
  if (bad.length) return null;
43117
43122
  if (output.format === "file") return { code: code2, skipped: "a file piece, sent as it comes: it has no items to start from" };
43118
43123
  if (output.dispensation) return { code: code2, skipped: "dispensed" };
43119
- const items = work.items.filter((i) => i.output_id === output.id && !i.dispensation);
43124
+ const items = workItems.filter((i) => i.output_id === output.id && !i.dispensation);
43120
43125
  const malformed = items.filter((i) => !CASE_CODE_PATTERN.test(i.code));
43121
43126
  for (const i of malformed) problems2.push(`output ${code2}: ${JSON.stringify(sanitizeTerminalText(i.code))} is no item code`);
43122
43127
  if (malformed.length) return null;
@@ -43176,8 +43181,10 @@ async function caseSkeleton(session, clone, opts) {
43176
43181
  if (plan.missing.length) console.log(` Attributes the case holds no value for, left as {{fill: \u2026}}: ${plan.missing.map(one2).join(", ")}.`);
43177
43182
  }
43178
43183
  if (wrote) console.log("Replace each {{fill: \u2026}} with its text, then push.");
43184
+ if (!opts.confidential) console.log(`
43185
+ ${SKELETON_CONFIDENTIAL_NOTICE}`);
43179
43186
  }
43180
- var NOTE_PAGES_READ, NOTES_PAGE, AGENDA_PAGES_READ2, one2, loadCase, loadState, phaseLabel, statusWords, CaseNames, AWAITING, readsWork, PHASES_VIEW_NOTE, noteLine, blockerKey, SKELETON_CONFIDENTIAL_REQUIRED;
43187
+ var NOTE_PAGES_READ, NOTES_PAGE, AGENDA_PAGES_READ2, one2, loadCase, loadState, phaseLabel, statusWords, CaseNames, AWAITING, readsWork, PHASES_VIEW_NOTE, noteLine, blockerKey, SKELETON_CONFIDENTIAL_REQUIRED, SKELETON_CONFIDENTIAL_NOTICE;
43181
43188
  var init_case_work = __esm({
43182
43189
  "src/cases/case-work.ts"() {
43183
43190
  "use strict";
@@ -43276,7 +43283,8 @@ var init_case_work = __esm({
43276
43283
  return "";
43277
43284
  }
43278
43285
  };
43279
- SKELETON_CONFIDENTIAL_REQUIRED = "This machine's authorization holds the Confidential right, so the phase's items WayAI answers it may include confidential ones, which nothing marks: a document at an open path could carry them. Run skeleton with --confidential, which writes the documents under conf/.";
43286
+ SKELETON_CONFIDENTIAL_REQUIRED = "This machine's authorization holds the Confidential right, so the phase's items WayAI answers it may include confidential ones, and its answer does not mark which they are (a server before the marking sends none): a document at an open path could carry them. Run skeleton with --confidential, which writes the documents under conf/.";
43287
+ SKELETON_CONFIDENTIAL_NOTICE = "Confidential items are left out of these documents unless you pass --confidential.";
43280
43288
  }
43281
43289
  });
43282
43290
 
@@ -44575,8 +44583,8 @@ skeleton Write the starting document of each of a phase's outputs into the
44575
44583
  {{fill: \u2026}}. It never overwrites: an output whose document is
44576
44584
  already here is skipped. A template that differs from the
44577
44585
  published manifest refuses the run. --output names one output.
44578
- An authorization holding the Confidential right needs
44579
- --confidential, which writes the documents under conf/ with the
44586
+ Without --confidential, confidential items are left out of the
44587
+ documents. --confidential writes them whole under conf/, with the
44580
44588
  confidential templates a \`pull --mirror-only --confidential\`
44581
44589
  delivered.
44582
44590
  note Add a note (an observation unless --kind says otherwise). A