@oneie/sdk 0.14.6 → 0.14.8
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/gateway.d.ts.map +1 -1
- package/dist/gateway.js +3 -1
- package/dist/gateway.js.map +1 -1
- package/dist/generated/schemas.d.ts +6 -0
- package/dist/generated/schemas.d.ts.map +1 -1
- package/dist/generated/schemas.js +6 -0
- package/dist/generated/schemas.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/receivers.d.ts +63 -5
- package/dist/receivers.d.ts.map +1 -1
- package/dist/receivers.js +55 -10
- package/dist/receivers.js.map +1 -1
- package/dist/schemas.d.ts +0 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +0 -1
- package/dist/schemas.js.map +1 -1
- package/dist/telemetry.d.ts +2 -1
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +27 -4
- package/dist/telemetry.js.map +1 -1
- package/dist/work-contract-grammar.json +1 -0
- package/package.json +2 -2
package/dist/receivers.js
CHANGED
|
@@ -518,7 +518,7 @@ export const RECEIVERS = {
|
|
|
518
518
|
}),
|
|
519
519
|
"world:in": receiver({
|
|
520
520
|
receiver: "world:in",
|
|
521
|
-
summary: "The one front door: a message enters the world inbox, a guard quarantines toxic content, the router classifies the destination (private/fanout/public), and delivers into each destined workspace.
|
|
521
|
+
summary: "The one front door: a message enters the world inbox, a guard quarantines toxic content, the router classifies the destination (private/fanout/public), and delivers into each destined workspace. Delivery is opt-in (a workspace receives only tags it subscribed) with one exception: a caller may always direct to a workspace it owns. A directed message that can't be delivered fails closed (ok:false) — it never falls back to the public feed.",
|
|
522
522
|
request: z.object({
|
|
523
523
|
content: z.string().min(1),
|
|
524
524
|
tags: z.array(z.string()).optional(),
|
|
@@ -668,28 +668,39 @@ export const RECEIVERS = {
|
|
|
668
668
|
}),
|
|
669
669
|
"world:announce": receiver({
|
|
670
670
|
receiver: "world:announce",
|
|
671
|
-
summary: "Broadcast a tagged signal; the world fans it to every subscriber whose follow-tags intersect",
|
|
671
|
+
summary: "Broadcast a tagged signal; the world fans it to every subscriber whose follow-tags intersect. reply:true also invokes up to 5 of the matched actors and returns their answers inline (repliesTruncated:true if more matched)",
|
|
672
672
|
request: z.object({
|
|
673
673
|
tags: z.array(z.string()),
|
|
674
674
|
content: z.string().optional(),
|
|
675
|
+
limit: z.number().optional(),
|
|
676
|
+
reply: z.boolean().optional(),
|
|
675
677
|
board: z.literal("marketplace").optional(),
|
|
676
678
|
slug: z.string().optional(),
|
|
677
679
|
workspace: z.string().optional(),
|
|
680
|
+
}).catchall(z.unknown()), // extra keys = the message payload — carried through to every fanned-out actor, never stripped
|
|
681
|
+
response: z.object({
|
|
682
|
+
ok: z.boolean(),
|
|
683
|
+
matched: z.number().optional(),
|
|
684
|
+
actors: z.array(z.string()).optional(),
|
|
685
|
+
replies: z.array(z.object({
|
|
686
|
+
actorId: z.string(), ok: z.boolean(), text: z.string().optional(), error: z.string().optional(),
|
|
687
|
+
})).optional(),
|
|
688
|
+
repliesTruncated: z.boolean().optional(),
|
|
678
689
|
}),
|
|
679
|
-
response: z.object({ ok: z.boolean(), matched: z.number().optional(), actors: z.array(z.string()).optional() }),
|
|
680
690
|
effect: "ask",
|
|
681
691
|
}),
|
|
682
692
|
"world": receiver({
|
|
683
693
|
receiver: "world",
|
|
684
|
-
summary: "THE door — say it once, the world decides. Routes a tagged signal via the ladder (learned path → staked subscribers → CEO); fan:'all' broadcasts to every matching subscriber instead. Address form world:<tag-expr> carries tags in the receiver",
|
|
694
|
+
summary: "THE door — say it once, the world decides. Routes a tagged signal via the ladder (learned path → staked subscribers → CEO); fan:'all' broadcasts to every matching subscriber instead. Address form world:<tag-expr> carries tags in the receiver. reply:true also invokes the resolved actor and returns its answer inline (single-actor routes only, not fan:'all')",
|
|
685
695
|
request: z.object({
|
|
686
696
|
tags: z.array(z.string()).optional(),
|
|
687
697
|
fan: z.enum(["one", "all"]).optional(),
|
|
688
698
|
deliver: z.boolean().optional(),
|
|
699
|
+
reply: z.boolean().optional(),
|
|
689
700
|
board: z.literal("marketplace").optional(),
|
|
690
701
|
slug: z.string().optional(),
|
|
691
702
|
workspace: z.string().optional(),
|
|
692
|
-
}),
|
|
703
|
+
}).catchall(z.unknown()), // extra keys = the message payload (e.g. content) — carried through to the resolved actor, never stripped
|
|
693
704
|
response: z.object({
|
|
694
705
|
ok: z.boolean(),
|
|
695
706
|
routed: z.enum(["learned", "staked", "explore", "ceo"]).optional(),
|
|
@@ -697,6 +708,7 @@ export const RECEIVERS = {
|
|
|
697
708
|
matched: z.number().optional(),
|
|
698
709
|
actors: z.array(z.string()).optional(),
|
|
699
710
|
tags: z.array(z.string()).optional(),
|
|
711
|
+
reply: z.object({ ok: z.boolean(), text: z.string().optional(), error: z.string().optional() }).optional(),
|
|
700
712
|
}),
|
|
701
713
|
effect: "ask",
|
|
702
714
|
}),
|
|
@@ -722,19 +734,21 @@ export const RECEIVERS = {
|
|
|
722
734
|
}),
|
|
723
735
|
"world:route": receiver({
|
|
724
736
|
receiver: "world:route",
|
|
725
|
-
summary: "Route a tagged signal to THE handler via the ladder: learned tag-node path (follow_route) → staked subscribers (reputation-ranked) → CEO standing workflow; marks the delivery path so the next route is smarter",
|
|
737
|
+
summary: "Route a tagged signal to THE handler via the ladder: learned tag-node path (follow_route) → staked subscribers (reputation-ranked) → CEO standing workflow; marks the delivery path so the next route is smarter. reply:true also invokes the resolved actor and returns its answer inline",
|
|
726
738
|
request: z.object({
|
|
727
739
|
tags: z.array(z.string()),
|
|
728
740
|
deliver: z.boolean().optional(),
|
|
741
|
+
reply: z.boolean().optional(),
|
|
729
742
|
board: z.literal("marketplace").optional(),
|
|
730
743
|
slug: z.string().optional(),
|
|
731
744
|
workspace: z.string().optional(),
|
|
732
|
-
}),
|
|
745
|
+
}).catchall(z.unknown()), // extra keys = the message payload (e.g. content) — carried through to the resolved actor, never stripped
|
|
733
746
|
response: z.object({
|
|
734
747
|
ok: z.boolean(),
|
|
735
748
|
routed: z.enum(["learned", "staked", "explore", "ceo"]).optional(),
|
|
736
749
|
actor: z.string().optional(),
|
|
737
750
|
tags: z.array(z.string()).optional(),
|
|
751
|
+
reply: z.object({ ok: z.boolean(), text: z.string().optional(), error: z.string().optional() }).optional(),
|
|
738
752
|
}),
|
|
739
753
|
effect: "ask",
|
|
740
754
|
}),
|
|
@@ -766,6 +780,22 @@ export const RECEIVERS = {
|
|
|
766
780
|
}),
|
|
767
781
|
effect: "ask", idempotent: true,
|
|
768
782
|
}),
|
|
783
|
+
"tasks:create": receiver({
|
|
784
|
+
receiver: "tasks:create",
|
|
785
|
+
summary: "Write one open task to the substrate and announce it by its tags in the same act — the quick-add entry point",
|
|
786
|
+
request: z.object({
|
|
787
|
+
title: z.string(),
|
|
788
|
+
tags: z.array(z.string()).optional(),
|
|
789
|
+
assignee: z.string().optional(),
|
|
790
|
+
// The viewed /u/<slug> workspace to file the task under. Honored only when the
|
|
791
|
+
// caller is authorized for it (attested staff or owner-tree control); otherwise
|
|
792
|
+
// the resolver falls back to the caller's own slug. Reconciles the create tag
|
|
793
|
+
// with the /api/things read filter so a created task survives reload.
|
|
794
|
+
workspace: z.string().optional(),
|
|
795
|
+
}),
|
|
796
|
+
response: z.object({ ok: z.boolean(), tid: z.string().optional(), tags: z.array(z.string()).optional() }),
|
|
797
|
+
effect: "ask", idempotent: false,
|
|
798
|
+
}),
|
|
769
799
|
// ── agents (TRADE / lifecycle) ──
|
|
770
800
|
"agents:register": receiver({
|
|
771
801
|
receiver: "agents:register",
|
|
@@ -1893,7 +1923,14 @@ export const RECEIVERS = {
|
|
|
1893
1923
|
response: z.object({ ok: z.boolean(), threadId: z.string().optional(), error: z.string().optional() }),
|
|
1894
1924
|
effect: "ask", cost: "free", reversible: false, idempotent: false, auth: "member",
|
|
1895
1925
|
}),
|
|
1896
|
-
|
|
1926
|
+
"pages:view": receiver({
|
|
1927
|
+
receiver: "pages:view",
|
|
1928
|
+
summary: "Read one published page's Puck render data by workspace + page slug (public) — the read an external site's page-editor plugin renders through; drafts are invisible (see pages:get for the member-scoped editor read)",
|
|
1929
|
+
request: z.object({ slug: z.string(), page: z.string() }),
|
|
1930
|
+
response: z.object({ ok: z.boolean(), slug: z.string().optional(), title: z.string().optional(), data: z.unknown().optional(), url: z.string().optional(), error: z.string().optional() }),
|
|
1931
|
+
effect: "ask", cost: "free", reversible: true, idempotent: true, auth: "public",
|
|
1932
|
+
}),
|
|
1933
|
+
// ──billing — handlers in resolvers/market.ts ──────────────────────────────────
|
|
1897
1934
|
"billing:plan": receiver({
|
|
1898
1935
|
receiver: "billing:plan",
|
|
1899
1936
|
summary: "Change a workspace's plan — returns a checkout URL to complete the upgrade",
|
|
@@ -2294,13 +2331,21 @@ export const RECEIVERS = {
|
|
|
2294
2331
|
"skills:list": receiver({
|
|
2295
2332
|
receiver: "skills:list",
|
|
2296
2333
|
summary: "List the caller's workspace skill catalog (R2) — powers the canvas SkillPicker",
|
|
2297
|
-
request: z.object({}),
|
|
2334
|
+
request: z.object({ name: z.string().optional() }),
|
|
2298
2335
|
response: z.object({
|
|
2299
|
-
skills: z.array(z.object({ name: z.string(), size: z.number(), sealed: z.boolean().optional() })),
|
|
2336
|
+
skills: z.array(z.object({ name: z.string(), size: z.number(), sealed: z.boolean().optional(), description: z.string().optional(), inputs: z.array(z.object({ name: z.string(), label: z.string(), required: z.boolean().optional() })).optional() })),
|
|
2300
2337
|
}),
|
|
2301
2338
|
effect: "ask", cost: "free", idempotent: true, simulatable: false, auth: "view_workflows",
|
|
2302
2339
|
examples: [{}],
|
|
2303
2340
|
}),
|
|
2341
|
+
"skill:save": receiver({
|
|
2342
|
+
receiver: "skill:save",
|
|
2343
|
+
summary: "Write a skill body into a workspace's R2 catalog — the store skill:run/skills:list read; explicit-slug, ownership-walk authorized (mirrors world:publish-agent)",
|
|
2344
|
+
request: z.object({ slug: z.string(), name: z.string(), content: z.string() }),
|
|
2345
|
+
response: z.object({ ok: z.boolean(), name: z.string(), bytes: z.number() }),
|
|
2346
|
+
effect: "ask", auth: "update_group", idempotent: true,
|
|
2347
|
+
examples: [{ slug: "elitemoversca", name: "quote-estimate", content: "---\nname: quote-estimate\n---\n…" }],
|
|
2348
|
+
}),
|
|
2304
2349
|
"skill:run": receiver({
|
|
2305
2350
|
receiver: "skill:run",
|
|
2306
2351
|
summary: "Run a workspace skill — loads its body from R2, runs one bounded turn via channels, returns { text }",
|