Skip to content

Commit 2be3fd4

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-28534-installed-package-file-ref
2 parents 71597f1 + bca27ad commit 2be3fd4

46 files changed

Lines changed: 932 additions & 103 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.changeset/25921-collaboration-zero-consumer-exports.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ What leaves, and what to write instead:
1515

1616
- FROM `useCommentSearch` TO a `useMemo` over your own comment list that keeps the entries whose `text` or `author` contains the trimmed, lower-cased query.
1717
- FROM `CommentSearchConfig` TO `{ comments: CommentEntry[] }`, with `CommentEntry` from `@object-ui/types`.
18-
- FROM `CommentSearchReturn` TO the shape your own search state returns; the result rows can keep using `CommentSearchResult` from `@object-ui/types`.
18+
- FROM `CommentSearchReturn` TO the shape your own search state returns; type the result rows with a local interface, `{ comment: CommentEntry; objectName: string; recordId: string; highlight?: string }` (`CommentSearchResult` leaves `@object-ui/types` in the same release).
1919
- FROM `createPresenceUpdater` TO a `Map<string, PresenceUser>` keyed by `userId` that you update from your realtime channel, or `PresenceProvider` with `useTenantPresence` / `useRecordPresence`, which the package keeps exporting.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/core': patch
3+
---
4+
5+
refactor(core)!: take the test-only `resetActionKeyWarnings` off the package entry
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/core#resetActionKeyWarnings) the retired operand is a test seam that clears a warn-once memo; nothing in the workspace or in hotcrm imported it from the package entry, and no packages/spec schema, registered node type, conversion surface or stored shape names it, so there is nothing for `objectstack migrate meta` to rewrite -->
11+
12+
**BREAKING** for a host that imports `resetActionKeyWarnings` from `@object-ui/core`. It cleared the once-per-key memo behind the unknown-action-key warning and existed for tests; core's own tests reach it through the module that declares it. The other ten names of that module (`ACTION_DEF_KEYS`, `SPEC_ACTION_KEYS`, `NAVIGATION_ALIAS_KEYS`, `HOST_DISPATCH_ACTION_KEYS`, `RETIRED_ACTION_KEYS`, `KNOWN_ACTION_KEYS`, `classifyActionKeys`, `warnOnUnknownActionKeys`, `hasDeprecatedObjectParams`, `warnOnDeprecatedObjectParams`) stay exported unchanged, and the warning itself still fires once per key.
13+
14+
- FROM `resetActionKeyWarnings()` in a test TO a fresh module instance per test (`vi.resetModules()` before importing `@object-ui/core`), or no reset at all when the test asserts the first warning only.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/i18n': patch
3+
---
4+
5+
refactor(i18n)!: delete four `publicForm` keys that no screen reads
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (no-migration-prescription) the four deleted keys are message strings in the built-in locale packs that no t() call site in the workspace or in hotcrm reads (the embeddable form draws its own English literals instead); they are not metadata, no packages/spec schema or stored shape names them, and a host that kept its own text under these keys keeps it in its own resources -->
11+
12+
**BREAKING** only for TypeScript code that names one of the deleted keys through the pack-derived key type (`TranslationKeys`): `publicForm.consentRequired`, `publicForm.rateLimited`, `publicForm.redirectBlocked` and `publicForm.requiredHint` leave all ten packs (ar, de, en, es, fr, ja, ko, pt, ru, zh). No translation call read them. `EmbeddableForm` in `@object-ui/plugin-form` draws the same wording as hard-coded English defaults for `consentRequired`, `rateLimited` and `requiredHint`, and shows `redirectBlocked` only when the form author supplies `texts.redirectBlocked`; those defaults were never localised through these keys and stay un-localised English after this change. An author localises them per form through `config.texts`. The form page's other `publicForm` keys (`submit`, `submitting`, `poweredBy`, `thankYouTitle`, `thankYouMessage`, `redirecting`, `redirectPending`, `loading`, `requiredFields`) are unchanged.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
---
4+
5+
refactor(plugin-detail)!: take the test-only `resetUnknownActivityTypeWarnings` off the package entry
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/plugin-detail#resetUnknownActivityTypeWarnings) the retired operand is a test seam that clears the warn-once bucket of the unmapped activity-type diagnostic; no shipped code in the workspace or in hotcrm called it, and no packages/spec schema, registered node type, conversion surface or stored shape names it, so there is nothing for `objectstack migrate meta` to rewrite -->
11+
12+
**BREAKING** for a host that imports `resetUnknownActivityTypeWarnings` from `@object-ui/plugin-detail`. It existed for tests; the one workspace test outside the package now imports it from the module that declares it. `ACTIVITY_TYPE_TO_FEED_TYPE`, `UNMAPPED_ACTIVITY_FEED_TYPE`, `activityRowToFeedItem` and `isRefusedFeedRead` stay exported unchanged, and the diagnostic still warns once per unmapped type.
13+
14+
- FROM `resetUnknownActivityTypeWarnings()` in a test TO a fresh module instance per test (`vi.resetModules()` before importing `@object-ui/plugin-detail`), or an activity type unique to that test.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/react': patch
3+
---
4+
5+
refactor(react)!: take the test-only `__resetVisibilityPredicateWarnings` off the package entry
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/react#__resetVisibilityPredicateWarnings) the retired operand is a test seam that clears the once-per-predicate dedupe of the unresolvable-visibility report; no shipped code in the workspace or in hotcrm called it, and no packages/spec schema, registered node type, conversion surface or stored shape names it, so there is nothing for `objectstack migrate meta` to rewrite -->
11+
12+
**BREAKING** for a host that imports `__resetVisibilityPredicateWarnings` from `@object-ui/react`. The double-underscore name already marked it as a test seam; the workspace tests that used it now import it from the module that declares it. `reportUnresolvableVisibilityPredicate`, `formatUnresolvableVisibilityMessage`, `UNRESOLVABLE_VISIBILITY_PREFIX`, `UNRESOLVABLE_ENABLEMENT_PREFIX` and the `PredicateScopeTier` type stay exported unchanged, and the report still dedupes per predicate.
13+
14+
- FROM `__resetVisibilityPredicateWarnings()` in a test TO a fresh module instance per test (`vi.resetModules()` before importing `@object-ui/react`), or a predicate source string unique to that test so the dedupe cannot hide its line.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/types': patch
3+
---
4+
5+
refactor(types)!: retire the zero-consumer `CommentSearchResult` interface
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/types#CommentSearchResult) the retired operand is a TypeScript interface for a cross-record comment search result; its only producer, the `useCommentSearch` hook of `@object-ui/collaboration`, already retired, and nothing in the workspace or in hotcrm reads the type; no packages/spec schema, registered node type, conversion surface or stored shape names it, so there is nothing for `objectstack migrate meta` to rewrite -->
11+
12+
**BREAKING** for a host that imports the type `CommentSearchResult` from `@object-ui/types`. It described the hits of a comment search the packages no longer ship. `CommentEntry`, `MentionNotification` and `ActivityEntry` stay exported unchanged.
13+
14+
- FROM `CommentSearchResult` TO a local interface in your own code: `{ comment: CommentEntry; objectName: string; recordId: string; highlight?: string }`.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/cloud-connection': patch
3+
---
4+
5+
fix(cloud-connection): a marketplace install-local uninstall the registry would refuse is refused 409 before the ledger write, naming the pair or the extender, with nothing removed (#28511)
6+
7+
Clause-②: no (narrowing) — `DELETE /api/v1/marketplace/install-local/:manifestId` now refuses `409 RESOURCE_CONFLICT` the uninstall of a package whose paired customization package (`ID.custom`) is installed, or that owns an object another package extends (ADR-0029), an uninstall that answered 200 before; nothing is widened.
8+
Metadata-protocol: none
9+
Skills-docs: none — no file under `skills/**` teaches uninstalling through the install-local door, so every taught use stays true.
10+
11+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export or type changes: an uninstall the running registry already refuses is now refused at the install-local door before its ledger write, with the registry's existing RESOURCE_CONFLICT / 409 refusal, so there is nothing for a migration to rewrite and no tombstone. -->
12+
13+
**BREAKING** accept-set narrowing at the install-local uninstall door (`@objectstack/cloud-connection`, ADR-0146 D3).
14+
15+
- **Before.** The door removed the ledger entry first and only then asked the registry to withdraw the package. A registry refusal (the base's `.custom` pair installed, or an extended object) was caught there and folded into a 200 with a failed `registry.uninstallPackage` entry in `cleanups`. The package stayed registered until the next restart, and the restart then dropped it from under its pair, stranding every customization the pair holds.
16+
- **Now.** The door asks the registry the same question first, through `SchemaRegistry.assertPackageUninstallable` (the one predicate `uninstallPackage` asks, which mutates nothing). On a refusal it answers that refusal's own `409 RESOURCE_CONFLICT` and sentence, which names the pair and the extenders and opens with the way out. The ledger entry, the registration and the pair stay as they were, and no cleanup runs.
17+
- **Unchanged.** An uninstall the registry would let go keeps the ledger-first order (the ledger entry is removed, then the package is withdrawn, then the cleanups run). An id this door never installed still answers 404. A host with no `objectql` registry, or a registry without the predicate, is not asked and behaves as before.
18+
19+
**The remedy.** Delete the pair (export it first to keep its customizations: `GET /api/v1/packages/PAIR/export`) or uninstall the extending packages, then uninstall the base again.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
fix(cli): `os build` carries the OpenAPI document a `provider: 'openapi'` connector names by package-relative file into the artifact, so the app works once installed into another runtime
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A declarative OpenAPI connector may name its document by file, relative to the directory holding `objectstack.config.ts` (`providerConfig.spec: './openapi/stripe.openapi.json'`). The build used to write that path into `dist/objectstack.json` unchanged and carry no document. The runtime the artifact is installed into (`os package install ./dist/objectstack.json`, or a marketplace install) keeps the artifact JSON and nothing else, so the path resolved against that runtime's own root, named no file, and the connector never came up: the install answered success, and the instance was missing from `GET /api/v1/automation/connectors`.
11+
12+
- **What the build now writes.** For each `provider: 'openapi'` entry whose `providerConfig.spec` is a string that is not an http(s) URL, the file is read and its JSON written in place of the path, as the inline document the provider already accepts. Every other key of `providerConfig`, an inline document, an http(s) URL and every other provider are written as before. The entries of `packages[i].manifest` bodies are read too.
13+
- **What the build now refuses.** A spec path that is absolute, climbs out of the directory holding the config, names no file, or names a file that is not a JSON object fails the build, located at the entry (`connectors[0].providerConfig.spec`) — it would fail the instance after install otherwise.
14+
- **What changes for readers of the artifact.** An artifact built this way carries the document (its size grows by the document's), and `providerConfig.spec` there is an object rather than a path. Whether the document is OpenAPI 3.x is still judged by the provider when the instance materializes.
15+
- **Your fix, if you ship such an app:** rebuild it with this CLI and publish or install the new artifact. Nothing in the source changes.

‎content/docs/automation/connectors.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ only the listed operations become actions). The `spec` takes any of three forms:
131131
- a **package-relative file path** like `'./specs/billing-openapi.json'`,
132132
resolved against the directory containing `objectstack.config.ts` and
133133
**confined to it** — absolute and `..`-escaping paths are rejected.
134+
`os build` reads the file and writes its JSON into
135+
`dist/objectstack.json` in place of the path, so an artifact installed into
136+
another runtime carries the document; a path that names no file, or no JSON
137+
object, fails the build.
134138

135139
{/* os:check */}
136140
```typescript

‎packages/cli/src/commands/compile.ts‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
} from '@objectstack/spec';
1717
import { loadConfig, namedExportRejectionHints } from '../utils/config.js';
1818
import { collectSeedFiles, placeSeedFiles } from '../utils/bundle-seed-files.js';
19+
import { collectConnectorSpecFiles, placeConnectorSpecFiles } from '../utils/bundle-connector-spec-files.js';
1920
import { judgeSeedRecordValues } from '../utils/seed-record-values.js';
2021
import { refuseUnbuiltStack } from '../utils/stack-provenance-refusal.js';
2122
import { isExtractionRefusal, lowerCallables } from '../utils/lower-callables.js';
@@ -1122,6 +1123,30 @@ export default class Compile extends Command {
11221123
printStep(`Bundling seed files... ${seedFiles.files} file${seedFiles.files === 1 ? '' : 's'} (${(seedFiles.bytes / 1024).toFixed(1)} KB)`);
11231124
}
11241125

1126+
// 4a-bis. The OpenAPI document a `provider: 'openapi'` connector names
1127+
// by package-relative file (ADR-0097), read relative to the
1128+
// directory holding the config and carried in the artifact as the
1129+
// inline document. An installed artifact has no package directory —
1130+
// the runtime it is installed into caches the JSON alone — so a
1131+
// reference left as a path resolves against that runtime's own root
1132+
// and names nothing. A path that names no file fails the build here
1133+
// rather than the instance after install.
1134+
const connectorSpecs = collectConnectorSpecFiles(absolutePath, finalBundle);
1135+
if (connectorSpecs.issues.length > 0) {
1136+
if (flags.json) {
1137+
await emitJson({ success: false, error: 'connector spec file bundling failed', issues: connectorSpecs.issues, warnings: warningsSoFar(), conversions: conversionNotices }, 0, { compact: true });
1138+
this.exit(1);
1139+
}
1140+
console.log('');
1141+
printError(`Connector spec file bundling failed (${connectorSpecs.issues.length} issue${connectorSpecs.issues.length > 1 ? 's' : ''})`);
1142+
for (const issue of connectorSpecs.issues) console.log(chalk.red(` ✗ ${issue.location}: ${issue.message}`));
1143+
this.exit(1);
1144+
}
1145+
placeConnectorSpecFiles(connectorSpecs);
1146+
if (connectorSpecs.files > 0 && !flags.json) {
1147+
printStep(`Bundling connector spec files... ${connectorSpecs.files} document${connectorSpecs.files === 1 ? '' : 's'} (${(connectorSpecs.bytes / 1024).toFixed(1)} KB)`);
1148+
}
1149+
11251150
// 4b. Bundle handler functions into `<artifactDir>/objectstack-runtime.{hash}.mjs`
11261151
// and stamp the relative path into the JSON so the runtime can
11271152
// dynamic-import it at boot. `runtimeModule` is part of the

0 commit comments

Comments
 (0)