@bastani/atomic 0.8.28-alpha.4 → 0.8.29-alpha.2
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/CHANGELOG.md +75 -0
- package/dist/builtin/cursor/CHANGELOG.md +27 -0
- package/dist/builtin/cursor/LICENSE +26 -0
- package/dist/builtin/cursor/README.md +22 -0
- package/dist/builtin/cursor/index.ts +9 -0
- package/dist/builtin/cursor/package.json +46 -0
- package/dist/builtin/cursor/src/auth.ts +352 -0
- package/dist/builtin/cursor/src/catalog-cache.ts +155 -0
- package/dist/builtin/cursor/src/config.ts +123 -0
- package/dist/builtin/cursor/src/conversation-state.ts +135 -0
- package/dist/builtin/cursor/src/cursor-models-raw.json +583 -0
- package/dist/builtin/cursor/src/model-mapper.ts +270 -0
- package/dist/builtin/cursor/src/models.ts +54 -0
- package/dist/builtin/cursor/src/native-loader.ts +71 -0
- package/dist/builtin/cursor/src/proto/README.md +34 -0
- package/dist/builtin/cursor/src/proto/agent_pb.ts +15294 -0
- package/dist/builtin/cursor/src/proto/protobuf-codec.ts +717 -0
- package/dist/builtin/cursor/src/provider.ts +301 -0
- package/dist/builtin/cursor/src/stream.ts +564 -0
- package/dist/builtin/cursor/src/transport.ts +791 -0
- package/dist/builtin/intercom/CHANGELOG.md +10 -0
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/intercom/skills/intercom/SKILL.md +5 -5
- package/dist/builtin/mcp/CHANGELOG.md +10 -0
- package/dist/builtin/mcp/package.json +3 -3
- package/dist/builtin/subagents/CHANGELOG.md +18 -0
- package/dist/builtin/subagents/README.md +7 -3
- package/dist/builtin/subagents/agents/codebase-online-researcher.md +9 -24
- package/dist/builtin/subagents/agents/debugger.md +3 -5
- package/dist/builtin/subagents/package.json +4 -4
- package/dist/builtin/subagents/src/runs/background/subagent-runner.ts +2 -1
- package/dist/builtin/subagents/src/runs/foreground/execution.ts +2 -1
- package/dist/builtin/subagents/src/runs/shared/parallel-utils.ts +1 -0
- package/dist/builtin/subagents/src/runs/shared/pi-args.ts +19 -2
- package/dist/builtin/subagents/src/runs/shared/structured-output.ts +271 -10
- package/dist/builtin/subagents/src/runs/shared/subagent-prompt-runtime.ts +12 -39
- package/dist/builtin/subagents/src/shared/types.ts +1 -0
- package/dist/builtin/subagents/src/shared/utils.ts +50 -10
- package/dist/builtin/subagents/src/slash/saved-chain-mapping.ts +77 -0
- package/dist/builtin/subagents/src/slash/slash-commands.ts +1 -55
- package/dist/builtin/web-access/CHANGELOG.md +11 -1
- package/dist/builtin/web-access/README.md +1 -1
- package/dist/builtin/web-access/github-extract.ts +1 -1
- package/dist/builtin/web-access/package.json +3 -3
- package/dist/builtin/workflows/CHANGELOG.md +44 -0
- package/dist/builtin/workflows/README.md +19 -1
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/skills/research-codebase/SKILL.md +17 -3
- package/dist/builtin/workflows/src/extension/wiring.ts +17 -1
- package/dist/builtin/workflows/src/extension/workflow-schema.ts +34 -0
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +13 -2
- package/dist/builtin/workflows/src/runs/foreground/stage-runner.ts +86 -14
- package/dist/builtin/workflows/src/shared/authoring-contract.d.ts +11 -3
- package/dist/builtin/workflows/src/shared/types.ts +8 -4
- package/dist/builtin/workflows/src/tui/overlay-adapter.ts +64 -2
- package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +8 -8
- package/dist/builtin/workflows/src/tui/workflow-status.ts +2 -0
- package/dist/core/builtin-packages.d.ts.map +1 -1
- package/dist/core/builtin-packages.js +6 -0
- package/dist/core/builtin-packages.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/types.d.ts +20 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/model-resolver.d.ts +1 -0
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +17 -8
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/package-manager.d.ts +11 -9
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +55 -10
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/project-trust.d.ts +1 -0
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js +3 -3
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/resource-loader.d.ts +9 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +72 -9
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts +3 -3
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +5 -5
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/tools/index.d.ts +1 -0
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +1 -0
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/structured-output.d.ts +39 -0
- package/dist/core/tools/structured-output.d.ts.map +1 -0
- package/dist/core/tools/structured-output.js +141 -0
- package/dist/core/tools/structured-output.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +36 -14
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +3 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +16 -0
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +11 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +158 -11
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +39 -0
- package/dist/modes/print-mode.js.map +1 -1
- package/docs/custom-provider.md +1 -0
- package/docs/extensions.md +2 -2
- package/docs/models.md +2 -0
- package/docs/packages.md +3 -1
- package/docs/providers.md +15 -0
- package/docs/sdk.md +61 -0
- package/docs/security.md +1 -1
- package/docs/subagents.md +21 -0
- package/docs/usage.md +2 -0
- package/docs/workflows.md +10 -7
- package/examples/extensions/README.md +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/structured-output.ts +22 -53
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +12 -9
|
@@ -60,10 +60,13 @@ function getCommandEnv(command, overrides) {
|
|
|
60
60
|
* 2 user + settings entry (source: "local", scope: "user")
|
|
61
61
|
* 3 user + auto-discovered (source: "auto", scope: "user")
|
|
62
62
|
* 4 package resource (origin: "package")
|
|
63
|
+
* 5 project-local resources borrowed from explicit temporary extension sources
|
|
63
64
|
*/
|
|
64
65
|
function resourcePrecedenceRank(m) {
|
|
65
66
|
if (m.origin === "package")
|
|
66
67
|
return 4;
|
|
68
|
+
if (m.borrowedProjectLocal)
|
|
69
|
+
return 5;
|
|
67
70
|
const scopeBase = m.scope === "project" ? 0 : 2;
|
|
68
71
|
return scopeBase + (m.source === "local" ? 0 : 1);
|
|
69
72
|
}
|
|
@@ -772,7 +775,9 @@ export class DefaultPackageManager {
|
|
|
772
775
|
const accumulator = this.createAccumulator();
|
|
773
776
|
const scope = options?.temporary ? "temporary" : options?.local ? "project" : "user";
|
|
774
777
|
const packageSources = sources.map((source) => ({ pkg: source, scope }));
|
|
775
|
-
await this.resolvePackageSources(packageSources, accumulator
|
|
778
|
+
await this.resolvePackageSources(packageSources, accumulator, undefined, {
|
|
779
|
+
includeProjectLocalResources: options?.includeProjectLocalResources === true,
|
|
780
|
+
});
|
|
776
781
|
return this.toResolvedPaths(accumulator);
|
|
777
782
|
}
|
|
778
783
|
listConfiguredPackages() {
|
|
@@ -1016,7 +1021,7 @@ export class DefaultPackageManager {
|
|
|
1016
1021
|
const results = await this.runWithConcurrency(checks, UPDATE_CHECK_CONCURRENCY);
|
|
1017
1022
|
return results.filter((result) => result !== undefined);
|
|
1018
1023
|
}
|
|
1019
|
-
async resolvePackageSources(sources, accumulator, onMissing) {
|
|
1024
|
+
async resolvePackageSources(sources, accumulator, onMissing, options) {
|
|
1020
1025
|
for (const { pkg, scope } of sources) {
|
|
1021
1026
|
const sourceStr = typeof pkg === "string" ? pkg : pkg.source;
|
|
1022
1027
|
const filter = typeof pkg === "object" ? pkg : undefined;
|
|
@@ -1024,7 +1029,9 @@ export class DefaultPackageManager {
|
|
|
1024
1029
|
const metadata = { source: sourceStr, scope, origin: "package" };
|
|
1025
1030
|
if (parsed.type === "local") {
|
|
1026
1031
|
for (const baseDir of this.getBaseDirsForScope(scope)) {
|
|
1027
|
-
this.resolveLocalExtensionSource(parsed, accumulator, filter, { ...metadata, baseDir }, baseDir
|
|
1032
|
+
this.resolveLocalExtensionSource(parsed, accumulator, filter, { ...metadata, baseDir }, baseDir, {
|
|
1033
|
+
includeProjectLocalResources: options?.includeProjectLocalResources === true,
|
|
1034
|
+
});
|
|
1028
1035
|
}
|
|
1029
1036
|
continue;
|
|
1030
1037
|
}
|
|
@@ -1076,7 +1083,7 @@ export class DefaultPackageManager {
|
|
|
1076
1083
|
}
|
|
1077
1084
|
}
|
|
1078
1085
|
}
|
|
1079
|
-
resolveLocalExtensionSource(source, accumulator, filter, metadata, baseDir) {
|
|
1086
|
+
resolveLocalExtensionSource(source, accumulator, filter, metadata, baseDir, options) {
|
|
1080
1087
|
const resolved = this.resolvePathFromBase(source.path, baseDir);
|
|
1081
1088
|
if (!existsSync(resolved)) {
|
|
1082
1089
|
return;
|
|
@@ -1084,15 +1091,19 @@ export class DefaultPackageManager {
|
|
|
1084
1091
|
try {
|
|
1085
1092
|
const stats = statSync(resolved);
|
|
1086
1093
|
if (stats.isFile()) {
|
|
1087
|
-
metadata
|
|
1088
|
-
this.addResource(accumulator.extensions, resolved, metadata, true);
|
|
1094
|
+
this.addResource(accumulator.extensions, resolved, { ...metadata, baseDir: dirname(resolved) }, true);
|
|
1089
1095
|
return;
|
|
1090
1096
|
}
|
|
1091
1097
|
if (stats.isDirectory()) {
|
|
1092
|
-
metadata
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1095
|
-
this.
|
|
1098
|
+
const packageMetadata = { ...metadata, baseDir: resolved };
|
|
1099
|
+
const packageResources = this.collectPackageResources(resolved, accumulator, filter, packageMetadata);
|
|
1100
|
+
const projectLocalResources = options?.includeProjectLocalResources
|
|
1101
|
+
? this.collectProjectLocalResources(resolved, accumulator, filter, packageMetadata)
|
|
1102
|
+
: false;
|
|
1103
|
+
const extensionEntries = resolveExtensionEntries(resolved);
|
|
1104
|
+
const shouldAddDirectoryFallback = extensionEntries !== null || (options?.includeProjectLocalResources === true && !projectLocalResources);
|
|
1105
|
+
if (!packageResources && shouldAddDirectoryFallback) {
|
|
1106
|
+
this.addResource(accumulator.extensions, resolved, packageMetadata, true);
|
|
1096
1107
|
}
|
|
1097
1108
|
}
|
|
1098
1109
|
}
|
|
@@ -1811,6 +1822,40 @@ export class DefaultPackageManager {
|
|
|
1811
1822
|
}
|
|
1812
1823
|
return hasAnyDir;
|
|
1813
1824
|
}
|
|
1825
|
+
collectProjectLocalResources(sourceRoot, accumulator, filter, metadata) {
|
|
1826
|
+
let found = false;
|
|
1827
|
+
const projectMetadata = { ...metadata, origin: "top-level", borrowedProjectLocal: true };
|
|
1828
|
+
const addResources = (resourceType, paths, resourceMetadata, patterns) => {
|
|
1829
|
+
if (paths.length === 0)
|
|
1830
|
+
return;
|
|
1831
|
+
found = true;
|
|
1832
|
+
const target = this.getTargetMap(accumulator, resourceType);
|
|
1833
|
+
let enabledPaths;
|
|
1834
|
+
if (patterns === undefined) {
|
|
1835
|
+
enabledPaths = new Set(paths);
|
|
1836
|
+
}
|
|
1837
|
+
else if (patterns.length === 0) {
|
|
1838
|
+
enabledPaths = new Set();
|
|
1839
|
+
}
|
|
1840
|
+
else {
|
|
1841
|
+
enabledPaths = applyPatterns(paths, patterns, sourceRoot);
|
|
1842
|
+
}
|
|
1843
|
+
for (const path of paths) {
|
|
1844
|
+
this.addResource(target, path, resourceMetadata, enabledPaths.has(path));
|
|
1845
|
+
}
|
|
1846
|
+
};
|
|
1847
|
+
for (const configDir of getProjectConfigDirs(sourceRoot)) {
|
|
1848
|
+
const configMetadata = { ...projectMetadata, baseDir: configDir };
|
|
1849
|
+
addResources("extensions", collectAutoExtensionEntries(join(configDir, "extensions")), configMetadata, filter?.extensions);
|
|
1850
|
+
addResources("skills", collectAutoSkillEntries(join(configDir, "skills"), "pi"), configMetadata, filter?.skills);
|
|
1851
|
+
addResources("prompts", collectAutoPromptEntries(join(configDir, "prompts")), configMetadata, filter?.prompts);
|
|
1852
|
+
addResources("themes", collectAutoThemeEntries(join(configDir, "themes")), configMetadata, filter?.themes);
|
|
1853
|
+
addResources("workflows", collectResourceFiles(join(configDir, "workflows"), "workflows"), configMetadata, filter?.workflows);
|
|
1854
|
+
}
|
|
1855
|
+
const agentsSkillsDir = join(sourceRoot, ".agents", "skills");
|
|
1856
|
+
addResources("skills", collectAutoSkillEntries(agentsSkillsDir, "agents"), { ...projectMetadata, baseDir: dirname(agentsSkillsDir) }, filter?.skills);
|
|
1857
|
+
return found;
|
|
1858
|
+
}
|
|
1814
1859
|
collectDefaultResources(packageRoot, resourceType, target, metadata) {
|
|
1815
1860
|
const manifest = this.readPiManifest(packageRoot);
|
|
1816
1861
|
const entries = manifestEntriesForResource(manifest, resourceType);
|