@oxygen-agent/cli 1.936.1 → 1.982.3
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 +1 -1
- package/dist/admin-primary-providers-render.js +9 -1
- package/dist/cli-values.d.ts +14 -0
- package/dist/cli-values.js +26 -0
- package/dist/command-manifest.js +30 -2
- package/dist/functions-commands.js +13 -5
- package/dist/help.js +2 -0
- package/dist/index.js +1509 -290
- package/dist/knowledge-repository-commands.d.ts +6 -0
- package/dist/knowledge-repository-commands.js +198 -0
- package/dist/skills.js +20 -0
- package/dist/ugc-commands.js +470 -15
- package/node_modules/@oxygen/recipe-sdk/dist/index.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/byok-connect.d.ts +11 -6
- package/node_modules/@oxygen/shared/dist/byok-connect.js +14 -6
- package/node_modules/@oxygen/shared/dist/capability-discovery.d.ts +8 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery.js +152 -20
- package/node_modules/@oxygen/shared/dist/copilot-errors.js +3 -0
- package/node_modules/@oxygen/shared/dist/copilot-journeys.d.ts +19 -1
- package/node_modules/@oxygen/shared/dist/copilot-journeys.generated.d.ts +19 -0
- package/node_modules/@oxygen/shared/dist/copilot-journeys.generated.js +26 -0
- package/node_modules/@oxygen/shared/dist/copilot-journeys.js +8 -41
- package/node_modules/@oxygen/shared/dist/email-dsn.d.ts +60 -0
- package/node_modules/@oxygen/shared/dist/email-dsn.js +120 -0
- package/node_modules/@oxygen/shared/dist/email-warmup-readiness.d.ts +64 -0
- package/node_modules/@oxygen/shared/dist/email-warmup-readiness.js +90 -0
- package/node_modules/@oxygen/shared/dist/inbox-avatar-url.d.ts +28 -0
- package/node_modules/@oxygen/shared/dist/inbox-avatar-url.js +57 -0
- package/node_modules/@oxygen/shared/dist/index.d.ts +10 -0
- package/node_modules/@oxygen/shared/dist/index.js +10 -0
- package/node_modules/@oxygen/shared/dist/knowledge-bases.d.ts +74 -0
- package/node_modules/@oxygen/shared/dist/knowledge-bases.js +456 -0
- package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.d.ts +56 -48
- package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.js +50 -49
- package/node_modules/@oxygen/shared/dist/knowledge-repository.d.ts +22 -0
- package/node_modules/@oxygen/shared/dist/knowledge-repository.js +121 -0
- package/node_modules/@oxygen/shared/dist/knowledge-vault-markdown.d.ts +20 -0
- package/node_modules/@oxygen/shared/dist/knowledge-vault-markdown.js +155 -0
- package/node_modules/@oxygen/shared/dist/langfuse.d.ts +8 -3
- package/node_modules/@oxygen/shared/dist/langfuse.js +177 -130
- package/node_modules/@oxygen/shared/dist/llm-payload.d.ts +10 -0
- package/node_modules/@oxygen/shared/dist/llm-payload.js +54 -0
- package/node_modules/@oxygen/shared/dist/llm-usage.d.ts +11 -0
- package/node_modules/@oxygen/shared/dist/llm-usage.js +30 -0
- package/node_modules/@oxygen/shared/dist/mailbox-import.d.ts +10 -0
- package/node_modules/@oxygen/shared/dist/mailbox-import.js +53 -0
- package/node_modules/@oxygen/shared/dist/plan-limits.d.ts +8 -0
- package/node_modules/@oxygen/shared/dist/plan-limits.js +8 -0
- package/node_modules/@oxygen/shared/dist/pricing-sheet.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/pricing-sheet.js +1 -1
- package/node_modules/@oxygen/shared/dist/product-analytics-core.d.ts +98 -0
- package/node_modules/@oxygen/shared/dist/product-analytics-core.js +159 -0
- package/node_modules/@oxygen/shared/dist/product-analytics-environment.d.ts +18 -0
- package/node_modules/@oxygen/shared/dist/product-analytics-environment.js +46 -0
- package/node_modules/@oxygen/shared/dist/product-analytics-events.d.ts +116 -0
- package/node_modules/@oxygen/shared/dist/product-analytics-events.js +120 -0
- package/node_modules/@oxygen/shared/dist/recipes.d.ts +6 -0
- package/node_modules/@oxygen/shared/dist/recipes.js +23 -0
- package/node_modules/@oxygen/shared/dist/sequences.d.ts +126 -2
- package/node_modules/@oxygen/shared/dist/sequences.js +280 -4
- package/node_modules/@oxygen/shared/dist/ugc-amplification-identity.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/ugc-amplification-identity.js +24 -0
- package/node_modules/@oxygen/shared/dist/ugc.d.ts +29 -1
- package/node_modules/@oxygen/shared/dist/user-capability-routing.js +8 -1
- package/node_modules/@oxygen/shared/dist/version.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/version.js +3 -1
- package/node_modules/@oxygen/shared/dist/workspace-file-storage.d.ts +6 -2
- package/node_modules/@oxygen/shared/dist/workspace-file-storage.js +15 -4
- package/node_modules/@oxygen/shared/package.json +15 -0
- package/node_modules/@oxygen/workflows/dist/graph/lint.js +22 -0
- package/package.json +2 -1
package/dist/ugc-commands.js
CHANGED
|
@@ -27,21 +27,39 @@ function parseField(value, field) {
|
|
|
27
27
|
export function registerUgcCommands(program, handle) {
|
|
28
28
|
const ugc = program
|
|
29
29
|
.command("ugc")
|
|
30
|
-
.description("Manage UGC programs and independent creator participations: briefs, voice, posts, approvals, sponsorship and bounded amplification. Requires UGC availability.");
|
|
30
|
+
.description("Manage UGC programs and independent creator participations: briefs, voice, posts, approvals, sponsorship and bounded amplification. Requires UGC availability. Start with memberships list in a creator workspace. See the oxygen-ugc skill; JSON reads return web_url for inspection.");
|
|
31
|
+
const groupDescriptions = {
|
|
32
|
+
programs: "Programs you operate or joined. Lifecycle: create, update, duplicate (settings + briefs), archive (stops future work, keeps shared history, reversible with restore) and delete (permanent; only while no creator has ever joined).",
|
|
33
|
+
creators: "Creator participations: invite, revoke an invite, accept in the creator workspace, connect a sender, change approval authority, or revoke.",
|
|
34
|
+
memberships: "Active programs this creator workspace has joined. Read these before choosing a program for a personal post.",
|
|
35
|
+
briefs: "Program briefs with ordered questions for creators.",
|
|
36
|
+
posts: "Enrolled program posts: enroll existing posts, draft from briefs, edit, schedule, and record creator or brand approval.",
|
|
37
|
+
analytics: "Stored daily program and creator performance.",
|
|
38
|
+
knowledge: "Master Knowledge pages shared live with a program.",
|
|
39
|
+
voice: "Creator voice profiles and imports.",
|
|
40
|
+
sponsorship: "Seat and credit sponsorship per participation.",
|
|
41
|
+
amplification: "Bounded, approval-gated amplification of enrolled posts.",
|
|
42
|
+
"peer-amplification": "Creator-owned consent, sender, voice, caps and immutable receipts for engaging with peer posts in one program.",
|
|
43
|
+
calendar: "Bounded enrolled-post calendar reads.",
|
|
44
|
+
};
|
|
31
45
|
const groups = new Map();
|
|
32
46
|
const group = (name) => {
|
|
33
47
|
let command = groups.get(name);
|
|
34
48
|
if (!command) {
|
|
35
49
|
command = ugc.command(name);
|
|
50
|
+
const description = groupDescriptions[name];
|
|
51
|
+
if (description)
|
|
52
|
+
command.description(description);
|
|
36
53
|
groups.set(name, command);
|
|
37
54
|
}
|
|
38
55
|
return command;
|
|
39
56
|
};
|
|
40
57
|
group("programs")
|
|
41
58
|
.command("list")
|
|
42
|
-
.description("Read UGC programs in the active workspace. Read-only.")
|
|
59
|
+
.description("Read UGC programs in the active workspace, archived ones included unless --status filters. Read-only.")
|
|
43
60
|
.option("--program-id <id>", "Program ID.")
|
|
44
61
|
.option("--participation-id <id>", "Creator participation ID.")
|
|
62
|
+
.option("--status <active|archived>", "Only programs in this status.")
|
|
45
63
|
.option("--json", "Print a JSON envelope.")
|
|
46
64
|
.action((options) => handle("ugc programs list", options, () => {
|
|
47
65
|
const query = new URLSearchParams({ view: "programs" });
|
|
@@ -49,6 +67,8 @@ export function registerUgcCommands(program, handle) {
|
|
|
49
67
|
query.set("program_id", String(options.programId));
|
|
50
68
|
if (options.participationId)
|
|
51
69
|
query.set("participation_id", String(options.participationId));
|
|
70
|
+
if (options.status)
|
|
71
|
+
query.set("status", String(options.status));
|
|
52
72
|
return requestOxygen(`/api/cli/ugc?${query}`);
|
|
53
73
|
}));
|
|
54
74
|
group("programs")
|
|
@@ -67,7 +87,7 @@ export function registerUgcCommands(program, handle) {
|
|
|
67
87
|
}));
|
|
68
88
|
group("creators")
|
|
69
89
|
.command("list")
|
|
70
|
-
.description("Read
|
|
90
|
+
.description("Read creators and invitations, including persisted email delivery status. Read-only.")
|
|
71
91
|
.option("--program-id <id>", "Program ID.")
|
|
72
92
|
.option("--participation-id <id>", "Creator participation ID.")
|
|
73
93
|
.option("--json", "Print a JSON envelope.")
|
|
@@ -79,6 +99,11 @@ export function registerUgcCommands(program, handle) {
|
|
|
79
99
|
query.set("participation_id", String(options.participationId));
|
|
80
100
|
return requestOxygen(`/api/cli/ugc?${query}`);
|
|
81
101
|
}));
|
|
102
|
+
group("memberships")
|
|
103
|
+
.command("list")
|
|
104
|
+
.description("Read active program memberships for the creator workspace. Free, stored and provider-free.")
|
|
105
|
+
.option("--json", "Print a JSON envelope.")
|
|
106
|
+
.action((options) => handle("ugc memberships list", options, () => requestOxygen("/api/cli/ugc?view=memberships")));
|
|
82
107
|
group("briefs")
|
|
83
108
|
.command("list")
|
|
84
109
|
.description("Read one program's UGC briefs. Read-only; requires --program-id.")
|
|
@@ -99,6 +124,8 @@ export function registerUgcCommands(program, handle) {
|
|
|
99
124
|
.description("Read UGC posts in the active workspace. Read-only.")
|
|
100
125
|
.requiredOption("--program-id <id>", "Program ID.")
|
|
101
126
|
.option("--participation-id <id>", "Creator participation ID.")
|
|
127
|
+
.option("--post-id <id>", "Read one canonical post ID.")
|
|
128
|
+
.option("--enrollment-version <n>", "Read one exact enrollment version after a post was removed and re-added.")
|
|
102
129
|
.option("--cursor <cursor>", "Opaque next_cursor from the previous page.")
|
|
103
130
|
.option("--limit <count>", "Posts per page, 1–500.")
|
|
104
131
|
.option("--json", "Print a JSON envelope.")
|
|
@@ -108,6 +135,10 @@ export function registerUgcCommands(program, handle) {
|
|
|
108
135
|
query.set("program_id", String(options.programId));
|
|
109
136
|
if (options.participationId)
|
|
110
137
|
query.set("participation_id", String(options.participationId));
|
|
138
|
+
if (options.postId)
|
|
139
|
+
query.set("post_id", String(options.postId));
|
|
140
|
+
if (options.enrollmentVersion)
|
|
141
|
+
query.set("enrollment_version", String(options.enrollmentVersion));
|
|
111
142
|
if (options.cursor)
|
|
112
143
|
query.set("cursor", String(options.cursor));
|
|
113
144
|
if (options.limit)
|
|
@@ -119,6 +150,8 @@ export function registerUgcCommands(program, handle) {
|
|
|
119
150
|
.description("Read UGC analytics in the active workspace. Read-only.")
|
|
120
151
|
.requiredOption("--program-id <id>", "Program ID.")
|
|
121
152
|
.option("--participation-id <id>", "Creator participation ID.")
|
|
153
|
+
.option("--post-cursor <cursor>", "Next post_performance page from next_post_cursor; totals still cover all enrolled posts.")
|
|
154
|
+
.option("--limit <count>", "Post performance rows per page, up to 100.")
|
|
122
155
|
.option("--json", "Print a JSON envelope.")
|
|
123
156
|
.action((options) => handle("ugc analytics get", options, () => {
|
|
124
157
|
const query = new URLSearchParams({ view: "analytics" });
|
|
@@ -126,6 +159,10 @@ export function registerUgcCommands(program, handle) {
|
|
|
126
159
|
query.set("program_id", String(options.programId));
|
|
127
160
|
if (options.participationId)
|
|
128
161
|
query.set("participation_id", String(options.participationId));
|
|
162
|
+
if (options.postCursor)
|
|
163
|
+
query.set("post_cursor", String(options.postCursor));
|
|
164
|
+
if (options.limit)
|
|
165
|
+
query.set("limit", String(options.limit));
|
|
129
166
|
return requestOxygen(`/api/cli/ugc?${query}`);
|
|
130
167
|
}));
|
|
131
168
|
group("knowledge")
|
|
@@ -156,9 +193,23 @@ export function registerUgcCommands(program, handle) {
|
|
|
156
193
|
query.set("participation_id", String(options.participationId));
|
|
157
194
|
return requestOxygen(`/api/cli/ugc?${query}`);
|
|
158
195
|
}));
|
|
196
|
+
group("posts")
|
|
197
|
+
.command("draft-status")
|
|
198
|
+
.description("Read the original paid draft request and saved result without generating again. Creator workspace only, 0 credits.")
|
|
199
|
+
.requiredOption("--participation-id <id>", "Creator participation ID.")
|
|
200
|
+
.requiredOption("--request-id <id>", "Original draft request ID.")
|
|
201
|
+
.option("--json", "Print a JSON envelope.")
|
|
202
|
+
.action((options) => handle("ugc posts draft-status", options, () => {
|
|
203
|
+
const query = new URLSearchParams({
|
|
204
|
+
view: "draft_run",
|
|
205
|
+
participation_id: String(options.participationId),
|
|
206
|
+
request_id: String(options.requestId),
|
|
207
|
+
});
|
|
208
|
+
return requestOxygen(`/api/cli/ugc?${query}`);
|
|
209
|
+
}));
|
|
159
210
|
group("sponsorship")
|
|
160
211
|
.command("get")
|
|
161
|
-
.description("Read
|
|
212
|
+
.description("Read sponsorship in the active workspace. Creators see their remaining credits and exact organizer access; masters see program payment status. Read-only.")
|
|
162
213
|
.requiredOption("--program-id <id>", "Program ID.")
|
|
163
214
|
.option("--participation-id <id>", "Creator participation ID.")
|
|
164
215
|
.option("--json", "Print a JSON envelope.")
|
|
@@ -170,6 +221,82 @@ export function registerUgcCommands(program, handle) {
|
|
|
170
221
|
query.set("participation_id", String(options.participationId));
|
|
171
222
|
return requestOxygen(`/api/cli/ugc?${query}`);
|
|
172
223
|
}));
|
|
224
|
+
for (const spec of [
|
|
225
|
+
{
|
|
226
|
+
group: "calendar",
|
|
227
|
+
command: "list",
|
|
228
|
+
view: "calendar",
|
|
229
|
+
description: "Read the program's enrolled post calendar in a bounded UTC date range (up to 42 days). Stored data only, 0 credits.",
|
|
230
|
+
fields: [
|
|
231
|
+
["date_from", "Start ISO instant, inclusive.", true],
|
|
232
|
+
["date_to", "End ISO instant, exclusive.", true],
|
|
233
|
+
[
|
|
234
|
+
"calendar_cursor",
|
|
235
|
+
"Calendar next_cursor from the previous page.",
|
|
236
|
+
false,
|
|
237
|
+
],
|
|
238
|
+
["participation_id", "Filter to one creator participation.", false],
|
|
239
|
+
],
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
group: "posts",
|
|
243
|
+
command: "history",
|
|
244
|
+
view: "post_history",
|
|
245
|
+
description: "Read retained public comments, metrics, and publication receipts for one enrolled post. Stored data only, 0 credits.",
|
|
246
|
+
fields: [
|
|
247
|
+
["post_id", "Enrolled source post UUID.", true],
|
|
248
|
+
[
|
|
249
|
+
"enrollment_version",
|
|
250
|
+
"Exact enrollment_version returned by posts list; required to distinguish remove/re-enroll history.",
|
|
251
|
+
true,
|
|
252
|
+
],
|
|
253
|
+
["participation_id", "Exact creator participation ID.", false],
|
|
254
|
+
["cursor", "next_comments_cursor from the previous page.", false],
|
|
255
|
+
["metric_cursor", "next_metrics_cursor from the previous page.", false],
|
|
256
|
+
["action_cursor", "next_actions_cursor from the previous page.", false],
|
|
257
|
+
],
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
group: "amplification",
|
|
261
|
+
command: "get",
|
|
262
|
+
view: "amplification",
|
|
263
|
+
description: "Read this program's current amplification authority and immutable action history. Master workspace only; 0 credits, no provider call.",
|
|
264
|
+
fields: [["cursor", "next_cursor from the previous action page.", false]],
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
group: "peer-amplification",
|
|
268
|
+
command: "get",
|
|
269
|
+
view: "peer_amplification",
|
|
270
|
+
description: "Read this creator's own peer-engagement policy, host gate, readiness and immutable receipts. Creator workspace only; free and provider-free.",
|
|
271
|
+
fields: [
|
|
272
|
+
["participation_id", "Exact creator participation ID.", true],
|
|
273
|
+
["cursor", "next_cursor from the previous action page.", false],
|
|
274
|
+
],
|
|
275
|
+
programRequired: false,
|
|
276
|
+
},
|
|
277
|
+
]) {
|
|
278
|
+
const command = group(spec.group)
|
|
279
|
+
.command(spec.command)
|
|
280
|
+
.description(spec.description)
|
|
281
|
+
.option("--limit <count>", "Rows per page, up to 100.")
|
|
282
|
+
.option("--json", "Print a JSON envelope.");
|
|
283
|
+
command["programRequired" in spec && spec.programRequired === false ? "option" : "requiredOption"]("--program-id <id>", "Program ID.");
|
|
284
|
+
for (const [name, description, required] of spec.fields)
|
|
285
|
+
command[required ? "requiredOption" : "option"](`--${name.replaceAll("_", "-")} <value>`, description);
|
|
286
|
+
command.action((options) => handle(`ugc ${spec.group} ${spec.command}`, options, () => {
|
|
287
|
+
const query = new URLSearchParams({ view: spec.view });
|
|
288
|
+
if (options.programId)
|
|
289
|
+
query.set("program_id", String(options.programId));
|
|
290
|
+
for (const [name] of spec.fields) {
|
|
291
|
+
const key = name.replace(/_([a-z])/g, (_match, letter) => letter.toUpperCase());
|
|
292
|
+
if (options[key] !== undefined)
|
|
293
|
+
query.set(name, String(options[key]));
|
|
294
|
+
}
|
|
295
|
+
if (options.limit)
|
|
296
|
+
query.set("limit", String(options.limit));
|
|
297
|
+
return requestOxygen(`/api/cli/ugc?${query}`);
|
|
298
|
+
}));
|
|
299
|
+
}
|
|
173
300
|
const writes = [
|
|
174
301
|
{
|
|
175
302
|
action: "program_create",
|
|
@@ -249,10 +376,88 @@ export function registerUgcCommands(program, handle) {
|
|
|
249
376
|
description: "Require a separate brand approval before publishing.",
|
|
250
377
|
required: false,
|
|
251
378
|
},
|
|
379
|
+
{
|
|
380
|
+
name: "peer_engagement_enabled",
|
|
381
|
+
kind: "boolean",
|
|
382
|
+
description: "Host permission for creators in this program to opt into peer engagement; enabling requires a signed-in master admin.",
|
|
383
|
+
required: false,
|
|
384
|
+
},
|
|
252
385
|
{
|
|
253
386
|
name: "status",
|
|
254
387
|
kind: "string",
|
|
255
|
-
description: "
|
|
388
|
+
description: "active or archived; prefer `programs archive` / `programs restore`.",
|
|
389
|
+
required: false,
|
|
390
|
+
},
|
|
391
|
+
],
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
action: "program_update",
|
|
395
|
+
command: "programs archive",
|
|
396
|
+
description: "Archive a program: stop future access, publishing, tracking and amplification, revoke pending invitations and request cancellation of sponsorship renewals. Shared history is retained; `programs restore` re-activates it.",
|
|
397
|
+
fixed: { status: "archived" },
|
|
398
|
+
fields: [
|
|
399
|
+
{
|
|
400
|
+
name: "program_id",
|
|
401
|
+
kind: "string",
|
|
402
|
+
description: "Program ID.",
|
|
403
|
+
required: true,
|
|
404
|
+
},
|
|
405
|
+
],
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
action: "program_update",
|
|
409
|
+
command: "programs restore",
|
|
410
|
+
description: "Restore an archived program. Creators removed earlier stay removed, revoked invitations stay revoked, and cancelled sponsorships need a new preview and confirmation.",
|
|
411
|
+
fixed: { status: "active" },
|
|
412
|
+
fields: [
|
|
413
|
+
{
|
|
414
|
+
name: "program_id",
|
|
415
|
+
kind: "string",
|
|
416
|
+
description: "Program ID.",
|
|
417
|
+
required: true,
|
|
418
|
+
},
|
|
419
|
+
],
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
action: "program_duplicate",
|
|
423
|
+
command: "programs duplicate",
|
|
424
|
+
description: "Copy a program's settings, shared knowledge and brand review into a new active program, with its briefs by default. Free: 0 credits. Never copies creators, invitations, posts or sponsorship.",
|
|
425
|
+
fields: [
|
|
426
|
+
{
|
|
427
|
+
name: "program_id",
|
|
428
|
+
kind: "string",
|
|
429
|
+
description: "Source program ID.",
|
|
430
|
+
required: true,
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
name: "name",
|
|
434
|
+
kind: "string",
|
|
435
|
+
description: 'Name of the copy; defaults to "<name> (copy)".',
|
|
436
|
+
required: false,
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
name: "include_briefs",
|
|
440
|
+
kind: "boolean",
|
|
441
|
+
description: "Copy the program's briefs (default true).",
|
|
442
|
+
required: false,
|
|
443
|
+
},
|
|
444
|
+
],
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
action: "program_delete",
|
|
448
|
+
command: "programs delete",
|
|
449
|
+
description: "Permanently delete a program with its briefs and pending invitations. A bare call previews the counts and whether it is deletable; pass --approved to delete. Allowed only while no creator has ever joined; otherwise use `programs archive`.",
|
|
450
|
+
fields: [
|
|
451
|
+
{
|
|
452
|
+
name: "program_id",
|
|
453
|
+
kind: "string",
|
|
454
|
+
description: "Program ID.",
|
|
455
|
+
required: true,
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
name: "approved",
|
|
459
|
+
kind: "boolean",
|
|
460
|
+
description: "Confirm the previewed permanent deletion.",
|
|
256
461
|
required: false,
|
|
257
462
|
},
|
|
258
463
|
],
|
|
@@ -260,7 +465,7 @@ export function registerUgcCommands(program, handle) {
|
|
|
260
465
|
{
|
|
261
466
|
action: "invite_create",
|
|
262
467
|
command: "creators invite",
|
|
263
|
-
description: "
|
|
468
|
+
description: "Preview an invitation email (0 credits); send with --approved --preview-token from that preview. Use --link-only to create a link without email.",
|
|
264
469
|
fields: [
|
|
265
470
|
{
|
|
266
471
|
name: "program_id",
|
|
@@ -271,9 +476,52 @@ export function registerUgcCommands(program, handle) {
|
|
|
271
476
|
{
|
|
272
477
|
name: "email",
|
|
273
478
|
kind: "string",
|
|
274
|
-
description: "
|
|
479
|
+
description: "Exact creator email to receive the invitation.",
|
|
480
|
+
required: true,
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
name: "approved",
|
|
484
|
+
kind: "boolean",
|
|
485
|
+
description: "Authorize sending the exact previewed invitation email.",
|
|
486
|
+
required: false,
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
name: "preview_token",
|
|
490
|
+
kind: "string",
|
|
491
|
+
description: "Exact token from the invitation email preview.",
|
|
492
|
+
required: false,
|
|
493
|
+
},
|
|
494
|
+
],
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
action: "invite_send",
|
|
498
|
+
command: "creators send-invite",
|
|
499
|
+
description: "Preview email for an existing pending invitation; send or resend with --approved --preview-token. Replaces the old link, keeps its expiry. Sent means provider accepted, not inbox delivery.",
|
|
500
|
+
fields: [
|
|
501
|
+
{
|
|
502
|
+
name: "program_id",
|
|
503
|
+
kind: "string",
|
|
504
|
+
description: "Program ID.",
|
|
505
|
+
required: true,
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
name: "invitation_id",
|
|
509
|
+
kind: "string",
|
|
510
|
+
description: "Exact pending invitation ID from creators list.",
|
|
275
511
|
required: true,
|
|
276
512
|
},
|
|
513
|
+
{
|
|
514
|
+
name: "approved",
|
|
515
|
+
kind: "boolean",
|
|
516
|
+
description: "Authorize the exact previewed email send or resend.",
|
|
517
|
+
required: false,
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
name: "preview_token",
|
|
521
|
+
kind: "string",
|
|
522
|
+
description: "Exact token from this invitation email preview.",
|
|
523
|
+
required: false,
|
|
524
|
+
},
|
|
277
525
|
],
|
|
278
526
|
},
|
|
279
527
|
{
|
|
@@ -323,7 +571,7 @@ export function registerUgcCommands(program, handle) {
|
|
|
323
571
|
{
|
|
324
572
|
action: "participation_update",
|
|
325
573
|
command: "creators update",
|
|
326
|
-
description: "Connect an existing LinkedIn sender, change approval authority, or
|
|
574
|
+
description: "Connect an existing LinkedIn sender, change approval authority, or leave the entire program. Revocation stops future sharing and program actions; your posts stay in your workspace and the organizer retains previously shared history. This workspace cannot currently rejoin the same program. To remove one post while staying, use ugc posts remove.",
|
|
327
575
|
fields: [
|
|
328
576
|
{
|
|
329
577
|
name: "participation_id",
|
|
@@ -346,7 +594,7 @@ export function registerUgcCommands(program, handle) {
|
|
|
346
594
|
{
|
|
347
595
|
name: "status",
|
|
348
596
|
kind: "string",
|
|
349
|
-
description: "
|
|
597
|
+
description: "Use revoked to leave the entire program. This participation cannot be restored.",
|
|
350
598
|
required: false,
|
|
351
599
|
},
|
|
352
600
|
],
|
|
@@ -450,11 +698,48 @@ export function registerUgcCommands(program, handle) {
|
|
|
450
698
|
},
|
|
451
699
|
],
|
|
452
700
|
},
|
|
701
|
+
{
|
|
702
|
+
action: "post_remove",
|
|
703
|
+
command: "posts remove",
|
|
704
|
+
description: "Remove one creator-owned post from a program before publication while retaining immutable enrollment history. The personal draft remains in Publishing.",
|
|
705
|
+
fields: [
|
|
706
|
+
{
|
|
707
|
+
name: "program_id",
|
|
708
|
+
kind: "string",
|
|
709
|
+
description: "Program ID.",
|
|
710
|
+
required: true,
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
name: "post_id",
|
|
714
|
+
kind: "string",
|
|
715
|
+
description: "Canonical personal post ID.",
|
|
716
|
+
required: true,
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
name: "enrollment_id",
|
|
720
|
+
kind: "string",
|
|
721
|
+
description: "Exact active enrollment ID returned by posts list.",
|
|
722
|
+
required: true,
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
name: "source_revision",
|
|
726
|
+
kind: "string",
|
|
727
|
+
description: "Exact current content fingerprint returned by posts list.",
|
|
728
|
+
required: true,
|
|
729
|
+
},
|
|
730
|
+
],
|
|
731
|
+
},
|
|
453
732
|
{
|
|
454
733
|
action: "draft_create",
|
|
455
734
|
command: "posts draft",
|
|
456
|
-
description: "Preview AI drafting from brief answers
|
|
735
|
+
description: "Preview AI drafting from brief answers. Execute only in the creator workspace with approved and a credit ceiling; publishing delegation does not grant authority to spend creator credits.",
|
|
457
736
|
fields: [
|
|
737
|
+
{
|
|
738
|
+
name: "request_id",
|
|
739
|
+
kind: "string",
|
|
740
|
+
description: "Request ID from preview. Reuse it after a timeout; a new ID is a new paid draft.",
|
|
741
|
+
required: false,
|
|
742
|
+
},
|
|
458
743
|
{
|
|
459
744
|
name: "participation_id",
|
|
460
745
|
kind: "string",
|
|
@@ -504,6 +789,12 @@ export function registerUgcCommands(program, handle) {
|
|
|
504
789
|
description: "Canonical post ID.",
|
|
505
790
|
required: true,
|
|
506
791
|
},
|
|
792
|
+
{
|
|
793
|
+
name: "enrollment_version",
|
|
794
|
+
kind: "number",
|
|
795
|
+
description: "Exact enrollment version returned by posts list; always send it so a removed/re-enrolled post cannot reuse an old edit.",
|
|
796
|
+
required: true,
|
|
797
|
+
},
|
|
507
798
|
{
|
|
508
799
|
name: "title",
|
|
509
800
|
kind: "string",
|
|
@@ -541,6 +832,12 @@ export function registerUgcCommands(program, handle) {
|
|
|
541
832
|
description: "Canonical post ID.",
|
|
542
833
|
required: true,
|
|
543
834
|
},
|
|
835
|
+
{
|
|
836
|
+
name: "enrollment_version",
|
|
837
|
+
kind: "number",
|
|
838
|
+
description: "Exact enrollment version returned by posts list; always send it so approval binds the current enrollment.",
|
|
839
|
+
required: true,
|
|
840
|
+
},
|
|
544
841
|
{
|
|
545
842
|
name: "source_revision",
|
|
546
843
|
kind: "string",
|
|
@@ -572,6 +869,12 @@ export function registerUgcCommands(program, handle) {
|
|
|
572
869
|
description: "Canonical post ID.",
|
|
573
870
|
required: true,
|
|
574
871
|
},
|
|
872
|
+
{
|
|
873
|
+
name: "enrollment_version",
|
|
874
|
+
kind: "number",
|
|
875
|
+
description: "Exact enrollment version returned by posts list; always send it so brand approval binds the current enrollment.",
|
|
876
|
+
required: true,
|
|
877
|
+
},
|
|
575
878
|
{
|
|
576
879
|
name: "source_revision",
|
|
577
880
|
kind: "string",
|
|
@@ -589,7 +892,7 @@ export function registerUgcCommands(program, handle) {
|
|
|
589
892
|
{
|
|
590
893
|
action: "voice_import",
|
|
591
894
|
command: "voice import",
|
|
592
|
-
description: "Preview LinkedIn voice
|
|
895
|
+
description: "Preview all retrievable LinkedIn history and voice inference; approve a total credit ceiling to start. Use --import-id to resume a safely interrupted import with its saved progress and spend.",
|
|
593
896
|
fields: [
|
|
594
897
|
{
|
|
595
898
|
name: "participation_id",
|
|
@@ -597,6 +900,12 @@ export function registerUgcCommands(program, handle) {
|
|
|
597
900
|
description: "Creator participation ID.",
|
|
598
901
|
required: true,
|
|
599
902
|
},
|
|
903
|
+
{
|
|
904
|
+
name: "import_id",
|
|
905
|
+
kind: "string",
|
|
906
|
+
description: "Existing safely interrupted import to resume; max-credits is its total ceiling including credits already used.",
|
|
907
|
+
required: false,
|
|
908
|
+
},
|
|
600
909
|
{
|
|
601
910
|
name: "approved",
|
|
602
911
|
kind: "boolean",
|
|
@@ -611,10 +920,66 @@ export function registerUgcCommands(program, handle) {
|
|
|
611
920
|
},
|
|
612
921
|
],
|
|
613
922
|
},
|
|
923
|
+
{
|
|
924
|
+
action: "voice_save",
|
|
925
|
+
command: "voice save",
|
|
926
|
+
description: "Save your own writing preferences and examples as a private provisional Knowledge voice. Free: 0 credits, no provider call or connected account required. Existing voice edits require its current revision.",
|
|
927
|
+
fields: [
|
|
928
|
+
{
|
|
929
|
+
name: "participation_id",
|
|
930
|
+
kind: "string",
|
|
931
|
+
description: "Your creator participation ID.",
|
|
932
|
+
required: true,
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
name: "body",
|
|
936
|
+
kind: "string",
|
|
937
|
+
description: "Your own writing preferences or voice guide (Markdown).",
|
|
938
|
+
required: true,
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
name: "writing_examples",
|
|
942
|
+
kind: "array",
|
|
943
|
+
description: "JSON array of up to five examples you actually wrote; do not invent personal experiences.",
|
|
944
|
+
required: false,
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
name: "expected_revision",
|
|
948
|
+
kind: "number",
|
|
949
|
+
description: "Current profile revision returned by voice get, required when editing it.",
|
|
950
|
+
required: false,
|
|
951
|
+
},
|
|
952
|
+
],
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
action: "sponsorship_cancel",
|
|
956
|
+
command: "sponsorship cancel",
|
|
957
|
+
description: "Preview stopping renewal for one program sponsorship. Confirm with --approved and a signed-in master admin. Participation and credits through the paid period remain available.",
|
|
958
|
+
fields: [
|
|
959
|
+
{
|
|
960
|
+
name: "program_id",
|
|
961
|
+
kind: "string",
|
|
962
|
+
description: "Master program ID.",
|
|
963
|
+
required: true,
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
name: "participation_id",
|
|
967
|
+
kind: "string",
|
|
968
|
+
description: "Exact creator participation ID.",
|
|
969
|
+
required: true,
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
name: "approved",
|
|
973
|
+
kind: "boolean",
|
|
974
|
+
description: "Approve the exact cancellation preview. Omit for a free preview.",
|
|
975
|
+
required: false,
|
|
976
|
+
},
|
|
977
|
+
],
|
|
978
|
+
},
|
|
614
979
|
{
|
|
615
980
|
action: "sponsorship_preview",
|
|
616
981
|
command: "sponsorship preview",
|
|
617
|
-
description: "Preview seat charges and monthly 10,000-credit creator grants
|
|
982
|
+
description: "Preview seat charges and monthly 10,000-credit creator grants as a signed-in master workspace admin. Org API keys cannot create this quote.",
|
|
618
983
|
fields: [
|
|
619
984
|
{
|
|
620
985
|
name: "program_id",
|
|
@@ -633,7 +998,7 @@ export function registerUgcCommands(program, handle) {
|
|
|
633
998
|
{
|
|
634
999
|
action: "sponsorship_confirm",
|
|
635
1000
|
command: "sponsorship confirm",
|
|
636
|
-
description: "
|
|
1001
|
+
description: "Confirm the exact sponsorship quote as the same signed-in master workspace admin. Each program pays separately, even for the same account.",
|
|
637
1002
|
fields: [
|
|
638
1003
|
{
|
|
639
1004
|
name: "program_id",
|
|
@@ -661,11 +1026,54 @@ export function registerUgcCommands(program, handle) {
|
|
|
661
1026
|
},
|
|
662
1027
|
],
|
|
663
1028
|
},
|
|
1029
|
+
{
|
|
1030
|
+
action: "amplification_reconcile",
|
|
1031
|
+
command: "amplification reconcile",
|
|
1032
|
+
description: "Preview recording a provider observation for an uncertain program action. Confirmation needs a signed-in operator and --approved; it never contacts the provider or authorizes a retry.",
|
|
1033
|
+
fields: [
|
|
1034
|
+
{
|
|
1035
|
+
name: "program_id",
|
|
1036
|
+
kind: "string",
|
|
1037
|
+
description: "Program ID in the master workspace.",
|
|
1038
|
+
required: true,
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
name: "action_id",
|
|
1042
|
+
kind: "string",
|
|
1043
|
+
description: "Unresolved effect_unknown action ID.",
|
|
1044
|
+
required: true,
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
name: "outcome",
|
|
1048
|
+
kind: "string",
|
|
1049
|
+
description: "Observed applied or not_applied outcome.",
|
|
1050
|
+
required: true,
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
name: "evidence",
|
|
1054
|
+
kind: "object",
|
|
1055
|
+
description: "JSON object: provider_post_id, evidence_ref, observed_at ISO instant; applied needs provider_object_id and comments/reposts need exact observed_text. Optional note.",
|
|
1056
|
+
required: true,
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
name: "approved",
|
|
1060
|
+
kind: "boolean",
|
|
1061
|
+
description: "Explicitly confirm this immutable observation. No retry is authorized.",
|
|
1062
|
+
required: false,
|
|
1063
|
+
},
|
|
1064
|
+
],
|
|
1065
|
+
},
|
|
664
1066
|
{
|
|
665
1067
|
action: "amplification_save",
|
|
666
1068
|
command: "amplification save",
|
|
667
1069
|
description: "Save exact opted-in sender scope and bounded post-specific amplification. Enabling needs explicit approval.",
|
|
668
1070
|
fields: [
|
|
1071
|
+
{
|
|
1072
|
+
name: "sender_voice_pages",
|
|
1073
|
+
kind: "object",
|
|
1074
|
+
description: "JSON map from each acting sender UUID to its selected active Knowledge voice page UUID. Required for comments or reposts; the exact mapping is approved with the policy.",
|
|
1075
|
+
required: false,
|
|
1076
|
+
},
|
|
669
1077
|
{
|
|
670
1078
|
name: "program_id",
|
|
671
1079
|
kind: "string",
|
|
@@ -722,6 +1130,36 @@ export function registerUgcCommands(program, handle) {
|
|
|
722
1130
|
},
|
|
723
1131
|
],
|
|
724
1132
|
},
|
|
1133
|
+
{
|
|
1134
|
+
action: "peer_amplification_save",
|
|
1135
|
+
command: "peer-amplification save",
|
|
1136
|
+
description: "Preview or save this creator workspace's own peer-engagement consent, sender, voice and caps. The creator wallet pays; the host gate must also be enabled.",
|
|
1137
|
+
fields: [
|
|
1138
|
+
{ name: "participation_id", kind: "string", description: "Exact creator participation ID.", required: true },
|
|
1139
|
+
{ name: "sender_account_id", kind: "string", description: "Creator's matching connected LinkedIn sender ID.", required: true },
|
|
1140
|
+
{ name: "voice_page_id", kind: "string", description: "Creator-owned active voice page ID, required for comment or repost.", required: false },
|
|
1141
|
+
{ name: "actions", kind: "array", description: "Allowed peer actions: reaction, comment or repost.", required: true },
|
|
1142
|
+
{ name: "enabled", kind: "boolean", description: "Enable or disable this creator-owned policy.", required: true },
|
|
1143
|
+
{ name: "expected_policy_version", kind: "number", description: "Current policy version from peer-amplification get; omit or use 0 on first save.", required: false },
|
|
1144
|
+
{ name: "max_actions_per_post", kind: "number", description: "Hard action cap per peer post.", required: true },
|
|
1145
|
+
{ name: "max_credits_per_cycle", kind: "number", description: "Hard creator-wallet credit cap per cycle.", required: true },
|
|
1146
|
+
{ name: "approved", kind: "boolean", description: "Confirm this exact creator-owned scope; omit for preview.", required: false },
|
|
1147
|
+
{ name: "delay_min_seconds", kind: "number", description: "Minimum delay, 60–3600 seconds.", required: false },
|
|
1148
|
+
{ name: "delay_max_seconds", kind: "number", description: "Maximum delay, 60–86400 seconds.", required: false },
|
|
1149
|
+
],
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
action: "peer_amplification_reconcile",
|
|
1153
|
+
command: "peer-amplification reconcile",
|
|
1154
|
+
description: "Preview recording observed evidence for this creator's effect_unknown peer action. Approval records the outcome without a provider call or retry.",
|
|
1155
|
+
fields: [
|
|
1156
|
+
{ name: "participation_id", kind: "string", description: "Exact creator participation ID.", required: true },
|
|
1157
|
+
{ name: "action_id", kind: "string", description: "Exact effect_unknown peer action ID.", required: true },
|
|
1158
|
+
{ name: "outcome", kind: "string", description: "Observed applied or not_applied outcome.", required: true },
|
|
1159
|
+
{ name: "evidence", kind: "object", description: "JSON evidence: provider_post_id, evidence_ref and observed_at; applied may require provider_object_id and exact observed_text.", required: true },
|
|
1160
|
+
{ name: "approved", kind: "boolean", description: "Confirm this immutable observation; no retry is authorized.", required: false },
|
|
1161
|
+
],
|
|
1162
|
+
},
|
|
725
1163
|
];
|
|
726
1164
|
for (const spec of writes) {
|
|
727
1165
|
const [family, leaf] = spec.command.split(" ");
|
|
@@ -733,16 +1171,33 @@ export function registerUgcCommands(program, handle) {
|
|
|
733
1171
|
else
|
|
734
1172
|
command.option(flag, field.description);
|
|
735
1173
|
}
|
|
1174
|
+
if (spec.action === "invite_create")
|
|
1175
|
+
command.option("--link-only", "Create a shareable link without sending email.");
|
|
736
1176
|
command
|
|
737
1177
|
.option("--json", "Print a JSON envelope.")
|
|
738
1178
|
.action((options) => handle(`ugc ${spec.command}`, options, () => {
|
|
739
|
-
const body = {
|
|
1179
|
+
const body = {
|
|
1180
|
+
action: spec.action,
|
|
1181
|
+
...(spec.fixed ?? {}),
|
|
1182
|
+
};
|
|
740
1183
|
for (const field of spec.fields) {
|
|
741
1184
|
const key = field.name.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
742
1185
|
if (options[key] !== undefined)
|
|
743
1186
|
body[field.name] = parseField(options[key], field);
|
|
744
1187
|
}
|
|
745
|
-
|
|
1188
|
+
if (spec.action === "invite_create") {
|
|
1189
|
+
body.send_email = options.linkOnly !== true;
|
|
1190
|
+
if (options.linkOnly && (body.approved || body.preview_token))
|
|
1191
|
+
throw new Error("--link-only cannot be combined with --approved or --preview-token.");
|
|
1192
|
+
}
|
|
1193
|
+
return requestOxygen("/api/cli/ugc", {
|
|
1194
|
+
method: "POST",
|
|
1195
|
+
body,
|
|
1196
|
+
...(spec.action === "draft_create" &&
|
|
1197
|
+
typeof body.request_id === "string"
|
|
1198
|
+
? { idempotencyKey: body.request_id }
|
|
1199
|
+
: {}),
|
|
1200
|
+
});
|
|
746
1201
|
}));
|
|
747
1202
|
}
|
|
748
1203
|
}
|