@f5xc-salesdemos/xcsh 18.51.0 → 18.52.0
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/package.json +7 -7
- package/src/internal-urls/build-info.generated.ts +8 -8
- package/src/internal-urls/salesforce-context.ts +4 -1
- package/src/internal-urls/user-profile.ts +2 -0
- package/src/prompts/system/system-prompt.md +1 -1
- package/src/prompts/tools/sf-query.md +16 -0
- package/src/sdk.ts +2 -4
- package/src/system-prompt.ts +2 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5xc-salesdemos/xcsh",
|
|
4
|
-
"version": "18.
|
|
4
|
+
"version": "18.52.0",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://github.com/f5xc-salesdemos/xcsh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@agentclientprotocol/sdk": "0.16.1",
|
|
50
50
|
"@mozilla/readability": "^0.6",
|
|
51
|
-
"@f5xc-salesdemos/xcsh-stats": "18.
|
|
52
|
-
"@f5xc-salesdemos/pi-agent-core": "18.
|
|
53
|
-
"@f5xc-salesdemos/pi-ai": "18.
|
|
54
|
-
"@f5xc-salesdemos/pi-natives": "18.
|
|
55
|
-
"@f5xc-salesdemos/pi-tui": "18.
|
|
56
|
-
"@f5xc-salesdemos/pi-utils": "18.
|
|
51
|
+
"@f5xc-salesdemos/xcsh-stats": "18.52.0",
|
|
52
|
+
"@f5xc-salesdemos/pi-agent-core": "18.52.0",
|
|
53
|
+
"@f5xc-salesdemos/pi-ai": "18.52.0",
|
|
54
|
+
"@f5xc-salesdemos/pi-natives": "18.52.0",
|
|
55
|
+
"@f5xc-salesdemos/pi-tui": "18.52.0",
|
|
56
|
+
"@f5xc-salesdemos/pi-utils": "18.52.0",
|
|
57
57
|
"@sinclair/typebox": "^0.34",
|
|
58
58
|
"@xterm/headless": "^6.0",
|
|
59
59
|
"ajv": "^8.18",
|
|
@@ -17,17 +17,17 @@ export interface BuildInfo {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export const BUILD_INFO: BuildInfo = {
|
|
20
|
-
"version": "18.
|
|
21
|
-
"commit": "
|
|
22
|
-
"shortCommit": "
|
|
20
|
+
"version": "18.52.0",
|
|
21
|
+
"commit": "896d3c21a90cd0c7b02ce19558b5799c72369056",
|
|
22
|
+
"shortCommit": "896d3c2",
|
|
23
23
|
"branch": "main",
|
|
24
|
-
"tag": "v18.
|
|
25
|
-
"commitDate": "2026-05-
|
|
26
|
-
"buildDate": "2026-05-
|
|
24
|
+
"tag": "v18.52.0",
|
|
25
|
+
"commitDate": "2026-05-09T01:55:47Z",
|
|
26
|
+
"buildDate": "2026-05-09T02:23:57.907Z",
|
|
27
27
|
"dirty": false,
|
|
28
28
|
"prNumber": "",
|
|
29
29
|
"repoUrl": "https://github.com/f5xc-salesdemos/xcsh",
|
|
30
30
|
"repoSlug": "f5xc-salesdemos/xcsh",
|
|
31
|
-
"commitUrl": "https://github.com/f5xc-salesdemos/xcsh/commit/
|
|
32
|
-
"releaseUrl": "https://github.com/f5xc-salesdemos/xcsh/releases/tag/v18.
|
|
31
|
+
"commitUrl": "https://github.com/f5xc-salesdemos/xcsh/commit/896d3c21a90cd0c7b02ce19558b5799c72369056",
|
|
32
|
+
"releaseUrl": "https://github.com/f5xc-salesdemos/xcsh/releases/tag/v18.52.0"
|
|
33
33
|
};
|
|
@@ -129,6 +129,8 @@ export interface SalesforceHint {
|
|
|
129
129
|
orgAlias?: string;
|
|
130
130
|
/** Partner Salesforce UserId for AE-owned deal queries */
|
|
131
131
|
partnerId?: string;
|
|
132
|
+
/** Quarterly quota target for coverage ratio, from user profile */
|
|
133
|
+
quota?: number;
|
|
132
134
|
}
|
|
133
135
|
|
|
134
136
|
// ---------------------------------------------------------------------------
|
|
@@ -511,7 +513,7 @@ function formatTerritoryDisplay(territories: string[] | undefined, budget: numbe
|
|
|
511
513
|
|
|
512
514
|
export function buildSalesforceHint(
|
|
513
515
|
ctx: SalesforceContext | null,
|
|
514
|
-
profile?: { partner?: UserProfile["partner"]; territories?: string[] },
|
|
516
|
+
profile?: { partner?: UserProfile["partner"]; territories?: string[]; quota?: number },
|
|
515
517
|
): SalesforceHint | undefined {
|
|
516
518
|
if (!ctx?.pipelineSummary) return undefined;
|
|
517
519
|
const total = ctx.pipelineSummary.total;
|
|
@@ -562,6 +564,7 @@ export function buildSalesforceHint(
|
|
|
562
564
|
partnerRole,
|
|
563
565
|
orgAlias: ctx.orgAlias,
|
|
564
566
|
partnerId: partner?.id,
|
|
567
|
+
quota: profile?.quota,
|
|
565
568
|
};
|
|
566
569
|
}
|
|
567
570
|
|
|
@@ -62,6 +62,8 @@ export interface UserProfile {
|
|
|
62
62
|
};
|
|
63
63
|
/** User-authored: primary territory names. Exact Salesforce field values. Scopes pipeline reports. */
|
|
64
64
|
territories?: string[];
|
|
65
|
+
/** User-authored: quarterly quota target in dollars. Used for coverage ratio calculations. */
|
|
66
|
+
quota?: number;
|
|
65
67
|
observations?: UserProfileObservation[];
|
|
66
68
|
sources?: { salesforce?: string; github?: string; system?: string; conversation?: string };
|
|
67
69
|
updatedAt?: string;
|
|
@@ -162,7 +162,7 @@ Available F5 XC documentation topics: {{knowledgeTopics}}.
|
|
|
162
162
|
{{#if salesforceHint}}
|
|
163
163
|
`xcsh://salesforce`{{#if salesforceHint.orgAlias}} ({{salesforceHint.orgAlias}}){{/if}}. {{salesforceHint.pipelineTotal}}{{#if salesforceHint.territories}} ({{salesforceHint.territories}}){{/if}}.{{#if salesforceHint.partnerName}} {{salesforceHint.partnerRole}}: {{salesforceHint.partnerName}}.{{/if}}{{#if salesforceHint.forecastBreakdown}} {{salesforceHint.forecastBreakdown}}.{{/if}}
|
|
164
164
|
|
|
165
|
-
Pipeline queries: current fiscal quarter, team-member scoped, Commit/BestCase first. Do NOT dump all-time open pipeline.{{#if salesforceHint.orgAlias}} Always use target_org: {{salesforceHint.orgAlias}}.{{/if}}{{#if salesforceHint.partnerId}} AE UserId: {{salesforceHint.partnerId}}.{{/if}}
|
|
165
|
+
Pipeline queries: current fiscal quarter, team-member scoped, Commit/BestCase first. Do NOT dump all-time open pipeline.{{#if salesforceHint.orgAlias}} Always use target_org: {{salesforceHint.orgAlias}}.{{/if}}{{#if salesforceHint.partnerId}} AE UserId: {{salesforceHint.partnerId}}.{{/if}}{{#if salesforceHint.quota}} Quarterly quota: ${{salesforceHint.quota}}. Coverage = pipeline/quota, healthy is 3x-5x.{{/if}}
|
|
166
166
|
{{/if}}
|
|
167
167
|
|
|
168
168
|
{{#if contextFiles.length}}
|
|
@@ -38,6 +38,18 @@ Lost/abandoned deals this year:
|
|
|
38
38
|
Last quarter booked (closed-won):
|
|
39
39
|
SELECT Account.Name, Name, Amount, CloseDate FROM Opportunity WHERE Id IN (SELECT OpportunityId FROM OpportunityTeamMember WHERE UserId = '{userId}') AND IsWon = true AND CloseDate = LAST_FISCAL_QUARTER ORDER BY Amount DESC LIMIT 20
|
|
40
40
|
|
|
41
|
+
Pipeline generation this quarter ("what's my pipeline generation", "what deals were created this quarter"):
|
|
42
|
+
SELECT Account.Name, Name, Amount, StageName, ForecastCategoryName, CreatedDate, CloseDate FROM Opportunity WHERE Id IN (SELECT OpportunityId FROM OpportunityTeamMember WHERE UserId = '{userId}') AND CreatedDate = THIS_FISCAL_QUARTER ORDER BY Amount DESC NULLS LAST LIMIT 20
|
|
43
|
+
|
|
44
|
+
Win rate ("what's my win rate"):
|
|
45
|
+
SELECT IsWon, COUNT(Id) DealCount, SUM(Amount) TotalAmount FROM Opportunity WHERE Id IN (SELECT OpportunityId FROM OpportunityTeamMember WHERE UserId = '{userId}') AND IsClosed = true AND CloseDate = THIS_FISCAL_YEAR GROUP BY IsWon
|
|
46
|
+
|
|
47
|
+
Year-to-date bookings / top wins ("what are my top wins this year", "year-to-date bookings"):
|
|
48
|
+
SELECT Account.Name, Name, Amount, CloseDate FROM Opportunity WHERE Id IN (SELECT OpportunityId FROM OpportunityTeamMember WHERE UserId = '{userId}') AND IsWon = true AND CloseDate = THIS_FISCAL_YEAR ORDER BY Amount DESC LIMIT 20
|
|
49
|
+
|
|
50
|
+
Pipeline by territory ("break down pipeline by territory", "territory performance summary"):
|
|
51
|
+
SELECT ETM_Core_Territory__c, COUNT(Id) DealCount, SUM(Amount) TotalAmount FROM Opportunity WHERE Id IN (SELECT OpportunityId FROM OpportunityTeamMember WHERE UserId = '{userId}') AND IsClosed = false AND ForecastCategoryName <> 'Omitted' GROUP BY ETM_Core_Territory__c ORDER BY SUM(Amount) DESC NULLS LAST
|
|
52
|
+
|
|
41
53
|
Open cases:
|
|
42
54
|
SELECT CaseNumber, Subject, Status, Priority, Account.Name, CreatedDate FROM Case WHERE IsClosed = false ORDER BY Priority, CreatedDate DESC LIMIT 50
|
|
43
55
|
|
|
@@ -65,6 +77,10 @@ AE-owned deals: SFDC does not allow OR with semi-join subselects. Run a SEPARATE
|
|
|
65
77
|
|
|
66
78
|
Stage-based filtering: Add WHERE StageName clauses to any template when the user asks about deals needing technical engagement, demos, POCs, or specific stages. Early stages: 'Awareness', 'Research and Internal Education', 'Pending Initial Meeting'. Active stages: 'Budget and Timing Determination', 'Solution - Front Runner'. Late stages: 'Negotiation', 'Close - Booked'. Deals in early stages with close dates within 60 days are at-risk (insufficient time to progress).
|
|
67
79
|
|
|
80
|
+
Territory-based filtering: Add WHERE clauses on territory fields when the user asks about specific territories, regions, or countries. Available fields: `ETM_Core_Territory__c` (exact territory, e.g. 'AMER: Major Accounts FinSvcs Red 9'), `Territory_Credited_Category__c` (category, e.g. 'Financial', 'OEM'), `Territory_Grouping__c` (region, e.g. 'USA', 'Canada'). Use LIKE '%keyword%' for partial matches (e.g. `ETM_Core_Territory__c LIKE '%Canada%'`). Always combine territory filters with `ForecastCategoryName <> 'Omitted'` or quarter scoping to avoid zombie pipeline noise.
|
|
81
|
+
|
|
82
|
+
Coverage ratio: When the user asks about pipeline coverage or "do I have enough pipeline", calculate coverage = in-quarter pipeline total / quarterly quota target. Healthy coverage is 3x-5x quota. Below 2x is a risk. Use the forecast breakdown (T2) total as the numerator. Quota is available from the user profile when set.
|
|
83
|
+
|
|
68
84
|
Results with relationship fields (e.g., Account.Name) are automatically flattened into dot-notation columns.
|
|
69
85
|
If the query returns more than 10,000 records, suggest using sf data export bulk instead.
|
|
70
86
|
Set use_tooling_api to true when querying metadata objects (ApexTrigger, ApexClass, CustomField).
|
package/src/sdk.ts
CHANGED
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
SkillProtocolHandler,
|
|
74
74
|
} from "./internal-urls";
|
|
75
75
|
import { buildComputerHint, loadComputerProfile } from "./internal-urls/computer-profile";
|
|
76
|
-
import { buildSalesforceHint, loadSalesforceContext } from "./internal-urls/salesforce-context";
|
|
76
|
+
import { buildSalesforceHint, loadSalesforceContext, type SalesforceHint } from "./internal-urls/salesforce-context";
|
|
77
77
|
import { loadProfile, type UserProfile } from "./internal-urls/user-profile";
|
|
78
78
|
import { disposeAllKernelSessions, disposeKernelSessionsByOwner } from "./ipy/executor";
|
|
79
79
|
import { LSP_STARTUP_EVENT_CHANNEL, type LspStartupEvent } from "./lsp/startup-events";
|
|
@@ -1495,9 +1495,7 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|
|
1495
1495
|
}
|
|
1496
1496
|
|
|
1497
1497
|
// Load compact Salesforce pipeline hint — profile provides partner/territory context
|
|
1498
|
-
let salesforceHint:
|
|
1499
|
-
| { pipelineTotal: string; dealCount: number; accountCount: number; territories?: string }
|
|
1500
|
-
| undefined;
|
|
1498
|
+
let salesforceHint: SalesforceHint | undefined;
|
|
1501
1499
|
try {
|
|
1502
1500
|
const _sfContext = await loadSalesforceContext();
|
|
1503
1501
|
salesforceHint = buildSalesforceHint(_sfContext, _profile) ?? undefined;
|
package/src/system-prompt.ts
CHANGED
|
@@ -494,6 +494,8 @@ export interface BuildSystemPromptOptions {
|
|
|
494
494
|
orgAlias?: string;
|
|
495
495
|
/** Partner Salesforce UserId for AE-owned deal queries */
|
|
496
496
|
partnerId?: string;
|
|
497
|
+
/** Quarterly quota target for coverage ratio */
|
|
498
|
+
quota?: number;
|
|
497
499
|
};
|
|
498
500
|
knowledgeTopics?: string;
|
|
499
501
|
contextSkillDirs?: string[];
|