ubiquity-os / ubiquity-os-kernel

1 stars 19 forks source link

Action plugin SDK #96

Closed whilefoo closed 2 months ago

whilefoo commented 2 months ago

SDK is currently only available for Worker plugins, but it should also be made for Action plugins, additionally we should handle posting error comment inside the SDK so that all plugins will have it.

ubiquity-os[bot] commented 2 months ago

[ 210.2 WXDAI ]

@whilefoo
Contributions Overview
View Contribution Count Reward
Issue Task 1 200
Issue Specification 1 10.2
Review Comment 8 0
Conversation Incentives
Comment Formatting Relevance Reward
SDK is currently only available for Worker plugins, but it shoul…
10.2
content:
  p:
    symbols:
      \b\w+\b:
        count: 34
        multiplier: 0.1
    score: 1
multiplier: 3
1 10.2
Resolves #96 This adds: - Actions SDK - Posting error as com…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 4
        multiplier: 0
    score: 1
  ul:
    symbols:
      \b\w+\b:
        count: 26
        multiplier: 0
    score: 1
  li:
    symbols:
      \b\w+\b:
        count: 6
        multiplier: 0
    score: 1
multiplier: 0
1 -
I'm not sure if logger is working correctly as there is not stac…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 18
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
Hmm it would be nice to have stack trace in the comment but thin…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 41
        multiplier: 0.2
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
it's not supposed to be set when using the SDK, we will set it t…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 36
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
I'm not sure if we even need to log it again here
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 13
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
then we will export both BOT_USER_ID and APP_ID if the plugin de…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 14
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
Wouldn't the kernel fail to build if there are any major changes…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 30
        multiplier: 0.2
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 3
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
Fixed in [ba98cb6](https://github.com/ubiquity/ubiquibot-kernel/…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 3
        multiplier: 0.2
    score: 1
  a:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.2
    score: 1
multiplier: 0
1 -

[ 29.8 WXDAI ]

@gentlementlegen
Contributions Overview
View Contribution Count Reward
Review Comment 13 29.8
Conversation Incentives
Comment Formatting Relevance Reward
Fine with the changes. Eager to see it used in our plugins!
1.2
content:
  p:
    symbols:
      \b\w+\b:
        count: 12
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.2
Might be better to pin dependencies.
0.6
content:
  p:
    symbols:
      \b\w+\b:
        count: 6
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.6
```suggestion config(); ```
0.1
content:
  pre:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.1
Shouldn't the logger be used instead of console?
0.9
content:
  p:
    symbols:
      \b\w+\b:
        count: 9
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.9
How is this value supposed to be set when using the SDK?
1.2
content:
  p:
    symbols:
      \b\w+\b:
        count: 12
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.2
Got it. Shouldn't we set the value now instead of 0?
1.2
content:
  p:
    symbols:
      \b\w+\b:
        count: 12
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.2
I think it is important to log to understand within the plug-in …
3.1
content:
  p:
    symbols:
      \b\w+\b:
        count: 31
        multiplier: 0.1
    score: 1
multiplier: 1
1 3.1
I think this is a really bad idea considering that major version…
4
content:
  p:
    symbols:
      \b\w+\b:
        count: 38
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.1
    score: 1
multiplier: 1
1 4
Yes but in this case that would break all the plugins that worke…
3.9
content:
  p:
    symbols:
      \b\w+\b:
        count: 39
        multiplier: 0.1
    score: 1
multiplier: 1
1 3.9
We cannot revert, we should delete the latest deployed version o…
1.4
content:
  p:
    symbols:
      \b\w+\b:
        count: 13
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.4
This would imply that all plugins have access to `npm` p…
8
content:
  p:
    symbols:
      \b\w+\b:
        count: 79
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 1
multiplier: 1
1 8
Very likely. Still means that we would have to fix it before any…
1.7
content:
  p:
    symbols:
      \b\w+\b:
        count: 17
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.7
We might want to log a message if the issue is missing, to avoid…
2.5
content:
  p:
    symbols:
      \b\w+\b:
        count: 25
        multiplier: 0.1
    score: 1
multiplier: 1
1 2.5

[ 22.2 WXDAI ]

@Keyrxng
Contributions Overview
View Contribution Count Reward
Review Comment 3 22.2
Conversation Incentives
Comment Formatting Relevance Reward
From one of my QA comments: ``` \`\`\`…
6.1
content:
  p:
    symbols:
      \b\w+\b:
        count: 60
        multiplier: 0.1
    score: 1
  pre:
    symbols:
      \b\w+\b:
        count: 16
        multiplier: 0.1
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 1
multiplier: 1
1 6.1
Usually it would say `caller: <Anon..>` as far as …
2.7
content:
  p:
    symbols:
      \b\w+\b:
        count: 25
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.1
    score: 1
  img:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
multiplier: 1
1 2.7
```ts if (err instanceof Error) { errorMessa…
13.4
content:
  pre:
    symbols:
      \b\w+\b:
        count: 12
        multiplier: 0.1
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 1
  h2:
    symbols:
      \b\w+\b:
        count: 75
        multiplier: 0.1
    score: 1
  p:
    symbols:
      \b\w+\b:
        count: 58
        multiplier: 0.1
    score: 1
multiplier: 1
1 13.4

[ 11.8 WXDAI ]

@0x4007
Contributions Overview
View Contribution Count Reward
Review Comment 5 11.8
Conversation Incentives
Comment Formatting Relevance Reward
@Whilefoo can you confirm that `APP_ID` can be used to t…
3.4
content:
  p:
    symbols:
      \b\w+\b:
        count: 33
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 1
multiplier: 1
1 3.4
```suggestion "@ubiquity-dao/ubiquibot-logger":…
1.2
content:
  pre:
    symbols:
      \b\w+\b:
        count: 4
        multiplier: 0.1
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 4
        multiplier: 0.1
    score: 1
  p:
    symbols:
      \b\w+\b:
        count: 8
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.2
1.x is fine The point is to catch problems as soon as they occur…
4.4
content:
  p:
    symbols:
      \b\w+\b:
        count: 44
        multiplier: 0.1
    score: 1
multiplier: 1
1 4.4
Can always revert in case of emergency. It takes a few seconds.
1.2
content:
  p:
    symbols:
      \b\w+\b:
        count: 12
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.2
Would be pretty funny to automatically delete the latest on fata…
1.6
content:
  p:
    symbols:
      \b\w+\b:
        count: 16
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.6
whilefoo commented 2 months ago

/query @whilefoo

ubiquity-os[bot] commented 2 months ago
Property Value
Wallet 0xCee33C98410DEbe67A319Cb94F39e403435Df319
Access price
0x4007 commented 2 months ago

/allow @Whilefoo time

ubiquity-os[bot] commented 2 months ago

@0x4007, successfully set access for @Whilefoo

0x4007 commented 2 months ago

/query @whilefoo

ubiquity-os[bot] commented 2 months ago
Property Value
Wallet 0xCee33C98410DEbe67A319Cb94F39e403435Df319
0x4007 commented 2 months ago

Well, that's weird. I cleared your access

whilefoo commented 2 months ago

Weird my wallet is set to 0xCee33C98410DEbe67A319Cb94F39e403435Df319 but I don't have access to that wallet and I don't remember setting it

0x4007 commented 2 months ago

I migrated the wallets a long time ago in the database manually and shifted some over by some rows on accident. That's the only thing I can think of related to these discrepancies.

whilefoo commented 2 months ago

That might be it. I checked my old permits which I didn't claim because they were smaller amounts and I didn't bother to claim every one and they all have this wallet. I just made a quick script to check my comments and there weren't any /wallet commands with that address

whilefoo commented 2 months ago

/wallet 0xA0B11F474d8ECE1205d38c66d5F2bE8917675d60

ubiquity-os[bot] commented 2 months ago

+ Successfully registered wallet address
0x4007 commented 2 months ago

/query @whilefoo

ubiquity-os[bot] commented 2 months ago
Property Value
Wallet 0xCee33C98410DEbe67A319Cb94F39e403435Df319
0x4007 commented 2 months ago

You haven't claimed any permits since like last year?

whilefoo commented 1 month ago

/wallet 0xA0B11F474d8ECE1205d38c66d5F2bE8917675d60

ubiquity-os-beta[bot] commented 1 month ago

+ Successfully registered wallet address
whilefoo commented 1 month ago

/query @whilefoo

ubiquity-os-beta[bot] commented 1 month ago
Property Value
Wallet 0xCee33C98410DEbe67A319Cb94F39e403435Df319
whilefoo commented 1 month ago

/query @whilefoo

ubiquity-os-beta[bot] commented 1 month ago
Property Value
Wallet 0xA0B11F474d8ECE1205d38c66d5F2bE8917675d60