@reverbia/portal 1.0.0-next.20251114200831 → 1.0.0-next.20251117091004

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/README.md CHANGED
@@ -57,6 +57,18 @@ make generate
57
57
  This command regenerates both the Swagger specification in `docs` and the
58
58
  TypeScript client in `typescript`.
59
59
 
60
- ### Run e2e test
60
+ ### Run E2E Test
61
61
 
62
- This will be replaced with docker compose and proper setup. For now, to test worker with anvil, run `make test-e2e`.
62
+ Single command to start everything and run E2E tests:
63
+
64
+ ```bash
65
+ make test-e2e
66
+ ```
67
+
68
+ This will:
69
+ 1. Start all Docker services (Anvil, Postgres, Server, Worker)
70
+ 2. Deploy contracts to Anvil
71
+ 3. Worker detects contracts and starts processing
72
+ 4. Show logs and keep running
73
+
74
+ Press Ctrl+C to stop.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reverbia/portal",
3
- "version": "1.0.0-next.20251114200831",
3
+ "version": "1.0.0-next.20251117091004",
4
4
  "description": "AI Portal is a prepaid escrow-based API gateway for wallet-authenticated LLM usage. It provides an OpenAI-compatible API with on-chain settlement for AI inference costs.",
5
5
  "main": "index.js",
6
6
  "directories": {
package/swagger.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "components": {"schemas":{"handlers.HealthResponse":{"properties":{"status":{"description":"Status indicates the service health status","type":"string"},"timestamp":{"description":"Timestamp is the Unix timestamp of the response","type":"integer"},"version":{"description":"Version is the current API version","type":"string"}},"type":"object"},"llmapi.ChatCompletionRequest":{"properties":{"messages":{"description":"Messages is the conversation history","items":{"$ref":"#/components/schemas/llmapi.Message"},"type":"array","uniqueItems":false},"model":{"description":"Model is the model identifier","type":"string"},"stream":{"description":"Stream indicates if response should be streamed","type":"boolean"}},"type":"object"},"llmapi.ChatCompletionResponse":{"properties":{"choices":{"description":"Choices contains the completion choices","items":{"$ref":"#/components/schemas/llmapi.Choice"},"type":"array","uniqueItems":false},"id":{"description":"ID is the completion ID","type":"string"},"model":{"description":"Model is the model used","type":"string"}},"type":"object"},"llmapi.Choice":{"properties":{"finish_reason":{"description":"FinishReason indicates why the completion stopped","type":"string"},"index":{"description":"Index is the choice index","type":"integer"},"message":{"$ref":"#/components/schemas/llmapi.Message"}},"type":"object"},"llmapi.EmbeddingData":{"properties":{"embedding":{"description":"Embedding vector","items":{"type":"number"},"type":"array","uniqueItems":false},"index":{"description":"Index of the embedding","type":"integer"},"object":{"description":"Object type identifier","type":"string"}},"type":"object"},"llmapi.EmbeddingExtraFields":{"description":"ExtraFields contains additional metadata","properties":{"chunk_index":{"description":"ChunkIndex is the chunk index (0 for single requests)","type":"integer"},"latency":{"description":"Latency is the request latency in milliseconds","type":"integer"},"model_requested":{"description":"ModelRequested is the model that was requested","type":"string"},"provider":{"description":"Provider is the LLM provider used (e.g., \"openai\", \"anthropic\")","type":"string"},"request_type":{"description":"RequestType is always \"embedding\"","type":"string"}},"type":"object"},"llmapi.EmbeddingRequest":{"properties":{"dimensions":{"description":"Dimensions is the number of dimensions the resulting output embeddings should have (optional)","type":"integer"},"encoding_format":{"description":"EncodingFormat is the format to return the embeddings in (optional: \"float\" or \"base64\")","type":"string"},"input":{"description":"Input text or tokens to embed (can be string, []string, []int, or [][]int)"},"model":{"description":"Model identifier in 'provider/model' format","type":"string"}},"type":"object"},"llmapi.EmbeddingResponse":{"properties":{"data":{"description":"Data contains the embeddings","items":{"$ref":"#/components/schemas/llmapi.EmbeddingData"},"type":"array","uniqueItems":false},"extra_fields":{"$ref":"#/components/schemas/llmapi.EmbeddingExtraFields"},"model":{"description":"Model is the model used","type":"string"},"object":{"description":"Object is always \"list\"","type":"string"},"usage":{"$ref":"#/components/schemas/llmapi.EmbeddingUsage"}},"type":"object"},"llmapi.EmbeddingUsage":{"description":"Usage contains token usage information","properties":{"prompt_tokens":{"description":"PromptTokens is the number of tokens in the prompt","type":"integer"},"total_tokens":{"description":"TotalTokens is the total number of tokens used","type":"integer"}},"type":"object"},"llmapi.Message":{"description":"Message is the generated message","properties":{"content":{"description":"Content is the message content","type":"string"},"role":{"$ref":"#/components/schemas/llmapi.Role"}},"type":"object"},"llmapi.Role":{"description":"Role is the message role (system, user, assistant)","type":"string","x-enum-varnames":["RoleAssistant","RoleUser","RoleSystem"]},"response.ErrorResponse":{"properties":{"error":{"type":"string"}},"type":"object"}}},
2
+ "components": {"schemas":{"handlers.HealthResponse":{"properties":{"status":{"description":"Status indicates the service health status","type":"string"},"timestamp":{"description":"Timestamp is the Unix timestamp of the response","type":"integer"},"version":{"description":"Version is the current API version","type":"string"}},"type":"object"},"llmapi.ChatCompletionExtraFields":{"description":"ExtraFields contains additional metadata","properties":{"latency":{"description":"Latency is the request latency in milliseconds","type":"integer"},"model_requested":{"description":"ModelRequested is the model that was requested","type":"string"},"provider":{"description":"Provider is the LLM provider used (e.g., \"openai\", \"anthropic\")","type":"string"},"request_type":{"description":"RequestType is always \"chat_completion\"","type":"string"}},"type":"object"},"llmapi.ChatCompletionRequest":{"properties":{"messages":{"description":"Messages is the conversation history","items":{"$ref":"#/components/schemas/llmapi.Message"},"type":"array","uniqueItems":false},"model":{"description":"Model is the model identifier","type":"string"},"stream":{"description":"Stream indicates if response should be streamed","type":"boolean"}},"type":"object"},"llmapi.ChatCompletionResponse":{"properties":{"choices":{"description":"Choices contains the completion choices","items":{"$ref":"#/components/schemas/llmapi.Choice"},"type":"array","uniqueItems":false},"extra_fields":{"$ref":"#/components/schemas/llmapi.ChatCompletionExtraFields"},"id":{"description":"ID is the completion ID","type":"string"},"model":{"description":"Model is the model used","type":"string"},"usage":{"$ref":"#/components/schemas/llmapi.ChatCompletionUsage"}},"type":"object"},"llmapi.ChatCompletionUsage":{"description":"Usage contains token usage information","properties":{"completion_tokens":{"description":"CompletionTokens is the number of tokens in the completion","type":"integer"},"prompt_tokens":{"description":"PromptTokens is the number of tokens in the prompt","type":"integer"},"total_tokens":{"description":"TotalTokens is the total number of tokens used","type":"integer"}},"type":"object"},"llmapi.Choice":{"properties":{"finish_reason":{"description":"FinishReason indicates why the completion stopped","type":"string"},"index":{"description":"Index is the choice index","type":"integer"},"message":{"$ref":"#/components/schemas/llmapi.Message"}},"type":"object"},"llmapi.EmbeddingData":{"properties":{"embedding":{"description":"Embedding vector","items":{"type":"number"},"type":"array","uniqueItems":false},"index":{"description":"Index of the embedding","type":"integer"},"object":{"description":"Object type identifier","type":"string"}},"type":"object"},"llmapi.EmbeddingExtraFields":{"description":"ExtraFields contains additional metadata","properties":{"chunk_index":{"description":"ChunkIndex is the chunk index (0 for single requests)","type":"integer"},"latency":{"description":"Latency is the request latency in milliseconds","type":"integer"},"model_requested":{"description":"ModelRequested is the model that was requested","type":"string"},"provider":{"description":"Provider is the LLM provider used (e.g., \"openai\", \"anthropic\")","type":"string"},"request_type":{"description":"RequestType is always \"embedding\"","type":"string"}},"type":"object"},"llmapi.EmbeddingRequest":{"properties":{"dimensions":{"description":"Dimensions is the number of dimensions the resulting output embeddings should have (optional)","type":"integer"},"encoding_format":{"description":"EncodingFormat is the format to return the embeddings in (optional: \"float\" or \"base64\")","type":"string"},"input":{"description":"Input text or tokens to embed (can be string, []string, []int, or [][]int)"},"model":{"description":"Model identifier in 'provider/model' format","type":"string"}},"type":"object"},"llmapi.EmbeddingResponse":{"properties":{"data":{"description":"Data contains the embeddings","items":{"$ref":"#/components/schemas/llmapi.EmbeddingData"},"type":"array","uniqueItems":false},"extra_fields":{"$ref":"#/components/schemas/llmapi.EmbeddingExtraFields"},"model":{"description":"Model is the model used","type":"string"},"object":{"description":"Object is always \"list\"","type":"string"},"usage":{"$ref":"#/components/schemas/llmapi.EmbeddingUsage"}},"type":"object"},"llmapi.EmbeddingUsage":{"description":"Usage contains token usage information","properties":{"prompt_tokens":{"description":"PromptTokens is the number of tokens in the prompt","type":"integer"},"total_tokens":{"description":"TotalTokens is the total number of tokens used","type":"integer"}},"type":"object"},"llmapi.Message":{"description":"Message is the generated message","properties":{"content":{"description":"Content is the message content","type":"string"},"role":{"$ref":"#/components/schemas/llmapi.Role"}},"type":"object"},"llmapi.Role":{"description":"Role is the message role (system, user, assistant)","type":"string","x-enum-varnames":["RoleAssistant","RoleUser","RoleSystem"]},"response.ErrorResponse":{"properties":{"error":{"type":"string"}},"type":"object"}}},
3
3
  "info": {"title":"","version":""},
4
4
  "externalDocs": {"description":"","url":""},
5
5
  "paths": {"/api/v1/chat/completions":{"post":{"description":"Generates a chat completion using the configured gateway.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/llmapi.ChatCompletionRequest"}}},"description":"Chat completion request","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/llmapi.ChatCompletionResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create chat completion","tags":["Chat"]}},"/api/v1/embeddings":{"post":{"description":"Generates embeddings using the configured gateway.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/llmapi.EmbeddingRequest"}}},"description":"Embedding request","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/llmapi.EmbeddingResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create embeddings","tags":["Embeddings"]}},"/health":{"get":{"description":"Returns the current health status of the service.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handlers.HealthResponse"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Health check","tags":["Health"]}}},