@joripspace/cli 0.6.0 → 0.7.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/LICENSE +21 -21
- package/README.md +193 -65
- package/THIRD_PARTY_NOTICES.md +136 -136
- package/bin/joripspace.js +37 -15
- package/lib/deploy-prepare.js +48 -0
- package/lib/deployment-error.js +14 -14
- package/lib/help.js +45 -3
- package/lib/start.js +28 -30
- package/package.json +1 -1
- package/vendor/core/cli-onboarding.cjs +33 -8
- package/vendor/core/onboarding.cjs +2443 -2431
- package/vendor/core/template-publish-workflow.cjs +169 -169
- package/vendor/templates/index.js +104 -104
- package/vendor/templates/templates/basic-worker/files/worker.js +9 -9
- package/vendor/templates/templates/basic-worker/manifest.json +14 -14
- package/vendor/templates/templates/r2-file-api/files/worker.js +42 -42
- package/vendor/templates/templates/r2-file-api/manifest.json +7 -7
package/lib/start.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const fs = require('node:fs');
|
|
2
2
|
const path = require('node:path');
|
|
3
|
-
const {
|
|
3
|
+
const { upsertProjectAgentsContent, JORIPSPACE_CLI_GUIDE } = require('../vendor/core/onboarding.cjs');
|
|
4
4
|
const { secretManagementUrl } = require('./secret-commands');
|
|
5
5
|
const crypto = require('node:crypto');
|
|
6
6
|
const { spawnSync } = require('node:child_process');
|
|
@@ -171,7 +171,13 @@ async function startProject(options) {
|
|
|
171
171
|
|
|
172
172
|
const existingWorkBeforeGuidance = workspaceHasApplicationFiles(workspace);
|
|
173
173
|
if (options.beforeWorkspaceMigration) {
|
|
174
|
-
await Promise.resolve(
|
|
174
|
+
await Promise.resolve(
|
|
175
|
+
options.beforeWorkspaceMigration({
|
|
176
|
+
project: projectSlug,
|
|
177
|
+
workspace,
|
|
178
|
+
accountId: projectsContext.account_id,
|
|
179
|
+
})
|
|
180
|
+
);
|
|
175
181
|
}
|
|
176
182
|
const migrationState = inspectProjectWorkspace(workspace, projectSlug, {
|
|
177
183
|
allowLegacyCredentialSession: options.allowLegacyCredentialSession === true,
|
|
@@ -227,8 +233,8 @@ async function startProject(options) {
|
|
|
227
233
|
const description = normalizedDescription(details?.description ?? accessible?.description);
|
|
228
234
|
const hasExistingWork = Boolean(
|
|
229
235
|
existingWorkBeforeGuidance ||
|
|
230
|
-
|
|
231
|
-
|
|
236
|
+
latestDeployment ||
|
|
237
|
+
(details?.deployment?.mode === 'github_actions' && details?.deployment?.source_status !== 'empty')
|
|
232
238
|
);
|
|
233
239
|
const warnings = [];
|
|
234
240
|
if (migration.backupRoot) {
|
|
@@ -264,6 +270,7 @@ async function startProject(options) {
|
|
|
264
270
|
context: {
|
|
265
271
|
description,
|
|
266
272
|
project_status: details?.status || accessible?.status || null,
|
|
273
|
+
deployment: details?.deployment || { mode: 'direct', connection_status: 'not_connected' },
|
|
267
274
|
latest_deployment: latestDeployment,
|
|
268
275
|
source_sync: sourceSync,
|
|
269
276
|
warnings,
|
|
@@ -284,7 +291,7 @@ async function loadTemplateChoice(apiRequest, apiToken, executable, projectSlug,
|
|
|
284
291
|
next_cursor: typeof result?.next_cursor === 'string' ? result.next_cursor : null,
|
|
285
292
|
presentation:
|
|
286
293
|
'Before asking project questions, show option 0 and templates in a Markdown table with number, template name, suitable use, and included features, then wait for the user to choose.',
|
|
287
|
-
install_command: `${
|
|
294
|
+
install_command: `${quoteCommandArgument(executable)} install-template --template "TEMPLATE_SLUG" --project ${quoteCommandArgument(projectSlug)} --dir ${quoteCommandArgument(workspace)}`,
|
|
288
295
|
};
|
|
289
296
|
} catch {
|
|
290
297
|
if (attempt === 2) break;
|
|
@@ -614,27 +621,14 @@ function managedProjectFilePath(workspace, relative) {
|
|
|
614
621
|
}
|
|
615
622
|
|
|
616
623
|
function upsertStartAgentsBlock(source) {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
while (current.includes(startMarker) || current.includes(endMarker)) {
|
|
625
|
-
const start = current.indexOf(startMarker);
|
|
626
|
-
const end = current.indexOf(endMarker, Math.max(0, start + startMarker.length));
|
|
627
|
-
if (start < 0 || end < 0 || end < start) {
|
|
628
|
-
throw startError(
|
|
629
|
-
'invalid_agents_managed_block',
|
|
630
|
-
'AGENTS.md contains an incomplete JoripSpace managed block'
|
|
631
|
-
);
|
|
632
|
-
}
|
|
633
|
-
current = `${current.slice(0, start)}${current.slice(end + endMarker.length)}`;
|
|
634
|
-
}
|
|
624
|
+
try {
|
|
625
|
+
return upsertProjectAgentsContent(String(source || '').replace(/\r\n/g, '\n'));
|
|
626
|
+
} catch {
|
|
627
|
+
throw startError(
|
|
628
|
+
'invalid_agents_managed_block',
|
|
629
|
+
'AGENTS.md contains an incomplete JoripSpace managed block'
|
|
630
|
+
);
|
|
635
631
|
}
|
|
636
|
-
const unmanaged = current.replace(/^\n+/, '').replace(/\n+$/, '');
|
|
637
|
-
return unmanaged ? `${block}\n\n${unmanaged}\n` : `${block}\n`;
|
|
638
632
|
}
|
|
639
633
|
|
|
640
634
|
function upsertClaudeAgentsReference(source) {
|
|
@@ -1244,9 +1238,7 @@ function backupMigrationSnapshotAtomically(workspace, snapshot, backupRoot, call
|
|
|
1244
1238
|
throw startError('legacy_workspace_migration_blocked', 'legacy migration backup is unavailable');
|
|
1245
1239
|
}
|
|
1246
1240
|
assertMigrationSnapshotUnchanged(snapshot);
|
|
1247
|
-
|
|
1248
|
-
// macOS /var aliases and Windows short paths refer to the same project root.
|
|
1249
|
-
const relative = path.relative(fs.realpathSync.native(workspace), snapshot.path);
|
|
1241
|
+
const relative = path.relative(workspace, snapshot.path);
|
|
1250
1242
|
if (!relative || relative.startsWith('..') || path.isAbsolute(relative)) {
|
|
1251
1243
|
throw startError('legacy_workspace_migration_blocked', 'legacy migration target is outside the project');
|
|
1252
1244
|
}
|
|
@@ -1436,7 +1428,11 @@ function normalizedDescription(value) {
|
|
|
1436
1428
|
}
|
|
1437
1429
|
|
|
1438
1430
|
function loadCoreOnboardingPackage() {
|
|
1439
|
-
|
|
1431
|
+
try {
|
|
1432
|
+
return require('../vendor/core/onboarding.cjs');
|
|
1433
|
+
} catch {
|
|
1434
|
+
return require('../../core/onboarding.cjs');
|
|
1435
|
+
}
|
|
1440
1436
|
}
|
|
1441
1437
|
|
|
1442
1438
|
function startError(code, message) {
|
|
@@ -1487,7 +1483,9 @@ function createStartOnboarding(executable, cwd, project, connected = false, apiB
|
|
|
1487
1483
|
commands: {
|
|
1488
1484
|
resume: command(['start', project, '--cwd', cwd, '--json']),
|
|
1489
1485
|
help: command(['--help']),
|
|
1490
|
-
...(!connected
|
|
1486
|
+
...(!connected
|
|
1487
|
+
? { login: command(['login', '--code', 'CONNECTION_CODE', '--cwd', cwd, '--json']) }
|
|
1488
|
+
: {}),
|
|
1491
1489
|
},
|
|
1492
1490
|
};
|
|
1493
1491
|
}
|
package/package.json
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Shared by CLI responses, generated documents, public onboarding, and MCP guidance.
|
|
2
|
+
const JORIPSPACE_TOOL_SELECTION_LINES = [
|
|
3
|
+
'Discover capabilities for the current installation instead of memorizing a static feature list: read CLI --help, then the relevant command help; use knowledge search --query for task-specific guidance. In MCP-only environments, inspect tools/list and the selected tool inputSchema, then resources/list and only the relevant manual. Recheck help/schema after an update or unknown option; generic global help is not proof that an invented command exists. Do not load all manuals or duplicate every tool option into AGENTS.md.',
|
|
4
|
+
'When the user requests a platform problem report or improvement suggestion, use CLI report --help and submit report with category problem, bug, or feedback as appropriate. feedback is a report category, not a CLI command or MCP tool. Sending a report requires the user request or existing explicit authorization; never silently send suggestions. Include only relevant non-secret diagnostics and return the actual report_id. If submission status is unknown, do not blindly retry.',
|
|
5
|
+
'For an exposed connection token, use CLI tokens revoke --current (or --token-id ID); if CLI is unavailable, use MCP revoke_api_token with token_id=current or an exact same-account ID. Never guess a target or read/print the secret. Revoking current ends the connection; reconnect with a fresh code. logout alone does not revoke.',
|
|
6
|
+
'Prefer the JoripSpace CLI even when MCP tools are available. For generated bundles and large projects, the CLI uploads local bytes in verified chunks. Before each new onboarding, resolve the executable and compare its --version with npm view @joripspace/cli@latest version. An existing installation is not evidence that it is current. When Node.js 18+ and npm, terminal, file, and network access permit installation, install or update with npm install -g @joripspace/cli@latest. Verify the actual executable version again after installation. If PATH or a saved invocation still selects an older native binary, npm prefix, or npx cache entry, use Node with the absolute npm root -g package entrypoint or npx -y @joripspace/cli@latest, verify its version against the registry, and use that verified invocation for start and subsequent commands. Do not claim an update succeeded merely because npm install exited successfully. If the registry cannot be reached, state that freshness is unverified and continue only with capabilities confirmed in the installed help. If the global prefix is not writable, use npx -y @joripspace/cli@latest instead. Do not change global agent configuration or elevate solely for CLI installation.',
|
|
7
|
+
'Use CLI start PROJECT --json and its onboarding.invocation for subsequent operations. MCP tool availability alone does not prove CLI authentication: reuse an existing authorized CLI login or an existing locally authenticated .env.joripspace. If neither authenticates, complete the CLI one-time-code flow. Never extract hidden MCP client credentials or duplicate tokens into client configuration. If the CLI cannot be installed or executed, continue with the available MCP tools and their existing authorized connection. Do not block supported MCP work merely because the CLI environment is unavailable.',
|
|
8
|
+
];
|
|
9
|
+
|
|
2
10
|
const JORIPSPACE_CLI_GUIDE = [
|
|
3
11
|
'# JoripSpace project onboarding',
|
|
4
12
|
'',
|
|
@@ -9,11 +17,14 @@ const JORIPSPACE_CLI_GUIDE = [
|
|
|
9
17
|
'',
|
|
10
18
|
'## Workspace and connection',
|
|
11
19
|
'',
|
|
20
|
+
...JORIPSPACE_TOOL_SELECTION_LINES,
|
|
21
|
+
'',
|
|
22
|
+
'The current npm-distributed CLI requires Node.js 18+ and npm for installation or npx execution. A working CLI does not require a second project-local Node.js installation. Small-source MCP-only connection and deployment need neither Node.js nor Git; a connected GitHub source still requires Git. Check the actual path rather than applying legacy standalone CLI requirements to the current npm package.',
|
|
12
23
|
'Use the project name supplied by the user. The connection flow does not create a missing project. Use the current Git root when one exists, otherwise the current working directory; use --cwd to specify the intended workspace. Never use the npm cache or package installation folder as the project workspace.',
|
|
13
24
|
"Only when the user explicitly requests a new Free project, run create --name NAME --json. Present every returned agreement faithfully in the user's language, link to the terms, and obtain explicit consent before passing --agree-noncommercial --agree-billing --agree-retention. Never infer agreement from the creation request. start never creates a project, and create does not link the workspace. If creation state is unknown, list projects and check the name before retrying.",
|
|
14
25
|
'The JoripSpace project is stored in `.joripspace/project`. Resolve different or invalid markers, symlinks, and conflicting local work without overwriting user files.',
|
|
15
26
|
'For CLI sessions: Use the installed JoripSpace CLI for JoripSpace infrastructure, domains, and deployment. Do not configure or wait for MCP. Existing MCP integrations remain available for users who choose that workflow; this start session continues through the CLI.',
|
|
16
|
-
'For an existing MCP session, use the tools advertised by that connection. create_project creates only Free projects after explicit confirmation and all returned agreements; start_project_session connects an existing project. MCP supports DB, storage, deployment, checkpoints, domains, crons, mail, realtime, and value-blind Secret generation/listing.
|
|
27
|
+
'For an existing MCP session, use the tools advertised by that connection. create_project creates only Free projects after explicit confirmation and all returned agreements; start_project_session connects an existing project. MCP supports DB, storage, deployment, checkpoints, domains, crons, mail, realtime, and value-blind Secret generation/listing. Internal random Secret generation is available through generate_project_secret without another confirmation when the task already authorizes it. External Secret registration/replacement uses CLI secret set --value-stdin when a safe authorized input is available; use the project Secret web page when user-only entry is needed. MCP has no arbitrary-value Secret registration tool. MCP authentication stays in its server-bound transport session or client-managed OAuth connection. MCP responses and workspace metadata never carry API token values. CLI login stores its own credentials locally; an existing locally authenticated project env remains supported. Do not copy MCP credentials into local files or client configuration. When switching to CLI, use its own connection-code login if no authorized CLI login exists.',
|
|
17
28
|
'When start returns connection_required, show connect_url as a clickable link, ask the user to approve the connection and provide the five-minute one-time code, then execute login_command and resume_command. A successful connection also logs in; do not add a separate login step. Never request or print the exchanged token. Reuse the existing connection on later runs. Use logout to remove the current local login without revoking server tokens.',
|
|
18
29
|
'New CLI logins prefer the OS credential store and reuse it across project folders for the same OS user. When that store is available, `.env.joripspace` keeps only the API URL and account reference. If the OS store is unavailable before writing, login saves the token in the project-local `.env.joripspace` instead; that fallback is reused only in this project. Failed OS writes or readback verification do not trigger fallback. Older CLI versions and existing token-bearing `.env.joripspace` files remain supported; keep that file Git-ignored and excluded from deployments and checkpoints. logout removes saved project tokens and the matching OS-stored account credential. OS logins are shared across project folders, including folders where logout was previously run. Do not copy credentials into documents, skills, logs, or source code.',
|
|
19
30
|
'',
|
|
@@ -27,8 +38,8 @@ const JORIPSPACE_CLI_GUIDE = [
|
|
|
27
38
|
'',
|
|
28
39
|
'## Agent documents',
|
|
29
40
|
'',
|
|
30
|
-
'start maintains one bounded JoripSpace block in AGENTS.md, one @AGENTS.md reference in CLAUDE.md, and the canonical project marker. Existing user content is preserved. Read AGENTS.md explicitly when automatic loading is unavailable. User-authored agent instructions still apply.',
|
|
31
|
-
'This guide is returned inline by start and written into AGENTS.md. Skills are optional: this workflow does not require a plugin, agent detection, or skill registration. Do not modify global agent configuration. At the beginning of a new JoripSpace task, run start for the same project to refresh state and managed guidance while preserving local work.',
|
|
41
|
+
'start maintains one bounded JoripSpace block in AGENTS.md, one @AGENTS.md reference in CLAUDE.md, and the canonical project marker. Connection setup and guide refresh do not create application deployment scripts. During authorized app implementation or deployment, prepare the verified build-and-CLI script described below; this is distinct from legacy .joripspace/*.mjs helpers. Existing user content is preserved. Read AGENTS.md explicitly when automatic loading is unavailable. User-authored agent instructions still apply.',
|
|
42
|
+
'This guide is returned inline by start and written into AGENTS.md. Skills are optional: this workflow does not require a plugin, agent detection, or skill registration. Do not modify global agent configuration. At the beginning of a new JoripSpace task, run start for the same project to refresh state and managed guidance while preserving local work, except for a guide-refresh-only request. start can synchronize application source; never run it merely to refresh guidance. For guide-only maintenance, use authenticated MCP prepare_project_workspace with guide_only=true. If MCP is unavailable, fetch https://api.joripspace.com/onboarding.md, extract the guide beginning at # JoripSpace project onboarding, and replace only the bounded JoripSpace AGENTS.md block while preserving user content; maintain the CLAUDE.md import. Preserve the existing project marker and credentials. Do not synchronize Git, restore source, migrate legacy helpers, install tools, or deploy for guide-only maintenance. If the local marker or managed block is invalid, report that conflict without changing application files.',
|
|
32
43
|
'',
|
|
33
44
|
'## Continue existing work or choose a template',
|
|
34
45
|
'',
|
|
@@ -43,20 +54,34 @@ const JORIPSPACE_CLI_GUIDE = [
|
|
|
43
54
|
'| 2 | Copy current files only | No template update link |',
|
|
44
55
|
'',
|
|
45
56
|
'Never replace that table with only a prose sentence. Use install-template --template TEMPLATE_SLUG --project PROJECT --dir PROJECT_ROOT for option 1. Append --files-only for option 2. Never put a token in either command. When git_history_available is false, explain that only file copying is available and use --files-only without offering an unavailable mode. Never add --force without explicit overwrite approval.',
|
|
57
|
+
'After installing a template, inspect its source, configuration, schema, and migrations before customization or deployment. Installation copies files and does not initialize the project DB. When the template uses env.DB, run db schema first, compare the actual queries and indexes, apply only compatible required migrations with db migrate --file PATH, then verify the schema and representative reads with db query. Never report the template ready with missing tables or reset existing data to resolve a conflict.',
|
|
58
|
+
'For a Git-history template, check template pull before application work. An available update requires explicit approval before rerunning with --yes; preserve origin and stop on local changes, rewritten history, or merge conflicts.',
|
|
46
59
|
'',
|
|
47
60
|
'## Build, verify, and deploy',
|
|
48
61
|
'',
|
|
49
62
|
"After connecting, continue the user's existing request. If the user only asked to start, report the connection and relevant next step; do not invent an app or deploy unchanged files just to complete onboarding. Clarify missing requirements with short questions and concrete choices.",
|
|
50
63
|
'Use normal local tools to inspect source, install project dependencies, build, test, and verify requested behavior. Preserve user edits and project structure. Read actual project scripts and CLI help for the matching deployment path. Do not invent setup or init commands or change infrastructure providers.',
|
|
64
|
+
'Use Hono as the default server framework for every new project, including single-route and simple services. Preserve the current framework of an existing project unless the user requests migration. Use feature-focused modules as complexity grows and deploy them as one bundled Worker service.',
|
|
65
|
+
'Server-render meaningful initial HTML for user-facing routes by default. Honor an explicitly requested SPA, client-only app, or WebView. Give each independent main screen a distinct pathname that supports direct access and refresh; verify the route inventory, requested flows, validation, authorization, responsive layout, and relevant automated checks before deployment.',
|
|
51
66
|
'Before deployment, inspect runtime imports. When source imports package dependencies, run the project build and deploy its generated bundled Worker entrypoint such as dist/worker.js. Never deploy an unbundled source entrypoint that depends on excluded node_modules.',
|
|
67
|
+
'After implementing or changing an app build, make its deployment repeatable in the project. For direct deployments with package.json, build first, inspect the actual bundled output and assets, check deploy --help with the verified CLI invocation, and only if --prepare is advertised run deploy --prepare --dir OUTPUT_DIRECTORY --entrypoint WORKER_FILE --json. Paths are relative to the workspace; entrypoint is relative to the output directory. This validates the output and adds joripspace:deploy while preserving other scripts and refusing to overwrite a different deployment script. It does not deploy. Do not run preparation in an empty workspace or merely to refresh guidance. Check deploy --help before using --prepare. For a released CLI without --prepare, add the equivalent portable package script directly after verifying the output: "joripspace:deploy": "npm run build && npx --yes @joripspace/cli@latest deploy --cwd . --dir \"dist\" --entrypoint \"worker.js\"". Replace dist and worker.js with the actual verified paths; omit npm run build && only when the project has no build step. Preserve every other script and do not overwrite an existing custom deployment script. Do not add a project CLI dependency or machine-specific path. Never pass --prepare when help does not advertise it. For MCP-only execution, record the same verified build/output/entrypoint in the project AGENTS.md and use advertised tools.',
|
|
68
|
+
'When deployment of the current change is requested, reuse npm run joripspace:deploy -- --label "Describe the change" after confirming the project still uses direct deployment. The script builds first and stops on build failure. It resolves the current CLI through npx without committing machine-specific paths or credentials. Inspect package.json before executing it; preserve custom scripts. GitHub-connected projects keep their configured workflow and trigger and must not prepare or run a direct deployment script. Verify deployment history and production HTTP responses after execution.',
|
|
52
69
|
'Directory deployment applies root .gitignore, .ignore, .joripspaceignore and nested .gitignore rules to both small inline uploads and chunked archives. Ignored credentials and protected connection files are excluded in both paths. If the build output is ignored in the project root, select the build output directory with --dir instead of removing credential ignore rules.',
|
|
53
|
-
'Respect
|
|
54
|
-
'When GitHub connection is requested, show https://joripspace.com/projects/PROJECT/?tab=deployment as a clickable link with the selected project slug. The user connects the GitHub App and selects the repository and trigger on that page.
|
|
70
|
+
'Respect context.deployment returned by start; for older CLIs that omit it, run get --project PROJECT --json before choosing a deployment route. With an active GitHub deployment connection, follow its configured branch and trigger, commit and push the verified requested change, and verify the resulting Actions run and JoripSpace deployment. Do not create a separate pre-push checkpoint or use direct deploy for that route. Otherwise use the existing CLI deployment/checkpoint commands. Do not create GitHub Actions workflows merely to deploy an unconnected project. Store external provider secrets in project Secret bindings through the existing authorized flow, never in application source.',
|
|
71
|
+
'When GitHub connection is requested, show https://joripspace.com/projects/PROJECT/?tab=deployment as a clickable link with the selected project slug. The user connects the GitHub App and selects the repository and trigger on that page. Preserve user-authored workflows. For a missing or stale connection-managed workflow, use github prepare only when advertised by CLI help, after the application entrypoint exists; do not create workflows for an unconnected project. An authorized agent push to the configured branch triggers automatic deployment for a branch-push connection; follow the configured release trigger for release deployments. Check project status and deployment history afterward.',
|
|
55
72
|
'When development and deployment are requested, verify the build, deploy through JoripSpace, and check the production URL before reporting completion. Report the URL, actual verification, and any unresolved failure. If a response is lost, inspect deployment state before retrying a mutation. For transient reads, follow retryable and retry-after information with bounded backoff. Do not blindly retry authentication, permission, conflict, or invalid-input failures.',
|
|
73
|
+
'Deployment requires an explicit request for the current change. After meaningful verified work without deployment, use checkpoint save with a concise label. A request only to refresh guidance does not authorize application changes, checkpoints, commit, push, or deployment; preserve existing application source and do not invent a deployment because guide files changed.',
|
|
74
|
+
'',
|
|
75
|
+
'## Runtime capabilities and current operating guidance',
|
|
76
|
+
'',
|
|
77
|
+
'At the start of each distinct task, use knowledge search --query "USER_REQUEST" once for current operating guidance. Use ordinary product words in user-facing answers, translated into the user\'s language: server, DB, storage, realtime. Read relevant command help for the current program instead of assuming older behavior.',
|
|
78
|
+
'Use env.DB with prepared statements for structured records and env.STORAGE for uploaded or generated files; keep fixed design assets in deployment source. Inspect schema and design indexes for actual queries and pagination before DB changes. Use db schema/query/migrate and storage list/get/put/delete for agent operations; never expose a public migration route.',
|
|
79
|
+
'For realtime v2, read realtime-v2 docs, check realtime-v2 status, and activate only the requested project with realtime-v2 activate when needed. Use the SDK server authorization and recovery flow. Existing managed realtime uses /_joripspace/realtime?room=main for public demos; private conversations need opaque room ids and membership checks. Do not invent Worker-global socket broadcasts or a second D1 message-history store. Verify two independent clients, reconnect recovery, and room isolation.',
|
|
80
|
+
'For project mail, call mail connect first, follow the returned SMTP setup or browser approval link, then use mail status and mail test. Never ask for SMTP credentials in chat or build a separate mail integration. Domains and scheduled jobs use domain and cron commands; inspect --help and the actual returned status.',
|
|
56
81
|
'',
|
|
57
82
|
'## Project secrets',
|
|
58
83
|
'',
|
|
59
|
-
'Use secret generate --name NAME --json to create an internal random secret without seeing its value. It preserves an existing active secret. Use secret set --name NAME --value-stdin --json (alias: secret update) to create or replace a binding with an authorized value from an external server, provider, or system. Pass the exact UTF-8 bytes through process standard input, never command arguments, chat, logs, source, or temporary project files. No secret value is returned. set/update both create or replace; deleting a secret remains a web operation.',
|
|
84
|
+
'A request to generate an internal Secret, or its necessity within authorized implementation, is sufficient authorization; do not ask for duplicate consent or browser registration. Infer the binding name from the project and ask only if its purpose is ambiguous. Use secret generate --name NAME --json to create an internal random secret without seeing its value. It preserves an existing active secret. Use secret set --name NAME --value-stdin --json (alias: secret update) to create or replace a binding with an authorized value from an external server, provider, or system. Pass the exact UTF-8 bytes through process standard input, never command arguments, chat, logs, source, or temporary project files. No secret value is returned. set/update both create or replace; deleting a secret remains a web operation.',
|
|
60
85
|
'The start onboarding object and secret list/generate/set/update results include secret_management_url for the selected project. Include this as a clickable link when reporting creation or replacement, and whenever the user needs to enter or change a value. Explain the exact key name and purpose in the user\'s language. If the user must enter a provider-issued value, ask them to enter it on that page and click Register or replace, then verify the name, status, and updated_at with secret list --json. Do not ask for secret values in chat. Perform the relevant connection check before reporting that an integration works.',
|
|
61
86
|
].join('\n');
|
|
62
87
|
|
|
@@ -86,4 +111,4 @@ const JORIPSPACE_NPM_ONBOARDING_DOCUMENT = [
|
|
|
86
111
|
JORIPSPACE_CLI_GUIDE,
|
|
87
112
|
].join('\n');
|
|
88
113
|
|
|
89
|
-
module.exports = { JORIPSPACE_CLI_GUIDE, JORIPSPACE_NPM_ONBOARDING_DOCUMENT };
|
|
114
|
+
module.exports = { JORIPSPACE_TOOL_SELECTION_LINES, JORIPSPACE_CLI_GUIDE, JORIPSPACE_NPM_ONBOARDING_DOCUMENT };
|