@gitroll/tacitt-cli 0.6.9 → 0.6.11
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/README.md +43 -4
- package/dist/{agent-setup-CODlN6zl.mjs → agent-setup-DdfF3zch.mjs} +2 -2
- package/dist/agent-setup-worker.mjs +5 -5
- package/dist/cli.mjs +35 -12
- package/dist/codex-title-worker.mjs +1 -1
- package/dist/configured-preview-worker.mjs +5 -5
- package/dist/configured-session-worker.mjs +9 -7
- package/dist/{frame-Dj5Zs6UW.mjs → frame-Bq2zRh-i.mjs} +1 -1
- package/dist/{heap-Dt3-d27v.mjs → heap-CV8Eca8V.mjs} +217 -13
- package/dist/inspection-worker.mjs +4 -4
- package/dist/{job-BQXssW46.mjs → job-BKsifhyv.mjs} +38 -18
- package/dist/{locate-BWkblijS.mjs → locate-Cx52Zqxv.mjs} +204 -20
- package/dist/{model-CSx2dP_P.mjs → model-C1UXkHh9.mjs} +1 -1
- package/dist/operation-executor.mjs +3 -3
- package/dist/preview-worker.mjs +1 -1
- package/dist/privacy-validator.mjs +29 -2
- package/dist/{query-CfhcS4gd.mjs → query-AMZerUh8.mjs} +712 -215
- package/dist/{run-xlOaKCk8.mjs → run-CaPktPhH.mjs} +4 -4
- package/dist/{src-DzKuzGVH.mjs → src-D1iONla3.mjs} +2215 -1613
- package/dist/{src-V9GHLZQs.mjs → src-DlVbGB32.mjs} +74 -37
- package/dist/{src-BgsEnMsy.mjs → src-wZx_v0Ih.mjs} +297 -207
- package/dist/store-database-worker.mjs +1 -1
- package/dist/web/assets/index-CYl7eDUu.js +172 -0
- package/dist/web/assets/index-DzOozqms.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/skills/tacitt/INDEX.md +6 -6
- package/skills/tacitt/SKILL.md +11 -11
- package/skills/tacitt/references/INDEX.md +3 -3
- package/skills/tacitt/references/b-method.md +2 -2
- package/skills/tacitt/references/bootstrap.md +2 -2
- package/skills/tacitt/references/classification.md +15 -5
- package/skills/tacitt/references/commands.md +37 -30
- package/skills/tacitt/references/journey.md +14 -6
- package/skills/tacitt/references/parallel-review.md +27 -33
- package/skills/tacitt/references/send.md +35 -9
- package/skills/tacitt/scripts/INDEX.md +37 -37
- package/skills/tacitt/scripts/answer.mjs +73 -15
- package/skills/tacitt/scripts/journey-classification-metadata.mjs +75 -26
- package/skills/tacitt/scripts/journey-classification-progress.mjs +1 -2
- package/skills/tacitt/scripts/journey-classification-validation.d.mts +13 -0
- package/skills/tacitt/scripts/journey-classification-validation.mjs +38 -0
- package/skills/tacitt/scripts/journey-classification.mjs +6 -1
- package/skills/tacitt/scripts/journey-consolidation.mjs +1 -0
- package/skills/tacitt/scripts/journey-scan-timing.d.mts +1 -0
- package/skills/tacitt/scripts/journey-scan-timing.mjs +19 -4
- package/skills/tacitt/scripts/journey-state.d.mts +15 -1
- package/skills/tacitt/scripts/journey-state.mjs +104 -5
- package/skills/tacitt/scripts/journey-tasks.d.mts +1 -0
- package/skills/tacitt/scripts/journey-tasks.mjs +13 -5
- package/skills/tacitt/scripts/journey.d.mts +46 -28
- package/skills/tacitt/scripts/journey.mjs +57 -8
- package/skills/tacitt/scripts/privacy-validator.mjs +178 -12
- package/skills/tacitt/scripts/review.d.mts +7 -6
- package/skills/tacitt/scripts/review.mjs +576 -147
- package/dist/web/assets/index-9UfCT_2C.js +0 -174
- package/dist/web/assets/index-CYJBq1px.css +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $n as
|
|
2
|
-
import { t as createZstdFrameCheck } from "./frame-
|
|
3
|
-
import {
|
|
1
|
+
import { $n as buildPlan, An as createDetectionSummary, Bn as cleanupImplementationVersion, C as createBAnalysisUnits, Cn as reviewRoles, Dn as bindInspection, En as createSessionPreparation, Gn as nativeField, Hn as nativeParserVersion, In as createReplacementKey, Jn as transformRecords, Kn as nativeItems, Ln as sessionNonce, Mn as walkNativeFields, N as bDuplicateShift, Rn as projectNativeRecord, Sn as mainReviewRole, Tn as renderNative, U as bDigest, Un as redactionImplementationVersion, Vn as entityDictionaryVersion, W as codePointLength, Xn as retainedMainTextNodes, Yn as frameRecords, Zn as validateProfile, ar as detectStatic, bn as processNativeRecord, br as processingSite, c as reviewDigest, cn as reviewFamilies, cr as jsonSpans, er as validatePlan, fn as sourceSnapshotId, gr as ProcessingError, hr as defaultDetectionLimits, in as safeCode, ir as resolveLimits, j as bBindingCap, lr as agentContextLocation, nn as ApplicationError, nr as defaultLimits, qn as nativeText, rr as recordPointerLimits, sn as familySelected, u as textDigest, un as sourceKey, ur as createEntityMatcher, vn as nativeSourceIdentitySchema, vr as fail$1, wn as createSentenceContext, xn as projectNativeReviewInput, xr as siteFields, yn as withMandatoryCustomTerms, yr as isProcessingCode, zn as parseNativeRecord } from "./locate-Cx52Zqxv.mjs";
|
|
2
|
+
import { t as createZstdFrameCheck } from "./frame-Bq2zRh-i.mjs";
|
|
3
|
+
import { Jr as agentSourceSchema, L as sourceIdentityEvidence, Pn as resolveSourceSelection, R as withSourceEvidence, _i as sourceChangePolicy, jt as metadataProcessingVersion, nr as bContainment, or as bWordBounded, ot as classifyAgentSetup, qr as agentSourcePathSegment, rr as bExceptionRanges, st as defaultAgentSetupInclusion, wi as staticCatalogRef, yi as approvedTreatmentSchema, z as agentSetupKey } from "./src-D1iONla3.mjs";
|
|
4
4
|
import { constants } from "node:fs";
|
|
5
5
|
import { link, lstat, mkdir, open, readFile, readdir, realpath, rm, rmdir, stat, unlink } from "node:fs/promises";
|
|
6
6
|
import { execFile, fork, spawn } from "node:child_process";
|
|
@@ -3544,7 +3544,9 @@ function unavailableContribution(kind, id, workspaceId, status, reason) {
|
|
|
3544
3544
|
function reportInspectionFailure(observer, stage, error) {
|
|
3545
3545
|
try {
|
|
3546
3546
|
if (!observer) {
|
|
3547
|
-
|
|
3547
|
+
const named = processingSite(error);
|
|
3548
|
+
const fields = named ? ` site=${named.site}` + (named.harness ? ` harness=${named.harness}` : "") + (named.harnessVersion ? ` version=${named.harnessVersion}` : "") : "";
|
|
3549
|
+
process.stderr.write(`Inspection processing failed: ${safeCode(error)} (${stage})${fields}\n`);
|
|
3548
3550
|
return;
|
|
3549
3551
|
}
|
|
3550
3552
|
observer(stage, error);
|
|
@@ -4004,11 +4006,14 @@ function configuredSelection(selection, treatment) {
|
|
|
4004
4006
|
mode: { kind: "remove" },
|
|
4005
4007
|
replacement: edit.retainAs
|
|
4006
4008
|
};
|
|
4007
|
-
|
|
4009
|
+
if (mode.kind !== "retain") return {
|
|
4010
|
+
...edit,
|
|
4011
|
+
mode
|
|
4012
|
+
};
|
|
4013
|
+
const { replacement: _replacement, replacementSourceRanges: _source, replacementTargetRanges: _target, ...original } = edit;
|
|
4008
4014
|
return {
|
|
4009
4015
|
...original,
|
|
4010
|
-
mode
|
|
4011
|
-
...mode.kind !== "retain" && edit.replacement !== void 0 ? { replacement: edit.replacement } : {}
|
|
4016
|
+
mode
|
|
4012
4017
|
};
|
|
4013
4018
|
}),
|
|
4014
4019
|
diagnostics: selection.diagnostics,
|
|
@@ -9618,7 +9623,14 @@ function isWorkerMessage(value) {
|
|
|
9618
9623
|
if (kind === "spool") return typeof path === "string" && path.length > 0;
|
|
9619
9624
|
if (kind === "result") return isResult(Reflect.get(value, "result"));
|
|
9620
9625
|
if (kind === "worker-error") return code === "ARTIFACT_WORKER_MEMORY" || code === "ARTIFACT_PROCESSING_FAILED";
|
|
9621
|
-
return kind === "error" && typeof code === "string" && code.length > 0 && (sourceId === void 0 || typeof sourceId === "string")
|
|
9626
|
+
return kind === "error" && typeof code === "string" && code.length > 0 && (sourceId === void 0 || typeof sourceId === "string") && [
|
|
9627
|
+
"site",
|
|
9628
|
+
"harness",
|
|
9629
|
+
"harnessVersion"
|
|
9630
|
+
].every((key) => {
|
|
9631
|
+
const field = Reflect.get(value, key);
|
|
9632
|
+
return field === void 0 || typeof field === "string";
|
|
9633
|
+
});
|
|
9622
9634
|
}
|
|
9623
9635
|
/** How long a stopped controller may take to end its Worker and flush its messages (ADR 0219). */
|
|
9624
9636
|
const stopGraceMs = 2e3;
|
|
@@ -9699,13 +9711,18 @@ function createSessionProcess(workerUrl, heapMb, onMessage, onFailure) {
|
|
|
9699
9711
|
}
|
|
9700
9712
|
//#endregion
|
|
9701
9713
|
//#region packages/artifact/src/configured/parallel/pool.ts
|
|
9702
|
-
/** Failure code plus the frozen source id
|
|
9714
|
+
/** Failure code plus the frozen source id and the named refusal site (#59), when known. */
|
|
9703
9715
|
var SessionWorkerError = class extends Error {
|
|
9704
9716
|
sourceId;
|
|
9717
|
+
site;
|
|
9718
|
+
harness;
|
|
9719
|
+
harnessVersion;
|
|
9705
9720
|
constructor(code, sourceId, options) {
|
|
9706
9721
|
super(code, options);
|
|
9707
9722
|
this.name = "SessionWorkerError";
|
|
9708
9723
|
if (sourceId !== void 0) this.sourceId = sourceId;
|
|
9724
|
+
const named = siteFields(options);
|
|
9725
|
+
if (named) Object.assign(this, named);
|
|
9709
9726
|
}
|
|
9710
9727
|
};
|
|
9711
9728
|
/**
|
|
@@ -9912,7 +9929,7 @@ function createSessionWorkerPool(url, size, heapMb = workerHeapMb) {
|
|
|
9912
9929
|
return;
|
|
9913
9930
|
}
|
|
9914
9931
|
settle(slot, void 0, message.result);
|
|
9915
|
-
} else settle(slot, new SessionWorkerError(message.code, message.sourceId));
|
|
9932
|
+
} else settle(slot, new SessionWorkerError(message.code, message.sourceId, siteFields(message)));
|
|
9916
9933
|
} catch {
|
|
9917
9934
|
failPool(/* @__PURE__ */ new Error("ARTIFACT_PROCESSING_FAILED"), slot);
|
|
9918
9935
|
}
|
|
@@ -10169,7 +10186,7 @@ function selectConfiguredApproval(approval, admission, configuration = configure
|
|
|
10169
10186
|
//#region packages/artifact/src/collection/producer/versions.ts
|
|
10170
10187
|
/** Only configured output consumes these dependencies; hash them with actual version facts. */
|
|
10171
10188
|
const configuredProcessingSemantics = Object.freeze({
|
|
10172
|
-
catalog: "
|
|
10189
|
+
catalog: "12",
|
|
10173
10190
|
parser: nativeParserVersion,
|
|
10174
10191
|
dictionary: entityDictionaryVersion,
|
|
10175
10192
|
metadata: metadataProcessingVersion,
|
|
@@ -12855,32 +12872,39 @@ async function writeOriginalWorkspace(production, workspaceId, bundleId, identit
|
|
|
12855
12872
|
}
|
|
12856
12873
|
//#endregion
|
|
12857
12874
|
//#region packages/artifact/src/configured/admission/lifecycle.ts
|
|
12858
|
-
function
|
|
12875
|
+
function parsed(text) {
|
|
12859
12876
|
try {
|
|
12860
|
-
return
|
|
12877
|
+
return JSON.parse(text);
|
|
12861
12878
|
} catch {
|
|
12862
|
-
return
|
|
12879
|
+
return;
|
|
12863
12880
|
}
|
|
12864
12881
|
}
|
|
12865
12882
|
/**
|
|
12866
|
-
* Reads the whole snapshot one bounded record at a time. Returns only when every record is
|
|
12867
|
-
*
|
|
12883
|
+
* Reads the whole snapshot one bounded record at a time. Returns only when every record is a
|
|
12884
|
+
* lifecycle record and either one names an agent run or all match the exact journal schema
|
|
12885
|
+
* (ADR 0279). A launched-only file at the exact journal path is excluded when every record
|
|
12886
|
+
* matches that schema. Empty files, other records and oversized records fail closed.
|
|
12868
12887
|
*/
|
|
12869
12888
|
async function confirmLifecycleSource(part, lifecycle, signal, overrides, open = openConfiguredSource) {
|
|
12870
12889
|
const input = await open(part, signal);
|
|
12871
12890
|
const cleanup = createCleanup();
|
|
12872
12891
|
try {
|
|
12892
|
+
let agentRecords = 0;
|
|
12873
12893
|
let records = 0;
|
|
12894
|
+
let exactOnly = true;
|
|
12874
12895
|
try {
|
|
12875
12896
|
for await (const text of frameRecords(input.chunks, "jsonl", resolveLimits(overrides).maxRecordBytes, signal)) {
|
|
12876
|
-
|
|
12897
|
+
const value = parsed(text);
|
|
12898
|
+
if (!lifecycle.record(value)) fail("ARTIFACT_UNRECOGNIZED_JOURNAL");
|
|
12899
|
+
if (lifecycle.agentRecord(value)) agentRecords++;
|
|
12877
12900
|
records++;
|
|
12901
|
+
if (!lifecycle.exactRecord(value)) exactOnly = false;
|
|
12878
12902
|
}
|
|
12879
12903
|
} catch (error) {
|
|
12880
12904
|
if (error instanceof ProcessingError && (error.code === "PROCESSING_LIMIT" || error.code === "PROCESSING_INVALID_RECORD")) fail("ARTIFACT_UNRECOGNIZED_JOURNAL", { cause: error });
|
|
12881
12905
|
throw error;
|
|
12882
12906
|
}
|
|
12883
|
-
if (records === 0) fail("ARTIFACT_UNRECOGNIZED_JOURNAL");
|
|
12907
|
+
if (records === 0 || agentRecords === 0 && !exactOnly) fail("ARTIFACT_UNRECOGNIZED_JOURNAL");
|
|
12884
12908
|
await input.finish();
|
|
12885
12909
|
} catch (error) {
|
|
12886
12910
|
cleanup.failed(error);
|
|
@@ -16083,7 +16107,7 @@ async function scanPreparedSession(production, sessionId, directory, hooks, canc
|
|
|
16083
16107
|
workspaceId: selected.workspace.id,
|
|
16084
16108
|
sessionId,
|
|
16085
16109
|
...source ? { sourcePartId: source.source.id } : {}
|
|
16086
|
-
}), async () => {
|
|
16110
|
+
}, void 0, error), async () => {
|
|
16087
16111
|
if (result) await unlink(result.input.file.path);
|
|
16088
16112
|
});
|
|
16089
16113
|
throw classified;
|
|
@@ -16807,24 +16831,36 @@ function buildWorkScanBatches(context, sessionId, fields, pieces) {
|
|
|
16807
16831
|
/**
|
|
16808
16832
|
* Roots whose complete frozen main capture names an automation launch. Discovery normally
|
|
16809
16833
|
* keeps these out of classification; this catches a confirmed root it could not recognize.
|
|
16834
|
+
* A root whose capture the check cannot read fails like an admission refusal (issue #59), so
|
|
16835
|
+
* only that root leaves its Work (ADR 0188); an abort still escapes.
|
|
16810
16836
|
*/
|
|
16811
|
-
async function automatedRoots(rows, families, request, signal) {
|
|
16837
|
+
async function automatedRoots(rows, families, request, signal, onFailure) {
|
|
16812
16838
|
const roots = /* @__PURE__ */ new Set();
|
|
16813
16839
|
for (const row of rows) {
|
|
16814
16840
|
if (row.failure || families.owners.get(row.session.id)?.id !== row.session.id) continue;
|
|
16815
16841
|
const adapter = request.processing.adapters[row.session.harness];
|
|
16816
16842
|
for (const source of row.sources) {
|
|
16817
16843
|
if (source.native.role !== "main") continue;
|
|
16818
|
-
const
|
|
16819
|
-
|
|
16844
|
+
const capture = request.captures.get(source.source.path) ?? fail("ARTIFACT_SOURCE_CHANGED");
|
|
16845
|
+
let launch;
|
|
16820
16846
|
try {
|
|
16821
|
-
|
|
16847
|
+
const opened = await openSourceCapture(capture);
|
|
16848
|
+
const cleanup = createCleanup();
|
|
16849
|
+
try {
|
|
16850
|
+
launch = await capturedLaunch(source.source, opened, adapter, signal, request.processing.limits);
|
|
16851
|
+
} catch (error) {
|
|
16852
|
+
cleanup.failed(error);
|
|
16853
|
+
throw error;
|
|
16854
|
+
} finally {
|
|
16855
|
+
await cleanup.run(() => opened.close());
|
|
16856
|
+
}
|
|
16822
16857
|
} catch (error) {
|
|
16823
|
-
|
|
16824
|
-
|
|
16825
|
-
|
|
16826
|
-
|
|
16858
|
+
row.failure = inspectionFailure(error, signal);
|
|
16859
|
+
onFailure(row.session, row.failure, source.source.id, error);
|
|
16860
|
+
reportInspectionFailure(request.processing.onInspectionFailure, "inspection-admission", error);
|
|
16861
|
+
break;
|
|
16827
16862
|
}
|
|
16863
|
+
if (launch === "automation") roots.add(row.session.id);
|
|
16828
16864
|
}
|
|
16829
16865
|
}
|
|
16830
16866
|
return roots;
|
|
@@ -16860,15 +16896,16 @@ async function prepareSessionScans(request, signal) {
|
|
|
16860
16896
|
});
|
|
16861
16897
|
};
|
|
16862
16898
|
const failures = [];
|
|
16899
|
+
const onFailure = (session, reason, sourcePartId, cause) => {
|
|
16900
|
+
failures.push({
|
|
16901
|
+
sessionId: session.id,
|
|
16902
|
+
reason,
|
|
16903
|
+
...sourcePartId === void 0 ? {} : { sourcePartId },
|
|
16904
|
+
...cause === void 0 ? {} : { cause }
|
|
16905
|
+
});
|
|
16906
|
+
};
|
|
16863
16907
|
const rows = await admitInspection(request.inventory, request.processing, signal, {
|
|
16864
|
-
onFailure
|
|
16865
|
-
failures.push({
|
|
16866
|
-
sessionId: session.id,
|
|
16867
|
-
reason,
|
|
16868
|
-
...sourcePartId === void 0 ? {} : { sourcePartId },
|
|
16869
|
-
...cause === void 0 ? {} : { cause }
|
|
16870
|
-
});
|
|
16871
|
-
},
|
|
16908
|
+
onFailure,
|
|
16872
16909
|
async inspectIdentity(part, adapter, currentSignal, limits) {
|
|
16873
16910
|
const opened = await openSourceCapture(request.captures.get(part.path) ?? fail("ARTIFACT_SOURCE_CHANGED"));
|
|
16874
16911
|
const cleanup = createCleanup();
|
|
@@ -16883,7 +16920,7 @@ async function prepareSessionScans(request, signal) {
|
|
|
16883
16920
|
},
|
|
16884
16921
|
onExclusion: exclude
|
|
16885
16922
|
});
|
|
16886
|
-
const automated = await automatedRoots(rows, families, request, signal);
|
|
16923
|
+
const automated = await automatedRoots(rows, families, request, signal, onFailure);
|
|
16887
16924
|
for (const row of rows) {
|
|
16888
16925
|
const root = families.owners.get(row.session.id)?.id;
|
|
16889
16926
|
if (row.failure || root === void 0 || !automated.has(root)) continue;
|
|
@@ -16974,4 +17011,4 @@ async function verifyPreparedSessionSources(prepared, input, signal) {
|
|
|
16974
17011
|
}
|
|
16975
17012
|
}
|
|
16976
17013
|
//#endregion
|
|
16977
|
-
export {
|
|
17014
|
+
export { removeNamedTemporarySpools as $, renderJobDigest as A, parallelismLimits as B, readOriginalSearchFields as C, prepareCollectionProduction as D, checkReusableBundle as E, SessionWorkerError as F, processJourneyMetadataFields as G, privateJourneyDirectory as H, sessionWorkerFailure as I, listAgentSetup as J, staticMaskCategory as K, privateCollectionDirectory as L, readCollectionIndex as M, parseCollectionWorkspaceSummary as N, captureLogicalJourneySources as O, createSharedSessionPool as P, createTemporary as Q, defaultParallelism as R, readPrivateReviewPayload as S, createCollectionArtifacts as T, readLogicalJourneyFinalMasks as U, writeLogicalJourneyOutput as V, readConfiguredOutputInfo as W, createInspectionProcessor as X, createConfiguredPreviewStream as Y, decodeZstd as Z, processJourneyMetadata as _, scanReviewFields as a, restrictToOwner as at, writeLogicalJourneyBase as b, readSessionScanRecords as c, windowsAclCodes as ct, verifyOutputShard as d, createCleanup as et, writeOutputShard as f, readCapturedOriginalRows as g, captureConfiguredSessionJob as h, buildWorkScanBatches as i, openPrivateFile as it, runConfiguredSessionJob as j, capturedJourneyScope as k, scanPreparedSession as l, openConfiguredUpload as m, verifyPreparedSessionSources as n, exclusiveLock as nt, createWorkPieces as o, windowsOwnerOnly as ot, configuredSessionUploads as p, readWorkspacePair as q, prepareSessionScans as r, makePrivateDirectory as rt, readSessionScanFields as s, isWindowsAclFailure as st, preparedScanConfiguration as t, safeError as tt, runConfiguredScanJob as u, readStaticSessionMasks as v, readConfiguredSearchFields as w, writePrivateReviewPayload as x, staticSessionJobs as y, gitSeedsProvider as z };
|