@jskit-ai/jskit-cli 0.2.85 → 0.2.86

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/jskit-cli",
3
- "version": "0.2.85",
3
+ "version": "0.2.86",
4
4
  "description": "Bundle and package orchestration CLI for JSKIT apps.",
5
5
  "type": "module",
6
6
  "files": [
@@ -20,9 +20,9 @@
20
20
  "test": "node --test"
21
21
  },
22
22
  "dependencies": {
23
- "@jskit-ai/jskit-catalog": "0.1.84",
24
- "@jskit-ai/kernel": "0.1.76",
25
- "@jskit-ai/shell-web": "0.1.75",
23
+ "@jskit-ai/jskit-catalog": "0.1.85",
24
+ "@jskit-ai/kernel": "0.1.77",
25
+ "@jskit-ai/shell-web": "0.1.76",
26
26
  "@vue/compiler-sfc": "^3.5.29",
27
27
  "ts-morph": "^28.0.0"
28
28
  },
@@ -480,6 +480,20 @@ async function runSessionFinalizationGuard(paths, preconditions = []) {
480
480
  });
481
481
  }
482
482
 
483
+ async function runSessionProvisioningHook(paths, {
484
+ preferredPackageManager = "",
485
+ preconditions = []
486
+ } = {}) {
487
+ return runOptionalSessionPackageScript(paths, {
488
+ failureCode: "session_provision_failed",
489
+ failureMessage: `${SESSION_PROVISION_PACKAGE_SCRIPT} failed in the session worktree.`,
490
+ kind: "session_provision",
491
+ preferredPackageManager,
492
+ preconditions,
493
+ scriptName: SESSION_PROVISION_PACKAGE_SCRIPT
494
+ });
495
+ }
496
+
483
497
  async function readIssueMetadata(paths) {
484
498
  const source = await readTextIfExists(path.join(paths.sessionRoot, "issue_metadata.json"));
485
499
  if (!source) {
@@ -945,13 +959,9 @@ async function installDependencies(paths, _options = {}, context = {}) {
945
959
  preconditions
946
960
  });
947
961
  }
948
- const provisionResult = await runOptionalSessionPackageScript(paths, {
949
- failureCode: "session_provision_failed",
950
- failureMessage: `${SESSION_PROVISION_PACKAGE_SCRIPT} failed in the session worktree.`,
951
- kind: "session_provision",
962
+ const provisionResult = await runSessionProvisioningHook(paths, {
952
963
  preferredPackageManager: command,
953
- preconditions,
954
- scriptName: SESSION_PROVISION_PACKAGE_SCRIPT
964
+ preconditions
955
965
  });
956
966
  if (!provisionResult.ok) {
957
967
  return provisionResult.response;
@@ -969,6 +979,7 @@ async function adoptDependenciesInstalled({
969
979
  message = ""
970
980
  } = {}) {
971
981
  return withExistingSession({ targetRoot, sessionId }, async (paths, context = {}) => {
982
+ const preconditions = context.preconditions || [];
972
983
  const artifacts = await readSessionArtifacts(paths);
973
984
  if (artifacts.nextStep !== "dependencies_installed") {
974
985
  return buildSessionResponse(paths, {
@@ -979,12 +990,21 @@ async function adoptDependenciesInstalled({
979
990
  message: `Cannot record dependencies for ${paths.sessionId}; current step is ${artifacts.nextStep || "complete"}.`
980
991
  })
981
992
  ],
982
- preconditions: context.preconditions || []
993
+ preconditions
983
994
  });
984
995
  }
996
+ const provisionResult = await runSessionProvisioningHook(paths, {
997
+ preconditions
998
+ });
999
+ if (!provisionResult.ok) {
1000
+ return provisionResult.response;
1001
+ }
1002
+ const receiptMessage = provisionResult.ran
1003
+ ? `${normalizeText(message) || "Installed Node dependencies in the session worktree."}\n${SESSION_PROVISION_PACKAGE_SCRIPT} completed.`
1004
+ : message;
985
1005
  return recordDependenciesInstalled(paths, {
986
- message,
987
- preconditions: context.preconditions || []
1006
+ message: receiptMessage,
1007
+ preconditions
988
1008
  });
989
1009
  });
990
1010
  }