edsger 0.72.0 → 0.72.1

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.
@@ -21,8 +21,15 @@ export async function callMcpEndpoint(method, params) {
21
21
  if (!mcpToken) {
22
22
  throw new Error('Not authenticated. Run `edsger login` or set EDSGER_MCP_TOKEN environment variable.');
23
23
  }
24
+ // The platform splits its JSON-RPC surface across two edge functions that
25
+ // share the same base URL and MCP-token auth:
26
+ // - `/mcp` — slash-notation methods (issues/list, github/org_repos, ...)
27
+ // - `/agents` — dot-notation methods (agents.*, services.*, skills.*, ...)
28
+ // Route by the method's separator so callers don't have to care which
29
+ // function owns a given method.
30
+ const endpoint = method.includes('.') ? 'agents' : 'mcp';
24
31
  try {
25
- const response = await fetch(`${mcpServerUrl}/mcp`, {
32
+ const response = await fetch(`${mcpServerUrl}/${endpoint}`, {
26
33
  method: 'POST',
27
34
  headers: {
28
35
  'Content-Type': 'application/json',
@@ -215,5 +215,5 @@ async function resolveRepositoryFullName(repositoryId) {
215
215
  .select('full_name')
216
216
  .eq('id', repositoryId)
217
217
  .maybeSingle();
218
- return (data)?.full_name ?? null;
218
+ return data?.full_name ?? null;
219
219
  }
@@ -29,9 +29,16 @@ export async function runSyncTerraform(teamId, options = {}) {
29
29
  repoFullName = result?.team?.terraform_repo_full_name ?? null;
30
30
  }
31
31
  catch {
32
- // Fallback: read directly from supabase if MCP doesn't have the endpoint
32
+ // Fallback: the caller (e.g. the desktop app) may have already resolved
33
+ // the team's repo and injected it as EDSGER_TERRAFORM_REPO, so MCP isn't
34
+ // strictly required.
33
35
  logWarning('Could not fetch team via MCP, attempting to read terraform_repo_full_name from env');
34
36
  }
37
+ // Env fallback works whether or not MCP returned a repo — it lets the
38
+ // desktop app drive the sync without depending on the MCP team endpoint.
39
+ if (!repoFullName) {
40
+ repoFullName = process.env.EDSGER_TERRAFORM_REPO ?? null;
41
+ }
35
42
  if (!repoFullName) {
36
43
  logError('No Terraform repo configured for this team. ' +
37
44
  'Go to Team Settings and set a Terraform repo, or use --dir to point at a local directory.');
@@ -58,6 +58,9 @@ export async function registerSession(options) {
58
58
  const sessionId = generateSessionId();
59
59
  currentSessionId = sessionId;
60
60
  const command = resolvedCommand(options);
61
+ // Full invocation (subcommand + args) for readable run history. `command`
62
+ // stays the stable, entity-scoped lookup key; this carries the variable args.
63
+ const invocation = process.argv.slice(2).join(' ') || undefined;
61
64
  try {
62
65
  const userId = getUserId();
63
66
  if (hasSupabaseSession() && userId) {
@@ -73,6 +76,9 @@ export async function registerSession(options) {
73
76
  if (command) {
74
77
  row.command = command;
75
78
  }
79
+ if (invocation) {
80
+ row.invocation = invocation;
81
+ }
76
82
  if (options?.productId) {
77
83
  row.product_id = options.productId;
78
84
  }
@@ -93,6 +99,9 @@ export async function registerSession(options) {
93
99
  if (command) {
94
100
  payload.command = command;
95
101
  }
102
+ if (invocation) {
103
+ payload.invocation = invocation;
104
+ }
96
105
  if (options?.productId) {
97
106
  payload.product_id = options.productId;
98
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edsger",
3
- "version": "0.72.0",
3
+ "version": "0.72.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "edsger": "dist/index.js"
@@ -50,8 +50,8 @@
50
50
  "commander": "^12.0.0",
51
51
  "cosmiconfig": "^9.0.0",
52
52
  "dotenv": "^16.4.5",
53
- "edsger-contract": "0.7.0",
54
- "edsger-tools": "0.9.0",
53
+ "edsger-contract": "0.9.1",
54
+ "edsger-tools": "0.9.1",
55
55
  "gray-matter": "^4.0.3",
56
56
  "zod": "^4.0.0"
57
57
  },