tina4-nodejs 3.13.100 → 3.13.103
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/CLAUDE.md +3 -3
- package/README.md +16 -0
- package/package.json +2 -2
- package/packages/cli/dist/bin.js +572 -764
- package/packages/cli/src/bin.ts +0 -6
- package/packages/core/dist/index.js +561 -622
- package/packages/core/public/js/tina4-dev-admin.min.js +2 -2
- package/packages/core/src/aiClient.ts +288 -0
- package/packages/core/src/devAdmin.ts +1 -2
- package/packages/core/src/index.ts +2 -0
- package/packages/core/src/metrics.ts +80 -632
- package/packages/frond/dist/index.js +113 -109
- package/packages/frond/src/engine.ts +128 -130
- package/packages/orm/dist/index.js +562 -629
- package/types/core/src/aiClient.d.ts +66 -0
- package/types/core/src/index.d.ts +2 -0
- package/types/core/src/metrics.d.ts +0 -35
- package/types/frond/src/engine.d.ts +4 -2
- package/packages/cli/src/commands/metrics.ts +0 -160
- package/types/cli/src/commands/metrics.d.ts +0 -6
package/CLAUDE.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# CLAUDE.md - AI Developer Guide for tina4-nodejs (v3.13.
|
|
1
|
+
# CLAUDE.md - AI Developer Guide for tina4-nodejs (v3.13.103)
|
|
2
2
|
|
|
3
3
|
> This file helps AI assistants (Claude, Copilot, Cursor, etc.) understand and work on this codebase effectively.
|
|
4
4
|
|
|
5
5
|
## What This Project Is
|
|
6
6
|
|
|
7
|
-
Tina4 for Node.js/TypeScript v3.13.
|
|
7
|
+
Tina4 for Node.js/TypeScript v3.13.103 - The Intelligent Native Application 4ramework. A convention-over-configuration structural paradigm. The developer writes TypeScript; Tina4 is invisible infrastructure.
|
|
8
8
|
|
|
9
9
|
The philosophy: zero ceremony, batteries included, file system as source of truth.
|
|
10
10
|
|
|
@@ -1347,7 +1347,7 @@ npm test
|
|
|
1347
1347
|
|
|
1348
1348
|
This executes `test/run-all.ts`, which ran **262 files** in the last lab verification:
|
|
1349
1349
|
- `test/integration.ts` — Full integration test (creates a temp project, starts a real server, runs assertions)
|
|
1350
|
-
- `test/*.test.ts` —
|
|
1350
|
+
- `test/*.test.ts` — all test files are discovered automatically. Plain suites run under `tsx`; Vitest suites are detected from their imports and run through Vitest. The metrics handoff suite runs normally and requires the native `tina4` CLI on PATH.
|
|
1351
1351
|
- `test/_*.ts` are helpers, not suites, so the runner never collects them: `_serviceGate.ts` (the require-services gate), `_testSummary.ts`, and `_driverlessTree.ts` (builds a tree where a bare specifier genuinely cannot resolve).
|
|
1352
1352
|
|
|
1353
1353
|
**Always run tests after making changes.** All tests must pass.
|
package/README.md
CHANGED
|
@@ -69,6 +69,22 @@ export default class User {
|
|
|
69
69
|
|
|
70
70
|
**2,897 tests. Zero dependencies. Full parity across Python, PHP, Ruby, and Node.js.**
|
|
71
71
|
|
|
72
|
+
### AI Client
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import { Ai } from "tina4-nodejs";
|
|
76
|
+
|
|
77
|
+
const reply = await Ai.chat([{ role: "user", content: "Summarise this text" }]);
|
|
78
|
+
const text = await Ai.complete("Give me a title");
|
|
79
|
+
const vector = await Ai.embed("semantic search text");
|
|
80
|
+
|
|
81
|
+
for await (const delta of Ai.chat([{ role: "user", content: "Stream this" }], { stream: true })) {
|
|
82
|
+
process.stdout.write(delta);
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Configure `TINA4_AI_PROVIDER` as `local`, `openai`, or `anthropic`. Hosted providers require `TINA4_AI_KEY`; local OpenAI-compatible endpoints do not.
|
|
87
|
+
|
|
72
88
|
---
|
|
73
89
|
|
|
74
90
|
## CLI Reference
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tina4-nodejs",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.103",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Tina4 for Node.js/TypeScript -
|
|
5
|
+
"description": "Tina4 for Node.js/TypeScript - native TypeScript conventions and shared Tina4 contracts",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tina4",
|
|
8
8
|
"framework",
|