@bluelovers/opencode-arise 0.1.11 → 0.1.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/README.md CHANGED
@@ -18,14 +18,26 @@ A lightweight, token-efficient orchestrator layer that extends [OpenCode](https:
18
18
  ## Installation
19
19
 
20
20
  ```bash
21
- bunx opencode-arise install
21
+ bunx @bluelovers/opencode-arise install
22
22
  ```
23
23
 
24
24
  This registers the plugin with OpenCode and creates a default config.
25
25
 
26
+ or
27
+
28
+ `~/.config/opencode/opencode.jsonc`
29
+
30
+ ```jsonc
31
+ {
32
+ "plugins": [
33
+ "@bluelovers/opencode-arise@latest"
34
+ ]
35
+ }
36
+ ```
37
+
26
38
  **Verify installation:**
27
39
  ```bash
28
- bunx opencode-arise doctor
40
+ bunx @bluelovers/opencode-arise doctor
29
41
  ```
30
42
 
31
43
  ## Quick Start
@@ -262,7 +274,7 @@ Contributions are welcome! Please read the contributing guidelines first.
262
274
 
263
275
  ```bash
264
276
  # Clone the repo
265
- git clone https://github.com/moinulmoin/opencode-arise.git
277
+ git clone https://github.com/bluelovers/opencode-arise.git
266
278
  cd opencode-arise
267
279
 
268
280
  # Install dependencies
package/dist/cli/index.js CHANGED
@@ -6966,8 +6966,31 @@ var require_npa_to_deps = __commonJS((exports) => {
6966
6966
  // src/cli/index.ts
6967
6967
  var import_fs_extra4 = __toESM(require_lib(), 1);
6968
6968
 
6969
+ // src/types/version.ts
6970
+ var PLUGIN_VERSION = "0.1.13";
6971
+ var PLUGIN_VERSION_HOMEPAGE = "https://github.com/bluelovers/opencode-arise#readme";
6972
+
6969
6973
  // src/hooks/arise-banner.ts
6970
- var BANNER_ASCII = `
6974
+ function centerPad(text, totalWidth) {
6975
+ const textLength = text.length;
6976
+ const padding = totalWidth - textLength;
6977
+ if (padding <= 0) {
6978
+ return text;
6979
+ }
6980
+ const leftPadding = Math.floor(padding / 2);
6981
+ const rightPadding = padding - leftPadding;
6982
+ return " ".repeat(leftPadding) + text + " ".repeat(rightPadding);
6983
+ }
6984
+ var BANNER_CONTENT_WIDTH = 58;
6985
+ function generateVersionLine(version) {
6986
+ const versionText = `v${version}`;
6987
+ const padded = centerPad(versionText, BANNER_CONTENT_WIDTH);
6988
+ return `\u2551${padded}\u2551`;
6989
+ }
6990
+ function generateBannerASCII(version) {
6991
+ const ver = version ?? PLUGIN_VERSION;
6992
+ const versionLine = generateVersionLine(ver);
6993
+ return `
6971
6994
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
6972
6995
  \u2551 \u2551
6973
6996
  \u2551 \u2694\uFE0F A R I S E ! \u2694\uFE0F \u2551
@@ -6978,10 +7001,14 @@ var BANNER_ASCII = `
6978
7001
  \u2551 \u2551
6979
7002
  \u2551 Monarch ready. Shadows await your command. \u2551
6980
7003
  \u2551 \u2551
7004
+ ${versionLine}
6981
7005
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
7006
+ ${PLUGIN_VERSION_HOMEPAGE}
6982
7007
  `;
7008
+ }
7009
+ var TOAST_MESSAGE = `\u2694\uFE0F ARISE! Shadow Army Assembled. Monarch ready. v${PLUGIN_VERSION}`;
6983
7010
  function getBanner() {
6984
- return BANNER_ASCII;
7011
+ return generateBannerASCII(PLUGIN_VERSION);
6985
7012
  }
6986
7013
 
6987
7014
  // src/config/paths.ts
@@ -20521,6 +20548,14 @@ function date4(params) {
20521
20548
 
20522
20549
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
20523
20550
  config(en_default());
20551
+ // src/types/enum-opencode.ts
20552
+ var ALLOWED_LOG_LEVELS = [
20553
+ "error" /* Error */,
20554
+ "warn" /* Warn */,
20555
+ "info" /* Info */,
20556
+ "debug" /* Debug */
20557
+ ];
20558
+
20524
20559
  // src/types/enums.ts
20525
20560
  var ALLOWED_SHADOWS = [
20526
20561
  "beru" /* Beru */,
@@ -22615,14 +22650,46 @@ var LEGACY_PLUGIN_NAME = "opencode-arise";
22615
22650
 
22616
22651
  // src/types/const-default.ts
22617
22652
  var AUTO_MODEL = "AUTO";
22618
- var AutoModelSchema = exports_external.literal(AUTO_MODEL);
22653
+ var AutoModelSchema = exports_external.literal(AUTO_MODEL).meta({
22654
+ description: "\u81EA\u52D5\u6A21\u578B\u6A19\u8A18\uFF0C\u8868\u793A\u81EA\u52D5\u6CBF\u7528\u4E3B\u4EFB\u52D9\u7684\u6A21\u578B / Auto model marker, inherits parent task's model",
22655
+ title: "Auto Model"
22656
+ });
22657
+
22658
+ // src/utils/type-guard.ts
22659
+ function _isNonNullableObject(value) {
22660
+ return typeof value === "object" && value !== null && !Array.isArray(value);
22661
+ }
22662
+
22663
+ // src/utils/config-merge.ts
22664
+ function deepMerge3(target, source) {
22665
+ if (source === undefined || source === null) {
22666
+ return target;
22667
+ }
22668
+ const result = { ...target };
22669
+ for (const key of Object.keys(source)) {
22670
+ const sourceValue = source[key];
22671
+ const targetValue = target[key];
22672
+ if (_isNonNullableObject(sourceValue) && _isNonNullableObject(targetValue)) {
22673
+ result[key] = deepMerge3(targetValue, sourceValue);
22674
+ } else if (sourceValue !== undefined) {
22675
+ result[key] = sourceValue;
22676
+ }
22677
+ }
22678
+ return result;
22679
+ }
22619
22680
 
22620
22681
  // src/config/schema.ts
22621
22682
  var DEFAULT_POLL_INTERVAL = 2000;
22622
22683
  var DEFAULT_RETRY_DELAY_INCREMENT = 5000;
22623
22684
  var DEFAULT_RETRY_DELAY_MAX = 60000;
22624
- var ShadowName = exports_external.enum(ALL_SHADOW_AGENTS_NAME);
22625
- var HookName = exports_external.enum(ALLOWED_HOOKS);
22685
+ var ShadowName = exports_external.enum(ALL_SHADOW_AGENTS_NAME).meta({
22686
+ description: "Shadow \u4EE3\u7406\u540D\u7A31 / Shadow agent name",
22687
+ title: "Shadow Agent Name"
22688
+ });
22689
+ var HookName = exports_external.enum(ALLOWED_HOOKS).meta({
22690
+ description: "\u751F\u547D\u9031\u671F Hook \u540D\u7A31 / Lifecycle hook name",
22691
+ title: "Hook Name"
22692
+ });
22626
22693
  var AgentOverride = exports_external.object({
22627
22694
  model: exports_external.string().optional(),
22628
22695
  disabled: exports_external.boolean().optional(),
@@ -22641,7 +22708,13 @@ var AgentOverride = exports_external.object({
22641
22708
  final: exports_external.string().optional(),
22642
22709
  custom: exports_external.array(exports_external.string()).optional()
22643
22710
  }).optional()
22711
+ }).meta({
22712
+ description: "\u81EA\u52D5\u7E7C\u7E8C\u4EFB\u52D9\u8A2D\u5B9A / Auto resume settings",
22713
+ title: "Auto Resume"
22644
22714
  }).optional()
22715
+ }).meta({
22716
+ description: "\u4EE3\u7406\u8986\u5BEB\u8A2D\u5B9A / Agent override settings",
22717
+ title: "Agent Override"
22645
22718
  });
22646
22719
  var AriseConfigSchema = exports_external.object({
22647
22720
  $schema: exports_external.string().optional(),
@@ -22653,10 +22726,16 @@ var AriseConfigSchema = exports_external.object({
22653
22726
  output_shaping: exports_external.object({
22654
22727
  max_chars: exports_external.number().default(12000),
22655
22728
  preserve_errors: exports_external.boolean().default(true)
22729
+ }).meta({
22730
+ description: "\u8F38\u51FA\u622A\u65B7\u8A2D\u5B9A / Output truncation settings",
22731
+ title: "Output Shaping"
22656
22732
  }).optional(),
22657
22733
  compaction: exports_external.object({
22658
22734
  threshold_percent: exports_external.number().min(50).max(95).default(80),
22659
22735
  preserve_todos: exports_external.boolean().default(true)
22736
+ }).meta({
22737
+ description: "\u5C0D\u8A71\u58D3\u7E2E\u8A2D\u5B9A / Conversation compaction settings",
22738
+ title: "Compaction"
22660
22739
  }).optional(),
22661
22740
  background: exports_external.object({
22662
22741
  poll_interval: exports_external.number().default(DEFAULT_POLL_INTERVAL),
@@ -22672,23 +22751,87 @@ var AriseConfigSchema = exports_external.object({
22672
22751
  retry: exports_external.string().optional(),
22673
22752
  final: exports_external.string().optional(),
22674
22753
  custom: exports_external.array(exports_external.string()).optional()
22754
+ }).meta({
22755
+ description: "\u81EA\u8A02\u63D0\u793A\u8A0A\u606F / Custom prompts",
22756
+ title: "Prompts"
22675
22757
  }).optional()
22758
+ }).meta({
22759
+ description: "\u81EA\u52D5\u7E7C\u7E8C\u4EFB\u52D9\u8A2D\u5B9A / Auto resume settings",
22760
+ title: "Auto Resume"
22676
22761
  }).optional()
22762
+ }).meta({
22763
+ description: "\u80CC\u666F\u4EFB\u52D9\u8A2D\u5B9A / Background task settings",
22764
+ title: "Background"
22677
22765
  }).optional(),
22678
22766
  debug: exports_external.object({
22679
22767
  enabled: exports_external.boolean().default(false),
22680
- level: exports_external.enum(["error", "warn", "info", "debug"]).default("warn")
22768
+ level: exports_external.enum(ALLOWED_LOG_LEVELS).default("warn" /* Warn */)
22769
+ }).meta({
22770
+ description: "\u9664\u932F\u8A2D\u5B9A / Debug settings",
22771
+ title: "Debug"
22681
22772
  }).optional()
22682
- });
22683
- function _createConfigGetter(configKey, defaultValue) {
22773
+ }).meta({
22774
+ description: "Arise \u4E3B\u914D\u7F6E\u7D50\u69CB / Arise main configuration schema",
22775
+ title: "Arise Config"
22776
+ });
22777
+ var DEFAULT_CONFIG = {
22778
+ show_banner: true,
22779
+ banner_every_session: false,
22780
+ disabled_shadows: [],
22781
+ disabled_hooks: [],
22782
+ output_shaping: {
22783
+ max_chars: 12000,
22784
+ preserve_errors: true
22785
+ },
22786
+ compaction: {
22787
+ threshold_percent: 80,
22788
+ preserve_todos: true
22789
+ },
22790
+ background: {
22791
+ poll_interval: DEFAULT_POLL_INTERVAL,
22792
+ retry_delay_increment: DEFAULT_RETRY_DELAY_INCREMENT,
22793
+ retry_delay_max: DEFAULT_RETRY_DELAY_MAX,
22794
+ auto_resume: {
22795
+ enabled: false,
22796
+ max_retries: 3,
22797
+ retry_delay: 5000,
22798
+ on_error: "ignore",
22799
+ target: "background",
22800
+ prompts: {
22801
+ retry: undefined,
22802
+ final: undefined,
22803
+ custom: undefined
22804
+ }
22805
+ }
22806
+ },
22807
+ debug: {
22808
+ enabled: false,
22809
+ level: "warn" /* Warn */
22810
+ }
22811
+ };
22812
+ function _createConfigGetter(configKey, defaultValue, options = {}) {
22813
+ const { enableDeepMerge = false } = options;
22684
22814
  return (config2, agentName) => {
22685
- if (agentName && config2.agents?.[agentName]?.[configKey] !== undefined) {
22686
- return config2.agents[agentName][configKey];
22815
+ let result = defaultValue;
22816
+ const backgroundValue = config2.background?.[configKey];
22817
+ if (backgroundValue !== undefined) {
22818
+ if (enableDeepMerge) {
22819
+ result = deepMerge3(result, backgroundValue);
22820
+ } else {
22821
+ result = backgroundValue;
22822
+ }
22687
22823
  }
22688
- if (config2.background?.[configKey] !== undefined) {
22689
- return config2.background[configKey];
22824
+ if (agentName) {
22825
+ const agentValue = config2.agents?.[agentName]?.[configKey];
22826
+ if (agentValue !== undefined) {
22827
+ if (enableDeepMerge) {
22828
+ result = deepMerge3(result, agentValue);
22829
+ } else {
22830
+ result = agentValue;
22831
+ }
22832
+ }
22690
22833
  }
22691
- return defaultValue;
22834
+ return result;
22692
22835
  };
22693
22836
  }
22694
22837
  var getPollInterval = _createConfigGetter("poll_interval", DEFAULT_POLL_INTERVAL);
@@ -22706,7 +22849,7 @@ var DEFAULT_AUTO_MODEL_RESUME = {
22706
22849
  custom: undefined
22707
22850
  }
22708
22851
  };
22709
- var getAutoResumeConfig = _createConfigGetter("auto_resume", DEFAULT_AUTO_MODEL_RESUME);
22852
+ var getAutoResumeConfig = _createConfigGetter("auto_resume", DEFAULT_AUTO_MODEL_RESUME, { enableDeepMerge: true });
22710
22853
 
22711
22854
  // src/utils/bun-shim.ts
22712
22855
  var import_fs_extra2 = __toESM(require_lib(), 1);
package/dist/index.js CHANGED
@@ -20519,17 +20519,68 @@ var ALLOWED_HOOKS = [
20519
20519
  "todo-enforcer" /* TodoEnforcer */
20520
20520
  ];
20521
20521
 
20522
+ // src/types/enum-opencode.ts
20523
+ var ALLOWED_LOG_LEVELS = [
20524
+ "error" /* Error */,
20525
+ "warn" /* Warn */,
20526
+ "info" /* Info */,
20527
+ "debug" /* Debug */
20528
+ ];
20529
+
20522
20530
  // src/types/const-default.ts
20523
20531
  var AUTO_MODEL = "AUTO";
20524
- var AutoModelSchema = exports_external.literal(AUTO_MODEL);
20532
+ var AutoModelSchema = exports_external.literal(AUTO_MODEL).meta({
20533
+ description: "\u81EA\u52D5\u6A21\u578B\u6A19\u8A18\uFF0C\u8868\u793A\u81EA\u52D5\u6CBF\u7528\u4E3B\u4EFB\u52D9\u7684\u6A21\u578B / Auto model marker, inherits parent task's model",
20534
+ title: "Auto Model"
20535
+ });
20525
20536
  var DEFAULT_MODEL = "opencode/big-pickle";
20526
20537
 
20538
+ // src/utils/type-guard.ts
20539
+ function _isNonNullableObject(value) {
20540
+ return typeof value === "object" && value !== null && !Array.isArray(value);
20541
+ }
20542
+
20543
+ // src/utils/config-merge.ts
20544
+ function deepMerge(base, override) {
20545
+ const result = { ...base };
20546
+ for (const [key, value] of Object.entries(override)) {
20547
+ if (typeof value === "object" && value !== null && !Array.isArray(value) && typeof result[key] === "object" && result[key] !== null && !Array.isArray(result[key])) {
20548
+ result[key] = deepMerge(result[key], value);
20549
+ } else {
20550
+ result[key] = value;
20551
+ }
20552
+ }
20553
+ return result;
20554
+ }
20555
+ function deepMerge3(target, source) {
20556
+ if (source === undefined || source === null) {
20557
+ return target;
20558
+ }
20559
+ const result = { ...target };
20560
+ for (const key of Object.keys(source)) {
20561
+ const sourceValue = source[key];
20562
+ const targetValue = target[key];
20563
+ if (_isNonNullableObject(sourceValue) && _isNonNullableObject(targetValue)) {
20564
+ result[key] = deepMerge3(targetValue, sourceValue);
20565
+ } else if (sourceValue !== undefined) {
20566
+ result[key] = sourceValue;
20567
+ }
20568
+ }
20569
+ return result;
20570
+ }
20571
+
20527
20572
  // src/config/schema.ts
20528
20573
  var DEFAULT_POLL_INTERVAL = 2000;
20529
20574
  var DEFAULT_RETRY_DELAY_INCREMENT = 5000;
20530
20575
  var DEFAULT_RETRY_DELAY_MAX = 60000;
20531
- var ShadowName = exports_external.enum(ALL_SHADOW_AGENTS_NAME);
20532
- var HookName = exports_external.enum(ALLOWED_HOOKS);
20576
+ var ShadowName = exports_external.enum(ALL_SHADOW_AGENTS_NAME).meta({
20577
+ description: "Shadow \u4EE3\u7406\u540D\u7A31 / Shadow agent name",
20578
+ title: "Shadow Agent Name"
20579
+ });
20580
+ var HookName = exports_external.enum(ALLOWED_HOOKS).meta({
20581
+ description: "\u751F\u547D\u9031\u671F Hook \u540D\u7A31 / Lifecycle hook name",
20582
+ title: "Hook Name"
20583
+ });
20533
20584
  var AgentOverride = exports_external.object({
20534
20585
  model: exports_external.string().optional(),
20535
20586
  disabled: exports_external.boolean().optional(),
@@ -20548,7 +20599,13 @@ var AgentOverride = exports_external.object({
20548
20599
  final: exports_external.string().optional(),
20549
20600
  custom: exports_external.array(exports_external.string()).optional()
20550
20601
  }).optional()
20602
+ }).meta({
20603
+ description: "\u81EA\u52D5\u7E7C\u7E8C\u4EFB\u52D9\u8A2D\u5B9A / Auto resume settings",
20604
+ title: "Auto Resume"
20551
20605
  }).optional()
20606
+ }).meta({
20607
+ description: "\u4EE3\u7406\u8986\u5BEB\u8A2D\u5B9A / Agent override settings",
20608
+ title: "Agent Override"
20552
20609
  });
20553
20610
  var AriseConfigSchema = exports_external.object({
20554
20611
  $schema: exports_external.string().optional(),
@@ -20560,10 +20617,16 @@ var AriseConfigSchema = exports_external.object({
20560
20617
  output_shaping: exports_external.object({
20561
20618
  max_chars: exports_external.number().default(12000),
20562
20619
  preserve_errors: exports_external.boolean().default(true)
20620
+ }).meta({
20621
+ description: "\u8F38\u51FA\u622A\u65B7\u8A2D\u5B9A / Output truncation settings",
20622
+ title: "Output Shaping"
20563
20623
  }).optional(),
20564
20624
  compaction: exports_external.object({
20565
20625
  threshold_percent: exports_external.number().min(50).max(95).default(80),
20566
20626
  preserve_todos: exports_external.boolean().default(true)
20627
+ }).meta({
20628
+ description: "\u5C0D\u8A71\u58D3\u7E2E\u8A2D\u5B9A / Conversation compaction settings",
20629
+ title: "Compaction"
20567
20630
  }).optional(),
20568
20631
  background: exports_external.object({
20569
20632
  poll_interval: exports_external.number().default(DEFAULT_POLL_INTERVAL),
@@ -20579,13 +20642,28 @@ var AriseConfigSchema = exports_external.object({
20579
20642
  retry: exports_external.string().optional(),
20580
20643
  final: exports_external.string().optional(),
20581
20644
  custom: exports_external.array(exports_external.string()).optional()
20645
+ }).meta({
20646
+ description: "\u81EA\u8A02\u63D0\u793A\u8A0A\u606F / Custom prompts",
20647
+ title: "Prompts"
20582
20648
  }).optional()
20649
+ }).meta({
20650
+ description: "\u81EA\u52D5\u7E7C\u7E8C\u4EFB\u52D9\u8A2D\u5B9A / Auto resume settings",
20651
+ title: "Auto Resume"
20583
20652
  }).optional()
20653
+ }).meta({
20654
+ description: "\u80CC\u666F\u4EFB\u52D9\u8A2D\u5B9A / Background task settings",
20655
+ title: "Background"
20584
20656
  }).optional(),
20585
20657
  debug: exports_external.object({
20586
20658
  enabled: exports_external.boolean().default(false),
20587
- level: exports_external.enum(["error", "warn", "info", "debug"]).default("warn")
20659
+ level: exports_external.enum(ALLOWED_LOG_LEVELS).default("warn" /* Warn */)
20660
+ }).meta({
20661
+ description: "\u9664\u932F\u8A2D\u5B9A / Debug settings",
20662
+ title: "Debug"
20588
20663
  }).optional()
20664
+ }).meta({
20665
+ description: "Arise \u4E3B\u914D\u7F6E\u7D50\u69CB / Arise main configuration schema",
20666
+ title: "Arise Config"
20589
20667
  });
20590
20668
  var DEFAULT_CONFIG = {
20591
20669
  show_banner: true,
@@ -20619,18 +20697,32 @@ var DEFAULT_CONFIG = {
20619
20697
  },
20620
20698
  debug: {
20621
20699
  enabled: false,
20622
- level: "warn"
20700
+ level: "warn" /* Warn */
20623
20701
  }
20624
20702
  };
20625
- function _createConfigGetter(configKey, defaultValue) {
20703
+ function _createConfigGetter(configKey, defaultValue, options = {}) {
20704
+ const { enableDeepMerge = false } = options;
20626
20705
  return (config2, agentName) => {
20627
- if (agentName && config2.agents?.[agentName]?.[configKey] !== undefined) {
20628
- return config2.agents[agentName][configKey];
20706
+ let result = defaultValue;
20707
+ const backgroundValue = config2.background?.[configKey];
20708
+ if (backgroundValue !== undefined) {
20709
+ if (enableDeepMerge) {
20710
+ result = deepMerge3(result, backgroundValue);
20711
+ } else {
20712
+ result = backgroundValue;
20713
+ }
20629
20714
  }
20630
- if (config2.background?.[configKey] !== undefined) {
20631
- return config2.background[configKey];
20715
+ if (agentName) {
20716
+ const agentValue = config2.agents?.[agentName]?.[configKey];
20717
+ if (agentValue !== undefined) {
20718
+ if (enableDeepMerge) {
20719
+ result = deepMerge3(result, agentValue);
20720
+ } else {
20721
+ result = agentValue;
20722
+ }
20723
+ }
20632
20724
  }
20633
- return defaultValue;
20725
+ return result;
20634
20726
  };
20635
20727
  }
20636
20728
  var getPollInterval = _createConfigGetter("poll_interval", DEFAULT_POLL_INTERVAL);
@@ -20648,7 +20740,7 @@ var DEFAULT_AUTO_MODEL_RESUME = {
20648
20740
  custom: undefined
20649
20741
  }
20650
20742
  };
20651
- var getAutoResumeConfig = _createConfigGetter("auto_resume", DEFAULT_AUTO_MODEL_RESUME);
20743
+ var getAutoResumeConfig = _createConfigGetter("auto_resume", DEFAULT_AUTO_MODEL_RESUME, { enableDeepMerge: true });
20652
20744
 
20653
20745
  // src/config/io.ts
20654
20746
  var import_npa_to_deps = __toESM(require_npa_to_deps(), 1);
@@ -22725,17 +22817,6 @@ function createBunShim() {
22725
22817
  var FakeBun = createBunShim();
22726
22818
 
22727
22819
  // src/config/io.ts
22728
- function deepMerge(base, override) {
22729
- const result = { ...base };
22730
- for (const [key, value] of Object.entries(override)) {
22731
- if (typeof value === "object" && value !== null && !Array.isArray(value) && typeof result[key] === "object" && result[key] !== null && !Array.isArray(result[key])) {
22732
- result[key] = deepMerge(result[key], value);
22733
- } else {
22734
- result[key] = value;
22735
- }
22736
- }
22737
- return result;
22738
- }
22739
22820
  function loadAriseConfig(ctx) {
22740
22821
  return loadAriseConfigByPath(ctx.worktree);
22741
22822
  }
@@ -22803,6 +22884,11 @@ function getProvidersCache(forceRefresh = false) {
22803
22884
  }
22804
22885
  return providersCache;
22805
22886
  }
22887
+ // src/utils/string-utils.ts
22888
+ function _isNotEmpty(value) {
22889
+ return value?.trim().length > 0;
22890
+ }
22891
+
22806
22892
  // src/utils/model-resolver.ts
22807
22893
  function getModelFromConfig(config2, shadowName) {
22808
22894
  return config2?.agents?.[shadowName]?.model;
@@ -22839,9 +22925,6 @@ function resolveModelContext(parentModel, shadow, config2, userModel) {
22839
22925
  function _isAutoModel(model) {
22840
22926
  return model === AUTO_MODEL;
22841
22927
  }
22842
- function _isNotEmpty(model) {
22843
- return model?.trim().length > 0;
22844
- }
22845
22928
  function _isDefinedAndNotAutoModel(model) {
22846
22929
  return _isNotEmpty(model) && !_isAutoModel(model);
22847
22930
  }
@@ -22996,8 +23079,11 @@ function extractTextFromMessageParts(parts) {
22996
23079
  }).join("");
22997
23080
  }
22998
23081
 
23082
+ // src/types/version.ts
23083
+ var PLUGIN_VERSION = "0.1.13";
23084
+
22999
23085
  // src/hooks/arise-banner.ts
23000
- var TOAST_MESSAGE = "\u2694\uFE0F ARISE! Shadow Army Assembled. Monarch ready.";
23086
+ var TOAST_MESSAGE = `\u2694\uFE0F ARISE! Shadow Army Assembled. Monarch ready. v${PLUGIN_VERSION}`;
23001
23087
  var bannerShownThisProcess = false;
23002
23088
  function createAriseBannerHook(ctx) {
23003
23089
  const showToast = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluelovers/opencode-arise",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "private": false,
5
5
  "description": "Solo Leveling themed orchestrator harness for OpenCode - Arise, Shadow Army!",
6
6
  "keywords": [
@@ -12,16 +12,19 @@
12
12
  "solo-leveling",
13
13
  "arise"
14
14
  ],
15
- "homepage": "https://github.com/moinulmoin/opencode-arise#readme",
15
+ "homepage": "https://github.com/bluelovers/opencode-arise#readme",
16
16
  "bugs": {
17
- "url": "https://github.com/moinulmoin/opencode-arise/issues"
17
+ "url": "https://github.com/bluelovers/opencode-arise/issues"
18
18
  },
19
19
  "repository": {
20
20
  "type": "git",
21
- "url": "git+https://github.com/moinulmoin/opencode-arise.git"
21
+ "url": "git+https://github.com/bluelovers/opencode-arise.git"
22
22
  },
23
23
  "license": "MIT",
24
24
  "author": "moinulmoin",
25
+ "contributors": [
26
+ "bluelovers"
27
+ ],
25
28
  "type": "module",
26
29
  "exports": {
27
30
  ".": {
@@ -43,8 +46,9 @@
43
46
  "test": "cross-env NO_COLOR=1 FORCE_COLOR=0 bun --env-file=.env.test test --update-snapshots",
44
47
  "test:color": "bun test --update-snapshots",
45
48
  "posttest": "echo posttest",
46
- "prebuild": "node --run clean",
49
+ "prebuild": "node --run build:version && node --run clean",
47
50
  "build": "node --run build:bun",
51
+ "build:version": "bun test/scripts/generate-version.ts",
48
52
  "build:bun": "bun build src/index.ts --outdir dist --target bun && bun build src/cli/index.ts --outdir dist/cli --target bun && tsc --emitDeclarationOnly",
49
53
  "build:tsc": "tsc",
50
54
  "npm:publish:bump": "node --run version:bump && npm publish",