@north-light/cli 0.3.510 → 0.3.511
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/api/contract.d.ts +1 -1
- package/dist/api/contract.js +1 -1
- package/dist/builtin-memory/crouter-sdk/release-notes.md +2 -0
- package/dist/builtin-memory/northlight-apps/concepts/providers.md +2 -2
- package/dist/clients/attach/viewer.js +413 -413
- package/dist/core/command-plugins/compose.js +1 -1
- package/dist/core/providers/call.d.ts +1 -1
- package/dist/core/providers/call.js +1 -1
- package/dist/core/subscription-state.js +4 -4
- package/dist/daemon/api/handlers/providers.js +1 -1
- package/docs/apps/concepts/providers.md +2 -2
- package/docs/sdk/release-notes.md +2 -0
- package/package.json +2 -2
- package/packages/crouter-identity/package.json +1 -1
- package/runtime.lock.json +12 -12
package/dist/api/contract.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The contract level this build serves and requires. Written by `scripts/contract.mjs release`; never edit by hand. */
|
|
2
|
-
export declare const CONTRACT_LEVEL = "1.
|
|
2
|
+
export declare const CONTRACT_LEVEL = "1.21";
|
|
3
3
|
/** Request header naming the one contract level the caller needs, e.g. `1.3`. Optional: absent means no check. */
|
|
4
4
|
export declare const REQUIRED_CONTRACT_HEADER = "Crouter-Required-Contract";
|
|
5
5
|
/** Response header listing the contract levels the server serves, comma-separated, one per major, e.g. `1.3`. */
|
package/dist/api/contract.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var c=Object.defineProperty;var e=(r,t)=>c(r,"name",{value:t,configurable:!0});const f="1.
|
|
1
|
+
var c=Object.defineProperty;var e=(r,t)=>c(r,"name",{value:t,configurable:!0});const f="1.21",i="Crouter-Required-Contract",p="Crouter-Contract";function l(r){const t=/^(\d+)\.(\d+)$/.exec(r.trim());return t===null?null:{major:Number(t[1]),minor:Number(t[2])}}e(l,"parseContractLevel");function a(r){return r==null?[]:r.split(",").map(t=>l(t)).filter(t=>t!==null)}e(a,"parseServedContracts");function s(r,t){const n=l(r);return n===null?!1:(typeof t=="string"||t===null||t===void 0?a(t):t).some(u=>u.major===n.major&&u.minor>=n.minor)}e(s,"contractSatisfies");function C(r,t,n={}){if(r===void 0)return null;if(l(r)===null)return{status:400,code:"invalid_request",param:i,message:`${i} must be a contract level like 1.0.`};if(s(r,t))return null;const o=r.trim();return{status:426,code:"runtime_version_unsupported",message:t===null||a(t).length===0?`The runtime did not name its contract level; the caller requires contract ${o} or later. Roll the runtime forward.`:`The runtime serves contract ${t}; the caller requires contract ${o} or later within the same major. Roll the runtime forward, or pin an SDK whose crouterContract the runtime serves.`,details:{sdk_version:(n.legacyMinimum??"").trim(),runtime_version:n.runtimeVersion??null,required_contract:o,runtime_contract:t}}}e(C,"contractRefusal");export{p as CONTRACT_HEADER,f as CONTRACT_LEVEL,i as REQUIRED_CONTRACT_HEADER,C as contractRefusal,s as contractSatisfies,l as parseContractLevel,a as parseServedContracts};
|
|
@@ -17,6 +17,8 @@ Changes to `@north-light/sdk` that can change what an existing app sees. Newest
|
|
|
17
17
|
|
|
18
18
|
## 0.3.505
|
|
19
19
|
|
|
20
|
+
`providers.tools()` now returns every installed provider, including providers with no granted group. Each entry’s `commands` contains every grouped leaf; `groups` still contains only granted groups. Filter tools shown to users by `groups` and expect `scope_missing` when directly calling an ungranted leaf.
|
|
21
|
+
|
|
20
22
|
The dashboard and `/resume` content search add two routes and two optional fields. Additive: no request or response an existing app sends or reads changes.
|
|
21
23
|
|
|
22
24
|
- `GET /v1/canvas/live-roots` returns the profile's live root conversations with their attention state (`LiveRootsDTO`).
|
|
@@ -22,7 +22,7 @@ Take scope strings from the **Add permissions** list. Do not guess them. [[north
|
|
|
22
22
|
|
|
23
23
|
## Find the tools, then call one
|
|
24
24
|
|
|
25
|
-
`providers.tools('<provider>')` lists the tools the person has granted your app, with their descriptions and parameters. Tool names and arguments come from there, never from memory:
|
|
25
|
+
`providers.tools('<provider>')` lists all grouped tools of an installed provider in `commands`; `groups` lists only the tools the person has granted your app, with their descriptions and parameters. Tool names and arguments come from there, never from memory:
|
|
26
26
|
|
|
27
27
|
```ts
|
|
28
28
|
import type {ConnectedCrouter} from '@north-light/sdk';
|
|
@@ -44,7 +44,7 @@ export async function textMe(runtime: ConnectedCrouter, body: string) {
|
|
|
44
44
|
const sent = await runtime.providers.call({provider: 'sms', tool: 'send', arguments: {body: 'Hello from my first Northlight app.'}});
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
`send` takes a required `body` and an optional `file`. It has no recipient argument: it texts the verified phone of the person who signed in to your app, from Northlight's number, at most 50 texts per person per UTC day. Calling `providers.tools()` with no provider lists every provider the
|
|
47
|
+
`send` takes a required `body` and an optional `file`. It has no recipient argument: it texts the verified phone of the person who signed in to your app, from Northlight's number, at most 50 texts per person per UTC day. Calling `providers.tools()` with no provider lists every installed provider, including those whose groups the app cannot call.
|
|
48
48
|
|
|
49
49
|
A call is refused when the scope is missing from the grant. The refusal is an `APIError` whose code says why (`scope_missing` for a scope the run or grant lacks).
|
|
50
50
|
|