@dsh-ray/lark-channel 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +207 -2
- package/bin/dsh-lark-setup.js +37 -0
- package/bin/dsh-ray-setup.js +34 -0
- package/bin/dsh-supervised-growth-setup.js +34 -0
- package/cordis.patch.yml +23 -0
- package/docs/operations.md +133 -0
- package/docs/progress-security.md +125 -0
- package/docs/rsi-setup.md +216 -0
- package/docs/setup.md +358 -0
- package/docs/supervised-growth.md +95 -0
- package/lib/adapter.d.ts +185 -0
- package/lib/adapter.d.ts.map +1 -0
- package/lib/adapter.js +2072 -0
- package/lib/adapter.js.map +1 -0
- package/lib/answer-card.d.ts +40 -0
- package/lib/answer-card.d.ts.map +1 -0
- package/lib/answer-card.js +262 -0
- package/lib/answer-card.js.map +1 -0
- package/lib/approval.d.ts +26 -0
- package/lib/approval.d.ts.map +1 -0
- package/lib/approval.js +104 -0
- package/lib/approval.js.map +1 -0
- package/lib/business-cli-install.d.ts +9 -0
- package/lib/business-cli-install.d.ts.map +1 -0
- package/lib/business-cli-install.js +367 -0
- package/lib/business-cli-install.js.map +1 -0
- package/lib/business-environment.d.ts +2 -0
- package/lib/business-environment.d.ts.map +1 -0
- package/lib/business-environment.js +16 -0
- package/lib/business-environment.js.map +1 -0
- package/lib/business-skill.d.ts +32 -0
- package/lib/business-skill.d.ts.map +1 -0
- package/lib/business-skill.js +202 -0
- package/lib/business-skill.js.map +1 -0
- package/lib/command-card.d.ts +3 -0
- package/lib/command-card.d.ts.map +1 -0
- package/lib/command-card.js +480 -0
- package/lib/command-card.js.map +1 -0
- package/lib/config.d.ts +32 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +115 -0
- package/lib/config.js.map +1 -0
- package/lib/group-thread.d.ts +20 -0
- package/lib/group-thread.d.ts.map +1 -0
- package/lib/group-thread.js +36 -0
- package/lib/group-thread.js.map +1 -0
- package/lib/index.d.ts +34 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +53 -0
- package/lib/index.js.map +1 -0
- package/lib/launchd-control.d.ts +24 -0
- package/lib/launchd-control.d.ts.map +1 -0
- package/lib/launchd-control.js +68 -0
- package/lib/launchd-control.js.map +1 -0
- package/lib/launchd-identity.d.ts +34 -0
- package/lib/launchd-identity.d.ts.map +1 -0
- package/lib/launchd-identity.js +184 -0
- package/lib/launchd-identity.js.map +1 -0
- package/lib/launchd-target-lock.d.ts +6 -0
- package/lib/launchd-target-lock.d.ts.map +1 -0
- package/lib/launchd-target-lock.js +48 -0
- package/lib/launchd-target-lock.js.map +1 -0
- package/lib/launchd.d.ts +62 -0
- package/lib/launchd.d.ts.map +1 -0
- package/lib/launchd.js +370 -0
- package/lib/launchd.js.map +1 -0
- package/lib/model-picker.d.ts +24 -0
- package/lib/model-picker.d.ts.map +1 -0
- package/lib/model-picker.js +95 -0
- package/lib/model-picker.js.map +1 -0
- package/lib/normalize.d.ts +12 -0
- package/lib/normalize.d.ts.map +1 -0
- package/lib/normalize.js +85 -0
- package/lib/normalize.js.map +1 -0
- package/lib/permission-picker.d.ts +29 -0
- package/lib/permission-picker.d.ts.map +1 -0
- package/lib/permission-picker.js +145 -0
- package/lib/permission-picker.js.map +1 -0
- package/lib/progress.d.ts +34 -0
- package/lib/progress.d.ts.map +1 -0
- package/lib/progress.js +354 -0
- package/lib/progress.js.map +1 -0
- package/lib/resident.d.ts +13 -0
- package/lib/resident.d.ts.map +1 -0
- package/lib/resident.js +41 -0
- package/lib/resident.js.map +1 -0
- package/lib/rsi-authority-config.d.ts +29 -0
- package/lib/rsi-authority-config.d.ts.map +1 -0
- package/lib/rsi-authority-config.js +233 -0
- package/lib/rsi-authority-config.js.map +1 -0
- package/lib/rsi-authority-resources.d.ts +36 -0
- package/lib/rsi-authority-resources.d.ts.map +1 -0
- package/lib/rsi-authority-resources.js +139 -0
- package/lib/rsi-authority-resources.js.map +1 -0
- package/lib/rsi-authority-runtime.d.ts +51 -0
- package/lib/rsi-authority-runtime.d.ts.map +1 -0
- package/lib/rsi-authority-runtime.js +496 -0
- package/lib/rsi-authority-runtime.js.map +1 -0
- package/lib/rsi-bootstrap-manifest.d.ts +53 -0
- package/lib/rsi-bootstrap-manifest.d.ts.map +1 -0
- package/lib/rsi-bootstrap-manifest.js +507 -0
- package/lib/rsi-bootstrap-manifest.js.map +1 -0
- package/lib/rsi-bootstrap.d.ts +61 -0
- package/lib/rsi-bootstrap.d.ts.map +1 -0
- package/lib/rsi-bootstrap.js +597 -0
- package/lib/rsi-bootstrap.js.map +1 -0
- package/lib/rsi-build.d.ts +76 -0
- package/lib/rsi-build.d.ts.map +1 -0
- package/lib/rsi-build.js +210 -0
- package/lib/rsi-build.js.map +1 -0
- package/lib/rsi-host-authorities.d.ts +18 -0
- package/lib/rsi-host-authorities.d.ts.map +1 -0
- package/lib/rsi-host-authorities.js +129 -0
- package/lib/rsi-host-authorities.js.map +1 -0
- package/lib/rsi-host-update.d.ts +179 -0
- package/lib/rsi-host-update.d.ts.map +1 -0
- package/lib/rsi-host-update.js +568 -0
- package/lib/rsi-host-update.js.map +1 -0
- package/lib/rsi-install-inputs.d.ts +45 -0
- package/lib/rsi-install-inputs.d.ts.map +1 -0
- package/lib/rsi-install-inputs.js +345 -0
- package/lib/rsi-install-inputs.js.map +1 -0
- package/lib/rsi-install.d.ts +117 -0
- package/lib/rsi-install.d.ts.map +1 -0
- package/lib/rsi-install.js +791 -0
- package/lib/rsi-install.js.map +1 -0
- package/lib/rsi-linux-cgroup-roots.d.ts +3 -0
- package/lib/rsi-linux-cgroup-roots.d.ts.map +1 -0
- package/lib/rsi-linux-cgroup-roots.js +3 -0
- package/lib/rsi-linux-cgroup-roots.js.map +1 -0
- package/lib/rsi-linux-creation-build.d.ts +36 -0
- package/lib/rsi-linux-creation-build.d.ts.map +1 -0
- package/lib/rsi-linux-creation-build.js +213 -0
- package/lib/rsi-linux-creation-build.js.map +1 -0
- package/lib/rsi-linux-native-materialize.d.ts +31 -0
- package/lib/rsi-linux-native-materialize.d.ts.map +1 -0
- package/lib/rsi-linux-native-materialize.js +162 -0
- package/lib/rsi-linux-native-materialize.js.map +1 -0
- package/lib/rsi-linux-native-relocation.d.ts +124 -0
- package/lib/rsi-linux-native-relocation.d.ts.map +1 -0
- package/lib/rsi-linux-native-relocation.js +1571 -0
- package/lib/rsi-linux-native-relocation.js.map +1 -0
- package/lib/rsi-linux-native-resources.d.ts +97 -0
- package/lib/rsi-linux-native-resources.d.ts.map +1 -0
- package/lib/rsi-linux-native-resources.js +521 -0
- package/lib/rsi-linux-native-resources.js.map +1 -0
- package/lib/rsi-linux-repository-bootstrap.d.ts +17 -0
- package/lib/rsi-linux-repository-bootstrap.d.ts.map +1 -0
- package/lib/rsi-linux-repository-bootstrap.js +317 -0
- package/lib/rsi-linux-repository-bootstrap.js.map +1 -0
- package/lib/rsi-linux-runner-states.d.ts +20 -0
- package/lib/rsi-linux-runner-states.d.ts.map +1 -0
- package/lib/rsi-linux-runner-states.js +70 -0
- package/lib/rsi-linux-runner-states.js.map +1 -0
- package/lib/rsi-linux-runtime-bootstrap.d.ts +10 -0
- package/lib/rsi-linux-runtime-bootstrap.d.ts.map +1 -0
- package/lib/rsi-linux-runtime-bootstrap.js +38 -0
- package/lib/rsi-linux-runtime-bootstrap.js.map +1 -0
- package/lib/rsi-linux-source-build.d.ts +28 -0
- package/lib/rsi-linux-source-build.d.ts.map +1 -0
- package/lib/rsi-linux-source-build.js +43 -0
- package/lib/rsi-linux-source-build.js.map +1 -0
- package/lib/rsi-local-activation.d.ts +78 -0
- package/lib/rsi-local-activation.d.ts.map +1 -0
- package/lib/rsi-local-activation.js +486 -0
- package/lib/rsi-local-activation.js.map +1 -0
- package/lib/rsi-local-cohort.d.ts +70 -0
- package/lib/rsi-local-cohort.d.ts.map +1 -0
- package/lib/rsi-local-cohort.js +810 -0
- package/lib/rsi-local-cohort.js.map +1 -0
- package/lib/rsi-local-install.d.ts +70 -0
- package/lib/rsi-local-install.d.ts.map +1 -0
- package/lib/rsi-local-install.js +363 -0
- package/lib/rsi-local-install.js.map +1 -0
- package/lib/rsi-local-pair-install.d.ts +53 -0
- package/lib/rsi-local-pair-install.d.ts.map +1 -0
- package/lib/rsi-local-pair-install.js +215 -0
- package/lib/rsi-local-pair-install.js.map +1 -0
- package/lib/rsi-local-profile-update.d.ts +25 -0
- package/lib/rsi-local-profile-update.d.ts.map +1 -0
- package/lib/rsi-local-profile-update.js +226 -0
- package/lib/rsi-local-profile-update.js.map +1 -0
- package/lib/rsi-local-roots-extension.d.ts +11 -0
- package/lib/rsi-local-roots-extension.d.ts.map +1 -0
- package/lib/rsi-local-roots-extension.js +31 -0
- package/lib/rsi-local-roots-extension.js.map +1 -0
- package/lib/rsi-local-update-build.d.ts +37 -0
- package/lib/rsi-local-update-build.d.ts.map +1 -0
- package/lib/rsi-local-update-build.js +75 -0
- package/lib/rsi-local-update-build.js.map +1 -0
- package/lib/rsi-local-update.d.ts +39 -0
- package/lib/rsi-local-update.d.ts.map +1 -0
- package/lib/rsi-local-update.js +205 -0
- package/lib/rsi-local-update.js.map +1 -0
- package/lib/rsi-memory-learning.d.ts +36 -0
- package/lib/rsi-memory-learning.d.ts.map +1 -0
- package/lib/rsi-memory-learning.js +111 -0
- package/lib/rsi-memory-learning.js.map +1 -0
- package/lib/rsi-native-install.d.ts +38 -0
- package/lib/rsi-native-install.d.ts.map +1 -0
- package/lib/rsi-native-install.js +312 -0
- package/lib/rsi-native-install.js.map +1 -0
- package/lib/rsi-native-launchd.d.ts +7 -0
- package/lib/rsi-native-launchd.d.ts.map +1 -0
- package/lib/rsi-native-launchd.js +49 -0
- package/lib/rsi-native-launchd.js.map +1 -0
- package/lib/rsi-native-profile.d.ts +76 -0
- package/lib/rsi-native-profile.d.ts.map +1 -0
- package/lib/rsi-native-profile.js +530 -0
- package/lib/rsi-native-profile.js.map +1 -0
- package/lib/rsi-native-runtime-bootstrap.d.ts +44 -0
- package/lib/rsi-native-runtime-bootstrap.d.ts.map +1 -0
- package/lib/rsi-native-runtime-bootstrap.js +619 -0
- package/lib/rsi-native-runtime-bootstrap.js.map +1 -0
- package/lib/rsi-ordinary-use-learning.d.ts +60 -0
- package/lib/rsi-ordinary-use-learning.d.ts.map +1 -0
- package/lib/rsi-ordinary-use-learning.js +103 -0
- package/lib/rsi-ordinary-use-learning.js.map +1 -0
- package/lib/rsi-owner-profile.d.ts +37 -0
- package/lib/rsi-owner-profile.d.ts.map +1 -0
- package/lib/rsi-owner-profile.js +178 -0
- package/lib/rsi-owner-profile.js.map +1 -0
- package/lib/rsi-plugin-creation.d.ts +46 -0
- package/lib/rsi-plugin-creation.d.ts.map +1 -0
- package/lib/rsi-plugin-creation.js +227 -0
- package/lib/rsi-plugin-creation.js.map +1 -0
- package/lib/rsi-plugin-revision.d.ts +38 -0
- package/lib/rsi-plugin-revision.d.ts.map +1 -0
- package/lib/rsi-plugin-revision.js +221 -0
- package/lib/rsi-plugin-revision.js.map +1 -0
- package/lib/rsi-profile.d.ts +81 -0
- package/lib/rsi-profile.d.ts.map +1 -0
- package/lib/rsi-profile.js +551 -0
- package/lib/rsi-profile.js.map +1 -0
- package/lib/rsi-release-build.d.ts +59 -0
- package/lib/rsi-release-build.d.ts.map +1 -0
- package/lib/rsi-release-build.js +219 -0
- package/lib/rsi-release-build.js.map +1 -0
- package/lib/rsi-scanner-retirement-config.d.ts +34 -0
- package/lib/rsi-scanner-retirement-config.d.ts.map +1 -0
- package/lib/rsi-scanner-retirement-config.js +272 -0
- package/lib/rsi-scanner-retirement-config.js.map +1 -0
- package/lib/rsi-scanner-retirement-runtime.d.ts +23 -0
- package/lib/rsi-scanner-retirement-runtime.d.ts.map +1 -0
- package/lib/rsi-scanner-retirement-runtime.js +98 -0
- package/lib/rsi-scanner-retirement-runtime.js.map +1 -0
- package/lib/rsi-scanner-retirement-stage.d.ts +55 -0
- package/lib/rsi-scanner-retirement-stage.d.ts.map +1 -0
- package/lib/rsi-scanner-retirement-stage.js +181 -0
- package/lib/rsi-scanner-retirement-stage.js.map +1 -0
- package/lib/rsi-scanner-retirement-transition.d.ts +57 -0
- package/lib/rsi-scanner-retirement-transition.d.ts.map +1 -0
- package/lib/rsi-scanner-retirement-transition.js +330 -0
- package/lib/rsi-scanner-retirement-transition.js.map +1 -0
- package/lib/rsi-service-environment.d.ts +6 -0
- package/lib/rsi-service-environment.d.ts.map +1 -0
- package/lib/rsi-service-environment.js +113 -0
- package/lib/rsi-service-environment.js.map +1 -0
- package/lib/rsi-service-setup.d.ts +10 -0
- package/lib/rsi-service-setup.d.ts.map +1 -0
- package/lib/rsi-service-setup.js +34 -0
- package/lib/rsi-service-setup.js.map +1 -0
- package/lib/rsi-setup.d.ts +92 -0
- package/lib/rsi-setup.d.ts.map +1 -0
- package/lib/rsi-setup.js +908 -0
- package/lib/rsi-setup.js.map +1 -0
- package/lib/rsi-source-maintenance.d.ts +33 -0
- package/lib/rsi-source-maintenance.d.ts.map +1 -0
- package/lib/rsi-source-maintenance.js +407 -0
- package/lib/rsi-source-maintenance.js.map +1 -0
- package/lib/rsi-source-update.d.ts +26 -0
- package/lib/rsi-source-update.d.ts.map +1 -0
- package/lib/rsi-source-update.js +276 -0
- package/lib/rsi-source-update.js.map +1 -0
- package/lib/rsi-source.d.ts +34 -0
- package/lib/rsi-source.d.ts.map +1 -0
- package/lib/rsi-source.js +487 -0
- package/lib/rsi-source.js.map +1 -0
- package/lib/rsi-systemd-bootstrap.d.ts +46 -0
- package/lib/rsi-systemd-bootstrap.d.ts.map +1 -0
- package/lib/rsi-systemd-bootstrap.js +271 -0
- package/lib/rsi-systemd-bootstrap.js.map +1 -0
- package/lib/sdk.d.ts +216 -0
- package/lib/sdk.d.ts.map +1 -0
- package/lib/sdk.js +1990 -0
- package/lib/sdk.js.map +1 -0
- package/lib/service.d.ts +63 -0
- package/lib/service.d.ts.map +1 -0
- package/lib/service.js +599 -0
- package/lib/service.js.map +1 -0
- package/lib/setup-business.d.ts +49 -0
- package/lib/setup-business.d.ts.map +1 -0
- package/lib/setup-business.js +335 -0
- package/lib/setup-business.js.map +1 -0
- package/lib/setup-materialization.d.ts +15 -0
- package/lib/setup-materialization.d.ts.map +1 -0
- package/lib/setup-materialization.js +221 -0
- package/lib/setup-materialization.js.map +1 -0
- package/lib/setup-profile.d.ts +23 -0
- package/lib/setup-profile.d.ts.map +1 -0
- package/lib/setup-profile.js +1248 -0
- package/lib/setup-profile.js.map +1 -0
- package/lib/setup.d.ts +298 -0
- package/lib/setup.d.ts.map +1 -0
- package/lib/setup.js +3310 -0
- package/lib/setup.js.map +1 -0
- package/lib/supervised-growth-profile.d.ts +111 -0
- package/lib/supervised-growth-profile.d.ts.map +1 -0
- package/lib/supervised-growth-profile.js +903 -0
- package/lib/supervised-growth-profile.js.map +1 -0
- package/lib/supervised-growth-setup.d.ts +201 -0
- package/lib/supervised-growth-setup.d.ts.map +1 -0
- package/lib/supervised-growth-setup.js +1005 -0
- package/lib/supervised-growth-setup.js.map +1 -0
- package/lib/systemd.d.ts +70 -0
- package/lib/systemd.d.ts.map +1 -0
- package/lib/systemd.js +308 -0
- package/lib/systemd.js.map +1 -0
- package/lib/tool-approval.d.ts +22 -0
- package/lib/tool-approval.d.ts.map +1 -0
- package/lib/tool-approval.js +107 -0
- package/lib/tool-approval.js.map +1 -0
- package/lib/types.d.ts +351 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +11 -0
- package/lib/types.js.map +1 -0
- package/lib/user-question.d.ts +31 -0
- package/lib/user-question.d.ts.map +1 -0
- package/lib/user-question.js +161 -0
- package/lib/user-question.js.map +1 -0
- package/lib/version.d.ts +2 -0
- package/lib/version.d.ts.map +1 -0
- package/lib/version.js +2 -0
- package/lib/version.js.map +1 -0
- package/lib/windows-task.d.ts +42 -0
- package/lib/windows-task.d.ts.map +1 -0
- package/lib/windows-task.js +143 -0
- package/lib/windows-task.js.map +1 -0
- package/lib/ws-card-callback.d.ts +7 -0
- package/lib/ws-card-callback.d.ts.map +1 -0
- package/lib/ws-card-callback.js +51 -0
- package/lib/ws-card-callback.js.map +1 -0
- package/package.json +169 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rsi-profile.d.ts","sourceRoot":"","sources":["../src/rsi-profile.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,EAAmB,KAAK,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AACpG,OAAO,EAAmD,KAAK,MAAM,IAAI,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClI,OAAO,EAA8B,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAGjG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAEpE,OAAO,EAAkC,KAAK,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACtG,OAAO,EAAuC,KAAK,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AACtH,OAAO,EAAkC,KAAK,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACtG,OAAO,EAAkC,KAAK,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAEtG,kEAAkE;AAClE,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,CAAC,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,kBAAkB,CAAC,EAAE,sBAAsB,CAAA;IAC3C,YAAY,EAAE,kBAAkB,CAAA;IAChC,YAAY,EAAE,2BAA2B,CAAA;IACzC,aAAa,EAAE,kBAAkB,CAAA;IACjC,cAAc,CAAC,EAAE,sBAAsB,CAAA;IACvC,8EAA8E;IAC9E,mBAAmB,CAAC,EAAE,2BAA2B,CAAA;IACjD,cAAc,CAAC,EAAE,sBAAsB,CAAA;IACvC,cAAc,CAAC,EAAE,sBAAsB,CAAA;IACvC,oGAAoG;IACpG,UAAU,CAAC,EAAE;QAAE,aAAa,EAAE,CAAC,CAAC;QAAC,iBAAiB,EAAE,MAAM,CAAC;QAAC,qBAAqB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC5F,WAAW,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1E,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CACpJ;AAeD,eAAO,MAAM,8BAA8B,EAAE,WAAW,CAAC,MAAM,CAU7D,CAAA;AAoPF,kGAAkG;AAClG,wBAAgB,kCAAkC,CAAC,KAAK,EAAE;IACxD,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,KAAK,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/D,SAAS,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAA;IACvF,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAW1B;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,gBAAgB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAC;IAAC,oBAAoB,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,sBAAsB,CAAC;IAAC,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE,CAAC,CAmMzV"}
|
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
import { isAbsolute, join, resolve } from 'node:path';
|
|
2
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
3
|
+
import {} from '@dsh-ray/assistant-delivery';
|
|
4
|
+
import { normalizeConfig } from '@dsh-ray/assistant-growth-driver';
|
|
5
|
+
import { controlPlaneDigest, normalizeControlPlaneConfig } from '@dsh-ray/plugin-control-plane';
|
|
6
|
+
import { validateSourceReviewConfig } from '@dsh-ray/assistant-verifier';
|
|
7
|
+
import { isMap, isSeq, parseDocument } from 'yaml';
|
|
8
|
+
import { resolveRsiOwnerRoute, rsiCoordinatorAutomationDatabasePath } from './rsi-owner-profile.js';
|
|
9
|
+
import { validateRsiMemoryLearningSetup } from './rsi-memory-learning.js';
|
|
10
|
+
import { validateRsiOrdinaryUseLearningSetup } from './rsi-ordinary-use-learning.js';
|
|
11
|
+
import { validateRsiPluginCreationSetup } from './rsi-plugin-creation.js';
|
|
12
|
+
import { validateRsiPluginRevisionSetup } from './rsi-plugin-revision.js';
|
|
13
|
+
const targetBundles = [
|
|
14
|
+
'dsh-ray-personal-assistant', 'dsh-ray-assistant-delivery', 'dsh-ray-lark-channel',
|
|
15
|
+
'dsh-ray-assistant-evaluation', 'dsh-ray-assistant-goals', 'dsh-ray-assistant-skills',
|
|
16
|
+
'dsh-ray-assistant-verifier', 'dsh-ray-assistant-growth-driver', 'dsh-ray-plugin-control-plane',
|
|
17
|
+
];
|
|
18
|
+
const coordinatorBundles = new Set(['dsh-ray-assistant-policy', 'dsh-ray-assistant-automations', 'dsh-ray-plugin-control-plane']);
|
|
19
|
+
const coordinatorBundleNames = new Map([
|
|
20
|
+
['dsh-ray-assistant-policy', '@dsh-ray/assistant-policy'],
|
|
21
|
+
['dsh-ray-assistant-automations', '@dsh-ray/assistant-automations'],
|
|
22
|
+
['dsh-ray-plugin-control-plane', '@dsh-ray/plugin-control-plane'],
|
|
23
|
+
]);
|
|
24
|
+
const rsiPrefix = 'rsi-setup-';
|
|
25
|
+
export const SELF_ITERATION_MANAGED_ROW_IDS = new Set([
|
|
26
|
+
'dsh-ray-assistant-work-items',
|
|
27
|
+
'dsh-ray-assistant-proactive',
|
|
28
|
+
'dsh-ray-assistant-growth-driver',
|
|
29
|
+
'dsh-ray-assistant-dreaming',
|
|
30
|
+
'dsh-ray-assistant-memory-learning',
|
|
31
|
+
'dsh-ray-assistant-association',
|
|
32
|
+
'dsh-ray-assistant-evaluation',
|
|
33
|
+
'dsh-ray-assistant-evolution',
|
|
34
|
+
'dsh-ray-preference-learning',
|
|
35
|
+
]);
|
|
36
|
+
function fail(message) { throw new Error(`rsi setup: ${message}`); }
|
|
37
|
+
function map(value, label) { if (!isMap(value))
|
|
38
|
+
fail(`${label} must be a YAML mapping`); return value; }
|
|
39
|
+
function seq(value, label) { if (!isSeq(value))
|
|
40
|
+
fail(`${label} must be a YAML sequence`); return value; }
|
|
41
|
+
function parse(value, label) {
|
|
42
|
+
const document = parseDocument(value, { uniqueKeys: true });
|
|
43
|
+
if (document.errors.length)
|
|
44
|
+
fail(`invalid ${label} YAML: ${document.errors[0].message}`);
|
|
45
|
+
return { document, rows: seq(document.contents ?? undefined, label) };
|
|
46
|
+
}
|
|
47
|
+
function baseRows(value) {
|
|
48
|
+
const document = parseDocument(value, { uniqueKeys: true });
|
|
49
|
+
if (document.errors.length)
|
|
50
|
+
fail(`invalid coordinator base YAML: ${document.errors[0].message}`);
|
|
51
|
+
const result = new Map();
|
|
52
|
+
const operations = seq(document.contents ?? undefined, 'coordinator base');
|
|
53
|
+
for (const operation of operations.items) {
|
|
54
|
+
const item = map(operation, 'coordinator base operation');
|
|
55
|
+
if (item.items.length !== 1 || !item.has('insert'))
|
|
56
|
+
fail('coordinator base contains unsupported operation');
|
|
57
|
+
const inserted = seq(item.get('insert', true), 'coordinator base insert');
|
|
58
|
+
for (const entry of inserted.items) {
|
|
59
|
+
const row = map(entry, 'coordinator base row'), id = row.get('id'), name = row.get('name');
|
|
60
|
+
if (typeof id !== 'string' || typeof name !== 'string' || !id || !name || result.has(id))
|
|
61
|
+
fail('coordinator base has invalid or duplicate id');
|
|
62
|
+
result.set(id, name);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (!result.size)
|
|
66
|
+
fail('coordinator base has no rows');
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
function row(rows, id) { return rows.items.find(item => isMap(item) && item.get('id') === id); }
|
|
70
|
+
function required(rows, id, label = 'profile', allowDisabled = false) {
|
|
71
|
+
const result = row(rows, id);
|
|
72
|
+
if (!result)
|
|
73
|
+
fail(`${label} row ${id} is missing`);
|
|
74
|
+
if (result.get('disabled') === true && !allowDisabled)
|
|
75
|
+
fail(`${label} row ${id} is disabled`);
|
|
76
|
+
return result;
|
|
77
|
+
}
|
|
78
|
+
function config(item, id) { return map(item.get('config', true), `${id} config`); }
|
|
79
|
+
function json(item, label) {
|
|
80
|
+
const value = item.toJSON();
|
|
81
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
82
|
+
fail(`${label} must be an object`);
|
|
83
|
+
return value;
|
|
84
|
+
}
|
|
85
|
+
function nodeJson(node) { return node.toJSON(); }
|
|
86
|
+
function profile(value, label) {
|
|
87
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/u.test(value))
|
|
88
|
+
fail(`invalid ${label}`);
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
function cloneEffectiveConfig(out, effective, id, allowMissing = false, allowDisabled = false) {
|
|
92
|
+
const entry = required(effective.rows, id, 'effective profile', allowDisabled);
|
|
93
|
+
const source = allowMissing && !entry.has('config') ? map(out.document.createNode({}), `${id} config`) : config(entry, id);
|
|
94
|
+
let destination = row(out.rows, id);
|
|
95
|
+
if (!destination) {
|
|
96
|
+
destination = map(out.document.createNode({ id }), `${id} override`);
|
|
97
|
+
out.rows.add(destination);
|
|
98
|
+
}
|
|
99
|
+
if (destination.get('disabled') === true) {
|
|
100
|
+
if (!allowDisabled)
|
|
101
|
+
fail(`profile row ${id} is disabled`);
|
|
102
|
+
destination.set('disabled', false);
|
|
103
|
+
}
|
|
104
|
+
// Preserve YAML tags (notably !!js dshHomePath) by retaining the source node.
|
|
105
|
+
destination.set('config', source);
|
|
106
|
+
return source;
|
|
107
|
+
}
|
|
108
|
+
function replaceNode(document, parent, key, value) { parent.set(key, document.createNode(value)); }
|
|
109
|
+
function upsertById(document, values, value) {
|
|
110
|
+
const index = values.items.findIndex(item => isMap(item) && item.get('id') === value.id);
|
|
111
|
+
if (index < 0)
|
|
112
|
+
values.add(document.createNode(value));
|
|
113
|
+
else
|
|
114
|
+
values.items[index] = document.createNode(value);
|
|
115
|
+
}
|
|
116
|
+
function removePrefixed(values) {
|
|
117
|
+
for (let i = values.items.length - 1; i >= 0; i--) {
|
|
118
|
+
const item = values.items[i];
|
|
119
|
+
if (isMap(item) && typeof item.get('id') === 'string' && item.get('id').startsWith(rsiPrefix))
|
|
120
|
+
values.items.splice(i, 1);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function absolute(value, label) { if (!isAbsolute(value) || resolve(value) !== value)
|
|
124
|
+
fail(`${label} must be canonical absolute`); return value; }
|
|
125
|
+
function same(value, expected, label) { if (!isDeepStrictEqual(value, expected))
|
|
126
|
+
fail(`${label} does not match owner scope`); }
|
|
127
|
+
function validatedCreation(manifest, expectedOwner) {
|
|
128
|
+
const build = manifest.controlPlane.sourceBuild, binding = manifest.linuxBuild;
|
|
129
|
+
if (build && 'backend' in build && build.backend === 'linux-native') {
|
|
130
|
+
const behavior = manifest.pluginCreation?.reviews.runner;
|
|
131
|
+
const keys = ['schemaVersion', 'sourceBuildDigest', ...(behavior ? ['behaviorRuntimeDigest'] : [])];
|
|
132
|
+
if (!binding || Object.keys(binding).sort().join() !== keys.sort().join() || binding.schemaVersion !== 1
|
|
133
|
+
|| binding.sourceBuildDigest !== controlPlaneDigest(build)
|
|
134
|
+
|| behavior && (!('backend' in behavior) || behavior.backend !== 'linux-native'
|
|
135
|
+
|| binding.behaviorRuntimeDigest !== controlPlaneDigest(behavior.runtime)
|
|
136
|
+
|| behavior.runtime.runtime.sourceCommit !== build.runtime.sourceCommit
|
|
137
|
+
|| behavior.runtime.runtime.lockSha256 !== build.runtime.lockSha256
|
|
138
|
+
|| !isDeepStrictEqual(behavior.cgroupRoots, build.cgroupRoots))) {
|
|
139
|
+
fail('Linux source build or creation family differs from its frozen binding');
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
else if (binding !== undefined)
|
|
143
|
+
fail('Linux build binding requires the native repository backend');
|
|
144
|
+
const jobs = manifest.controlPlane.sourceJobs;
|
|
145
|
+
const creation = manifest.pluginCreation === undefined ? undefined
|
|
146
|
+
: validateRsiPluginCreationSetup(manifest.pluginCreation, expectedOwner);
|
|
147
|
+
if (creation) {
|
|
148
|
+
same(jobs?.creation, creation.creation, 'source creation grant');
|
|
149
|
+
same(manifest.controlPlane.creationVerifications, creation.verifications, 'creation verification authority');
|
|
150
|
+
same(manifest.controlPlane.creationCapabilities, creation.capabilities, 'creation adoption grant');
|
|
151
|
+
const growth = normalizeConfig(manifest.growthDriver);
|
|
152
|
+
if (!jobs || jobs.ownerRouteId !== expectedOwner.authorityId || jobs.principalId !== expectedOwner.principalId
|
|
153
|
+
|| jobs.workspace !== expectedOwner.workspace || jobs.preset !== expectedOwner.agentPreset
|
|
154
|
+
|| !growth.enabled || growth.intervalMs !== 0 || !growth.pluginSourceProposals.enabled
|
|
155
|
+
|| growth.pluginSourceProposals.preparationMode !== 'durable'
|
|
156
|
+
|| growth.pluginSourceProposals.repository !== jobs.repository || !growth.pluginSourceProposals.allowCreation
|
|
157
|
+
|| !isDeepStrictEqual(growth.scope, { workspace: expectedOwner.workspace,
|
|
158
|
+
preset: expectedOwner.agentPreset, principalId: expectedOwner.principalId, ownerRouteId: expectedOwner.authorityId })
|
|
159
|
+
|| jobs.expiresAt <= Date.now() || creation.creation.expiresAt > jobs.expiresAt) {
|
|
160
|
+
fail('creation requires enabled Growth and a covering source job grant');
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
else if (jobs?.creation || manifest.controlPlane.creationVerifications
|
|
164
|
+
|| manifest.controlPlane.creationCapabilities || normalizeConfig(manifest.growthDriver).pluginSourceProposals.allowCreation) {
|
|
165
|
+
fail('creation requires a complete independently verified adoption setup');
|
|
166
|
+
}
|
|
167
|
+
return creation;
|
|
168
|
+
}
|
|
169
|
+
function validatedRevision(manifest, expectedOwner, creation) {
|
|
170
|
+
const jobs = manifest.controlPlane.sourceJobs;
|
|
171
|
+
const revision = manifest.pluginRevision === undefined ? undefined
|
|
172
|
+
: validateRsiPluginRevisionSetup(manifest.pluginRevision, expectedOwner);
|
|
173
|
+
const growth = normalizeConfig(manifest.growthDriver);
|
|
174
|
+
if (!revision) {
|
|
175
|
+
if (jobs?.revision || manifest.controlPlane.revisionVerifications || manifest.controlPlane.revisionRegressions
|
|
176
|
+
|| growth.pluginSourceProposals.allowRevision)
|
|
177
|
+
fail('revision requires a complete independent review and regression setup');
|
|
178
|
+
return undefined;
|
|
179
|
+
}
|
|
180
|
+
same(jobs?.revision, revision.revision, 'source revision grant');
|
|
181
|
+
same(manifest.controlPlane.revisionVerifications, revision.verifications, 'revision verification authority');
|
|
182
|
+
same(manifest.controlPlane.revisionRegressions, revision.regressionVerifications, 'revision regression authority');
|
|
183
|
+
if (!creation || !jobs || !growth.pluginSourceProposals.allowRevision || !growth.pluginSourceProposals.allowCreation
|
|
184
|
+
|| revision.revision.expiresAt > jobs.expiresAt || revision.revision.expiresAt !== creation.creation.expiresAt
|
|
185
|
+
|| revision.revision.namePrefix !== creation.creation.namePrefix
|
|
186
|
+
|| !manifest.controlPlane.sourceBuild || !('backend' in manifest.controlPlane.sourceBuild)
|
|
187
|
+
|| manifest.controlPlane.sourceBuild.backend !== 'linux-native'
|
|
188
|
+
|| !('backend' in creation.reviews.runner) || creation.reviews.runner.backend !== 'linux-native'
|
|
189
|
+
|| !('backend' in revision.reviews.runner) || revision.reviews.runner.backend !== 'linux-native'
|
|
190
|
+
|| !isDeepStrictEqual(creation.reviews.runner.runtime, revision.reviews.runner.runtime)
|
|
191
|
+
|| !isDeepStrictEqual(creation.reviews.runner.cgroupRoots, revision.reviews.runner.cgroupRoots)) {
|
|
192
|
+
fail('revision requires the same finite native creation family');
|
|
193
|
+
}
|
|
194
|
+
return revision;
|
|
195
|
+
}
|
|
196
|
+
function assertManifest(input) {
|
|
197
|
+
if (!input || input.schemaVersion !== 1)
|
|
198
|
+
fail('unsupported manifest schema');
|
|
199
|
+
profile(input.targetProfile, 'targetProfile');
|
|
200
|
+
profile(input.coordinatorProfile, 'coordinatorProfile');
|
|
201
|
+
if (input.targetProfile === input.coordinatorProfile)
|
|
202
|
+
fail('target and coordinator profiles must differ');
|
|
203
|
+
const l = input.limits;
|
|
204
|
+
if (!l || !['periodMs', 'reviews', 'discovery', 'source', 'observations', 'coordinator'].every(key => Object.hasOwn(l, key)) || !Number.isSafeInteger(l.periodMs) || l.periodMs < 1_000 || Object.values(l).some(value => !Number.isSafeInteger(value) || value < 1))
|
|
205
|
+
fail('invalid limits');
|
|
206
|
+
if (input.ordinaryUseLearning !== undefined) {
|
|
207
|
+
validateRsiOrdinaryUseLearningSetup(input.ordinaryUseLearning);
|
|
208
|
+
const memory = input.memoryLearning;
|
|
209
|
+
if (!memory || memory.learning.workItemExperiences !== true || memory.reviews.workItemExperiences !== true
|
|
210
|
+
|| memory.adoption.workItemExperiences !== true)
|
|
211
|
+
fail('ordinary-use learning requires the flagged memory learning, review and adoption grants');
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
function assertBudget(document, policy, id, limit, periodMs, scope) {
|
|
215
|
+
const budgets = seq(policy.get('budgets', true), 'assistantPolicy.budgets');
|
|
216
|
+
const match = budgets.items.filter(item => isMap(item) && item.get('id') === id);
|
|
217
|
+
if (match.length > 1)
|
|
218
|
+
fail(`duplicate Policy budget ${id}`);
|
|
219
|
+
const globalConflicts = scope === 'global' ? budgets.items.filter(item => isMap(item) && item.get('metric') === 'automation-runs' && item.get('scope') === 'global' && item.get('periodMs') === periodMs && item.get('id') !== id && item.get('limit') !== limit) : [];
|
|
220
|
+
if (globalConflicts.length)
|
|
221
|
+
fail(`global automation-runs budget conflicts with ${id}`);
|
|
222
|
+
upsertById(document, budgets, { id, metric: 'automation-runs', limit, periodMs, scope });
|
|
223
|
+
}
|
|
224
|
+
function assertNewMemoryBudget(policy, id, limit, periodMs, scope) {
|
|
225
|
+
const budgets = seq(policy.get('budgets', true), 'assistantPolicy.budgets');
|
|
226
|
+
const matches = budgets.items.filter(item => isMap(item) && item.get('id') === id);
|
|
227
|
+
if (matches.length > 1 || matches.length === 1 && !isDeepStrictEqual(matches[0].toJSON(), { id, metric: 'automation-runs', limit, periodMs, scope }))
|
|
228
|
+
fail(`memory Policy budget ${id} conflicts`);
|
|
229
|
+
if (scope === 'workspace' && budgets.items.some(item => isMap(item) && item.get('id') !== id
|
|
230
|
+
&& item.get('metric') === 'automation-runs' && item.get('scope') === 'workspace'
|
|
231
|
+
&& item.get('periodMs') === periodMs)) {
|
|
232
|
+
fail(`memory Policy workspace budget ${id} conflicts with an existing counter pool`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
function targetPolicy(document, personal, manifest, scope, budgetIds, memory, creation) {
|
|
236
|
+
const policy = map(personal.get('assistantPolicy', true), 'assistantPolicy config');
|
|
237
|
+
const automation = map(personal.get('assistantAutomations', true), 'assistantAutomations config');
|
|
238
|
+
if (automation.get('allowUnbudgetedExecution') === true)
|
|
239
|
+
fail('assistantAutomations.allowUnbudgetedExecution must be false');
|
|
240
|
+
automation.set('schedulerEnabled', true);
|
|
241
|
+
assertBudget(document, policy, budgetIds.reviews, manifest.limits.reviews, manifest.limits.periodMs, 'global');
|
|
242
|
+
assertBudget(document, policy, budgetIds.discovery, manifest.limits.discovery, manifest.limits.periodMs, 'subject');
|
|
243
|
+
assertBudget(document, policy, budgetIds.source, manifest.limits.source, manifest.limits.periodMs, 'subject');
|
|
244
|
+
assertBudget(document, policy, budgetIds.observations, manifest.limits.observations, manifest.limits.periodMs, 'subject');
|
|
245
|
+
if (manifest.controlPlane.liveQualification)
|
|
246
|
+
assertBudget(document, policy, manifest.controlPlane.liveQualification.budgetId, manifest.limits.qualification, manifest.limits.periodMs, 'subject');
|
|
247
|
+
if (memory) {
|
|
248
|
+
assertNewMemoryBudget(policy, memory.learning.budgetId, memory.limits.extractions, manifest.limits.periodMs, 'workspace');
|
|
249
|
+
assertNewMemoryBudget(policy, memory.learning.scanBudgetId, memory.limits.scans, manifest.limits.periodMs, 'subject');
|
|
250
|
+
assertBudget(document, policy, memory.learning.budgetId, memory.limits.extractions, manifest.limits.periodMs, 'workspace');
|
|
251
|
+
assertBudget(document, policy, memory.learning.scanBudgetId, memory.limits.scans, manifest.limits.periodMs, 'subject');
|
|
252
|
+
}
|
|
253
|
+
const rules = seq(policy.get('rules', true), 'assistantPolicy.rules');
|
|
254
|
+
removePrefixed(rules);
|
|
255
|
+
const background = (id, subject, action, automationId) => ({ id: `${rsiPrefix}${id}`, effect: 'allow', subject: { kind: 'background', id: subject, workspace: scope.workspace, principal: scope.principal }, actions: [action], resource: { kind: 'automation', id: automationId }, context: { initiators: ['background'] } });
|
|
256
|
+
for (const [name, subject, automation] of [['usage', 'assistant-growth-usage', 'usage-*'], ['source', 'plugin-control-plane-source', 'source-job-*'], ['observation', 'plugin-control-plane-task-observations', 'task-observation-scan-*']]) {
|
|
257
|
+
upsertById(document, rules, background(`${name}-reconcile`, subject, 'reconcile', automation));
|
|
258
|
+
// Automations execute under their generated automation id; reconciliation
|
|
259
|
+
// runs under its stable owner id.
|
|
260
|
+
upsertById(document, rules, background(`${name}-execute`, automation, 'execute', automation));
|
|
261
|
+
}
|
|
262
|
+
if (manifest.controlPlane.liveQualification) {
|
|
263
|
+
upsertById(document, rules, background('qualification-reconcile', 'plugin-control-plane-live-qualification', 'reconcile', 'live-qualification-scan-*'));
|
|
264
|
+
upsertById(document, rules, background('qualification-execute', 'live-qualification-scan-*', 'execute', 'live-qualification-scan-*'));
|
|
265
|
+
}
|
|
266
|
+
if (memory) {
|
|
267
|
+
const subject = { kind: 'background', id: 'assistant-memory-learning', workspace: scope.workspace, principal: scope.principal };
|
|
268
|
+
for (const [action, authorityId] of [['extract', memory.learning.authorityId], ['review', memory.reviews.authorityId], ['adopt', memory.adoption.authorityId]]) {
|
|
269
|
+
upsertById(document, rules, { id: `${rsiPrefix}memory-${action}`, effect: 'allow', subject,
|
|
270
|
+
actions: [action], resource: { kind: 'memory', id: `learning:${authorityId}` }, context: { initiators: ['background'] } });
|
|
271
|
+
}
|
|
272
|
+
for (const [kind, automationId] of [['scan', 'memory-scan-*'], ['job', 'memory-learning:*']]) {
|
|
273
|
+
upsertById(document, rules, background(`memory-${kind}-reconcile`, 'assistant-memory-learning', 'reconcile', automationId));
|
|
274
|
+
upsertById(document, rules, background(`memory-${kind}-execute`, automationId, 'execute', automationId));
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
const agent = { kind: 'agent', id: scope.preset, workspace: scope.workspace, principal: scope.principal };
|
|
278
|
+
for (const tool of ['growth_*', 'plugin_source_*'])
|
|
279
|
+
upsertById(document, rules, { id: `${rsiPrefix}${tool}`, effect: 'allow', subject: agent, actions: ['execute'], resource: { kind: 'tool', id: tool }, context: { initiators: ['background'] } });
|
|
280
|
+
if (creation)
|
|
281
|
+
upsertById(document, rules, { id: `${rsiPrefix}created-tools`, effect: 'allow', subject: agent,
|
|
282
|
+
actions: ['execute'], resource: { kind: 'tool', id: `evolved_${creation.creation.namePrefix.replaceAll('-', '_')}*` },
|
|
283
|
+
context: { initiators: ['external'] } });
|
|
284
|
+
upsertById(document, rules, { id: `${rsiPrefix}verified-workflows`, effect: 'allow', subject: agent, actions: ['draft'], resource: { kind: 'evolution', id: 'verified-workflows' }, context: { initiators: ['background'] } });
|
|
285
|
+
}
|
|
286
|
+
function configurePersonal(document, personal, manifest, scope, budgetIds, memory, creation, upgradeExistingOwner = false) {
|
|
287
|
+
if (memory) {
|
|
288
|
+
const personalMemory = map(personal.get('personalMemory', true), 'personalMemory config');
|
|
289
|
+
const existing = personalMemory.get('automaticLearning', true);
|
|
290
|
+
if (existing !== undefined) {
|
|
291
|
+
const parsed = nodeJson(existing);
|
|
292
|
+
const sameOwnerGrant = parsed !== null && typeof parsed === 'object'
|
|
293
|
+
&& parsed.authorityId === memory.adoption.authorityId
|
|
294
|
+
&& isDeepStrictEqual(parsed.owner, memory.adoption.owner);
|
|
295
|
+
if (upgradeExistingOwner ? !sameOwnerGrant : !isDeepStrictEqual(parsed, memory.adoption)) {
|
|
296
|
+
fail('existing memory adoption grant differs from the frozen owner grant');
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
replaceNode(document, personalMemory, 'automaticLearning', memory.adoption);
|
|
300
|
+
}
|
|
301
|
+
targetPolicy(document, personal, manifest, scope, budgetIds, memory, creation);
|
|
302
|
+
}
|
|
303
|
+
/** Match the target compiler's exact embedded Personal Assistant options for Host attestation. */
|
|
304
|
+
export function compileRsiPersonalAssistantOptions(input) {
|
|
305
|
+
const document = parseDocument(JSON.stringify(input.effectiveConfig), { uniqueKeys: true });
|
|
306
|
+
const personal = map(document.contents ?? undefined, 'personal assistant options');
|
|
307
|
+
const memory = input.manifest.memoryLearning === undefined ? undefined
|
|
308
|
+
: validateRsiMemoryLearningSetup(input.manifest.memoryLearning, input.manifest.sourceReviews.owner);
|
|
309
|
+
const creation = validatedCreation(input.manifest, input.manifest.sourceReviews.owner);
|
|
310
|
+
validatedRevision(input.manifest, input.manifest.sourceReviews.owner, creation);
|
|
311
|
+
if (creation)
|
|
312
|
+
same(input.scope, { workspace: creation.capabilities.owner.workspace,
|
|
313
|
+
preset: creation.capabilities.owner.agentPreset, principal: creation.capabilities.owner.principalId }, 'creation Policy scope');
|
|
314
|
+
configurePersonal(document, personal, input.manifest, input.scope, input.budgetIds, memory, creation, input.upgradeExistingOwner === true);
|
|
315
|
+
return json(personal, 'personal assistant options');
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Read-only profile compiler. The caller owns private manifest I/O, lifecycle locks,
|
|
319
|
+
* atomic writes and post-write DSH composition checks.
|
|
320
|
+
*/
|
|
321
|
+
export async function compileRsiProfiles(input) {
|
|
322
|
+
assertManifest(input.manifest);
|
|
323
|
+
absolute(input.dshHome, 'dshHome');
|
|
324
|
+
const upgrading = input.upgradeExistingOwner === true;
|
|
325
|
+
const target = parse(input.targetPatch, 'target patch'), effective = parse(input.targetEffective, 'target effective config');
|
|
326
|
+
const coordinator = parse(input.coordinatorPatch, 'coordinator patch'), coordinatorEffective = parse(input.coordinatorEffective, 'coordinator effective config');
|
|
327
|
+
for (const id of targetBundles)
|
|
328
|
+
required(effective.rows, id, 'target effective profile', upgrading && SELF_ITERATION_MANAGED_ROW_IDS.has(id));
|
|
329
|
+
const standaloneAutomations = row(effective.rows, 'dsh-ray-assistant-automations');
|
|
330
|
+
if (standaloneAutomations && standaloneAutomations.get('disabled') !== true)
|
|
331
|
+
fail('ambiguous standalone and embedded Automations providers');
|
|
332
|
+
const jobs = input.manifest.controlPlane.sourceJobs;
|
|
333
|
+
if (!jobs || jobs.expiresAt <= Date.now())
|
|
334
|
+
fail('sourceJobs must be present and unexpired');
|
|
335
|
+
const delivery = config(required(effective.rows, 'dsh-ray-assistant-delivery'), 'assistant-delivery');
|
|
336
|
+
const owner = resolveRsiOwnerRoute(json(delivery, 'assistant-delivery config'), input.owner, input.dshHome, jobs.ownerRouteId);
|
|
337
|
+
if (jobs.ownerRouteId !== owner.route.id || jobs.principalId !== owner.principal || jobs.workspace !== owner.workspace || jobs.preset !== owner.preset)
|
|
338
|
+
fail('sourceJobs does not match effective owner route');
|
|
339
|
+
const growth = normalizeConfig(input.manifest.growthDriver);
|
|
340
|
+
if (!growth.enabled || growth.intervalMs !== 0 || !growth.usageLearning.enabled || !growth.pluginSourceProposals.enabled || growth.pluginSourceProposals.preparationMode !== 'durable' || growth.pluginSourceProposals.repository !== jobs.repository || !growth.scope || !isDeepStrictEqual(growth.scope, { workspace: owner.workspace, preset: owner.preset, principalId: owner.principal, ownerRouteId: owner.route.id }))
|
|
341
|
+
fail('growthDriver must be owner-scoped durable ordinary-use configuration');
|
|
342
|
+
// The review source is the Delivery owner receipt. Its authorityId is the
|
|
343
|
+
// owner route, while sourceJobs.authorityId names a separate finite job grant.
|
|
344
|
+
const expectedOwner = { authorityId: owner.route.id, authorityHash: owner.route.authorityHash, principalId: owner.principal, principalRecordId: input.owner.owner.id, principalVersion: input.owner.owner.version, workspace: owner.workspace, agentPreset: owner.preset };
|
|
345
|
+
if (!isDeepStrictEqual(input.manifest.sourceReviews.owner, expectedOwner))
|
|
346
|
+
fail('sourceReviews.owner does not match current owner');
|
|
347
|
+
validateSourceReviewConfig(input.manifest.sourceReviews);
|
|
348
|
+
const memory = input.manifest.memoryLearning === undefined ? undefined
|
|
349
|
+
: validateRsiMemoryLearningSetup(input.manifest.memoryLearning, expectedOwner);
|
|
350
|
+
const ordinary = input.manifest.ordinaryUseLearning === undefined ? undefined
|
|
351
|
+
: validateRsiOrdinaryUseLearningSetup(input.manifest.ordinaryUseLearning);
|
|
352
|
+
const creation = validatedCreation(input.manifest, expectedOwner);
|
|
353
|
+
const revision = validatedRevision(input.manifest, expectedOwner, creation);
|
|
354
|
+
const cp = structuredClone(input.manifest.controlPlane);
|
|
355
|
+
if (!cp.sourceBuild || !cp.sourceApprovals || !cp.sourceReleases || !cp.sourceReleaseExecution || !cp.sourceAdoptions || !cp.runtimeObserver || !cp.foregroundDeployments || !cp.taskObservations)
|
|
356
|
+
fail('target controlPlane lacks a complete source adoption chain');
|
|
357
|
+
if (cp.adoptionCoordinator)
|
|
358
|
+
fail('target controlPlane must not contain adoptionCoordinator');
|
|
359
|
+
if (cp.sourceBuild.versioning !== 'patch')
|
|
360
|
+
fail('sourceBuild requires Host patch versioning');
|
|
361
|
+
if (cp.sourceReleaseExecution.independentReview !== true)
|
|
362
|
+
fail('sourceReleaseExecution requires independentReview');
|
|
363
|
+
if (cp.sourceReleaseExecution.reviewDecisionRoot !== input.manifest.sourceReviews.decisionRoot)
|
|
364
|
+
fail('sourceReviews decisionRoot must equal sourceReleaseExecution reviewDecisionRoot');
|
|
365
|
+
if (cp.sourceAdoptions.profile !== input.manifest.targetProfile || cp.runtimeObserver.profilePath !== join(input.dshHome, 'profiles', input.manifest.targetProfile) || cp.taskObservations.profilePath !== cp.runtimeObserver.profilePath)
|
|
366
|
+
fail('controlPlane profile observation scope differs from target');
|
|
367
|
+
if (!isDeepStrictEqual(cp.taskObservations.scope, { ownerRouteId: owner.route.id, principalId: owner.principal, workspace: owner.workspace, preset: owner.preset }))
|
|
368
|
+
fail('task observation scope differs from source jobs');
|
|
369
|
+
normalizeControlPlaneConfig(cp);
|
|
370
|
+
const budgetIds = { reviews: growth.budgetId, discovery: growth.usageLearning.scanBudgetId, source: jobs.budgetId, observations: cp.taskObservations.budgetId };
|
|
371
|
+
if (Object.values(budgetIds).some((value) => value === null) || new Set(Object.values(budgetIds)).size !== 4 || new Set([...Object.values(budgetIds), input.manifest.coordinator.budgetId]).size !== 5)
|
|
372
|
+
fail('five RSI automation budget ids must be present and distinct');
|
|
373
|
+
if (cp.liveQualification) {
|
|
374
|
+
same(cp.liveQualification.scope, cp.taskObservations.scope, 'live qualification');
|
|
375
|
+
if (!Number.isSafeInteger(input.manifest.limits.qualification) || input.manifest.limits.qualification < 1
|
|
376
|
+
|| [...Object.values(budgetIds), input.manifest.coordinator.budgetId].includes(cp.liveQualification.budgetId))
|
|
377
|
+
fail('live qualification requires a distinct finite budget');
|
|
378
|
+
}
|
|
379
|
+
if (memory) {
|
|
380
|
+
const existing = [...Object.values(budgetIds), input.manifest.coordinator.budgetId,
|
|
381
|
+
...(cp.liveQualification ? [cp.liveQualification.budgetId] : [])];
|
|
382
|
+
if (memory.learning.budgetId === memory.learning.scanBudgetId
|
|
383
|
+
|| existing.includes(memory.learning.budgetId) || existing.includes(memory.learning.scanBudgetId))
|
|
384
|
+
fail('memory automation budget ids conflict with RSI');
|
|
385
|
+
const learnerRows = effective.rows.items.filter(item => isMap(item) && item.get('id') === 'dsh-ray-assistant-memory-learning');
|
|
386
|
+
if (learnerRows.length !== 1)
|
|
387
|
+
fail('memory learner row is missing or duplicate');
|
|
388
|
+
const learner = learnerRows[0];
|
|
389
|
+
const currentLearnerConfig = learner.get('config', true);
|
|
390
|
+
const learnerJson = isMap(currentLearnerConfig) ? currentLearnerConfig.toJSON() : undefined;
|
|
391
|
+
const sameOwnerLearner = isMap(currentLearnerConfig) && learnerJson !== undefined
|
|
392
|
+
&& learnerJson.authorityId === memory.learning.authorityId
|
|
393
|
+
&& isDeepStrictEqual(learnerJson.owner, memory.learning.owner);
|
|
394
|
+
if (learner.get('name') !== '@dsh-ray/assistant-memory-learning'
|
|
395
|
+
|| !((learner.get('disabled') === true || learner.get('disabled') === undefined) && !learner.has('config')
|
|
396
|
+
|| (upgrading
|
|
397
|
+
? (learner.get('disabled') === false || learner.get('disabled') === undefined || learner.get('disabled') === true) && sameOwnerLearner
|
|
398
|
+
: (learner.get('disabled') === false || learner.get('disabled') === undefined) && isMap(currentLearnerConfig) && isDeepStrictEqual(learnerJson, memory.learning)))) {
|
|
399
|
+
fail('memory learner must be the inactive installed bundle or exact current learning configuration');
|
|
400
|
+
}
|
|
401
|
+
const standalone = row(effective.rows, 'dsh-ray-personal-memory');
|
|
402
|
+
if (standalone && standalone.get('disabled') !== true)
|
|
403
|
+
fail('ambiguous standalone and embedded Memory providers');
|
|
404
|
+
}
|
|
405
|
+
if (owner.created) {
|
|
406
|
+
const deliveryOverride = cloneEffectiveConfig(target, effective, 'dsh-ray-assistant-delivery');
|
|
407
|
+
seq(deliveryOverride.get('ownerRoutes', true), 'Delivery ownerRoutes').add(target.document.createNode(owner.authority));
|
|
408
|
+
}
|
|
409
|
+
const personal = cloneEffectiveConfig(target, effective, 'dsh-ray-personal-assistant');
|
|
410
|
+
configurePersonal(target.document, personal, input.manifest, owner, budgetIds, memory, creation, input.upgradeExistingOwner === true);
|
|
411
|
+
const verifier = cloneEffectiveConfig(target, effective, 'dsh-ray-assistant-verifier');
|
|
412
|
+
// Keep all existing verifier settings, replacing only the finite review grant.
|
|
413
|
+
// Empty/absent static profiles must not deadlock ordinary Feishu chat on requireAcceptance.
|
|
414
|
+
const verifierProfiles = verifier.get('profiles', true);
|
|
415
|
+
const parsedVerifierProfiles = verifierProfiles === undefined ? undefined : nodeJson(verifierProfiles);
|
|
416
|
+
if (!Array.isArray(parsedVerifierProfiles) || parsedVerifierProfiles.length === 0) {
|
|
417
|
+
replaceNode(target.document, verifier, 'requireAcceptance', false);
|
|
418
|
+
}
|
|
419
|
+
replaceNode(target.document, verifier, 'sourceReviews', input.manifest.sourceReviews);
|
|
420
|
+
if (memory) {
|
|
421
|
+
const existing = verifier.get('memoryReviews', true);
|
|
422
|
+
if (existing !== undefined) {
|
|
423
|
+
const parsed = nodeJson(existing);
|
|
424
|
+
const sameOwnerGrant = parsed !== null && typeof parsed === 'object'
|
|
425
|
+
&& parsed.authorityId === memory.reviews.authorityId
|
|
426
|
+
&& isDeepStrictEqual(parsed.owner, memory.reviews.owner);
|
|
427
|
+
if (input.upgradeExistingOwner === true ? !sameOwnerGrant : !isDeepStrictEqual(parsed, memory.reviews)) {
|
|
428
|
+
fail('existing memory review grant differs from the frozen owner grant');
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
replaceNode(target.document, verifier, 'memoryReviews', memory.reviews);
|
|
432
|
+
}
|
|
433
|
+
if (creation)
|
|
434
|
+
replaceNode(target.document, verifier, 'creationReviews', creation.reviews);
|
|
435
|
+
if (revision) {
|
|
436
|
+
replaceNode(target.document, verifier, 'revisionReviews', revision.reviews);
|
|
437
|
+
replaceNode(target.document, verifier, 'revisionRegressions', revision.regressions);
|
|
438
|
+
}
|
|
439
|
+
if (memory) {
|
|
440
|
+
let learner = row(target.rows, 'dsh-ray-assistant-memory-learning');
|
|
441
|
+
if (!learner) {
|
|
442
|
+
learner = map(target.document.createNode({ id: 'dsh-ray-assistant-memory-learning' }), 'memory learner override');
|
|
443
|
+
target.rows.add(learner);
|
|
444
|
+
}
|
|
445
|
+
if (Object.keys(json(learner, 'memory learner override')).some(key => !['id', 'name', 'disabled', 'config'].includes(key)))
|
|
446
|
+
fail('memory learner override has unsupported fields');
|
|
447
|
+
if (learner.has('name') && learner.get('name') !== '@dsh-ray/assistant-memory-learning')
|
|
448
|
+
fail('memory learner override package differs');
|
|
449
|
+
learner.set('name', '@dsh-ray/assistant-memory-learning');
|
|
450
|
+
learner.set('disabled', false);
|
|
451
|
+
replaceNode(target.document, learner, 'config', memory.learning);
|
|
452
|
+
}
|
|
453
|
+
if (ordinary) {
|
|
454
|
+
const proactiveEntry = required(effective.rows, 'dsh-ray-assistant-proactive', 'target effective profile', upgrading);
|
|
455
|
+
if (proactiveEntry.get('name') !== '@dsh-ray/assistant-proactive')
|
|
456
|
+
fail('assistant-proactive row has a different package');
|
|
457
|
+
const proactive = cloneEffectiveConfig(target, effective, 'dsh-ray-assistant-proactive', true, upgrading);
|
|
458
|
+
if (upgrading && proactive.get('enabled') === false)
|
|
459
|
+
proactive.set('enabled', true);
|
|
460
|
+
const currentEvaluation = proactive.get('intakeEvaluation', true);
|
|
461
|
+
if (!upgrading && currentEvaluation !== undefined && !isDeepStrictEqual(nodeJson(currentEvaluation), ordinary.intakeEvaluation)) {
|
|
462
|
+
fail('existing assistant-proactive intake evaluation differs from the frozen fresh-install setup');
|
|
463
|
+
}
|
|
464
|
+
replaceNode(target.document, proactive, 'intakeEvaluation', ordinary.intakeEvaluation);
|
|
465
|
+
const workItemsEntry = required(effective.rows, 'dsh-ray-assistant-work-items', 'target effective profile', upgrading);
|
|
466
|
+
if (workItemsEntry.get('name') !== '@dsh-ray/assistant-work-items')
|
|
467
|
+
fail('assistant-work-items row has a different package');
|
|
468
|
+
const workItems = cloneEffectiveConfig(target, effective, 'dsh-ray-assistant-work-items', true, upgrading);
|
|
469
|
+
if (upgrading && workItems.get('enabled') === false)
|
|
470
|
+
workItems.set('enabled', true);
|
|
471
|
+
if (workItems.get('enabled') !== true)
|
|
472
|
+
fail('ordinary-use learning requires assistant-work-items.enabled: true');
|
|
473
|
+
const ledgerNode = workItems.get('intakeLedger', true);
|
|
474
|
+
const ledger = ledgerNode === undefined ? map(target.document.createNode({}), 'assistant-work-items intakeLedger') : map(ledgerNode, 'assistant-work-items intakeLedger');
|
|
475
|
+
if (ledgerNode === undefined)
|
|
476
|
+
workItems.set('intakeLedger', ledger);
|
|
477
|
+
if (ledger.get('enabled') !== true)
|
|
478
|
+
fail('ordinary-use learning requires assistant-work-items.intakeLedger.enabled: true');
|
|
479
|
+
const evaluationNode = ledger.get('evaluation', true);
|
|
480
|
+
const evaluation = evaluationNode === undefined
|
|
481
|
+
? map(target.document.createNode({}), 'assistant-work-items intake evaluation')
|
|
482
|
+
: map(evaluationNode, 'assistant-work-items intake evaluation');
|
|
483
|
+
if (evaluationNode === undefined)
|
|
484
|
+
ledger.set('evaluation', evaluation);
|
|
485
|
+
if (evaluation.get('enabled') !== undefined && evaluation.get('enabled') !== true) {
|
|
486
|
+
fail('existing assistant-work-items intake evaluation is disabled; a retry cannot silently re-enable it');
|
|
487
|
+
}
|
|
488
|
+
evaluation.set('enabled', true);
|
|
489
|
+
}
|
|
490
|
+
cloneEffectiveConfig(target, effective, 'dsh-ray-assistant-growth-driver', true, upgrading);
|
|
491
|
+
replaceNode(target.document, required(target.rows, 'dsh-ray-assistant-growth-driver'), 'config', input.manifest.growthDriver);
|
|
492
|
+
cloneEffectiveConfig(target, effective, 'dsh-ray-plugin-control-plane');
|
|
493
|
+
// Native review authorities share immutable runtime descriptors in memory.
|
|
494
|
+
// Emit independent YAML values so a subsequent raw Loader digest has no aliases.
|
|
495
|
+
const nativeCp = 'backend' in cp.sourceBuild && cp.sourceBuild.backend === 'linux-native';
|
|
496
|
+
required(target.rows, 'dsh-ray-plugin-control-plane').set('config', target.document.createNode(cp, { aliasDuplicateObjects: !nativeCp }));
|
|
497
|
+
// Coordinator is intentionally sparse. Base rows must match the installed
|
|
498
|
+
// base patch exactly, while enhanced rows are an explicit three-bundle set.
|
|
499
|
+
const allowedBase = baseRows(input.coordinatorBase);
|
|
500
|
+
const seenCoordinatorRows = new Set();
|
|
501
|
+
for (const item of coordinatorEffective.rows.items) {
|
|
502
|
+
if (!isMap(item))
|
|
503
|
+
fail('coordinator effective config contains non-mapping row');
|
|
504
|
+
const id = item.get('id'), name = item.get('name');
|
|
505
|
+
if (typeof id !== 'string' || typeof name !== 'string' || seenCoordinatorRows.has(id))
|
|
506
|
+
fail('coordinator effective config has invalid or duplicate row');
|
|
507
|
+
seenCoordinatorRows.add(id);
|
|
508
|
+
const expected = coordinatorBundleNames.get(id) ?? allowedBase.get(id);
|
|
509
|
+
if (expected !== name)
|
|
510
|
+
fail(`coordinator contains forbidden row ${id}`);
|
|
511
|
+
const configured = item.get('config', true);
|
|
512
|
+
if (id === 'agent-loop') {
|
|
513
|
+
const agents = map(configured, 'agent-loop config').get('agents', true);
|
|
514
|
+
if (!isSeq(agents) || agents.items.length !== 0)
|
|
515
|
+
fail('coordinator base agent-loop.agents must be empty');
|
|
516
|
+
}
|
|
517
|
+
const nestedPlugins = isMap(configured) ? configured.get('plugins', true) : undefined;
|
|
518
|
+
if (isSeq(nestedPlugins) && nestedPlugins.items.length !== 0)
|
|
519
|
+
fail(`coordinator base row ${id} has nested plugin mounts`);
|
|
520
|
+
}
|
|
521
|
+
for (const id of coordinatorBundles)
|
|
522
|
+
required(coordinatorEffective.rows, id, 'coordinator effective profile');
|
|
523
|
+
const root = join(input.dshHome, 'rsi-coordinators', input.manifest.coordinatorProfile);
|
|
524
|
+
const targetCp = cp;
|
|
525
|
+
const targetAdoptions = targetCp.sourceAdoptions;
|
|
526
|
+
if (!targetAdoptions)
|
|
527
|
+
fail('target sourceAdoptions is required');
|
|
528
|
+
const coordinatorCp = { catalogPath: targetCp.catalogPath, trustPath: targetCp.trustPath, statePath: root,
|
|
529
|
+
adoptionCoordinator: { coordinatorId: targetAdoptions.handoff?.coordinatorId ?? fail('sourceAdoptions.handoff coordinatorId is required'), scope: { workspace: owner.workspace, preset: owner.preset, principalId: owner.principal, ownerRouteId: owner.route.id }, timeoutMs: input.manifest.coordinator.timeoutMs, budgetId: input.manifest.coordinator.budgetId, budgetAmount: input.manifest.coordinator.budgetAmount } };
|
|
530
|
+
normalizeControlPlaneConfig(coordinatorCp);
|
|
531
|
+
const policy = cloneEffectiveConfig(coordinator, coordinatorEffective, 'dsh-ray-assistant-policy');
|
|
532
|
+
replaceNode(coordinator.document, policy, 'databasePath', join(root, 'policy.sqlite'));
|
|
533
|
+
const budgets = seq(policy.get('budgets', true), 'coordinator policy budgets');
|
|
534
|
+
upsertById(coordinator.document, budgets, { id: input.manifest.coordinator.budgetId, metric: 'automation-runs', limit: input.manifest.limits.coordinator, periodMs: input.manifest.limits.periodMs, scope: 'subject' });
|
|
535
|
+
const rules = seq(policy.get('rules', true), 'coordinator policy rules');
|
|
536
|
+
removePrefixed(rules);
|
|
537
|
+
const coordinatorSubject = { kind: 'background', id: 'plugin-control-plane-adoption-coordinator', workspace: owner.workspace, principal: owner.principal };
|
|
538
|
+
const coordinatorAutomationSubject = { ...coordinatorSubject, id: 'adoption-coordinator-*' };
|
|
539
|
+
upsertById(coordinator.document, rules, { id: `${rsiPrefix}coordinator-reconcile`, effect: 'allow', subject: coordinatorSubject, actions: ['reconcile'], resource: { kind: 'automation', id: 'adoption-coordinator-*' }, context: { initiators: ['background'] } });
|
|
540
|
+
upsertById(coordinator.document, rules, { id: `${rsiPrefix}coordinator-execute`, effect: 'allow', subject: coordinatorAutomationSubject, actions: ['execute'], resource: { kind: 'automation', id: 'adoption-coordinator-*' }, context: { initiators: ['background'] } });
|
|
541
|
+
const automationConfig = cloneEffectiveConfig(coordinator, coordinatorEffective, 'dsh-ray-assistant-automations');
|
|
542
|
+
if (automationConfig.get('allowUnbudgetedExecution') === true)
|
|
543
|
+
fail('coordinator allowUnbudgetedExecution must be false');
|
|
544
|
+
automationConfig.set('schedulerEnabled', true);
|
|
545
|
+
replaceNode(coordinator.document, automationConfig, 'databasePath', rsiCoordinatorAutomationDatabasePath(input.dshHome, input.manifest.coordinatorProfile));
|
|
546
|
+
replaceNode(coordinator.document, automationConfig, 'runsPath', join(root, 'runs'));
|
|
547
|
+
cloneEffectiveConfig(coordinator, coordinatorEffective, 'dsh-ray-plugin-control-plane');
|
|
548
|
+
replaceNode(coordinator.document, required(coordinator.rows, 'dsh-ray-plugin-control-plane'), 'config', coordinatorCp);
|
|
549
|
+
return { targetPatch: target.document.toString({ lineWidth: 0 }), coordinatorPatch: coordinator.document.toString({ lineWidth: 0 }) };
|
|
550
|
+
}
|
|
551
|
+
//# sourceMappingURL=rsi-profile.js.map
|