trackly-cli 0.17.0 → 0.17.1
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/bin/trackly +2 -2
- package/contracts/trackly-apply-contract-history.json +9 -0
- package/contracts/trackly-apply-tools.json +16 -3
- package/lib/agent.js +1 -1
- package/lib/formatters.js +106 -2
- package/mcp/apply-tools.js +94 -22
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/server.json +2 -2
- package/skills/trackly-apply/SKILL.md +6 -4
- package/skills/trackly-apply/references/answer-resolution.md +25 -0
- package/skills/trackly-apply/references/browser-upload.md +26 -8
- package/skills/trackly-apply/references/form-integrity.md +22 -0
- package/skills/trackly-apply/references/operational-checkpoints.md +141 -10
- package/skills/trackly-apply/references/review-handoff.md +21 -0
- package/skills/trackly-apply/scripts/validate-phase-checkpoint.js +670 -23
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
Run this gate after each semantic selection and again across the entire form before review.
|
|
4
4
|
|
|
5
|
+
## Whole-form accounting
|
|
6
|
+
|
|
7
|
+
Create one accounting row for every visible control across every reachable
|
|
8
|
+
step, including optional, repeated, conditional, consent, and attachment
|
|
9
|
+
controls. Each row has one semantic fingerprint and exactly one disposition:
|
|
10
|
+
`filled_exact_profile`, `filled_safe_derivation`, `filled_supported_draft`,
|
|
11
|
+
`preserved_user_edit`, `missing_fact`, `live_consent`,
|
|
12
|
+
`authentication_blocker`, `unobservable_commit`, `unsupported_control`, or
|
|
13
|
+
`not_applicable`. The inventory count must equal committed plus typed
|
|
14
|
+
exceptions, and known omissions must be zero. Reinventory after navigation,
|
|
15
|
+
conditional reveal, resume parsing, validation, and rerender; an earlier
|
|
16
|
+
inventory cannot prove a later form complete.
|
|
17
|
+
|
|
18
|
+
Reconcile education and employment separately against all canonical eligible
|
|
19
|
+
records. Education entries and position-level employment records must be
|
|
20
|
+
accounted for in reverse chronological order. Multiple promotions at one
|
|
21
|
+
employer remain separate positions. Preserve user-owned rows, use only the date
|
|
22
|
+
precision actually stored, and ask when a form requires missing precision;
|
|
23
|
+
never accept a default month or invent promotion, start, or end precision. A
|
|
24
|
+
flattened employer summary or a “most recent roles” subset fails reconciliation.
|
|
25
|
+
Keep only value-free counts and fingerprints in the checkpoint.
|
|
26
|
+
|
|
5
27
|
## Local field ownership
|
|
6
28
|
|
|
7
29
|
Maintain a private local field ledger keyed by execution, run, inspection
|
|
@@ -63,9 +63,13 @@ node "<skill-dir>/scripts/validate-phase-checkpoint.js" <phase>
|
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
Pass `{"receipt": {...}, "expectedContext": {...}}` on standard input. The
|
|
66
|
-
envelope permits only
|
|
67
|
-
phase
|
|
68
|
-
|
|
66
|
+
envelope permits those fields plus `priorFill` only for Review. `expectedContext` is required for every
|
|
67
|
+
phase. Build Trackly lineage, profile, lifecycle, and approval fields only from
|
|
68
|
+
the current authoritative work receipt. Build browser-surface fields such as
|
|
69
|
+
`formInventoryFingerprint`, `resumeControl`, and browser handoff evidence only
|
|
70
|
+
from the independently captured, value-free current browser baseline; never
|
|
71
|
+
present those fields as backend-returned facts. For selection, include
|
|
72
|
+
`workMode`, the authoritative `latestExplicitTarget`,
|
|
69
73
|
`batchId`, `queueExhausted`, and `selectableJobIds`: the access-proven job IDs
|
|
70
74
|
for an accessible execution or exact frozen member job IDs for a fixed
|
|
71
75
|
inspection. Include `executionId` only for an accessible execution. For access,
|
|
@@ -74,7 +78,9 @@ exact current `waveJobIds`, including typed blockers. For later phases, include
|
|
|
74
78
|
the exact `approvedJobIds` from the validated selection or authoritative
|
|
75
79
|
recovered approval receipt. A nonzero exit means the
|
|
76
80
|
phase is not complete. The script accepts `selection`, `access`, `fill`,
|
|
77
|
-
`review`, and `reconciliation`.
|
|
81
|
+
`review`, `handoff`, and `reconciliation`. `handoff` is a reporting receipt,
|
|
82
|
+
not authority to claim review readiness; it exists so visibility-unverified
|
|
83
|
+
work can be represented without pretending that it is visible.
|
|
78
84
|
|
|
79
85
|
### Selection
|
|
80
86
|
|
|
@@ -129,12 +135,52 @@ Required fields:
|
|
|
129
135
|
`expectedContext.approvedJobIds`;
|
|
130
136
|
- positive safe-integer `executionId` for `accessible_execution`, matching
|
|
131
137
|
`expectedContext`; omit it from both objects for `fixed_inspection`;
|
|
132
|
-
-
|
|
133
|
-
|
|
138
|
+
- bind the receipt to the independently captured form/profile baseline: the
|
|
139
|
+
same `profileRevision` must appear in both the receipt and `expectedContext`;
|
|
140
|
+
it is a non-negative safe integer for
|
|
141
|
+
`fixed_inspection` (so revision `0` is valid) and a positive safe integer for
|
|
142
|
+
`accessible_execution`; canonical education and employment-position counts
|
|
143
|
+
are non-negative safe integers; also include the exact value-free
|
|
144
|
+
`formInventoryFingerprint` and `resumeControl` (`required`, `optional`, or
|
|
145
|
+
`absent`);
|
|
146
|
+
- `visibleControlCount` is a safe integer of at least 1;
|
|
147
|
+
`committedControlCount` and `typedExceptionCount` are non-negative safe
|
|
148
|
+
integers, and committed plus exceptions equals visible;
|
|
149
|
+
- `controlAccounting`: one count for each allowed disposition
|
|
150
|
+
(`filledExactProfile`, `filledSafeDerivation`, `filledSupportedDraft`,
|
|
151
|
+
`preservedUserEdit`, `missingFact`, `liveConsent`,
|
|
152
|
+
`authenticationBlocker`, `unobservableCommit`, `unsupportedControl`, and
|
|
153
|
+
`notApplicable`). These counts must independently reconcile to the three
|
|
154
|
+
aggregate counts above;
|
|
155
|
+
- `formInventoryFingerprint`: a lowercase SHA-256 over only the ordered,
|
|
156
|
+
value-free semantic control fingerprints and their dispositions. Never hash
|
|
157
|
+
labels, values, page text, URLs, or local paths into it;
|
|
134
158
|
- `knownOmissionCount: 0`;
|
|
135
159
|
- `knownFieldsFilledBeforeQuestions: true`;
|
|
160
|
+
- `answerLookupCompleted: true`, plus typed counts in
|
|
161
|
+
`answerLookupScopeCounts` for `run`, `question`, `office`, `jurisdiction`,
|
|
162
|
+
`company`, `provider`, and `global`, and a value-free
|
|
163
|
+
`answerLookupFingerprint`. Query every applicable scope before asking;
|
|
136
164
|
- `parserSensitiveFieldsRechecked: true`;
|
|
137
165
|
- `educationAndEmploymentVerified: true`;
|
|
166
|
+
- `historyReconciliation`: canonical and accounted education-record counts,
|
|
167
|
+
using `canonicalEducationRecordCount` and
|
|
168
|
+
`accountedEducationRecordCount`; canonical and accounted employment-position
|
|
169
|
+
counts using `canonicalEmploymentPositionCount` and
|
|
170
|
+
`accountedEmploymentPositionCount`; reverse-chronological order proofs,
|
|
171
|
+
`datePrecisionInvented: false`, and value-free reconciliation fingerprints.
|
|
172
|
+
Positions, including promotions at one employer, are records; an employer
|
|
173
|
+
summary is not a position-level reconciliation;
|
|
174
|
+
- `resumeAudit`: `control` is `required`, `optional`, or `absent`, and `mode` is
|
|
175
|
+
`automated_verified`, `manual_unbound`, or `not_applicable`. An absent control
|
|
176
|
+
requires `mode: not_applicable` and `not_applicable` for every stage. A
|
|
177
|
+
required or optional automated upload requires `mode: automated_verified`
|
|
178
|
+
and `passed` for every stage. Use `mode: manual_unbound` only when the user
|
|
179
|
+
genuinely performs a browser-local upload that remains unbound; require
|
|
180
|
+
`approval: passed`, `preAttachVerification: not_applicable`,
|
|
181
|
+
`attachmentCommit: user_confirmed`, and `passed` for
|
|
182
|
+
`filenameVerification`, `parserRecheck`, and `finalSweep`. Never use the
|
|
183
|
+
manual mode for an agent-performed upload or a failed verifier;
|
|
138
184
|
- `writingPresent`: boolean;
|
|
139
185
|
- `localWritingGate`: `passed` when writing is present, otherwise
|
|
140
186
|
`not_applicable`;
|
|
@@ -156,10 +202,93 @@ Required fields:
|
|
|
156
202
|
`jobId`, `runId`, and non-negative `inspectionEpoch`, plus `executionId` only
|
|
157
203
|
for `accessible_execution`; every value must match the current
|
|
158
204
|
`expectedContext`, and `jobId` must remain in its approved set;
|
|
205
|
+
- the same positive `profileRevision` for `accessible_execution`, or non-negative
|
|
206
|
+
`profileRevision` for `fixed_inspection`, and lowercase SHA-256
|
|
207
|
+
`formInventoryFingerprint` from the final validated Fill receipt; both must
|
|
208
|
+
match the current `expectedContext`, so a profile change or form rerender
|
|
209
|
+
requires Fill to be validated again before review;
|
|
210
|
+
- a `priorFill` object containing only the complete value-free Fill `receipt`
|
|
211
|
+
and its `expectedContext`; Review reruns Fill validation and derives its
|
|
212
|
+
lineage, profile revision, and form inventory baseline from that receipt, so
|
|
213
|
+
matching caller-authored Review values alone cannot satisfy the gate. This
|
|
214
|
+
final Fill receipt must report zero `missingFact`, `liveConsent`,
|
|
215
|
+
`authenticationBlocker`, `unobservableCommit`, and `unsupportedControl`
|
|
216
|
+
dispositions; `notApplicable` controls may remain accounted. Resolve true
|
|
217
|
+
gaps and live decisions in the browser before producing this final receipt;
|
|
159
218
|
- `finalIntegrityPassed`, `truthConfirmationRecorded`,
|
|
160
|
-
`reviewTabPreserved`, and `userVisibleHandoffProven` all true
|
|
219
|
+
`reviewTabPreserved`, and `userVisibleHandoffProven` all true. Bind the
|
|
220
|
+
receipt and authoritative `expectedContext` to the exact visible tab with
|
|
221
|
+
lowercase SHA-256 `browserBindingHash` and `handoffEvidenceFingerprint`, plus
|
|
222
|
+
`handoffEvidenceType` set to `visible_presentation_receipt` or
|
|
223
|
+
`user_visible_handoff_receipt`. Durable or inventory-only evidence is not
|
|
224
|
+
sufficient for the manual-submit Review gate. A bare truth
|
|
225
|
+
boolean is insufficient: bind `truthCertificationAttestationId`,
|
|
226
|
+
`truthCertificationDependencyHash`, `truthCertificationExpiresAt`, and
|
|
227
|
+
`truthCertificationRunSetHash`, and `truthCertificationStatus` (`recorded` or
|
|
228
|
+
`replayed`) in both the receipt and
|
|
229
|
+
authoritative `expectedContext` to the value-free backend certification
|
|
230
|
+
result. The certification expiry must still be later than local validation
|
|
231
|
+
time. Preserve the accepted value-free `truthCertificationMemberRuns`,
|
|
232
|
+
bind that exact member-run list into `expectedContext`, recompute the backend's
|
|
233
|
+
canonical run-set hash, and prove the current member, run, checkpoint version,
|
|
234
|
+
and inspection epoch occur exactly once in that certified subset. A receipt
|
|
235
|
+
must never replace or extend the authoritative certified member-run list; and
|
|
236
|
+
- bind `checkpointAction: review/manual_submit` and
|
|
237
|
+
`continuationAllowed: false` in both the receipt and `expectedContext` to the
|
|
238
|
+
exact backend-accepted action result; a
|
|
239
|
+
non-negative `resolvedActionCount`, and a value-free
|
|
240
|
+
`resolvedActionIdsFingerprint`. Both fields must match the authoritative
|
|
241
|
+
`expectedContext`; do not include raw action IDs;
|
|
242
|
+
- bind the receipt and `expectedContext` to the exact backend result:
|
|
243
|
+
`checkpointStatus` (`recorded` or `replayed`), positive
|
|
244
|
+
`checkpointMemberVersion`, non-negative `checkpointInspectionEpoch`,
|
|
245
|
+
`checkpointLifecycle: review_ready`, `checkpointActionCount: 1`, and
|
|
246
|
+
`checkpointActionIdsFingerprint`. Newly recorded checkpoint actions and
|
|
247
|
+
previously open actions resolved by the review are separate sets, so each
|
|
248
|
+
summary binds independently to `expectedContext` rather than being forced to
|
|
249
|
+
equal the other. The single checkpoint action must be
|
|
250
|
+
`checkpointAction: review/manual_submit`. `checkpointInspectionEpoch` must equal the receipt's current
|
|
251
|
+
`inspectionEpoch`. A rejected or malformed checkpoint
|
|
252
|
+
fails closed: refetch the current contract once, correct the payload only when
|
|
253
|
+
the current schema proves how, and never claim durable review readiness until
|
|
254
|
+
the backend accepts it; and
|
|
161
255
|
- `submitActivated: false`.
|
|
162
256
|
|
|
257
|
+
### Handoff state report
|
|
258
|
+
|
|
259
|
+
Use this receipt whenever reporting or transferring work, including when the
|
|
260
|
+
review tab cannot be proven visible. Report `employerApplicationState`,
|
|
261
|
+
`tracklyMemberState`, `tracklyJobState`, and `browserTabState` independently.
|
|
262
|
+
Set `handoffVisibility` to `verified` only for a visibly proven or exact
|
|
263
|
+
durably handed-off tab. Otherwise use `unverified` and
|
|
264
|
+
`reviewReadyClaimed: false`. When readiness is false, omit all checkpoint
|
|
265
|
+
authority fields. A state in one system never implies a state in
|
|
266
|
+
another, and a valid unverified handoff receipt never authorizes telling the
|
|
267
|
+
user to submit. `browserTabState: durable_handoff_proven` is invalid with
|
|
268
|
+
unverified visibility and requires a `durable_handoff_receipt`. A true
|
|
269
|
+
`reviewReadyClaimed` requires `checkpointStatus`,
|
|
270
|
+
`checkpointMemberVersion`, `checkpointInspectionEpoch`, and
|
|
271
|
+
`checkpointLifecycle`, plus `checkpointAction: review/manual_submit` and
|
|
272
|
+
`checkpointActionCount: 1`; the checkpoint epoch must equal the receipt's current
|
|
273
|
+
`inspectionEpoch`. The reported `employerApplicationState`,
|
|
274
|
+
`tracklyMemberState`, and `tracklyJobState` must match the current authoritative
|
|
275
|
+
`expectedContext` for every handoff, even when readiness is not claimed. The
|
|
276
|
+
checkpoint fields must also match when readiness is claimed. A true handoff is
|
|
277
|
+
valid only in the `awaiting_manual_submit` member state produced after the
|
|
278
|
+
certified review-ready outcome is recorded; the earlier durable `review_ready`
|
|
279
|
+
checkpoint state is not yet a user handoff. The current job state must still
|
|
280
|
+
be `check_later`; a revoked,
|
|
281
|
+
already-applied, or unknown job cannot be handed off as review-ready. A verified
|
|
282
|
+
handoff must bind the receipt and `expectedContext` to
|
|
283
|
+
the exact `browserBindingHash`, a value-free `handoffEvidenceFingerprint`, and
|
|
284
|
+
`handoffEvidenceType`. A visible tab requires either
|
|
285
|
+
`visible_presentation_receipt` from the adapter's exact-tab focus/reveal action
|
|
286
|
+
and verified visible state, or `user_visible_handoff_receipt` from an exact
|
|
287
|
+
current tab-bound user-visible handoff. Inventory membership alone is never
|
|
288
|
+
visibility proof. A durably handed-off tab requires
|
|
289
|
+
`durable_handoff_receipt`. Omit those evidence fields when visibility is
|
|
290
|
+
unverified.
|
|
291
|
+
|
|
163
292
|
### Reconciliation
|
|
164
293
|
|
|
165
294
|
Required fields:
|
|
@@ -167,9 +296,11 @@ Required fields:
|
|
|
167
296
|
- the same mode-specific current work lineage and approved-job binding required
|
|
168
297
|
by Review. Reconciliation stays bound to the submitted run even though it is
|
|
169
298
|
a post-submission phase;
|
|
170
|
-
- `
|
|
171
|
-
|
|
172
|
-
|
|
299
|
+
- bind the receipt and `expectedContext` to the freshly refetched backend
|
|
300
|
+
result: `positiveSubmissionEvidenceRecorded: true`,
|
|
301
|
+
`memberLifecycle: submitted`, and `tracklyJobStatus: applied_confirmed`.
|
|
302
|
+
Self-authored terminal values are not authority; if the backend still reports
|
|
303
|
+
any nonterminal state, reconciliation and cleanup fail closed;
|
|
173
304
|
- `cleanupPreference`: `never`, `submitted_only`, or
|
|
174
305
|
`submitted_and_probe_blockers`;
|
|
175
306
|
- `browserTabStatus`: `open`, `missing`, `closure_unverified`, or
|
|
@@ -20,6 +20,27 @@ Use the compact execution snapshot as authority. Give a bounded next-update esti
|
|
|
20
20
|
Every handoff names the browser surface and authoritative funnel. Use the
|
|
21
21
|
matching template; do not improvise internal routing language.
|
|
22
22
|
|
|
23
|
+
Every operator update also reports three independent state lines:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
Employer application state: not opened / access probed / form reached / partially filled / needs answers / review state prepared / manually submitted / ATS success observed / blocked
|
|
27
|
+
Trackly state: execution + batch + member lifecycle + job state + inspection epoch + profile revision + resume/truth/submission receipts
|
|
28
|
+
Browser state: no known tab / controller-owned / user inventory / visible / durable handoff proven / missing / closure unverified / closed verified
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
No state in one system implies a state in another. In particular, a Trackly
|
|
32
|
+
`review_ready` member does not prove the employer draft is visible, and a
|
|
33
|
+
visible form does not prove a durable checkpoint. When visibility is
|
|
34
|
+
unverified, say so, preserve the exact binding, and do not claim a review-ready
|
|
35
|
+
handoff or tell the user to submit.
|
|
36
|
+
|
|
37
|
+
A verified handoff receipt must carry the exact browser-binding hash, a
|
|
38
|
+
value-free evidence fingerprint, and whether the proof came from the adapter's
|
|
39
|
+
exact-tab presentation action, an exact tab-bound user-visible handoff receipt,
|
|
40
|
+
or a durable handoff receipt. A complete tab inventory proves reachability, not
|
|
41
|
+
visibility. Bind those same fields into the validator's expected context; never
|
|
42
|
+
substitute a self-asserted visibility boolean.
|
|
43
|
+
|
|
23
44
|
### Recovery
|
|
24
45
|
|
|
25
46
|
```text
|