Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .changeset/20102-retire-saved-report-stack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
'@objectstack/spec': minor
'@objectstack/platform-objects': minor
'@objectstack/rest': minor
'@objectstack/client': minor
'@objectstack/cli': minor
'@objectstack/metadata-protocol': patch
---

feat!: retire the saved-report stack — `sys_saved_report` / `sys_report_schedule`, `/api/v1/reports`, `client.reports`, `IReportService`, the `reports` capability and `@objectstack/plugin-reports` (#20102)

**BREAKING** — the saved-report stack is removed whole, with no deprecation window
(maintainer ruling 2026-09-25, 「A. 退役」). It persisted a raw object query
(`object_name` + `{ filter, fields, orderBy, limit, groupBy }`) with a render format
and an owner, and could e-mail it on a schedule. Measured on the main branch of this
repository, objectui and cloud before removal: zero callers of the routes, the SDK
namespace or the service contract outside their own tests, and no app declaring the
capability.

**NOT affected: the `report` metadata kind.** `ReportSchema`, `defineReport`,
`/meta/report`, datasets and the analytics service are unchanged. The two shared the
word "report" and nothing else.

FROM → TO, per surface:

- `requires: ['reports']` → **refused** by `defineStack` (`STACK_CAPABILITY_UNKNOWN`,
422) with the prescription "requires: 'reports' was removed in @objectstack/spec
17.5.0 … Delete the token." Fix: delete the token. `os serve` on an older artifact
that still carries it warns with the same prescription and ignores it; `os validate`
and `os build` over a plain-object config (no `defineStack` call, so no parse-time
vocabulary check) report it as a non-fatal capability advisory carrying the same
prescription, never "check for a typo". The token is
gone from `PLATFORM_CAPABILITY_TOKENS` and `PLATFORM_CAPABILITY_PROVIDERS`; the new
`RETIRED_PLATFORM_CAPABILITY_GUIDANCE` (`@objectstack/spec/kernel`) carries the
prescription.
- `IReportService`, `SavedReport`, `ReportSchedule`, `ReportQuery`, `ReportFormat`,
`ReportRunResult`, `SaveReportInput`, `ScheduleReportInput`
(`@objectstack/spec/contracts`) → removed, no replacement export. Fix: delete the
import.
- `SysSavedReport`, `SysReportSchedule` (`@objectstack/platform-objects/audit`) and
the names `sys_saved_report` / `sys_report_schedule` in
`PLATFORM_PROVIDED_OBJECT_NAMES` → removed. A stack referencing either name is now
flagged as a probable typo instead of resolving.
- `GET|POST /api/v1/reports`, `GET|DELETE /api/v1/reports/:id`,
`POST /api/v1/reports/:id/run`, `POST /api/v1/reports/:id/schedule`,
`GET /api/v1/reports/:id/schedules`, `DELETE /api/v1/reports/schedules/:scheduleId`
→ unmounted: each answers the standard unmatched-route `404`, byte-identical to a
path that never existed. Their nine error codes (`REPORTS_LIST_FAILED`,
`REPORT_DELETE_FAILED`, `REPORT_GET_FAILED`, `REPORT_NOT_FOUND`,
`REPORT_RUN_FAILED`, `REPORT_SAVE_FAILED`, `REPORT_SCHEDULE_FAILED`,
`SCHEDULES_LIST_FAILED`, `SCHEDULE_DELETE_FAILED`) leave `ERROR_CODE_LEDGER` with
their only emitter.
- `client.reports.*` (`list`, `save`, `get`, `delete`, `run`, `schedule`,
`listSchedules`, `unschedule`) → removed. Fix: delete the call. A report is `report`
metadata, read through `meta.*` and queried through `analytics.*`; a saved ad-hoc
object query is a ListView on that object.
- `RestServer`'s constructor keeps the position of the retired saved-report provider,
typed `undefined`, so no later positional argument re-binds. Pass `undefined` there;
passing a provider is a compile error.
- `@objectstack/plugin-reports` → no longer built or published from this repository,
and `@objectstack/cli` no longer depends on it or mounts it. Fix: remove the
dependency. There is no successor package and no scheduled-delivery replacement.

**Existing databases.** `sys_saved_report` / `sys_report_schedule` tables in a deployed
database are left in place, untouched — no backfill, no reaper, no drop — under the
repository's convention for a retired platform object: the platform never drops a
table that metadata stops declaring, and `os migrate plan` lists such a table in its
informational unmanaged-tables section so an operator can decide.

`@objectstack/metadata-protocol` (patch): the `INVALID_SORT` hint for a sort node
spelled `{ field, direction }` no longer names the retired saved-report contract as
the source of that vocabulary; it names the better-auth adapter's `sortBy`, which
still uses it. Code and status are unchanged.

Breaking ships as `minor` per the launch-window convention
(`scripts/check-changeset-no-major.mjs`).

**Clause-②: yes (narrowing)** — a published capability token, a service contract and
its types, two platform objects, eight routes, nine registered error codes and an SDK
namespace are removed; nothing previously refused is now accepted.

<!-- adr-0087: registered saved-report-stack-retired -->
1 change: 0 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"@objectstack/organizations",
"@objectstack/mcp",
"@objectstack/plugin-pinyin-search",
"@objectstack/plugin-reports",
"@objectstack/plugin-security",
"@objectstack/plugin-sharing",
"@objectstack/service-sms",
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ control plane.
| [`@objectstack/plugin-audit`](packages/plugins/plugin-audit) | Audit log object and audit trail |
| [`@objectstack/plugin-email`](packages/plugins/plugin-email) | Pluggable outbound email transport |
| [`@objectstack/plugin-webhooks`](packages/plugins/plugin-webhooks) | Durable, cluster-aware outbound webhook delivery |
| [`@objectstack/plugin-reports`](packages/plugins/plugin-reports) | Saved reports and scheduled email digests |
| [`@objectstack/plugin-pinyin-search`](packages/plugins/plugin-pinyin-search) | Pinyin recall for CJK search |
| [`@objectstack/plugin-dev`](packages/plugins/plugin-dev) | Zero-config local development assembly |
| [`@objectstack/knowledge-memory`](packages/plugins/knowledge-memory) | In-memory knowledge adapter (dev / test) |
Expand Down
1 change: 0 additions & 1 deletion content/docs/api/client-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ The `@objectstack/client` SDK aims to implement the ObjectStack API protocol spe
| **automation** | ✅ | 18 | Flow CRUD, trigger/execute, runs, screen-flow resume, descriptor/status registries |
| **actions** | ✅ | 2 | Server-registered action handlers (`engine.registerAction`) |
| **approvals** | ✅ | 12 | Approval requests (ADR-0019): inbox, decisions, recall, revise/resubmit (ADR-0044), thread interactions, audit trail |
| **reports** | ✅ | 8 | Saved reports: definitions, execution, recurring email schedules (501 without `@objectstack/plugin-reports`) |
| **shares** | ✅ | 8 | Per-record sharing grants (list/grant/revoke) + tenant-wide sharing rules (`shares.rules.*`, M10.17) |
| **search** | ✅ | 1 | Global cross-object search (M10.5) |
| **email** | ✅ | 1 | Transactional send via IEmailService (M11.B1) |
Expand Down
4 changes: 2 additions & 2 deletions content/docs/capabilities/analytics.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Analytics & Dashboards
description: ~20 chart families, period-over-period comparison, runtime filters, TV display pages, four report shapes, and scheduled email digests
description: ~20 chart families, period-over-period comparison, runtime filters, TV display pages, and four report shapes
---


Expand All @@ -25,7 +25,7 @@ Dashboard extras that matter in practice:

## Reports

Four shapes — **tabular** (detail rows), **summary** (grouped totals), **matrix** (regions × quarters), and **joined** (several dataset panels) — with runtime filters and export. **Scheduled email digests** deliver a report daily or weekly: the Monday-morning sales report writes itself.
Four shapes — **tabular** (detail rows), **summary** (grouped totals), **matrix** (regions × quarters), and **joined** (several dataset panels) — with runtime filters and export.

> **In HotCRM**: four dashboards (executive, sales, service, CRM overview) and six reports (lead, opportunity, account, case, churn), fed by six shared datasets covering accounts, contacts, leads, opportunities, products, and cases. The executive dashboard carries quarter and owner filters plus the funnel and trend widgets described above.

Expand Down
2 changes: 1 addition & 1 deletion content/docs/capabilities/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If you are a developer, the [Build sections](/docs/data-modeling) cover the same
<Card href="/docs/capabilities/automation" title="Automation" description="Five trigger styles and visual flows: reminders, hand-offs, escalations, and scheduled work that runs itself" />
<Card href="/docs/capabilities/approvals" title="Approvals" description="Seven approver styles, four decision modes including group sign-off, locking, SLA escalation, send-back" />
<Card href="/docs/capabilities/permissions" title="Permissions — Who Sees What" description="Four layers from object capability to per-field visibility, five data-depth scopes, audit, and an explain API" />
<Card href="/docs/capabilities/analytics" title="Analytics & Dashboards" description="~20 chart families, period-over-period, runtime filters, TV display pages, reports and email digests" />
<Card href="/docs/capabilities/analytics" title="Analytics & Dashboards" description="~20 chart families, period-over-period, runtime filters, TV display pages and reports" />
<Card href="/docs/capabilities/ai" title="AI Under Governance" description="Ask questions and get charts; AI acts under the same permissions and audit as people; bring your own agent over MCP" />
<Card href="/docs/capabilities/integrations" title="Integrations & Everyday Work" description="Import/export, generated APIs, webhooks, connectors, federated databases, marketplace templates, languages" />
<Card href="/docs/capabilities/request-template" title="How to Request Features" description="A one-page template that turns business needs into configuration — hand it to your team or an AI agent" />
Expand Down
Loading
Loading