@squidcloud/cli 1.0.463 → 1.0.464
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/index.js +10 -4
- package/dist/resources/claude/skills/squid-development/SKILL.md +2 -1
- package/dist/resources/claude/skills/squid-development/reference/backend.md +40 -1
- package/dist/resources/claude/skills/squid-development/reference/client.md +1 -1
- package/dist/resources/claude/skills/squid-development/reference/openai.md +4 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -29888,7 +29888,14 @@ function isIntegrationEmbeddingModelSpec(model) {
|
|
|
29888
29888
|
* The supported AI image generation model names.
|
|
29889
29889
|
* @category AI
|
|
29890
29890
|
*/
|
|
29891
|
-
exports.OPENAI_IMAGE_MODEL_NAMES = [
|
|
29891
|
+
exports.OPENAI_IMAGE_MODEL_NAMES = [
|
|
29892
|
+
'gpt-image-1',
|
|
29893
|
+
'gpt-image-1-mini',
|
|
29894
|
+
'gpt-image-1.5',
|
|
29895
|
+
'gpt-image-2',
|
|
29896
|
+
'gpt-image-2-2026-04-21',
|
|
29897
|
+
'chatgpt-image-latest',
|
|
29898
|
+
];
|
|
29892
29899
|
/**
|
|
29893
29900
|
* @category AI
|
|
29894
29901
|
*/
|
|
@@ -30220,7 +30227,7 @@ function getConsoleAppRegionByStage(stage) {
|
|
|
30220
30227
|
case 'sandbox':
|
|
30221
30228
|
return 'us-east-1.aws.sandbox';
|
|
30222
30229
|
case 'staging':
|
|
30223
|
-
return '
|
|
30230
|
+
return 'squidai.westus3.azure.staging';
|
|
30224
30231
|
}
|
|
30225
30232
|
}
|
|
30226
30233
|
|
|
@@ -30545,7 +30552,6 @@ exports.KOTLIN_CONTROLLERS = [
|
|
|
30545
30552
|
'scheduler',
|
|
30546
30553
|
'secret',
|
|
30547
30554
|
'ws',
|
|
30548
|
-
'internal-extraction',
|
|
30549
30555
|
'notification',
|
|
30550
30556
|
];
|
|
30551
30557
|
function getEnvironmentPrefix(shard, region, cloudId, stage) {
|
|
@@ -37458,7 +37464,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"seek-bzip","version":"1.0.6",
|
|
|
37458
37464
|
(module) {
|
|
37459
37465
|
|
|
37460
37466
|
"use strict";
|
|
37461
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.
|
|
37467
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.464","description":"The Squid CLI","main":"dist/index.js","scripts":{"start":"node dist/index.js","start-ts":"ts-node -r tsconfig-paths/register src/index.ts","prebuild":"rimraf dist","build":"webpack --mode=production","build:dev":"webpack --mode=development","lint":"eslint","link":"npm run build && chmod 755 dist/index.js && npm link","watch":"webpack --watch","deploy":"npm run build && npm pack --silent | xargs -I {} mv {} package.tgz && npm install -g package.tgz && rm -rf package.tgz","publish:public":"npm run build && npm publish --access public"},"files":["dist/**/*"],"bin":{"squid":"dist/index.js"},"keywords":[],"author":"","license":"ISC","engines":{"node":">=18.0.0"},"dependencies":{"@squidcloud/local-backend":"^1.0.464","adm-zip":"^0.5.16","copy-webpack-plugin":"^14.0.0","decompress":"^4.2.1","logpipes":"^1.11.0","nodemon":"^3.1.9","terser-webpack-plugin":"^5.5.0","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","webpack":"^5.106.2","zip-webpack-plugin":"^4.0.1"},"devDependencies":{"@types/adm-zip":"^0.5.7","@types/decompress":"^4.2.7","@types/node":"^20.19.9","terminal-link":"^3.0.0"}}');
|
|
37462
37468
|
|
|
37463
37469
|
/***/ }
|
|
37464
37470
|
|
|
@@ -26,7 +26,7 @@ Squid is a backend-as-a-service platform that provides:
|
|
|
26
26
|
- **[ai.md](reference/ai.md)** → AI agents, chat, ask, askWithAnnotations, askAsync, askWithVoiceResponse, transcribeAndChat, transcribeAndAsk, knowledge bases, RAG, embeddings, image generation, audio, transcription, text-to-speech, TTS, connectedAgents, connectedIntegrations, connectedKnowledgeBases, @aiFunction, @secureAiAgent, @secureAiQuery, memory, memoryOptions, voiceOptions, OpenAI, Anthropic, Gemini, Grok, DALL-E, Whisper, MCP, @mcpServer, @mcpTool, executeAiQuery, executeAiApiCall, extraction, createPdf, upsert agent, listAgents
|
|
27
27
|
- **[chat-widget.md](reference/chat-widget.md)** → AI chat widget, @squidcloud/react-chat-widget, squid-chat-widget, squid-chat-widget-with-fab-button, embeddable chat, custom API webhook, AI query mode, chain-of-thought, status updates, session management, agentContext, memoryOptions, squid-ai-custom-api-url, squid-ai-agent-chat-options, FAB button, theming, CSS variables, localization, RTL, menu items slots, suggested prompts, voice transcription, error formatting, authentication, squid-auth-provider, onChange events
|
|
28
28
|
- **[databases.md](reference/databases.md)** → collections, documents, queries, subscriptions, snapshots, insert, update, delete, CRUD, real-time, dereference, pagination, transactions, query operators, eq, neq, gt, gte, lt, lte, like, in, nin, arrayIncludesSome, arrayIncludesAll, sortBy, limit, join queries, OR queries, @trigger, native queries, SQL, MongoDB, Elasticsearch, incrementInPath, decrementInPath, watch changes, doc(), projectFields, field projection, __docId__, __id
|
|
29
|
-
- **[backend.md](reference/backend.md)** → SquidService, @executable, @webhook, @trigger, TriggerRequest, @scheduler, @limits, rate limiting, quotas, decorators, backend functions, WebhookRequest, CronExpression, cron, file handling, SquidFile, getUserAuth, isAuthenticated, assertIsAuthenticated, createWebhookResponse, this.squid, this.secrets, @clientConnectionStateHandler, CLI, squid init, squid start, squid deploy, squid build, project structure, multiple services, service architecture, squidInject, cross-service communication
|
|
29
|
+
- **[backend.md](reference/backend.md)** → SquidService, @executable, @webhook, @trigger, TriggerRequest, @scheduler, @limits, rate limiting, quotas, decorators, backend functions, WebhookRequest, CronExpression, cron, file handling, SquidFile, getUserAuth, isAuthenticated, assertIsAuthenticated, createWebhookResponse, this.squid, this.secrets, @clientConnectionStateHandler, @onQueueMessage, QueueMessageRequest, queue message handler, server-side queue consumer, CLI, squid init, squid start, squid deploy, squid build, project structure, multiple services, service architecture, squidInject, cross-service communication
|
|
30
30
|
- **[security.md](reference/security.md)** → security rules, @secureDatabase, @secureCollection, @secureTopic, @secureStorage, @secureApi, @secureNativeQuery, @secureAiQuery, @secureAiAgent, @secureDistributedLock, @secureGraphQL, QueryContext, MutationContext, isSubqueryOf, affectsPath, permissions, authorization, row-level security, role-based access
|
|
31
31
|
- **[admin.md](reference/admin.md)** → ManagementClient, management API keys, organizations, applications, programmatic management, CI/CD, automation, integrations admin, secrets admin, upsertIntegration, discoverDataConnectionSchema, testDataConnection, createOrganization, createApplication
|
|
32
32
|
- **[api.md](reference/api.md)** → API, REST API, HTTP endpoints, API reference, Agent API, AI Audio API, AI Image API, KnowledgeBase API, Matchmaking API, Web Utilities API, Database API, Extraction API
|
|
@@ -79,6 +79,7 @@ Client → Squid Cloud → Your Backend → Integration → Response
|
|
|
79
79
|
| Webhooks from external services | **Yes** | Use `@webhook` decorator |
|
|
80
80
|
| Scheduled jobs | **Yes** | Use `@scheduler` decorator |
|
|
81
81
|
| Server-side secrets | **Yes** | Access via `this.secrets` |
|
|
82
|
+
| Handle queue messages server-side | **Yes** | Use `@onQueueMessage` decorator |
|
|
82
83
|
|
|
83
84
|
### What Squid Cloud Handles
|
|
84
85
|
|
|
@@ -17,10 +17,11 @@ Docs: https://docs.getsquid.ai/reference-docs/backend/
|
|
|
17
17
|
- Triggers (@trigger)
|
|
18
18
|
- Schedulers (@scheduler)
|
|
19
19
|
- Rate Limiting (@limits)
|
|
20
|
+
- Queue Message Handlers (@onQueueMessage)
|
|
20
21
|
- Client Connection State (@clientConnectionStateHandler)
|
|
21
22
|
- Cross-Service Communication (squidInject)
|
|
22
23
|
- Using Squid Client in Backend
|
|
23
|
-
- File Handling
|
|
24
|
+
- File Handling
|
|
24
25
|
|
|
25
26
|
## CLI Commands
|
|
26
27
|
|
|
@@ -461,6 +462,44 @@ export class MyService extends SquidService {
|
|
|
461
462
|
**Scopes:** `'global'`, `'user'`, `'ip'`
|
|
462
463
|
**Periods:** `'hourly'`, `'daily'`, `'weekly'`, `'monthly'`, `'quarterly'`, `'annually'`
|
|
463
464
|
|
|
465
|
+
## Queue Message Handlers (@onQueueMessage)
|
|
466
|
+
|
|
467
|
+
The `@onQueueMessage` decorator registers a backend handler that is called server-side whenever a message is produced to a queue topic. Unlike client-side `.consume()`, this handler runs in the backend with full permissions and no client connection required.
|
|
468
|
+
|
|
469
|
+
```typescript
|
|
470
|
+
import { SquidService, onQueueMessage, QueueMessageRequest } from '@squidcloud/backend';
|
|
471
|
+
|
|
472
|
+
export class MyService extends SquidService {
|
|
473
|
+
// Built-in queue (default integration)
|
|
474
|
+
@onQueueMessage<string>('notifications')
|
|
475
|
+
async onNotification(request: QueueMessageRequest<string>): Promise<void> {
|
|
476
|
+
console.log(request.message); // The message payload (typed)
|
|
477
|
+
console.log(request.topicName); // 'notifications'
|
|
478
|
+
console.log(request.integrationId); // 'built_in_queue'
|
|
479
|
+
// Full backend permissions: this.squid, this.secrets, etc.
|
|
480
|
+
await this.squid.collection('log').doc().insert({ msg: request.message });
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
// External Kafka integration
|
|
484
|
+
@onQueueMessage<OrderEvent>('orders', 'kafka')
|
|
485
|
+
async onKafkaOrder(request: QueueMessageRequest<OrderEvent>): Promise<void> {
|
|
486
|
+
console.log(request.message); // Typed OrderEvent payload
|
|
487
|
+
console.log(request.integrationId); // 'kafka'
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
**`QueueMessageRequest<T>`:**
|
|
493
|
+
- `message: T` - The message payload (typed by the decorator's generic parameter)
|
|
494
|
+
- `topicName: string` - The topic name the message was received on
|
|
495
|
+
- `integrationId: string` - The integration ID (`'built_in_queue'` or custom)
|
|
496
|
+
|
|
497
|
+
**Notes:**
|
|
498
|
+
- The handler is called once per message, server-side — no client needs to be connected
|
|
499
|
+
- Works with both built-in queue and external Kafka integrations
|
|
500
|
+
- To secure the topic, use `@secureTopic` — see [security.md](security.md)
|
|
501
|
+
- The handler receives each message individually (not batched)
|
|
502
|
+
|
|
464
503
|
## Client Connection State (@clientConnectionStateHandler)
|
|
465
504
|
|
|
466
505
|
Handle client connection and disconnection events.
|
|
@@ -285,7 +285,7 @@ const subscription = queue.consume<Message>().subscribe(message => {
|
|
|
285
285
|
subscription.unsubscribe();
|
|
286
286
|
```
|
|
287
287
|
|
|
288
|
-
To secure queue topics, see [security.md](security.md) for `@secureTopic`. For Kafka and other queue integrations, see [connectors.md](connectors.md).
|
|
288
|
+
To secure queue topics, see [security.md](security.md) for `@secureTopic`. For Kafka and other queue integrations, see [connectors.md](connectors.md). To handle messages server-side without a client subscriber, use `@onQueueMessage` in your backend — see [backend.md](backend.md).
|
|
289
289
|
|
|
290
290
|
## Distributed Locks
|
|
291
291
|
|
|
@@ -73,13 +73,13 @@ const voiceResult = await agent.askWithVoiceResponse('Hello', {
|
|
|
73
73
|
});
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
## Image Generation (
|
|
76
|
+
## Image Generation (gpt-image-*)
|
|
77
77
|
|
|
78
78
|
```typescript
|
|
79
79
|
const imageUrl = await squid.ai().image().generate('A futuristic city', {
|
|
80
|
-
modelName: '
|
|
81
|
-
quality: '
|
|
82
|
-
size: '1024x1024' // '1024x1024' | '
|
|
80
|
+
modelName: 'gpt-image-1',
|
|
81
|
+
quality: 'high', // 'auto' | 'high' | 'medium' | 'low'
|
|
82
|
+
size: '1024x1024' // '1024x1024' | '1024x1536' | '1536x1024' | 'auto'
|
|
83
83
|
});
|
|
84
84
|
```
|
|
85
85
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squidcloud/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.464",
|
|
4
4
|
"description": "The Squid CLI",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"node": ">=18.0.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@squidcloud/local-backend": "^1.0.
|
|
31
|
+
"@squidcloud/local-backend": "^1.0.464",
|
|
32
32
|
"adm-zip": "^0.5.16",
|
|
33
33
|
"copy-webpack-plugin": "^14.0.0",
|
|
34
34
|
"decompress": "^4.2.1",
|