@trydreamstate/cli 1.3.6 → 1.3.8
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/agent-plugin/.claude-plugin/plugin.json +1 -1
- package/agent-plugin/.codex-plugin/plugin.json +1 -1
- package/agent-plugin/skills/crm/SKILL.md +2 -2
- package/agent-plugin/skills/diagnostics/SKILL.md +1 -1
- package/agent-plugin/skills/dreamstate/SKILL.md +4 -4
- package/agent-plugin/skills/facebook-posts/SKILL.md +46 -0
- package/agent-plugin/skills/first-win/SKILL.md +6 -6
- package/agent-plugin/skills/inbox-replies/SKILL.md +1 -1
- package/agent-plugin/skills/instagram-posts/SKILL.md +56 -0
- package/agent-plugin/skills/knowledge/SKILL.md +1 -1
- package/agent-plugin/skills/linkedin-posts/SKILL.md +1 -1
- package/agent-plugin/skills/linkedin-warm-signals/SKILL.md +1 -1
- package/agent-plugin/skills/list-building/SKILL.md +5 -2
- package/agent-plugin/skills/list-building/column-authoring.md +4 -0
- package/agent-plugin/skills/list-building/incoming-people.md +32 -0
- package/agent-plugin/skills/list-building/sourcing.md +8 -1
- package/agent-plugin/skills/outreach/SKILL.md +2 -1
- package/agent-plugin/skills/outreach/channels.md +3 -1
- package/agent-plugin/skills/outreach/enrollment.md +2 -0
- package/agent-plugin/skills/outreach/replies.md +2 -0
- package/agent-plugin/skills/outreach/steps-and-timing.md +5 -1
- package/agent-plugin/skills/plays/SKILL.md +1 -1
- package/agent-plugin/skills/reddit-posts/SKILL.md +1 -1
- package/agent-plugin/skills/skill-authoring/SKILL.md +6 -6
- package/agent-plugin/skills/social/SKILL.md +5 -1
- package/agent-plugin/skills/tiktok-posts/SKILL.md +51 -0
- package/agent-plugin/skills/visibility/SKILL.md +5 -1
- package/agent-plugin/skills/workflows/SKILL.md +3 -1
- package/agent-plugin/skills/workflows/lifecycle-and-enrollment.md +2 -0
- package/agent-plugin/skills/worksheet-tidy/SKILL.md +2 -2
- package/agent-plugin/skills/writing/SKILL.md +1 -1
- package/agent-plugin/skills/writing/publishing.md +1 -1
- package/agent-plugin/skills/writing/revision-and-voice.md +1 -1
- package/agent-plugin/skills/x-posts/SKILL.md +1 -1
- package/agent-plugin/skills/youtube-posts/SKILL.md +49 -0
- package/dist/agentGuidance.generated.json +4 -4
- package/dist/client.d.ts +6 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +35 -11
- package/dist/commandTable.d.ts +2 -2
- package/dist/commandTable.d.ts.map +1 -1
- package/dist/commandTable.js +5 -2
- package/dist/commands/genericPack.d.ts +13 -0
- package/dist/commands/genericPack.d.ts.map +1 -0
- package/dist/commands/genericPack.js +31 -0
- package/dist/commands/knowledge.d.ts +2 -0
- package/dist/commands/knowledge.d.ts.map +1 -0
- package/dist/commands/knowledge.js +6 -0
- package/dist/commands/shared.d.ts +3 -1
- package/dist/commands/shared.d.ts.map +1 -1
- package/dist/commands/shared.js +14 -5
- package/dist/commands/tables.d.ts +2 -0
- package/dist/commands/tables.d.ts.map +1 -0
- package/dist/commands/tables.js +6 -0
- package/dist/commands/unibox.d.ts +2 -0
- package/dist/commands/unibox.d.ts.map +1 -0
- package/dist/commands/unibox.js +6 -0
- package/dist/gatedRun.d.ts.map +1 -1
- package/dist/gatedRun.js +145 -54
- package/dist/generated/packVerbs.generated.json +332 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -3
- package/dist/money.d.ts +2 -1
- package/dist/money.d.ts.map +1 -1
- package/dist/money.js +22 -5
- package/dist/runWait.d.ts +1 -1
- package/dist/runWait.d.ts.map +1 -1
- package/dist/runWait.js +37 -5
- package/dist/tablesImport.d.ts.map +1 -1
- package/dist/tablesImport.js +15 -1
- package/dist/turnCache.d.ts +5 -1
- package/dist/turnCache.d.ts.map +1 -1
- package/dist/turnCache.js +5 -3
- package/package.json +3 -2
package/dist/tablesImport.js
CHANGED
|
@@ -46,6 +46,20 @@ const IDENTITY_PREFERENCE = {
|
|
|
46
46
|
function record(value) {
|
|
47
47
|
return value && typeof value === 'object' && !Array.isArray(value) ? value : null;
|
|
48
48
|
}
|
|
49
|
+
function durableRunSteps(run) {
|
|
50
|
+
const partialResults = record(run.partial_results);
|
|
51
|
+
const attachOutputs = (step) => {
|
|
52
|
+
const entry = record(step) ?? {};
|
|
53
|
+
const stepId = entry.step_id;
|
|
54
|
+
return entry.outputs === undefined && typeof stepId === 'string' && partialResults && stepId in partialResults
|
|
55
|
+
? { ...entry, outputs: partialResults[stepId] }
|
|
56
|
+
: entry;
|
|
57
|
+
};
|
|
58
|
+
return [
|
|
59
|
+
...(Array.isArray(run.completed) ? run.completed.map(attachOutputs) : []),
|
|
60
|
+
...(Array.isArray(run.incomplete) ? run.incomplete.map(attachOutputs) : []),
|
|
61
|
+
];
|
|
62
|
+
}
|
|
49
63
|
const FAILED_STATUSES = new Set(['failed', 'cancelled', 'canceled', 'timed_out', 'rejected']);
|
|
50
64
|
/**
|
|
51
65
|
* The outputs of a capability run, whichever envelope nesting the door used. A
|
|
@@ -56,7 +70,7 @@ function capabilityOutputs(result) {
|
|
|
56
70
|
const data = record(record(result)?.data);
|
|
57
71
|
const run = record(data?.run);
|
|
58
72
|
if (run) {
|
|
59
|
-
const steps = Array.isArray(run.steps) ? run.steps :
|
|
73
|
+
const steps = Array.isArray(run.steps) ? run.steps : durableRunSteps(run);
|
|
60
74
|
const stepError = steps.map((step) => record(record(step)?.user_error)).find(Boolean) ?? record(run.user_error);
|
|
61
75
|
if (typeof run.status === 'string' && FAILED_STATUSES.has(run.status)) {
|
|
62
76
|
throw new client_1.CliError(typeof stepError?.message === 'string' ? stepError.message : `The run ${run.status}.`, typeof stepError?.code === 'string' ? stepError.code : 'run_failed', 0, { details: stepError ? { user_error: stepError } : undefined, retryable: false });
|
package/dist/turnCache.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export declare const TURN_REUSE_MS: number;
|
|
2
|
-
/** The quote a
|
|
2
|
+
/** The quote a supported rehearsal returned, and the exact input it priced. maximum_credits is absent on entries written before the field existed: treat that as unknown, not free. rows and credits are the printed price; absent means not stated. */
|
|
3
3
|
export type CachedQuote = {
|
|
4
4
|
quote_hash: string;
|
|
5
5
|
fingerprint: string;
|
|
6
6
|
maximum_credits?: number | null;
|
|
7
|
+
rows?: number | null;
|
|
8
|
+
credits?: string | null;
|
|
7
9
|
};
|
|
8
10
|
type CacheWarning = (error: NodeJS.ErrnoException) => void;
|
|
9
11
|
export declare function turnCachePath(credentialsPath: string): string;
|
|
@@ -16,6 +18,8 @@ export declare function reusableTurn(path: string, baseUrl: string, apiKey: stri
|
|
|
16
18
|
token: string;
|
|
17
19
|
quote_hash: string | null;
|
|
18
20
|
maximum_credits: number | null;
|
|
21
|
+
rows?: number | null;
|
|
22
|
+
credits?: string | null;
|
|
19
23
|
} | null>;
|
|
20
24
|
export declare function rememberTurnToken(path: string, baseUrl: string, apiKey: string, capabilityId: string, token: string, now?: number, onWarning?: CacheWarning, quote?: CachedQuote): Promise<void>;
|
|
21
25
|
export declare function forgetTurnToken(path: string, baseUrl: string, apiKey: string, capabilityId: string, onWarning?: CacheWarning): Promise<void>;
|
package/dist/turnCache.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turnCache.d.ts","sourceRoot":"","sources":["../src/turnCache.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,aAAa,QAAa,CAAC;AAExC,
|
|
1
|
+
{"version":3,"file":"turnCache.d.ts","sourceRoot":"","sources":["../src/turnCache.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,aAAa,QAAa,CAAC;AAExC,wPAAwP;AACxP,MAAM,MAAM,WAAW,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,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Y,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,YAAY,GAC5F,OAAO,CAAC,IAAI,CAAC,CAMf"}
|
package/dist/turnCache.js
CHANGED
|
@@ -9,12 +9,12 @@ exports.forgetTurnToken = forgetTurnToken;
|
|
|
9
9
|
const node_crypto_1 = require("node:crypto");
|
|
10
10
|
const promises_1 = require("node:fs/promises");
|
|
11
11
|
const node_path_1 = require("node:path");
|
|
12
|
-
// A
|
|
13
|
-
// input, and the quote is bound to the
|
|
12
|
+
// A quote-bound capability's live call needs the quote_hash of a supported rehearsal of
|
|
13
|
+
// the same input, and the quote is bound to the rehearsal's tool_turn_token: only a live
|
|
14
14
|
// call carrying the SAME token and that quote_hash can spend. Each CLI
|
|
15
15
|
// invocation is a new process, so fetching a fresh token per run made every paid
|
|
16
16
|
// capability unrunnable from the CLI (2026-09-23: tables.table_sources.run
|
|
17
|
-
// refused four times in a row). The cache therefore keeps the
|
|
17
|
+
// refused four times in a row). The cache therefore keeps the rehearsal's turn
|
|
18
18
|
// token together with its quote_hash and a fingerprint of the exact input that
|
|
19
19
|
// was priced, so a later `--live` of the same input can echo it and a changed
|
|
20
20
|
// input never inherits a price it was not shown.
|
|
@@ -68,6 +68,8 @@ async function reusableTurn(path, baseUrl, apiKey, capabilityId, fingerprint, no
|
|
|
68
68
|
token: entry.token,
|
|
69
69
|
quote_hash: quote ? quote.quote_hash : null,
|
|
70
70
|
maximum_credits: quote && typeof quote.maximum_credits === 'number' ? quote.maximum_credits : null,
|
|
71
|
+
...(quote && quote.rows !== undefined ? { rows: quote.rows } : {}),
|
|
72
|
+
...(quote && quote.credits !== undefined ? { credits: quote.credits } : {}),
|
|
71
73
|
};
|
|
72
74
|
}
|
|
73
75
|
async function rememberTurnToken(path, baseUrl, apiKey, capabilityId, token, now = Date.now(), onWarning, quote) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trydreamstate/cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.8",
|
|
4
4
|
"description": "Live command-line client for the Dreamstate v1 API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"README.md"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "node scripts/generate-pack-verbs.mjs --check && node scripts/generate-run-contract.mjs --check && node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" &&
|
|
22
|
+
"build": "node scripts/generate-pack-verbs.mjs --check && node scripts/generate-run-contract.mjs --check && node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && node scripts/build-agent-plugin.mjs && tsc",
|
|
23
|
+
"pretest": "npm run build --workspace=@dreamstate/types",
|
|
23
24
|
"test": "node scripts/build-agent-plugin.mjs --check && npm run build && jest --config jest.config.cjs --runInBand",
|
|
24
25
|
"type-check": "tsc --noEmit",
|
|
25
26
|
"pack:check": "npm pack --dry-run",
|