@pinta-ai/types 0.0.1 → 0.0.2
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/LICENSE +21 -0
- package/README.md +41 -0
- package/package.json +2 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pinta AI, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# @pinta-ai/types
|
|
2
|
+
|
|
3
|
+
Single source of truth for shared type definitions across the Pinta platform.
|
|
4
|
+
|
|
5
|
+
Defines the data structures exchanged between adapters (mcp-logger, etc.) and the backend (aware-backend).
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @pinta-ai/types
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { IngestTypeMap, IngestType, MCPSpan } from '@pinta-ai/types';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Core Types
|
|
20
|
+
|
|
21
|
+
| Type | Description |
|
|
22
|
+
|------|-------------|
|
|
23
|
+
| `IngestTypeMap` | Maps `ingest.type` values to span attribute interfaces |
|
|
24
|
+
| `IngestType` | Union of supported ingest types (`'mcp' \| ...`) |
|
|
25
|
+
| `MCPSpan` | Span attribute interface for the MCP adapter |
|
|
26
|
+
|
|
27
|
+
## Adding a New Adapter
|
|
28
|
+
|
|
29
|
+
1. Define a span attribute interface in `src/ingest.ts` (e.g., `PintaclawSpan`)
|
|
30
|
+
2. Add mapping to `IngestTypeMap` (e.g., `pintaclaw: PintaclawSpan`)
|
|
31
|
+
3. Export from `src/index.ts`
|
|
32
|
+
|
|
33
|
+
## Conventions
|
|
34
|
+
|
|
35
|
+
- Flat key-value structure only (serialized as OTel span attributes)
|
|
36
|
+
- Value types: `string | number | boolean | undefined`
|
|
37
|
+
- Every span interface must include an `ingest.type` field (discriminator)
|
|
38
|
+
|
|
39
|
+
## License
|
|
40
|
+
|
|
41
|
+
[MIT](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinta-ai/types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Shared type definitions for Pinta AI adapters and log processing server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"clean": "rm -rf dist",
|
|
17
17
|
"prepublishOnly": "npm run build"
|
|
18
18
|
},
|
|
19
|
-
"license": "
|
|
19
|
+
"license": "MIT",
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"typescript": "^5.3.0"
|
|
22
22
|
},
|