@rosthq/cli 0.7.77 → 0.7.78

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.
@@ -1 +1 @@
1
- {"version":3,"file":"command-manifest.d.ts","sourceRoot":"","sources":["../../src/generated/command-manifest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,eAAO,MAAM,gBAAgB,EAAE,SAAS,oBAAoB,EA+P3D,CAAC"}
1
+ {"version":3,"file":"command-manifest.d.ts","sourceRoot":"","sources":["../../src/generated/command-manifest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,eAAO,MAAM,gBAAgB,EAAE,SAAS,oBAAoB,EAiQ3D,CAAC"}
package/dist/index.js CHANGED
@@ -45993,6 +45993,170 @@ var escalationDecisionOutputSchema = external_exports.object({
45993
45993
  replay_action_pending: external_exports.boolean().optional()
45994
45994
  }).strict();
45995
45995
 
45996
+ // ../../packages/protocol/src/work-ledger.ts
45997
+ var WORK_VERBS = [
45998
+ "created",
45999
+ "updated",
46000
+ "removed",
46001
+ "sent",
46002
+ "received",
46003
+ "contacted",
46004
+ "replied",
46005
+ "offered",
46006
+ "accepted",
46007
+ "rejected",
46008
+ "assessed",
46009
+ "announced",
46010
+ "assigned",
46011
+ "invited",
46012
+ "flagged",
46013
+ "booked",
46014
+ "searched",
46015
+ "filed",
46016
+ "extracted",
46017
+ "escalated"
46018
+ ];
46019
+ var workVerbSchema = external_exports.enum(WORK_VERBS);
46020
+ var WORK_OUTCOMES = ["success", "warning", "error", "held"];
46021
+ var workOutcomeSchema = external_exports.enum(WORK_OUTCOMES);
46022
+ var objectKindSchema = external_exports.string().trim().min(1).max(128);
46023
+ var externalIdSchema = external_exports.string().trim().min(1).max(512);
46024
+ var labelSchema = external_exports.string().trim().min(1).max(200);
46025
+ var displayUrlSchema = external_exports.string().trim().max(2048).refine(
46026
+ (value) => /^https?:\/\//u.test(value) || value.startsWith("/") || value.startsWith("rost://"),
46027
+ { message: "url must be http(s), a tenant-local path, or a rost:// reference" }
46028
+ );
46029
+ var entityRefSchema = external_exports.object({
46030
+ kind: objectKindSchema,
46031
+ external_id: externalIdSchema,
46032
+ label: labelSchema.optional(),
46033
+ url: displayUrlSchema.optional()
46034
+ }).strict();
46035
+ var contextRefSchema = external_exports.object({
46036
+ kind: objectKindSchema,
46037
+ external_id: externalIdSchema,
46038
+ label: labelSchema.optional()
46039
+ }).strict();
46040
+ var workLedgerRecordSchema = external_exports.object({
46041
+ verb: workVerbSchema,
46042
+ outcome: workOutcomeSchema.default("success"),
46043
+ object: entityRefSchema,
46044
+ // Optional second slot ("…about PO-1892"); genuinely multi-target activity
46045
+ // goes in details, not a second fixed slot (Salesforce's documented wall).
46046
+ target: entityRefSchema.optional(),
46047
+ context: contextRefSchema.optional(),
46048
+ // Optional governance joins. run_id / tool_call_id are re-validated server-side
46049
+ // against the acting tenant + seat; a caller cannot forge cross-tenant links.
46050
+ run_id: external_exports.string().uuid().optional(),
46051
+ tool_call_id: external_exports.string().uuid().optional(),
46052
+ // Deliverable / document / thread link (≈ A2A Artifact).
46053
+ evidence_ref: external_exports.string().trim().min(1).max(2048).optional(),
46054
+ // Versioned prompt used for external comms (P-17; invariant #9 tie-in).
46055
+ template_ref: external_exports.string().trim().min(1).max(512).optional(),
46056
+ // Default 1; only for genuinely anonymous bulk work. Rule: if a client might
46057
+ // ask "which ones?", log per-entity.
46058
+ quantity: external_exports.number().int().min(1).max(1e6).default(1),
46059
+ summary: external_exports.string().trim().min(1).max(2e3),
46060
+ // Zod-validated against the registry entry's details schema at log time
46061
+ // (permissive JSON object when no typed schema is registered).
46062
+ details: external_exports.record(external_exports.string(), external_exports.unknown()).default({}),
46063
+ // Idempotency: verb + object_ref + external event id (Gmail message id,
46064
+ // Baserow row id). A retried turn re-logging the same key is a no-op.
46065
+ dedup_key: external_exports.string().trim().min(1).max(512).optional(),
46066
+ // Correction: this record supersedes an earlier one (same seat + tenant).
46067
+ supersedes_id: external_exports.string().uuid().optional()
46068
+ }).strict();
46069
+ var WORK_LEDGER_MAX_BATCH = 100;
46070
+ var workLedgerLogInputSchema = external_exports.object({
46071
+ records: external_exports.array(workLedgerRecordSchema).min(1).max(WORK_LEDGER_MAX_BATCH)
46072
+ }).strict();
46073
+ var workLedgerLogResultSchema = external_exports.object({
46074
+ id: external_exports.string().uuid(),
46075
+ dedup_key: external_exports.string().nullable(),
46076
+ // true when this dedup_key already existed — the insert was an idempotent no-op.
46077
+ deduplicated: external_exports.boolean()
46078
+ }).strict();
46079
+ var workLedgerLogOutputSchema = external_exports.object({
46080
+ records: external_exports.array(workLedgerLogResultSchema),
46081
+ logged_count: external_exports.number().int().min(0),
46082
+ deduplicated_count: external_exports.number().int().min(0)
46083
+ }).strict();
46084
+ var workLedgerRecordViewSchema = external_exports.object({
46085
+ id: external_exports.string().uuid(),
46086
+ seat_id: external_exports.string().uuid(),
46087
+ agent_id: external_exports.string().uuid().nullable(),
46088
+ run_id: external_exports.string().uuid().nullable(),
46089
+ tool_call_id: external_exports.string().uuid().nullable(),
46090
+ verb: workVerbSchema,
46091
+ outcome: workOutcomeSchema,
46092
+ object_kind: external_exports.string(),
46093
+ object_external_id: external_exports.string(),
46094
+ object_label: external_exports.string().nullable(),
46095
+ object_url: external_exports.string().nullable(),
46096
+ target_kind: external_exports.string().nullable(),
46097
+ target_external_id: external_exports.string().nullable(),
46098
+ target_label: external_exports.string().nullable(),
46099
+ target_url: external_exports.string().nullable(),
46100
+ context_kind: external_exports.string().nullable(),
46101
+ context_external_id: external_exports.string().nullable(),
46102
+ context_label: external_exports.string().nullable(),
46103
+ evidence_ref: external_exports.string().nullable(),
46104
+ template_ref: external_exports.string().nullable(),
46105
+ quantity: external_exports.number().int(),
46106
+ summary: external_exports.string(),
46107
+ details: external_exports.record(external_exports.string(), external_exports.unknown()),
46108
+ dedup_key: external_exports.string().nullable(),
46109
+ supersedes_id: external_exports.string().uuid().nullable(),
46110
+ created_at: external_exports.string()
46111
+ }).strict();
46112
+ var workLedgerListInputSchema = external_exports.object({
46113
+ verb: workVerbSchema.optional(),
46114
+ outcome: workOutcomeSchema.optional(),
46115
+ object_kind: objectKindSchema.optional(),
46116
+ object_external_id: externalIdSchema.optional(),
46117
+ run_id: external_exports.string().uuid().optional(),
46118
+ // Tenant-admin cross-seat view: an explicit seat filter. Seat-scoped callers
46119
+ // are always constrained to their own seat server-side regardless of this.
46120
+ seat_id: external_exports.string().uuid().optional(),
46121
+ // Include records that have been superseded by a later correction (default off
46122
+ // so the feed shows the current narrative).
46123
+ include_superseded: external_exports.boolean().default(false),
46124
+ limit: external_exports.number().int().min(1).max(100).default(50),
46125
+ // Opaque keyset cursor from a previous page's next_cursor.
46126
+ cursor: external_exports.string().min(1).max(200).optional()
46127
+ }).strict();
46128
+ var workLedgerListOutputSchema = external_exports.object({
46129
+ records: external_exports.array(workLedgerRecordViewSchema),
46130
+ next_cursor: external_exports.string().nullable()
46131
+ }).strict();
46132
+ var activityRegistryEntrySchema = external_exports.object({
46133
+ activity_kind: external_exports.string().regex(/^[a-z][a-z0-9_]{0,63}$/u, "activity_kind must be a lower_snake slug (<=64 chars)"),
46134
+ verb: workVerbSchema,
46135
+ object_kind: objectKindSchema,
46136
+ label: labelSchema,
46137
+ // Names one of workDetailsSchemas; null = permissive (details need only be a
46138
+ // JSON object). A novel kind starts null until a typed schema ships.
46139
+ details_schema_key: external_exports.string().min(1).max(128).nullable().default(null),
46140
+ // Seam for signal auto-derivation (a later PR): whether ledger counts feed a
46141
+ // Signal, and the human-facing unit ("suppliers/week").
46142
+ derives_measurable: external_exports.boolean().default(false),
46143
+ measurable_unit: external_exports.string().min(1).max(64).nullable().default(null),
46144
+ description: external_exports.string().max(2e3).nullable().default(null)
46145
+ }).strict();
46146
+ var workDetailsSchemas = {
46147
+ supplier_contacted: external_exports.object({
46148
+ channel: external_exports.enum(["email", "phone", "portal", "chat", "other"]).optional(),
46149
+ subject: external_exports.string().max(500).optional(),
46150
+ thread_ref: external_exports.string().max(512).optional()
46151
+ }).strict(),
46152
+ quote_extracted: external_exports.object({
46153
+ amount: external_exports.number().nonnegative().optional(),
46154
+ currency: external_exports.string().length(3).optional(),
46155
+ unit: external_exports.string().max(64).optional(),
46156
+ lead_time_days: external_exports.number().int().nonnegative().optional()
46157
+ }).strict()
46158
+ };
46159
+
45996
46160
  // ../../packages/protocol/src/index.ts
45997
46161
  var eventTypes = [
45998
46162
  "status",
@@ -47392,7 +47556,7 @@ External connectors are being rolled out provider by provider, conservatively (r
47392
47556
  order: 48,
47393
47557
  title: "CLI and MCP installation guide",
47394
47558
  summary: "Install the public CLI, register remote token-backed MCP clients, and find the full command and tool catalog.",
47395
- version: "2026-07-13.6",
47559
+ version: "2026-07-13.7",
47396
47560
  public: true,
47397
47561
  audiences: ["human", "cli", "mcp", "in_app_agent"],
47398
47562
  stages: ["company_setup", "staffing"],
@@ -48206,10 +48370,12 @@ Seat-scoped MCP tokens expose the operating protocol below. The server still che
48206
48370
  | \`rost_complete_task\` | \`task.complete\` | Complete a task and record evidence. | Seat | Call with \`task_id\` and evidence. |
48207
48371
  | \`rost_escalate\` | \`escalation.raise\` | Escalate approval-scope or must-escalate work. | Seat | Call with severity, reason, and requested decision. |
48208
48372
  | \`rost_file_issue\` | \`friction.file_issue\` | File a Friction issue. | Seat | Call with title, severity, and impact. |
48209
- | \`rost_log_work\` | \`work.log\` | Record work performed by the seat. | Seat | Call with summary and evidence. |
48373
+ | \`rost_log_work\` | \`work.log\` | Record a lightweight free-text work breadcrumb for the seat. For structured, per-entity, queryable business activity (a client might ask "which ones?"), use \`rost_record_work\` instead. | Seat | Call with summary and evidence. |
48210
48374
  | \`rost_report_a_signal_reading\` | \`signal.report\` | Propose one draft reading for this seat's own agent-sourced measurable. The reading lands unconfirmed for human review. | Seat | Call with \`{"measurable_id":"<id>","value":42,"note":"read off the source","confidence":"high"}\`. |
48211
48375
  | \`rost_create_agent_deliverable\` | \`deliverable.create\` | Create a scrubbed durable work output for the acting seat. | Seat | Call with title, kind, summary/content, and optional safe links. |
48212
48376
  | \`rost_attach_agent_deliverable\` | \`deliverable.attach\` | Attach a scrubbed deliverable to a source run, task, or work order after server-side seat validation. | Seat | Call with title, kind, and the source ids that belong to the acting seat. |
48377
+ | \`rost_record_work\` | \`work.record\` | Append structured business-activity records to the seat's append-only work ledger, in a batch, right after each action succeeds. Prefer this over \`rost_log_work\` for durable, per-entity, queryable activity (verb + entity ref + outcome + evidence). Secret-redacted; idempotent on \`dedup_key\`; corrections are superseding records. | Seat | Call with \`{"records":[{"verb":"contacted","object":{"kind":"supplier","external_id":"sup_42","label":"Acme Foods"},"summary":"Emailed Acme for a monk fruit quote.","dedup_key":"gmail:msg-abc"}]}\`. |
48378
+ | \`rost_list_work_records\` | \`work.list\` | List the seat's work-ledger records newest-first (keyset-paginated), filterable by verb, object kind/ref, outcome, or run. | Seat | Call with \`{"verb":"contacted","object_kind":"supplier","limit":50}\`. |
48213
48379
  | \`rost_request_a_forge_secret_grant\` | \`software_factory.secret.request\` | Request access to a project secret by key. It creates a durable credential request and approval Task, never accepts a secret value, and does not grant access by itself. | Seat | Call with \`{"software_project_id":"<project-id>","environment":"preview","seat_id":"<seat-id>","action":"test.run","key_name":"OPENAI_API_KEY"}\`. |
48214
48380
  | \`rost_verify_forge_secret_broker_access\` | \`software_factory.secret.use\` | Verify broker authorization for a Forge secret without opening the vault. Missing grants create or reuse a credential request + approval Task; allowed grants return a redacted authorization summary only. Runtime vault use happens runner-side. | Seat | Call with \`{"software_project_id":"<project-id>","environment":"preview","seat_id":"<seat-id>","action":"test.run","key_name":"OPENAI_API_KEY","operation":"test_execution"}\`. |
48215
48381
  | \`rost_request_a_brokered_secret_grant\` | \`secret_grant.request\` | A seat agent requests a scoped brokered-secret grant (for secret.broker / baserow.*) by naming the host, path prefix, methods, and scope it needs. Draft-and-confirm: no secret and no vault ref; returns an event id for a human to grant via secret_grant.grant. | Seat | Call with {"seat_id":"<seat-id>","grant_key":"baserow","provider":"baserow","allowed_host":"baserow.example.com","allowed_path_prefix":"/api/database/rows/","allowed_methods":["GET"],"scope_tier":"read"}. |
@@ -51587,7 +51753,9 @@ var COMMAND_MANIFEST = [
51587
51753
  { "id": "work_order.cancel", "namespace": "work_order", "action": "cancel", "title": "Cancel work order", "description": "Cancel a queued, claimed, or running work order. Already-terminal orders return a stable error.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "work_order_id", "flag": "work-order-id", "type": "string", "required": true }], "hasComplexInput": false, "help": "Cancel a queued, claimed, or running work order; this is a human-gated action." },
51588
51754
  { "id": "work_order.enqueue", "namespace": "work_order", "action": "enqueue", "title": "Enqueue work order", "description": "Queue a work order for a live scheduled agent. Idempotent per (agent, scheduled time).", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "agent_id", "flag": "agent-id", "type": "string", "required": true }, { "name": "scheduled_for", "flag": "scheduled-for", "type": "string", "required": false }, { "name": "task_id", "flag": "task-id", "type": "string", "required": false }], "hasComplexInput": false, "help": "Queue a work order for a live scheduled agent; enqueue is idempotent per agent and scheduled time." },
51589
51755
  { "id": "work_order.list", "namespace": "work_order", "action": "list", "title": "List work orders", "description": "List runner/cloud work orders for the tenant, optionally filtered by status, agent, or runner.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "status", "flag": "status", "type": "enum", "required": false, "enumValues": ["queued", "claimed", "running", "done", "failed", "expired"] }, { "name": "agent_id", "flag": "agent-id", "type": "string", "required": false }, { "name": "runner_id", "flag": "runner-id", "type": "string", "required": false }, { "name": "limit", "flag": "limit", "type": "integer", "required": false }], "hasComplexInput": false, "help": "Inspect queued, claimed, running, and expired work orders to understand runner activity." },
51590
- { "id": "work.log", "namespace": "work", "action": "log", "title": "Log work", "description": "Write a lightweight activity breadcrumb event for the acting seat.", "requiredScope": "seat", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "note", "flag": "note", "type": "string", "required": true }], "hasComplexInput": false, "help": "Log a lightweight work breadcrumb so the seat's activity is visible without durable side effects." }
51756
+ { "id": "work.list", "namespace": "work", "action": "list", "title": "List work records", "description": "List the acting seat's work-ledger records newest-first (keyset-paginated), filterable by verb, object kind/ref, outcome, or run. Superseded records are hidden unless include_superseded is set.", "requiredScope": "seat", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "verb", "flag": "verb", "type": "enum", "required": false, "enumValues": ["created", "updated", "removed", "sent", "received", "contacted", "replied", "offered", "accepted", "rejected", "assessed", "announced", "assigned", "invited", "flagged", "booked", "searched", "filed", "extracted", "escalated"] }, { "name": "outcome", "flag": "outcome", "type": "enum", "required": false, "enumValues": ["success", "warning", "error", "held"] }, { "name": "object_kind", "flag": "object-kind", "type": "string", "required": false }, { "name": "object_external_id", "flag": "object-external-id", "type": "string", "required": false }, { "name": "run_id", "flag": "run-id", "type": "string", "required": false }, { "name": "seat_id", "flag": "seat-id", "type": "string", "required": false }, { "name": "include_superseded", "flag": "include-superseded", "type": "boolean", "required": false }, { "name": "limit", "flag": "limit", "type": "integer", "required": false }, { "name": "cursor", "flag": "cursor", "type": "string", "required": false }], "hasComplexInput": false, "help": "List the seat's work-ledger records newest-first with keyset pagination, filterable by verb, object, outcome, or run." },
51757
+ { "id": "work.log", "namespace": "work", "action": "log", "title": "Log work", "description": "Write a lightweight activity breadcrumb event for the acting seat.", "requiredScope": "seat", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "note", "flag": "note", "type": "string", "required": true }], "hasComplexInput": false, "help": "Log a lightweight work breadcrumb so the seat's activity is visible without durable side effects." },
51758
+ { "id": "work.record", "namespace": "work", "action": "record", "title": "Record work", "description": "Append one or more structured business-activity records to the agent work ledger for the acting seat. Batch-accepting, append-only, secret-redacted, and idempotent on dedup_key. Corrections are superseding records.", "requiredScope": "seat", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": true, "help": "Append structured business-activity records (verb + entity refs + outcome + evidence) to the seat's work ledger, in a batch, right after each action succeeds." }
51591
51759
  ];
51592
51760
 
51593
51761
  // src/generator/groups.ts