filegrc 0.7.1 → 0.8.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.
- package/README.md +6 -6
- package/model/index.js +21 -4
- package/model/v5.json +10233 -0
- package/package.json +4 -2
- package/src/agent.js +4 -3
- package/src/audit-preparation.js +182 -45
- package/src/audit-transition.js +3 -2
- package/src/batch-review.js +7 -6
- package/src/cli.js +74 -12
- package/src/collection-review.js +4 -3
- package/src/collection-scope.js +4 -3
- package/src/document-activation.js +145 -0
- package/src/evidence-packet.js +199 -78
- package/src/external-reviewer.js +5 -4
- package/src/files.js +141 -32
- package/src/git.js +71 -7
- package/src/index.js +4 -1
- package/src/model-migration.js +218 -7
- package/src/obligations.js +14 -11
- package/src/policy-library.js +2 -1
- package/src/program-lifecycle.js +93 -3
- package/src/program-path.js +13 -8
- package/src/program-readiness.js +235 -71
- package/src/program.js +5 -3
- package/src/reconciliation.js +3 -2
- package/src/server.js +29 -7
- package/src/setup.js +8 -5
- package/src/soc2.js +3 -2
- package/src/validate.js +148 -14
- package/src/web.js +160 -15
- package/src/workflow.js +18 -4
- package/src/workspace.js +5 -0
package/README.md
CHANGED
|
@@ -44,13 +44,13 @@ npx filegrc policy-library
|
|
|
44
44
|
|
|
45
45
|
The command shows an exact diff only when the current text still matches the prior starter default. It skips customized, approved, active, superseded, and retired Policy content. Accept one named proposal revision only with the command printed by the review, which includes `--accept`, `--proposal-revision`, and `--yes`. Acceptance fails if the proposal changed after review. It changes only the listed defaults and does not approve a Policy, activate it, or mark a Control implemented.
|
|
46
46
|
|
|
47
|
-
The normal runtime uses data model
|
|
47
|
+
The normal runtime uses data model v5. Start a model v4 upgrade with a read-only preview:
|
|
48
48
|
|
|
49
49
|
```sh
|
|
50
|
-
npx filegrc migrate --to-model
|
|
50
|
+
npx filegrc migrate --to-model 5 --preview --json
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
Review every automatic, review-required, and unsupported item.
|
|
53
|
+
Review every automatic, review-required, and unsupported item. Model v4 combined Document approval and activation, so the migration preserves approval facts, assigns program or engagement scope, and moves active Documents that still need a distinct cutover to approved without inventing an activation actor, date, or revision. It preserves historical management Documents from issued or completed Audits with a visible legacy basis. Resolve unsupported items before applying the same migration with `--yes`. The [model v5 upgrade guide](https://github.com/Alignbase/filegrc/blob/main/docs/upgrading-to-model-v5.md) documents the migration and required Step 3 review.
|
|
54
54
|
|
|
55
55
|
A model v2 workspace must migrate to v3 first:
|
|
56
56
|
|
|
@@ -58,7 +58,7 @@ A model v2 workspace must migrate to v3 first:
|
|
|
58
58
|
npx filegrc migrate --to-model 3 --preview --json
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
The migration writes one atomic batch, validates model v3, changes no Git history, and is safe to rerun. The [model v3 upgrade guide](https://github.com/Alignbase/filegrc/blob/main/docs/upgrading-to-model-v3.md) explains every migration class and the review that follows. Apply it before previewing model v4.
|
|
61
|
+
The migration writes one atomic batch, validates model v3, changes no Git history, and is safe to rerun. The [model v3 upgrade guide](https://github.com/Alignbase/filegrc/blob/main/docs/upgrading-to-model-v3.md) explains every migration class and the review that follows. Apply it before previewing model v4, then model v5.
|
|
62
62
|
|
|
63
63
|
A model v1 workspace must migrate to v2 first:
|
|
64
64
|
|
|
@@ -66,7 +66,7 @@ A model v1 workspace must migrate to v2 first:
|
|
|
66
66
|
npx filegrc migrate --to-model 2 --preview --json
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
Follow the [model v2 upgrade guide](https://github.com/Alignbase/filegrc/blob/main/docs/upgrading-to-model-v2.md), then run the model v3 and
|
|
69
|
+
Follow the [model v2 upgrade guide](https://github.com/Alignbase/filegrc/blob/main/docs/upgrading-to-model-v2.md), then run the model v3, v4, and v5 previews in order.
|
|
70
70
|
|
|
71
71
|
`filegrc serve --help` prints bind, port, environment, and safety options without starting the server. The editable server prefers `127.0.0.1:8787` and chooses another available port when that port is occupied. Set `FILEGRC_HOST`, `FILEGRC_PORT`, or the matching flags when needed. In trunk mode, browser saves synchronize, commit, and push from the authoritative branch. Use `--allow-non-authoritative-writes` for local development in a task checkout; the override never commits or pushes.
|
|
72
72
|
|
|
@@ -76,7 +76,7 @@ Follow the [model v2 upgrade guide](https://github.com/Alignbase/filegrc/blob/ma
|
|
|
76
76
|
|
|
77
77
|
`filegrc program-readiness` reports whether management can start a candidate Type 2 period. Add `--summary --json` for compact stage counts and next actions, or omit `--summary` for every readiness item. Use `--require-ready` in automation. Pass `--program PROGRAM_ID` when more than one active Program exists. The command does not require an Audit ID or CPA firm.
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
Step 2 completes and independently approves the intended values and exact revisions of required program plans and schedules. Step 3 implements their linked requirements and uses `filegrc activate-documents --scaffold` to record the active Person, separate activation date, and revision. Control implementation also checks expected evidence, authoritative source Components, and source readiness. During Step 4, create Evidence only when operation produces a real record or artifact. Keep engagement-scoped terms, management assertions, representation letters, and other audit-specific Documents in Step 5. Link each one to one Audit and use `filegrc activate-documents --audit AUDIT_ID --scaffold` after approval. Model v5 evidence packets export both lifecycle events and their exact revisions in `document-lifecycle-index.csv`.
|
|
80
80
|
|
|
81
81
|
`filegrc obligations` shows recurring work and a task-level preview for each Policy Event, including owners, deadlines, and requested proof. `filegrc trigger` adds the event and all of its Action Items to the Work Queue atomically, then prints the created task IDs and deadlines.
|
|
82
82
|
|
package/model/index.js
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
2
|
|
|
3
|
-
export const ACTIVE_MODEL_VERSION = "
|
|
4
|
-
export const SUPPORTED_MODEL_VERSIONS = Object.freeze(["2", "3", ACTIVE_MODEL_VERSION]);
|
|
3
|
+
export const ACTIVE_MODEL_VERSION = "5";
|
|
4
|
+
export const SUPPORTED_MODEL_VERSIONS = Object.freeze(["2", "3", "4", ACTIVE_MODEL_VERSION]);
|
|
5
|
+
export const MODEL_CAPABILITY_VERSIONS = Object.freeze({
|
|
6
|
+
"guided-workflow": 3,
|
|
7
|
+
"program-scope": 4,
|
|
8
|
+
"component-sources": 4,
|
|
9
|
+
"evidence-artifacts": 4,
|
|
10
|
+
"governed-document-activation": 5,
|
|
11
|
+
"document-workflow-scope": 5
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export function modelSupports(modelOrVersion, capability) {
|
|
15
|
+
const introduced = MODEL_CAPABILITY_VERSIONS[capability];
|
|
16
|
+
if (!introduced) throw new Error(`Unknown model capability "${capability}".`);
|
|
17
|
+
const version = typeof modelOrVersion === "object"
|
|
18
|
+
? modelOrVersion?.modelVersion
|
|
19
|
+
: modelOrVersion;
|
|
20
|
+
return Number(version || 0) >= introduced;
|
|
21
|
+
}
|
|
5
22
|
|
|
6
23
|
export function loadModel(version = ACTIVE_MODEL_VERSION) {
|
|
7
24
|
const requested = String(version);
|
|
8
25
|
if (!SUPPORTED_MODEL_VERSIONS.includes(requested)) {
|
|
9
|
-
const migrationTarget = requested === "1" ? "2" : requested === "2" ? "3" : "4";
|
|
26
|
+
const migrationTarget = requested === "1" ? "2" : requested === "2" ? "3" : requested === "3" ? "4" : "5";
|
|
10
27
|
throw new Error(
|
|
11
|
-
`Unsupported data model version "${requested}". This filegrc release supports models v2, v3, and
|
|
28
|
+
`Unsupported data model version "${requested}". This filegrc release supports models v2, v3, v4, and v5. `
|
|
12
29
|
+ `Run \`npx filegrc migrate --to-model ${migrationTarget} --preview --json\` from the workspace root.`
|
|
13
30
|
);
|
|
14
31
|
}
|