Skip to content

Commit 7a96589

Browse files
apartsinclaude
andcommitted
Rename npm package to @nistrapa/modelmesh-core and fix publish workflow
- Rename npm package from @modelmesh/core to @nistrapa/modelmesh-core across all 50 files: docs, samples, scripts, ClaudeSkill, README, and package.json - Fix publish.yml secret name: PYPI_TOKEN → PYPI_API_TOKEN - Add .npmrc, .pypirc, .secrets to .gitignore for local credential safety Published packages: - PyPI: modelmesh-lite 0.1.0 - npm: @nistrapa/modelmesh-core 0.1.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 443dc4f commit 7a96589

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+114
-109
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Publish to PyPI
3939
env:
4040
TWINE_USERNAME: __token__
41-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
41+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
4242
run: twine upload dist/*
4343

4444
# ── TypeScript → npm ───────────────────────────────────────────────────

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,8 @@ jest-out.json
4242
# Package
4343
*.whl
4444
*.tar.gz
45+
46+
# Secrets & tokens
47+
.npmrc
48+
.pypirc
49+
.secrets

ClaudeSkill/install.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ dependencies = ["modelmesh-lite>=0.1.0"]
4545
## TypeScript Installation
4646

4747
```bash
48-
npm install @modelmesh/core
48+
npm install @nistrapa/modelmesh-core
4949
```
5050

5151
Or with yarn/pnpm:
5252
```bash
53-
yarn add @modelmesh/core
54-
pnpm add @modelmesh/core
53+
yarn add @nistrapa/modelmesh-core
54+
pnpm add @nistrapa/modelmesh-core
5555
```
5656

5757
## Docker Installation
@@ -87,7 +87,7 @@ print(modelmesh.__name__) # "modelmesh"
8787

8888
**TypeScript:**
8989
```typescript
90-
import { create } from '@modelmesh/core';
90+
import { create } from '@nistrapa/modelmesh-core';
9191
console.log(typeof create); // "function"
9292
```
9393

ClaudeSkill/integrate.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const response = await client.chat.completions.create({
6464

6565
**After:**
6666
```typescript
67-
import { create } from '@modelmesh/core';
67+
import { create } from '@nistrapa/modelmesh-core';
6868
const client = create('chat-completion');
6969

7070
const response = await client.chat.completions.create({
@@ -162,7 +162,7 @@ Same pattern — just change the model name to the pool name.
162162

163163
After integration, verify:
164164

165-
- [ ] ModelMesh package is installed (`pip install modelmesh-lite` or `npm install @modelmesh/core`)
165+
- [ ] ModelMesh package is installed (`pip install modelmesh-lite` or `npm install @nistrapa/modelmesh-core`)
166166
- [ ] At least one API key env var is set
167167
- [ ] All `OpenAI()` / `Anthropic()` calls replaced with `modelmesh.create()`
168168
- [ ] All `model="specific-model"` changed to `model="pool-name"` (e.g., `"chat-completion"`)

ClaudeSkill/test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def test_modelmesh_integration():
127127
### TypeScript
128128

129129
```typescript
130-
import { create } from '@modelmesh/core';
130+
import { create } from '@nistrapa/modelmesh-core';
131131

132132
describe('ModelMesh Integration', () => {
133133
it('creates a working client', () => {

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pip install modelmesh-lite[yaml] # + YAML config support
3030

3131
**TypeScript / Node.js:**
3232
```bash
33-
npm install @modelmesh/core
33+
npm install @nistrapa/modelmesh-core
3434
```
3535

3636
**Docker Proxy (any language):**
@@ -65,7 +65,7 @@ print(response.choices[0].message.content)
6565
### TypeScript
6666

6767
```typescript
68-
import { create } from "@modelmesh/core";
68+
import { create } from "@nistrapa/modelmesh-core";
6969

7070
const client = create("chat-completion");
7171

docs/ConnectorCatalogue.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ Both classes expose the same provider interface and the same protected hooks for
247247
Every TypeScript connector class declares a `static readonly RUNTIME` property indicating browser/Node.js compatibility. This enables build-time tree-shaking and runtime compatibility checks.
248248

249249
```typescript
250-
import { RuntimeEnvironment } from '@modelmesh/core';
250+
import { RuntimeEnvironment } from '@nistrapa/modelmesh-core';
251251
252252
// Check a connector's runtime requirement
253253
console.log(OllamaProvider.RUNTIME); // 'node'
@@ -261,10 +261,10 @@ console.log(MemoryStorage.RUNTIME); // 'universal'
261261
| `'browser'` | `RuntimeEnvironment.BROWSER_ONLY` | Browser (window + document) | localStorage/sessionStorage/IndexedDB storage, BrowserSecretStore |
262262
| `'universal'` | `RuntimeEnvironment.UNIVERSAL` | Any JavaScript runtime | MemoryStorage, MemorySecretStore, BrowserBaseProvider, all rotation policies, ConsoleObservability |
263263

264-
**Runtime Guard** (`detectRuntime()`, `assertRuntimeCompatible()`): Detects the current environment at runtime and throws a descriptive error if a connector is used in an incompatible environment. Available from `@modelmesh/core`:
264+
**Runtime Guard** (`detectRuntime()`, `assertRuntimeCompatible()`): Detects the current environment at runtime and throws a descriptive error if a connector is used in an incompatible environment. Available from `@nistrapa/modelmesh-core`:
265265

266266
```typescript
267-
import { detectRuntime, assertRuntimeCompatible } from '@modelmesh/core';
267+
import { detectRuntime, assertRuntimeCompatible } from '@nistrapa/modelmesh-core';
268268
269269
const runtime = detectRuntime(); // 'node' or 'browser'
270270
assertRuntimeCompatible('modelmesh.localstorage.v1', RuntimeEnvironment.BROWSER_ONLY);

docs/ForAIAgent.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ ModelMesh ships with a `py.typed` marker (PEP 561) for full type checking suppor
125125
### Install
126126

127127
```bash
128-
npm install @modelmesh/core
128+
npm install @nistrapa/modelmesh-core
129129
```
130130

131131
For development from source:
@@ -140,7 +140,7 @@ npm test # run tests
140140
### Layer 0 — Zero Config
141141

142142
```typescript
143-
import { create } from '@modelmesh/core';
143+
import { create } from '@nistrapa/modelmesh-core';
144144

145145
const client = create('chat-completion');
146146

@@ -163,18 +163,18 @@ const client = create('chat-completion', {
163163
### Layer 2 — Full Config
164164

165165
```typescript
166-
import { create } from '@modelmesh/core';
166+
import { create } from '@nistrapa/modelmesh-core';
167167

168168
const client = create({ config: 'modelmesh.json' });
169169
```
170170

171171
### Package Exports
172172

173173
```typescript
174-
import { create, ModelMesh, MeshClient, MeshConfig } from '@modelmesh/core';
174+
import { create, ModelMesh, MeshClient, MeshConfig } from '@nistrapa/modelmesh-core';
175175

176176
// Browser-specific provider base class (for frontend apps)
177-
import { BrowserBaseProvider } from '@modelmesh/core/browser';
177+
import { BrowserBaseProvider } from '@nistrapa/modelmesh-core/browser';
178178
```
179179

180180
---
@@ -187,7 +187,7 @@ For frontend applications that call AI APIs directly from the browser (through a
187187

188188
Same npm package:
189189
```bash
190-
npm install @modelmesh/core
190+
npm install @nistrapa/modelmesh-core
191191
```
192192

193193
### Usage with ModelMesh Proxy
@@ -243,7 +243,7 @@ while (true) {
243243
For building custom browser-compatible AI providers:
244244

245245
```typescript
246-
import { BrowserBaseProvider, createBrowserProviderConfig } from '@modelmesh/core/browser';
246+
import { BrowserBaseProvider, createBrowserProviderConfig } from '@nistrapa/modelmesh-core/browser';
247247

248248
class MyProvider extends BrowserBaseProvider {
249249
protected _getCompletionEndpoint(): string {
@@ -517,7 +517,7 @@ assert "works" in response.choices[0].message.content.lower()
517517

518518
```typescript
519519
// TypeScript
520-
import { create } from '@modelmesh/core';
520+
import { create } from '@nistrapa/modelmesh-core';
521521
const client = create('chat-completion');
522522
const response = await client.chat.completions.create({
523523
model: 'chat-completion',

docs/SystemConcept.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Most AI provider APIs do not send CORS headers, so browsers block direct request
213213

214214
### Browser Entry Point
215215

216-
For bundlers (Webpack, Vite, esbuild), import from `@modelmesh/core/browser` to exclude Node.js-dependent modules (`ProxyServer`, `FileSecretStore`, `HttpHealthDiscovery`, file-backed `KeyValueStorage`). The `createBrowser()` convenience function provides a browser-optimized equivalent of `modelmesh.create()`.
216+
For bundlers (Webpack, Vite, esbuild), import from `@nistrapa/modelmesh-core/browser` to exclude Node.js-dependent modules (`ProxyServer`, `FileSecretStore`, `HttpHealthDiscovery`, file-backed `KeyValueStorage`). The `createBrowser()` convenience function provides a browser-optimized equivalent of `modelmesh.create()`.
217217

218218
Full browser usage guide in [guides/BrowserUsage.md](guides/BrowserUsage.html).
219219

docs/cdk/ConvenienceLayer.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ print(response.choices[0].message.content)
5858

5959
| | OpenAI SDK | ModelMesh Lite |
6060
| --- | --- | --- |
61-
| **Import** | `import OpenAI from "openai"` | `import { create } from "@modelmesh/core"` |
61+
| **Import** | `import OpenAI from "openai"` | `import { create } from "@nistrapa/modelmesh-core"` |
6262
| **Create** | `new OpenAI()` | `create("chat-completion")` |
6363
| **Model** | `model: "gpt-4o"` | `model: "chat-completion"` |
6464

@@ -73,7 +73,7 @@ const response = await client.chat.completions.create({
7373
console.log(response.choices[0].message.content);
7474

7575
// ModelMesh Lite -- same interface, capability-driven
76-
import { create } from "@modelmesh/core";
76+
import { create } from "@nistrapa/modelmesh-core";
7777
const client = create("chat-completion");
7878
const response = await client.chat.completions.create({
7979
model: "chat-completion",
@@ -556,7 +556,7 @@ print(response.choices[0].message.content)
556556
**TypeScript:**
557557

558558
```typescript
559-
import { create } from "@modelmesh/core";
559+
import { create } from "@nistrapa/modelmesh-core";
560560

561561
const client = create("chat-completion");
562562

@@ -600,7 +600,7 @@ emb = client.embeddings.create(
600600
**TypeScript:**
601601

602602
```typescript
603-
import { create } from "@modelmesh/core";
603+
import { create } from "@nistrapa/modelmesh-core";
604604

605605
const client = create(
606606
"chat-completion", "text-embeddings",
@@ -645,7 +645,7 @@ response = client.chat.completions.create(
645645
**TypeScript:**
646646

647647
```typescript
648-
import { create } from "@modelmesh/core";
648+
import { create } from "@nistrapa/modelmesh-core";
649649

650650
const client = create({ pool: "text-generation" });
651651

@@ -698,7 +698,7 @@ client = create(config=cfg)
698698
**TypeScript:**
699699

700700
```typescript
701-
import { create, MeshConfig } from "@modelmesh/core";
701+
import { create, MeshConfig } from "@nistrapa/modelmesh-core";
702702

703703
// From a YAML file
704704
const client1 = create({ config: "modelmesh.yaml" });
@@ -760,7 +760,7 @@ client = create("chat-completion", config={
760760
**TypeScript:**
761761

762762
```typescript
763-
import { create } from "@modelmesh/core";
763+
import { create } from "@nistrapa/modelmesh-core";
764764

765765
// With file logging
766766
const client = create("chat-completion", {
@@ -829,7 +829,7 @@ client = create(
829829
**TypeScript:**
830830

831831
```typescript
832-
import { create } from "@modelmesh/core";
832+
import { create } from "@nistrapa/modelmesh-core";
833833

834834
const client = create("chat-completion", {
835835
apiKeys: {
@@ -870,7 +870,7 @@ provider = QuickProvider(
870870
**TypeScript:**
871871

872872
```typescript
873-
import { QuickProvider } from "@modelmesh/core";
873+
import { QuickProvider } from "@nistrapa/modelmesh-core";
874874

875875
const provider = new QuickProvider({
876876
baseUrl: "https://api.example.com",
@@ -920,8 +920,8 @@ client = create(config={
920920
**TypeScript:**
921921

922922
```typescript
923-
import { create } from "@modelmesh/core";
924-
import { QuickProvider } from "@modelmesh/core";
923+
import { create } from "@nistrapa/modelmesh-core";
924+
import { QuickProvider } from "@nistrapa/modelmesh-core";
925925

926926
const custom = new QuickProvider({
927927
baseUrl: "https://my-llm-gateway.internal/v1",
@@ -982,7 +982,7 @@ graph.add_node("llm", llm)
982982
**TypeScript:**
983983

984984
```typescript
985-
import { create } from "@modelmesh/core";
985+
import { create } from "@nistrapa/modelmesh-core";
986986
import { ChatOpenAI } from "@langchain/openai";
987987

988988
// Create a ModelMesh client

0 commit comments

Comments
 (0)