sc-research 1.0.8 → 1.0.9

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.
Files changed (3) hide show
  1. package/README.md +6 -7
  2. package/dist/cli.js +0 -70
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -38,9 +38,8 @@ sc-research init --ai claude,cursor
38
38
  sc-research init --ai all
39
39
  ```
40
40
 
41
- This now does **both**:
42
- - Installs SC-Research templates for selected platform(s)
43
- - Reads/updates your project `package.json` scripts so commands work immediately
41
+ This now installs SC-Research templates for selected platform(s) only.
42
+ It does not read, write, or update `package.json`.
44
43
 
45
44
  Template architecture:
46
45
  - `templates/base/` is the canonical source for command/skill content
@@ -54,10 +53,10 @@ Template architecture:
54
53
  sc-research init --ai claude
55
54
  ```
56
55
 
57
- This will add/update these scripts in your project `package.json`:
58
- - `research`: `sc-research research`
59
- - `research:deep`: `sc-research research --depth=deep`
60
- - `visualize`: `sc-research visualize`
56
+ Then run commands directly from your terminal:
57
+ - `sc-research research "<topic>"`
58
+ - `sc-research research:deep "<topic>"`
59
+ - `sc-research visualize`
61
60
 
62
61
  2. **Open the project in Claude Code**
63
62
 
package/dist/cli.js CHANGED
@@ -358,10 +358,6 @@ async function runInit(opts) {
358
358
  logger.info(` Mode: dry-run (no files will be written)`);
359
359
  }
360
360
  ensureDir(projectRoot);
361
- const packageSummary = syncPackageJson(projectRoot, {
362
- dryRun: opts.dryRun,
363
- force: opts.force
364
- });
365
361
  const summariesByTarget = new Map;
366
362
  for (const target of targets) {
367
363
  const adapter = getAdapter(target);
@@ -394,12 +390,6 @@ async function runInit(opts) {
394
390
  logger.info(` Total skipped: ${totalSummary.skipped}`);
395
391
  logger.info(` Total overwritten: ${totalSummary.overwritten}`);
396
392
  logger.info("");
397
- logger.info("package.json:");
398
- logger.info(` Created: ${packageSummary.created ? 1 : 0}`);
399
- logger.info(` Scripts added: ${packageSummary.scriptsAdded}`);
400
- logger.info(` Scripts skipped: ${packageSummary.scriptsSkipped}`);
401
- logger.info(` Scripts overwritten: ${packageSummary.scriptsOverwritten}`);
402
- logger.info("");
403
393
  logger.info("Next steps:");
404
394
  logger.info(" 1) Ensure your project has required env vars set (for example in .sc-research):");
405
395
  logger.info(" - OPENAI_API_KEY");
@@ -429,66 +419,6 @@ function findPackageRoot2() {
429
419
  }
430
420
  return null;
431
421
  }
432
- function syncPackageJson(projectRoot, options) {
433
- const packageJsonPath = path4.join(projectRoot, "package.json");
434
- const summary = {
435
- created: false,
436
- scriptsAdded: 0,
437
- scriptsSkipped: 0,
438
- scriptsOverwritten: 0
439
- };
440
- const desiredScripts = {
441
- research: "sc-research research",
442
- "research:deep": "sc-research research --depth=deep",
443
- visualize: "sc-research visualize"
444
- };
445
- let pkg;
446
- if (fs4.existsSync(packageJsonPath)) {
447
- const raw = fs4.readFileSync(packageJsonPath, "utf-8");
448
- try {
449
- pkg = JSON.parse(raw);
450
- } catch {
451
- throw new Error(`Invalid JSON in ${packageJsonPath}. Fix it before running init.`);
452
- }
453
- } else {
454
- summary.created = true;
455
- pkg = {
456
- name: sanitizePackageName(path4.basename(projectRoot)),
457
- private: true,
458
- version: "0.0.0",
459
- scripts: {}
460
- };
461
- }
462
- const scriptsValue = pkg.scripts;
463
- const scripts = scriptsValue && typeof scriptsValue === "object" && !Array.isArray(scriptsValue) ? { ...scriptsValue } : {};
464
- for (const [name, command] of Object.entries(desiredScripts)) {
465
- const current = scripts[name];
466
- if (!current) {
467
- scripts[name] = command;
468
- summary.scriptsAdded++;
469
- continue;
470
- }
471
- if (current !== command) {
472
- if (options.force) {
473
- scripts[name] = command;
474
- summary.scriptsOverwritten++;
475
- } else {
476
- summary.scriptsSkipped++;
477
- }
478
- }
479
- }
480
- pkg.scripts = scripts;
481
- const shouldWrite = summary.created || summary.scriptsAdded > 0 || summary.scriptsOverwritten > 0;
482
- if (shouldWrite && !options.dryRun) {
483
- fs4.writeFileSync(packageJsonPath, `${JSON.stringify(pkg, null, 2)}
484
- `);
485
- }
486
- return summary;
487
- }
488
- function sanitizePackageName(name) {
489
- const cleaned = name.toLowerCase().trim().replace(/[^a-z0-9-_.]/g, "-").replace(/^-+/, "").replace(/-+$/, "");
490
- return cleaned || "sc-research-project";
491
- }
492
422
 
493
423
  // src/entries/cli.ts
494
424
  var DEFAULT_ENV_FILE = ".sc-research";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sc-research",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Headless Social Media Research Data Provider for AI Agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",