buckyos 0.7.124 → 0.7.126
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 +35 -0
- package/cli/dist/cli.mjs +30 -1
- package/cli/dist/cli.mjs.map +1 -1
- package/cli/modules/app.ts +31 -0
- package/cli/version.ts +1 -1
- package/dist/browser.cjs +1 -1
- package/dist/browser.mjs +110 -108
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +110 -108
- package/dist/msg_center_client.d.ts +9 -49
- package/dist/msg_center_client.d.ts.map +1 -1
- package/dist/{ndm_proxy-357b2a64.js → ndm_proxy-52a07229.js} +6 -6
- package/dist/ndm_proxy-52a07229.js.map +1 -0
- package/dist/{ndm_proxy-ebc5a1bf.mjs → ndm_proxy-54e7d13f.mjs} +131 -167
- package/dist/ndm_proxy-54e7d13f.mjs.map +1 -0
- package/dist/node.cjs +1 -1
- package/dist/node.mjs +110 -108
- package/dist/sdk_core.d.ts +2 -1
- package/dist/sdk_core.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/ndm_proxy-357b2a64.js.map +0 -1
- package/dist/ndm_proxy-ebc5a1bf.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -289,3 +289,38 @@ npm dist-tag add buckyos@<已验证版本> latest
|
|
|
289
289
|
|
|
290
290
|
回滚 dist-tag 不会改变已经安装的 BuckyOS system Tool;系统 Tool 只随 installer/updater 事务
|
|
291
291
|
更新或回滚。
|
|
292
|
+
|
|
293
|
+
### Session inbox addresses (breaking change)
|
|
294
|
+
|
|
295
|
+
MsgCenter queue calls (`getNext`, `peekBox`, `listBoxByTime`) require `mailbox`
|
|
296
|
+
in place of `owner`: `did:bns:alice/session-123` selects exactly that session;
|
|
297
|
+
`did:bns:alice` selects only records without a session. Existing `session_id`
|
|
298
|
+
values define the partitions, including automatically derived `dm:<peer DID>`
|
|
299
|
+
and group sessions. Set `msg.to_session` (MsgObject v2) to address a chosen session;
|
|
300
|
+
`msg.thread.topic` is only a semantic hint and never selects a session.
|
|
301
|
+
|
|
302
|
+
```ts
|
|
303
|
+
import { mailboxAddress } from 'buckyos'
|
|
304
|
+
const record = await client.getNext({
|
|
305
|
+
mailbox: mailboxAddress('did:bns:alice', 'session-123'),
|
|
306
|
+
box_kind: 'INBOX',
|
|
307
|
+
lock_on_take: true,
|
|
308
|
+
})
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
`listMailboxes(owner, boxKind)` lists inboxes with unread records for an authorized
|
|
312
|
+
owner-wide router. `moveRecord(recordId, mailbox)` moves a record within one
|
|
313
|
+
owner; `updateRecordSession` also moves its inbox. Both source and destination
|
|
314
|
+
require write access. Omitting the session in `moveRecord` selects the default
|
|
315
|
+
inbox. Record responses include their canonical `mailbox` address.
|
|
316
|
+
|
|
317
|
+
RBAC resources are `obj://msg-center/inbox/<did>/<session_id>` (and analogous
|
|
318
|
+
`sent`, `group_inbox`, `request_box` paths). Read access permits non-locking
|
|
319
|
+
reads; consumption and updates require write access. Exact grants do not cover
|
|
320
|
+
other sessions, the default inbox, owner-wide projections, or delivery queues.
|
|
321
|
+
|
|
322
|
+
Use `mailboxResource(mailboxAddress(owner, sessionId), 'INBOX')` to construct
|
|
323
|
+
RBAC policy keys. Resource encoding additionally escapes dots, percent signs,
|
|
324
|
+
and pattern characters so `keyMatch3` cannot expand an exact session grant.
|
|
325
|
+
For example, `did:web:agent.zone/approval.1` maps to
|
|
326
|
+
`obj://msg-center/inbox/did:web:agent%2Ezone/approval%2E1`.
|
package/cli/dist/cli.mjs
CHANGED
|
@@ -4865,7 +4865,7 @@ function invalid(stage, message, entry) {
|
|
|
4865
4865
|
function stableJsonDigest(value) {
|
|
4866
4866
|
return sha256Bytes(new TextEncoder().encode(ndn.toCanonicalJsonString(value)));
|
|
4867
4867
|
}
|
|
4868
|
-
const PACKAGE_VERSION = "0.7.
|
|
4868
|
+
const PACKAGE_VERSION = "0.7.126";
|
|
4869
4869
|
const TOOL_VERSION = PACKAGE_VERSION;
|
|
4870
4870
|
const SDK_VERSION = PACKAGE_VERSION;
|
|
4871
4871
|
const PROTOCOL_VERSION = "1";
|
|
@@ -6328,6 +6328,7 @@ function createAppModule(dependencies = {}) {
|
|
|
6328
6328
|
installCommand(dependencies),
|
|
6329
6329
|
upgradeCommand(dependencies),
|
|
6330
6330
|
uninstallCommand(dependencies),
|
|
6331
|
+
cancelCommand$1(),
|
|
6331
6332
|
lifecycleCommand("start", "Start an installed App"),
|
|
6332
6333
|
lifecycleCommand("stop", "Stop an installed App"),
|
|
6333
6334
|
restartCommand(),
|
|
@@ -6345,6 +6346,34 @@ function createAppModule(dependencies = {}) {
|
|
|
6345
6346
|
})
|
|
6346
6347
|
};
|
|
6347
6348
|
}
|
|
6349
|
+
function cancelCommand$1() {
|
|
6350
|
+
return {
|
|
6351
|
+
verb: "cancel",
|
|
6352
|
+
summary: "Cancel an installation or upgrade task and release its App mutation",
|
|
6353
|
+
positionals: [{ name: "task_id", description: "Installation Task ID", required: true }],
|
|
6354
|
+
options: [{
|
|
6355
|
+
name: "force",
|
|
6356
|
+
description: "Defer staging cleanup after cancellation",
|
|
6357
|
+
type: "boolean"
|
|
6358
|
+
}],
|
|
6359
|
+
inputSchema: {
|
|
6360
|
+
type: "object",
|
|
6361
|
+
properties: { task_id: { type: "string", minLength: 1 }, force: { type: "boolean" } },
|
|
6362
|
+
required: ["task_id"],
|
|
6363
|
+
additionalProperties: false
|
|
6364
|
+
},
|
|
6365
|
+
outputSchema: OBJECT_OUTPUT$4,
|
|
6366
|
+
resultSchemaVersion: 1,
|
|
6367
|
+
access: { mode: "fixed", level: "write" },
|
|
6368
|
+
asyncMode: "sync",
|
|
6369
|
+
requiresSession: true,
|
|
6370
|
+
examples: ["buckyos app cancel t-0123456789abcdef0123456789abcdef --force"],
|
|
6371
|
+
handler: async (ctx, input) => await callControl(ctx, "apps.install.cancel", {
|
|
6372
|
+
task_id: expectString$1(input, "task_id"),
|
|
6373
|
+
force: input.force === true
|
|
6374
|
+
})
|
|
6375
|
+
};
|
|
6376
|
+
}
|
|
6348
6377
|
function fetchCommand(dependencies) {
|
|
6349
6378
|
return {
|
|
6350
6379
|
verb: "fetch",
|