@trydreamstate/cli 1.3.11 → 1.3.13
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/agent-plugin/.claude-plugin/plugin.json +1 -1
- package/agent-plugin/.codex-plugin/plugin.json +1 -1
- package/agent-plugin/skills/crm/SKILL.md +3 -1
- package/agent-plugin/skills/diagnostics/SKILL.md +11 -3
- package/agent-plugin/skills/dreamstate/SKILL.md +1 -1
- package/agent-plugin/skills/engage/SKILL.md +80 -0
- package/agent-plugin/skills/facebook-posts/SKILL.md +1 -1
- package/agent-plugin/skills/first-win/SKILL.md +1 -1
- package/agent-plugin/skills/inbox-replies/SKILL.md +2 -1
- package/agent-plugin/skills/instagram-posts/SKILL.md +1 -1
- 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 +4 -2
- package/agent-plugin/skills/list-building/SKILL.md +28 -2
- package/agent-plugin/skills/list-building/column-authoring.md +1 -1
- package/agent-plugin/skills/list-building/incoming-people.md +1 -1
- package/agent-plugin/skills/list-building/x-identity-research.md +37 -0
- package/agent-plugin/skills/outreach/SKILL.md +3 -3
- package/agent-plugin/skills/outreach/enrollment.md +8 -4
- package/agent-plugin/skills/outreach/message-copy.md +5 -3
- 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 +1 -1
- package/agent-plugin/skills/social/SKILL.md +8 -4
- package/agent-plugin/skills/tiktok-posts/SKILL.md +1 -1
- package/agent-plugin/skills/visibility/SKILL.md +1 -1
- package/agent-plugin/skills/workflows/SKILL.md +3 -1
- package/agent-plugin/skills/worksheet-tidy/SKILL.md +1 -1
- package/agent-plugin/skills/writing/SKILL.md +1 -1
- package/agent-plugin/skills/x-posts/SKILL.md +2 -1
- package/agent-plugin/skills/youtube-posts/SKILL.md +1 -1
- package/dist/agentGuidance.generated.json +2 -2
- package/dist/client.d.ts +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -2
- package/dist/gatedRun.d.ts +0 -1
- package/dist/gatedRun.d.ts.map +1 -1
- package/dist/gatedRun.js +2 -2
- package/dist/generated/packVerbs.generated.json +65 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -7
- package/dist/installedSkillLinks.d.ts +4 -0
- package/dist/installedSkillLinks.d.ts.map +1 -0
- package/dist/installedSkillLinks.js +40 -0
- package/dist/runWait.d.ts +1 -1
- package/dist/runWait.d.ts.map +1 -1
- package/dist/runWait.js +18 -11
- package/dist/skillInstaller.d.ts +1 -1
- package/dist/skillInstaller.d.ts.map +1 -1
- package/dist/skillInstaller.js +7 -39
- package/package.json +5 -3
package/dist/skillInstaller.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export declare function skillIndexVersion(skills: readonly HostedSkill[]): strin
|
|
|
42
42
|
export declare function renderSkillMarkdown(skill: HostedSkill, provenance: {
|
|
43
43
|
workspaceId: string;
|
|
44
44
|
indexVersion: string;
|
|
45
|
-
}): string;
|
|
45
|
+
}, body?: string): string;
|
|
46
46
|
export declare function installSkills(skills: readonly HostedSkill[], options: SkillInstallOptions): Promise<{
|
|
47
47
|
files: string[];
|
|
48
48
|
lockSkills: Record<string, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skillInstaller.d.ts","sourceRoot":"","sources":["../src/skillInstaller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"skillInstaller.d.ts","sourceRoot":"","sources":["../src/skillInstaller.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,oBAAoB,+EAAgF,CAAC;AAClH,MAAM,MAAM,iBAAiB,GAAG,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAEpE,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,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EAAE,CAAC;IAClB,8DAA8D;IAC9D,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,0EAA0E;IAC1E,KAAK,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrE,OAAO,EAAE,OAAO,CAAC;IACjB,sDAAsD;IACtD,eAAe,EAAE,MAAM,CAAC;CACzB;AAID;;;;GAIG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,SAAS,WAAW,EAAE,EAC5B,aAAa,SAAY,EACzB,OAAO,UAAQ,EACf,GAAG,SAAgB,GAClB,OAAO,CAAC,UAAU,CAAC,CA6BrB"}
|
package/dist/skillInstaller.js
CHANGED
|
@@ -1,37 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
4
|
};
|
|
@@ -53,6 +20,7 @@ const node_crypto_1 = require("node:crypto");
|
|
|
53
20
|
const node_os_1 = require("node:os");
|
|
54
21
|
const node_path_1 = require("node:path");
|
|
55
22
|
const agentGuidance_generated_json_1 = __importDefault(require("./agentGuidance.generated.json"));
|
|
23
|
+
const installedSkillLinks_1 = require("./installedSkillLinks");
|
|
56
24
|
const errors_1 = require("./errors");
|
|
57
25
|
const idempotency_1 = require("./idempotency");
|
|
58
26
|
exports.SKILL_INSTALL_AGENTS = ['codex', 'claude-code', 'cursor', 'opencode', 'hermes', 'openclaw'];
|
|
@@ -153,7 +121,7 @@ function packs(frontmatter) {
|
|
|
153
121
|
const value = frontmatter.packs;
|
|
154
122
|
return Array.isArray(value) ? value : typeof value === 'string' ? value.split(',').map((item) => item.trim()).filter(Boolean) : [];
|
|
155
123
|
}
|
|
156
|
-
function renderSkillMarkdown(skill, provenance) {
|
|
124
|
+
function renderSkillMarkdown(skill, provenance, body = skill.body) {
|
|
157
125
|
const name = skillName(skill.id);
|
|
158
126
|
const { name: _name, description: _description, 'allowed-tools': _tools, ...source } = skill.frontmatter ?? {};
|
|
159
127
|
// name and description lead, as agent hosts read them first.
|
|
@@ -166,7 +134,7 @@ function renderSkillMarkdown(skill, provenance) {
|
|
|
166
134
|
const lines = Object.entries(frontmatter).flatMap(([key, value]) => Array.isArray(value)
|
|
167
135
|
? [`${key}: [${value.map(yamlValue).join(', ')}]`]
|
|
168
136
|
: [`${key}: ${yamlValue(value)}`]);
|
|
169
|
-
return `---\n${lines.join('\n')}\n---\n\n${commandGuide(packs(frontmatter))}\n\n${
|
|
137
|
+
return `---\n${lines.join('\n')}\n---\n\n${commandGuide(packs(frontmatter))}\n\n${body.trim()}\n\n<!-- dreamstate provenance: workspace=${provenance.workspaceId} issued=${new Date().toISOString()} skills=${provenance.indexVersion} content=${skillContentHash(skill)} -->\n`;
|
|
170
138
|
}
|
|
171
139
|
/**
|
|
172
140
|
* A supporting page's path under its skill directory, or null when it is not a plain
|
|
@@ -187,7 +155,7 @@ function hash(value) { return (0, node_crypto_1.createHash)('sha256').update(val
|
|
|
187
155
|
async function writeHostedSkill(root, skill, provenance) {
|
|
188
156
|
const name = skillName(skill.id);
|
|
189
157
|
const directory = (0, node_path_1.join)(root, name);
|
|
190
|
-
const markdown = renderSkillMarkdown(skill, provenance);
|
|
158
|
+
const markdown = renderSkillMarkdown(skill, provenance, await (0, installedSkillLinks_1.installedSkillLinks)(skill.body, skill.id, 'SKILL.md', skillName));
|
|
191
159
|
// A page removed upstream must not linger: clear a directory this CLI wrote before rewriting it.
|
|
192
160
|
if ((await (0, promises_1.readFile)((0, node_path_1.join)(directory, 'SKILL.md'), 'utf8').catch(() => '')).includes(PROVENANCE_MARKER)) {
|
|
193
161
|
await (0, promises_1.rm)(directory, { recursive: true, force: true });
|
|
@@ -200,7 +168,7 @@ async function writeHostedSkill(root, skill, provenance) {
|
|
|
200
168
|
if (!target)
|
|
201
169
|
continue;
|
|
202
170
|
await (0, promises_1.mkdir)((0, node_path_1.dirname)(target), { recursive: true, mode: 0o700 });
|
|
203
|
-
await (0, promises_1.writeFile)(target, document.content, { encoding: 'utf8', mode: 0o600 });
|
|
171
|
+
await (0, promises_1.writeFile)(target, await (0, installedSkillLinks_1.installedSkillLinks)(document.content, skill.id, document.name, skillName), { encoding: 'utf8', mode: 0o600 });
|
|
204
172
|
}
|
|
205
173
|
return { file, name, computedHash: hash(markdown) };
|
|
206
174
|
}
|
|
@@ -269,11 +237,11 @@ async function inspectSkillInstallers(agents, homeDirectory = (0, node_os_1.home
|
|
|
269
237
|
const symlinks = [];
|
|
270
238
|
if (linksIntoCanonical(agent)) {
|
|
271
239
|
try {
|
|
272
|
-
for (const name of await (await
|
|
240
|
+
for (const name of await (await import('node:fs/promises')).readdir(directory)) {
|
|
273
241
|
const path = (0, node_path_1.join)(directory, name);
|
|
274
242
|
const state = await (0, promises_1.lstat)(path);
|
|
275
243
|
if (state.isSymbolicLink()) {
|
|
276
|
-
const target = await (await
|
|
244
|
+
const target = await (await import('node:fs/promises')).readlink(path);
|
|
277
245
|
symlinks.push({ name, target, correct: (0, node_path_1.join)(directory, target) === (0, node_path_1.join)(canonical, name) });
|
|
278
246
|
}
|
|
279
247
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trydreamstate/cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.13",
|
|
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",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"scripts": {
|
|
22
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
23
|
"pretest": "npm run build --workspace=@dreamstate/types",
|
|
24
|
-
"test": "node scripts/build-agent-plugin.mjs --check && npm run build && jest --config jest.config.cjs --runInBand",
|
|
24
|
+
"test": "node scripts/build-agent-plugin.mjs --check && npm run build && node --experimental-vm-modules ../../node_modules/jest/bin/jest.js --config jest.config.cjs --runInBand",
|
|
25
25
|
"type-check": "tsc --noEmit",
|
|
26
26
|
"pack:check": "npm pack --dry-run",
|
|
27
27
|
"pack:smoke": "npm run build && node scripts/pack-smoke.mjs",
|
|
@@ -48,7 +48,9 @@
|
|
|
48
48
|
"url": "https://github.com/luisfigueroavale/influence/issues"
|
|
49
49
|
},
|
|
50
50
|
"homepage": "https://trydreamstate.com",
|
|
51
|
-
"dependencies": {
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"mdast-util-from-markdown": "^2.0.3"
|
|
53
|
+
},
|
|
52
54
|
"devDependencies": {
|
|
53
55
|
"@types/jest": "^29.5.14",
|
|
54
56
|
"@types/node": "^22.19.19",
|