episoda 0.2.133 → 0.2.134

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.
@@ -2823,7 +2823,7 @@ var require_package = __commonJS({
2823
2823
  "package.json"(exports2, module2) {
2824
2824
  module2.exports = {
2825
2825
  name: "episoda",
2826
- version: "0.2.132",
2826
+ version: "0.2.133",
2827
2827
  description: "CLI tool for Episoda local development workflow orchestration",
2828
2828
  main: "dist/index.js",
2829
2829
  types: "dist/index.d.ts",
@@ -11105,16 +11105,27 @@ var Daemon = class _Daemon {
11105
11105
  }
11106
11106
  const projects = getAllProjects();
11107
11107
  const localConnected = projects.some((p) => this.isWebSocketOpen(p.path));
11108
+ const connectedProject = projects.find((p) => this.isWebSocketOpen(p.path));
11109
+ const configProjectId = config.project_id && config.project_id.trim() !== "" ? config.project_id : null;
11110
+ const projectId = configProjectId || connectedProject?.id || projects[0]?.id;
11111
+ if (!projectId) {
11112
+ return {
11113
+ verified: false,
11114
+ error: "No project context available for server verification",
11115
+ localConnected,
11116
+ serverConnected: false
11117
+ };
11118
+ }
11108
11119
  let serverConnected = false;
11109
11120
  let serverMachineId = null;
11110
11121
  let serverError = null;
11111
11122
  try {
11112
- const response = await fetch(`${config.api_url}/api/cli/status`, {
11113
- headers: {
11114
- "Authorization": `Bearer ${config.access_token}`,
11115
- "Content-Type": "application/json"
11116
- }
11117
- });
11123
+ const headers = {
11124
+ "Authorization": `Bearer ${config.access_token}`,
11125
+ "Content-Type": "application/json",
11126
+ "X-Project-Id": projectId
11127
+ };
11128
+ const response = await fetch(`${config.api_url}/api/cli/status`, { headers });
11118
11129
  if (response.ok) {
11119
11130
  const data = await response.json();
11120
11131
  serverConnected = data.connected === true;