@elevasis/sdk 0.5.17 → 0.5.19
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/cli.cjs +248 -190
- package/dist/index.d.ts +20 -0
- package/dist/index.js +10 -1
- package/dist/templates.js +29 -12
- package/dist/types/templates.d.ts +1 -1
- package/dist/types/worker/adapters/apify.d.ts +1 -1
- package/dist/worker/index.js +7 -7
- package/package.json +1 -1
- package/reference/framework/project-structure.mdx +2 -2
package/dist/cli.cjs
CHANGED
|
@@ -40166,6 +40166,7 @@ var DOMAIN_MAP = {
|
|
|
40166
40166
|
|
|
40167
40167
|
// ../core/src/platform/registry/reserved.ts
|
|
40168
40168
|
var RESERVED_RESOURCE_IDS = /* @__PURE__ */ new Set(["command-center-assistant"]);
|
|
40169
|
+
var SYSTEM_RESOURCE_IDS = Array.from(RESERVED_RESOURCE_IDS);
|
|
40169
40170
|
function isReservedResourceId(resourceId) {
|
|
40170
40171
|
return RESERVED_RESOURCE_IDS.has(resourceId);
|
|
40171
40172
|
}
|
|
@@ -43406,6 +43407,10 @@ var ResourceRegistry = class {
|
|
|
43406
43407
|
if (existingOrg) {
|
|
43407
43408
|
existingOrg.workflows = [...existingOrg.workflows ?? [], ...org.workflows ?? []];
|
|
43408
43409
|
existingOrg.agents = [...existingOrg.agents ?? [], ...org.agents ?? []];
|
|
43410
|
+
existingOrg.triggers = org.triggers;
|
|
43411
|
+
existingOrg.integrations = org.integrations;
|
|
43412
|
+
existingOrg.humanCheckpoints = org.humanCheckpoints;
|
|
43413
|
+
existingOrg.externalResources = org.externalResources;
|
|
43409
43414
|
if (org.relationships) {
|
|
43410
43415
|
existingOrg.relationships = {
|
|
43411
43416
|
...existingOrg.relationships ?? {},
|
|
@@ -43486,6 +43491,10 @@ var ResourceRegistry = class {
|
|
|
43486
43491
|
if (!orgResources) return;
|
|
43487
43492
|
orgResources.workflows = (orgResources.workflows ?? []).filter((w) => !remoteIds.has(w.config.resourceId));
|
|
43488
43493
|
orgResources.agents = (orgResources.agents ?? []).filter((a) => !remoteIds.has(a.config.resourceId));
|
|
43494
|
+
orgResources.triggers = void 0;
|
|
43495
|
+
orgResources.integrations = void 0;
|
|
43496
|
+
orgResources.humanCheckpoints = void 0;
|
|
43497
|
+
orgResources.externalResources = void 0;
|
|
43489
43498
|
if (orgResources.relationships) {
|
|
43490
43499
|
for (const id of remoteIds) {
|
|
43491
43500
|
delete orgResources.relationships[id];
|
|
@@ -43494,7 +43503,7 @@ var ResourceRegistry = class {
|
|
|
43494
43503
|
delete orgResources.relationships;
|
|
43495
43504
|
}
|
|
43496
43505
|
}
|
|
43497
|
-
const remaining = (orgResources.workflows?.length ?? 0) + (orgResources.agents?.length ?? 0)
|
|
43506
|
+
const remaining = (orgResources.workflows?.length ?? 0) + (orgResources.agents?.length ?? 0);
|
|
43498
43507
|
if (remaining > 0) {
|
|
43499
43508
|
this.serializedCache.set(orgName, serializeOrganization(orgResources));
|
|
43500
43509
|
} else {
|
|
@@ -43864,7 +43873,7 @@ async function apiDelete(endpoint, apiUrl = resolveApiUrl()) {
|
|
|
43864
43873
|
// package.json
|
|
43865
43874
|
var package_default = {
|
|
43866
43875
|
name: "@elevasis/sdk",
|
|
43867
|
-
version: "0.5.
|
|
43876
|
+
version: "0.5.19",
|
|
43868
43877
|
description: "SDK for building Elevasis organization resources",
|
|
43869
43878
|
type: "module",
|
|
43870
43879
|
bin: {
|
|
@@ -43930,6 +43939,7 @@ var SDK_VERSION = package_default.version;
|
|
|
43930
43939
|
|
|
43931
43940
|
// src/cli/commands/deploy.ts
|
|
43932
43941
|
var import_meta = {};
|
|
43942
|
+
var IGNORED_DOC_DIRS = /* @__PURE__ */ new Set([".archive"]);
|
|
43933
43943
|
async function scanDocumentation() {
|
|
43934
43944
|
const docsDir = (0, import_path.resolve)("docs");
|
|
43935
43945
|
const files = [];
|
|
@@ -43945,6 +43955,7 @@ async function scanDocumentation() {
|
|
|
43945
43955
|
const fullPath = (0, import_path.resolve)(dir, entry.name);
|
|
43946
43956
|
const relPath = relPrefix ? `${relPrefix}/${entry.name}` : entry.name;
|
|
43947
43957
|
if (entry.isDirectory()) {
|
|
43958
|
+
if (IGNORED_DOC_DIRS.has(entry.name)) continue;
|
|
43948
43959
|
await scan(fullPath, relPath);
|
|
43949
43960
|
} else if (entry.isFile() && entry.name.endsWith(".mdx")) {
|
|
43950
43961
|
const raw = await (0, import_promises.readFile)(fullPath, "utf-8");
|
|
@@ -44140,6 +44151,7 @@ async function generateProjectMap(org) {
|
|
|
44140
44151
|
for (const entry of entries) {
|
|
44141
44152
|
const relPath = relPrefix ? `${relPrefix}/${entry.name}` : entry.name;
|
|
44142
44153
|
if (entry.isDirectory()) {
|
|
44154
|
+
if (IGNORED_DOC_DIRS.has(entry.name)) continue;
|
|
44143
44155
|
await scanDocsDir((0, import_path.resolve)(dir, entry.name), relPath);
|
|
44144
44156
|
} else if (entry.isFile() && entry.name.endsWith(".mdx") && relPath !== "project-map.mdx" && relPath !== "resource-map.mdx") {
|
|
44145
44157
|
try {
|
|
@@ -45198,7 +45210,7 @@ var import_path3 = require("path");
|
|
|
45198
45210
|
var import_promises2 = require("fs/promises");
|
|
45199
45211
|
|
|
45200
45212
|
// src/cli/commands/templates/core/workspace.ts
|
|
45201
|
-
var TEMPLATE_VERSION =
|
|
45213
|
+
var TEMPLATE_VERSION = 31;
|
|
45202
45214
|
function configTemplate() {
|
|
45203
45215
|
return `import type { ElevasConfig } from '@elevasis/sdk'
|
|
45204
45216
|
|
|
@@ -45656,7 +45668,6 @@ For detailed per-dimension adaptation rules, read
|
|
|
45656
45668
|
| --- | --- |
|
|
45657
45669
|
| \`/meta\` | Project lifecycle: init, status, fix, deploy, health |
|
|
45658
45670
|
| \`/docs\` | Browse, create, and verify permanent documentation |
|
|
45659
|
-
| \`/work\` | Task tracking: auto-detects intent (create, save, resume); suggests complete |
|
|
45660
45671
|
| \`/tutorial\` | Progressive learning path (21 items across 4 sections) |
|
|
45661
45672
|
|
|
45662
45673
|
## Skills
|
|
@@ -45665,6 +45676,7 @@ Skills auto-trigger based on conversation context. You do not need to invoke the
|
|
|
45665
45676
|
|
|
45666
45677
|
| Skill | Triggers When |
|
|
45667
45678
|
| --- | --- |
|
|
45679
|
+
| \`work\` | You say /work, ask to track or save progress across sessions, ask what you were working on, want to create/resume/complete a task doc, or say you are done for today. Also proactively save when conversation is heavy or 2+ steps completed |
|
|
45668
45680
|
| \`creds\` | You mention credentials, API keys, secrets, webhook secrets, or setting up integrations |
|
|
45669
45681
|
|
|
45670
45682
|
## Maintaining Memory
|
|
@@ -45831,8 +45843,8 @@ When automation is none:
|
|
|
45831
45843
|
"This workspace comes with a built-in assistant that knows your project, your tools,
|
|
45832
45844
|
and your goals. Let me show you how it's set up." Open CLAUDE.md and explain in
|
|
45833
45845
|
plain terms: it's the agent's instruction sheet. Point out the commands in the
|
|
45834
|
-
Commands table. Show /meta, /tutorial
|
|
45835
|
-
"the assistant automatically helps when you mention API keys." Tour the memory folder
|
|
45846
|
+
Commands table. Show /meta, /tutorial. Explain the work and creds skills as
|
|
45847
|
+
"the assistant automatically helps when you mention tasks or API keys." Tour the memory folder
|
|
45836
45848
|
at a high level -- "this is where the agent stores what it learns about your project."
|
|
45837
45849
|
Verify: Ask the user a question about their business goal and show how the agent
|
|
45838
45850
|
references their profile in the answer.
|
|
@@ -45841,7 +45853,7 @@ Observation focus: agent-as-assistant concept, CLAUDE.md as instruction sheet.
|
|
|
45841
45853
|
When automation is low-code:
|
|
45842
45854
|
Read CLAUDE.md and walk through each section. Explain: what the agent reads on
|
|
45843
45855
|
session start, how the navigation table works, what the Skills section means.
|
|
45844
|
-
Explain the
|
|
45856
|
+
Explain the three commands briefly and the two auto-triggering skills (work, creds). Show that the agent has memory: open
|
|
45845
45857
|
\`.claude/memory/profile/skills.md\` and show their own profile -- "every session,
|
|
45846
45858
|
the agent reads this and adapts." Explain the initialized flag.
|
|
45847
45859
|
Verify: Run /meta to see project status.
|
|
@@ -45850,7 +45862,7 @@ Observation focus: memory system concept, session initialization flow.
|
|
|
45850
45862
|
When automation is custom:
|
|
45851
45863
|
Read CLAUDE.md in full. Explain the session initialization sequence: CLAUDE.md ->
|
|
45852
45864
|
navigation table -> memory files -> context loading. Walk through: Commands section
|
|
45853
|
-
(
|
|
45865
|
+
(3 commands + work and creds skills), Rules section (auto-loaded based on file paths), Skills
|
|
45854
45866
|
section (auto-triggered by content patterns). Point out the initialized flag and
|
|
45855
45867
|
explain how /meta init set it.
|
|
45856
45868
|
Verify: Run /meta to see project status; observe which fields it reports.
|
|
@@ -45913,7 +45925,7 @@ then notice auto-save. Then run /docs to browse docs/.
|
|
|
45913
45925
|
Observation focus: intent-driven task tracking, /work vs /docs separation.
|
|
45914
45926
|
|
|
45915
45927
|
When automation is custom:
|
|
45916
|
-
Read \`.claude/
|
|
45928
|
+
Read \`.claude/skills/work/SKILL.md\`. Full /work coverage:
|
|
45917
45929
|
Intent detection table (list, create, resume, save auto-invoked; complete always suggests).
|
|
45918
45930
|
Task doc anatomy: kebab-case filename, frontmatter with status, Objective/Plan/Progress/
|
|
45919
45931
|
Resume Context sections. Auto-save behavior: triggers on heavy context, wrap-up signals,
|
|
@@ -46456,10 +46468,15 @@ The agent reads current templates from the installed SDK:
|
|
|
46456
46468
|
\`@elevasis/sdk/templates\` subpath exports all template functions.
|
|
46457
46469
|
`;
|
|
46458
46470
|
}
|
|
46459
|
-
function
|
|
46460
|
-
return
|
|
46471
|
+
function claudeWorkSkillTemplate() {
|
|
46472
|
+
return `---
|
|
46473
|
+
name: work
|
|
46474
|
+
description: "Task tracking and progress persistence. TRIGGER when: user says /work, asks to track or save progress across sessions, asks what they were working on, wants to create/resume/complete a task doc, or says they are done for today. DO NOT TRIGGER when: user is just doing work without wanting to track it in docs/in-progress/."
|
|
46475
|
+
---
|
|
46476
|
+
|
|
46477
|
+
# Task Tracking
|
|
46461
46478
|
|
|
46462
|
-
You are a task tracking assistant for this Elevasis workspace. \`/work\` is the primary
|
|
46479
|
+
You are a task tracking assistant for this Elevasis workspace. \`/work\` is the primary interface for managing all work and projects.
|
|
46463
46480
|
|
|
46464
46481
|
Your job is to **intelligently manage tasks without requiring the user to know subcommands**. Detect what the user needs from context and act accordingly.
|
|
46465
46482
|
|
|
@@ -46892,6 +46909,9 @@ Ask for provider, org UUID, resource ID, and credential name. Construct:
|
|
|
46892
46909
|
function claudeSdkPatternsRuleTemplate() {
|
|
46893
46910
|
return `---
|
|
46894
46911
|
description: Elevasis SDK patterns -- imports, source structure, runtime, and platform tools
|
|
46912
|
+
paths:
|
|
46913
|
+
- src/**
|
|
46914
|
+
- elevasis.config.ts
|
|
46895
46915
|
---
|
|
46896
46916
|
|
|
46897
46917
|
# SDK Patterns
|
|
@@ -46940,6 +46960,9 @@ Use \`platform.call()\` directly only for tools without adapters: \`supabase\`,
|
|
|
46940
46960
|
function claudeWorkspaceRulesTemplate() {
|
|
46941
46961
|
return `---
|
|
46942
46962
|
description: Project-specific patterns for this workspace, promoted as the project grows
|
|
46963
|
+
paths:
|
|
46964
|
+
- src/**
|
|
46965
|
+
- .claude/rules/workspace-patterns.md
|
|
46943
46966
|
---
|
|
46944
46967
|
|
|
46945
46968
|
# Workspace Patterns
|
|
@@ -46976,6 +46999,8 @@ This file is yours. The other \`.claude/rules/\` files are SDK-owned and updated
|
|
|
46976
46999
|
function claudeDocsAuthoringRuleTemplate() {
|
|
46977
47000
|
return `---
|
|
46978
47001
|
description: Documentation conventions for docs/ files -- MDX escaping, frontmatter, structure
|
|
47002
|
+
paths:
|
|
47003
|
+
- docs/**/*.mdx
|
|
46979
47004
|
---
|
|
46980
47005
|
|
|
46981
47006
|
# Docs Authoring
|
|
@@ -47007,6 +47032,8 @@ description: Concise description
|
|
|
47007
47032
|
function claudeMemoryConventionsRuleTemplate() {
|
|
47008
47033
|
return `---
|
|
47009
47034
|
description: Memory system conventions -- what to store, structure, pruning
|
|
47035
|
+
paths:
|
|
47036
|
+
- .claude/memory/**
|
|
47010
47037
|
---
|
|
47011
47038
|
|
|
47012
47039
|
# Memory Conventions
|
|
@@ -47031,6 +47058,9 @@ It is NOT for instructions (commands), reference docs, or templates.
|
|
|
47031
47058
|
function claudeProjectMapRuleTemplate() {
|
|
47032
47059
|
return `---
|
|
47033
47060
|
description: Project map conventions -- auto-generated, do not edit, maintained by deploy and /meta fix
|
|
47061
|
+
paths:
|
|
47062
|
+
- docs/project-map.mdx
|
|
47063
|
+
- docs/resource-map.mdx
|
|
47034
47064
|
---
|
|
47035
47065
|
|
|
47036
47066
|
# Project Map
|
|
@@ -47044,6 +47074,8 @@ description: Project map conventions -- auto-generated, do not edit, maintained
|
|
|
47044
47074
|
function claudeTaskTrackingRuleTemplate() {
|
|
47045
47075
|
return `---
|
|
47046
47076
|
description: In-progress task conventions -- /work command, doc format, status values, auto-save behavior
|
|
47077
|
+
paths:
|
|
47078
|
+
- docs/in-progress/**
|
|
47047
47079
|
---
|
|
47048
47080
|
|
|
47049
47081
|
# Task Tracking
|
|
@@ -47459,7 +47491,7 @@ function getManagedTemplates(ctx = {}) {
|
|
|
47459
47491
|
".claude/hooks/tool-failure-recovery.mjs": claudeToolFailureRecoveryHookTemplate,
|
|
47460
47492
|
".claude/commands/tutorial.md": claudeTutorialCommandTemplate,
|
|
47461
47493
|
".claude/commands/meta.md": claudeMetaCommandTemplate,
|
|
47462
|
-
".claude/
|
|
47494
|
+
".claude/skills/work/SKILL.md": claudeWorkSkillTemplate,
|
|
47463
47495
|
".claude/commands/docs.md": claudeDocsCommandTemplate,
|
|
47464
47496
|
".claude/skills/creds/SKILL.md": claudeCredsSkillTemplate,
|
|
47465
47497
|
".claude/rules/sdk-patterns.md": claudeSdkPatternsRuleTemplate,
|
|
@@ -47673,7 +47705,7 @@ var MANAGED_FILES = [
|
|
|
47673
47705
|
".claude/hooks/tool-failure-recovery.mjs",
|
|
47674
47706
|
".claude/commands/tutorial.md",
|
|
47675
47707
|
".claude/commands/meta.md",
|
|
47676
|
-
".claude/
|
|
47708
|
+
".claude/skills/work/SKILL.md",
|
|
47677
47709
|
".claude/commands/docs.md",
|
|
47678
47710
|
".claude/skills/creds/SKILL.md",
|
|
47679
47711
|
".claude/rules/sdk-patterns.md",
|
|
@@ -47743,7 +47775,7 @@ function registerInitCommand(program3) {
|
|
|
47743
47775
|
".claude/hooks/tool-failure-recovery.mjs": claudeToolFailureRecoveryHookTemplate(),
|
|
47744
47776
|
".claude/commands/tutorial.md": claudeTutorialCommandTemplate(),
|
|
47745
47777
|
".claude/commands/meta.md": claudeMetaCommandTemplate(),
|
|
47746
|
-
".claude/
|
|
47778
|
+
".claude/skills/work/SKILL.md": claudeWorkSkillTemplate(),
|
|
47747
47779
|
".claude/commands/docs.md": claudeDocsCommandTemplate(),
|
|
47748
47780
|
".claude/skills/creds/SKILL.md": claudeCredsSkillTemplate(),
|
|
47749
47781
|
".claude/rules/sdk-patterns.md": claudeSdkPatternsRuleTemplate(),
|
|
@@ -47862,214 +47894,240 @@ function mergeSections(existing, template, sdkOwned) {
|
|
|
47862
47894
|
};
|
|
47863
47895
|
}
|
|
47864
47896
|
function registerUpdateCommand(program3) {
|
|
47865
|
-
program3.command("update").description("Update project scaffold to latest template version").option("--ui", "Add a Vite + React UI app in ui/").action(
|
|
47866
|
-
|
|
47867
|
-
|
|
47868
|
-
|
|
47869
|
-
|
|
47870
|
-
|
|
47871
|
-
configContents = await (0, import_promises3.readFile)(configPath, "utf-8");
|
|
47872
|
-
const match = configContents.match(/templateVersion:\s*(\d+)/);
|
|
47873
|
-
if (match) {
|
|
47874
|
-
currentVersion = parseInt(match[1], 10);
|
|
47875
|
-
}
|
|
47876
|
-
} catch {
|
|
47877
|
-
}
|
|
47878
|
-
const upToDate = currentVersion >= TEMPLATE_VERSION;
|
|
47879
|
-
if (upToDate && !options2.ui) {
|
|
47880
|
-
console.log(source_default.green(` Project is up to date (template version ${TEMPLATE_VERSION})`));
|
|
47881
|
-
return;
|
|
47882
|
-
}
|
|
47883
|
-
let hasUI = !!options2.ui;
|
|
47884
|
-
if (!hasUI) {
|
|
47897
|
+
program3.command("update").description("Update project scaffold to latest template version").option("--ui", "Add a Vite + React UI app in ui/").action(
|
|
47898
|
+
wrapAction("update", async (options2 = {}) => {
|
|
47899
|
+
const cwd = process.cwd();
|
|
47900
|
+
const configPath = (0, import_path4.resolve)(cwd, "elevasis.config.ts");
|
|
47901
|
+
let currentVersion = 0;
|
|
47902
|
+
let configContents = "";
|
|
47885
47903
|
try {
|
|
47886
|
-
await (0, import_promises3.
|
|
47887
|
-
|
|
47904
|
+
configContents = await (0, import_promises3.readFile)(configPath, "utf-8");
|
|
47905
|
+
const match = configContents.match(/templateVersion:\s*(\d+)/);
|
|
47906
|
+
if (match) {
|
|
47907
|
+
currentVersion = parseInt(match[1], 10);
|
|
47908
|
+
}
|
|
47888
47909
|
} catch {
|
|
47889
47910
|
}
|
|
47890
|
-
|
|
47891
|
-
|
|
47892
|
-
|
|
47893
|
-
|
|
47894
|
-
|
|
47895
|
-
|
|
47896
|
-
|
|
47897
|
-
const uiAffectedFiles = /* @__PURE__ */ new Set([".gitignore", "CLAUDE.md"]);
|
|
47898
|
-
const filesToProcess = upToDate ? MANAGED_FILES.filter((f) => uiAffectedFiles.has(f)) : MANAGED_FILES;
|
|
47899
|
-
for (const file2 of filesToProcess) {
|
|
47900
|
-
const filePath = (0, import_path4.resolve)(cwd, file2);
|
|
47901
|
-
const templateFn = managedTemplates[file2];
|
|
47902
|
-
if (!templateFn) continue;
|
|
47903
|
-
const templateContent = templateFn();
|
|
47904
|
-
if (file2 === ".gitignore") {
|
|
47911
|
+
const upToDate = currentVersion >= TEMPLATE_VERSION;
|
|
47912
|
+
if (upToDate && !options2.ui) {
|
|
47913
|
+
console.log(source_default.green(` Project is up to date (template version ${TEMPLATE_VERSION})`));
|
|
47914
|
+
return;
|
|
47915
|
+
}
|
|
47916
|
+
let hasUI = !!options2.ui;
|
|
47917
|
+
if (!hasUI) {
|
|
47905
47918
|
try {
|
|
47906
|
-
await (0, import_promises3.access)(
|
|
47907
|
-
|
|
47908
|
-
|
|
47909
|
-
|
|
47910
|
-
|
|
47911
|
-
|
|
47912
|
-
|
|
47913
|
-
|
|
47914
|
-
|
|
47919
|
+
await (0, import_promises3.access)((0, import_path4.resolve)(cwd, "ui"));
|
|
47920
|
+
hasUI = true;
|
|
47921
|
+
} catch {
|
|
47922
|
+
}
|
|
47923
|
+
}
|
|
47924
|
+
const managedTemplates = getManagedTemplates({ hasUI });
|
|
47925
|
+
const added = [];
|
|
47926
|
+
const flagged = [];
|
|
47927
|
+
const appendedGitignore = [];
|
|
47928
|
+
const mergedUpdated = [];
|
|
47929
|
+
const mergedPreserved = [];
|
|
47930
|
+
const uiAffectedFiles = /* @__PURE__ */ new Set([".gitignore", "CLAUDE.md"]);
|
|
47931
|
+
const filesToProcess = upToDate ? MANAGED_FILES.filter((f) => uiAffectedFiles.has(f)) : MANAGED_FILES;
|
|
47932
|
+
for (const file2 of filesToProcess) {
|
|
47933
|
+
const filePath = (0, import_path4.resolve)(cwd, file2);
|
|
47934
|
+
const templateFn = managedTemplates[file2];
|
|
47935
|
+
if (!templateFn) continue;
|
|
47936
|
+
const templateContent = templateFn();
|
|
47937
|
+
if (file2 === ".gitignore") {
|
|
47938
|
+
try {
|
|
47939
|
+
await (0, import_promises3.access)(filePath);
|
|
47940
|
+
const existingContent = await (0, import_promises3.readFile)(filePath, "utf-8");
|
|
47941
|
+
const existingLines = existingContent.split("\n");
|
|
47942
|
+
const templateLines = templateContent.split("\n");
|
|
47943
|
+
const linesToAppend = [];
|
|
47944
|
+
for (const line of templateLines) {
|
|
47945
|
+
if (line.trim() === "") continue;
|
|
47946
|
+
if (!existingLines.includes(line)) {
|
|
47947
|
+
linesToAppend.push(line);
|
|
47948
|
+
}
|
|
47915
47949
|
}
|
|
47950
|
+
if (linesToAppend.length > 0) {
|
|
47951
|
+
const appendContent = (existingContent.endsWith("\n") ? "" : "\n") + linesToAppend.join("\n") + "\n";
|
|
47952
|
+
await (0, import_promises3.writeFile)(filePath, existingContent + appendContent, "utf-8");
|
|
47953
|
+
appendedGitignore.push(...linesToAppend);
|
|
47954
|
+
}
|
|
47955
|
+
} catch {
|
|
47956
|
+
await (0, import_promises3.mkdir)((0, import_path4.dirname)(filePath), { recursive: true });
|
|
47957
|
+
await (0, import_promises3.writeFile)(filePath, templateContent, "utf-8");
|
|
47958
|
+
added.push(file2);
|
|
47916
47959
|
}
|
|
47917
|
-
|
|
47918
|
-
|
|
47919
|
-
|
|
47920
|
-
|
|
47960
|
+
continue;
|
|
47961
|
+
}
|
|
47962
|
+
if (file2 === "elevasis.config.ts") {
|
|
47963
|
+
if (configContents) {
|
|
47964
|
+
if (/templateVersion:\s*\d+/.test(configContents)) {
|
|
47965
|
+
const updated = configContents.replace(/templateVersion:\s*\d+/, `templateVersion: ${TEMPLATE_VERSION}`);
|
|
47966
|
+
await (0, import_promises3.writeFile)(filePath, updated, "utf-8");
|
|
47967
|
+
} else {
|
|
47968
|
+
const updated = configContents.replace(
|
|
47969
|
+
/\bexport default\s*\{/,
|
|
47970
|
+
`export default {
|
|
47971
|
+
templateVersion: ${TEMPLATE_VERSION},`
|
|
47972
|
+
);
|
|
47973
|
+
await (0, import_promises3.writeFile)(filePath, updated, "utf-8");
|
|
47974
|
+
}
|
|
47975
|
+
} else {
|
|
47976
|
+
await (0, import_promises3.mkdir)((0, import_path4.dirname)(filePath), { recursive: true });
|
|
47977
|
+
await (0, import_promises3.writeFile)(filePath, templateContent, "utf-8");
|
|
47978
|
+
added.push(file2);
|
|
47921
47979
|
}
|
|
47922
|
-
|
|
47923
|
-
await (0, import_promises3.mkdir)((0, import_path4.dirname)(filePath), { recursive: true });
|
|
47924
|
-
await (0, import_promises3.writeFile)(filePath, templateContent, "utf-8");
|
|
47925
|
-
added.push(file2);
|
|
47980
|
+
continue;
|
|
47926
47981
|
}
|
|
47927
|
-
|
|
47928
|
-
|
|
47929
|
-
|
|
47930
|
-
|
|
47931
|
-
|
|
47932
|
-
|
|
47933
|
-
|
|
47934
|
-
|
|
47935
|
-
|
|
47936
|
-
|
|
47982
|
+
if (file2 === "CLAUDE.md") {
|
|
47983
|
+
let existingContent = null;
|
|
47984
|
+
try {
|
|
47985
|
+
await (0, import_promises3.access)(filePath);
|
|
47986
|
+
existingContent = await (0, import_promises3.readFile)(filePath, "utf-8");
|
|
47987
|
+
} catch {
|
|
47988
|
+
}
|
|
47989
|
+
if (existingContent !== null) {
|
|
47990
|
+
const {
|
|
47991
|
+
merged,
|
|
47992
|
+
updated: sectionUpdated,
|
|
47993
|
+
preserved: sectionPreserved
|
|
47994
|
+
} = mergeSections(existingContent, templateContent, SDK_OWNED_SECTIONS);
|
|
47995
|
+
await (0, import_promises3.writeFile)(filePath, merged, "utf-8");
|
|
47996
|
+
mergedUpdated.push(...sectionUpdated);
|
|
47997
|
+
mergedPreserved.push(...sectionPreserved);
|
|
47937
47998
|
} else {
|
|
47938
|
-
|
|
47939
|
-
|
|
47940
|
-
|
|
47941
|
-
templateVersion: ${TEMPLATE_VERSION},`
|
|
47942
|
-
);
|
|
47943
|
-
await (0, import_promises3.writeFile)(filePath, updated, "utf-8");
|
|
47999
|
+
await (0, import_promises3.mkdir)((0, import_path4.dirname)(filePath), { recursive: true });
|
|
48000
|
+
await (0, import_promises3.writeFile)(filePath, templateContent, "utf-8");
|
|
48001
|
+
added.push(file2);
|
|
47944
48002
|
}
|
|
47945
|
-
|
|
47946
|
-
await (0, import_promises3.mkdir)((0, import_path4.dirname)(filePath), { recursive: true });
|
|
47947
|
-
await (0, import_promises3.writeFile)(filePath, templateContent, "utf-8");
|
|
47948
|
-
added.push(file2);
|
|
48003
|
+
continue;
|
|
47949
48004
|
}
|
|
47950
|
-
|
|
47951
|
-
}
|
|
47952
|
-
if (file2 === "CLAUDE.md") {
|
|
47953
|
-
let existingContent = null;
|
|
48005
|
+
let exists = false;
|
|
47954
48006
|
try {
|
|
47955
48007
|
await (0, import_promises3.access)(filePath);
|
|
47956
|
-
|
|
48008
|
+
exists = true;
|
|
47957
48009
|
} catch {
|
|
47958
48010
|
}
|
|
47959
|
-
if (
|
|
47960
|
-
const { merged, updated: sectionUpdated, preserved: sectionPreserved } = mergeSections(existingContent, templateContent, SDK_OWNED_SECTIONS);
|
|
47961
|
-
await (0, import_promises3.writeFile)(filePath, merged, "utf-8");
|
|
47962
|
-
mergedUpdated.push(...sectionUpdated);
|
|
47963
|
-
mergedPreserved.push(...sectionPreserved);
|
|
47964
|
-
} else {
|
|
48011
|
+
if (!exists) {
|
|
47965
48012
|
await (0, import_promises3.mkdir)((0, import_path4.dirname)(filePath), { recursive: true });
|
|
47966
48013
|
await (0, import_promises3.writeFile)(filePath, templateContent, "utf-8");
|
|
47967
48014
|
added.push(file2);
|
|
48015
|
+
} else {
|
|
48016
|
+
const existingContent = await (0, import_promises3.readFile)(filePath, "utf-8");
|
|
48017
|
+
const normalize = (s) => s.replace(/\r\n/g, "\n");
|
|
48018
|
+
if (normalize(existingContent) === normalize(templateContent)) {
|
|
48019
|
+
} else {
|
|
48020
|
+
flagged.push(file2);
|
|
48021
|
+
}
|
|
47968
48022
|
}
|
|
47969
|
-
continue;
|
|
47970
48023
|
}
|
|
47971
|
-
|
|
47972
|
-
|
|
47973
|
-
|
|
47974
|
-
|
|
47975
|
-
|
|
48024
|
+
const OBSOLETE_FILES = [
|
|
48025
|
+
".claude/commands/work.md"
|
|
48026
|
+
// v31: moved to .claude/skills/work/SKILL.md
|
|
48027
|
+
];
|
|
48028
|
+
const removed = [];
|
|
48029
|
+
if (!upToDate) {
|
|
48030
|
+
for (const file2 of OBSOLETE_FILES) {
|
|
48031
|
+
const filePath = (0, import_path4.resolve)(cwd, file2);
|
|
48032
|
+
try {
|
|
48033
|
+
await (0, import_promises3.access)(filePath);
|
|
48034
|
+
await (0, import_promises3.unlink)(filePath);
|
|
48035
|
+
removed.push(file2);
|
|
48036
|
+
} catch {
|
|
48037
|
+
}
|
|
48038
|
+
}
|
|
47976
48039
|
}
|
|
47977
|
-
|
|
47978
|
-
|
|
47979
|
-
|
|
47980
|
-
|
|
47981
|
-
|
|
47982
|
-
const
|
|
47983
|
-
const
|
|
47984
|
-
|
|
47985
|
-
|
|
47986
|
-
|
|
48040
|
+
const uiAdded = [];
|
|
48041
|
+
const uiSkipped = [];
|
|
48042
|
+
if (options2.ui) {
|
|
48043
|
+
const orgSlug = (0, import_path4.basename)(cwd).toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/^[^a-z]+/, "").replace(/-+/g, "-").replace(/-$/, "") || "my-workspace";
|
|
48044
|
+
await (0, import_promises3.mkdir)((0, import_path4.resolve)(cwd, "ui/src"), { recursive: true });
|
|
48045
|
+
const uiFiles = getUIFiles(orgSlug);
|
|
48046
|
+
for (const [file2, content] of Object.entries(uiFiles)) {
|
|
48047
|
+
const filePath = (0, import_path4.resolve)(cwd, file2);
|
|
48048
|
+
let exists = false;
|
|
48049
|
+
try {
|
|
48050
|
+
await (0, import_promises3.access)(filePath);
|
|
48051
|
+
exists = true;
|
|
48052
|
+
} catch {
|
|
48053
|
+
}
|
|
48054
|
+
if (!exists) {
|
|
48055
|
+
await (0, import_promises3.writeFile)(filePath, content, "utf-8");
|
|
48056
|
+
uiAdded.push(file2);
|
|
48057
|
+
} else {
|
|
48058
|
+
uiSkipped.push(file2);
|
|
48059
|
+
}
|
|
47987
48060
|
}
|
|
47988
48061
|
}
|
|
47989
|
-
|
|
47990
|
-
|
|
47991
|
-
|
|
47992
|
-
|
|
47993
|
-
|
|
47994
|
-
|
|
47995
|
-
|
|
47996
|
-
|
|
47997
|
-
|
|
47998
|
-
|
|
47999
|
-
|
|
48000
|
-
await (0, import_promises3.access)(filePath);
|
|
48001
|
-
exists = true;
|
|
48002
|
-
} catch {
|
|
48062
|
+
console.log("");
|
|
48063
|
+
if (upToDate) {
|
|
48064
|
+
console.log(source_default.green.bold(` Added UI to project (template version ${TEMPLATE_VERSION})`));
|
|
48065
|
+
} else {
|
|
48066
|
+
console.log(source_default.green.bold(` Updated @elevasis/sdk template v${currentVersion} -> v${TEMPLATE_VERSION}`));
|
|
48067
|
+
}
|
|
48068
|
+
if (added.length > 0) {
|
|
48069
|
+
console.log("");
|
|
48070
|
+
console.log(" Added:");
|
|
48071
|
+
for (const file2 of added) {
|
|
48072
|
+
console.log(source_default.green(` ${file2}`));
|
|
48003
48073
|
}
|
|
48004
|
-
|
|
48005
|
-
|
|
48006
|
-
|
|
48007
|
-
|
|
48008
|
-
|
|
48074
|
+
}
|
|
48075
|
+
if (removed.length > 0) {
|
|
48076
|
+
console.log("");
|
|
48077
|
+
console.log(" Removed (obsolete):");
|
|
48078
|
+
for (const file2 of removed) {
|
|
48079
|
+
console.log(source_default.red(` ${file2}`));
|
|
48009
48080
|
}
|
|
48010
48081
|
}
|
|
48011
|
-
|
|
48012
|
-
|
|
48013
|
-
|
|
48014
|
-
|
|
48015
|
-
}
|
|
48016
|
-
|
|
48017
|
-
}
|
|
48018
|
-
if (added.length > 0) {
|
|
48019
|
-
console.log("");
|
|
48020
|
-
console.log(" Added:");
|
|
48021
|
-
for (const file2 of added) {
|
|
48022
|
-
console.log(source_default.green(` ${file2}`));
|
|
48082
|
+
if (appendedGitignore.length > 0) {
|
|
48083
|
+
console.log("");
|
|
48084
|
+
console.log(" Appended to .gitignore:");
|
|
48085
|
+
for (const entry of appendedGitignore) {
|
|
48086
|
+
console.log(source_default.yellow(` ${entry}`));
|
|
48087
|
+
}
|
|
48023
48088
|
}
|
|
48024
|
-
|
|
48025
|
-
|
|
48026
|
-
|
|
48027
|
-
|
|
48028
|
-
|
|
48029
|
-
|
|
48089
|
+
if (flagged.length > 0) {
|
|
48090
|
+
console.log("");
|
|
48091
|
+
console.log(" Needs agent review:");
|
|
48092
|
+
for (const file2 of flagged) {
|
|
48093
|
+
console.log(source_default.cyan(` ${file2} (differs from template)`));
|
|
48094
|
+
}
|
|
48030
48095
|
}
|
|
48031
|
-
|
|
48032
|
-
|
|
48033
|
-
|
|
48034
|
-
|
|
48035
|
-
for (const file2 of flagged) {
|
|
48036
|
-
console.log(source_default.cyan(` ${file2} (differs from template)`));
|
|
48096
|
+
if (flagged.length > 0) {
|
|
48097
|
+
console.log("");
|
|
48098
|
+
console.log(source_default.gray(" Run /meta update in Claude Code to merge flagged files."));
|
|
48099
|
+
console.log(source_default.gray(" Or run /meta fix to verify and repair the full framework."));
|
|
48037
48100
|
}
|
|
48038
|
-
|
|
48039
|
-
|
|
48040
|
-
|
|
48041
|
-
|
|
48042
|
-
|
|
48043
|
-
|
|
48044
|
-
|
|
48045
|
-
|
|
48046
|
-
|
|
48047
|
-
for (const section of mergedUpdated) {
|
|
48048
|
-
console.log(source_default.green(` updated: ${section}`));
|
|
48101
|
+
if (mergedUpdated.length > 0 || mergedPreserved.length > 0) {
|
|
48102
|
+
console.log("");
|
|
48103
|
+
console.log(" CLAUDE.md sections:");
|
|
48104
|
+
for (const section of mergedUpdated) {
|
|
48105
|
+
console.log(source_default.green(` updated: ${section}`));
|
|
48106
|
+
}
|
|
48107
|
+
for (const section of mergedPreserved) {
|
|
48108
|
+
console.log(source_default.gray(` preserved: ${section}`));
|
|
48109
|
+
}
|
|
48049
48110
|
}
|
|
48050
|
-
|
|
48051
|
-
console.log(
|
|
48111
|
+
if (uiAdded.length > 0) {
|
|
48112
|
+
console.log("");
|
|
48113
|
+
console.log(" UI scaffold added:");
|
|
48114
|
+
for (const file2 of uiAdded) {
|
|
48115
|
+
console.log(source_default.green(` ${file2}`));
|
|
48116
|
+
}
|
|
48117
|
+
console.log("");
|
|
48118
|
+
console.log(source_default.gray(" Next: cd ui && pnpm install"));
|
|
48119
|
+
console.log(source_default.gray(" Set VITE_WORKOS_CLIENT_ID in ui/.env"));
|
|
48052
48120
|
}
|
|
48053
|
-
|
|
48054
|
-
|
|
48055
|
-
|
|
48056
|
-
|
|
48057
|
-
|
|
48058
|
-
|
|
48121
|
+
if (uiSkipped.length > 0) {
|
|
48122
|
+
console.log("");
|
|
48123
|
+
console.log(" UI files already exist (skipped):");
|
|
48124
|
+
for (const file2 of uiSkipped) {
|
|
48125
|
+
console.log(source_default.gray(` ${file2}`));
|
|
48126
|
+
}
|
|
48059
48127
|
}
|
|
48060
48128
|
console.log("");
|
|
48061
|
-
|
|
48062
|
-
|
|
48063
|
-
}
|
|
48064
|
-
if (uiSkipped.length > 0) {
|
|
48065
|
-
console.log("");
|
|
48066
|
-
console.log(" UI files already exist (skipped):");
|
|
48067
|
-
for (const file2 of uiSkipped) {
|
|
48068
|
-
console.log(source_default.gray(` ${file2}`));
|
|
48069
|
-
}
|
|
48070
|
-
}
|
|
48071
|
-
console.log("");
|
|
48072
|
-
}));
|
|
48129
|
+
})
|
|
48130
|
+
);
|
|
48073
48131
|
}
|
|
48074
48132
|
|
|
48075
48133
|
// src/cli/commands/creds/creds-list.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -3585,6 +3585,7 @@ interface AcqDeal {
|
|
|
3585
3585
|
interface BulkImportParams {
|
|
3586
3586
|
organizationId: string;
|
|
3587
3587
|
contacts: CreateContactParams[];
|
|
3588
|
+
listId?: string;
|
|
3588
3589
|
}
|
|
3589
3590
|
interface BulkImportResult {
|
|
3590
3591
|
created: number;
|
|
@@ -3981,6 +3982,21 @@ interface RunActorResult {
|
|
|
3981
3982
|
totalCount: number;
|
|
3982
3983
|
executionTimeMs: number;
|
|
3983
3984
|
}
|
|
3985
|
+
/**
|
|
3986
|
+
* Get dataset items parameters
|
|
3987
|
+
*/
|
|
3988
|
+
interface GetDatasetItemsParams {
|
|
3989
|
+
datasetId: string;
|
|
3990
|
+
maxItems?: number;
|
|
3991
|
+
offset?: number;
|
|
3992
|
+
}
|
|
3993
|
+
/**
|
|
3994
|
+
* Get dataset items result
|
|
3995
|
+
*/
|
|
3996
|
+
interface GetDatasetItemsResult {
|
|
3997
|
+
items: unknown[];
|
|
3998
|
+
totalCount: number;
|
|
3999
|
+
}
|
|
3984
4000
|
|
|
3985
4001
|
/**
|
|
3986
4002
|
* Shared Dropbox param/result types (browser-safe)
|
|
@@ -5161,6 +5177,10 @@ type ApifyToolMap = {
|
|
|
5161
5177
|
params: RunActorParams;
|
|
5162
5178
|
result: RunActorResult;
|
|
5163
5179
|
};
|
|
5180
|
+
getDatasetItems: {
|
|
5181
|
+
params: GetDatasetItemsParams;
|
|
5182
|
+
result: GetDatasetItemsResult;
|
|
5183
|
+
};
|
|
5164
5184
|
};
|
|
5165
5185
|
type GmailToolMap = {
|
|
5166
5186
|
sendEmail: {
|
package/dist/index.js
CHANGED
|
@@ -144,6 +144,7 @@ var DOMAIN_MAP = {
|
|
|
144
144
|
|
|
145
145
|
// ../core/src/platform/registry/reserved.ts
|
|
146
146
|
var RESERVED_RESOURCE_IDS = /* @__PURE__ */ new Set(["command-center-assistant"]);
|
|
147
|
+
Array.from(RESERVED_RESOURCE_IDS);
|
|
147
148
|
function isReservedResourceId(resourceId) {
|
|
148
149
|
return RESERVED_RESOURCE_IDS.has(resourceId);
|
|
149
150
|
}
|
|
@@ -3338,6 +3339,10 @@ var ResourceRegistry = class {
|
|
|
3338
3339
|
if (existingOrg) {
|
|
3339
3340
|
existingOrg.workflows = [...existingOrg.workflows ?? [], ...org.workflows ?? []];
|
|
3340
3341
|
existingOrg.agents = [...existingOrg.agents ?? [], ...org.agents ?? []];
|
|
3342
|
+
existingOrg.triggers = org.triggers;
|
|
3343
|
+
existingOrg.integrations = org.integrations;
|
|
3344
|
+
existingOrg.humanCheckpoints = org.humanCheckpoints;
|
|
3345
|
+
existingOrg.externalResources = org.externalResources;
|
|
3341
3346
|
if (org.relationships) {
|
|
3342
3347
|
existingOrg.relationships = {
|
|
3343
3348
|
...existingOrg.relationships ?? {},
|
|
@@ -3418,6 +3423,10 @@ var ResourceRegistry = class {
|
|
|
3418
3423
|
if (!orgResources) return;
|
|
3419
3424
|
orgResources.workflows = (orgResources.workflows ?? []).filter((w) => !remoteIds.has(w.config.resourceId));
|
|
3420
3425
|
orgResources.agents = (orgResources.agents ?? []).filter((a) => !remoteIds.has(a.config.resourceId));
|
|
3426
|
+
orgResources.triggers = void 0;
|
|
3427
|
+
orgResources.integrations = void 0;
|
|
3428
|
+
orgResources.humanCheckpoints = void 0;
|
|
3429
|
+
orgResources.externalResources = void 0;
|
|
3421
3430
|
if (orgResources.relationships) {
|
|
3422
3431
|
for (const id of remoteIds) {
|
|
3423
3432
|
delete orgResources.relationships[id];
|
|
@@ -3426,7 +3435,7 @@ var ResourceRegistry = class {
|
|
|
3426
3435
|
delete orgResources.relationships;
|
|
3427
3436
|
}
|
|
3428
3437
|
}
|
|
3429
|
-
const remaining = (orgResources.workflows?.length ?? 0) + (orgResources.agents?.length ?? 0)
|
|
3438
|
+
const remaining = (orgResources.workflows?.length ?? 0) + (orgResources.agents?.length ?? 0);
|
|
3430
3439
|
if (remaining > 0) {
|
|
3431
3440
|
this.serializedCache.set(orgName, serializeOrganization(orgResources));
|
|
3432
3441
|
} else {
|
package/dist/templates.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
|
|
3
3
|
// src/cli/commands/templates/core/workspace.ts
|
|
4
|
-
var TEMPLATE_VERSION =
|
|
4
|
+
var TEMPLATE_VERSION = 31;
|
|
5
5
|
function configTemplate() {
|
|
6
6
|
return `import type { ElevasConfig } from '@elevasis/sdk'
|
|
7
7
|
|
|
@@ -332,7 +332,6 @@ For detailed per-dimension adaptation rules, read
|
|
|
332
332
|
| --- | --- |
|
|
333
333
|
| \`/meta\` | Project lifecycle: init, status, fix, deploy, health |
|
|
334
334
|
| \`/docs\` | Browse, create, and verify permanent documentation |
|
|
335
|
-
| \`/work\` | Task tracking: auto-detects intent (create, save, resume); suggests complete |
|
|
336
335
|
| \`/tutorial\` | Progressive learning path (21 items across 4 sections) |
|
|
337
336
|
|
|
338
337
|
## Skills
|
|
@@ -341,6 +340,7 @@ Skills auto-trigger based on conversation context. You do not need to invoke the
|
|
|
341
340
|
|
|
342
341
|
| Skill | Triggers When |
|
|
343
342
|
| --- | --- |
|
|
343
|
+
| \`work\` | You say /work, ask to track or save progress across sessions, ask what you were working on, want to create/resume/complete a task doc, or say you are done for today. Also proactively save when conversation is heavy or 2+ steps completed |
|
|
344
344
|
| \`creds\` | You mention credentials, API keys, secrets, webhook secrets, or setting up integrations |
|
|
345
345
|
|
|
346
346
|
## Maintaining Memory
|
|
@@ -507,8 +507,8 @@ When automation is none:
|
|
|
507
507
|
"This workspace comes with a built-in assistant that knows your project, your tools,
|
|
508
508
|
and your goals. Let me show you how it's set up." Open CLAUDE.md and explain in
|
|
509
509
|
plain terms: it's the agent's instruction sheet. Point out the commands in the
|
|
510
|
-
Commands table. Show /meta, /tutorial
|
|
511
|
-
"the assistant automatically helps when you mention API keys." Tour the memory folder
|
|
510
|
+
Commands table. Show /meta, /tutorial. Explain the work and creds skills as
|
|
511
|
+
"the assistant automatically helps when you mention tasks or API keys." Tour the memory folder
|
|
512
512
|
at a high level -- "this is where the agent stores what it learns about your project."
|
|
513
513
|
Verify: Ask the user a question about their business goal and show how the agent
|
|
514
514
|
references their profile in the answer.
|
|
@@ -517,7 +517,7 @@ Observation focus: agent-as-assistant concept, CLAUDE.md as instruction sheet.
|
|
|
517
517
|
When automation is low-code:
|
|
518
518
|
Read CLAUDE.md and walk through each section. Explain: what the agent reads on
|
|
519
519
|
session start, how the navigation table works, what the Skills section means.
|
|
520
|
-
Explain the
|
|
520
|
+
Explain the three commands briefly and the two auto-triggering skills (work, creds). Show that the agent has memory: open
|
|
521
521
|
\`.claude/memory/profile/skills.md\` and show their own profile -- "every session,
|
|
522
522
|
the agent reads this and adapts." Explain the initialized flag.
|
|
523
523
|
Verify: Run /meta to see project status.
|
|
@@ -526,7 +526,7 @@ Observation focus: memory system concept, session initialization flow.
|
|
|
526
526
|
When automation is custom:
|
|
527
527
|
Read CLAUDE.md in full. Explain the session initialization sequence: CLAUDE.md ->
|
|
528
528
|
navigation table -> memory files -> context loading. Walk through: Commands section
|
|
529
|
-
(
|
|
529
|
+
(3 commands + work and creds skills), Rules section (auto-loaded based on file paths), Skills
|
|
530
530
|
section (auto-triggered by content patterns). Point out the initialized flag and
|
|
531
531
|
explain how /meta init set it.
|
|
532
532
|
Verify: Run /meta to see project status; observe which fields it reports.
|
|
@@ -589,7 +589,7 @@ then notice auto-save. Then run /docs to browse docs/.
|
|
|
589
589
|
Observation focus: intent-driven task tracking, /work vs /docs separation.
|
|
590
590
|
|
|
591
591
|
When automation is custom:
|
|
592
|
-
Read \`.claude/
|
|
592
|
+
Read \`.claude/skills/work/SKILL.md\`. Full /work coverage:
|
|
593
593
|
Intent detection table (list, create, resume, save auto-invoked; complete always suggests).
|
|
594
594
|
Task doc anatomy: kebab-case filename, frontmatter with status, Objective/Plan/Progress/
|
|
595
595
|
Resume Context sections. Auto-save behavior: triggers on heavy context, wrap-up signals,
|
|
@@ -1132,10 +1132,15 @@ The agent reads current templates from the installed SDK:
|
|
|
1132
1132
|
\`@elevasis/sdk/templates\` subpath exports all template functions.
|
|
1133
1133
|
`;
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1136
|
-
return
|
|
1135
|
+
function claudeWorkSkillTemplate() {
|
|
1136
|
+
return `---
|
|
1137
|
+
name: work
|
|
1138
|
+
description: "Task tracking and progress persistence. TRIGGER when: user says /work, asks to track or save progress across sessions, asks what they were working on, wants to create/resume/complete a task doc, or says they are done for today. DO NOT TRIGGER when: user is just doing work without wanting to track it in docs/in-progress/."
|
|
1139
|
+
---
|
|
1140
|
+
|
|
1141
|
+
# Task Tracking
|
|
1137
1142
|
|
|
1138
|
-
You are a task tracking assistant for this Elevasis workspace. \`/work\` is the primary
|
|
1143
|
+
You are a task tracking assistant for this Elevasis workspace. \`/work\` is the primary interface for managing all work and projects.
|
|
1139
1144
|
|
|
1140
1145
|
Your job is to **intelligently manage tasks without requiring the user to know subcommands**. Detect what the user needs from context and act accordingly.
|
|
1141
1146
|
|
|
@@ -1568,6 +1573,9 @@ Ask for provider, org UUID, resource ID, and credential name. Construct:
|
|
|
1568
1573
|
function claudeSdkPatternsRuleTemplate() {
|
|
1569
1574
|
return `---
|
|
1570
1575
|
description: Elevasis SDK patterns -- imports, source structure, runtime, and platform tools
|
|
1576
|
+
paths:
|
|
1577
|
+
- src/**
|
|
1578
|
+
- elevasis.config.ts
|
|
1571
1579
|
---
|
|
1572
1580
|
|
|
1573
1581
|
# SDK Patterns
|
|
@@ -1616,6 +1624,8 @@ Use \`platform.call()\` directly only for tools without adapters: \`supabase\`,
|
|
|
1616
1624
|
function claudeDocsAuthoringRuleTemplate() {
|
|
1617
1625
|
return `---
|
|
1618
1626
|
description: Documentation conventions for docs/ files -- MDX escaping, frontmatter, structure
|
|
1627
|
+
paths:
|
|
1628
|
+
- docs/**/*.mdx
|
|
1619
1629
|
---
|
|
1620
1630
|
|
|
1621
1631
|
# Docs Authoring
|
|
@@ -1647,6 +1657,8 @@ description: Concise description
|
|
|
1647
1657
|
function claudeMemoryConventionsRuleTemplate() {
|
|
1648
1658
|
return `---
|
|
1649
1659
|
description: Memory system conventions -- what to store, structure, pruning
|
|
1660
|
+
paths:
|
|
1661
|
+
- .claude/memory/**
|
|
1650
1662
|
---
|
|
1651
1663
|
|
|
1652
1664
|
# Memory Conventions
|
|
@@ -1671,6 +1683,9 @@ It is NOT for instructions (commands), reference docs, or templates.
|
|
|
1671
1683
|
function claudeProjectMapRuleTemplate() {
|
|
1672
1684
|
return `---
|
|
1673
1685
|
description: Project map conventions -- auto-generated, do not edit, maintained by deploy and /meta fix
|
|
1686
|
+
paths:
|
|
1687
|
+
- docs/project-map.mdx
|
|
1688
|
+
- docs/resource-map.mdx
|
|
1674
1689
|
---
|
|
1675
1690
|
|
|
1676
1691
|
# Project Map
|
|
@@ -1684,6 +1699,8 @@ description: Project map conventions -- auto-generated, do not edit, maintained
|
|
|
1684
1699
|
function claudeTaskTrackingRuleTemplate() {
|
|
1685
1700
|
return `---
|
|
1686
1701
|
description: In-progress task conventions -- /work command, doc format, status values, auto-save behavior
|
|
1702
|
+
paths:
|
|
1703
|
+
- docs/in-progress/**
|
|
1687
1704
|
---
|
|
1688
1705
|
|
|
1689
1706
|
# Task Tracking
|
|
@@ -2081,7 +2098,7 @@ function getManagedTemplates(ctx = {}) {
|
|
|
2081
2098
|
".claude/hooks/tool-failure-recovery.mjs": claudeToolFailureRecoveryHookTemplate,
|
|
2082
2099
|
".claude/commands/tutorial.md": claudeTutorialCommandTemplate,
|
|
2083
2100
|
".claude/commands/meta.md": claudeMetaCommandTemplate,
|
|
2084
|
-
".claude/
|
|
2101
|
+
".claude/skills/work/SKILL.md": claudeWorkSkillTemplate,
|
|
2085
2102
|
".claude/commands/docs.md": claudeDocsCommandTemplate,
|
|
2086
2103
|
".claude/skills/creds/SKILL.md": claudeCredsSkillTemplate,
|
|
2087
2104
|
".claude/rules/sdk-patterns.md": claudeSdkPatternsRuleTemplate,
|
|
@@ -2092,4 +2109,4 @@ function getManagedTemplates(ctx = {}) {
|
|
|
2092
2109
|
};
|
|
2093
2110
|
}
|
|
2094
2111
|
|
|
2095
|
-
export { claudeCredsSkillTemplate, claudeDocsAuthoringRuleTemplate, claudeMdTemplate, claudeMemoryConventionsRuleTemplate, claudeMetaCommandTemplate, claudeProjectMapRuleTemplate, claudeSdkBoundaryHookTemplate, claudeSdkPatternsRuleTemplate, claudeSettingsTemplate, claudeTaskTrackingRuleTemplate, claudeTutorialCommandTemplate,
|
|
2112
|
+
export { claudeCredsSkillTemplate, claudeDocsAuthoringRuleTemplate, claudeMdTemplate, claudeMemoryConventionsRuleTemplate, claudeMetaCommandTemplate, claudeProjectMapRuleTemplate, claudeSdkBoundaryHookTemplate, claudeSdkPatternsRuleTemplate, claudeSettingsTemplate, claudeTaskTrackingRuleTemplate, claudeTutorialCommandTemplate, claudeWorkSkillTemplate, exampleBarrelTemplate, getManagedTemplates, gitignoreTemplate, operationsBarrelTemplate, platformStatusTemplate, starterWorkflowTemplate };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { claudeMdTemplate, claudeMetaCommandTemplate,
|
|
1
|
+
export { claudeMdTemplate, claudeMetaCommandTemplate, claudeWorkSkillTemplate, claudeTutorialCommandTemplate, claudeSettingsTemplate, claudeSdkBoundaryHookTemplate, claudeCredsSkillTemplate, claudeSdkPatternsRuleTemplate, claudeDocsAuthoringRuleTemplate, claudeMemoryConventionsRuleTemplate, claudeProjectMapRuleTemplate, claudeTaskTrackingRuleTemplate, gitignoreTemplate, starterWorkflowTemplate, platformStatusTemplate, operationsBarrelTemplate, exampleBarrelTemplate } from './cli/commands/init.js';
|
|
2
2
|
export { getManagedTemplates } from './cli/commands/templates/core/index.js';
|
|
@@ -9,6 +9,6 @@ import type { ApifyToolMap } from '../../types/index.js';
|
|
|
9
9
|
* Create a typed Apify adapter bound to a specific credential.
|
|
10
10
|
*
|
|
11
11
|
* @param credential - Credential name as configured in the command center
|
|
12
|
-
* @returns Object with
|
|
12
|
+
* @returns Object with 2 typed methods for Apify actor operations
|
|
13
13
|
*/
|
|
14
14
|
export declare function createApifyAdapter(credential: string): import("./create-adapter.js").TypedAdapter<ApifyToolMap>;
|
package/dist/worker/index.js
CHANGED
|
@@ -2282,7 +2282,9 @@ ${actionsList}
|
|
|
2282
2282
|
- Batch independent tool calls in one iteration (faster execution)
|
|
2283
2283
|
- Dependent operations need separate iterations (tool B needs tool A's result)
|
|
2284
2284
|
- "complete" cannot mix with tool-call${includeNavigateKnowledge ? "/navigate-knowledge" : ""}${includeMessageAction ? `
|
|
2285
|
-
- Always send at least one message before completing
|
|
2285
|
+
- Always send at least one message before completing
|
|
2286
|
+
- When you have your answer, send message + complete in the SAME iteration. Never send a message alone then complete in a later iteration.
|
|
2287
|
+
- Never repeat or rephrase the same answer across iterations. One clear answer, then complete.` : ""}
|
|
2286
2288
|
|
|
2287
2289
|
**Use "complete" when:**
|
|
2288
2290
|
- Task finished successfully
|
|
@@ -2421,8 +2423,8 @@ function buildToolsPrompt(tools) {
|
|
|
2421
2423
|
section += "To call a tool, return a tool-call action:\n";
|
|
2422
2424
|
section += '{\n "type": "tool-call",\n "id": "unique-id",\n "name": "tool-name",\n "input": { /* tool input matching schema */ }\n}\n\n';
|
|
2423
2425
|
section += "**IMPORTANT RULES:**\n";
|
|
2424
|
-
section += '1.
|
|
2425
|
-
section +=
|
|
2426
|
+
section += '1. "complete" CANNOT mix with tool-call or navigate-knowledge actions in the same response\n';
|
|
2427
|
+
section += '2. "complete" CAN mix with message \u2014 always pair your final message with complete in the same iteration\n';
|
|
2426
2428
|
section += "3. To use tools, return ONLY tool-call actions, then wait for results in the next iteration\n";
|
|
2427
2429
|
section += "4. After receiving tool results, you can either call more tools OR complete with final answer\n";
|
|
2428
2430
|
section += "5. navigate-knowledge actions load new capabilities - tools become available in the next iteration\n";
|
|
@@ -3282,7 +3284,7 @@ function timeoutError(operation) {
|
|
|
3282
3284
|
}
|
|
3283
3285
|
|
|
3284
3286
|
// ../core/src/platform/constants/timeouts.ts
|
|
3285
|
-
var DEFAULT_TOOL_TIMEOUT =
|
|
3287
|
+
var DEFAULT_TOOL_TIMEOUT = 6e5;
|
|
3286
3288
|
|
|
3287
3289
|
// ../core/src/execution/engine/agent/actions/executor.ts
|
|
3288
3290
|
async function executeToolCall(iterationContext, action) {
|
|
@@ -4811,9 +4813,7 @@ function createAttioAdapter(credential) {
|
|
|
4811
4813
|
}
|
|
4812
4814
|
|
|
4813
4815
|
// src/worker/adapters/apify.ts
|
|
4814
|
-
var METHODS2 = [
|
|
4815
|
-
"runActor"
|
|
4816
|
-
];
|
|
4816
|
+
var METHODS2 = ["runActor", "getDatasetItems"];
|
|
4817
4817
|
function createApifyAdapter(credential) {
|
|
4818
4818
|
return createAdapter("apify", METHODS2, credential);
|
|
4819
4819
|
}
|
package/package.json
CHANGED
|
@@ -249,8 +249,8 @@ Not all scaffolded files participate in template updates. Files fall into two ca
|
|
|
249
249
|
|
|
250
250
|
- `elevasis.config.ts`, `.gitignore`, `CLAUDE.md`, `.claude/settings.json`
|
|
251
251
|
- Three hooks: `.claude/hooks/enforce-sdk-boundary.mjs`, `.claude/hooks/post-edit-validate.mjs`, `.claude/hooks/tool-failure-recovery.mjs`
|
|
252
|
-
-
|
|
253
|
-
-
|
|
252
|
+
- Three command files: `.claude/commands/meta.md`, `.claude/commands/docs.md`, `.claude/commands/tutorial.md`
|
|
253
|
+
- Two skills: `.claude/skills/work/SKILL.md`, `.claude/skills/creds/SKILL.md`
|
|
254
254
|
- Five rule files: `.claude/rules/sdk-patterns.md`, `.claude/rules/docs-authoring.md`, `.claude/rules/memory-conventions.md`, `.claude/rules/project-map.md`, `.claude/rules/task-tracking.md`
|
|
255
255
|
- One script: `.claude/scripts/statusline-command.js`
|
|
256
256
|
|