@nocobase/app-template-default 1.0.0-beta.57 → 1.0.0-beta.58

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/AGENTS.md CHANGED
@@ -6,6 +6,8 @@ Do not create a plugin to add a feature. Plugins are separately published packag
6
6
 
7
7
  When users refer to annotations, marks, or selections in the current application, first run `pnpm exec agent-annotations list --json` from the application root to find Agent Annotations records, ask for clarification only if none match or the target remains unclear, and do not implement annotation requests when the user only asks where they are.
8
8
 
9
+ The Workflow plugin is retained as a dependency but is disabled by default in Client, Server, and CLI. Its configuration and example sources are retained for explicit opt-in use.
10
+
9
11
  ## Default template scope
10
12
 
11
13
  Default is the clean application starting point. It registers product capabilities but no `app-plugin-*-example` plugins, example pages, application sample services, or sample APIs. Keep runnable demonstrations in `app-template-examples`. Application-owned server routes start empty; the only built-in application provider exposes Authorization Permission Sets as direct roles in the Users page. The only application page is a localized homepage.
package/README.MD CHANGED
@@ -422,6 +422,10 @@ curl -H "x-api-key: <key>" http://127.0.0.1:13000/main/api/swagger
422
422
 
423
423
  Replace `/main` with the application's `APP_BASE_PATH`. An application without the authentication plugin registers no way to tell who is asking, so it does not serve the documentation at all and both URLs answer `404`. There is no setting that makes it public.
424
424
 
425
+ ## Optional Workflow plugin
426
+
427
+ The Workflow plugin is disabled by default in Client, Server, and CLI. Its package dependency and `server/config/workflow.ts` are retained. To opt in, register the plugin with `pnpm nocobase plugin register @nocobase/app-plugin-workflow` and restore the `workflow` import, type, and entry in `server/config/index.ts`.
428
+
425
429
  ## Working with an AI agent
426
430
 
427
431
  `AGENTS.md` describes how to build features here, and `.agents/skills/` contains package-owned guidance generated by `pnpm nocobase skills sync`. Give an agent an API key when it needs to call the application: it learns the available endpoints from the API document above rather than from route sources. If you use Claude Code, `CLAUDE.md` points at the same guidance. Keep application-specific rules in committed `AGENTS.md` files because synchronization replaces package-owned Skill directories.
@@ -449,7 +453,7 @@ Remotes are saved in `.nocobase/hub.json`, which holds addresses only and belong
449
453
 
450
454
  The `hub` commands authenticate with a Hub publishing key, created in Hub rather than in this application. Open **API Keys** in the Hub navigation (`<Hub URL>/api-keys`); reaching that page requires `hub.app / manage-api-keys`, granted to `hub-administrator` and `hub-operator` by default. In **Create API Key**, select this application under **Applications**, or **All applications (including future apps)**, then grant the permissions the commands below need: **Upload release** for `pnpm nocobase hub upload`, and both **Upload release** and **Deploy release** for `pnpm nocobase hub deploy`.
451
455
 
452
- The plaintext key is shown once at creation; while the key stays active its creator can copy it again from the same page. Bound applications and granted permissions cannot be changed afterwards, so a key created without `Deploy release` has to be deleted and recreated rather than edited. A key never exceeds its creator's current permissions, so uploads fail if the creator later loses access to the bound application. See [Publish applications with Hub](https://github.com/nocobase/nocobase3/blob/develop/docs/docs/en/deployment/hub.md) for the console walkthrough.
456
+ The plaintext key is shown once at creation; while the key stays active its creator can copy it again from the same page. Bound applications and granted permissions cannot be changed afterwards, so a key created without `Deploy release` has to be deleted and recreated rather than edited. A key never exceeds its creator's current permissions, so uploads fail if the creator later loses access to the bound application. See [Publish applications with Hub](https://github.com/nocobase/nocobase/blob/v3-develop/docs/docs/en/deployment/hub.md) for the console walkthrough.
453
457
 
454
458
  Save the key with `pnpm nocobase hub auth login`, which asks for it without echoing it and checks with the Hub that it opens the App. It is stored outside the project in `$XDG_CONFIG_HOME/nocobase/hub-credentials.json` (`~/.config` when that is unset, `%APPDATA%\nocobase` on Windows), readable by the owner only, one key per remote URL. The commands read no key or Hub address from `.env`, the environment or command-line flags. `hub auth status` reports whether each remote has a key the Hub accepts, and `hub auth logout` removes a saved key. In CI, pipe the key in from a secret:
455
459
 
package/cli/plugins.ts CHANGED
@@ -1,14 +1,8 @@
1
1
  import { defineCliPlugins, type AppCliPlugins } from '@nocobase/app-cli';
2
- import aiEmployee from '@nocobase/app-plugin-ai-employee/cli';
3
2
  import scheduler from '@nocobase/app-plugin-scheduler/cli';
4
- import workflow from '@nocobase/app-plugin-workflow/cli';
5
3
 
6
4
  // Array order is command registration order. A plugin contributes its commands
7
5
  // by appearing in this list; removing its entry and its import removes them.
8
- const cliPlugins: AppCliPlugins = defineCliPlugins([
9
- workflow,
10
- scheduler,
11
- aiEmployee,
12
- ]);
6
+ const cliPlugins: AppCliPlugins = defineCliPlugins([scheduler]);
13
7
 
14
8
  export default cliPlugins;
package/client/plugins.ts CHANGED
@@ -5,7 +5,6 @@ import {
5
5
  defineClientPlugins,
6
6
  type AppClientPlugins,
7
7
  } from '@nocobase/app-client/plugins';
8
- import aiEmployee from '@nocobase/app-plugin-ai-employee/client';
9
8
  import apiKeys from '@nocobase/app-plugin-api-keys/client';
10
9
  import authentication from '@nocobase/app-plugin-authentication/client';
11
10
  import authorization from '@nocobase/app-plugin-authorization/client';
@@ -13,7 +12,6 @@ import databaseExplorer from '@nocobase/app-plugin-database-explorer/client';
13
12
  import users from '@nocobase/app-plugin-users/client';
14
13
  import notificationInApp from '@nocobase/app-plugin-notification-in-app/client';
15
14
  import i18n from '@nocobase/app-plugin-i18n/client';
16
- import workflow from '@nocobase/app-plugin-workflow/client';
17
15
  import notification from '@nocobase/app-plugin-notification/client';
18
16
  import scheduler from '@nocobase/app-plugin-scheduler/client';
19
17
  import file from '@nocobase/app-plugin-file/client';
@@ -22,7 +20,6 @@ import file from '@nocobase/app-plugin-file/client';
22
20
  // list; removing its entry and its import disables it.
23
21
  const clientPlugins: AppClientPlugins = defineClientPlugins([
24
22
  authentication(),
25
- aiEmployee(),
26
23
  authorization(),
27
24
  defaultAccess(),
28
25
  sharingRules(),
@@ -32,7 +29,6 @@ const clientPlugins: AppClientPlugins = defineClientPlugins([
32
29
  apiKeys({ path: '/api-keys' }),
33
30
  i18n(),
34
31
  notificationInApp(),
35
- workflow(),
36
32
  notification(),
37
33
  file(),
38
34
  scheduler(),
@@ -84,22 +84,6 @@ notification:
84
84
  # provider: dingtalk-webhook
85
85
  # webhookUrl: https://oapi.dingtalk.com/robot/send?access_token=replace-with-the-token
86
86
 
87
- # Declarative LLM services are loaded from application config, keyed by service name.
88
- # The server reads this when it starts: restart it after editing, which `pnpm dev` does on its own.
89
- # Keep the key out of this file. Write it into config.yml with
90
- # `pnpm nocobase config set --from-env ai.llmServices.openai.options.apiKey=OPENAI_API_KEY`,
91
- # or map an injected environment variable onto that path in server/config/ai.ts.
92
- # ai:
93
- # llmServices:
94
- # openai:
95
- # title: OpenAI
96
- # provider: openai
97
- # enabledModels:
98
- # - label: GPT-4.1
99
- # value: gpt-4.1
100
- # enabled: true
101
- # sort: 10
102
-
103
87
  # DB_DIALECT, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD, DB_SSL and DB_FILENAME override the main
104
88
  # connection's fields from the environment.
105
89
  database:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nocobase/app-template-default",
3
3
  "displayName": "Default Template",
4
- "version": "1.0.0-beta.57",
4
+ "version": "1.0.0-beta.58",
5
5
  "type": "module",
6
6
  "prettier": "@nocobase/dev-config/prettier",
7
7
  "engines": {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "nocobase": {
11
11
  "templateKind": "app",
12
- "defaultTemplateVersion": "1.0.0-beta.57"
12
+ "defaultTemplateVersion": "1.0.0-beta.58"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@ai-sdk/react": "2.0.0",
@@ -77,13 +77,13 @@
77
77
  "vitest": "^4.1.10",
78
78
  "tar": "^7.5.22",
79
79
  "@nocobase/app-client": "^2.0.0-beta.2",
80
- "@nocobase/app-plugin-template-print": "0.0.2-beta.0",
81
- "@nocobase/app-skills": "0.1.0-beta.25",
80
+ "@nocobase/app-plugin-template-print": "0.0.2-beta.1",
81
+ "@nocobase/app-skills": "0.1.0-beta.26",
82
+ "@nocobase/app-testing": "0.1.0-beta.1",
82
83
  "@nocobase/app-websocket": "^0.0.1",
83
- "@nocobase/dev-config": "0.1.0-beta.19",
84
+ "@nocobase/dev-config": "0.1.0-beta.20",
84
85
  "@nocobase/drive": "^0.1.0-beta.4",
85
- "@nocobase/app-testing": "0.1.0-beta.1",
86
- "@nocobase/hub-cli": "^1.0.0-beta.1",
86
+ "@nocobase/hub-cli": "^1.0.0-beta.2",
87
87
  "@nocobase/logging": "^0.1.0-beta.6",
88
88
  "@nocobase/session": "^0.1.0-beta.2"
89
89
  },
@@ -124,7 +124,7 @@
124
124
  },
125
125
  "repository": {
126
126
  "type": "git",
127
- "url": "git+https://github.com/nocobase/nocobase3.git",
127
+ "url": "git+https://github.com/nocobase/nocobase.git",
128
128
  "directory": "packages/templates/app-template-default"
129
129
  },
130
130
  "browserslist": {
@@ -144,22 +144,21 @@
144
144
  "@oclif/core": "^4.14.0",
145
145
  "better-auth": "1.7.5",
146
146
  "hono": "^4.13.2",
147
- "@nocobase/app-plugin-ai-employee": "^3.0.0-beta.1",
148
147
  "@nocobase/app-plugin-api-keys": "^1.0.0-beta.13",
149
148
  "@nocobase/app-plugin-authentication": "^2.0.0-beta.2",
150
149
  "@nocobase/app-plugin-authorization": "^1.0.0-beta.25",
151
150
  "@nocobase/app-plugin-database-explorer": "^1.0.0-beta.11",
152
- "@nocobase/app-plugin-file": "^1.0.0-beta.20",
151
+ "@nocobase/app-plugin-file": "^1.0.0-beta.21",
153
152
  "@nocobase/app-plugin-i18n": "^1.0.0-beta.13",
154
153
  "@nocobase/app-plugin-notification": "^1.0.0-beta.24",
155
154
  "@nocobase/app-plugin-notification-in-app": "^1.0.0-beta.22",
156
155
  "@nocobase/app-plugin-notification-providers": "^0.2.0-beta.10",
157
- "@nocobase/app-plugin-scheduler": "^1.0.0-beta.14",
156
+ "@nocobase/app-plugin-scheduler": "^1.0.0-beta.15",
158
157
  "@nocobase/app-plugin-users": "^2.0.0-beta.1",
159
- "@nocobase/app-server": "^2.0.0-beta.1",
158
+ "@nocobase/app-plugin-workflow": "^2.0.0-beta.1",
159
+ "@nocobase/app-server": "^2.0.0-beta.2",
160
160
  "@nocobase/config": "^0.1.0-beta.2",
161
161
  "@nocobase/db": "^1.0.0-beta.18",
162
- "@nocobase/app-plugin-workflow": "^2.0.0-beta.1",
163
162
  "@nocobase/db-sqlite": "^0.1.0-beta.4",
164
163
  "@nocobase/service-provider": "^0.0.2-beta.1",
165
164
  "@nocobase/snowflake": "^1.0.0-beta.3",
@@ -171,9 +170,8 @@
171
170
  "@nocobase/jobs": "^0.1.0-beta.2",
172
171
  "@nocobase/i18n": "^1.0.0-beta.5",
173
172
  "@nocobase/caching": "^0.1.0-beta.2",
174
- "@nocobase/ai-employee": "^0.2.0-beta.8",
175
173
  "@nocobase/repository-input": "^0.1.0-beta.2",
176
- "@nocobase/app-cli": "^1.0.0-beta.14"
174
+ "@nocobase/app-cli": "^1.0.0-beta.15"
177
175
  },
178
176
  "description": "NocoBase 3 application template with the standard product capabilities.",
179
177
  "imports": {
@@ -20,8 +20,6 @@ import app from './app.js';
20
20
  import api from './api.js';
21
21
  import database from './database.js';
22
22
  import snowflake from './snowflake.js';
23
- import ai from './ai.js';
24
- import workflow from './workflow.js';
25
23
  import users from './users.js';
26
24
 
27
25
  const defaultConfigs: AppConfigFactory<{
@@ -43,8 +41,6 @@ const defaultConfigs: AppConfigFactory<{
43
41
  api: ReturnType<typeof api>;
44
42
  database: ReturnType<typeof database>;
45
43
  snowflake: ReturnType<typeof snowflake>;
46
- ai: ReturnType<typeof ai>;
47
- workflow: ReturnType<typeof workflow>;
48
44
  users: ReturnType<typeof users>;
49
45
  }> = defaultAppConfigs({
50
46
  auth,
@@ -65,8 +61,6 @@ const defaultConfigs: AppConfigFactory<{
65
61
  api,
66
62
  database,
67
63
  snowflake,
68
- ai,
69
- workflow,
70
64
  users,
71
65
  });
72
66
 
package/server/plugins.ts CHANGED
@@ -3,7 +3,6 @@ import sharingRules from '@nocobase/app-plugin-authz-sharing-rules/server';
3
3
  import restrictionRules from '@nocobase/app-plugin-authz-restriction-rules/server';
4
4
  import apiKeys from '@nocobase/app-plugin-api-keys/server';
5
5
  import authentication from '@nocobase/app-plugin-authentication/server';
6
- import aiEmployee from '@nocobase/app-plugin-ai-employee/server/plugin';
7
6
  import authorization from '@nocobase/app-plugin-authorization/server';
8
7
  import databaseExplorer from '@nocobase/app-plugin-database-explorer/server';
9
8
  import users from '@nocobase/app-plugin-users/server';
@@ -11,7 +10,6 @@ import i18n from '@nocobase/app-plugin-i18n/server';
11
10
  import notification from '@nocobase/app-plugin-notification/server';
12
11
  import notificationInApp from '@nocobase/app-plugin-notification-in-app/server';
13
12
  import notificationProviders from '@nocobase/app-plugin-notification-providers/server';
14
- import workflow from '@nocobase/app-plugin-workflow/server';
15
13
  import {
16
14
  defineServerPlugins,
17
15
  type AppServerPlugins,
@@ -21,7 +19,6 @@ import file from '@nocobase/app-plugin-file/server';
21
19
 
22
20
  const serverPlugins: AppServerPlugins = defineServerPlugins([
23
21
  authentication,
24
- aiEmployee,
25
22
  authorization,
26
23
  defaultAccess,
27
24
  sharingRules,
@@ -33,7 +30,6 @@ const serverPlugins: AppServerPlugins = defineServerPlugins([
33
30
  notification,
34
31
  notificationInApp,
35
32
  notificationProviders,
36
- workflow,
37
33
  file,
38
34
  scheduler,
39
35
  ]);
@@ -187,7 +187,7 @@ describe('application config', () => {
187
187
  expect(runtime.config.get('session.stores.redis.host')).toBe('127.0.0.1');
188
188
  expect(runtime.config.get('logging.console.pretty')).toBe(false);
189
189
  expect(runtime.config.get('session.cookie.secure')).toBe(true);
190
- expect(runtime.config.get('workflow.production')).toBe(true);
190
+ expect(runtime.config.get('workflow')).toBeUndefined();
191
191
  delete runtime.env.APP_SERVER_PORT;
192
192
  delete runtime.env.APP_SERVER_START_LOG;
193
193
  await runtime.config.reload();
@@ -8,8 +8,7 @@ import { describe, expect, it } from 'vitest';
8
8
 
9
9
  import clientPlugins from '../../client/plugins.js';
10
10
 
11
- // The plugins whose pages the permission workspace offers as page grants. The AI employee settings are granted under
12
- // System management instead, one settings item per page.
11
+ // The plugins whose pages the permission workspace offers as page grants.
13
12
  const PAGE_GRANT_PLUGINS = [
14
13
  '@nocobase/app-plugin-users',
15
14
  '@nocobase/app-plugin-notification',
@@ -42,28 +41,6 @@ describe('plugin page authorization', () => {
42
41
  new Set(PAGE_GRANT_PLUGINS),
43
42
  );
44
43
  });
45
-
46
- it('checks a System management settings item on every AI employee settings page', () => {
47
- const resolved = resolveAppClientContributions(
48
- clientPlugins.plugins.map((plugin) => ({
49
- packageName: plugin.packageName,
50
- source: 'plugin' as const,
51
- routes: plugin.routes,
52
- })),
53
- );
54
- const pages = entryPages(resolved.settingsRouteTree).filter(
55
- (route) => route.packageName === '@nocobase/app-plugin-ai-employee',
56
- );
57
- expect(pages.length).toBeGreaterThan(0);
58
- for (const page of pages)
59
- expect({ id: page.id, authz: page.authz }).toMatchObject({
60
- id: page.id,
61
- authz: {
62
- resource: { type: 'settings', id: expect.stringMatching(/^ai\./) },
63
- action: 'read',
64
- },
65
- });
66
- });
67
44
  });
68
45
 
69
46
  /** Pages without a page above them: nested pages share their parent's check. */
package/vitest.config.ts CHANGED
@@ -24,7 +24,14 @@ export default createReactVitestConfig({
24
24
  // those tests were never run at all.
25
25
  include: ['tests/**/*.test.{ts,tsx}'],
26
26
  // Playwright runs tests/playwright/ against a built application; its files are named *.test.ts too.
27
- exclude: ['tests/playwright/**'],
27
+ exclude: [
28
+ 'tests/playwright/**',
29
+ // TODO: Re-enable Workflow examples and page tests with the capability tests.
30
+ 'tests/components/workflow-waiting-task.test.tsx',
31
+ 'tests/logic/workflow-examples.test.ts',
32
+ 'tests/logic/quotation-review-routes.test.ts',
33
+ 'tests/logic/analytics-report-date.test.ts',
34
+ ],
28
35
  setupFiles: ['./tests/setup/client-config.ts'],
29
36
  // Keep the command usable if an application intentionally removes all scaffold tests before adding its own.
30
37
  passWithNoTests: true,
@@ -1,27 +0,0 @@
1
- import type { AppConfigFactory } from '@nocobase/app-server/config';
2
- import {
3
- defineAIConfig,
4
- type AIApplicationConfig,
5
- } from '@nocobase/app-plugin-ai-employee/server/config';
6
-
7
- const ai: AppConfigFactory<AIApplicationConfig> = defineAIConfig({
8
- // Map a secret onto the field of one service it sets, keyed by that
9
- // service's name, such as
10
- // `OPENAI_API_KEY: envString('llmServices.openai.options.apiKey')` or
11
- // `GITHUB_MCP_TOKEN: envString('mcpServers.github.headers.Authorization')`.
12
- env: {},
13
- defaults: () => ({
14
- storage: {},
15
- aiEmployee: { storage: {} },
16
- aiKnowledgeBase: {
17
- storage: {},
18
- vectorDatabases: [],
19
- manifests: [],
20
- },
21
- llmServices: {},
22
- skills: { paths: [] },
23
- mcpServers: {},
24
- }),
25
- });
26
-
27
- export default ai;