nx 24.0.0-beta.2 → 24.0.0-beta.4
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/bin/post-install.js +5 -3
- package/dist/src/adapter/ngcli-adapter.js +1 -2
- package/dist/src/command-line/add/add.d.ts +2 -0
- package/dist/src/command-line/add/add.js +23 -5
- package/dist/src/command-line/affected/affected.js +2 -2
- package/dist/src/command-line/init/implementation/add-nx-to-nest.js +21 -62
- package/dist/src/command-line/migrate/agentic/definitions.d.ts +1 -3
- package/dist/src/command-line/migrate/agentic/definitions.js +5 -97
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.d.ts +7 -41
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.js +9 -48
- package/dist/src/command-line/migrate/agentic/handoff.d.ts +1 -43
- package/dist/src/command-line/migrate/agentic/handoff.js +3 -119
- package/dist/src/command-line/migrate/agentic/instruction-files.d.ts +0 -21
- package/dist/src/command-line/migrate/agentic/instruction-files.js +6 -27
- package/dist/src/command-line/migrate/agentic/master/run-master-session.d.ts +19 -1
- package/dist/src/command-line/migrate/agentic/master/run-master-session.js +63 -36
- package/dist/src/command-line/migrate/agentic/master/spawn-master.d.ts +1 -0
- package/dist/src/command-line/migrate/agentic/master/spawn-master.js +7 -5
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.d.ts +2 -2
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.js +2 -2
- package/dist/src/command-line/migrate/agentic/prompts/fragments.d.ts +1 -12
- package/dist/src/command-line/migrate/agentic/prompts/fragments.js +8 -17
- package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.d.ts +0 -15
- package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.js +3 -100
- package/dist/src/command-line/migrate/agentic/select.d.ts +12 -6
- package/dist/src/command-line/migrate/agentic/select.js +35 -5
- package/dist/src/command-line/migrate/agentic/types.d.ts +9 -68
- package/dist/src/command-line/migrate/agentic/types.js +5 -5
- package/dist/src/command-line/migrate/command-object.js +3 -3
- package/dist/src/command-line/migrate/execute-migration.d.ts +4 -4
- package/dist/src/command-line/migrate/execute-migration.js +7 -5
- package/dist/src/command-line/migrate/migrate-analytics.d.ts +12 -1
- package/dist/src/command-line/migrate/migrate-analytics.js +26 -0
- package/dist/src/command-line/migrate/migrate-commits.d.ts +9 -10
- package/dist/src/command-line/migrate/migrate-commits.js +25 -18
- package/dist/src/command-line/migrate/migrate-output.d.ts +1 -6
- package/dist/src/command-line/migrate/migrate-output.js +1 -10
- package/dist/src/command-line/migrate/migrate.d.ts +3 -0
- package/dist/src/command-line/migrate/migrate.js +77 -44
- package/dist/src/command-line/migrate/run/agent-output.d.ts +1 -0
- package/dist/src/command-line/migrate/run/agent-output.js +4 -0
- package/dist/src/command-line/migrate/run/broker.js +1 -1
- package/dist/src/command-line/migrate/run/give-up.d.ts +4 -3
- package/dist/src/command-line/migrate/run/give-up.js +8 -5
- package/dist/src/command-line/migrate/run/index.d.ts +2 -1
- package/dist/src/command-line/migrate/run/index.js +5 -1
- package/dist/src/command-line/migrate/run/issues.js +7 -2
- package/dist/src/command-line/migrate/run/orchestrator.d.ts +40 -4
- package/dist/src/command-line/migrate/run/orchestrator.js +233 -92
- package/dist/src/command-line/migrate/run/run-state.d.ts +4 -1
- package/dist/src/command-line/migrate/run/run-state.js +20 -2
- package/dist/src/command-line/migrate/run/runbook.d.ts +1 -0
- package/dist/src/command-line/migrate/run/runbook.js +99 -21
- package/dist/src/command-line/migrate/run/state-lock.d.ts +29 -4
- package/dist/src/command-line/migrate/run/state-lock.js +102 -10
- package/dist/src/command-line/migrate/run/util.d.ts +4 -2
- package/dist/src/command-line/migrate/run/util.js +23 -2
- package/dist/src/command-line/migrate/run/worker.d.ts +1 -1
- package/dist/src/command-line/migrate/run/worker.js +252 -250
- package/dist/src/command-line/release/changelog.js +9 -6
- package/dist/src/command-line/release/config/config.d.ts +1 -0
- package/dist/src/command-line/release/config/config.js +48 -9
- package/dist/src/command-line/release/release.js +2 -2
- package/dist/src/command-line/release/utils/git.js +8 -7
- package/dist/src/command-line/release/utils/interpolate-release-config.d.ts +6 -0
- package/dist/src/command-line/release/utils/interpolate-release-config.js +39 -0
- package/dist/src/command-line/release/utils/release-graph.d.ts +5 -0
- package/dist/src/command-line/release/utils/release-graph.js +1 -0
- package/dist/src/command-line/release/utils/resolve-changelog-renderer.js +2 -2
- package/dist/src/command-line/release/utils/shared.js +10 -10
- package/dist/src/command-line/release/utils/version-plan-utils.d.ts +3 -12
- package/dist/src/command-line/release/utils/version-plan-utils.js +33 -55
- package/dist/src/command-line/release/version/version-actions.js +2 -1
- package/dist/src/command-line/release/version.js +5 -2
- package/dist/src/command-line/show/projects.js +5 -3
- package/dist/src/command-line/yargs-utils/shared-options.js +1 -1
- package/dist/src/config/misc-interfaces.d.ts +6 -0
- package/dist/src/config/nx-json.d.ts +8 -5
- package/dist/src/config/workspace-json-project-json.d.ts +23 -12
- package/dist/src/core/graph/main.js +1 -1
- package/dist/src/core/graph/runtime.js +1 -1
- package/dist/src/core/graph/styles.css +1 -1
- package/dist/src/core/graph/styles.js +1 -1
- package/dist/src/devkit-exports.d.ts +8 -0
- package/dist/src/devkit-exports.js +12 -1
- package/dist/src/devkit-internals.d.ts +2 -1
- package/dist/src/devkit-internals.js +7 -3
- package/dist/src/executors/run-commands/run-commands.impl.d.ts +2 -2
- package/dist/src/executors/run-commands/run-commands.impl.js +20 -10
- package/dist/src/executors/run-commands/running-tasks.d.ts +12 -3
- package/dist/src/executors/run-commands/running-tasks.js +22 -18
- package/dist/src/hasher/check-task-files.js +1 -4
- package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.d.ts +1 -2
- package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.js +6 -11
- package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.md +2 -2
- package/dist/src/migrations/update-24-0-0/enable-legacy-affected.d.ts +4 -0
- package/dist/src/migrations/update-24-0-0/enable-legacy-affected.js +15 -0
- package/dist/src/migrations/update-24-0-0/enable-legacy-affected.md +30 -0
- package/dist/src/migrations/update-24-0-0/move-custom-hashers-to-inputs.md +7 -6
- package/dist/src/migrations/update-24-0-0/rename-ultracache-ignore-options.d.ts +3 -0
- package/dist/src/migrations/update-24-0-0/rename-ultracache-ignore-options.js +130 -0
- package/dist/src/migrations/update-24-0-0/rename-ultracache-ignore-options.md +62 -0
- package/dist/src/native/index.d.ts +11 -5
- package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
- package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
- package/dist/src/plugins/js/lock-file/pnpm-parser.js +1 -3
- package/dist/src/plugins/js/lock-file/pruned-output.d.ts +2 -2
- package/dist/src/plugins/js/lock-file/pruned-output.js +4 -4
- package/dist/src/project-graph/affected/affected-tasks.d.ts +6 -5
- package/dist/src/project-graph/affected/affected-tasks.js +16 -6
- package/dist/src/project-graph/plugins/loaded-nx-plugin.js +49 -6
- package/dist/src/project-graph/utils/project-configuration/target-merging.js +1 -1
- package/dist/src/project-graph/utils/project-configuration/target-normalization.js +7 -133
- package/dist/src/project-graph/utils/project-configuration-utils.js +2 -2
- package/dist/src/tasks-runner/pseudo-ipc.d.ts +1 -0
- package/dist/src/tasks-runner/pseudo-ipc.js +4 -0
- package/dist/src/tasks-runner/readiness/probes.d.ts +6 -1
- package/dist/src/tasks-runner/readiness/probes.js +41 -2
- package/dist/src/tasks-runner/readiness/ready-signal-server.d.ts +18 -0
- package/dist/src/tasks-runner/readiness/ready-signal-server.js +71 -0
- package/dist/src/tasks-runner/readiness/ready-signal.d.ts +25 -0
- package/dist/src/tasks-runner/readiness/ready-signal.js +70 -0
- package/dist/src/tasks-runner/readiness/ready-when.d.ts +35 -10
- package/dist/src/tasks-runner/readiness/ready-when.js +197 -42
- package/dist/src/tasks-runner/readiness/startup-host.d.ts +1 -0
- package/dist/src/tasks-runner/readiness/startup-host.js +32 -0
- package/dist/src/tasks-runner/task-env.js +11 -0
- package/dist/src/tasks-runner/task-orchestrator.d.ts +8 -0
- package/dist/src/tasks-runner/task-orchestrator.js +152 -42
- package/dist/src/tasks-runner/tokens.d.ts +54 -0
- package/dist/src/tasks-runner/tokens.js +161 -0
- package/dist/src/tasks-runner/utils.d.ts +15 -1
- package/dist/src/tasks-runner/utils.js +79 -33
- package/dist/src/ultracache/config.d.ts +3 -3
- package/dist/src/ultracache/config.js +4 -4
- package/dist/src/utils/acknowledge-build-scripts.d.ts +34 -1
- package/dist/src/utils/acknowledge-build-scripts.js +171 -32
- package/dist/src/utils/long-running-target.d.ts +1 -3
- package/dist/src/utils/long-running-target.js +1 -3
- package/migrations.json +13 -6
- package/package.json +11 -11
- package/schemas/migrations-schema.json +11 -0
- package/schemas/nx-schema.json +24 -13
- package/schemas/project-schema.json +15 -9
- package/dist/src/command-line/migrate/agentic/prompts/generic-validation.d.ts +0 -56
- package/dist/src/command-line/migrate/agentic/prompts/generic-validation.js +0 -67
- package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.d.ts +0 -49
- package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.js +0 -53
- package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.d.ts +0 -26
- package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.js +0 -27
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.d.ts +0 -70
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.js +0 -113
- package/dist/src/command-line/migrate/agentic/run-step.d.ts +0 -68
- package/dist/src/command-line/migrate/agentic/run-step.js +0 -148
- package/dist/src/command-line/migrate/agentic/runner.d.ts +0 -21
- package/dist/src/command-line/migrate/agentic/runner.js +0 -262
- package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.d.ts +0 -9
- package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.js +0 -18
package/schemas/nx-schema.json
CHANGED
|
@@ -15,11 +15,16 @@
|
|
|
15
15
|
"properties": {
|
|
16
16
|
"defaultBase": {
|
|
17
17
|
"type": "string",
|
|
18
|
-
"description": "Default based branch used by affected commands."
|
|
18
|
+
"description": "Default based branch used by affected commands.",
|
|
19
|
+
"deprecated": "Use the top-level `defaultBase` instead. Support for setting `defaultBase` in `affected` will be removed in Nx 25."
|
|
20
|
+
},
|
|
21
|
+
"legacy": {
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"default": false,
|
|
24
|
+
"description": "Select every task of each affected project, instead of only the tasks whose inputs a change reaches."
|
|
19
25
|
}
|
|
20
26
|
},
|
|
21
|
-
"additionalProperties": false
|
|
22
|
-
"deprecated": "Use `defaultBase` instead. Support for setting `defaultBase` in `affected` will be removed in Nx 20."
|
|
27
|
+
"additionalProperties": false
|
|
23
28
|
},
|
|
24
29
|
"extends": {
|
|
25
30
|
"type": "string",
|
|
@@ -150,7 +155,7 @@
|
|
|
150
155
|
},
|
|
151
156
|
"useInferencePlugins": {
|
|
152
157
|
"type": "boolean",
|
|
153
|
-
"description": "
|
|
158
|
+
"description": "When `false`, `nx add` does not update package.json scripts by default and `nx init` uses its legacy setup. Generators ignore this setting and always add their inference plugin."
|
|
154
159
|
},
|
|
155
160
|
"analytics": {
|
|
156
161
|
"type": "boolean",
|
|
@@ -620,7 +625,7 @@
|
|
|
620
625
|
},
|
|
621
626
|
"definitions": {
|
|
622
627
|
"readyWhen": {
|
|
623
|
-
"description": "How Nx detects that this continuous target is ready. Dependents opt in with \"waitFor\": \"ready\" on their dependsOn entry. Strings may use the {workspaceRoot}, {projectRoot}, {projectName} and {
|
|
628
|
+
"description": "How Nx detects that this continuous target is ready. Dependents opt in with \"waitFor\": \"ready\" on their dependsOn entry. Strings may use the {workspaceRoot}, {projectRoot}, {projectName}, {options.*}, and {env.*} placeholders, resolved against the options and environment the task runs with. A placeholder can list fallbacks, as in {options.port ?? env.PORT ?? 4200}. Set it to null to turn off a check inherited from a plugin or targetDefaults.",
|
|
624
629
|
"type": "object",
|
|
625
630
|
"properties": {
|
|
626
631
|
"url": {
|
|
@@ -629,9 +634,9 @@
|
|
|
629
634
|
},
|
|
630
635
|
"port": {
|
|
631
636
|
"type": ["integer", "string"],
|
|
632
|
-
"minimum":
|
|
637
|
+
"minimum": 0,
|
|
633
638
|
"maximum": 65535,
|
|
634
|
-
"description": "Ready when a TCP connection to this port succeeds. A string
|
|
639
|
+
"description": "Ready when a TCP connection to this port succeeds. A string can be a port number, auto, or a placeholder such as {options.port}. With 0 or auto the server picks its port, so Nx runs no check and the target counts as ready once it starts"
|
|
635
640
|
},
|
|
636
641
|
"host": {
|
|
637
642
|
"type": "string",
|
|
@@ -639,7 +644,7 @@
|
|
|
639
644
|
},
|
|
640
645
|
"command": {
|
|
641
646
|
"type": "string",
|
|
642
|
-
"description": "Ready when this command, run through the shell at the workspace root, exits with code 0"
|
|
647
|
+
"description": "Ready when this command, run through the shell at the workspace root, exits with code 0. It runs with the environment the task runs with, and the task's options as JSON in NX_TASK_OPTIONS"
|
|
643
648
|
},
|
|
644
649
|
"logMatches": {
|
|
645
650
|
"description": "Ready when every one of these substrings has appeared in the task's output",
|
|
@@ -661,14 +666,20 @@
|
|
|
661
666
|
"interval": {
|
|
662
667
|
"type": "integer",
|
|
663
668
|
"minimum": 1,
|
|
664
|
-
"
|
|
669
|
+
"default": 250,
|
|
670
|
+
"description": "Milliseconds between probe attempts. Unused by logMatches and signal"
|
|
671
|
+
},
|
|
672
|
+
"signal": {
|
|
673
|
+
"const": true,
|
|
674
|
+
"description": "Ready when the task reports it, through signalTaskReady from @nx/devkit. The webpack, Rspack, Vite and Rsbuild plugins of Nx report it once their dev server listens"
|
|
665
675
|
}
|
|
666
676
|
},
|
|
667
677
|
"oneOf": [
|
|
668
678
|
{ "required": ["url"] },
|
|
669
679
|
{ "required": ["port"] },
|
|
670
680
|
{ "required": ["command"] },
|
|
671
|
-
{ "required": ["logMatches"] }
|
|
681
|
+
{ "required": ["logMatches"] },
|
|
682
|
+
{ "required": ["signal"] }
|
|
672
683
|
],
|
|
673
684
|
"additionalProperties": false
|
|
674
685
|
},
|
|
@@ -1051,7 +1062,7 @@
|
|
|
1051
1062
|
"description": "Whether this target runs continuously until stopped"
|
|
1052
1063
|
},
|
|
1053
1064
|
"readyWhen": {
|
|
1054
|
-
"$ref": "#/definitions/readyWhen"
|
|
1065
|
+
"oneOf": [{ "$ref": "#/definitions/readyWhen" }, { "type": "null" }]
|
|
1055
1066
|
},
|
|
1056
1067
|
"parallelism": {
|
|
1057
1068
|
"type": "boolean",
|
|
@@ -1161,14 +1172,14 @@
|
|
|
1161
1172
|
"default": false,
|
|
1162
1173
|
"description": "Collect successful stat metadata accesses as inputs. Missing-path probes are tracked independently of this setting."
|
|
1163
1174
|
},
|
|
1164
|
-
"
|
|
1175
|
+
"ignoreReads": {
|
|
1165
1176
|
"type": "array",
|
|
1166
1177
|
"items": {
|
|
1167
1178
|
"type": "string"
|
|
1168
1179
|
},
|
|
1169
1180
|
"description": "Workspace-relative glob patterns for reads excluded from ultracache reports. The first path segment cannot contain '*', and '?', '!', '[', ']' and extglobs are not supported; anchor the pattern to a directory instead of leading with '**'."
|
|
1170
1181
|
},
|
|
1171
|
-
"
|
|
1182
|
+
"ignoreWrites": {
|
|
1172
1183
|
"type": "array",
|
|
1173
1184
|
"items": {
|
|
1174
1185
|
"type": "string"
|
|
@@ -168,14 +168,14 @@
|
|
|
168
168
|
"default": false,
|
|
169
169
|
"description": "Collect successful stat metadata accesses as inputs. Missing-path probes are tracked independently of this setting."
|
|
170
170
|
},
|
|
171
|
-
"
|
|
171
|
+
"ignoreReads": {
|
|
172
172
|
"type": "array",
|
|
173
173
|
"items": {
|
|
174
174
|
"type": "string"
|
|
175
175
|
},
|
|
176
176
|
"description": "Workspace-relative glob patterns for reads excluded from ultracache reports. The first path segment cannot contain '*', and '?', '!', '[', ']' and extglobs are not supported; anchor the pattern to a directory instead of leading with '**'."
|
|
177
177
|
},
|
|
178
|
-
"
|
|
178
|
+
"ignoreWrites": {
|
|
179
179
|
"type": "array",
|
|
180
180
|
"items": {
|
|
181
181
|
"type": "string"
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
"description": "Whether this target runs continuously until stopped"
|
|
192
192
|
},
|
|
193
193
|
"readyWhen": {
|
|
194
|
-
"$ref": "#/definitions/readyWhen"
|
|
194
|
+
"oneOf": [{ "$ref": "#/definitions/readyWhen" }, { "type": "null" }]
|
|
195
195
|
},
|
|
196
196
|
"parallelism": {
|
|
197
197
|
"type": "boolean",
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
},
|
|
255
255
|
"definitions": {
|
|
256
256
|
"readyWhen": {
|
|
257
|
-
"description": "How Nx detects that this continuous target is ready. Dependents opt in with \"waitFor\": \"ready\" on their dependsOn entry. Strings may use the {workspaceRoot}, {projectRoot}, {projectName} and {
|
|
257
|
+
"description": "How Nx detects that this continuous target is ready. Dependents opt in with \"waitFor\": \"ready\" on their dependsOn entry. Strings may use the {workspaceRoot}, {projectRoot}, {projectName}, {options.*}, and {env.*} placeholders, resolved against the options and environment the task runs with. A placeholder can list fallbacks, as in {options.port ?? env.PORT ?? 4200}. Set it to null to turn off a check inherited from a plugin or targetDefaults.",
|
|
258
258
|
"type": "object",
|
|
259
259
|
"properties": {
|
|
260
260
|
"url": {
|
|
@@ -263,9 +263,9 @@
|
|
|
263
263
|
},
|
|
264
264
|
"port": {
|
|
265
265
|
"type": ["integer", "string"],
|
|
266
|
-
"minimum":
|
|
266
|
+
"minimum": 0,
|
|
267
267
|
"maximum": 65535,
|
|
268
|
-
"description": "Ready when a TCP connection to this port succeeds. A string
|
|
268
|
+
"description": "Ready when a TCP connection to this port succeeds. A string can be a port number, auto, or a placeholder such as {options.port}. With 0 or auto the server picks its port, so Nx runs no check and the target counts as ready once it starts"
|
|
269
269
|
},
|
|
270
270
|
"host": {
|
|
271
271
|
"type": "string",
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
},
|
|
274
274
|
"command": {
|
|
275
275
|
"type": "string",
|
|
276
|
-
"description": "Ready when this command, run through the shell at the workspace root, exits with code 0"
|
|
276
|
+
"description": "Ready when this command, run through the shell at the workspace root, exits with code 0. It runs with the environment the task runs with, and the task's options as JSON in NX_TASK_OPTIONS"
|
|
277
277
|
},
|
|
278
278
|
"logMatches": {
|
|
279
279
|
"description": "Ready when every one of these substrings has appeared in the task's output",
|
|
@@ -295,14 +295,20 @@
|
|
|
295
295
|
"interval": {
|
|
296
296
|
"type": "integer",
|
|
297
297
|
"minimum": 1,
|
|
298
|
-
"
|
|
298
|
+
"default": 250,
|
|
299
|
+
"description": "Milliseconds between probe attempts. Unused by logMatches and signal"
|
|
300
|
+
},
|
|
301
|
+
"signal": {
|
|
302
|
+
"const": true,
|
|
303
|
+
"description": "Ready when the task reports it, through signalTaskReady from @nx/devkit. The webpack, Rspack, Vite and Rsbuild plugins of Nx report it once their dev server listens"
|
|
299
304
|
}
|
|
300
305
|
},
|
|
301
306
|
"oneOf": [
|
|
302
307
|
{ "required": ["url"] },
|
|
303
308
|
{ "required": ["port"] },
|
|
304
309
|
{ "required": ["command"] },
|
|
305
|
-
{ "required": ["logMatches"] }
|
|
310
|
+
{ "required": ["logMatches"] },
|
|
311
|
+
{ "required": ["signal"] }
|
|
306
312
|
],
|
|
307
313
|
"additionalProperties": false
|
|
308
314
|
},
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { FileChange } from '../../../../generators/tree';
|
|
2
|
-
export interface GenericValidationPromptContext {
|
|
3
|
-
package: string;
|
|
4
|
-
name: string;
|
|
5
|
-
version: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
/** Absolute path the agent must write its handoff file to. */
|
|
8
|
-
handoffFileAbsolutePath: string;
|
|
9
|
-
/**
|
|
10
|
-
* Path to the migration's documentation file, if any - workspace-relative,
|
|
11
|
-
* or absolute when it resolves outside the workspace.
|
|
12
|
-
*/
|
|
13
|
-
documentationPath?: string;
|
|
14
|
-
/** Context captured from the deterministic generator phase. */
|
|
15
|
-
impl: {
|
|
16
|
-
/** Raw output from the generator (devkit logger + console). */
|
|
17
|
-
logs?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Files the generator changed. Rendered inside `<files_changed>` as a
|
|
20
|
-
* `[TYPE] path` list — only when `hasDiffContext` is false; when true the
|
|
21
|
-
* agent is instead instructed to inspect via git.
|
|
22
|
-
*/
|
|
23
|
-
changes: FileChange[];
|
|
24
|
-
/** Strings the generator author put in `agentContext`. */
|
|
25
|
-
agentContext?: string[];
|
|
26
|
-
/**
|
|
27
|
-
* True when per-migration commits are in effect (git repo + commits
|
|
28
|
-
* enabled). The prompt instructs the agent to use `git status`/`git diff`
|
|
29
|
-
* for the file list. When false (no git, or commits disabled), the
|
|
30
|
-
* `<files_changed>` block is embedded with `changes` instead.
|
|
31
|
-
*/
|
|
32
|
-
hasDiffContext: boolean;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Cap on the number of file entries rendered verbatim inside `<files_changed>`
|
|
37
|
-
* when the embedded-list path is used (no per-migration commits / no git).
|
|
38
|
-
* Excess entries collapse into a `… and N more files.` line.
|
|
39
|
-
*/
|
|
40
|
-
export declare const GENERIC_VALIDATION_FILE_LIST_CAP = 50;
|
|
41
|
-
/**
|
|
42
|
-
* Builds the user prompt for the framework-owned generic-validation agent step
|
|
43
|
-
* that runs after a generator-only migration produces changes (when `--validate`
|
|
44
|
-
* is enabled and `--agentic` resolves to an enabled agent).
|
|
45
|
-
*
|
|
46
|
-
* Differences from `buildHybridPromptUserPrompt`:
|
|
47
|
-
* - No `<instructions_file>` block — the framework owns the instructions, and
|
|
48
|
-
* they live inline in `<validation_instructions>` below.
|
|
49
|
-
* - No `<precedence>` block — there's no external instructions file to defer
|
|
50
|
-
* to.
|
|
51
|
-
* - File-list cap: when the diff exceeds `GENERIC_VALIDATION_FILE_LIST_CAP`,
|
|
52
|
-
* the first N entries render verbatim and the remainder collapses into a
|
|
53
|
-
* `… and N more files.` count line.
|
|
54
|
-
* - The lead sentence frames the agent as a validator, not an applier.
|
|
55
|
-
*/
|
|
56
|
-
export declare function buildGenericValidationUserPrompt(ctx: GenericValidationPromptContext): string;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GENERIC_VALIDATION_FILE_LIST_CAP = void 0;
|
|
4
|
-
exports.buildGenericValidationUserPrompt = buildGenericValidationUserPrompt;
|
|
5
|
-
const shared_rendering_1 = require("./shared-rendering");
|
|
6
|
-
/**
|
|
7
|
-
* Cap on the number of file entries rendered verbatim inside `<files_changed>`
|
|
8
|
-
* when the embedded-list path is used (no per-migration commits / no git).
|
|
9
|
-
* Excess entries collapse into a `… and N more files.` line.
|
|
10
|
-
*/
|
|
11
|
-
exports.GENERIC_VALIDATION_FILE_LIST_CAP = 50;
|
|
12
|
-
/**
|
|
13
|
-
* Builds the user prompt for the framework-owned generic-validation agent step
|
|
14
|
-
* that runs after a generator-only migration produces changes (when `--validate`
|
|
15
|
-
* is enabled and `--agentic` resolves to an enabled agent).
|
|
16
|
-
*
|
|
17
|
-
* Differences from `buildHybridPromptUserPrompt`:
|
|
18
|
-
* - No `<instructions_file>` block — the framework owns the instructions, and
|
|
19
|
-
* they live inline in `<validation_instructions>` below.
|
|
20
|
-
* - No `<precedence>` block — there's no external instructions file to defer
|
|
21
|
-
* to.
|
|
22
|
-
* - File-list cap: when the diff exceeds `GENERIC_VALIDATION_FILE_LIST_CAP`,
|
|
23
|
-
* the first N entries render verbatim and the remainder collapses into a
|
|
24
|
-
* `… and N more files.` count line.
|
|
25
|
-
* - The lead sentence frames the agent as a validator, not an applier.
|
|
26
|
-
*/
|
|
27
|
-
function buildGenericValidationUserPrompt(ctx) {
|
|
28
|
-
const lines = [
|
|
29
|
-
`You are validating the output of an Nx migration's deterministic generator phase. The generator has already run; inspect what it produced, verify the workspace is in a consistent state for what this migration intended to accomplish, apply any minor in-scope fixes the generator should have produced cleanly, and report findings.`,
|
|
30
|
-
...(0, shared_rendering_1.renderMigrationBlock)(ctx),
|
|
31
|
-
];
|
|
32
|
-
lines.push(...(0, shared_rendering_1.renderMigrationDocumentationBlock)(ctx.documentationPath));
|
|
33
|
-
const logs = (0, shared_rendering_1.escapeXmlBody)((0, shared_rendering_1.stripAnsi)(ctx.impl.logs ?? '').trim());
|
|
34
|
-
lines.push(...(0, shared_rendering_1.renderGeneratorOutputBlock)(logs));
|
|
35
|
-
if (!ctx.impl.hasDiffContext && ctx.impl.changes.length > 0) {
|
|
36
|
-
lines.push(``, `<files_changed>`, ...renderFileListBody(ctx.impl.changes), `</files_changed>`);
|
|
37
|
-
}
|
|
38
|
-
const agentContext = (0, shared_rendering_1.filterNonEmptyStrings)(ctx.impl.agentContext ?? []);
|
|
39
|
-
if (agentContext.length > 0) {
|
|
40
|
-
lines.push(...(0, shared_rendering_1.renderAdvisoryContext)('hints emitted by the generator; treat as supplementary context, not separate tasks', agentContext));
|
|
41
|
-
}
|
|
42
|
-
const targetDiscovery = `discover each project's targets with \`nx show project <name> --json\`, which includes targets inferred by plugins (reading \`project.json\` / \`package.json\` misses those; fall back to it only if the project graph cannot be built). Do not assume \`typecheck\` / \`test\` / \`lint\` exist. If no typecheck-equivalent exists, \`build\` is an acceptable substitute.`;
|
|
43
|
-
const firstStep = ctx.impl.hasDiffContext
|
|
44
|
-
? `1. Inspect this migration's changes. ${(0, shared_rendering_1.renderGitInspectInstruction)()} Resolve each affected path to its owning Nx project, then ${targetDiscovery}`
|
|
45
|
-
: `1. Resolve each path in <files_changed> to its owning Nx project, then ${targetDiscovery}`;
|
|
46
|
-
lines.push(``, `<validation_instructions>`, firstStep, `2. Pick the smallest relevant subset of available targets to verify the change. Prefer \`nx affected --files=<comma-separated changed paths> -t <target>\` with the changed file list (bare \`nx affected\` also selects the branch delta and unrelated uncommitted changes). \`--files\` splits on every comma, so when a changed path contains one, pipe the paths one per line into \`nx affected --stdin -t <target>\` instead (POSIX shells: \`printf '%s\\n' <paths> | nx affected --stdin -t <target>\`). Alternatively, use \`nx run <project>:<target>\` for a single project. When many small projects are affected, you may use \`nx run-many -t <target> -p <project1>,<project2>\` with the project list derived from the changed files. Unscoped \`nx run-many\` (no \`-p\`) is forbidden.`, `3. If a verification surfaces an issue the migration should have produced cleanly (e.g. a missing import, a type annotation the generator's template missed), you may apply a minor in-scope fix. The boundary is "what this migration intended to accomplish" — do not refactor, do not modify functionality unrelated to the migration, do not extend the migration's scope, do not touch code the migration was not concerned with. If you are unsure whether a fix is in scope, report it in \`summary\` instead of applying.`, `4. Apply every fix you can within scope, then end the step per the handoff contract. If everything is resolved, write your handoff with \`status: "success"\`, summarizing what you verified and any fixes you applied. If unresolved findings remain, report them to the user and ask how to proceed before writing any handoff; on a \`status: "failed"\` handoff, enumerate the findings in \`summary\` so the user can address them — no commit will be created from a failed run, so the generator's changes and your partial fixes will sit uncommitted in the working tree for the user to review.`, `</validation_instructions>`, ``, `When you end the step per the handoff contract, your handoff path is:`, ...(0, shared_rendering_1.renderHandoffPathFooter)(ctx.handoffFileAbsolutePath));
|
|
47
|
-
return lines.join('\n');
|
|
48
|
-
}
|
|
49
|
-
function renderFileListBody(changes) {
|
|
50
|
-
// File paths from `tree.write` are user-authored; escape `<` / `&` so a
|
|
51
|
-
// hostile path can't break out of `<files_changed>`. `change.type` is an
|
|
52
|
-
// nx-controlled enum (CREATE/UPDATE/DELETE) and needs no escape.
|
|
53
|
-
const safe = changes.map((change) => ({
|
|
54
|
-
...change,
|
|
55
|
-
path: (0, shared_rendering_1.escapeXmlBody)(change.path),
|
|
56
|
-
}));
|
|
57
|
-
if (safe.length <= exports.GENERIC_VALIDATION_FILE_LIST_CAP) {
|
|
58
|
-
return safe.map(shared_rendering_1.renderFileEntry);
|
|
59
|
-
}
|
|
60
|
-
const shown = safe.slice(0, exports.GENERIC_VALIDATION_FILE_LIST_CAP);
|
|
61
|
-
const remaining = safe.length - exports.GENERIC_VALIDATION_FILE_LIST_CAP;
|
|
62
|
-
return [
|
|
63
|
-
...shown.map(shared_rendering_1.renderFileEntry),
|
|
64
|
-
``,
|
|
65
|
-
`… and ${remaining} more file${remaining === 1 ? '' : 's'}.`,
|
|
66
|
-
];
|
|
67
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { FileChange } from '../../../../generators/tree';
|
|
2
|
-
export interface HybridPromptMigrationContext {
|
|
3
|
-
package: string;
|
|
4
|
-
name: string;
|
|
5
|
-
version: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
/** Workspace-relative path to the prompt `.md` file. */
|
|
8
|
-
promptPath: string;
|
|
9
|
-
/** Absolute path the agent must write its handoff file to. */
|
|
10
|
-
handoffFileAbsolutePath: string;
|
|
11
|
-
/**
|
|
12
|
-
* Path to the migration's documentation file, if any - workspace-relative,
|
|
13
|
-
* or absolute when it resolves outside the workspace.
|
|
14
|
-
*/
|
|
15
|
-
documentationPath?: string;
|
|
16
|
-
/** Context captured from the deterministic generator phase. */
|
|
17
|
-
impl?: {
|
|
18
|
-
/** Raw output from the generator (devkit logger + console). */
|
|
19
|
-
logs?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Files the generator changed. Rendered inside `<files_changed>` as a
|
|
22
|
-
* `[TYPE] path` list — only when `hasDiffContext` is false; when true the
|
|
23
|
-
* agent is instead pointed at `git status` / `git diff`.
|
|
24
|
-
*/
|
|
25
|
-
changes?: FileChange[];
|
|
26
|
-
/** Strings the generator author put in `agentContext`. */
|
|
27
|
-
agentContext?: string[];
|
|
28
|
-
/**
|
|
29
|
-
* True when per-migration commits are in effect (git repo + commits
|
|
30
|
-
* enabled). The prompt then points the agent at git for the file list;
|
|
31
|
-
* when false (no git or commits disabled), `changes` is embedded.
|
|
32
|
-
*/
|
|
33
|
-
hasDiffContext?: boolean;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Builds the user prompt for a hybrid migration's prompt phase (`implementation`
|
|
38
|
-
* + `prompt`). The deterministic generator has already run; sections of the
|
|
39
|
-
* prompt summarize what it did so the agent can complete the paired step with
|
|
40
|
-
* awareness of the generator's output.
|
|
41
|
-
*
|
|
42
|
-
* Structure: XML tags carry section boundaries; markdown (fenced blocks,
|
|
43
|
-
* bullet lists) sits inside tags for inline structure. This is the
|
|
44
|
-
* multi-section case where both Anthropic and OpenAI guidance most clearly
|
|
45
|
-
* favors XML for unambiguous parsing. Each impl section is omitted when its
|
|
46
|
-
* source is empty so the prompt stays minimal when the generator made no
|
|
47
|
-
* meaningful contribution.
|
|
48
|
-
*/
|
|
49
|
-
export declare function buildHybridPromptUserPrompt(ctx: HybridPromptMigrationContext): string;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildHybridPromptUserPrompt = buildHybridPromptUserPrompt;
|
|
4
|
-
const shared_rendering_1 = require("./shared-rendering");
|
|
5
|
-
/**
|
|
6
|
-
* Builds the user prompt for a hybrid migration's prompt phase (`implementation`
|
|
7
|
-
* + `prompt`). The deterministic generator has already run; sections of the
|
|
8
|
-
* prompt summarize what it did so the agent can complete the paired step with
|
|
9
|
-
* awareness of the generator's output.
|
|
10
|
-
*
|
|
11
|
-
* Structure: XML tags carry section boundaries; markdown (fenced blocks,
|
|
12
|
-
* bullet lists) sits inside tags for inline structure. This is the
|
|
13
|
-
* multi-section case where both Anthropic and OpenAI guidance most clearly
|
|
14
|
-
* favors XML for unambiguous parsing. Each impl section is omitted when its
|
|
15
|
-
* source is empty so the prompt stays minimal when the generator made no
|
|
16
|
-
* meaningful contribution.
|
|
17
|
-
*/
|
|
18
|
-
function buildHybridPromptUserPrompt(ctx) {
|
|
19
|
-
const lines = [
|
|
20
|
-
`Complete the AI-driven step that follows the generator phase of a two-phase Nx migration. The deterministic generator phase has already run; the sections below summarize what it did. The step may apply additional changes, verify the generator's output, or both — follow the instructions file.`,
|
|
21
|
-
...(0, shared_rendering_1.renderMigrationBlock)(ctx),
|
|
22
|
-
];
|
|
23
|
-
lines.push(...(0, shared_rendering_1.renderMigrationDocumentationBlock)(ctx.documentationPath));
|
|
24
|
-
const logs = (0, shared_rendering_1.escapeXmlBody)((0, shared_rendering_1.stripAnsi)(ctx.impl?.logs ?? '').trim());
|
|
25
|
-
const agentContext = (0, shared_rendering_1.filterNonEmptyStrings)(ctx.impl?.agentContext ?? []);
|
|
26
|
-
const hasDiffContext = !!ctx.impl?.hasDiffContext;
|
|
27
|
-
const hasChanges = !!ctx.impl?.changes && ctx.impl.changes.length > 0;
|
|
28
|
-
lines.push(...(0, shared_rendering_1.renderGeneratorOutputBlock)(logs));
|
|
29
|
-
if (hasDiffContext && hasChanges) {
|
|
30
|
-
// Live view via git. Suppressed when the generator made no changes —
|
|
31
|
-
// pointing the agent at `git status` for an empty diff is noise.
|
|
32
|
-
lines.push(``, `<inspect_changes>`, (0, shared_rendering_1.renderGitInspectInstruction)(), `</inspect_changes>`);
|
|
33
|
-
}
|
|
34
|
-
else if (!hasDiffContext) {
|
|
35
|
-
const embeddedFileList = renderFileList(ctx.impl?.changes);
|
|
36
|
-
if (embeddedFileList) {
|
|
37
|
-
lines.push(``, `<files_changed>`, embeddedFileList, `</files_changed>`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
if (agentContext.length > 0) {
|
|
41
|
-
lines.push(...(0, shared_rendering_1.renderAdvisoryContext)('hints from the generator phase; consult while following the instructions, not as separate tasks', agentContext));
|
|
42
|
-
}
|
|
43
|
-
lines.push(``, `<instructions_file>${(0, shared_rendering_1.escapeXmlBody)(ctx.promptPath)}</instructions_file>`, ``, `<precedence>If anything in the sections above conflicts with the instructions file, the instructions file wins.</precedence>`, ``, `Open the instructions file (path is workspace-relative), follow its instructions step by step using the sections above as context, then end the step per the handoff contract. Your handoff path is:`, ...(0, shared_rendering_1.renderHandoffPathFooter)(ctx.handoffFileAbsolutePath));
|
|
44
|
-
return lines.join('\n');
|
|
45
|
-
}
|
|
46
|
-
function renderFileList(changes) {
|
|
47
|
-
if (!changes || changes.length === 0)
|
|
48
|
-
return '';
|
|
49
|
-
return changes
|
|
50
|
-
.map((change) => ({ ...change, path: (0, shared_rendering_1.escapeXmlBody)(change.path) }))
|
|
51
|
-
.map(shared_rendering_1.renderFileEntry)
|
|
52
|
-
.join('\n');
|
|
53
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export interface PromptMigrationContext {
|
|
2
|
-
package: string;
|
|
3
|
-
name: string;
|
|
4
|
-
version: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
/** Workspace-relative path to the prompt `.md` file. */
|
|
7
|
-
promptPath: string;
|
|
8
|
-
/** Absolute path the agent must write its handoff file to. */
|
|
9
|
-
handoffFileAbsolutePath: string;
|
|
10
|
-
/**
|
|
11
|
-
* Path to the migration's documentation file, if any - workspace-relative,
|
|
12
|
-
* or absolute when it resolves outside the workspace.
|
|
13
|
-
*/
|
|
14
|
-
documentationPath?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Builds the first user-facing message for a prompt-migration step.
|
|
18
|
-
*
|
|
19
|
-
* Keeps the framing short — the heavy lifting (handoff contract, scope rules)
|
|
20
|
-
* already lives in the system prompt; this message just identifies the
|
|
21
|
-
* migration and points at the instructions file.
|
|
22
|
-
*
|
|
23
|
-
* XML tags wrap path values and the migration metadata so the agent does
|
|
24
|
-
* not misread them as headers or prose.
|
|
25
|
-
*/
|
|
26
|
-
export declare function buildPromptMigrationUserPrompt(ctx: PromptMigrationContext): string;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildPromptMigrationUserPrompt = buildPromptMigrationUserPrompt;
|
|
4
|
-
const shared_rendering_1 = require("./shared-rendering");
|
|
5
|
-
/**
|
|
6
|
-
* Builds the first user-facing message for a prompt-migration step.
|
|
7
|
-
*
|
|
8
|
-
* Keeps the framing short — the heavy lifting (handoff contract, scope rules)
|
|
9
|
-
* already lives in the system prompt; this message just identifies the
|
|
10
|
-
* migration and points at the instructions file.
|
|
11
|
-
*
|
|
12
|
-
* XML tags wrap path values and the migration metadata so the agent does
|
|
13
|
-
* not misread them as headers or prose.
|
|
14
|
-
*/
|
|
15
|
-
function buildPromptMigrationUserPrompt(ctx) {
|
|
16
|
-
const lines = [
|
|
17
|
-
`Apply one prompt-based migration to this Nx workspace.`,
|
|
18
|
-
...(0, shared_rendering_1.renderMigrationBlock)(ctx),
|
|
19
|
-
...(0, shared_rendering_1.renderMigrationDocumentationBlock)(ctx.documentationPath),
|
|
20
|
-
``,
|
|
21
|
-
`<instructions_file>${(0, shared_rendering_1.escapeXmlBody)(ctx.promptPath)}</instructions_file>`,
|
|
22
|
-
``,
|
|
23
|
-
`Open the instructions file (path is workspace-relative), follow its instructions step by step, then end the step per the handoff contract. Your handoff path is:`,
|
|
24
|
-
...(0, shared_rendering_1.renderHandoffPathFooter)(ctx.handoffFileAbsolutePath),
|
|
25
|
-
];
|
|
26
|
-
return lines.join('\n');
|
|
27
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
export type AgenticPromptMode = 'author' | 'generic-validation';
|
|
2
|
-
export interface SystemPromptContext {
|
|
3
|
-
workspaceRoot: string;
|
|
4
|
-
handoffFileAbsolutePath: string;
|
|
5
|
-
/**
|
|
6
|
-
* Package manager used by the workspace (`npm`, `pnpm`, `yarn`, `bun`).
|
|
7
|
-
* Surfaced to the agent so it doesn't fall back to its own default — e.g.
|
|
8
|
-
* codex would otherwise reach for `pnpm` even in npm workspaces.
|
|
9
|
-
*/
|
|
10
|
-
packageManager: string;
|
|
11
|
-
/**
|
|
12
|
-
* Concrete command the agent should use to invoke nx in this workspace —
|
|
13
|
-
* e.g. `npx nx`, `pnpm exec nx`, `./nx` (encapsulated install). Passed in
|
|
14
|
-
* explicitly because the right form depends on both the package manager
|
|
15
|
-
* (`npm nx …` doesn't work) and whether the workspace has a root
|
|
16
|
-
* `package.json` (encapsulated installs use `./nx` / `.\nx.bat`).
|
|
17
|
-
*/
|
|
18
|
-
nxInvocation: string;
|
|
19
|
-
/**
|
|
20
|
-
* Which scope rules to emit:
|
|
21
|
-
* - `author`: the agent is running an author-provided prompt (prompt-only or
|
|
22
|
-
* hybrid migration). Constraints favor strict no-mutation outside what the
|
|
23
|
-
* prompt asks for.
|
|
24
|
-
* - `generic-validation`: the agent is running framework-owned validation of
|
|
25
|
-
* a generator's output. Constraints allow scoped task execution and minor
|
|
26
|
-
* in-scope fixes.
|
|
27
|
-
*
|
|
28
|
-
* Defaults to `author`.
|
|
29
|
-
*/
|
|
30
|
-
mode?: AgenticPromptMode;
|
|
31
|
-
/**
|
|
32
|
-
* Exact formatter command for the files the agent changed (see
|
|
33
|
-
* `resolveFormatCommand`), or `null` when none can be resolved. Ignored for
|
|
34
|
-
* `generic-validation` prompts; pass `null` there without probing, since
|
|
35
|
-
* formatter detection can warn.
|
|
36
|
-
*/
|
|
37
|
-
formatCommand: string | null;
|
|
38
|
-
pmExec: string;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Builds the agent-agnostic system prompt used for all prompt-migration steps.
|
|
42
|
-
*
|
|
43
|
-
* The handoff-file contract is part of the system prompt rather than the user
|
|
44
|
-
* prompt because it must hold across the whole session — the agent should write
|
|
45
|
-
* the handoff file whether the very first turn succeeded or the user redirected
|
|
46
|
-
* mid-conversation.
|
|
47
|
-
*
|
|
48
|
-
* Structure: XML tags wrap each section so the agent can unambiguously
|
|
49
|
-
* separate role, paths, the handoff contract, and the scope rules. Both
|
|
50
|
-
* Anthropic and OpenAI prompt-engineering guidance recommends XML for
|
|
51
|
-
* multi-section prompts; the conventions used here are snake_case tag names
|
|
52
|
-
* with markdown allowed for inline content.
|
|
53
|
-
*/
|
|
54
|
-
export declare function buildSystemPrompt(ctx: SystemPromptContext): string;
|
|
55
|
-
export interface InlineSystemContext {
|
|
56
|
-
handoffFileAbsolutePath: string;
|
|
57
|
-
/** Absolute path of the file holding the full system prompt. */
|
|
58
|
-
systemPromptFilePath: string;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Carries the handoff contract and workspace boundary inline so the agent can
|
|
62
|
-
* read them before opening the full prompt. File delivery limits the Windows
|
|
63
|
-
* command-line size.
|
|
64
|
-
*/
|
|
65
|
-
export declare function buildInlineSystemContext(ctx: InlineSystemContext): string;
|
|
66
|
-
/**
|
|
67
|
-
* Overflow fallback for {@link buildInlineSystemContext}: keeps the pointer at
|
|
68
|
-
* the full prompt, drops the inline handoff contract.
|
|
69
|
-
*/
|
|
70
|
-
export declare function buildMinimalSystemContext(systemPromptFilePath: string): string;
|