paperclipai 0.2.4 → 0.2.6

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/README.md CHANGED
@@ -6,13 +6,13 @@
6
6
  <a href="#quickstart"><strong>Quickstart</strong></a> &middot;
7
7
  <a href="https://paperclip.ing/docs"><strong>Docs</strong></a> &middot;
8
8
  <a href="https://github.com/paperclipai/paperclip"><strong>GitHub</strong></a> &middot;
9
- <a href="https://discord.gg/paperclip"><strong>Discord</strong></a>
9
+ <a href="https://discord.gg/m4HZY7xNG3"><strong>Discord</strong></a>
10
10
  </p>
11
11
 
12
12
  <p align="center">
13
13
  <a href="https://github.com/paperclipai/paperclip/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License" /></a>
14
14
  <a href="https://github.com/paperclipai/paperclip/stargazers"><img src="https://img.shields.io/github/stars/paperclipai/paperclip?style=flat" alt="Stars" /></a>
15
- <a href="https://discord.gg/paperclip"><img src="https://img.shields.io/discord/000000000?label=discord" alt="Discord" /></a>
15
+ <a href="https://discord.gg/m4HZY7xNG3"><img src="https://img.shields.io/discord/000000000?label=discord" alt="Discord" /></a>
16
16
  </p>
17
17
 
18
18
  <br/>
@@ -174,7 +174,7 @@ Paperclip handles the hard orchestration details correctly.
174
174
  Open source. Self-hosted. No Paperclip account required.
175
175
 
176
176
  ```bash
177
- npx paperclipai onboard
177
+ npx paperclipai onboard --yes
178
178
  ```
179
179
 
180
180
  Or manually:
@@ -249,7 +249,7 @@ We welcome contributions. See the [contributing guide](CONTRIBUTING.md) for deta
249
249
 
250
250
  ## Community
251
251
 
252
- - [Discord](#) — Coming soon
252
+ - [Discord](https://discord.gg/m4HZY7xNG3) — Join the community
253
253
  - [GitHub Issues](https://github.com/paperclipai/paperclip/issues) — bugs and feature requests
254
254
  - [GitHub Discussions](https://github.com/paperclipai/paperclip/discussions) — ideas and RFC
255
255
 
package/dist/index.js CHANGED
@@ -3821,15 +3821,7 @@ async function databaseCheck(config, configPath) {
3821
3821
  const dataDir = resolveRuntimeLikePath(config.database.embeddedPostgresDataDir, configPath);
3822
3822
  const reportedPath = dataDir;
3823
3823
  if (!fs5.existsSync(dataDir)) {
3824
- return {
3825
- name: "Database",
3826
- status: "warn",
3827
- message: `Embedded PostgreSQL data directory does not exist: ${reportedPath}`,
3828
- canRepair: true,
3829
- repair: () => {
3830
- fs5.mkdirSync(reportedPath, { recursive: true });
3831
- }
3832
- };
3824
+ fs5.mkdirSync(reportedPath, { recursive: true });
3833
3825
  }
3834
3826
  return {
3835
3827
  name: "Database",
@@ -3857,19 +3849,15 @@ async function llmCheck(config) {
3857
3849
  if (!config.llm) {
3858
3850
  return {
3859
3851
  name: "LLM provider",
3860
- status: "warn",
3861
- message: "No LLM provider configured",
3862
- canRepair: false,
3863
- repairHint: "Run `paperclipai configure --section llm` to set one up"
3852
+ status: "pass",
3853
+ message: "No LLM provider configured (optional)"
3864
3854
  };
3865
3855
  }
3866
3856
  if (!config.llm.apiKey) {
3867
3857
  return {
3868
3858
  name: "LLM provider",
3869
- status: "warn",
3870
- message: `${config.llm.provider} configured but no API key set`,
3871
- canRepair: false,
3872
- repairHint: "Run `paperclipai configure --section llm`"
3859
+ status: "pass",
3860
+ message: `${config.llm.provider} configured but no API key set (optional)`
3873
3861
  };
3874
3862
  }
3875
3863
  try {
@@ -3946,15 +3934,7 @@ function logCheck(config, configPath) {
3946
3934
  const logDir = resolveRuntimeLikePath(config.logging.logDir, configPath);
3947
3935
  const reportedDir = logDir;
3948
3936
  if (!fs6.existsSync(logDir)) {
3949
- return {
3950
- name: "Log directory",
3951
- status: "warn",
3952
- message: `Log directory does not exist: ${reportedDir}`,
3953
- canRepair: true,
3954
- repair: () => {
3955
- fs6.mkdirSync(reportedDir, { recursive: true });
3956
- }
3957
- };
3937
+ fs6.mkdirSync(reportedDir, { recursive: true });
3958
3938
  }
3959
3939
  try {
3960
3940
  fs6.accessSync(reportedDir, fs6.constants.W_OK);
@@ -4161,16 +4141,7 @@ function storageCheck(config, configPath) {
4161
4141
  if (config.storage.provider === "local_disk") {
4162
4142
  const baseDir = resolveRuntimeLikePath(config.storage.localDisk.baseDir, configPath);
4163
4143
  if (!fs8.existsSync(baseDir)) {
4164
- return {
4165
- name: "Storage",
4166
- status: "warn",
4167
- message: `Local storage directory does not exist: ${baseDir}`,
4168
- canRepair: true,
4169
- repair: () => {
4170
- fs8.mkdirSync(baseDir, { recursive: true });
4171
- },
4172
- repairHint: "Run with --repair to create local storage directory"
4173
- };
4144
+ fs8.mkdirSync(baseDir, { recursive: true });
4174
4145
  }
4175
4146
  try {
4176
4147
  fs8.accessSync(baseDir, fs8.constants.W_OK);
@@ -4415,6 +4386,14 @@ function isModuleNotFoundError(err) {
4415
4386
  if (code === "ERR_MODULE_NOT_FOUND") return true;
4416
4387
  return err.message.includes("Cannot find module");
4417
4388
  }
4389
+ function getMissingModuleSpecifier(err) {
4390
+ if (!(err instanceof Error)) return null;
4391
+ const packageMatch = err.message.match(/Cannot find package '([^']+)' imported from/);
4392
+ if (packageMatch?.[1]) return packageMatch[1];
4393
+ const moduleMatch = err.message.match(/Cannot find module '([^']+)'/);
4394
+ if (moduleMatch?.[1]) return moduleMatch[1];
4395
+ return null;
4396
+ }
4418
4397
  function maybeEnableUiDevMiddleware(entrypoint) {
4419
4398
  if (process.env.PAPERCLIP_UI_DEV_MIDDLEWARE !== void 0) return;
4420
4399
  const normalized = entrypoint.replaceAll("\\", "/");
@@ -4433,7 +4412,9 @@ async function importServerEntry() {
4433
4412
  try {
4434
4413
  await import("@paperclipai/server");
4435
4414
  } catch (err) {
4436
- if (isModuleNotFoundError(err)) {
4415
+ const missingSpecifier = getMissingModuleSpecifier(err);
4416
+ const missingServerEntrypoint = !missingSpecifier || missingSpecifier === "@paperclipai/server";
4417
+ if (isModuleNotFoundError(err) && missingServerEntrypoint) {
4437
4418
  throw new Error(
4438
4419
  `Could not locate a Paperclip server entrypoint.
4439
4420
  Tried: ${devEntry}, @paperclipai/server
@@ -6995,7 +6976,7 @@ function applyDataDirOverride(options, support = {}) {
6995
6976
  // src/index.ts
6996
6977
  var program = new Command();
6997
6978
  var DATA_DIR_OPTION_HELP = "Paperclip data directory root (isolates state from ~/.paperclip)";
6998
- program.name("paperclipai").description("Paperclip CLI \u2014 setup, diagnose, and configure your instance").version("0.2.4");
6979
+ program.name("paperclipai").description("Paperclip CLI \u2014 setup, diagnose, and configure your instance").version("0.2.6");
6999
6980
  program.hook("preAction", (_thisCommand, actionCommand) => {
7000
6981
  const options = actionCommand.optsWithGlobals();
7001
6982
  const optionNames = new Set(actionCommand.options.map((option) => option.attributeName()));