Skip to content

Commit 0f65bdf

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-58h2qh
2 parents 98d7db8 + 3271a08 commit 0f65bdf

16 files changed

Lines changed: 531 additions & 36 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@object-ui/console': patch
3+
---
4+
5+
fix(console): a share link to a non-chat record shows the record's fields as read-only rows, not raw JSON
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **Before.** The share-link page `/s/:token` printed `JSON.stringify(record)` in a code block for every object except `ai_conversations`: field API names, unformatted values and nested objects as JSON.
11+
- **Now.** The page renders one read-only row per key the resolve answer carries. The label is the key humanized (`annual_revenue` reads "Annual Revenue"). The value is formatted by its JSON shape: ISO dates and date-times in the visitor's locale, numbers grouped, booleans as Yes / No, lists and nested objects as short text, and an empty value as a dash. System fields such as `id` and `created_at` are shown after the business fields. A record with no fields left reads "No data".
12+
- **Unchanged.** The page shows exactly the fields the server returned: redacted fields stay absent and the "Some fields are hidden by the owner" line still renders. The `ai_conversations` transcript, the resolve request, its headers and the password flow do not change.
13+
- **Not yet.** Field labels and field types are not in the resolve answer, and an anonymous visitor cannot read the object's metadata, so authored labels, picklist labels, currency and lookup names do not show yet.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the actions rule, its eval and the i18n skill teach an action's `disabledReason`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **Before.** `ActionSchema.disabledReason` (the display-only sentence a greyed action shows beside its `disabled` predicate) was on the protocol, but no published skill named it. An agent authoring an action from the skill left the console's default "Not available for this record" in place, or wrote the reason into `description`.
11+
- **Now.** `objectstack-ui/rules/actions.md` has one bullet beside `disabled`: an I18nLabel, display-only, never a predicate or a gate; omitted keeps the console's default, a blank one is refused, and `disabledMessage` / `disabledTooltip` / `disabledHint` / `disabledText` are refused naming the key; the ReassignLead example carries it beside `disabled`. Eval 9 in `evals/views-apps-actions-pages.json` expects `disabledReason` beside a `disabled` predicate and forbids the reason in `description`; cases 5 and 8 are reworded so neither spells its own `must_not_contain` string. The `objectstack-i18n` group table lists `disabledReason` under `_actions.{action_name}` (and so under `globalActions.{action_name}`) beside `confirmText` / `successMessage`.
12+
- No schema, key or behaviour changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): objectstack-formula eval case 4's reference answer names the refused date forms without spelling its own `must_not_contain` strings
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **Before.** Case 4 of `skills/objectstack-formula/evals/cel-predicates-formulas.json` refuses `new Date(` and `today() + ` in an answer, yet its own `expected_output` spelled both (`` `new Date()` `` and `` `today() + 45` ``), so a reference-grade answer was graded wrong.
11+
- **Now.** The reference answer says "never a JS `Date` / `Date.now()`" and "never date arithmetic on `today()` (it faults)", as case 7 names "the `label` macro". Every assertion and every fact stays: the CEL envelope seed, the determinism gate, `daysBetween(today(), record.close_date)`, the `{}` duration trap. A per-case cross-check (no `must_not_contain` string inside its own `expected_output`, every `must_contain` string present) reports 0 failures over all 7 cases; the file keeps its byte size, so its token-ratchet row does not move.
12+
- No schema, key or behaviour changes.

‎.claude/skills/pm-dispatch/references/coordinator.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@
4545
## 七、语言与汇报(coordinator 与席位线程皆读)
4646

4747
- 项目内对维护者用维护者的语言;GitHub 内容英文,照 SKILL.md 全体座位不变量。
48-
- 只在结果、阻塞或待裁决时向维护者汇报,与席位同规;例行进展进线程清单。
49-
- 转述线程 PR「无需你做」前自读其 `mergeable_state`;`dirty` ⇒ 退回线程先合 main,⛔ 不转述。
48+
- 向维护者报任一 PR 状态前同轮重读:merged、draft、auto_merge、在队、reviews、`mergeable_state`。
49+
- 无 APPROVED 也可能已被 ready 入队 ⇒ ⛔ 单读 reviews;已办即删;`dirty` ⇒ 退回线程先合 main。

‎.github/workflows/ci.yml‎

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3006,8 +3006,17 @@ jobs:
30063006
- name: Setup workspace
30073007
uses: ./.github/actions/setup-workspace
30083008

3009-
- name: Setup Next.js cache
3010-
uses: actions/cache@v6
3009+
# The Next.js cache is RESTORED on every run and SAVED only on `push` and
3010+
# `schedule`, by "Save Next.js cache" at the end of this job -- the rule
3011+
# `.github/actions/setup-workspace` holds for the pnpm store, for the same
3012+
# reason: an entry saved on a pull request or merge-queue ref is
3013+
# restorable only from that ref, yet it counts toward the one 10 GB
3014+
# Actions cache pool and evicts `main`'s entries, which every pull request
3015+
# and queue run CAN restore. ⛔ No `pull_request` or `merge_group` run
3016+
# saves it.
3017+
- name: Restore Next.js cache
3018+
id: nextjs-cache
3019+
uses: actions/cache/restore@v6
30113020
with:
30123021
path: apps/docs/.next/cache
30133022
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('apps/docs/**.[jt]s', 'apps/docs/**.[jt]sx', 'content/**/*.mdx') }}
@@ -3073,9 +3082,9 @@ jobs:
30733082
# this card exists to catch, arriving AFTER the gate reported green.
30743083
# Assert the artifact rather than trusting the exit code.
30753084
#
3076-
# `.next/BUILD_ID` cannot be a leftover from the cache step above: that
3077-
# step stores `apps/docs/.next/cache` ONLY, so nothing outside that
3078-
# subtree is ever restored. ⛔ Widening that cache path to
3085+
# `.next/BUILD_ID` cannot be a leftover from the cache restore above:
3086+
# the Next.js cache steps store `apps/docs/.next/cache` ONLY, so nothing
3087+
# outside that subtree is ever restored. ⛔ Widening that cache path to
30793088
# `apps/docs/.next` would let this assertion pass without a build.
30803089
- name: Assert the docs app actually built
30813090
run: |
@@ -3086,6 +3095,31 @@ jobs:
30863095
fi
30873096
echo "Built docs app: BUILD_ID=$(cat apps/docs/.next/BUILD_ID)"
30883097
3098+
# The save half of "Restore Next.js cache" (its comment says why it runs
3099+
# on `push` and `schedule` only). It reproduces what the combined
3100+
# `actions/cache` post step did on those events, three ways:
3101+
# - no status function in `if:`, so it runs only when every step above
3102+
# succeeded -- the combined action's `post-if: success()`;
3103+
# - skipped on an exact hit, which has nothing new to write;
3104+
# - saved under `cache-primary-key`, the key the restore step resolved
3105+
# BEFORE the build, which is the key the combined action saved under.
3106+
# A key re-hashed here would hash `apps/docs/`, the tree the build
3107+
# has just written into, so it could differ from the key the restore
3108+
# looked up.
3109+
# A main-phase step, bounded and `continue-on-error` like the ui jobs'
3110+
# saves: a stalled or failed upload costs the next run time and says
3111+
# nothing about the docs build.
3112+
- name: Save Next.js cache
3113+
if: >-
3114+
(github.event_name == 'push' || github.event_name == 'schedule')
3115+
&& steps.nextjs-cache.outputs.cache-hit != 'true'
3116+
uses: actions/cache/save@v6
3117+
timeout-minutes: 5
3118+
continue-on-error: true
3119+
with:
3120+
path: apps/docs/.next/cache
3121+
key: ${{ steps.nextjs-cache.outputs.cache-primary-key }}
3122+
30893123
# ── THE ui/ JOBS (objectstack#25697, epic objectstack#25677) ──────────────
30903124
# objectui is imported under `ui/` as a subtree. These four jobs are its CI,
30913125
# ported from objectui's own ci.yml (`Type Check`, `Test (shard n/16)`,

‎docs/adr/0097-declarative-connector-instances.md‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
**Builds on**: [ADR-0015](./0015-external-datasource-federation.md) (open mechanism / enterprise lifecycle split), [ADR-0018](./0018-unified-node-action-registry.md) (`connector_action` baseline dispatch + `engine.registerConnector()`), [ADR-0022](./0022-connectors-vs-messaging-channels.md) (Connector = transport/integration mechanism), [ADR-0023](./0023-openapi-to-connector-generator.md) (OpenAPI → Connector generator), [ADR-0024](./0024-mcp-connectors.md) (MCP servers as connectors)
66
**Tracking**: framework#2977 (supersedes the interim descriptor-only contract from framework#2612)
77
**Consumers**: `@objectstack/spec` (`stack.zod.ts`, `integration/connector.zod.ts`), `@objectstack/service-automation` (boot audit → provider binding), `@objectstack/connector-openapi`, `@objectstack/connector-mcp`, `@objectstack/connector-rest`, the Studio flow palette, AI authoring (stack generation)
8-
**Amended by**: [ADR-0143](./0143-outbound-connector-auth-is-open-tier.md) (2026-10-27) — OAuth2, the vendor app-credential exchange and request signing join `ConnectorInstanceAuthSchema` in the open tier, and those kinds resolve per dispatch; see the notes under §3 and under "Open / enterprise line".
8+
**Amended by**: [ADR-0143](./0143-outbound-connector-auth-is-open-tier.md) (2026-10-27) — OAuth2, the vendor app-credential exchange and request signing join `ConnectorInstanceAuthSchema` in the open tier, and those kinds resolve per dispatch; see the notes under §3 and under "Open / enterprise line". PR #26798 (2026-10-27, #26709 item 3(b)) — a credential the MCP server rejects (HTTP `401` / `403`) is a fatal configuration fault, not upstream-unavailable; see the note under "Upstream availability".
99

1010
---
1111

@@ -190,6 +190,25 @@ dispatch was rejected: MCP actions ARE the server's `tools/list`, so a
190190
connector materialized without connecting would register a zero-action def —
191191
exactly the plausible-but-dead shape this ADR exists to kill.
192192

193+
> **Amendment note (2026-10-27, #26709 item 3(b) — PR #26798).** The sentence
194+
> above has one exception past transport validation: a credential the MCP
195+
> server **rejects** — an HTTP `401` / `403` on connect, handshake or
196+
> `tools/list` — is a **configuration fault**, thrown plain: fatal at boot, a
197+
> skipped entry on reload, never `CONNECTOR_UPSTREAM_UNAVAILABLE` and never
198+
> retried. It sits on the fatal side of this section's own split, beside an
199+
> unresolvable `credentialRef` and the `openapi` provider's non-retryable
200+
> `4xx` (a `401` included) on its spec fetch: retrying cannot make a wrong,
201+
> missing or under-scoped credential valid, and a degraded instance retried
202+
> with backoff reads as "server down", hiding the misconfiguration the author
203+
> has to fix. The rejection is told apart by the MCP SDK's own HTTP-transport
204+
> errors only — a `StreamableHTTPError` with status 401 / 403, or an
205+
> `UnauthorizedError`, in the error's `cause` chain
206+
> (`packages/connectors/connector-mcp/src/mcp-provider.ts#credentialRejectionStatus`, `#createMcpProviderFactory`);
207+
> a JSON-RPC error that merely carries a numeric code 401 stays operational, as
208+
> does every other connect / `tools/list` failure. Pinned against a real
209+
> Streamable-HTTP server in
210+
> `packages/connectors/connector-mcp/src/mcp-http-discovery-faults.test.ts`.
211+
193212
The `openapi` provider applies the same split to its **remote-URL spec fetch**:
194213
an unreachable endpoint (network error) or a transient HTTP status
195214
(`408` / `429` / `5xx`, mirroring the `retryableStatusCodes` convention) is
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
/**
4+
* [#25467 cut 28] The code-datasource predicates, from
5+
* `ObjectStackProtocolImplementation`, moved out of `protocol.ts` whole: the
6+
* two answers to "is this datasource name defined in code?" (#21899, #21944).
7+
*
8+
* - `isDeclaredCodeDatasource` — does an installed package declare it, or
9+
* does the host register it from code? The `/meta` door's artifact-backed
10+
* verdict and the stored-row lock read it.
11+
* - `isHostCodeDatasource` — the host's code-datasource set alone, the
12+
* first half of that answer and exactly what the datasource-admin boot
13+
* restore reads.
14+
*
15+
* A MOVE, not a redesign. Each function below is the body of the
16+
* `ObjectStackProtocolImplementation` method of the same name as it stood,
17+
* re-indented one level and otherwise unedited.
18+
*
19+
* ## How the moved bodies reach the class
20+
*
21+
* The shape #23050 set for `rest-server.ts` (its `data-action-routes.ts`
22+
* header carries the full reasoning), as `protocol-batch-data.ts` applies it.
23+
* The class keeps each method — the published `dist/*.d.ts` lists its name,
24+
* docblock and declared signature — and its body is one literal of exactly
25+
* the {@link CodeDatasourcePredicatesHost} members it reads, plus a `.call`.
26+
* The `engine` and `getServicesRegistry` fields are handed over as getters,
27+
* so each read finds them as they stand at call time;
28+
* `isDeclaredCodeDatasource`'s call to `isHostCodeDatasource` is handed over
29+
* as a closure, so it still reaches the class method. Every caller keeps
30+
* calling the class methods.
31+
*
32+
* What the bodies read from elsewhere, they import from where `protocol.ts`
33+
* imports it. Nothing re-exports this module, so the published surface does
34+
* not move.
35+
*/
36+
37+
import { PLURAL_TO_SINGULAR } from '@objectstack/spec/shared';
38+
import type { ObjectStackProtocolImplementation } from './protocol.js';
39+
40+
/**
41+
* The `ObjectStackProtocolImplementation` members the functions below read —
42+
* every one of them, and no other; each function's `this` is the `Pick` of
43+
* the members it reads. Each is typed AS the class member (an indexed access
44+
* on the class), so a change to a member's signature on the class is a change
45+
* here too, and naming a member the class does not have is a compile error.
46+
*/
47+
export interface CodeDatasourcePredicatesHost {
48+
readonly engine: ObjectStackProtocolImplementation['engine'];
49+
readonly getServicesRegistry: ObjectStackProtocolImplementation['getServicesRegistry'];
50+
readonly isHostCodeDatasource: ObjectStackProtocolImplementation['isHostCodeDatasource'];
51+
}
52+
53+
/** The body of `ObjectStackProtocolImplementation#isDeclaredCodeDatasource`; the method's docblock there is its contract. */
54+
export function isDeclaredCodeDatasource(
55+
this: Pick<CodeDatasourcePredicatesHost, 'engine' | 'isHostCodeDatasource'>,
56+
type: string,
57+
name: string,
58+
): boolean {
59+
if ((PLURAL_TO_SINGULAR[type] ?? type) !== 'datasource') return false;
60+
if (this.isHostCodeDatasource(type, name)) return true;
61+
const registry = (this.engine as any)?.registry;
62+
if (typeof registry?.getAllPackages !== 'function') return false;
63+
for (const record of registry.getAllPackages() as unknown[]) {
64+
const declared = (record as { manifest?: { datasources?: unknown } } | null | undefined)
65+
?.manifest?.datasources;
66+
if (Array.isArray(declared) && declared.some((ds) => (ds as { name?: unknown } | null)?.name === name)) {
67+
return true;
68+
}
69+
}
70+
return false;
71+
}
72+
73+
/** The body of `ObjectStackProtocolImplementation#isHostCodeDatasource`; the method's docblock there is its contract. */
74+
export function isHostCodeDatasource(
75+
this: Pick<CodeDatasourcePredicatesHost, 'getServicesRegistry'>,
76+
type: string,
77+
name: string,
78+
): boolean {
79+
if ((PLURAL_TO_SINGULAR[type] ?? type) !== 'datasource') return false;
80+
const hostCode = this.getServicesRegistry?.().get('code-datasource-names') as { has?: unknown } | undefined;
81+
return typeof hostCode?.has === 'function' && (hostCode as { has(n: string): boolean }).has(name);
82+
}

‎packages/metadata-protocol/src/protocol.ts‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,8 @@ import { emitMetaItemPublished, notifyMutationListenersLocal, publishMetadataMut
419419
import { hierarchyResolverMounted, orgWallEnforced, rlsMembershipResolverKeys, tenancyPostureInForce } from './protocol-authoring-posture-probes.js';
420420
// [#25467 cut 27] The automation service's flow reads: the stored-flow canonicalizer and the engine's registrations.
421421
import { flowRegistrationsOf, resolveFlowCanonicalizer, resolveFlowRegistrationReader } from './protocol-automation-flow-reads.js';
422+
// [#25467 cut 28] The code-datasource predicates: declared by an installed package, or registered by the host.
423+
import { isDeclaredCodeDatasource, isHostCodeDatasource } from './protocol-code-datasource-predicates.js';
422424

423425
/**
424426
* Canonical Zod schema per metadata type lives in
@@ -15673,18 +15675,13 @@ export class ObjectStackProtocolImplementation implements
1567315675
* datasource stays creatable, editable and removable through this door.
1567415676
*/
1567515677
private isDeclaredCodeDatasource(type: string, name: string): boolean {
15676-
if ((PLURAL_TO_SINGULAR[type] ?? type) !== 'datasource') return false;
15677-
if (this.isHostCodeDatasource(type, name)) return true;
15678-
const registry = (this.engine as any)?.registry;
15679-
if (typeof registry?.getAllPackages !== 'function') return false;
15680-
for (const record of registry.getAllPackages() as unknown[]) {
15681-
const declared = (record as { manifest?: { datasources?: unknown } } | null | undefined)
15682-
?.manifest?.datasources;
15683-
if (Array.isArray(declared) && declared.some((ds) => (ds as { name?: unknown } | null)?.name === name)) {
15684-
return true;
15685-
}
15686-
}
15687-
return false;
15678+
// [#25467 cut 28] The body moved to `protocol-code-datasource-predicates.ts` (see `CodeDatasourcePredicatesHost`).
15679+
const readEngine = () => this.engine;
15680+
const host: ThisParameterType<typeof isDeclaredCodeDatasource> = {
15681+
get engine() { return readEngine(); },
15682+
isHostCodeDatasource: (...a) => this.isHostCodeDatasource(...a),
15683+
};
15684+
return isDeclaredCodeDatasource.call(host, type, name);
1568815685
}
1568915686

1569015687
/**
@@ -15695,9 +15692,12 @@ export class ObjectStackProtocolImplementation implements
1569515692
* those rows to that warning).
1569615693
*/
1569715694
private isHostCodeDatasource(type: string, name: string): boolean {
15698-
if ((PLURAL_TO_SINGULAR[type] ?? type) !== 'datasource') return false;
15699-
const hostCode = this.getServicesRegistry?.().get('code-datasource-names') as { has?: unknown } | undefined;
15700-
return typeof hostCode?.has === 'function' && (hostCode as { has(n: string): boolean }).has(name);
15695+
// [#25467 cut 28] The body moved to `protocol-code-datasource-predicates.ts` (see `CodeDatasourcePredicatesHost`).
15696+
const readGetServicesRegistry = () => this.getServicesRegistry;
15697+
const host: ThisParameterType<typeof isHostCodeDatasource> = {
15698+
get getServicesRegistry() { return readGetServicesRegistry(); },
15699+
};
15700+
return isHostCodeDatasource.call(host, type, name);
1570115701
}
1570215702

1570315703
/**

0 commit comments

Comments
 (0)