@pal-code/core 0.0.18 → 0.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pal-code/core",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "Core runtime for pal — agent loop, providers, tools, sessions",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
package/src/agent/turn.ts CHANGED
@@ -81,8 +81,15 @@ export type Approval = (
81
81
  args: Record<string, unknown>,
82
82
  ) => Promise<ApprovalDecision>;
83
83
 
84
- /** Default extension set when the user hasn't configured one. */
85
- export const DEFAULT_EXTENSIONS = ['@pal-code/web-search', '@pal-code/agents', '@pal-code/mcp'];
84
+ /**
85
+ * Default extension set when the user hasn't configured one.
86
+ *
87
+ * Imported and re-exported from app-config so there is exactly one list. A
88
+ * second copy here is how `jev`, `memory` and `workflow` ended up shipping
89
+ * without ever loading.
90
+ */
91
+ import {DEFAULT_EXTENSIONS} from '../app-config.js';
92
+ export {DEFAULT_EXTENSIONS};
86
93
 
87
94
  let extensionsLoaded = false;
88
95
 
package/src/app-config.ts CHANGED
@@ -37,6 +37,27 @@ const DEFAULT_SYSTEM_PROMPT = [
37
37
 
38
38
  const EFFORTS = ['low', 'medium', 'high'] as const;
39
39
 
40
+ /**
41
+ * Extensions every install gets when `~/.pal/config.json` names none.
42
+ *
43
+ * Single source of truth: `agent/turn.ts` re-exports this as
44
+ * `DEFAULT_EXTENSIONS` rather than keeping its own copy, because two lists
45
+ * drifting apart is exactly how `jev`, `memory` and `workflow` shipped without
46
+ * ever being loaded.
47
+ *
48
+ * Order matters only for display. `jev`, `memory` and `workflow` report
49
+ * themselves unavailable when the repo has no `.memory`/`.work` directory, so
50
+ * they load but stay inert until those directories exist.
51
+ */
52
+ export const DEFAULT_EXTENSIONS: string[] = [
53
+ '@pal-code/web-search',
54
+ '@pal-code/agents',
55
+ '@pal-code/mcp',
56
+ '@pal-code/jev',
57
+ '@pal-code/memory',
58
+ '@pal-code/workflow',
59
+ ];
60
+
40
61
  /** Parse a non-negative integer env var, warning and falling back when invalid. */
41
62
  function intEnv(name: string, fallback: number, min = 0): number {
42
63
  const raw = process.env[name]?.trim();
@@ -108,11 +129,7 @@ export function loadConfig(): Config {
108
129
 
109
130
  // Extensions: use saved list or default to the shipped set.
110
131
  const savedExtensions = Array.isArray(saved.extensions) ? saved.extensions : undefined;
111
- const extensions = savedExtensions ?? [
112
- '@pal-code/web-search',
113
- '@pal-code/agents',
114
- '@pal-code/mcp',
115
- ];
132
+ const extensions = savedExtensions ?? DEFAULT_EXTENSIONS;
116
133
 
117
134
  // Context limit: env wins, then config.json, then the built-in default.
118
135
  const savedContextLimit = intConfig(saved.contextLimit, 'contextLimit');