@noodleseed/one 0.171.0 → 0.172.1
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/commands/solutions-connections.js +1 -1
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-solutions.js +1 -1
- package/node_modules/@noodle-borg/service/dist/channels/360dialog.js +7 -2
- package/node_modules/@noodle-borg/service/dist/channels/runtime.js +4 -3
- package/package.json +1 -1
|
@@ -40,7 +40,7 @@ export async function runSolutionConnections(rest, env, home, options = {}) {
|
|
|
40
40
|
try {
|
|
41
41
|
if (action === 'connect') {
|
|
42
42
|
const installation = await serviceJson(base, resolved.token, {}, fetchImpl);
|
|
43
|
-
const portal = new URL(args.portal ?? env.NOODLE_PORTAL_URL ?? 'https://portal.noodleseed.
|
|
43
|
+
const portal = new URL(args.portal ?? env.NOODLE_PORTAL_URL ?? 'https://portal.noodleseed.dev');
|
|
44
44
|
if (portal.origin !== portal.href.replace(/\/$/, '') ||
|
|
45
45
|
(portal.protocol !== 'https:' &&
|
|
46
46
|
!(portal.protocol === 'http:' &&
|
|
@@ -370,7 +370,7 @@ export const CATALOG_SOLUTIONS = {
|
|
|
370
370
|
type: 'string',
|
|
371
371
|
value: '<origin>',
|
|
372
372
|
summary: 'Portal origin; defaults to NOODLE_PORTAL_URL or the managed Portal.',
|
|
373
|
-
constraints: { default: 'https://portal.noodleseed.
|
|
373
|
+
constraints: { default: 'https://portal.noodleseed.dev' },
|
|
374
374
|
},
|
|
375
375
|
{
|
|
376
376
|
...OPTIONAL_FLAG,
|
|
@@ -131,13 +131,18 @@ export class Dialog360 {
|
|
|
131
131
|
if (!response.ok)
|
|
132
132
|
throw new ChannelError('provider_unavailable');
|
|
133
133
|
const parsed = z
|
|
134
|
-
.object({
|
|
134
|
+
.object({
|
|
135
|
+
id: identifier,
|
|
136
|
+
health_status: z.object({ can_send_message: z.enum(['AVAILABLE', 'LIMITED', 'BLOCKED']) }),
|
|
137
|
+
})
|
|
135
138
|
.safeParse(await boundedJson(response));
|
|
136
139
|
if (!parsed.success)
|
|
137
140
|
throw new ChannelError('provider_response_invalid');
|
|
138
141
|
return {
|
|
139
142
|
phoneNumberId: parsed.data.id,
|
|
140
|
-
|
|
143
|
+
// LIMITED meets provider messaging requirements; provider limits still govern each send.
|
|
144
|
+
canSend: parsed.data.health_status.can_send_message !== 'BLOCKED',
|
|
145
|
+
status: parsed.data.health_status.can_send_message,
|
|
141
146
|
};
|
|
142
147
|
}
|
|
143
148
|
async webhook() {
|
|
@@ -56,8 +56,8 @@ export class WhatsAppRuntime {
|
|
|
56
56
|
const checks = [];
|
|
57
57
|
const check = async (name, work) => {
|
|
58
58
|
try {
|
|
59
|
-
await work();
|
|
60
|
-
checks.push({ name, status: 'ready' });
|
|
59
|
+
const code = await work();
|
|
60
|
+
checks.push({ name, status: 'ready', ...(code ? { code } : {}) });
|
|
61
61
|
}
|
|
62
62
|
catch (error) {
|
|
63
63
|
checks.push({
|
|
@@ -98,7 +98,8 @@ export class WhatsAppRuntime {
|
|
|
98
98
|
if (health.phoneNumberId !== binding.phoneNumberId)
|
|
99
99
|
throw new ChannelError('asset_mismatch');
|
|
100
100
|
if (!health.canSend)
|
|
101
|
-
throw new ChannelError('
|
|
101
|
+
throw new ChannelError('provider_messaging_blocked');
|
|
102
|
+
return health.status === 'LIMITED' ? 'provider_messaging_limited' : undefined;
|
|
102
103
|
});
|
|
103
104
|
await check('webhook', async () => {
|
|
104
105
|
const state = await this.webhook(id, req);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noodleseed/one",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.172.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Noodle CLI by Noodle Seed — author, run, and deploy declarative MCP servers. Embedding the assistant in your own web app is @noodleseed/assistant.",
|
|
6
6
|
"license": "Apache-2.0",
|