@gaunt-sloth/core 2.0.0-beta.1 → 2.0.0-beta.3

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 (117) hide show
  1. package/LICENSE +6 -6
  2. package/dist/config/loader.d.ts +13 -0
  3. package/dist/config/loader.js +55 -11
  4. package/dist/config/loader.js.map +1 -1
  5. package/dist/config/schema.d.ts +10 -0
  6. package/dist/config/schema.js +46 -24
  7. package/dist/config/schema.js.map +1 -1
  8. package/dist/config/shell-policy.d.ts +144 -3
  9. package/dist/config/shell-policy.js +117 -10
  10. package/dist/config/shell-policy.js.map +1 -1
  11. package/dist/config/tool-descriptions.d.ts +5 -5
  12. package/dist/config/tool-descriptions.js +3 -3
  13. package/dist/config/types.d.ts +19 -0
  14. package/dist/config/types.js.map +1 -1
  15. package/dist/constants.d.ts +10 -0
  16. package/dist/constants.js +10 -0
  17. package/dist/constants.js.map +1 -1
  18. package/dist/core/GthAbstractAgent.d.ts +32 -1
  19. package/dist/core/GthAbstractAgent.js +222 -7
  20. package/dist/core/GthAbstractAgent.js.map +1 -1
  21. package/dist/core/GthAgentRunner.d.ts +323 -27
  22. package/dist/core/GthAgentRunner.js +1092 -112
  23. package/dist/core/GthAgentRunner.js.map +1 -1
  24. package/dist/core/GthLangChainAgent.js +1 -1
  25. package/dist/core/GthLangChainAgent.js.map +1 -1
  26. package/dist/core/approvals/approvalRequest.d.ts +247 -0
  27. package/dist/core/approvals/approvalRequest.js +315 -0
  28. package/dist/core/approvals/approvalRequest.js.map +1 -0
  29. package/dist/core/approvals/grants.d.ts +165 -9
  30. package/dist/core/approvals/grants.js +702 -57
  31. package/dist/core/approvals/grants.js.map +1 -1
  32. package/dist/core/plainToolIndication.d.ts +11 -1
  33. package/dist/core/plainToolIndication.js +25 -10
  34. package/dist/core/plainToolIndication.js.map +1 -1
  35. package/dist/core/reasoningBlocks.d.ts +4 -6
  36. package/dist/core/reasoningBlocks.js +4 -6
  37. package/dist/core/reasoningBlocks.js.map +1 -1
  38. package/dist/core/shell/ShellCommandFailedError.d.ts +4 -4
  39. package/dist/core/shell/ShellCommandFailedError.js +4 -4
  40. package/dist/core/shell/abstention.d.ts +1 -1
  41. package/dist/core/shell/abstention.js +65 -11
  42. package/dist/core/shell/abstention.js.map +1 -1
  43. package/dist/core/shell/alignment.d.ts +491 -0
  44. package/dist/core/shell/alignment.js +687 -0
  45. package/dist/core/shell/alignment.js.map +1 -0
  46. package/dist/core/shell/approvalCapture.d.ts +53 -41
  47. package/dist/core/shell/approvalCapture.js +0 -42
  48. package/dist/core/shell/approvalCapture.js.map +1 -1
  49. package/dist/core/shell/approvalStop.d.ts +121 -3
  50. package/dist/core/shell/approvalStop.js +153 -90
  51. package/dist/core/shell/approvalStop.js.map +1 -1
  52. package/dist/core/shell/hardline.d.ts +26 -4
  53. package/dist/core/shell/hardline.js +321 -16
  54. package/dist/core/shell/hardline.js.map +1 -1
  55. package/dist/core/shell/negotiation.d.ts +352 -63
  56. package/dist/core/shell/negotiation.js +295 -123
  57. package/dist/core/shell/negotiation.js.map +1 -1
  58. package/dist/core/shell/openWorld.d.ts +136 -0
  59. package/dist/core/shell/openWorld.js +573 -35
  60. package/dist/core/shell/openWorld.js.map +1 -1
  61. package/dist/core/shell/provenance.d.ts +91 -0
  62. package/dist/core/shell/provenance.js +136 -0
  63. package/dist/core/shell/provenance.js.map +1 -0
  64. package/dist/core/shell/rater.d.ts +394 -163
  65. package/dist/core/shell/rater.js +536 -238
  66. package/dist/core/shell/rater.js.map +1 -1
  67. package/dist/core/shell/raterHealth.d.ts +101 -0
  68. package/dist/core/shell/raterHealth.js +121 -0
  69. package/dist/core/shell/raterHealth.js.map +1 -0
  70. package/dist/core/shell/raterModel.d.ts +17 -8
  71. package/dist/core/shell/raterModel.js +11 -8
  72. package/dist/core/shell/raterModel.js.map +1 -1
  73. package/dist/core/shell/rejection.d.ts +20 -5
  74. package/dist/core/shell/rejection.js +18 -4
  75. package/dist/core/shell/rejection.js.map +1 -1
  76. package/dist/core/toolDisplay.d.ts +91 -2
  77. package/dist/core/toolDisplay.js +168 -19
  78. package/dist/core/toolDisplay.js.map +1 -1
  79. package/dist/core/types.d.ts +140 -22
  80. package/dist/core/types.js.map +1 -1
  81. package/dist/providers/configurationPassthrough.d.ts +36 -6
  82. package/dist/providers/configurationPassthrough.js +40 -28
  83. package/dist/providers/configurationPassthrough.js.map +1 -1
  84. package/dist/providers/geminiSchemaSanitizer.d.ts +2 -2
  85. package/dist/providers/geminiSchemaSanitizer.js +2 -2
  86. package/dist/providers/geminiThinking.d.ts +10 -5
  87. package/dist/providers/geminiThinking.js +10 -5
  88. package/dist/providers/geminiThinking.js.map +1 -1
  89. package/dist/providers/openrouter.js +36 -6
  90. package/dist/providers/openrouter.js.map +1 -1
  91. package/dist/providers/vertexai.js +21 -0
  92. package/dist/providers/vertexai.js.map +1 -1
  93. package/dist/runtime/askStructured.d.ts +22 -0
  94. package/dist/runtime/askStructured.js +53 -0
  95. package/dist/runtime/askStructured.js.map +1 -1
  96. package/dist/utils/aiignoreUtils.d.ts +6 -0
  97. package/dist/utils/aiignoreUtils.js +69 -1
  98. package/dist/utils/aiignoreUtils.js.map +1 -1
  99. package/dist/utils/binaryOutputUtils.js +103 -21
  100. package/dist/utils/binaryOutputUtils.js.map +1 -1
  101. package/dist/utils/displayWidth.d.ts +10 -5
  102. package/dist/utils/displayWidth.js +148 -54
  103. package/dist/utils/displayWidth.js.map +1 -1
  104. package/dist/utils/fileUtils.d.ts +7 -1
  105. package/dist/utils/fileUtils.js +17 -3
  106. package/dist/utils/fileUtils.js.map +1 -1
  107. package/dist/utils/globalConfigUtils.d.ts +5 -2
  108. package/dist/utils/globalConfigUtils.js +14 -3
  109. package/dist/utils/globalConfigUtils.js.map +1 -1
  110. package/dist/utils/llmUtils.d.ts +1 -1
  111. package/dist/utils/llmUtils.js +1 -1
  112. package/dist/utils/systemPromptNotes.d.ts +3 -3
  113. package/dist/utils/systemPromptNotes.js +3 -3
  114. package/dist/utils/vertexaiUtils.js +160 -3
  115. package/dist/utils/vertexaiUtils.js.map +1 -1
  116. package/package.json +6 -5
  117. package/schema/gsloth-config.schema.json +34 -0
@@ -1,3 +1,4 @@
1
+ import { env } from '#src/utils/systemUtils.js';
1
2
  export function isVertexGoogleLlm(llm) {
2
3
  if (!llm || typeof llm !== 'object') {
3
4
  return false;
@@ -10,14 +11,170 @@ export function isVertexGoogleLlm(llm) {
10
11
  // - OAuth "invalid_grant" with "invalid_rapt" subtype, or any "reauth" wording
11
12
  // (expired ADC credentials / reauth proof token — `gcloud auth ... login` needed)
12
13
  const VERTEX_AUTH_ERROR_PATTERN = /\b401\b|unauthori[sz]ed|invalid_grant|invalid_rapt|reauth/i;
14
+ /**
15
+ * Read the credential in use off the CONSTRUCTED client, mirroring the same precedence its own
16
+ * request path applies: an API key wins, then service-account credentials, then ADC. Determined from
17
+ * the client rather than from config, because the same config shape can produce different
18
+ * credentials depending on the environment — which is the whole reason this hint was wrong before.
19
+ *
20
+ * Never throws: this runs while formatting somebody's error, and losing the original message to a
21
+ * secondary failure would be worse than a less specific hint.
22
+ */
23
+ function vertexAuthMode(llm) {
24
+ try {
25
+ const client = llm?.apiClient;
26
+ if (!client) {
27
+ return 'unknown';
28
+ }
29
+ if (typeof client.hasApiKey === 'function' && client.hasApiKey()) {
30
+ return 'apiKey';
31
+ }
32
+ if (client.credentials !== undefined) {
33
+ return 'serviceAccount';
34
+ }
35
+ if (client.googleAuth !== undefined) {
36
+ return 'adc';
37
+ }
38
+ return 'unknown';
39
+ }
40
+ catch {
41
+ return 'unknown';
42
+ }
43
+ }
44
+ /**
45
+ * The remedy sentences, one per credential. Each is true for every session that reaches it and names
46
+ * only things that session can actually change.
47
+ *
48
+ * The API-key branch covers two setups that are indistinguishable on the constructed client — an
49
+ * `apiKey` in the `llm` block, and a `.gsloth.config.mjs` that builds `ChatGoogle` itself and picks
50
+ * up `GOOGLE_API_KEY` from the environment — so it names both sources rather than asserting one.
51
+ */
52
+ const VERTEX_AUTH_GUIDANCE = {
53
+ apiKey: 'This session is authenticating with an API key (Vertex AI express mode), not with ' +
54
+ 'Application Default Credentials, so `gcloud auth` will not change it. ' +
55
+ 'The key is the `apiKey` in your `llm` block — or, if your `.gsloth.config.mjs` constructs ' +
56
+ '`ChatGoogle` itself and so bypasses the preset, `GOOGLE_API_KEY` from your environment. ' +
57
+ 'A Google AI Studio key is not valid for Vertex AI endpoints: use a Vertex AI express-mode ' +
58
+ 'key, or remove the key to fall back to ADC.',
59
+ serviceAccount: 'This session is authenticating with a Google Cloud service account — from `credentials` in ' +
60
+ 'your `llm` block, or `GOOGLE_CLOUD_CREDENTIALS` in your environment — not with Application ' +
61
+ 'Default Credentials, so `gcloud auth` will not change it. ' +
62
+ 'Check that the service-account key is still valid and that it may use the Vertex AI API in ' +
63
+ 'this project.',
64
+ adc: 'This session authenticates through Application Default Credentials: run `gcloud auth login` ' +
65
+ 'and `gcloud auth application-default login`. ' +
66
+ 'No API key is in use — a `type: vertexai` config ignores any `GOOGLE_API_KEY` in your ' +
67
+ 'environment, so unsetting that will not help here.',
68
+ unknown: 'Vertex AI accepts three credentials and only one is in use per session: Application Default ' +
69
+ 'Credentials (`gcloud auth application-default login`), a service account (`credentials` or ' +
70
+ '`GOOGLE_CLOUD_CREDENTIALS`), or an express-mode API key (`apiKey` in the `llm` block). ' +
71
+ 'Check the one this session is configured for — a Google AI Studio key is not valid for ' +
72
+ 'Vertex AI endpoints.',
73
+ };
74
+ /**
75
+ * The longest value still treated as a filesystem path. 260 is Windows' classic `MAX_PATH`, which is
76
+ * a defensible ceiling for a path and sits an order of magnitude below any credential: the deepest
77
+ * realistic ADC path — a CI runner's temp directory plus
78
+ * `application_default_credentials.json` — is around 120 characters, while a service-account key is
79
+ * ~1700 as JSON and ~2300 base64-encoded. Nothing has to land in the gap for the test to be useful.
80
+ */
81
+ const MAX_CREDENTIAL_PATH_LENGTH = 260;
82
+ /**
83
+ * Whether a value is the credential ITSELF rather than a path to one.
84
+ *
85
+ * Deliberately tested by SIZE first rather than by shape. The shape test alone (`{`) catches a
86
+ * pasted JSON key and misses the base64 form that CI secret stores hand out, and widening it one
87
+ * encoding at a time only ever covers the last spelling somebody thought of — the value is
88
+ * attacker-irrelevant but user-supplied and its formats are open-ended. Length closes the class
89
+ * because every credential is enormous next to every path. The shape test is kept alongside it for
90
+ * the short, hand-trimmed JSON that a size test alone would let through.
91
+ */
92
+ function isCredentialContent(value) {
93
+ return value.length > MAX_CREDENTIAL_PATH_LENGTH || value.trimStart().startsWith('{');
94
+ }
95
+ /**
96
+ * Where an ADC session's credentials are being read from when an environment variable names a file,
97
+ * and the spelling of the variable that named it — `undefined` when no such variable is in play.
98
+ *
99
+ * THIS IS THE ONE ENVIRONMENT READ IN THIS FILE AND IT IS DELIBERATE, so read it against the
100
+ * comment on {@link vertexAuthMode} rather than as a contradiction of it. That function decides
101
+ * WHICH credential is in use and must keep doing so from the constructed client alone. This one
102
+ * decides nothing: the session has already been classified as ADC from the client, and the
103
+ * environment is consulted only to compose the DIAGNOSTIC SENTENCE for it. Read-only, through the
104
+ * `systemUtils` accessor like every other environment read in this package.
105
+ *
106
+ * It is not client-derived because there is nothing client-derived to be had. Measured on
107
+ * google-auth-library 10.9.1: `GoogleAuth.keyFilename` is populated only from constructor options,
108
+ * so on a Vertex client it is `undefined` both with and without the variable set, and stays
109
+ * `undefined` after a resolution attempt. The only artifact a successful resolution leaves behind is
110
+ * `jsonContent` — the parsed key file, which holds the private key and must never be printed.
111
+ *
112
+ * Mirrors `googleauth.js` rather than reinventing it: both spellings, upper case first, and an empty
113
+ * value falls through to the well-known file instead of counting as set.
114
+ */
115
+ function adcCredentialFileFromEnvironment() {
116
+ for (const variable of ['GOOGLE_APPLICATION_CREDENTIALS', 'google_application_credentials']) {
117
+ const path = env[variable];
118
+ if (!path) {
119
+ continue;
120
+ }
121
+ // First non-empty wins, exactly as the library's `||` does — so a value that is credential
122
+ // CONTENT rather than a path ends the search rather than falling through to the other spelling.
123
+ //
124
+ // Pasting the service-account key into the variable instead of writing it to a file is a common
125
+ // CI misconfiguration, and such a session must NOT be described below. There is no file for the
126
+ // message to point at, so naming one would be exactly the kind of claim-that-does-not-hold this
127
+ // hint exists to avoid; and the value is a private key, while this message also reaches the log
128
+ // stream and debug dumps. It falls back to the pinned `adc` sentence, which asserts nothing
129
+ // about where the credentials came from.
130
+ return isCredentialContent(path) ? undefined : { variable, path };
131
+ }
132
+ return undefined;
133
+ }
134
+ /**
135
+ * The remedy for an ADC session whose credentials come from a file named in the environment.
136
+ *
137
+ * The diagnosis is the same as the plain `adc` one and is CORRECT — this really is ADC. What
138
+ * differs is that the plain remedy is inert here: `google-auth-library` resolves this variable
139
+ * before it reads the well-known file, so `gcloud auth application-default login` writes a file
140
+ * this session never opens, reports success, and leaves the failure exactly where it was. Naming
141
+ * the command anyway is the point — the reader has usually just run it.
142
+ */
143
+ function adcFromEnvironmentGuidance(variable, path) {
144
+ return ('This session authenticates through Application Default Credentials, and those credentials ' +
145
+ 'come from `' +
146
+ variable +
147
+ '` in your environment, which points at `' +
148
+ path +
149
+ '`. That variable is resolved BEFORE the well-known credentials file, so ' +
150
+ '`gcloud auth application-default login` writes a file this session never reads and the ' +
151
+ 'failure survives it. Repair or replace the credentials in the file above, or unset ' +
152
+ '`' +
153
+ variable +
154
+ '` so the well-known Application Default Credentials file is used instead. ' +
155
+ 'No API key is in use — a `type: vertexai` config ignores any `GOOGLE_API_KEY` in your ' +
156
+ 'environment, so unsetting that will not help here.');
157
+ }
158
+ /**
159
+ * The sentence for a classified session. Only the ADC branch is refined further, and only into the
160
+ * one sub-case whose remedy would otherwise be inert; every other mode returns its pinned string
161
+ * unchanged.
162
+ */
163
+ function vertexAuthGuidance(mode) {
164
+ if (mode === 'adc') {
165
+ const fromEnvironment = adcCredentialFileFromEnvironment();
166
+ if (fromEnvironment) {
167
+ return adcFromEnvironmentGuidance(fromEnvironment.variable, fromEnvironment.path);
168
+ }
169
+ }
170
+ return VERTEX_AUTH_GUIDANCE[mode];
171
+ }
13
172
  export function enhanceVertexUnauthorizedMessage(originalMessage, llm) {
14
173
  if (!isVertexGoogleLlm(llm) || !VERTEX_AUTH_ERROR_PATTERN.test(originalMessage)) {
15
174
  return originalMessage;
16
175
  }
17
176
  return (`${originalMessage}\n\n` +
18
177
  'Vertex AI authentication failed. ' +
19
- 'If you use ADC, run `gcloud auth login` and `gcloud auth application-default login`. ' +
20
- 'Also make sure `GOOGLE_API_KEY` is unset or not a Google AI Studio key, ' +
21
- 'since AI Studio keys are not valid for Vertex AI endpoints.\n');
178
+ `${vertexAuthGuidance(vertexAuthMode(llm))}\n`);
22
179
  }
23
180
  //# sourceMappingURL=vertexaiUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vertexaiUtils.js","sourceRoot":"","sources":["../../src/utils/vertexaiUtils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,iBAAiB,CAAC,GAAY;IAC5C,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QACpC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,KAAK,GAAG,GAA6B,CAAC;IAC5C,OAAO,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC;AACnC,CAAC;AAED,4DAA4D;AAC5D,gEAAgE;AAChE,gFAAgF;AAChF,qFAAqF;AACrF,MAAM,yBAAyB,GAAG,4DAA4D,CAAC;AAE/F,MAAM,UAAU,gCAAgC,CAAC,eAAuB,EAAE,GAAY;IACpF,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QAChF,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,OAAO,CACL,GAAG,eAAe,MAAM;QACxB,mCAAmC;QACnC,uFAAuF;QACvF,0EAA0E;QAC1E,+DAA+D,CAChE,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"vertexaiUtils.js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rD,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAS,kBAAkB,CAAC,IAAoB;IAC9C,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;QACnB,MAAM,eAAe,GAAG,gCAAgC,EAAE,CAAC;QAC3D,IAAI,eAAe,EAAE,CAAC;YACpB,OAAO,0BAA0B,CAAC,eAAe,CAAC,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;IACD,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,gCAAgC,CAAC,eAAuB,EAAE,GAAY;IACpF,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QAChF,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,OAAO,CACL,GAAG,eAAe,MAAM;QACxB,mCAAmC;QACnC,GAAG,kBAAkB,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,CAC/C,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gaunt-sloth/core",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.3",
4
4
  "description": "Core utilities and types for Gaunt Sloth",
5
5
  "license": "MIT",
6
6
  "author": "Andrew Kondratev",
@@ -30,11 +30,11 @@
30
30
  "#src/*.js": "./dist/*.js"
31
31
  },
32
32
  "dependencies": {
33
- "@langchain/core": "^1.2.5",
34
- "@langchain/langgraph": "^1.4.9",
33
+ "@langchain/core": "^1.2.9",
34
+ "@langchain/langgraph": "^1.4.13",
35
35
  "jiti": "^2.7.0",
36
36
  "jsonc-parser": "^3.3.1",
37
- "langchain": "^1.5.5",
37
+ "langchain": "^1.5.10",
38
38
  "string-width": "^8.2.2",
39
39
  "zod": "^4.4.3"
40
40
  },
@@ -89,6 +89,7 @@
89
89
  "scripts": {
90
90
  "build": "tsc",
91
91
  "schema:generate": "node scripts/generate-config-schema.mjs",
92
- "surface:generate": "node scripts/generate-type-surface.mjs"
92
+ "surface:generate": "node scripts/generate-type-surface.mjs",
93
+ "value-surface:generate": "node scripts/generate-value-surface.mjs"
93
94
  }
94
95
  }
@@ -427,6 +427,9 @@
427
427
  "rater": {
428
428
  "type": "string"
429
429
  },
430
+ "alignmentChecker": {
431
+ "type": "string"
432
+ },
430
433
  "allow": {
431
434
  "type": "array",
432
435
  "items": {
@@ -776,6 +779,9 @@
776
779
  "rater": {
777
780
  "type": "string"
778
781
  },
782
+ "alignmentChecker": {
783
+ "type": "string"
784
+ },
779
785
  "allow": {
780
786
  "type": "array",
781
787
  "items": {
@@ -939,6 +945,11 @@
939
945
  },
940
946
  "errorOnReviewFail": {
941
947
  "type": "boolean"
948
+ },
949
+ "timeoutMs": {
950
+ "type": "integer",
951
+ "minimum": 1,
952
+ "maximum": 9007199254740991
942
953
  }
943
954
  }
944
955
  },
@@ -1097,6 +1108,9 @@
1097
1108
  "rater": {
1098
1109
  "type": "string"
1099
1110
  },
1111
+ "alignmentChecker": {
1112
+ "type": "string"
1113
+ },
1100
1114
  "allow": {
1101
1115
  "type": "array",
1102
1116
  "items": {
@@ -1257,6 +1271,11 @@
1257
1271
  },
1258
1272
  "errorOnReviewFail": {
1259
1273
  "type": "boolean"
1274
+ },
1275
+ "timeoutMs": {
1276
+ "type": "integer",
1277
+ "minimum": 1,
1278
+ "maximum": 9007199254740991
1260
1279
  }
1261
1280
  }
1262
1281
  },
@@ -1409,6 +1428,9 @@
1409
1428
  "rater": {
1410
1429
  "type": "string"
1411
1430
  },
1431
+ "alignmentChecker": {
1432
+ "type": "string"
1433
+ },
1412
1434
  "allow": {
1413
1435
  "type": "array",
1414
1436
  "items": {
@@ -1701,6 +1723,9 @@
1701
1723
  "rater": {
1702
1724
  "type": "string"
1703
1725
  },
1726
+ "alignmentChecker": {
1727
+ "type": "string"
1728
+ },
1704
1729
  "allow": {
1705
1730
  "type": "array",
1706
1731
  "items": {
@@ -1993,6 +2018,9 @@
1993
2018
  "rater": {
1994
2019
  "type": "string"
1995
2020
  },
2021
+ "alignmentChecker": {
2022
+ "type": "string"
2023
+ },
1996
2024
  "allow": {
1997
2025
  "type": "array",
1998
2026
  "items": {
@@ -2285,6 +2313,9 @@
2285
2313
  "rater": {
2286
2314
  "type": "string"
2287
2315
  },
2316
+ "alignmentChecker": {
2317
+ "type": "string"
2318
+ },
2288
2319
  "allow": {
2289
2320
  "type": "array",
2290
2321
  "items": {
@@ -2577,6 +2608,9 @@
2577
2608
  "rater": {
2578
2609
  "type": "string"
2579
2610
  },
2611
+ "alignmentChecker": {
2612
+ "type": "string"
2613
+ },
2580
2614
  "allow": {
2581
2615
  "type": "array",
2582
2616
  "items": {