@workpowers/speckle 0.5.0 → 0.6.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/headers.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  */
14
14
  import type { ResolvedWorkspace } from "./workspace.js";
15
15
  export declare const ROUTER_CLIENT_NAME = "@workpowers/speckle";
16
- export declare const ROUTER_CLIENT_VERSION = "0.5.0";
16
+ export declare const ROUTER_CLIENT_VERSION = "0.6.0";
17
17
  export interface RouterRequestHeaders {
18
18
  Authorization: string;
19
19
  "X-Speckle-Client": string;
package/dist/headers.js CHANGED
@@ -12,7 +12,7 @@
12
12
  * the server then exposes a project-agnostic discovery toolset.
13
13
  */
14
14
  export const ROUTER_CLIENT_NAME = "@workpowers/speckle";
15
- export const ROUTER_CLIENT_VERSION = "0.5.0";
15
+ export const ROUTER_CLIENT_VERSION = "0.6.0";
16
16
  export function buildRouterHeaders(args) {
17
17
  const { apiKey, workspace, fallbackProjectId } = args;
18
18
  const headers = {
package/dist/workspace.js CHANGED
@@ -53,10 +53,16 @@ export function resolveWorkspace(opts = {}) {
53
53
  }
54
54
  const chosen = resolved[0];
55
55
  const repoRemote = chosen.marker.parsed.marker.repo?.remote;
56
- let canonicalRemote;
56
+ // Two different questions, previously answered by one branch. WHICH remote
57
+ // this checkout has is always knowable from git, and is what identifies the
58
+ // repository a report came from; whether it MATCHES what the marker claims
59
+ // only applies when the marker claims something. Computing the first only
60
+ // when the second applied meant field markers — which carry version and
61
+ // project_id alone — never produced a remote at all, so nothing downstream
62
+ // could tell two checkouts of one repo from two different repos (I-5126).
63
+ const actual = readGitOriginRemote(chosen.root);
64
+ const canonicalRemote = actual ? canonicalizeGitRemote(actual) : undefined;
57
65
  if (repoRemote) {
58
- const actual = readGitOriginRemote(chosen.root);
59
- canonicalRemote = actual ? canonicalizeGitRemote(actual) : undefined;
60
66
  const expected = canonicalizeGitRemote(repoRemote);
61
67
  if (canonicalRemote && expected && canonicalRemote !== expected && !opts.allowRepoMismatch) {
62
68
  throw new SpeckleRouterError("marker_remote_mismatch", `.speckle belongs to ${expected}, but this checkout appears to be ${canonicalRemote}.`, "If this is intentional, set SPECKLE_MCP_ALLOW_REPO_MISMATCH=1 to bypass.", { expected, actual: canonicalRemote, markerPath: chosen.marker.markerPath });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workpowers/speckle",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Local MCP router for Speckle — resolves project context from a committed .speckle marker and forwards calls to the remote Speckle MCP endpoint.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",