@spotpatch/dev-server 0.10.1 → 0.11.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/dist/index.cjs +10 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -4
- package/dist/index.d.ts +12 -4
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2685,7 +2685,9 @@ function confidence(value) {
|
|
|
2685
2685
|
async function authorizeSeeds(selection, registry, root, realRoot) {
|
|
2686
2686
|
const byPath = /* @__PURE__ */ new Map();
|
|
2687
2687
|
for (const target of selection.targets) {
|
|
2688
|
-
|
|
2688
|
+
const location = target.react.source?.fileId === void 0 ? target.source : target.react.source;
|
|
2689
|
+
let fileId = location.fileId;
|
|
2690
|
+
let claimedRelative = location.relativePath;
|
|
2689
2691
|
let sourceVersion;
|
|
2690
2692
|
if (target.react.componentSourceId !== void 0) {
|
|
2691
2693
|
const anchor = registry.resolveDataFlowComponent(target.react.componentSourceId);
|
|
@@ -2693,6 +2695,7 @@ async function authorizeSeeds(selection, registry, root, realRoot) {
|
|
|
2693
2695
|
deny("ASK_SELECTION_STALE");
|
|
2694
2696
|
}
|
|
2695
2697
|
fileId = anchor.fileId;
|
|
2698
|
+
claimedRelative = void 0;
|
|
2696
2699
|
sourceVersion = anchor.sourceVersion;
|
|
2697
2700
|
}
|
|
2698
2701
|
if (fileId === void 0) continue;
|
|
@@ -2702,7 +2705,6 @@ async function authorizeSeeds(selection, registry, root, realRoot) {
|
|
|
2702
2705
|
if (canonical === void 0) deny("ASK_SELECTION_STALE");
|
|
2703
2706
|
const absolutePath = import_node_path5.default.normalize(canonical);
|
|
2704
2707
|
const registeredRelative = toPosixRelative(realRoot, absolutePath);
|
|
2705
|
-
const claimedRelative = target.react.source?.relativePath ?? target.source.relativePath;
|
|
2706
2708
|
if (claimedRelative !== void 0 && claimedRelative.split("\\").join("/") !== registeredRelative) {
|
|
2707
2709
|
deny("ASK_SELECTION_STALE");
|
|
2708
2710
|
}
|
|
@@ -3620,8 +3622,10 @@ function createConfiguredKeyAskExecutors(options) {
|
|
|
3620
3622
|
|
|
3621
3623
|
// src/contextual-ask/executors.ts
|
|
3622
3624
|
function composeContextualAskExecutors(options) {
|
|
3625
|
+
const { codex, claudeCode } = options.managed;
|
|
3626
|
+
const preference = options.defaultExecutor?.kind;
|
|
3623
3627
|
return Object.freeze(
|
|
3624
|
-
|
|
3628
|
+
preference === "managed-codex" ? [codex, claudeCode, ...options.configuredKey] : preference === "claude-code" ? [claudeCode, codex, ...options.configuredKey] : [...options.configuredKey, codex, claudeCode]
|
|
3625
3629
|
);
|
|
3626
3630
|
}
|
|
3627
3631
|
|
|
@@ -5815,9 +5819,9 @@ function parseContextualAsk(value) {
|
|
|
5815
5819
|
throw new TypeError("The SpotPatch contextual Ask transport is invalid.");
|
|
5816
5820
|
}
|
|
5817
5821
|
const preference = value.defaultExecutor;
|
|
5818
|
-
if (preference.kind === "managed-codex" && hasExactKeys(preference, ["kind"])) {
|
|
5822
|
+
if ((preference.kind === "managed-codex" || preference.kind === "claude-code") && hasExactKeys(preference, ["kind"])) {
|
|
5819
5823
|
return Object.freeze({
|
|
5820
|
-
defaultExecutor: Object.freeze({ kind:
|
|
5824
|
+
defaultExecutor: Object.freeze({ kind: preference.kind })
|
|
5821
5825
|
});
|
|
5822
5826
|
}
|
|
5823
5827
|
if (preference.kind === "configured-key" && hasExactKeys(preference, ["kind", "modelProfileId", "providerProfileId"]) && typeof preference.providerProfileId === "string" && typeof preference.modelProfileId === "string") {
|
|
@@ -5909,7 +5913,7 @@ async function createDevelopmentSession(input) {
|
|
|
5909
5913
|
environment: input.environment,
|
|
5910
5914
|
...preference
|
|
5911
5915
|
}),
|
|
5912
|
-
|
|
5916
|
+
managed: input.createManagedAskExecutors(),
|
|
5913
5917
|
...preference
|
|
5914
5918
|
})
|
|
5915
5919
|
});
|