create-objectstack 17.1.0 → 17.3.0
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.
- package/CHANGELOG.md +449 -0
- package/README.md +1 -1
- package/dist/chunk-ZIUW7UEA.js +112 -0
- package/dist/created-summary.d.ts +48 -0
- package/dist/created-summary.js +16 -0
- package/dist/index.js +221 -105
- package/dist/templates/AGENTS.md +1 -1
- package/dist/templates/blank/Dockerfile +2 -2
- package/dist/templates/blank/README.md +32 -8
- package/dist/templates/blank/docker-compose.yml +1 -1
- package/dist/templates/blank/objectstack.config.ts +19 -15
- package/dist/templates/blank/package.json +3 -0
- package/dist/templates/blank/pnpm-workspace.yaml +57 -2
- package/dist/templates/blank/src/objects/note.object.ts +6 -2
- package/package.json +8 -2
|
@@ -9,6 +9,11 @@ pnpm install
|
|
|
9
9
|
pnpm dev
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
+
After editing any metadata (an object, view, flow, …), run `pnpm validate` —
|
|
13
|
+
see [Verify your changes](#verify-your-changes) below. It is the one command
|
|
14
|
+
this project's `AGENTS.md` calls unskippable: it catches mistakes that
|
|
15
|
+
otherwise fail silently at runtime.
|
|
16
|
+
|
|
12
17
|
The REST API is served at `http://localhost:3000/api/v1`. Data endpoints
|
|
13
18
|
require a session — the dev server seeds a login-ready admin
|
|
14
19
|
(`admin@objectos.ai` / `admin123`) on an empty database:
|
|
@@ -21,6 +26,23 @@ curl -c cookies.txt -X POST http://localhost:3000/api/v1/auth/sign-in/email \
|
|
|
21
26
|
curl -b cookies.txt "http://localhost:3000/api/v1/data/<your_object>"
|
|
22
27
|
```
|
|
23
28
|
|
|
29
|
+
## The Console — this starter ships no app
|
|
30
|
+
|
|
31
|
+
`pnpm dev` also serves the admin Console at `http://localhost:3000/_console/`,
|
|
32
|
+
and prints the link on boot. Open it and you will see the platform's own apps
|
|
33
|
+
(Setup, Account) and **not** the object in `src/objects/` — this starter ships
|
|
34
|
+
objects only, with no app and no views.
|
|
35
|
+
|
|
36
|
+
That is the intended starting point, not a broken install. The object is live
|
|
37
|
+
the whole time — the `curl` above returns it, and an MCP client can read and
|
|
38
|
+
write it. What it has no route into is the Console's navigation.
|
|
39
|
+
|
|
40
|
+
**An object appears in Console navigation only when an app lists it.** Add an
|
|
41
|
+
`*.app.ts` under `src/apps/` (plus the views it points at), and the Console
|
|
42
|
+
renders it after the next `pnpm dev` rebuild. The `objectstack-ui` skill covers
|
|
43
|
+
the shape; describing the app you want to your coding agent is the intended
|
|
44
|
+
path.
|
|
45
|
+
|
|
24
46
|
## Your app is an MCP server
|
|
25
47
|
|
|
26
48
|
Every ObjectStack app is itself a
|
|
@@ -36,7 +58,7 @@ claude mcp add --transport http my-app http://localhost:3000/api/v1/mcp
|
|
|
36
58
|
|
|
37
59
|
Set `OS_MCP_SERVER_ENABLED=false` to turn it off. This is the *serve* side — the
|
|
38
60
|
reverse of the `mcp` connector below (which lets your app *call* other MCP
|
|
39
|
-
servers). See [Connect an MCP Client](https://
|
|
61
|
+
servers). See [Connect an MCP Client](https://objectstack.ai/docs/ai/connect-mcp)
|
|
40
62
|
for OAuth, API keys, and which objects/actions become tools.
|
|
41
63
|
|
|
42
64
|
## Layout
|
|
@@ -57,9 +79,11 @@ can call an external system from a flow as pure metadata — no host code:
|
|
|
57
79
|
|
|
58
80
|
Add a `connectors:` entry that names one of these `provider`s and the
|
|
59
81
|
`automation` capability materializes it into a live, dispatchable connector at
|
|
60
|
-
boot
|
|
61
|
-
|
|
62
|
-
|
|
82
|
+
boot — see [Automation → Connectors](https://objectstack.ai/docs/automation/connectors)
|
|
83
|
+
for how that materialization works; a flow's `connector_action` node then
|
|
84
|
+
calls it. To add a brand connector (e.g. Slack), install its package and add
|
|
85
|
+
`new ConnectorSlackPlugin()` to `plugins:`; to drop a provider, remove its
|
|
86
|
+
plugin.
|
|
63
87
|
|
|
64
88
|
> **Security — declarative MCP over stdio.** An `mcp` connector whose transport
|
|
65
89
|
> spawns a local process (`stdio`) is denied by default, because the command
|
|
@@ -67,7 +91,7 @@ to `plugins:`; to drop a provider, remove its plugin.
|
|
|
67
91
|
> `new ConnectorMcpPlugin({ declarativeStdio: ['node'] })`; `http` transports
|
|
68
92
|
> need no opt-in.
|
|
69
93
|
|
|
70
|
-
See [Automation → Flows](https://
|
|
94
|
+
See [Automation → Flows](https://objectstack.ai/docs/automation/flows) for
|
|
71
95
|
the full connector and `connector_action` guide.
|
|
72
96
|
|
|
73
97
|
## Verify your changes
|
|
@@ -105,7 +129,7 @@ curl -fsS http://localhost:8080/api/v1/health
|
|
|
105
129
|
```
|
|
106
130
|
|
|
107
131
|
Bare Node, Kubernetes, reverse-proxy wiring, and the required secrets are
|
|
108
|
-
covered in [Self-Hosted Deployment](https://
|
|
132
|
+
covered in [Self-Hosted Deployment](https://objectstack.ai/docs/deployment/self-hosting).
|
|
109
133
|
|
|
110
134
|
## Next steps
|
|
111
135
|
|
|
@@ -114,5 +138,5 @@ covered in [Self-Hosted Deployment](https://docs.objectstack.ai/docs/deployment/
|
|
|
114
138
|
- Add a flow or automation: see `objectstack-automation`.
|
|
115
139
|
- Add an AI agent: see `objectstack-ai`.
|
|
116
140
|
|
|
117
|
-
Skills
|
|
118
|
-
assistant catalog.
|
|
141
|
+
Skills are installed with `npx skills add objectstack-ai/objectstack/skills`
|
|
142
|
+
(see `AGENTS.md`) and also show up in the in-IDE assistant catalog.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# POSTGRES_PASSWORD / OS_AUTH_SECRET / OS_SECRET_KEY (generate secrets with
|
|
5
5
|
# `openssl rand -hex 32`), then `docker compose up -d`.
|
|
6
6
|
#
|
|
7
|
-
# Docs: https://
|
|
7
|
+
# Docs: https://objectstack.ai/docs/deployment/self-hosting
|
|
8
8
|
|
|
9
9
|
services:
|
|
10
10
|
app:
|
|
@@ -12,27 +12,31 @@ export default defineStack({
|
|
|
12
12
|
type: 'app',
|
|
13
13
|
name: 'Blank Starter',
|
|
14
14
|
description: 'Minimal ObjectStack environment — a clean slate for building.',
|
|
15
|
-
// Protocol compatibility range
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
15
|
+
// Protocol compatibility range: the metadata-protocol major this app is
|
|
16
|
+
// authored against. The runtime checks it before it loads anything, so a
|
|
17
|
+
// runtime outside the range refuses this app at the boundary with the exact
|
|
18
|
+
// migration command instead of crashing later. Scaffolding stamped it to
|
|
19
|
+
// match the ObjectStack version you installed — change it when you
|
|
20
|
+
// deliberately move to a new protocol major, not to silence a mismatch.
|
|
21
|
+
// Guide: https://objectstack.ai/docs/upgrading
|
|
19
22
|
engines: { protocol: '^17' },
|
|
20
23
|
},
|
|
21
24
|
|
|
22
|
-
// `automation` backs flow execution and
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
// without `automation` loaded they have nowhere to register and boot fails,
|
|
26
|
-
// keep this capability whenever `plugins:` lists a connector.
|
|
25
|
+
// `automation` backs flow execution and materializes any declarative
|
|
26
|
+
// `connectors:` entry into a live, dispatchable connector at boot. The
|
|
27
|
+
// connector executors below register their provider factories with it —
|
|
28
|
+
// without `automation` loaded they have nowhere to register and boot fails,
|
|
29
|
+
// so keep this capability whenever `plugins:` lists a connector.
|
|
27
30
|
requires: ['automation'],
|
|
28
31
|
|
|
29
|
-
// Generic connector executors
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
// Security
|
|
34
|
-
//
|
|
32
|
+
// Generic connector executors, default-present so you can add a `connectors:`
|
|
33
|
+
// entry naming `provider: 'rest' | 'openapi' | 'mcp'` and have it materialize
|
|
34
|
+
// with zero host code. Zero-arg = contribute the provider factory only. Brand
|
|
35
|
+
// connectors (Slack, …) stay marketplace/opt-in.
|
|
36
|
+
// Security: a declarative `mcp` stdio transport spawns a local process from
|
|
37
|
+
// metadata, so it is denied by default — opt in per host with
|
|
35
38
|
// `new ConnectorMcpPlugin({ declarativeStdio: ['<trusted-command>'] })`.
|
|
39
|
+
// Authoring guide: https://objectstack.ai/docs/automation/connectors
|
|
36
40
|
plugins: [
|
|
37
41
|
new ConnectorRestPlugin(),
|
|
38
42
|
new ConnectorOpenApiPlugin(),
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
+
# An explicit EMPTY workspace: this project has no member packages, so
|
|
2
|
+
# this file is settings-only. The key is not decoration — pnpm 9.x and
|
|
3
|
+
# 10.0–10.4 parse this file BEFORE they read `engines`, and refuse a file
|
|
4
|
+
# without a `packages:` key outright ("ERROR packages field missing or
|
|
5
|
+
# empty") before resolving a single dependency.
|
|
6
|
+
# Not `packages: ['.']`: that would declare this project a workspace
|
|
7
|
+
# MEMBER — a monorepo root, which it is not.
|
|
8
|
+
packages: []
|
|
9
|
+
|
|
1
10
|
# pnpm does not run dependency install scripts unless they are approved here.
|
|
2
11
|
# Without this file a fresh `pnpm install` on pnpm 11 exits 1 with
|
|
3
12
|
# ERR_PNPM_IGNORED_BUILDS — pnpm 10 only warned, pnpm 11 made it a hard error.
|
|
4
13
|
#
|
|
5
14
|
# Both keys are needed; they are read by different pnpm versions:
|
|
6
|
-
# allowBuilds pnpm >= 10.
|
|
15
|
+
# allowBuilds pnpm >= 10.26 and pnpm 11+. pnpm 11 reads ONLY this
|
|
7
16
|
# one — onlyBuiltDependencies alone still errors.
|
|
8
|
-
# onlyBuiltDependencies pnpm 10.0–10.
|
|
17
|
+
# onlyBuiltDependencies pnpm 10.0–10.25, which do not understand allowBuilds.
|
|
9
18
|
#
|
|
10
19
|
# better-sqlite3 is the native sqlite driver (@objectstack/driver-sql's optional
|
|
11
20
|
# dependency); esbuild compiles objectstack.config.ts. Both ship prebuilt
|
|
@@ -21,3 +30,49 @@ onlyBuiltDependencies:
|
|
|
21
30
|
allowBuilds:
|
|
22
31
|
better-sqlite3: true
|
|
23
32
|
esbuild: true
|
|
33
|
+
|
|
34
|
+
# Some third-party peer ranges resolve outside what their declaring package
|
|
35
|
+
# states. `pnpm install` reports each one as an unmet peer — which would be the
|
|
36
|
+
# first thing a brand-new project shows you — and none is a real
|
|
37
|
+
# incompatibility:
|
|
38
|
+
#
|
|
39
|
+
# better-auth peers better-sqlite3 ^12.0.0 while the tree resolves 13.x. That
|
|
40
|
+
# peer is optional and covers handing better-auth a raw better-sqlite3
|
|
41
|
+
# `Database`; ObjectStack hands it an ObjectQL adapter instead, so nothing
|
|
42
|
+
# here goes down that path. Measured on the configuration the range does
|
|
43
|
+
# cover — better-auth's own Kysely dialect, running its migrations, sign-up,
|
|
44
|
+
# sign-in and adapter find/update/delete — 1.7.1 behaves identically on
|
|
45
|
+
# better-sqlite3 13.0.3 and on 12.11.1. The upstream range is stale.
|
|
46
|
+
#
|
|
47
|
+
# (The '@better-auth/scim>better-call' entry that used to sit here retired
|
|
48
|
+
# with the scim release-candidate pin — stable @better-auth/scim 1.7.1 peers
|
|
49
|
+
# better-call 1.4.0 exactly, so the skew it declared away is gone.)
|
|
50
|
+
#
|
|
51
|
+
# @better-auth/core, @better-auth/oauth-provider, @better-auth/scim and
|
|
52
|
+
# @better-auth/sso each peer an exact @better-auth/utils 0.4.2, while the
|
|
53
|
+
# tree hands them 0.5.0 — because better-call, better-auth's own HTTP layer,
|
|
54
|
+
# depends on ^0.5.0, and that is the copy your project's plugins resolve
|
|
55
|
+
# their peer against. Measured on the surface the range governs: those four
|
|
56
|
+
# import three symbols in total (base64/base64Url, createHash and, in core,
|
|
57
|
+
# createRandomStringGenerator), 0.5.0 declares all three unchanged, and on
|
|
58
|
+
# the inputs those call sites pass the two versions return identical values —
|
|
59
|
+
# checked again end to end through better-auth with the sso, oauth-provider
|
|
60
|
+
# and scim plugins, where both resolutions produce the same sign-up, sign-in,
|
|
61
|
+
# session, OAuth metadata, PKCE challenge and SCIM/SSO responses. Forcing
|
|
62
|
+
# utils back to 0.4.2 instead would push better-call off its own declared
|
|
63
|
+
# ^0.5.0 — trading four reported skews for one real one.
|
|
64
|
+
# Reported by pnpm 10.15–10.30; pnpm 10.31 changed peer resolution so all
|
|
65
|
+
# four land on 0.4.2 on their own. These four entries retire when the pnpm
|
|
66
|
+
# floor reaches 10.31, or when the four packages accept 0.5.0 upstream —
|
|
67
|
+
# NOT with the SCIM rc pin above, which the utils skew outlives.
|
|
68
|
+
#
|
|
69
|
+
# These suppress the report only: no resolution moves, and the lockfile is
|
|
70
|
+
# byte-identical with and without this block.
|
|
71
|
+
|
|
72
|
+
peerDependencyRules:
|
|
73
|
+
allowedVersions:
|
|
74
|
+
'better-auth>better-sqlite3': '13'
|
|
75
|
+
'@better-auth/core>@better-auth/utils': '0.5.0'
|
|
76
|
+
'@better-auth/oauth-provider>@better-auth/utils': '0.5.0'
|
|
77
|
+
'@better-auth/scim>@better-auth/utils': '0.5.0'
|
|
78
|
+
'@better-auth/sso>@better-auth/utils': '0.5.0'
|
|
@@ -21,8 +21,12 @@ export const Note = ObjectSchema.create({
|
|
|
21
21
|
}),
|
|
22
22
|
},
|
|
23
23
|
|
|
24
|
-
// Org-wide default (OWD): who can see records they don't own.
|
|
25
|
-
//
|
|
24
|
+
// Org-wide default (OWD): who can see records they don't own. `private` is
|
|
25
|
+
// owner-only until access is widened by a permission grant or a sharing rule.
|
|
26
|
+
// Declaring it is required, deliberately: `objectstack build` refuses an
|
|
27
|
+
// object that declares no OWD, so the baseline is always an authored decision
|
|
28
|
+
// rather than an accident. The other values, and how to widen access safely:
|
|
29
|
+
// https://objectstack.ai/docs/permissions/sharing-rules
|
|
26
30
|
sharingModel: 'private',
|
|
27
31
|
|
|
28
32
|
enable: {
|
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-objectstack",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.3.0",
|
|
4
4
|
"description": "Create a new ObjectStack project — npx create-objectstack",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-objectstack": "./bin/create-objectstack.js"
|
|
7
7
|
},
|
|
8
|
+
"exports": {
|
|
9
|
+
"./created-summary": {
|
|
10
|
+
"types": "./dist/created-summary.d.ts",
|
|
11
|
+
"import": "./dist/created-summary.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
8
14
|
"keywords": [
|
|
9
15
|
"objectstack",
|
|
10
16
|
"create",
|
|
@@ -43,7 +49,7 @@
|
|
|
43
49
|
"node": ">=22.0.0"
|
|
44
50
|
},
|
|
45
51
|
"scripts": {
|
|
46
|
-
"build": "tsup",
|
|
52
|
+
"build": "tsup && node ../../scripts/check-dts-emitted.mjs",
|
|
47
53
|
"typecheck": "tsc --noEmit",
|
|
48
54
|
"dev": "tsup --watch",
|
|
49
55
|
"test": "vitest run"
|