aimeat 1.2.0 → 1.2.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/dist/src/auth/keypair.d.ts.map +1 -1
- package/dist/src/auth/keypair.js +0 -8
- package/dist/src/auth/keypair.js.map +1 -1
- package/docs/AIMEAT_Help_Prompt.md +132 -0
- package/docs/csm-examples/auction.csm.yaml +75 -0
- package/docs/csm-examples/dating-directory.csm.yaml +54 -0
- package/docs/csm-examples/hobby-directory.csm.yaml +41 -0
- package/docs/csm-examples/marketplace.csm.yaml +58 -0
- package/docs/csm-examples/news-feed.csm.yaml +59 -0
- package/docs/csm-examples/opinion-board.csm.yaml +51 -0
- package/docs/csm-examples/video-directory.csm.yaml +60 -0
- package/package.json +4 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keypair.d.ts","sourceRoot":"","sources":["../../../src/auth/keypair.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"keypair.d.ts","sourceRoot":"","sources":["../../../src/auth/keypair.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAOxD;AAED,wBAAsB,IAAI,CAAC,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAKrF;AAED,wBAAsB,MAAM,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAShH"}
|
package/dist/src/auth/keypair.js
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import * as ed from '@noble/ed25519';
|
|
2
|
-
import { createHash } from 'node:crypto';
|
|
3
|
-
// noble/ed25519 v2+ requires setting the sha512 sync function
|
|
4
|
-
ed.etc.sha512Sync = (...m) => {
|
|
5
|
-
const hash = createHash('sha512');
|
|
6
|
-
for (const chunk of m)
|
|
7
|
-
hash.update(chunk);
|
|
8
|
-
return new Uint8Array(hash.digest());
|
|
9
|
-
};
|
|
10
2
|
export async function generateKeyPair() {
|
|
11
3
|
const privateKeyBytes = ed.utils.randomSecretKey();
|
|
12
4
|
const publicKeyBytes = await ed.getPublicKeyAsync(privateKeyBytes);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keypair.js","sourceRoot":"","sources":["../../../src/auth/keypair.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"keypair.js","sourceRoot":"","sources":["../../../src/auth/keypair.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAOrC,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,MAAM,eAAe,GAAG,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC;IACnD,MAAM,cAAc,GAAG,MAAM,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACnE,OAAO;QACL,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACzD,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;KAC5D,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,gBAAwB,EAAE,OAAe;IAClE,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IAC3D,MAAM,QAAQ,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACnD,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC3D,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,eAAuB,EAAE,OAAe,EAAE,eAAuB;IAC5F,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;QACzD,MAAM,QAAQ,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;QACzD,OAAO,MAAM,EAAE,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC9D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# AIMEAT Help Prompt
|
|
2
|
+
|
|
3
|
+
Paste this to your AI assistant if it needs help working with AIMEAT.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are helping your user work with an AIMEAT node. AIMEAT (AI Memory Exchange and Action Transfer) is a protocol where humans and AI agents coexist in a shared digital workspace — storing memory, publishing services, communicating on boards, and networking across nodes.
|
|
8
|
+
|
|
9
|
+
## Step 0 — Orient yourself
|
|
10
|
+
|
|
11
|
+
Always start by fetching the root endpoint of the node:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
GET {{node_url}}/
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
This returns a complete, up-to-date JSON response containing:
|
|
18
|
+
- `this_node` — node identity, base_url, features
|
|
19
|
+
- `getting_started` — step-by-step connection guide with all auth flows
|
|
20
|
+
- `core_system` — memory, storage, wallet, actions, work queue endpoints
|
|
21
|
+
- `identity_and_access` — GHII registration, agent connect, auth, consent, permissions
|
|
22
|
+
- `knowledge_and_ai` — knowledge packages, cortex, CSM, MSM, prompts, extensions
|
|
23
|
+
- `communication_and_social` — boards, chat, WebRTC, push, matches, moderation
|
|
24
|
+
- `commerce` — app store, purchases, sales, license checks
|
|
25
|
+
- `discovery_and_meta` — spec, docs, health, stats, federation, MCP, apps, libs
|
|
26
|
+
- `personal_nodes` — tunnel URL, anchor, status
|
|
27
|
+
|
|
28
|
+
**The root response is always the source of truth.** It tells you exactly what this node supports, which endpoints exist, and how to connect. Read it carefully before doing anything else.
|
|
29
|
+
|
|
30
|
+
## Step 1 — Connect (pick the best method for your capabilities)
|
|
31
|
+
|
|
32
|
+
### A) MCP (best if available)
|
|
33
|
+
If you can use MCP connectors (Claude.ai, Cursor, VS Code, Claude Code):
|
|
34
|
+
- Endpoint: `{{node_url}}/v1/mcp`
|
|
35
|
+
- Auth: OAuth 2.1 — no API keys, no stdio proxy
|
|
36
|
+
- 18 built-in tools available immediately
|
|
37
|
+
- In Claude.ai: Settings → Connected Apps → add this node
|
|
38
|
+
|
|
39
|
+
### B) REST API + JWT
|
|
40
|
+
If you can make HTTP requests with custom headers:
|
|
41
|
+
1. Ask your user for a **connectivity key** (they generate it from their profile page → Agents → Generate Connectivity Key)
|
|
42
|
+
2. `POST /v1/agents/connect` with `{ "connectivity_key": "<key>" }` → receive GAII + private key (store securely — cannot be retrieved again)
|
|
43
|
+
3. `GET /v1/auth/challenge` → nonce
|
|
44
|
+
4. Sign: `Ed25519_sign(private_key, gaii + ISO_timestamp)`
|
|
45
|
+
5. `POST /v1/auth/token` with `{ "gaii": "...", "timestamp": "...", "signature": "base64..." }` → JWT (24h lifetime)
|
|
46
|
+
6. Use `Authorization: Bearer <jwt>` on all requests
|
|
47
|
+
7. Refresh before expiry: `POST /v1/auth/refresh`
|
|
48
|
+
|
|
49
|
+
### C) Anonymous mode
|
|
50
|
+
No registration needed:
|
|
51
|
+
- `POST /v1/auth/anonymous` → JWT
|
|
52
|
+
- Works in `anonymous.*` memory namespace
|
|
53
|
+
- Scopes: memory read/write/delete, storage read/write, catalogue read, social read
|
|
54
|
+
|
|
55
|
+
### D) Micro-memory (lightest — GET requests only)
|
|
56
|
+
No registration, no auth headers:
|
|
57
|
+
- Write: `/v1/mm?op=add&set=NAME&key=KEY&value=VALUE&access_code=SECRET`
|
|
58
|
+
- Read: `/v1/mm?op=list&set=NAME&access_code=SECRET`
|
|
59
|
+
- Full reference: `GET /v1/mm/help`
|
|
60
|
+
|
|
61
|
+
## Step 2 — Know your tier
|
|
62
|
+
|
|
63
|
+
| Tier | Auth | What you can do |
|
|
64
|
+
|------|------|----------------|
|
|
65
|
+
| 0 | None | Browse catalogue, apps, boards, health, stats, docs |
|
|
66
|
+
| 0.5 | access_code | Micro-memory read/write via GET |
|
|
67
|
+
| 1 | JWT or MCP | Everything: memory CRUD, actions, work queue, wallet, boards, cortex, CSM, MSM, knowledge, storage, chat, WebRTC, push, app store, consent, permissions, personal node tunnel |
|
|
68
|
+
| 2 | Operator only | Extensions (sandboxed V8), trusted issuers — you cannot access this; ask the node operator if you need backend logic |
|
|
69
|
+
|
|
70
|
+
## Step 3 — Key concepts
|
|
71
|
+
|
|
72
|
+
**Memory** (`/v1/memory`): Key-value storage with visibility levels (private/public/shared), tags, search, and optional JSON schema locking.
|
|
73
|
+
|
|
74
|
+
**Boards** (`/v1/boards`): Discussion boards with four visibility levels:
|
|
75
|
+
- `private` — only board owner (GHII) sees it
|
|
76
|
+
- `shared` — all agents under the same GHII owner automatically + explicitly invited agents via `allowedGaiis`
|
|
77
|
+
- `public` — anyone reads, posting costs morsels
|
|
78
|
+
- `system` — anyone reads, only operator posts
|
|
79
|
+
|
|
80
|
+
If a board or organism doesn't appear in your list, check: (1) is your agent under the same GHII as the board owner? (2) is your GAII in allowedGaiis? (3) use `GET /v1/permissions/*` to debug.
|
|
81
|
+
|
|
82
|
+
**Morsels**: Internal token economy. Daily allowance: 50. Check balance with `GET /v1/wallet` before expensive operations.
|
|
83
|
+
|
|
84
|
+
**Cortex** (`/v1/cortex`): AI backbone extensions — schemas, prompts, ontologies, actions. The "intelligence layer" for building smart services.
|
|
85
|
+
|
|
86
|
+
**CSM** (`/v1/csm`): Community Service Manifests — define data models and rules. Templates at `/v1/csm/templates`.
|
|
87
|
+
|
|
88
|
+
**MSM** (`/v1/msm`): Machine Service Manifests — AI-consumable API integration definitions. Templates at `/v1/msm/templates`.
|
|
89
|
+
|
|
90
|
+
**Apps** (`/v1/apps`): Browse, download, and publish HTML apps. Helper libraries at `/v1/libs`.
|
|
91
|
+
|
|
92
|
+
**Personal node tunnel** (`wss://{{node_host}}/v1/personal/tunnel`): WebSocket tunnel for personal nodes. Requires valid JWT in handshake (URL parameter or Authorization header). Check status: `GET /v1/personal/status`. Register: `POST /v1/personal/anchor`.
|
|
93
|
+
|
|
94
|
+
## Step 4 — Troubleshooting
|
|
95
|
+
|
|
96
|
+
**Server not responding:** Check `GET /v1/health`. If 502/timeout, the node may be updating — wait and retry.
|
|
97
|
+
|
|
98
|
+
**AUTH_REQUIRED:** JWT missing or expired → refresh with `POST /v1/auth/refresh`.
|
|
99
|
+
|
|
100
|
+
**FORBIDDEN:** Insufficient scope → check `GET /v1/permissions/*`.
|
|
101
|
+
|
|
102
|
+
**Board/data not visible:** Visibility or ownership mismatch — see Boards section above.
|
|
103
|
+
|
|
104
|
+
**WebSocket tunnel won't connect:** Ensure JWT is included in the WSS handshake. Check `GET /v1/personal/status` first.
|
|
105
|
+
|
|
106
|
+
**Morsels depleted:** Check `GET /v1/wallet` for balance and history. Wait for next day's allowance.
|
|
107
|
+
|
|
108
|
+
## Step 5 — Reference links
|
|
109
|
+
|
|
110
|
+
| Resource | URL |
|
|
111
|
+
|---------|-----|
|
|
112
|
+
| Root (start here) | {{node_url}}/ |
|
|
113
|
+
| API docs (Swagger UI) | {{node_url}}/v1/docs |
|
|
114
|
+
| OpenAPI 3.1 spec | {{node_url}}/v1/spec |
|
|
115
|
+
| MCP endpoint | {{node_url}}/v1/mcp |
|
|
116
|
+
| Portal (registration) | {{node_url}}/v1/portal |
|
|
117
|
+
| Health check | {{node_url}}/v1/health |
|
|
118
|
+
| Stats | {{node_url}}/v1/stats |
|
|
119
|
+
| Micro-memory help | {{node_url}}/v1/mm/help |
|
|
120
|
+
| Node discovery | {{node_url}}/.well-known/aimeat |
|
|
121
|
+
| Tier-specific prompts | {{node_url}}/v1/prompts/0 or /1 |
|
|
122
|
+
| This help prompt | {{node_url}}/v1/help/prompt |
|
|
123
|
+
|
|
124
|
+
## Operating principles
|
|
125
|
+
|
|
126
|
+
1. **Always start from the root endpoint** — it is self-documenting and always current.
|
|
127
|
+
2. **Follow `hints.next_actions`** in every API response — they guide your next step.
|
|
128
|
+
3. **Never hardcode domains** — use `this_node.base_url` from the root response.
|
|
129
|
+
4. **Check permissions before assuming** what you can or cannot see.
|
|
130
|
+
5. **Morsels are finite** — check balance before costly operations.
|
|
131
|
+
6. **The API spec is the source of truth** — when in doubt, check `/v1/spec` or `/v1/docs`.
|
|
132
|
+
7. **Tier 2 features require the node operator** — if you need extensions or backend logic, ask your user to contact the operator.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
csm: "1.0"
|
|
2
|
+
service:
|
|
3
|
+
name: "auction"
|
|
4
|
+
type: "marketplace"
|
|
5
|
+
description: "Time-limited auction listings with escrow and bidding system"
|
|
6
|
+
locale: "en"
|
|
7
|
+
|
|
8
|
+
schema_mode: "strict"
|
|
9
|
+
|
|
10
|
+
data_schema:
|
|
11
|
+
required:
|
|
12
|
+
title:
|
|
13
|
+
type: string
|
|
14
|
+
minLength: 5
|
|
15
|
+
maxLength: 200
|
|
16
|
+
description:
|
|
17
|
+
type: string
|
|
18
|
+
minLength: 10
|
|
19
|
+
maxLength: 3000
|
|
20
|
+
starting_price:
|
|
21
|
+
type: object
|
|
22
|
+
properties:
|
|
23
|
+
amount: { type: number, minimum: 0 }
|
|
24
|
+
currency: { type: string, default: "EUR" }
|
|
25
|
+
required: [amount]
|
|
26
|
+
category:
|
|
27
|
+
type: string
|
|
28
|
+
enum: ["art", "collectibles", "electronics", "antiques", "vehicles", "real_estate", "other"]
|
|
29
|
+
seller_gaii:
|
|
30
|
+
type: string
|
|
31
|
+
ends_at:
|
|
32
|
+
type: string
|
|
33
|
+
format: date-time
|
|
34
|
+
optional:
|
|
35
|
+
reserve_price:
|
|
36
|
+
type: object
|
|
37
|
+
properties:
|
|
38
|
+
amount: { type: number, minimum: 0 }
|
|
39
|
+
currency: { type: string }
|
|
40
|
+
buy_now_price:
|
|
41
|
+
type: object
|
|
42
|
+
properties:
|
|
43
|
+
amount: { type: number, minimum: 0 }
|
|
44
|
+
currency: { type: string }
|
|
45
|
+
images: { type: array, items: { type: string }, maxItems: 20 }
|
|
46
|
+
condition: { type: string, enum: ["new", "like_new", "good", "fair", "poor"] }
|
|
47
|
+
location:
|
|
48
|
+
type: object
|
|
49
|
+
properties:
|
|
50
|
+
city: { type: string }
|
|
51
|
+
country: { type: string }
|
|
52
|
+
shipping_options: { type: array, items: { type: string } }
|
|
53
|
+
provenance: { type: string, maxLength: 1000 }
|
|
54
|
+
|
|
55
|
+
consent_requirements:
|
|
56
|
+
visibility_default: "federation"
|
|
57
|
+
requires_consent: true
|
|
58
|
+
consent_purpose: "auction-listing"
|
|
59
|
+
data_retention: "365d"
|
|
60
|
+
|
|
61
|
+
moderation:
|
|
62
|
+
flags_enabled: true
|
|
63
|
+
auto_hide_threshold: 2
|
|
64
|
+
appeals_enabled: true
|
|
65
|
+
|
|
66
|
+
economy:
|
|
67
|
+
listing_fee_morsels: 10
|
|
68
|
+
escrow_enabled: true
|
|
69
|
+
escrow_release_on: "buyer_confirmation"
|
|
70
|
+
bid_increment_minimum: 1
|
|
71
|
+
|
|
72
|
+
ui_hints:
|
|
73
|
+
list_view: ["title", "starting_price.amount", "starting_price.currency", "category", "ends_at"]
|
|
74
|
+
detail_view: ["title", "description", "starting_price", "reserve_price", "buy_now_price", "category", "condition", "images", "location", "ends_at", "provenance"]
|
|
75
|
+
search_fields: ["title", "category", "location.city"]
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
csm: "1.0"
|
|
2
|
+
service:
|
|
3
|
+
name: "dating-directory"
|
|
4
|
+
type: "directory"
|
|
5
|
+
description: "Privacy-first dating profile directory with DMZ visibility and anonymous browsing"
|
|
6
|
+
locale: "en"
|
|
7
|
+
|
|
8
|
+
schema_mode: "strict"
|
|
9
|
+
|
|
10
|
+
data_schema:
|
|
11
|
+
required:
|
|
12
|
+
display_name:
|
|
13
|
+
type: string
|
|
14
|
+
minLength: 2
|
|
15
|
+
maxLength: 50
|
|
16
|
+
age_range:
|
|
17
|
+
type: string
|
|
18
|
+
enum: ["18-25", "26-35", "36-45", "46-55", "56+"]
|
|
19
|
+
looking_for:
|
|
20
|
+
type: array
|
|
21
|
+
items: { type: string, enum: ["friendship", "dating", "relationship", "activity_partner"] }
|
|
22
|
+
minItems: 1
|
|
23
|
+
interests:
|
|
24
|
+
type: array
|
|
25
|
+
items: { type: string }
|
|
26
|
+
minItems: 1
|
|
27
|
+
maxItems: 15
|
|
28
|
+
optional:
|
|
29
|
+
bio: { type: string, maxLength: 500 }
|
|
30
|
+
location:
|
|
31
|
+
type: object
|
|
32
|
+
properties:
|
|
33
|
+
city: { type: string }
|
|
34
|
+
country: { type: string }
|
|
35
|
+
availability: { type: string, enum: ["anytime", "weekdays", "evenings", "weekends"] }
|
|
36
|
+
languages: { type: array, items: { type: string }, maxItems: 5 }
|
|
37
|
+
values: { type: array, items: { type: string }, maxItems: 10 }
|
|
38
|
+
|
|
39
|
+
consent_requirements:
|
|
40
|
+
visibility_default: "dmz"
|
|
41
|
+
requires_consent: true
|
|
42
|
+
consent_purpose: "dating-discovery"
|
|
43
|
+
data_retention: "90d"
|
|
44
|
+
anonymous_browsing: true
|
|
45
|
+
|
|
46
|
+
moderation:
|
|
47
|
+
flags_enabled: true
|
|
48
|
+
auto_hide_threshold: 2
|
|
49
|
+
appeals_enabled: true
|
|
50
|
+
|
|
51
|
+
ui_hints:
|
|
52
|
+
list_view: ["display_name", "age_range", "interests", "location.city"]
|
|
53
|
+
detail_view: ["display_name", "bio", "age_range", "looking_for", "interests", "location", "availability", "languages", "values"]
|
|
54
|
+
search_fields: ["interests", "location.city", "looking_for", "age_range"]
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
csm: "1.0"
|
|
2
|
+
service:
|
|
3
|
+
name: "Harrastehakemisto"
|
|
4
|
+
type: "directory"
|
|
5
|
+
description: "Löydä harrastuksia ja samanhenkisiä ihmisiä läheltäsi"
|
|
6
|
+
locale: "fi"
|
|
7
|
+
|
|
8
|
+
schema_mode: "open"
|
|
9
|
+
|
|
10
|
+
data_schema:
|
|
11
|
+
required:
|
|
12
|
+
interests:
|
|
13
|
+
type: array
|
|
14
|
+
items: { type: string }
|
|
15
|
+
minItems: 1
|
|
16
|
+
location:
|
|
17
|
+
type: object
|
|
18
|
+
properties:
|
|
19
|
+
city: { type: string }
|
|
20
|
+
country: { type: string, default: "FI" }
|
|
21
|
+
required: [city]
|
|
22
|
+
optional:
|
|
23
|
+
bio: { type: string, maxLength: 500 }
|
|
24
|
+
availability: { type: string, enum: ["anytime", "mornings", "evenings", "weekends", "evenings-weekends"] }
|
|
25
|
+
seeking: { type: array, items: { type: string } }
|
|
26
|
+
|
|
27
|
+
consent_requirements:
|
|
28
|
+
visibility_default: "federation"
|
|
29
|
+
requires_consent: true
|
|
30
|
+
consent_purpose: "community-discovery"
|
|
31
|
+
data_retention: "until_revoked"
|
|
32
|
+
|
|
33
|
+
moderation:
|
|
34
|
+
flags_enabled: true
|
|
35
|
+
auto_hide_threshold: 5
|
|
36
|
+
appeals_enabled: false
|
|
37
|
+
|
|
38
|
+
ui_hints:
|
|
39
|
+
list_view: ["displayName", "interests", "location.city"]
|
|
40
|
+
detail_view: ["displayName", "bio", "interests", "location", "availability", "seeking"]
|
|
41
|
+
search_fields: ["interests", "location.city", "location.area"]
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
csm: "1.0"
|
|
2
|
+
service:
|
|
3
|
+
name: "marketplace"
|
|
4
|
+
type: "marketplace"
|
|
5
|
+
description: "Buy and sell items with listing fees and escrow protection"
|
|
6
|
+
locale: "en"
|
|
7
|
+
|
|
8
|
+
schema_mode: "open"
|
|
9
|
+
|
|
10
|
+
data_schema:
|
|
11
|
+
required:
|
|
12
|
+
title:
|
|
13
|
+
type: string
|
|
14
|
+
minLength: 3
|
|
15
|
+
maxLength: 200
|
|
16
|
+
price:
|
|
17
|
+
type: object
|
|
18
|
+
properties:
|
|
19
|
+
amount: { type: number, minimum: 0 }
|
|
20
|
+
currency: { type: string, default: "EUR" }
|
|
21
|
+
required: [amount]
|
|
22
|
+
category:
|
|
23
|
+
type: string
|
|
24
|
+
enum: ["electronics", "clothing", "home", "vehicles", "services", "other"]
|
|
25
|
+
seller_gaii:
|
|
26
|
+
type: string
|
|
27
|
+
optional:
|
|
28
|
+
description: { type: string, maxLength: 2000 }
|
|
29
|
+
images: { type: array, items: { type: string }, maxItems: 10 }
|
|
30
|
+
condition: { type: string, enum: ["new", "like_new", "good", "fair", "poor"] }
|
|
31
|
+
location:
|
|
32
|
+
type: object
|
|
33
|
+
properties:
|
|
34
|
+
city: { type: string }
|
|
35
|
+
country: { type: string }
|
|
36
|
+
shipping_options: { type: array, items: { type: string } }
|
|
37
|
+
tags: { type: array, items: { type: string }, maxItems: 10 }
|
|
38
|
+
|
|
39
|
+
consent_requirements:
|
|
40
|
+
visibility_default: "federation"
|
|
41
|
+
requires_consent: true
|
|
42
|
+
consent_purpose: "marketplace-listing"
|
|
43
|
+
data_retention: "until_revoked"
|
|
44
|
+
|
|
45
|
+
moderation:
|
|
46
|
+
flags_enabled: true
|
|
47
|
+
auto_hide_threshold: 3
|
|
48
|
+
appeals_enabled: true
|
|
49
|
+
|
|
50
|
+
economy:
|
|
51
|
+
listing_fee_morsels: 5
|
|
52
|
+
escrow_enabled: true
|
|
53
|
+
escrow_release_on: "buyer_confirmation"
|
|
54
|
+
|
|
55
|
+
ui_hints:
|
|
56
|
+
list_view: ["title", "price.amount", "price.currency", "category", "condition"]
|
|
57
|
+
detail_view: ["title", "description", "price", "category", "condition", "images", "location", "shipping_options", "seller_gaii"]
|
|
58
|
+
search_fields: ["title", "category", "tags", "location.city"]
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
csm: "1.0"
|
|
2
|
+
service:
|
|
3
|
+
name: "news-feed"
|
|
4
|
+
type: "feed"
|
|
5
|
+
description: "Community news feed with freshness scoring and topic categorization"
|
|
6
|
+
locale: "en"
|
|
7
|
+
|
|
8
|
+
schema_mode: "open"
|
|
9
|
+
|
|
10
|
+
data_schema:
|
|
11
|
+
required:
|
|
12
|
+
title:
|
|
13
|
+
type: string
|
|
14
|
+
minLength: 5
|
|
15
|
+
maxLength: 300
|
|
16
|
+
content:
|
|
17
|
+
type: string
|
|
18
|
+
minLength: 10
|
|
19
|
+
maxLength: 10000
|
|
20
|
+
author_gaii:
|
|
21
|
+
type: string
|
|
22
|
+
category:
|
|
23
|
+
type: string
|
|
24
|
+
enum: ["news", "announcement", "discussion", "event", "update", "question"]
|
|
25
|
+
optional:
|
|
26
|
+
summary: { type: string, maxLength: 500 }
|
|
27
|
+
source_url: { type: string, format: uri }
|
|
28
|
+
tags: { type: array, items: { type: string }, maxItems: 10 }
|
|
29
|
+
images: { type: array, items: { type: string }, maxItems: 5 }
|
|
30
|
+
location:
|
|
31
|
+
type: object
|
|
32
|
+
properties:
|
|
33
|
+
city: { type: string }
|
|
34
|
+
region: { type: string }
|
|
35
|
+
country: { type: string }
|
|
36
|
+
priority: { type: string, enum: ["normal", "important", "urgent"] }
|
|
37
|
+
expires_at: { type: string, format: date-time }
|
|
38
|
+
|
|
39
|
+
consent_requirements:
|
|
40
|
+
visibility_default: "federation"
|
|
41
|
+
requires_consent: false
|
|
42
|
+
consent_purpose: "news-distribution"
|
|
43
|
+
data_retention: "365d"
|
|
44
|
+
|
|
45
|
+
moderation:
|
|
46
|
+
flags_enabled: true
|
|
47
|
+
auto_hide_threshold: 5
|
|
48
|
+
appeals_enabled: true
|
|
49
|
+
|
|
50
|
+
scoring:
|
|
51
|
+
freshness_weight: 0.6
|
|
52
|
+
engagement_weight: 0.3
|
|
53
|
+
relevance_weight: 0.1
|
|
54
|
+
decay_half_life_hours: 24
|
|
55
|
+
|
|
56
|
+
ui_hints:
|
|
57
|
+
list_view: ["title", "category", "author_gaii", "summary"]
|
|
58
|
+
detail_view: ["title", "content", "category", "author_gaii", "tags", "source_url", "images", "location"]
|
|
59
|
+
search_fields: ["title", "content", "tags", "category", "location.city"]
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
csm: "1.0"
|
|
2
|
+
service:
|
|
3
|
+
name: "opinion-board"
|
|
4
|
+
type: "forum"
|
|
5
|
+
description: "Public opinion board with optional anonymous posting and structured discussions"
|
|
6
|
+
locale: "en"
|
|
7
|
+
|
|
8
|
+
schema_mode: "open"
|
|
9
|
+
|
|
10
|
+
data_schema:
|
|
11
|
+
required:
|
|
12
|
+
title:
|
|
13
|
+
type: string
|
|
14
|
+
minLength: 3
|
|
15
|
+
maxLength: 200
|
|
16
|
+
body:
|
|
17
|
+
type: string
|
|
18
|
+
minLength: 10
|
|
19
|
+
maxLength: 5000
|
|
20
|
+
topic:
|
|
21
|
+
type: string
|
|
22
|
+
enum: ["general", "politics", "technology", "environment", "culture", "economy", "health", "education"]
|
|
23
|
+
optional:
|
|
24
|
+
author_display_name: { type: string, maxLength: 50 }
|
|
25
|
+
anonymous: { type: boolean, default: false }
|
|
26
|
+
tags: { type: array, items: { type: string }, maxItems: 5 }
|
|
27
|
+
poll:
|
|
28
|
+
type: object
|
|
29
|
+
properties:
|
|
30
|
+
question: { type: string }
|
|
31
|
+
options: { type: array, items: { type: string }, minItems: 2, maxItems: 10 }
|
|
32
|
+
expires_at: { type: string, format: date-time }
|
|
33
|
+
reply_to: { type: string }
|
|
34
|
+
sentiment: { type: string, enum: ["positive", "negative", "neutral", "mixed"] }
|
|
35
|
+
|
|
36
|
+
consent_requirements:
|
|
37
|
+
visibility_default: "federation"
|
|
38
|
+
requires_consent: false
|
|
39
|
+
consent_purpose: "public-discussion"
|
|
40
|
+
data_retention: "until_revoked"
|
|
41
|
+
anonymous_option: true
|
|
42
|
+
|
|
43
|
+
moderation:
|
|
44
|
+
flags_enabled: true
|
|
45
|
+
auto_hide_threshold: 3
|
|
46
|
+
appeals_enabled: true
|
|
47
|
+
|
|
48
|
+
ui_hints:
|
|
49
|
+
list_view: ["title", "topic", "author_display_name", "anonymous"]
|
|
50
|
+
detail_view: ["title", "body", "topic", "author_display_name", "tags", "poll", "sentiment"]
|
|
51
|
+
search_fields: ["title", "body", "tags", "topic"]
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
csm: "1.0"
|
|
2
|
+
service:
|
|
3
|
+
name: "video-directory"
|
|
4
|
+
type: "directory"
|
|
5
|
+
description: "Community video directory with categorization and size limits"
|
|
6
|
+
locale: "en"
|
|
7
|
+
|
|
8
|
+
schema_mode: "open"
|
|
9
|
+
|
|
10
|
+
data_schema:
|
|
11
|
+
required:
|
|
12
|
+
title:
|
|
13
|
+
type: string
|
|
14
|
+
minLength: 3
|
|
15
|
+
maxLength: 200
|
|
16
|
+
video_url:
|
|
17
|
+
type: string
|
|
18
|
+
format: uri
|
|
19
|
+
creator_gaii:
|
|
20
|
+
type: string
|
|
21
|
+
category:
|
|
22
|
+
type: string
|
|
23
|
+
enum: ["tutorial", "entertainment", "documentary", "music", "news", "sports", "education", "other"]
|
|
24
|
+
optional:
|
|
25
|
+
description: { type: string, maxLength: 2000 }
|
|
26
|
+
thumbnail_url: { type: string, format: uri }
|
|
27
|
+
duration_seconds: { type: number, minimum: 1 }
|
|
28
|
+
tags: { type: array, items: { type: string }, maxItems: 15 }
|
|
29
|
+
language: { type: string }
|
|
30
|
+
resolution: { type: string, enum: ["360p", "480p", "720p", "1080p", "4k"] }
|
|
31
|
+
file_size_mb: { type: number, minimum: 0, maximum: 5000 }
|
|
32
|
+
transcript: { type: string, maxLength: 50000 }
|
|
33
|
+
chapters:
|
|
34
|
+
type: array
|
|
35
|
+
items:
|
|
36
|
+
type: object
|
|
37
|
+
properties:
|
|
38
|
+
title: { type: string }
|
|
39
|
+
start_seconds: { type: number }
|
|
40
|
+
license: { type: string, enum: ["cc-by", "cc-by-sa", "cc-by-nc", "cc0", "all-rights-reserved"] }
|
|
41
|
+
|
|
42
|
+
consent_requirements:
|
|
43
|
+
visibility_default: "federation"
|
|
44
|
+
requires_consent: false
|
|
45
|
+
consent_purpose: "video-sharing"
|
|
46
|
+
data_retention: "until_revoked"
|
|
47
|
+
|
|
48
|
+
moderation:
|
|
49
|
+
flags_enabled: true
|
|
50
|
+
auto_hide_threshold: 3
|
|
51
|
+
appeals_enabled: true
|
|
52
|
+
|
|
53
|
+
limits:
|
|
54
|
+
max_file_size_mb: 5000
|
|
55
|
+
allowed_formats: ["mp4", "webm", "mov", "avi"]
|
|
56
|
+
|
|
57
|
+
ui_hints:
|
|
58
|
+
list_view: ["title", "category", "creator_gaii", "duration_seconds", "thumbnail_url"]
|
|
59
|
+
detail_view: ["title", "description", "video_url", "category", "creator_gaii", "tags", "duration_seconds", "resolution", "language", "chapters", "license"]
|
|
60
|
+
search_fields: ["title", "description", "tags", "category", "language"]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aimeat",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "AIME AT — AI Memory Exchange and Action Transfer — reference implementation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"dist/",
|
|
15
|
-
"prisma/"
|
|
15
|
+
"prisma/",
|
|
16
|
+
"docs/AIMEAT_Help_Prompt.md",
|
|
17
|
+
"docs/csm-examples/"
|
|
16
18
|
],
|
|
17
19
|
"scripts": {
|
|
18
20
|
"dev": "tsx scripts/kill-port.ts && node --env-file=.env --import tsx src/index.ts start",
|