Skip to content

Commit e1d2812

Browse files
MajorTalclaude
andcommitted
fix(cli): drop stale deployed_at from projects list/info + MCP project_info
The field was only ever written by `apps fork`; no deploy path (legacy or v1.34 unified) stamps it, so `run402 projects info` showed a frozen last-fork date even after recent deploys. For agent-facing output, "wrong" is strictly worse than "absent" — an LLM treating the date as authoritative builds wrong inferences. Removes the field from CLI list/info JSON, the MCP project_info table row, and the apps-fork write site (so we stop growing more stale data). Keeps the type defs in core/keystore.ts and sdk/credentials.ts intact so a future server-side source can wire in without a migration. last_deployment_id remains available for callers needing a deploy ref. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8345e3f commit e1d2812

4 files changed

Lines changed: 4 additions & 8 deletions

File tree

cli/lib/apps.mjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,13 @@ async function fork(versionId, name, args) {
131131
subdomain: opts.subdomain,
132132
});
133133

134-
// SDK persists via the Node provider's saveProject/setActiveProject; we
135-
// mirror the old CLI behavior here (deployed_at + site_url surfaced from
136-
// the fork response) with a follow-up updateProject for the extra fields.
134+
// SDK persists keys via the Node provider's saveProject; mirror that
135+
// here so we also capture site_url from the fork response.
137136
if (data.project_id) {
138137
saveProject(data.project_id, {
139138
anon_key: data.anon_key,
140139
service_key: data.service_key,
141140
site_url: data.site_url || data.subdomain_url,
142-
deployed_at: new Date().toISOString(),
143141
});
144142
}
145143
console.log(JSON.stringify(data, null, 2));

cli/lib/projects.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ async function list() {
193193
const entries = Object.entries(store.projects);
194194
if (entries.length === 0) { console.log(JSON.stringify({ status: "ok", projects: [], message: "No projects yet." })); return; }
195195
const activeId = store.active_project_id;
196-
console.log(JSON.stringify(entries.map(([id, p]) => ({ project_id: id, active: id === activeId, site_url: p.site_url, deployed_at: p.deployed_at })), null, 2));
196+
console.log(JSON.stringify(entries.map(([id, p]) => ({ project_id: id, active: id === activeId, site_url: p.site_url })), null, 2));
197197
}
198198

199199
async function info(projectId) {
@@ -205,7 +205,6 @@ async function info(projectId) {
205205
anon_key: data.anon_key,
206206
service_key: data.service_key,
207207
site_url: data.site_url || null,
208-
deployed_at: data.deployed_at || null,
209208
}, null, 2));
210209
} catch (err) {
211210
reportSdkError(err);

src/tools/project-info.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe("project_info tool", () => {
2828
it("returns project details from keystore", async () => {
2929
writeKeystore({
3030
projects: {
31-
"proj-1": { anon_key: "ak-123", service_key: "sk-456", site_url: "https://example.run402.com", deployed_at: "2026-01-01T00:00:00Z" },
31+
"proj-1": { anon_key: "ak-123", service_key: "sk-456", site_url: "https://example.run402.com" },
3232
},
3333
});
3434

src/tools/project-info.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export async function handleProjectInfo(args: {
2626
`| anon_key | \`${info.anon_key}\` |`,
2727
`| service_key | \`${info.service_key}\` |`,
2828
`| site_url | ${info.site_url ? `\`${info.site_url}\`` : "(none)"} |`,
29-
`| deployed_at | ${info.deployed_at || "(never)"} |`,
3029
];
3130

3231
return { content: [{ type: "text", text: lines.join("\n") }] };

0 commit comments

Comments
 (0)