@skrr-ai/cli 0.1.84 → 0.1.86
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/commands/agents/chat.js +10 -3
- package/dist/commands/agents/endpoint/enable.js +6 -0
- package/dist/commands/store/acquisitions/approve.js +3 -0
- package/dist/lib/agent-endpoints.d.ts +19 -5
- package/dist/lib/agent-endpoints.js +11 -0
- package/dist/lib/agentic-stream.d.ts +84 -17
- package/dist/lib/agentic-stream.js +207 -36
- package/dist/lib/store-acquisition.js +11 -3
- package/dist/lib/workspaces.js +11 -13
- package/dist/node_modules/@skrr-ai/data-provider/index.js +5139 -5029
- package/oclif.manifest.json +11786 -11786
- package/package.json +5 -2
|
@@ -3,6 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.describeAcquisitionRequestLines = describeAcquisitionRequestLines;
|
|
4
4
|
exports.describeAcquisitionRequestRow = describeAcquisitionRequestRow;
|
|
5
5
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
6
|
+
function describeBuyerTerms(request) {
|
|
7
|
+
if (request.buyerTerms) {
|
|
8
|
+
return `${request.buyerTerms.termsVersion} — ${request.buyerTerms.artifactUri}`;
|
|
9
|
+
}
|
|
10
|
+
if (request.invalidReason === 'buyer_terms_missing') {
|
|
11
|
+
// Stored before OSK-13520 refused to open a request without terms.
|
|
12
|
+
return 'missing — this request was recorded without buyer terms, so it can only be declined';
|
|
13
|
+
}
|
|
14
|
+
return 'not configured, so this purchase cannot be approved';
|
|
15
|
+
}
|
|
6
16
|
/**
|
|
7
17
|
* A purchase an agent asked to make, as the lines a terminal shows (OSK-12240).
|
|
8
18
|
*
|
|
@@ -22,9 +32,7 @@ function describeAcquisitionRequestLines(request) {
|
|
|
22
32
|
` Status: ${status.label}${status.detail ? ` — ${status.detail}` : ''}`,
|
|
23
33
|
` Price: ${(0, data_provider_1.formatStoreAcquisitionPrice)(request.price)} ${request.currency}`,
|
|
24
34
|
` Refunds: ${(0, data_provider_1.describeStoreAcquisitionRefundTerms)(request.refundTerms)}`,
|
|
25
|
-
` Buyer terms: ${request
|
|
26
|
-
? `${request.buyerTerms.termsVersion} — ${request.buyerTerms.artifactUri}`
|
|
27
|
-
: 'not configured, so this purchase cannot be approved'}`,
|
|
35
|
+
` Buyer terms: ${describeBuyerTerms(request)}`,
|
|
28
36
|
` Offer: ${request.offerVersionId}`,
|
|
29
37
|
` Capabilities: ${(0, data_provider_1.describeStoreAcquisitionCapabilities)(request.capabilities, request.capabilityCount)}`,
|
|
30
38
|
];
|
package/dist/lib/workspaces.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.listWorkspaceAgentAudit = listWorkspaceAgentAudit;
|
|
|
9
9
|
exports.getWorkspace = getWorkspace;
|
|
10
10
|
exports.matchWorkspace = matchWorkspace;
|
|
11
11
|
const api_fetch_1 = require("./api-fetch");
|
|
12
|
+
const triggers_1 = require("./triggers");
|
|
12
13
|
/**
|
|
13
14
|
* The server's workspace document can include presentation metadata such as an
|
|
14
15
|
* avatar source. This CLI surface is a selector, not a workspace export: keep
|
|
@@ -128,19 +129,16 @@ async function listWorkspaceListing() {
|
|
|
128
129
|
* second list kept here.
|
|
129
130
|
*/
|
|
130
131
|
async function listWorkspaceAgentAudit(workspaceId, query = {}) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
params.set('cursor', query.cursor);
|
|
142
|
-
const qs = params.toString();
|
|
143
|
-
return (0, api_fetch_1.apiFetch)(`/api/workspaces/${encodeURIComponent(workspaceId)}/audit/agent-lifecycle${qs ? `?${qs}` : ''}`);
|
|
132
|
+
// The query rides in `withQuery`, outside the path literal, so the CLI parity
|
|
133
|
+
// check can read the route this calls (a `?` suffix nested inside the literal
|
|
134
|
+
// truncates what it sees).
|
|
135
|
+
return (0, api_fetch_1.apiFetch)((0, triggers_1.withQuery)(`/api/workspaces/${encodeURIComponent(workspaceId)}/audit/agent-lifecycle`, {
|
|
136
|
+
kind: query.kinds?.length ? query.kinds.join(',') : undefined,
|
|
137
|
+
since: query.since || undefined,
|
|
138
|
+
until: query.until || undefined,
|
|
139
|
+
limit: query.limit || undefined,
|
|
140
|
+
cursor: query.cursor || undefined,
|
|
141
|
+
}));
|
|
144
142
|
}
|
|
145
143
|
async function getWorkspace(workspaceId) {
|
|
146
144
|
return (0, api_fetch_1.apiFetch)(`/api/workspaces/${encodeURIComponent(workspaceId)}`);
|