@elizaos/plugin-agent-orchestrator 0.3.14 → 0.3.16

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/index.js CHANGED
@@ -5964,11 +5964,51 @@ Assistant:
5964
5964
  <agents>Fix the authentication bug in src/auth.ts — users get 401 after token refresh. Your unique identifier is "alpha". | Write comprehensive unit tests for the auth module in src/auth.ts. Your unique identifier is "beta". | Update the API documentation in docs/ to reflect the new auth flow. Your unique identifier is "gamma".</agents>
5965
5965
  </START_CODING_TASK>
5966
5966
  </params>`;
5967
+ var CODING_PHRASES = [
5968
+ /\bcoding\b/,
5969
+ /\bgithub\b/,
5970
+ /\bclone\b/,
5971
+ /\bspawn\b/,
5972
+ /\bworkspace\b/,
5973
+ /\bpull request\b/,
5974
+ /\bfix bug\b/,
5975
+ /\bwrite test\b/,
5976
+ /\bcoding task\b/,
5977
+ /\bstart task\b/,
5978
+ /\bfinalize\b/
5979
+ ];
5980
+ var STRONG_TRIGGERS = [/\bcode\b/, /\bagent\b/, /\brepo\b/, /\bdeploy\b/, /\bpr\b/];
5981
+ var CODING_COLLOCATIONS = [
5982
+ /\bgit\s+commit\b/,
5983
+ /\bgit\s+branch\b/,
5984
+ /\bgit\s+merge\b/,
5985
+ /\bbuild\s+(app|project|repo|code|pipeline)\b/,
5986
+ /\bmerge\s+(conflict|request|branch)\b/,
5987
+ /\bcommit\s+(message|hash|history|change)\b/,
5988
+ /\bbranch\s+(off|from|name|out)\b/
5989
+ ];
5990
+ function looksLikeCodingRequest(text) {
5991
+ const lower = text.toLowerCase();
5992
+ if (CODING_PHRASES.some((re) => re.test(lower)))
5993
+ return true;
5994
+ if (STRONG_TRIGGERS.some((re) => re.test(lower)))
5995
+ return true;
5996
+ return CODING_COLLOCATIONS.some((re) => re.test(lower));
5997
+ }
5967
5998
  var codingAgentExamplesProvider = {
5968
5999
  name: "CODING_AGENT_EXAMPLES",
5969
6000
  description: "Structured examples showing how to use coding agent actions with parameters",
5970
6001
  position: -1,
5971
6002
  get: async (_runtime, _message, _state) => {
6003
+ const userText = (typeof _message.content === "string" ? _message.content : _message.content?.text) ?? "";
6004
+ if (!looksLikeCodingRequest(userText)) {
6005
+ const brief = "Use START_CODING_TASK to launch coding agents (handles workspace setup automatically). " + "Use SEND_TO_CODING_AGENT to interact with running agents. " + "Use FINALIZE_WORKSPACE to create PRs from agent work.";
6006
+ return {
6007
+ data: { codingAgentExamples: [] },
6008
+ values: { codingAgentExamples: brief },
6009
+ text: brief
6010
+ };
6011
+ }
5972
6012
  const examples = CODING_AGENT_EXAMPLES.map(formatExample).join(`
5973
6013
 
5974
6014
  `);
@@ -7895,5 +7935,5 @@ export {
7895
7935
  CodingWorkspaceService
7896
7936
  };
7897
7937
 
7898
- //# debugId=C0B3DB8984D7685C64756E2164756E21
7938
+ //# debugId=9A77138F9177BAEA64756E2164756E21
7899
7939
  //# sourceMappingURL=index.js.map