@rudderhq/cli 0.1.0-canary.30 → 0.1.0-canary.32
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/index.js +173 -164
- package/dist/index.js.map +4 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -113,7 +113,6 @@ var init_constants = __esm({
|
|
|
113
113
|
"issue_proposal",
|
|
114
114
|
"operation_proposal",
|
|
115
115
|
"routing_suggestion",
|
|
116
|
-
"user_input_request",
|
|
117
116
|
"system_event"
|
|
118
117
|
];
|
|
119
118
|
CHAT_MESSAGE_STATUSES = ["completed", "stopped", "failed"];
|
|
@@ -690,7 +689,6 @@ var init_chat = __esm({
|
|
|
690
689
|
title: z6.string().trim().min(1).max(200),
|
|
691
690
|
description: z6.string().trim().min(1).max(2e4),
|
|
692
691
|
priority: z6.enum(["critical", "high", "medium", "low"]).optional().default("medium"),
|
|
693
|
-
status: z6.enum(ISSUE_STATUSES).optional(),
|
|
694
692
|
projectId: z6.string().uuid().optional().nullable(),
|
|
695
693
|
goalId: z6.string().uuid().optional().nullable(),
|
|
696
694
|
parentId: z6.string().uuid().optional().nullable(),
|
|
@@ -1503,7 +1501,8 @@ var init_issue = __esm({
|
|
|
1503
1501
|
approvalId: z13.string().uuid()
|
|
1504
1502
|
});
|
|
1505
1503
|
createIssueAttachmentMetadataSchema = z13.object({
|
|
1506
|
-
issueCommentId: z13.string().uuid().optional().nullable()
|
|
1504
|
+
issueCommentId: z13.string().uuid().optional().nullable(),
|
|
1505
|
+
usage: z13.enum(["issue", "description_inline", "document_inline", "comment_inline", "comment_attachment"]).optional()
|
|
1507
1506
|
});
|
|
1508
1507
|
ISSUE_DOCUMENT_FORMATS = ["markdown"];
|
|
1509
1508
|
issueDocumentFormatSchema = z13.enum(ISSUE_DOCUMENT_FORMATS);
|
|
@@ -2316,6 +2315,13 @@ var init_project_url_key = __esm({
|
|
|
2316
2315
|
}
|
|
2317
2316
|
});
|
|
2318
2317
|
|
|
2318
|
+
// ../packages/shared/src/messenger-preview.ts
|
|
2319
|
+
var init_messenger_preview = __esm({
|
|
2320
|
+
"../packages/shared/src/messenger-preview.ts"() {
|
|
2321
|
+
"use strict";
|
|
2322
|
+
}
|
|
2323
|
+
});
|
|
2324
|
+
|
|
2319
2325
|
// ../packages/shared/src/organization-skill-reference.ts
|
|
2320
2326
|
var RUDDER_BUNDLED_SKILL_SLUGS, RUDDER_BUNDLED_SKILL_KEYS;
|
|
2321
2327
|
var init_organization_skill_reference = __esm({
|
|
@@ -2513,6 +2519,7 @@ var init_src = __esm({
|
|
|
2513
2519
|
init_agent_url_key();
|
|
2514
2520
|
init_organization_url_key();
|
|
2515
2521
|
init_project_url_key();
|
|
2522
|
+
init_messenger_preview();
|
|
2516
2523
|
init_organization_skill_reference();
|
|
2517
2524
|
init_project_mentions();
|
|
2518
2525
|
init_config_schema();
|
|
@@ -5558,7 +5565,7 @@ var init_messenger_thread_user_states = __esm({
|
|
|
5558
5565
|
});
|
|
5559
5566
|
|
|
5560
5567
|
// ../packages/db/src/schema/issue_attachments.ts
|
|
5561
|
-
import { pgTable as pgTable50, uuid as uuid48, timestamp as timestamp50, index as index45, uniqueIndex as uniqueIndex29 } from "drizzle-orm/pg-core";
|
|
5568
|
+
import { pgTable as pgTable50, uuid as uuid48, timestamp as timestamp50, index as index45, uniqueIndex as uniqueIndex29, text as text51 } from "drizzle-orm/pg-core";
|
|
5562
5569
|
var issueAttachments;
|
|
5563
5570
|
var init_issue_attachments = __esm({
|
|
5564
5571
|
"../packages/db/src/schema/issue_attachments.ts"() {
|
|
@@ -5575,12 +5582,14 @@ var init_issue_attachments = __esm({
|
|
|
5575
5582
|
issueId: uuid48("issue_id").notNull().references(() => issues.id, { onDelete: "cascade" }),
|
|
5576
5583
|
assetId: uuid48("asset_id").notNull().references(() => assets.id, { onDelete: "cascade" }),
|
|
5577
5584
|
issueCommentId: uuid48("issue_comment_id").references(() => issueComments.id, { onDelete: "set null" }),
|
|
5585
|
+
usage: text51("usage").notNull().default("issue"),
|
|
5578
5586
|
createdAt: timestamp50("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
5579
5587
|
updatedAt: timestamp50("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
5580
5588
|
},
|
|
5581
5589
|
(table) => ({
|
|
5582
5590
|
companyIssueIdx: index45("issue_attachments_company_issue_idx").on(table.orgId, table.issueId),
|
|
5583
5591
|
issueCommentIdx: index45("issue_attachments_issue_comment_idx").on(table.issueCommentId),
|
|
5592
|
+
usageIdx: index45("issue_attachments_usage_idx").on(table.usage),
|
|
5584
5593
|
assetUq: uniqueIndex29("issue_attachments_asset_uq").on(table.assetId)
|
|
5585
5594
|
})
|
|
5586
5595
|
);
|
|
@@ -5588,7 +5597,7 @@ var init_issue_attachments = __esm({
|
|
|
5588
5597
|
});
|
|
5589
5598
|
|
|
5590
5599
|
// ../packages/db/src/schema/documents.ts
|
|
5591
|
-
import { pgTable as pgTable51, uuid as uuid49, text as
|
|
5600
|
+
import { pgTable as pgTable51, uuid as uuid49, text as text52, integer as integer15, timestamp as timestamp51, index as index46 } from "drizzle-orm/pg-core";
|
|
5592
5601
|
var documents;
|
|
5593
5602
|
var init_documents = __esm({
|
|
5594
5603
|
"../packages/db/src/schema/documents.ts"() {
|
|
@@ -5600,15 +5609,15 @@ var init_documents = __esm({
|
|
|
5600
5609
|
{
|
|
5601
5610
|
id: uuid49("id").primaryKey().defaultRandom(),
|
|
5602
5611
|
orgId: uuid49("org_id").notNull().references(() => organizations.id),
|
|
5603
|
-
title:
|
|
5604
|
-
format:
|
|
5605
|
-
latestBody:
|
|
5612
|
+
title: text52("title"),
|
|
5613
|
+
format: text52("format").notNull().default("markdown"),
|
|
5614
|
+
latestBody: text52("latest_body").notNull(),
|
|
5606
5615
|
latestRevisionId: uuid49("latest_revision_id"),
|
|
5607
5616
|
latestRevisionNumber: integer15("latest_revision_number").notNull().default(1),
|
|
5608
5617
|
createdByAgentId: uuid49("created_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
|
|
5609
|
-
createdByUserId:
|
|
5618
|
+
createdByUserId: text52("created_by_user_id"),
|
|
5610
5619
|
updatedByAgentId: uuid49("updated_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
|
|
5611
|
-
updatedByUserId:
|
|
5620
|
+
updatedByUserId: text52("updated_by_user_id"),
|
|
5612
5621
|
createdAt: timestamp51("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
5613
5622
|
updatedAt: timestamp51("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
5614
5623
|
},
|
|
@@ -5621,7 +5630,7 @@ var init_documents = __esm({
|
|
|
5621
5630
|
});
|
|
5622
5631
|
|
|
5623
5632
|
// ../packages/db/src/schema/document_revisions.ts
|
|
5624
|
-
import { pgTable as pgTable52, uuid as uuid50, text as
|
|
5633
|
+
import { pgTable as pgTable52, uuid as uuid50, text as text53, integer as integer16, timestamp as timestamp52, index as index47, uniqueIndex as uniqueIndex30 } from "drizzle-orm/pg-core";
|
|
5625
5634
|
var documentRevisions;
|
|
5626
5635
|
var init_document_revisions = __esm({
|
|
5627
5636
|
"../packages/db/src/schema/document_revisions.ts"() {
|
|
@@ -5636,10 +5645,10 @@ var init_document_revisions = __esm({
|
|
|
5636
5645
|
orgId: uuid50("org_id").notNull().references(() => organizations.id),
|
|
5637
5646
|
documentId: uuid50("document_id").notNull().references(() => documents.id, { onDelete: "cascade" }),
|
|
5638
5647
|
revisionNumber: integer16("revision_number").notNull(),
|
|
5639
|
-
body:
|
|
5640
|
-
changeSummary:
|
|
5648
|
+
body: text53("body").notNull(),
|
|
5649
|
+
changeSummary: text53("change_summary"),
|
|
5641
5650
|
createdByAgentId: uuid50("created_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
|
|
5642
|
-
createdByUserId:
|
|
5651
|
+
createdByUserId: text53("created_by_user_id"),
|
|
5643
5652
|
createdAt: timestamp52("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
5644
5653
|
},
|
|
5645
5654
|
(table) => ({
|
|
@@ -5658,7 +5667,7 @@ var init_document_revisions = __esm({
|
|
|
5658
5667
|
});
|
|
5659
5668
|
|
|
5660
5669
|
// ../packages/db/src/schema/issue_documents.ts
|
|
5661
|
-
import { pgTable as pgTable53, uuid as uuid51, text as
|
|
5670
|
+
import { pgTable as pgTable53, uuid as uuid51, text as text54, timestamp as timestamp53, index as index48, uniqueIndex as uniqueIndex31 } from "drizzle-orm/pg-core";
|
|
5662
5671
|
var issueDocuments;
|
|
5663
5672
|
var init_issue_documents = __esm({
|
|
5664
5673
|
"../packages/db/src/schema/issue_documents.ts"() {
|
|
@@ -5673,7 +5682,7 @@ var init_issue_documents = __esm({
|
|
|
5673
5682
|
orgId: uuid51("org_id").notNull().references(() => organizations.id),
|
|
5674
5683
|
issueId: uuid51("issue_id").notNull().references(() => issues.id, { onDelete: "cascade" }),
|
|
5675
5684
|
documentId: uuid51("document_id").notNull().references(() => documents.id, { onDelete: "cascade" }),
|
|
5676
|
-
key:
|
|
5685
|
+
key: text54("key").notNull(),
|
|
5677
5686
|
createdAt: timestamp53("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
5678
5687
|
updatedAt: timestamp53("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
5679
5688
|
},
|
|
@@ -5695,7 +5704,7 @@ var init_issue_documents = __esm({
|
|
|
5695
5704
|
});
|
|
5696
5705
|
|
|
5697
5706
|
// ../packages/db/src/schema/heartbeat_run_events.ts
|
|
5698
|
-
import { pgTable as pgTable54, uuid as uuid52, text as
|
|
5707
|
+
import { pgTable as pgTable54, uuid as uuid52, text as text55, timestamp as timestamp54, integer as integer17, jsonb as jsonb24, index as index49, bigserial } from "drizzle-orm/pg-core";
|
|
5699
5708
|
var heartbeatRunEvents;
|
|
5700
5709
|
var init_heartbeat_run_events = __esm({
|
|
5701
5710
|
"../packages/db/src/schema/heartbeat_run_events.ts"() {
|
|
@@ -5711,11 +5720,11 @@ var init_heartbeat_run_events = __esm({
|
|
|
5711
5720
|
runId: uuid52("run_id").notNull().references(() => heartbeatRuns.id),
|
|
5712
5721
|
agentId: uuid52("agent_id").notNull().references(() => agents.id),
|
|
5713
5722
|
seq: integer17("seq").notNull(),
|
|
5714
|
-
eventType:
|
|
5715
|
-
stream:
|
|
5716
|
-
level:
|
|
5717
|
-
color:
|
|
5718
|
-
message:
|
|
5723
|
+
eventType: text55("event_type").notNull(),
|
|
5724
|
+
stream: text55("stream"),
|
|
5725
|
+
level: text55("level"),
|
|
5726
|
+
color: text55("color"),
|
|
5727
|
+
message: text55("message"),
|
|
5719
5728
|
payload: jsonb24("payload").$type(),
|
|
5720
5729
|
createdAt: timestamp54("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
5721
5730
|
},
|
|
@@ -5729,7 +5738,7 @@ var init_heartbeat_run_events = __esm({
|
|
|
5729
5738
|
});
|
|
5730
5739
|
|
|
5731
5740
|
// ../packages/db/src/schema/cost_events.ts
|
|
5732
|
-
import { pgTable as pgTable55, uuid as uuid53, text as
|
|
5741
|
+
import { pgTable as pgTable55, uuid as uuid53, text as text56, timestamp as timestamp55, integer as integer18, index as index50 } from "drizzle-orm/pg-core";
|
|
5733
5742
|
var costEvents;
|
|
5734
5743
|
var init_cost_events = __esm({
|
|
5735
5744
|
"../packages/db/src/schema/cost_events.ts"() {
|
|
@@ -5750,11 +5759,11 @@ var init_cost_events = __esm({
|
|
|
5750
5759
|
projectId: uuid53("project_id").references(() => projects.id),
|
|
5751
5760
|
goalId: uuid53("goal_id").references(() => goals.id),
|
|
5752
5761
|
heartbeatRunId: uuid53("heartbeat_run_id").references(() => heartbeatRuns.id),
|
|
5753
|
-
billingCode:
|
|
5754
|
-
provider:
|
|
5755
|
-
biller:
|
|
5756
|
-
billingType:
|
|
5757
|
-
model:
|
|
5762
|
+
billingCode: text56("billing_code"),
|
|
5763
|
+
provider: text56("provider").notNull(),
|
|
5764
|
+
biller: text56("biller").notNull().default("unknown"),
|
|
5765
|
+
billingType: text56("billing_type").notNull().default("unknown"),
|
|
5766
|
+
model: text56("model").notNull(),
|
|
5758
5767
|
inputTokens: integer18("input_tokens").notNull().default(0),
|
|
5759
5768
|
cachedInputTokens: integer18("cached_input_tokens").notNull().default(0),
|
|
5760
5769
|
outputTokens: integer18("output_tokens").notNull().default(0),
|
|
@@ -5789,7 +5798,7 @@ var init_cost_events = __esm({
|
|
|
5789
5798
|
});
|
|
5790
5799
|
|
|
5791
5800
|
// ../packages/db/src/schema/finance_events.ts
|
|
5792
|
-
import { pgTable as pgTable56, uuid as uuid54, text as
|
|
5801
|
+
import { pgTable as pgTable56, uuid as uuid54, text as text57, timestamp as timestamp56, integer as integer19, index as index51, boolean as boolean10, jsonb as jsonb25 } from "drizzle-orm/pg-core";
|
|
5793
5802
|
var financeEvents;
|
|
5794
5803
|
var init_finance_events = __esm({
|
|
5795
5804
|
"../packages/db/src/schema/finance_events.ts"() {
|
|
@@ -5812,22 +5821,22 @@ var init_finance_events = __esm({
|
|
|
5812
5821
|
goalId: uuid54("goal_id").references(() => goals.id),
|
|
5813
5822
|
heartbeatRunId: uuid54("heartbeat_run_id").references(() => heartbeatRuns.id),
|
|
5814
5823
|
costEventId: uuid54("cost_event_id").references(() => costEvents.id),
|
|
5815
|
-
billingCode:
|
|
5816
|
-
description:
|
|
5817
|
-
eventKind:
|
|
5818
|
-
direction:
|
|
5819
|
-
biller:
|
|
5820
|
-
provider:
|
|
5821
|
-
executionAgentRuntimeType:
|
|
5822
|
-
pricingTier:
|
|
5823
|
-
region:
|
|
5824
|
-
model:
|
|
5824
|
+
billingCode: text57("billing_code"),
|
|
5825
|
+
description: text57("description"),
|
|
5826
|
+
eventKind: text57("event_kind").notNull(),
|
|
5827
|
+
direction: text57("direction").notNull().default("debit"),
|
|
5828
|
+
biller: text57("biller").notNull(),
|
|
5829
|
+
provider: text57("provider"),
|
|
5830
|
+
executionAgentRuntimeType: text57("execution_agent_runtime_type"),
|
|
5831
|
+
pricingTier: text57("pricing_tier"),
|
|
5832
|
+
region: text57("region"),
|
|
5833
|
+
model: text57("model"),
|
|
5825
5834
|
quantity: integer19("quantity"),
|
|
5826
|
-
unit:
|
|
5835
|
+
unit: text57("unit"),
|
|
5827
5836
|
amountCents: integer19("amount_cents").notNull(),
|
|
5828
|
-
currency:
|
|
5837
|
+
currency: text57("currency").notNull().default("USD"),
|
|
5829
5838
|
estimated: boolean10("estimated").notNull().default(false),
|
|
5830
|
-
externalInvoiceId:
|
|
5839
|
+
externalInvoiceId: text57("external_invoice_id"),
|
|
5831
5840
|
metadataJson: jsonb25("metadata_json").$type(),
|
|
5832
5841
|
occurredAt: timestamp56("occurred_at", { withTimezone: true }).notNull(),
|
|
5833
5842
|
createdAt: timestamp56("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
@@ -5863,7 +5872,7 @@ var init_finance_events = __esm({
|
|
|
5863
5872
|
});
|
|
5864
5873
|
|
|
5865
5874
|
// ../packages/db/src/schema/approval_comments.ts
|
|
5866
|
-
import { pgTable as pgTable57, uuid as uuid55, text as
|
|
5875
|
+
import { pgTable as pgTable57, uuid as uuid55, text as text58, timestamp as timestamp57, index as index52 } from "drizzle-orm/pg-core";
|
|
5867
5876
|
var approvalComments;
|
|
5868
5877
|
var init_approval_comments = __esm({
|
|
5869
5878
|
"../packages/db/src/schema/approval_comments.ts"() {
|
|
@@ -5878,8 +5887,8 @@ var init_approval_comments = __esm({
|
|
|
5878
5887
|
orgId: uuid55("org_id").notNull().references(() => organizations.id),
|
|
5879
5888
|
approvalId: uuid55("approval_id").notNull().references(() => approvals.id),
|
|
5880
5889
|
authorAgentId: uuid55("author_agent_id").references(() => agents.id),
|
|
5881
|
-
authorUserId:
|
|
5882
|
-
body:
|
|
5890
|
+
authorUserId: text58("author_user_id"),
|
|
5891
|
+
body: text58("body").notNull(),
|
|
5883
5892
|
createdAt: timestamp57("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
5884
5893
|
updatedAt: timestamp57("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
5885
5894
|
},
|
|
@@ -5896,7 +5905,7 @@ var init_approval_comments = __esm({
|
|
|
5896
5905
|
});
|
|
5897
5906
|
|
|
5898
5907
|
// ../packages/db/src/schema/activity_log.ts
|
|
5899
|
-
import { pgTable as pgTable58, uuid as uuid56, text as
|
|
5908
|
+
import { pgTable as pgTable58, uuid as uuid56, text as text59, timestamp as timestamp58, jsonb as jsonb26, index as index53 } from "drizzle-orm/pg-core";
|
|
5900
5909
|
var activityLog;
|
|
5901
5910
|
var init_activity_log = __esm({
|
|
5902
5911
|
"../packages/db/src/schema/activity_log.ts"() {
|
|
@@ -5909,11 +5918,11 @@ var init_activity_log = __esm({
|
|
|
5909
5918
|
{
|
|
5910
5919
|
id: uuid56("id").primaryKey().defaultRandom(),
|
|
5911
5920
|
orgId: uuid56("org_id").notNull().references(() => organizations.id),
|
|
5912
|
-
actorType:
|
|
5913
|
-
actorId:
|
|
5914
|
-
action:
|
|
5915
|
-
entityType:
|
|
5916
|
-
entityId:
|
|
5921
|
+
actorType: text59("actor_type").notNull().default("system"),
|
|
5922
|
+
actorId: text59("actor_id").notNull(),
|
|
5923
|
+
action: text59("action").notNull(),
|
|
5924
|
+
entityType: text59("entity_type").notNull(),
|
|
5925
|
+
entityId: text59("entity_id").notNull(),
|
|
5917
5926
|
agentId: uuid56("agent_id").references(() => agents.id),
|
|
5918
5927
|
runId: uuid56("run_id").references(() => heartbeatRuns.id),
|
|
5919
5928
|
details: jsonb26("details").$type(),
|
|
@@ -5929,7 +5938,7 @@ var init_activity_log = __esm({
|
|
|
5929
5938
|
});
|
|
5930
5939
|
|
|
5931
5940
|
// ../packages/db/src/schema/organization_secret_versions.ts
|
|
5932
|
-
import { pgTable as pgTable59, uuid as uuid57, text as
|
|
5941
|
+
import { pgTable as pgTable59, uuid as uuid57, text as text60, timestamp as timestamp59, integer as integer20, jsonb as jsonb27, index as index54, uniqueIndex as uniqueIndex32 } from "drizzle-orm/pg-core";
|
|
5933
5942
|
var organizationSecretVersions;
|
|
5934
5943
|
var init_organization_secret_versions = __esm({
|
|
5935
5944
|
"../packages/db/src/schema/organization_secret_versions.ts"() {
|
|
@@ -5943,9 +5952,9 @@ var init_organization_secret_versions = __esm({
|
|
|
5943
5952
|
secretId: uuid57("secret_id").notNull().references(() => organizationSecrets.id, { onDelete: "cascade" }),
|
|
5944
5953
|
version: integer20("version").notNull(),
|
|
5945
5954
|
material: jsonb27("material").$type().notNull(),
|
|
5946
|
-
valueSha256:
|
|
5955
|
+
valueSha256: text60("value_sha256").notNull(),
|
|
5947
5956
|
createdByAgentId: uuid57("created_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
|
|
5948
|
-
createdByUserId:
|
|
5957
|
+
createdByUserId: text60("created_by_user_id"),
|
|
5949
5958
|
createdAt: timestamp59("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
5950
5959
|
revokedAt: timestamp59("revoked_at", { withTimezone: true })
|
|
5951
5960
|
},
|
|
@@ -5962,7 +5971,7 @@ var init_organization_secret_versions = __esm({
|
|
|
5962
5971
|
import {
|
|
5963
5972
|
pgTable as pgTable60,
|
|
5964
5973
|
uuid as uuid58,
|
|
5965
|
-
text as
|
|
5974
|
+
text as text61,
|
|
5966
5975
|
timestamp as timestamp60,
|
|
5967
5976
|
jsonb as jsonb28,
|
|
5968
5977
|
index as index55,
|
|
@@ -5978,16 +5987,16 @@ var init_organization_skills = __esm({
|
|
|
5978
5987
|
{
|
|
5979
5988
|
id: uuid58("id").primaryKey().defaultRandom(),
|
|
5980
5989
|
orgId: uuid58("org_id").notNull().references(() => organizations.id),
|
|
5981
|
-
key:
|
|
5982
|
-
slug:
|
|
5983
|
-
name:
|
|
5984
|
-
description:
|
|
5985
|
-
markdown:
|
|
5986
|
-
sourceType:
|
|
5987
|
-
sourceLocator:
|
|
5988
|
-
sourceRef:
|
|
5989
|
-
trustLevel:
|
|
5990
|
-
compatibility:
|
|
5990
|
+
key: text61("key").notNull(),
|
|
5991
|
+
slug: text61("slug").notNull(),
|
|
5992
|
+
name: text61("name").notNull(),
|
|
5993
|
+
description: text61("description"),
|
|
5994
|
+
markdown: text61("markdown").notNull(),
|
|
5995
|
+
sourceType: text61("source_type").notNull().default("local_path"),
|
|
5996
|
+
sourceLocator: text61("source_locator"),
|
|
5997
|
+
sourceRef: text61("source_ref"),
|
|
5998
|
+
trustLevel: text61("trust_level").notNull().default("markdown_only"),
|
|
5999
|
+
compatibility: text61("compatibility").notNull().default("compatible"),
|
|
5991
6000
|
fileInventory: jsonb28("file_inventory").$type().notNull().default([]),
|
|
5992
6001
|
metadata: jsonb28("metadata").$type(),
|
|
5993
6002
|
createdAt: timestamp60("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
@@ -6005,7 +6014,7 @@ var init_organization_skills = __esm({
|
|
|
6005
6014
|
import {
|
|
6006
6015
|
pgTable as pgTable61,
|
|
6007
6016
|
uuid as uuid59,
|
|
6008
|
-
text as
|
|
6017
|
+
text as text62,
|
|
6009
6018
|
integer as integer21,
|
|
6010
6019
|
timestamp as timestamp61,
|
|
6011
6020
|
jsonb as jsonb29,
|
|
@@ -6020,17 +6029,17 @@ var init_plugins = __esm({
|
|
|
6020
6029
|
"plugins",
|
|
6021
6030
|
{
|
|
6022
6031
|
id: uuid59("id").primaryKey().defaultRandom(),
|
|
6023
|
-
pluginKey:
|
|
6024
|
-
packageName:
|
|
6025
|
-
version:
|
|
6032
|
+
pluginKey: text62("plugin_key").notNull(),
|
|
6033
|
+
packageName: text62("package_name").notNull(),
|
|
6034
|
+
version: text62("version").notNull(),
|
|
6026
6035
|
apiVersion: integer21("api_version").notNull().default(1),
|
|
6027
6036
|
categories: jsonb29("categories").$type().notNull().default([]),
|
|
6028
6037
|
manifestJson: jsonb29("manifest_json").$type().notNull(),
|
|
6029
|
-
status:
|
|
6038
|
+
status: text62("status").$type().notNull().default("installed"),
|
|
6030
6039
|
installOrder: integer21("install_order"),
|
|
6031
6040
|
/** Resolved package path for local-path installs; used to find worker entrypoint. */
|
|
6032
|
-
packagePath:
|
|
6033
|
-
lastError:
|
|
6041
|
+
packagePath: text62("package_path"),
|
|
6042
|
+
lastError: text62("last_error"),
|
|
6034
6043
|
installedAt: timestamp61("installed_at", { withTimezone: true }).notNull().defaultNow(),
|
|
6035
6044
|
updatedAt: timestamp61("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
6036
6045
|
},
|
|
@@ -6043,7 +6052,7 @@ var init_plugins = __esm({
|
|
|
6043
6052
|
});
|
|
6044
6053
|
|
|
6045
6054
|
// ../packages/db/src/schema/plugin_config.ts
|
|
6046
|
-
import { pgTable as pgTable62, uuid as uuid60, text as
|
|
6055
|
+
import { pgTable as pgTable62, uuid as uuid60, text as text63, timestamp as timestamp62, jsonb as jsonb30, uniqueIndex as uniqueIndex35 } from "drizzle-orm/pg-core";
|
|
6047
6056
|
var pluginConfig;
|
|
6048
6057
|
var init_plugin_config = __esm({
|
|
6049
6058
|
"../packages/db/src/schema/plugin_config.ts"() {
|
|
@@ -6055,7 +6064,7 @@ var init_plugin_config = __esm({
|
|
|
6055
6064
|
id: uuid60("id").primaryKey().defaultRandom(),
|
|
6056
6065
|
pluginId: uuid60("plugin_id").notNull().references(() => plugins.id, { onDelete: "cascade" }),
|
|
6057
6066
|
configJson: jsonb30("config_json").$type().notNull().default({}),
|
|
6058
|
-
lastError:
|
|
6067
|
+
lastError: text63("last_error"),
|
|
6059
6068
|
createdAt: timestamp62("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
6060
6069
|
updatedAt: timestamp62("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
6061
6070
|
},
|
|
@@ -6067,7 +6076,7 @@ var init_plugin_config = __esm({
|
|
|
6067
6076
|
});
|
|
6068
6077
|
|
|
6069
6078
|
// ../packages/db/src/schema/plugin_organization_settings.ts
|
|
6070
|
-
import { pgTable as pgTable63, uuid as uuid61, text as
|
|
6079
|
+
import { pgTable as pgTable63, uuid as uuid61, text as text64, timestamp as timestamp63, jsonb as jsonb31, index as index57, uniqueIndex as uniqueIndex36, boolean as boolean11 } from "drizzle-orm/pg-core";
|
|
6071
6080
|
var pluginOrganizationSettings;
|
|
6072
6081
|
var init_plugin_organization_settings = __esm({
|
|
6073
6082
|
"../packages/db/src/schema/plugin_organization_settings.ts"() {
|
|
@@ -6082,7 +6091,7 @@ var init_plugin_organization_settings = __esm({
|
|
|
6082
6091
|
pluginId: uuid61("plugin_id").notNull().references(() => plugins.id, { onDelete: "cascade" }),
|
|
6083
6092
|
enabled: boolean11("enabled").notNull().default(true),
|
|
6084
6093
|
settingsJson: jsonb31("settings_json").$type().notNull().default({}),
|
|
6085
|
-
lastError:
|
|
6094
|
+
lastError: text64("last_error"),
|
|
6086
6095
|
createdAt: timestamp63("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
6087
6096
|
updatedAt: timestamp63("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
6088
6097
|
},
|
|
@@ -6102,7 +6111,7 @@ var init_plugin_organization_settings = __esm({
|
|
|
6102
6111
|
import {
|
|
6103
6112
|
pgTable as pgTable64,
|
|
6104
6113
|
uuid as uuid62,
|
|
6105
|
-
text as
|
|
6114
|
+
text as text65,
|
|
6106
6115
|
timestamp as timestamp64,
|
|
6107
6116
|
jsonb as jsonb32,
|
|
6108
6117
|
index as index58,
|
|
@@ -6120,19 +6129,19 @@ var init_plugin_state = __esm({
|
|
|
6120
6129
|
/** FK to the owning plugin. Cascades on delete. */
|
|
6121
6130
|
pluginId: uuid62("plugin_id").notNull().references(() => plugins.id, { onDelete: "cascade" }),
|
|
6122
6131
|
/** Granularity of the scope (e.g. `"instance"`, `"project"`, `"issue"`). */
|
|
6123
|
-
scopeKind:
|
|
6132
|
+
scopeKind: text65("scope_kind").$type().notNull(),
|
|
6124
6133
|
/**
|
|
6125
6134
|
* UUID or text identifier for the scoped object.
|
|
6126
6135
|
* Null for `instance` scope (which has no associated entity).
|
|
6127
6136
|
*/
|
|
6128
|
-
scopeId:
|
|
6137
|
+
scopeId: text65("scope_id"),
|
|
6129
6138
|
/**
|
|
6130
6139
|
* Sub-namespace to avoid key collisions within a scope.
|
|
6131
6140
|
* Defaults to `"default"` if the plugin does not specify one.
|
|
6132
6141
|
*/
|
|
6133
|
-
namespace:
|
|
6142
|
+
namespace: text65("namespace").notNull().default("default"),
|
|
6134
6143
|
/** The key identifying this state entry within the namespace. */
|
|
6135
|
-
stateKey:
|
|
6144
|
+
stateKey: text65("state_key").notNull(),
|
|
6136
6145
|
/** JSON-serializable value stored by the plugin. */
|
|
6137
6146
|
valueJson: jsonb32("value_json").notNull(),
|
|
6138
6147
|
/** Timestamp of the most recent write. */
|
|
@@ -6171,7 +6180,7 @@ var init_plugin_state = __esm({
|
|
|
6171
6180
|
import {
|
|
6172
6181
|
pgTable as pgTable65,
|
|
6173
6182
|
uuid as uuid63,
|
|
6174
|
-
text as
|
|
6183
|
+
text as text66,
|
|
6175
6184
|
timestamp as timestamp65,
|
|
6176
6185
|
jsonb as jsonb33,
|
|
6177
6186
|
index as index59,
|
|
@@ -6187,14 +6196,14 @@ var init_plugin_entities = __esm({
|
|
|
6187
6196
|
{
|
|
6188
6197
|
id: uuid63("id").primaryKey().defaultRandom(),
|
|
6189
6198
|
pluginId: uuid63("plugin_id").notNull().references(() => plugins.id, { onDelete: "cascade" }),
|
|
6190
|
-
entityType:
|
|
6191
|
-
scopeKind:
|
|
6192
|
-
scopeId:
|
|
6199
|
+
entityType: text66("entity_type").notNull(),
|
|
6200
|
+
scopeKind: text66("scope_kind").$type().notNull(),
|
|
6201
|
+
scopeId: text66("scope_id"),
|
|
6193
6202
|
// NULL for global scope (text to match plugin_state.scope_id)
|
|
6194
|
-
externalId:
|
|
6203
|
+
externalId: text66("external_id"),
|
|
6195
6204
|
// ID in the external system
|
|
6196
|
-
title:
|
|
6197
|
-
status:
|
|
6205
|
+
title: text66("title"),
|
|
6206
|
+
status: text66("status"),
|
|
6198
6207
|
data: jsonb33("data").$type().notNull().default({}),
|
|
6199
6208
|
createdAt: timestamp65("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
6200
6209
|
updatedAt: timestamp65("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
@@ -6217,7 +6226,7 @@ var init_plugin_entities = __esm({
|
|
|
6217
6226
|
import {
|
|
6218
6227
|
pgTable as pgTable66,
|
|
6219
6228
|
uuid as uuid64,
|
|
6220
|
-
text as
|
|
6229
|
+
text as text67,
|
|
6221
6230
|
integer as integer22,
|
|
6222
6231
|
timestamp as timestamp66,
|
|
6223
6232
|
jsonb as jsonb34,
|
|
@@ -6236,11 +6245,11 @@ var init_plugin_jobs = __esm({
|
|
|
6236
6245
|
/** FK to the owning plugin. Cascades on delete. */
|
|
6237
6246
|
pluginId: uuid64("plugin_id").notNull().references(() => plugins.id, { onDelete: "cascade" }),
|
|
6238
6247
|
/** Identifier matching the key in the plugin manifest's `jobs` array. */
|
|
6239
|
-
jobKey:
|
|
6248
|
+
jobKey: text67("job_key").notNull(),
|
|
6240
6249
|
/** Cron expression (e.g. `"0 * * * *"`) or interval string. */
|
|
6241
|
-
schedule:
|
|
6250
|
+
schedule: text67("schedule").notNull(),
|
|
6242
6251
|
/** Current scheduling state. */
|
|
6243
|
-
status:
|
|
6252
|
+
status: text67("status").$type().notNull().default("active"),
|
|
6244
6253
|
/** Timestamp of the most recent successful execution. */
|
|
6245
6254
|
lastRunAt: timestamp66("last_run_at", { withTimezone: true }),
|
|
6246
6255
|
/** Pre-computed timestamp of the next scheduled execution. */
|
|
@@ -6263,13 +6272,13 @@ var init_plugin_jobs = __esm({
|
|
|
6263
6272
|
/** Denormalized FK to the owning plugin for efficient querying. Cascades on delete. */
|
|
6264
6273
|
pluginId: uuid64("plugin_id").notNull().references(() => plugins.id, { onDelete: "cascade" }),
|
|
6265
6274
|
/** What caused this run to start (`"scheduled"` or `"manual"`). */
|
|
6266
|
-
trigger:
|
|
6275
|
+
trigger: text67("trigger").$type().notNull(),
|
|
6267
6276
|
/** Current lifecycle state of this run. */
|
|
6268
|
-
status:
|
|
6277
|
+
status: text67("status").$type().notNull().default("pending"),
|
|
6269
6278
|
/** Wall-clock duration in milliseconds. Null until the run finishes. */
|
|
6270
6279
|
durationMs: integer22("duration_ms"),
|
|
6271
6280
|
/** Error message if `status === "failed"`. */
|
|
6272
|
-
error:
|
|
6281
|
+
error: text67("error"),
|
|
6273
6282
|
/** Ordered list of log lines emitted during this run. */
|
|
6274
6283
|
logs: jsonb34("logs").$type().notNull().default([]),
|
|
6275
6284
|
startedAt: timestamp66("started_at", { withTimezone: true }),
|
|
@@ -6289,7 +6298,7 @@ var init_plugin_jobs = __esm({
|
|
|
6289
6298
|
import {
|
|
6290
6299
|
pgTable as pgTable67,
|
|
6291
6300
|
uuid as uuid65,
|
|
6292
|
-
text as
|
|
6301
|
+
text as text68,
|
|
6293
6302
|
integer as integer23,
|
|
6294
6303
|
timestamp as timestamp67,
|
|
6295
6304
|
jsonb as jsonb35,
|
|
@@ -6307,15 +6316,15 @@ var init_plugin_webhooks = __esm({
|
|
|
6307
6316
|
/** FK to the owning plugin. Cascades on delete. */
|
|
6308
6317
|
pluginId: uuid65("plugin_id").notNull().references(() => plugins.id, { onDelete: "cascade" }),
|
|
6309
6318
|
/** Identifier matching the key in the plugin manifest's `webhooks` array. */
|
|
6310
|
-
webhookKey:
|
|
6319
|
+
webhookKey: text68("webhook_key").notNull(),
|
|
6311
6320
|
/** Optional de-duplication ID provided by the external system. */
|
|
6312
|
-
externalId:
|
|
6321
|
+
externalId: text68("external_id"),
|
|
6313
6322
|
/** Current delivery state. */
|
|
6314
|
-
status:
|
|
6323
|
+
status: text68("status").$type().notNull().default("pending"),
|
|
6315
6324
|
/** Wall-clock processing duration in milliseconds. Null until delivery finishes. */
|
|
6316
6325
|
durationMs: integer23("duration_ms"),
|
|
6317
6326
|
/** Error message if `status === "failed"`. */
|
|
6318
|
-
error:
|
|
6327
|
+
error: text68("error"),
|
|
6319
6328
|
/** Raw JSON body of the inbound HTTP request. */
|
|
6320
6329
|
payload: jsonb35("payload").$type().notNull(),
|
|
6321
6330
|
/** Relevant HTTP headers from the inbound request (e.g. signature headers). */
|
|
@@ -6337,7 +6346,7 @@ var init_plugin_webhooks = __esm({
|
|
|
6337
6346
|
import {
|
|
6338
6347
|
pgTable as pgTable68,
|
|
6339
6348
|
uuid as uuid66,
|
|
6340
|
-
text as
|
|
6349
|
+
text as text69,
|
|
6341
6350
|
timestamp as timestamp68,
|
|
6342
6351
|
jsonb as jsonb36,
|
|
6343
6352
|
index as index62
|
|
@@ -6352,8 +6361,8 @@ var init_plugin_logs = __esm({
|
|
|
6352
6361
|
{
|
|
6353
6362
|
id: uuid66("id").primaryKey().defaultRandom(),
|
|
6354
6363
|
pluginId: uuid66("plugin_id").notNull().references(() => plugins.id, { onDelete: "cascade" }),
|
|
6355
|
-
level:
|
|
6356
|
-
message:
|
|
6364
|
+
level: text69("level").notNull().default("info"),
|
|
6365
|
+
message: text69("message").notNull(),
|
|
6357
6366
|
meta: jsonb36("meta").$type(),
|
|
6358
6367
|
createdAt: timestamp68("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
6359
6368
|
},
|
|
@@ -10912,8 +10921,8 @@ function printClaudeStreamEvent(raw, debug) {
|
|
|
10912
10921
|
const block = blockRaw;
|
|
10913
10922
|
const blockType = typeof block.type === "string" ? block.type : "";
|
|
10914
10923
|
if (blockType === "text") {
|
|
10915
|
-
const
|
|
10916
|
-
if (
|
|
10924
|
+
const text70 = typeof block.text === "string" ? block.text : "";
|
|
10925
|
+
if (text70) console.log(pc10.green(`assistant: ${text70}`));
|
|
10917
10926
|
} else if (blockType === "tool_use") {
|
|
10918
10927
|
const name = typeof block.name === "string" ? block.name : "unknown";
|
|
10919
10928
|
console.log(pc10.yellow(`tool_call: ${name}`));
|
|
@@ -11005,13 +11014,13 @@ function printItemStarted(item) {
|
|
|
11005
11014
|
function printItemCompleted(item) {
|
|
11006
11015
|
const itemType = asString(item.type);
|
|
11007
11016
|
if (itemType === "agent_message") {
|
|
11008
|
-
const
|
|
11009
|
-
if (
|
|
11017
|
+
const text70 = asString(item.text);
|
|
11018
|
+
if (text70) console.log(pc11.green(`assistant: ${text70}`));
|
|
11010
11019
|
return true;
|
|
11011
11020
|
}
|
|
11012
11021
|
if (itemType === "reasoning") {
|
|
11013
|
-
const
|
|
11014
|
-
if (
|
|
11022
|
+
const text70 = asString(item.text);
|
|
11023
|
+
if (text70) console.log(pc11.gray(`thinking: ${text70}`));
|
|
11015
11024
|
return true;
|
|
11016
11025
|
}
|
|
11017
11026
|
if (itemType === "tool_use") {
|
|
@@ -11061,9 +11070,9 @@ function printItemCompleted(item) {
|
|
|
11061
11070
|
}
|
|
11062
11071
|
if (itemType === "tool_result") {
|
|
11063
11072
|
const isError = item.is_error === true || asString(item.status) === "error";
|
|
11064
|
-
const
|
|
11073
|
+
const text70 = asString(item.content) || asString(item.result) || asString(item.output);
|
|
11065
11074
|
console.log((isError ? pc11.red : pc11.cyan)(`tool_result${isError ? " (error)" : ""}`));
|
|
11066
|
-
if (
|
|
11075
|
+
if (text70) console.log((isError ? pc11.red : pc11.gray)(text70));
|
|
11067
11076
|
return true;
|
|
11068
11077
|
}
|
|
11069
11078
|
return false;
|
|
@@ -11182,8 +11191,8 @@ function stringifyUnknown(value) {
|
|
|
11182
11191
|
}
|
|
11183
11192
|
function printUserMessage(messageRaw) {
|
|
11184
11193
|
if (typeof messageRaw === "string") {
|
|
11185
|
-
const
|
|
11186
|
-
if (
|
|
11194
|
+
const text70 = messageRaw.trim();
|
|
11195
|
+
if (text70) console.log(pc12.gray(`user: ${text70}`));
|
|
11187
11196
|
return;
|
|
11188
11197
|
}
|
|
11189
11198
|
const message = asRecord2(messageRaw);
|
|
@@ -11196,14 +11205,14 @@ function printUserMessage(messageRaw) {
|
|
|
11196
11205
|
if (!part) continue;
|
|
11197
11206
|
const type = asString2(part.type).trim();
|
|
11198
11207
|
if (type !== "output_text" && type !== "text") continue;
|
|
11199
|
-
const
|
|
11200
|
-
if (
|
|
11208
|
+
const text70 = asString2(part.text).trim();
|
|
11209
|
+
if (text70) console.log(pc12.gray(`user: ${text70}`));
|
|
11201
11210
|
}
|
|
11202
11211
|
}
|
|
11203
11212
|
function printAssistantMessage(messageRaw) {
|
|
11204
11213
|
if (typeof messageRaw === "string") {
|
|
11205
|
-
const
|
|
11206
|
-
if (
|
|
11214
|
+
const text70 = messageRaw.trim();
|
|
11215
|
+
if (text70) console.log(pc12.green(`assistant: ${text70}`));
|
|
11207
11216
|
return;
|
|
11208
11217
|
}
|
|
11209
11218
|
const message = asRecord2(messageRaw);
|
|
@@ -11216,13 +11225,13 @@ function printAssistantMessage(messageRaw) {
|
|
|
11216
11225
|
if (!part) continue;
|
|
11217
11226
|
const type = asString2(part.type).trim();
|
|
11218
11227
|
if (type === "output_text" || type === "text") {
|
|
11219
|
-
const
|
|
11220
|
-
if (
|
|
11228
|
+
const text70 = asString2(part.text).trim();
|
|
11229
|
+
if (text70) console.log(pc12.green(`assistant: ${text70}`));
|
|
11221
11230
|
continue;
|
|
11222
11231
|
}
|
|
11223
11232
|
if (type === "thinking") {
|
|
11224
|
-
const
|
|
11225
|
-
if (
|
|
11233
|
+
const text70 = asString2(part.text).trim();
|
|
11234
|
+
if (text70) console.log(pc12.gray(`thinking: ${text70}`));
|
|
11226
11235
|
continue;
|
|
11227
11236
|
}
|
|
11228
11237
|
if (type === "tool_call") {
|
|
@@ -11342,8 +11351,8 @@ function printCursorStreamEvent(raw, _debug) {
|
|
|
11342
11351
|
return;
|
|
11343
11352
|
}
|
|
11344
11353
|
if (type === "thinking") {
|
|
11345
|
-
const
|
|
11346
|
-
if (
|
|
11354
|
+
const text70 = asString2(parsed.text).trim() || asString2(asRecord2(parsed.delta)?.text).trim();
|
|
11355
|
+
if (text70) console.log(pc12.gray(`thinking: ${text70}`));
|
|
11347
11356
|
return;
|
|
11348
11357
|
}
|
|
11349
11358
|
if (type === "tool_call") {
|
|
@@ -11381,8 +11390,8 @@ function printCursorStreamEvent(raw, _debug) {
|
|
|
11381
11390
|
}
|
|
11382
11391
|
if (type === "text") {
|
|
11383
11392
|
const part = asRecord2(parsed.part);
|
|
11384
|
-
const
|
|
11385
|
-
if (
|
|
11393
|
+
const text70 = asString2(part?.text);
|
|
11394
|
+
if (text70) console.log(pc12.green(`assistant: ${text70}`));
|
|
11386
11395
|
return;
|
|
11387
11396
|
}
|
|
11388
11397
|
if (type === "tool_use") {
|
|
@@ -11445,8 +11454,8 @@ function errorText2(value) {
|
|
|
11445
11454
|
}
|
|
11446
11455
|
function printTextMessage(prefix, colorize, messageRaw) {
|
|
11447
11456
|
if (typeof messageRaw === "string") {
|
|
11448
|
-
const
|
|
11449
|
-
if (
|
|
11457
|
+
const text70 = messageRaw.trim();
|
|
11458
|
+
if (text70) console.log(colorize(`${prefix}: ${text70}`));
|
|
11450
11459
|
return;
|
|
11451
11460
|
}
|
|
11452
11461
|
const message = asRecord3(messageRaw);
|
|
@@ -11459,13 +11468,13 @@ function printTextMessage(prefix, colorize, messageRaw) {
|
|
|
11459
11468
|
if (!part) continue;
|
|
11460
11469
|
const type = asString3(part.type).trim();
|
|
11461
11470
|
if (type === "output_text" || type === "text" || type === "content") {
|
|
11462
|
-
const
|
|
11463
|
-
if (
|
|
11471
|
+
const text70 = asString3(part.text).trim() || asString3(part.content).trim();
|
|
11472
|
+
if (text70) console.log(colorize(`${prefix}: ${text70}`));
|
|
11464
11473
|
continue;
|
|
11465
11474
|
}
|
|
11466
11475
|
if (type === "thinking") {
|
|
11467
|
-
const
|
|
11468
|
-
if (
|
|
11476
|
+
const text70 = asString3(part.text).trim();
|
|
11477
|
+
if (text70) console.log(pc13.gray(`thinking: ${text70}`));
|
|
11469
11478
|
continue;
|
|
11470
11479
|
}
|
|
11471
11480
|
if (type === "tool_call") {
|
|
@@ -11517,8 +11526,8 @@ function printGeminiStreamEvent(raw, _debug) {
|
|
|
11517
11526
|
return;
|
|
11518
11527
|
}
|
|
11519
11528
|
if (subtype === "error") {
|
|
11520
|
-
const
|
|
11521
|
-
if (
|
|
11529
|
+
const text70 = errorText2(parsed.error ?? parsed.message ?? parsed.detail);
|
|
11530
|
+
if (text70) console.log(pc13.red(`error: ${text70}`));
|
|
11522
11531
|
return;
|
|
11523
11532
|
}
|
|
11524
11533
|
console.log(pc13.blue(`system: ${subtype || "event"}`));
|
|
@@ -11533,8 +11542,8 @@ function printGeminiStreamEvent(raw, _debug) {
|
|
|
11533
11542
|
return;
|
|
11534
11543
|
}
|
|
11535
11544
|
if (type === "thinking") {
|
|
11536
|
-
const
|
|
11537
|
-
if (
|
|
11545
|
+
const text70 = asString3(parsed.text).trim() || asString3(asRecord3(parsed.delta)?.text).trim();
|
|
11546
|
+
if (text70) console.log(pc13.gray(`thinking: ${text70}`));
|
|
11538
11547
|
return;
|
|
11539
11548
|
}
|
|
11540
11549
|
if (type === "tool_call") {
|
|
@@ -11570,8 +11579,8 @@ function printGeminiStreamEvent(raw, _debug) {
|
|
|
11570
11579
|
return;
|
|
11571
11580
|
}
|
|
11572
11581
|
if (type === "error") {
|
|
11573
|
-
const
|
|
11574
|
-
if (
|
|
11582
|
+
const text70 = errorText2(parsed.error ?? parsed.message ?? parsed.detail);
|
|
11583
|
+
if (text70) console.log(pc13.red(`error: ${text70}`));
|
|
11575
11584
|
return;
|
|
11576
11585
|
}
|
|
11577
11586
|
console.log(line);
|
|
@@ -11579,9 +11588,9 @@ function printGeminiStreamEvent(raw, _debug) {
|
|
|
11579
11588
|
|
|
11580
11589
|
// ../packages/agent-runtimes/opencode-local/src/cli/format-event.ts
|
|
11581
11590
|
import pc14 from "picocolors";
|
|
11582
|
-
function safeJsonParse(
|
|
11591
|
+
function safeJsonParse(text70) {
|
|
11583
11592
|
try {
|
|
11584
|
-
return JSON.parse(
|
|
11593
|
+
return JSON.parse(text70);
|
|
11585
11594
|
} catch {
|
|
11586
11595
|
return null;
|
|
11587
11596
|
}
|
|
@@ -11625,14 +11634,14 @@ function printOpenCodeStreamEvent(raw, _debug) {
|
|
|
11625
11634
|
}
|
|
11626
11635
|
if (type === "text") {
|
|
11627
11636
|
const part = asRecord4(parsed.part);
|
|
11628
|
-
const
|
|
11629
|
-
if (
|
|
11637
|
+
const text70 = asString4(part?.text).trim();
|
|
11638
|
+
if (text70) console.log(pc14.green(`assistant: ${text70}`));
|
|
11630
11639
|
return;
|
|
11631
11640
|
}
|
|
11632
11641
|
if (type === "reasoning") {
|
|
11633
11642
|
const part = asRecord4(parsed.part);
|
|
11634
|
-
const
|
|
11635
|
-
if (
|
|
11643
|
+
const text70 = asString4(part?.text).trim();
|
|
11644
|
+
if (text70) console.log(pc14.gray(`thinking: ${text70}`));
|
|
11636
11645
|
return;
|
|
11637
11646
|
}
|
|
11638
11647
|
if (type === "tool_use") {
|
|
@@ -11680,9 +11689,9 @@ function printOpenCodeStreamEvent(raw, _debug) {
|
|
|
11680
11689
|
|
|
11681
11690
|
// ../packages/agent-runtimes/pi-local/src/cli/format-event.ts
|
|
11682
11691
|
import pc15 from "picocolors";
|
|
11683
|
-
function safeJsonParse2(
|
|
11692
|
+
function safeJsonParse2(text70) {
|
|
11684
11693
|
try {
|
|
11685
|
-
return JSON.parse(
|
|
11694
|
+
return JSON.parse(text70);
|
|
11686
11695
|
} catch {
|
|
11687
11696
|
return null;
|
|
11688
11697
|
}
|
|
@@ -11724,9 +11733,9 @@ function printPiStreamEvent(raw, _debug) {
|
|
|
11724
11733
|
const message = asRecord5(parsed.message);
|
|
11725
11734
|
if (message) {
|
|
11726
11735
|
const content = message.content;
|
|
11727
|
-
const
|
|
11728
|
-
if (
|
|
11729
|
-
console.log(pc15.green(`assistant: ${
|
|
11736
|
+
const text70 = extractTextContent(content);
|
|
11737
|
+
if (text70) {
|
|
11738
|
+
console.log(pc15.green(`assistant: ${text70}`));
|
|
11730
11739
|
}
|
|
11731
11740
|
}
|
|
11732
11741
|
return;
|
|
@@ -12295,11 +12304,11 @@ var RudderApiClient = class {
|
|
|
12295
12304
|
if (response.status === 204) {
|
|
12296
12305
|
return null;
|
|
12297
12306
|
}
|
|
12298
|
-
const
|
|
12299
|
-
if (!
|
|
12307
|
+
const text70 = await response.text();
|
|
12308
|
+
if (!text70.trim()) {
|
|
12300
12309
|
return null;
|
|
12301
12310
|
}
|
|
12302
|
-
return safeParseJson(
|
|
12311
|
+
return safeParseJson(text70);
|
|
12303
12312
|
}
|
|
12304
12313
|
};
|
|
12305
12314
|
function shouldAttachRunId(method) {
|
|
@@ -12314,16 +12323,16 @@ function buildUrl(apiBase, path23) {
|
|
|
12314
12323
|
if (query) url.search = query;
|
|
12315
12324
|
return url.toString();
|
|
12316
12325
|
}
|
|
12317
|
-
function safeParseJson(
|
|
12326
|
+
function safeParseJson(text70) {
|
|
12318
12327
|
try {
|
|
12319
|
-
return JSON.parse(
|
|
12328
|
+
return JSON.parse(text70);
|
|
12320
12329
|
} catch {
|
|
12321
|
-
return
|
|
12330
|
+
return text70;
|
|
12322
12331
|
}
|
|
12323
12332
|
}
|
|
12324
12333
|
async function toApiError(response) {
|
|
12325
|
-
const
|
|
12326
|
-
const parsed = safeParseJson(
|
|
12334
|
+
const text70 = await response.text();
|
|
12335
|
+
const parsed = safeParseJson(text70);
|
|
12327
12336
|
if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) {
|
|
12328
12337
|
const body = parsed;
|
|
12329
12338
|
const message = typeof body.error === "string" && body.error.trim() || typeof body.message === "string" && body.message.trim() || `Request failed with status ${response.status}`;
|
|
@@ -14966,8 +14975,8 @@ function filterIssueRows(rows, match) {
|
|
|
14966
14975
|
if (!match?.trim()) return rows;
|
|
14967
14976
|
const needle = match.trim().toLowerCase();
|
|
14968
14977
|
return rows.filter((row) => {
|
|
14969
|
-
const
|
|
14970
|
-
return
|
|
14978
|
+
const text70 = [row.identifier, row.title, row.description].filter((part) => Boolean(part)).join("\n").toLowerCase();
|
|
14979
|
+
return text70.includes(needle);
|
|
14971
14980
|
});
|
|
14972
14981
|
}
|
|
14973
14982
|
|
|
@@ -18623,9 +18632,9 @@ import { LangfuseClient } from "@langfuse/client";
|
|
|
18623
18632
|
|
|
18624
18633
|
// ../packages/run-intelligence-core/src/trace.ts
|
|
18625
18634
|
function truncate(value, maxLength = 180) {
|
|
18626
|
-
const
|
|
18627
|
-
if (!
|
|
18628
|
-
return
|
|
18635
|
+
const text70 = value.trim();
|
|
18636
|
+
if (!text70) return "";
|
|
18637
|
+
return text70.length > maxLength ? `${text70.slice(0, maxLength - 1)}\u2026` : text70;
|
|
18629
18638
|
}
|
|
18630
18639
|
function firstMeaningfulLine(value) {
|
|
18631
18640
|
for (const line of value.split(/\r?\n/)) {
|
|
@@ -19429,9 +19438,9 @@ function extractPromptText(body) {
|
|
|
19429
19438
|
const nested = asString6(prompt.prompt) ?? asString6(prompt.text);
|
|
19430
19439
|
if (nested) return nested;
|
|
19431
19440
|
}
|
|
19432
|
-
const
|
|
19433
|
-
if (
|
|
19434
|
-
const nested = asString6(
|
|
19441
|
+
const text70 = body.text;
|
|
19442
|
+
if (text70 && typeof text70 === "object" && !Array.isArray(text70)) {
|
|
19443
|
+
const nested = asString6(text70.content) ?? asString6(text70.text);
|
|
19435
19444
|
if (nested) return nested;
|
|
19436
19445
|
}
|
|
19437
19446
|
return null;
|