npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@creator-studio-os/core

v2.0.1

Published

Shared runtime for Creator Studio OS — AppleScript runners, project schema, ledger, error types, iWork shared automation

Readme

@creator-studio-os/core

Creator Studio OS 的共享运行时环境,包括 AppleScript 运行器、项目结构、日志记录、错误类型以及 iWork 共享自动化功能。

它是 Creator Studio OS MCP 控制平面的一部分,用于 Apple Creator Studio 应用程序。


安装

npm install @creator-studio-os/core

此包的作用

@creator-studio-os/core 是所有其他 @creator-studio-os/* 包共享的运行时基础。它提供以下功能:

  • AppleScript 运行器runAppleScript, runApp, awaitOutput, openApp, withDaemonRecovery
  • 项目结构ProjectV2 Zod 模式、解析器以及类型化路径映射
  • 错误系统CreatorStudioError,具有结构化的 { code, message, hint } 格式
  • 配置loadConfig() 函数读取 CREATOR_STUDIO_DATA_DIR 以及所有应用程序的 Bundle ID
  • 日志记录 — 结构化的编码/项目历史记录,存储在 <dataDir>/.csos/ledger.jsonl 文件中
  • iWork 共享openDocumentInApp, closeDocumentInApp, exportDocumentInApp, activateApp, isAppRunning

工具 (1)

| 工具 | 描述 | |------|-------------| | csos_app_status | 检查是否有 Creator Studio 应用程序正在运行且状态良好。 传递 app="all" 以一次性查询所有 8 个应用程序。 |

示例

import {
  runAppleScript,
  CreatorStudioError,
  loadConfig,
  registerStatusTool,
} from "@creator-studio-os/core";
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";

const server = new McpServer({ name: "csos", version: "2.0.0" });
registerStatusTool(server);

// Escape user input before interpolation — always
const name = escapeAppleScriptString(userInput);
const result = await runAppleScript(`tell app "Keynote" to get name of document "${name}"`);

错误处理

所有运行时错误都是 CreatorStudioError 类型:

import { CreatorStudioError } from "@creator-studio-os/core";

try {
  await runAppleScript(`...`);
} catch (err) {
  if (err instanceof CreatorStudioError) {
    console.error(err.code);   // "E_OSASCRIPT_FAILED", "E_AUTOMATION_DENIED", …
    console.error(err.hint);   // actionable suggestion
  }
}

macOS 需求

@creator-studio-os/core 仅适用于 macOS ("os": ["darwin"])。 AppleScript 运行器调用 osascriptopenApp 使用 open -b <bundleId> 命令。


主 README · 更新日志 · 安全说明